[RevCMS] News.php

Zymf

 
Aug 19, 2012
868
166
I'm using a RevCMS theme that was released by a friend whom I know used and their news.php was working fine.
Ever since I've installed it the news.php has been a white page?

I've even tried to use another theme's news.php page and it still left a white screen.
^ When testing the news news.php I renamed it to testing.php - In there it showed the page correctly but then when I renamed it to news.php it went white just like the original news.php from the theme I downloaded.

Any suggestions?
 

Zymf

 
Aug 19, 2012
868
166
There's nothing found for:
Code:
display_errors = false
The only error type things I've found are:
Code:
; display_errors
;  Default Value: On
;  Development Value: On
;  Production Value: Off

; display_startup_errors
;  Default Value: Off
;  Development Value: On
;  Production Value: Off

; error_reporting
;  Default Value: E_ALL & ~E_NOTICE
;  Development Value: E_ALL | E_STRICT
;  Production Value: E_ALL & ~E_DEPRECATED

; html_errors
;  Default Value: On
;  Development Value: On
;  Production value: Off

; log_errors
;  Default Value: Off
;  Development Value: On
;  Production Value: On

F
ound it! I'll try it now

-------
EDIT
-------
Where do the error reports log?
I don't understand this at all
 

Zymf

 
Aug 19, 2012
868
166
@j4ck believes it's possibly something to do with my class_forms... I can't see anything but hopefully someone else might?
PHP:
final public function getPageNews()
    {
        global $template, $engine, $_CONFIG;
       
            if(!isset($_GET['id']) || !is_numeric($_GET['id']))
            {
                $_GET['id'] = 1;
            }
                $result = mysql_query("SELECT title, id FROM cms_news ORDER BY id DESC");
               
                while($news1 = mysql_fetch_array($result))
                {
                    if($news1['id'] == $_GET['id'])
                    {
                        $template->setParams('newsList', '<li class="newslist">'.$news1['title'].'&raquo</li>');
                    }
                    else
                    {
                        $template->setParams('newsList', '<li class="newslist"><a href="'.$_CONFIG['hotel']['url'].'/index.php?url=news&id='.$news1['id'].'">'.$news1['title'].'&raquo</a></li>');
                    }
                }
               
                $news = $engine->fetch_assoc("SELECT title, longstory, shortstory, author, published FROM cms_news WHERE id = '" . $engine->secure($_GET['id']) . "' LIMIT 1");
                $template->setParams('newsTitle', $news['title']);
                $template->setParams('newsContent', $news['longstory']);
                $template->setParams('newsPreview', $news['shortstory']);
                $template->setParams('newsAuthor', $news['author']);
                $template->setParams('newsDate', date("d-m-y H:h", $news['published']));
           
                unset($result);
                unset($news1);
                unset($news);
    }

News.php
PHP:
<?php
if(isset($_GET['id'])) 
{
    $id = mysql_real_escape_string($_GET['id']);
    $query = mysql_query( "SELECT * FROM `cms_news` WHERE id = '{$id}'" );
    $array = mysql_fetch_array($query);
   
    if ($array == null)
    {
        $getMax = mysql_fetch_array(mysql_query("SELECT MAX(id) FROM cms_news LIMIT 1"));
        header("Location: ".$_CONFIG['hotel']['url']."/index.php?url=news&id=". $getMax['MAX(id)'] ."");
        exit();
    }
}
?>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
        <title>{hotelName} - News</title>
        <link rel="shortcut icon" href="{url}/favicon.ico?<?php echo time() ?>" type="image/x-icon"/>
        <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/common.css?<?php echo time() ?>" type="text/css">
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs2.js?<?php echo time() ?>"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/visual.js?<?php echo time() ?>"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs.js?<?php echo time() ?>"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/common.js?<?php echo time() ?>"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/fullcontent.js?<?php echo time() ?>"></script>
       
        <script type="text/javascript">
            document.habboLoggedIn = true;
            var habboName = "{username}";
            var habboId = {userid};
            var habboReqPath = "";
            var habboStaticFilePath = "{url}/app/tpl/skins/Habbo";
            var habboImagerUrl = "http://www.habbo.com.tr/habbo-imaging/";
            var habboPartner = "";
            var habboDefaultClientPopupUrl = "{url}/client";
            window.name = "habboMain";
            if (typeof HabboClient != "undefined") {
                HabboClient.windowName = "eac955c8dbc88172421193892a3e98fc7402021a";
                HabboClient.maximizeWindow = true;
            }
        </script>
       
        <!--[if IE 8]>
            <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie8.css" type="text/css">
        <![endif]-->
        <!--[if lt IE 8]>
            <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie.css" type="text/css" />
        <![endif]-->
        <!--[if lt IE 7]>
            <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie6.css" type="text/css" />
            <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/pngfix.js"></script>
            <script type="text/javascript">
                try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
            </script>
            <style type="text/css">
                body { behavior: url({url}/app/tpl/skins/Habbo/js/csshover.htc); }
            </style>
        <![endif]-->
    </head>
   
    <body id="news">
   
        <div id="overlay"></div>
        <div id="header-container">
            <div id="header" class="clearfix">
                <h1><a href="{url}/"></a></h1>
                <div id="subnavi">
                    <div id="subnavi-user">
                    <div style="margin-top:7px;font-size:10px">
                        <?php include"randomFacts.php" ?>
                    </div>
                    </div>
                    <div id="subnavi-search">
                        <div id="subnavi-search-upper">
                            <ul id="subnavi-search-links">
                              <li><a href="{url}/logout" style="color:#000;font-size:10px;">Sign Out</a>
                            </ul>
                        </div>
                    </div>
                    <div id="to-hotel">
                                     <a href="{url}/client" class="new-button green-button" target="05efbade773135677a28f2b338c5bdf93774237c" onclick="HabboClient.openOrFocus(this); return false;"><b>Enter {hotelName}</b><i></i></a>
                <?php if($_SESSION['user']['rank'] >= 1) { echo '<a href="{url}/shop" class="new-button red-button" action="_new" style="left: -5px;"><b>Store</b><i></i></a>'; } ?>
                </div>
                </div>
                <ul id="navi">
                    <li class="metab"><a href="{url}/me"><?php echo ($_SESSION['user']['username']); ?></a><span></span></li>
                    <li class="selected"><strong>Community</strong><span></span></li>
                    <li class="viptab"><a href="{url}/shop">Shop</a><span></span></li>
                    <li class="viptab5"><a href="http://facebook.com/basehabbo" target="_blank">Facebook</a><span></span></li>
                </ul>
                <div id="habbos-online"><div class="rounded"><span>{online} members online</span></div></div>
            </div>
        </div>
        <div id="content-container">
            <div id="navi2-container" class="pngbg">
                <div id="navi2" class="pngbg clearfix">
                    <ul>
                        <li class=""><a href="{url}/community">Community</a></li>
                        <li class="selected">News</li>
                        <li class=" last"><a href="{url}/community/staff">Staff</a></li>
                    </ul>
                </div>
            </div>
            <div id="container">
                <div id="content" style="position: relative" class="clearfix">
                    <div id="column1" class="column">
                        <div class="habblet-container ">       
                            <div class="cbb clearfix default ">
                                <h2 class="title">News</h2>
                                <div id="article-archive">
                                    <ul>
                                        {newsList}
                                    </ul>
                                </div>
                            </div>
                        </div>
                        <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
                    </div>
                    <div id="column2" class="column">
                        <div class="habblet-container ">       
                            <div class="cbb clearfix notitle ">
                                <div id="article-wrapper">
                                    <h2>{newsTitle}</h2>
                                    <div class="article-meta">Posted {newsDate}</div>
                                    <p class="summary">{newsPreview}</p>
                                    <div class="article-body">
                                        {newsContent}
                                        <br><br>
                                        <p><font face="Verdana" size="1"><b>- {newsAuthor}</b></p>
                                        <script type="text/javascript" language="Javascript">
                                            document.observe("dom:loaded", function() {
                                                $$('.article-images a').each(function(a) {
                                                    Event.observe(a, 'click', function(e) {
                                                        Event.stop(e);
                                                        Overlay.lightbox(a.href, "Image is loading");
                                                    });
                                                });
                                               
                                                $$('a.article-2729').each(function(a) {
                                                    a.replace(a.innerHTML);
                                                });
                                            });
                                        </script>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
                    </div>
                </div>
            </div>
        </div>
        <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
        <script type="text/javascript">
            HabboView.run();
        </script>

        <!--[if lt IE 7]>
            <script type="text/javascript">
                Pngfix.doPngImageFix();
            </script>
        <![endif]-->
       
        <div id="footer" >
        </div>
   
    </body>
</html>

cms_news table structure:
a06197c5246255863f08730b06177a7b.png



Hopefully that's enough info for anyone who's willing to help.
 

Zymf

 
Aug 19, 2012
868
166
This has been fixed.
The class.templates still contained a line of code regarding news comments when the news comment system had been deleted.
 

Users who are viewing this thread

Top