News are not showing when visiting the news page

Results 1 to 19 of 19
  1. #1
    Alpha Member Glee is offline
    MemberRank
    Jun 2009 Join Date
    Niagara Falls,Location
    2,225Posts

    News are not showing when visiting the news page

    Every Time I go to my news page I get blank.



    news.php file

    PHP Code:

    <!DOCTYPE html>
    <?php include('includes/checktheban.php'); ?>
    <html lang="en">
        <head>
            <meta http-equiv="content-type" content="text/html; charset=utf-8">
            <title>{hotelName} - News Articles</title>
            
            <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/common.css" type="text/css">
            <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs2.js"></script>
            <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/visual.js"></script>
            <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs.js"></script>
            <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/common.js"></script>
            <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/fullcontent.js"></script>

            <style type="text/css">input[type="text"],input[type="password"]{background-color:#F1F1F1;border:1px solid #999999;width:175px;padding:5px;font-family:verdana;font-size:10px;color:#666666;}input[type="submit"]{background-color:#F1F1F1;border:1px solid #999999;padding:5px;font-family:verdana;font-size:10px;color:#666666;}textarea{background-color:#F1F1F1;border:1px solid #999999;padding:5px;width:517px;height:70px;font-family:verdana;font-size:10px;color:#666666;}select{background-color:#F1F1F1;border:1px solid #999999;padding:5px;font-family:verdana;font-size:10px;color:#666666;}</style>
            
            <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/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>
                 <?php 

    $navigatorID 
    2;
    require_once (
    'includes/header.php'); 

    ?>
                </div>
                </div>
            </div>
            <div id="content-container">
                <div id="navi2-container" class="pngbg">
                    <div id="navi2" class="pngbg clearfix">
                        <ul>
                            <?php 

    $subNavigatorID 
    2;
    require_once (
    'includes/subnavi.php'); 

    ?>
                        </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">
                                           
     <?php
        
    for ($i 0$i 7$i++)
        {
            
    $sectionName '';
            
    $sectionCutoffMax 0;
            
    $sectionCutoffMin 0;
            
            switch (
    $i)
            {
                case 
    0:
                
                    
    $sectionName 'Today';
                    
    $sectionCutoffMax time();
                    
    $sectionCutoffMin time() - 86400;
                    break;
                    
                case 
    1:
                
                    
    $sectionName 'Yesterday';
                    
    $sectionCutoffMax time() - 86400;
                    
    $sectionCutoffMin time() - 172800;
                    break;
                    
                case 
    2
                
                    
    $sectionName 'This week';
                    
    $sectionCutoffMax time() - 172800;
                    
    $sectionCutoffMin time() - 604800;
                    break;
                    
                case 
    3:
                
                    
    $sectionName 'Last week';
                    
    $sectionCutoffMax time() - 604800;
                    
    $sectionCutoffMin time() - 1209600;
                    break;
                    
                case 
    4:
                
                    
    $sectionName 'This month';
                    
    $sectionCutoffMax time() - 1209600;
                    
    $sectionCutoffMin time() - 2592000;
                    break;
                    
                case 
    5:
                
                    
    $sectionName 'Last month';
                    
    $sectionCutoffMax time() - 2592000;
                    
    $sectionCutoffMin time() - (60 60 24 365);
                    break;
            }
            
            
    $q "SELECT * FROM cms_news WHERE published >= " $sectionCutoffMin " AND published <= " $sectionCutoffMax .  " ORDER BY published DESC LIMIT 50";
            
    $getArticles mysql_query($q);

            if (
    mysql_num_rows($getArticles) > 0)
            {
                    echo 
    '<h2>' $sectionName '</h2> 
                    <ul>'
    ;

                while (
    $a mysql_fetch_assoc($getArticles))
                {
    ?>
        <li>
        <?php if($news_id !== $a['id']){ echo"<a href=\"".$path."/news/".$a['id']."\" class=\"article-".$a['id']."\">"; } ?>
        <?php echo $a['title']; ?>&raquo;</a>
        <?php if($news_id !== $a['id']){ echo"</a>"; } ?></li>
        <?php }
    echo 
    '
    </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">{newsTitle}</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>
                        <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
                       
                        </div>
                    </div>
                </div>
            </div>
            <script type="text/javascript">
                HabboView.run();
            </script>

            <!--[if lt IE 7]>
                <script type="text/javascript">
                    Pngfix.doPngImageFix();
                </script>
            <![endif]-->
            
            <div id="footer" >
                <?php include('includes/footer.php'); ?>
                <?php include('includes/checktheban.php'); ?>
            </div>
        
        </body>
    </html>
    Last edited by Glee; 19-10-16 at 04:18 AM.


  2. #2
    dont judge me Wuzix is offline
    MemberRank
    Sep 2013 Join Date
    C:\inetpub\wwwLocation
    403Posts

    Re: News are not showing when visiting the news page

    What is your URL when you go to your news page?

  3. #3
    Alpha Member Glee is offline
    MemberRank
    Jun 2009 Join Date
    Niagara Falls,Location
    2,225Posts

    Re: News are not showing when visiting the news page


  4. #4
    :joy: Jonteh is offline
    MemberRank
    Apr 2007 Join Date
    New York, USALocation
    3,372Posts

    Re: News are not showing when visiting the news page

    Dear lord, what CMS is that?

  5. #5
    Alpha Member Glee is offline
    MemberRank
    Jun 2009 Join Date
    Niagara Falls,Location
    2,225Posts

    Re: News are not showing when visiting the news page

    Quote Originally Posted by Jonteh View Post
    Dear lord, what CMS is that?
    It's just RevCMS using Habbo Theme but for some reason the news page just doesn't show articles but the bullet news shows on my community page and the me page.

  6. #6
    :joy: Jonteh is offline
    MemberRank
    Apr 2007 Join Date
    New York, USALocation
    3,372Posts

    Re: News are not showing when visiting the news page

    I don't know much about RevCMS, but, have you tried an alternative CMS? Rev is old and uses outdated methods of programming.

    Aside from that, are you visiting a specific news article ID? I don't know how Rev works, but it would seem you might need to visit a specific id.

  7. #7
    Alpha Member Glee is offline
    MemberRank
    Jun 2009 Join Date
    Niagara Falls,Location
    2,225Posts

    Re: News are not showing when visiting the news page

    Quote Originally Posted by Jonteh View Post
    I don't know much about RevCMS, but, have you tried an alternative CMS? Rev is old and uses outdated methods of programming.

    Aside from that, are you visiting a specific news article ID? I don't know how Rev works, but it would seem you might need to visit a specific id.
    I shouldn't need to view a specific News ID. But when I go visit Habboon News article it just %url%/news but with its latest news article.

  8. #8
    :joy: Jonteh is offline
    MemberRank
    Apr 2007 Join Date
    New York, USALocation
    3,372Posts

    Re: News are not showing when visiting the news page

    Quote Originally Posted by Glee View Post
    I shouldn't need to view a specific News ID. But when I go visit Habboon News article it just %url%/news but with its latest news article.
    Dunno what to tell you then bud. Use a different CMS, Rev is trash anyway.

  9. #9
    dont judge me Wuzix is offline
    MemberRank
    Sep 2013 Join Date
    C:\inetpub\wwwLocation
    403Posts

    Re: News are not showing when visiting the news page

    If you want to make your URL like 404 Not Found, you have to add a rule for that in your web.config / xampp whatever you use, and recode it like Habboon's. Your RevCMS is too old, and not customized like Habboon.
    And If you dont want to get a blank site when you click on your news page, you have to link it to a news ID.

  10. #10
    Alpha Member Glee is offline
    MemberRank
    Jun 2009 Join Date
    Niagara Falls,Location
    2,225Posts

    Re: News are not showing when visiting the news page

    Quote Originally Posted by Wuzix View Post
    If you want to make your URL like 404 Not Found, you have to add a rule for that in your web.config / xampp whatever you use, and recode it like Habboon's. Your RevCMS is too old, and not customized like Habboon.
    And If you dont want to get a blank site when you click on your news page, you have to link it to a news ID.
    I already have it coded in the .htaccess I think I know what may be causing the problem just let me look into it a little.

    Edit:

    I fixed the first issue now this is my second issue

    Last edited by Glee; 19-10-16 at 04:20 PM.

  11. #11
    dont judge me Wuzix is offline
    MemberRank
    Sep 2013 Join Date
    C:\inetpub\wwwLocation
    403Posts

    Re: News are not showing when visiting the news page

    Quote Originally Posted by Glee View Post
    I already have it coded in the .htaccess I think I know what may be causing the problem just let me look into it a little.

    Edit:

    I fixed the first issue now this is my second issue

    Send me your news.php code, lemme see.

  12. #12
    Alpha Member Glee is offline
    MemberRank
    Jun 2009 Join Date
    Niagara Falls,Location
    2,225Posts

    Re: News are not showing when visiting the news page

    Quote Originally Posted by Wuzix View Post
    Send me your news.php code, lemme see.
    Spoiler:

    PHP Code:

    <!DOCTYPE html>
    <?php include('includes/checktheban.php'); ?>
    <html lang="en">
        <head>
            <meta http-equiv="content-type" content="text/html; charset=utf-8">
            <title>{hotelName} - News Articles</title>
            
            <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/common.css" type="text/css">
            <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs2.js"></script>
            <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/visual.js"></script>
            <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs.js"></script>
            <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/common.js"></script>
            <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/fullcontent.js"></script>

            <style type="text/css">input[type="text"],input[type="password"]{background-color:#F1F1F1;border:1px solid #999999;width:175px;padding:5px;font-family:verdana;font-size:10px;color:#666666;}input[type="submit"]{background-color:#F1F1F1;border:1px solid #999999;padding:5px;font-family:verdana;font-size:10px;color:#666666;}textarea{background-color:#F1F1F1;border:1px solid #999999;padding:5px;width:517px;height:70px;font-family:verdana;font-size:10px;color:#666666;}select{background-color:#F1F1F1;border:1px solid #999999;padding:5px;font-family:verdana;font-size:10px;color:#666666;}</style>
            
            <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/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>
                 <?php 

    $navigatorID 
    2;
    require_once (
    'includes/header.php'); 

    ?>
                </div>
                </div>
            </div>
            <div id="content-container">
                <div id="navi2-container" class="pngbg">
                    <div id="navi2" class="pngbg clearfix">
                        <ul>
                            <?php 

    $subNavigatorID 
    2;
    require_once (
    'includes/subnavi.php'); 

    ?>
                        </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">
                                

    <?php
        
    for ($i 0$i 7$i++)
        {
            
    $sectionName '';
            
    $sectionCutoffMax 0;
            
    $sectionCutoffMin 0;
            
            switch (
    $i)
            {
                case 
    0:
                
                    
    $sectionName 'Today';
                    
    $sectionCutoffMax time();
                    
    $sectionCutoffMin time() - 86400;
                    break;
                    
                case 
    1:
                
                    
    $sectionName 'Yesterday';
                    
    $sectionCutoffMax time() - 86400;
                    
    $sectionCutoffMin time() - 172800;
                    break;
                    
                case 
    2
                
                    
    $sectionName 'This week';
                    
    $sectionCutoffMax time() - 172800;
                    
    $sectionCutoffMin time() - 604800;
                    break;
                    
                case 
    3:
                
                    
    $sectionName 'Last week';
                    
    $sectionCutoffMax time() - 604800;
                    
    $sectionCutoffMin time() - 1209600;
                    break;
                    
                case 
    4:
                
                    
    $sectionName 'This month';
                    
    $sectionCutoffMax time() - 1209600;
                    
    $sectionCutoffMin time() - 2592000;
                    break;
                    
                case 
    5:
                
                    
    $sectionName 'Last month';
                    
    $sectionCutoffMax time() - 2592000;
                    
    $sectionCutoffMin time() - (60 60 24 365);
                    break;
            }
            
            
    $q "SELECT * FROM cms_news WHERE published >= " $sectionCutoffMin " AND published <= " $sectionCutoffMax .  " ORDER BY published DESC LIMIT 50";
            
    $getArticles mysql_query($q);

            if (
    mysql_num_rows($getArticles) > 0)
            {
                    echo 
    '<h2>' $sectionName '</h2> 
                    <ul>'
    ;

                while (
    $a mysql_fetch_assoc($getArticles))
                {
    ?>
        <li>
        <?php if($news_id !== $a['id']){ echo"<a href=\"".$path."/news/".$a['id']."\" class=\"article-".$a['id']."\">"; } ?>
        <?php echo $a['title']; ?>&raquo;</a>
        <?php if($news_id !== $a['id']){ echo"</a>"; } ?></li>
        <?php }
    echo 
    '
    </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">{newsTitle}</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>
                        <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
                       
                        </div>
                    </div>
                </div>
            </div>
            <script type="text/javascript">
                HabboView.run();
            </script>

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


    I'm basically trying to get this


  13. #13
    dont judge me Wuzix is offline
    MemberRank
    Sep 2013 Join Date
    C:\inetpub\wwwLocation
    403Posts

    Re: News are not showing when visiting the news page

    How does your cms_news table looks like? Also the columns

  14. #14
    Alpha Member Glee is offline
    MemberRank
    Jun 2009 Join Date
    Niagara Falls,Location
    2,225Posts

    Re: News are not showing when visiting the news page

    Quote Originally Posted by Wuzix View Post
    How does your cms_news table looks like? Also the columns


    and my CMS is showing 1 article now


  15. #15
    dont judge me Wuzix is offline
    MemberRank
    Sep 2013 Join Date
    C:\inetpub\wwwLocation
    403Posts

    Re: News are not showing when visiting the news page

    Well. You got it fixed.

  16. #16
    Alpha Member Glee is offline
    MemberRank
    Jun 2009 Join Date
    Niagara Falls,Location
    2,225Posts

    Re: News are not showing when visiting the news page

    Quote Originally Posted by Wuzix View Post
    Well. You got it fixed.
    Semi fixed the title isn't bolding itself using the class="selected"

  17. #17
    dont judge me Wuzix is offline
    MemberRank
    Sep 2013 Join Date
    C:\inetpub\wwwLocation
    403Posts

    Re: News are not showing when visiting the news page

    Let me see the code.

  18. #18
    Alpha Member Glee is offline
    MemberRank
    Jun 2009 Join Date
    Niagara Falls,Location
    2,225Posts

    Re: News are not showing when visiting the news page

    PHP Code:

    <!DOCTYPE html>
    <?php include('includes/checktheban.php'); ?>
    <html lang="en">
        <head>
            <meta http-equiv="content-type" content="text/html; charset=utf-8">
            <title>{hotelName} - News Articles</title>
            
            <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/common.css" type="text/css">
            <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs2.js"></script>
            <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/visual.js"></script>
            <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs.js"></script>
            <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/common.js"></script>
            <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/fullcontent.js"></script>

            <style type="text/css">input[type="text"],input[type="password"]{background-color:#F1F1F1;border:1px solid #999999;width:175px;padding:5px;font-family:verdana;font-size:10px;color:#666666;}input[type="submit"]{background-color:#F1F1F1;border:1px solid #999999;padding:5px;font-family:verdana;font-size:10px;color:#666666;}textarea{background-color:#F1F1F1;border:1px solid #999999;padding:5px;width:517px;height:70px;font-family:verdana;font-size:10px;color:#666666;}select{background-color:#F1F1F1;border:1px solid #999999;padding:5px;font-family:verdana;font-size:10px;color:#666666;}</style>
            
            <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/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>
                 <?php 

    $navigatorID 
    2;
    require_once (
    'includes/header.php'); 

    ?>
                </div>
                </div>
            </div>
            <div id="content-container">
                <div id="navi2-container" class="pngbg">
                    <div id="navi2" class="pngbg clearfix">
                        <ul>
                            <?php 

    $subNavigatorID 
    2;
    require_once (
    'includes/subnavi.php'); 

    ?>
                        </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">
                                

    <?php
        
    for ($i 0$i 7$i++)
        {
            
    $sectionName '';
            
    $sectionCutoffMax 0;
            
    $sectionCutoffMin 0;
            
            switch (
    $i)
            {
                case 
    0:
                
                    
    $sectionName 'Today';
                    
    $sectionCutoffMax time();
                    
    $sectionCutoffMin time() - 86400;
                    break;
                    
                case 
    1:
                
                    
    $sectionName 'Yesterday';
                    
    $sectionCutoffMax time() - 86400;
                    
    $sectionCutoffMin time() - 172800;
                    break;
                    
                case 
    2
                
                    
    $sectionName 'This week';
                    
    $sectionCutoffMax time() - 172800;
                    
    $sectionCutoffMin time() - 604800;
                    break;
                    
                case 
    3:
                
                    
    $sectionName 'Last week';
                    
    $sectionCutoffMax time() - 604800;
                    
    $sectionCutoffMin time() - 1209600;
                    break;
                    
                case 
    4:
                
                    
    $sectionName 'This month';
                    
    $sectionCutoffMax time() - 1209600;
                    
    $sectionCutoffMin time() - 2592000;
                    break;
                    
                case 
    5:
                
                    
    $sectionName 'Last month';
                    
    $sectionCutoffMax time() - 2592000;
                    
    $sectionCutoffMin time() - (60 60 24 365);
                    break;
            }
            
            
    $q "SELECT * FROM cms_news WHERE published >= " $sectionCutoffMin " AND published <= " $sectionCutoffMax .  " ORDER BY published DESC LIMIT 50";
            
    $getArticles mysql_query($q);

            if (
    mysql_num_rows($getArticles) > 0)
            {
                    echo 
    '<h2>' $sectionName '</h2> 
                    <ul>'
    ;

                while (
    $a mysql_fetch_assoc($getArticles))
                {
    ?>
        <li>
        <?php if($news_id !== $a['id']){ echo"<a href=\"".$path."/news/".$a['id']."\" class=\"article-".$a['id']."\">"; } ?>
        <?php echo $a['title']; ?> &raquo;</a>
        <?php if($news_id !== $a['id']){ echo"</a>"; } ?></li>
        <?php }
    echo 
    '
    </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">{newsTitle}</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>
                        <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
                       
                        </div>
                    </div>
                </div>
            </div>
            <script type="text/javascript">
                HabboView.run();
            </script>

            <!--[if lt IE 7]>
                <script type="text/javascript">
                    Pngfix.doPngImageFix();
                </script>
            <![endif]-->
            </font>
            </p>
            
            <div id="footer" style="margin-top:-20px;">
    <p class="footer-links"><a href="https://cheerhotel.com/client">Launch Client</a> l <a href="#" target="_blank">Terms of Service</a> l <a href="http://cheerboards.com/">Forums</a> l <a href="https://cheerhotel.com/store">Store</a></p>
    <p class="copyright">Copyright &copy; {hotelName} Hotel 2016. All rights reserved to their respective owner(s). Credits to <strong>Kryptos</strong> for <strong>RevCMS</strong.</p>

        </body>
    </html>

  19. #19
    Proficient Member EdwinxP is offline
    MemberRank
    Nov 2011 Join Date
    164Posts

    Re: News are not showing when visiting the news page

    How did you fix?



Advertisement