CMS news error? [RevCMS Arcturus]

Junior Spellweaver
Joined
Feb 22, 2012
Messages
133
Reaction score
23
Hi all so i am trying to fix a small bug which annoys the hell out of me.
I am using RevCMS for arcturus and I have 5 news articles currently active.
However there is 10 clickable points which repeat the images which are below.



Could someone please help? Many thanks, Xylo.
 

Attachments

You must be registered for see attachments list

Kak

Newbie Spellweaver
Joined
May 9, 2017
Messages
45
Reaction score
2
Re: [Help] CMS news error? [RevCMS Arcturus]

you can change this in your me.php
 
Upvote 0
Newbie Spellweaver
Joined
May 13, 2017
Messages
31
Reaction score
1
Re: [Help] CMS news error? [RevCMS Arcturus]

post the code
 
Upvote 0
Junior Spellweaver
Joined
Feb 22, 2012
Messages
133
Reaction score
23
Re: [Help] CMS news error? [RevCMS Arcturus]

post the code
PHP:
<div id="promo-box">
		<div id="promo-bullets"></div>
        

                <?php
                $to5 = mysql_query("SELECT * FROM cms_news ORDER BY ID DESC LIMIT 5") or die(mysql_error());
                ?>

                <?php $i = 0; while($newsobject = mysql_fetch_assoc($to5)){ $i++; ?>

                        <div class="promo-container" style="background-image: url({url}/web_promo/<?php echo $newsobject['image']; ?>)<?php if($i != '1'){ ?>; display: none<?php } ?>">
                            <div class="promo-content-container">
                                <div class="promo-content">
                                    <div class="title"><?php echo $newsobject['title']; ?></div>
                                    <div class="body"><?php echo $newsobject['shortstory']; ?></div>
                                </div>
                            </div>
                            <div class="promo-link-container">
                <div class="enter-hotel-btn">
                <div class="open enter-btn">
                             <a href="{url}/news/<?php echo $newsobject['id'] ?>">Read the full article »</a>
                        <b></b>
                    </div>
                </div>
                <div style="color:#FFF;margin-top:25px;margin-left:10px;">Posted on: <b><?php echo date('F
                d, Y', $newsobject['published']); ?></b></div>
</div>
</div>
<?php } ?>
</div>
 
Upvote 0
Newbie Spellweaver
Joined
May 13, 2017
Messages
31
Reaction score
1
Re: [Help] CMS news error? [RevCMS Arcturus]

What php version is your server running? If you're running a server and you need a cms then you should not be using RevCMS if it is still using mysql_query. Mysql_query was deprecated in php 5.x somewhere and is totally removed in php 7.

This code is Ducking aids, how can anyone use it, anyway, gonna clean it up a bit and I'll post back when it's somewhat readable



Well I typed up a long response and then hit go advanced and rz poop the bed on me. Upgrade your php to at least 5.6 but preferably 7, use modern code, ditch mysql_query for PDO or a framework that wraps it anyway (Symfony and Laravel are good, or test your luck with nodejs)

But anyway here's what I did, it's probably wrong because you only gave me a snippet.

https://hastebin.com/tocukuligi.xml
 
Upvote 0
Junior Spellweaver
Joined
Feb 22, 2012
Messages
133
Reaction score
23
Re: [Help] CMS news error? [RevCMS Arcturus]


Didnt make the CMS, thanks for trying but it didnt work. Heres the full me.php page & I will look into changing everything.
PHP:
<!DOCTYPE html>
<?php include('includes/checktheban.php'); ?>
<html lang="en">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
        <title>{hotelName} - Home</title>
		
		<script type="text/javascript">
		var andSoItBegins = (new Date()).getTime();
		</script>
        
        <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/common.css?v=<?php echo time(); ?>" type="text/css">
        <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/lightweightmepage.css?v=<?php echo time(); ?>" type="text/css">
		<link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/campaigns.css?v=<?php echo time(); ?>" type="text/css">
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs2.js?v=<?php echo time(); ?>"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/visual.js?v=<?php echo time(); ?>"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs.js?v=<?php echo time(); ?>"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/common.js?v=<?php echo time(); ?>"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/fullcontent.js?v=<?php echo time(); ?>"></script>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/lightweightmepage.js?v=<?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/habbo-imaging/";
            var habboPartner = "";
            var habboDefaultClientPopupUrl = "{url}/client";
            window.name = "habboMain";
            if (typeof HabboClient != "undefined") {
                HabboClient.windowName = "eac955c8dbc88172421193892a3e98fc7402021a";
                HabboClient.maximizeWindow = true;
            }
        </script>
        
        <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/personal.css?v=<?php echo time(); ?>" type="text/css">
        <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/bootstrap.alerts.css?v=<?php echo time(); ?>" type="text/css">
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/habboclub.js?v=<?php echo time(); ?>"></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="home">
    
    
            <div id="overlay"></div>
             <?php 

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

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

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

 

?>
                    </ul>
                </div>
            </div>
<div id="container">
<div id="content" style="position: relative" class="clearfix">
<div style="margin-bottom:5px;margin-top:5px;margin-left:20px;">

</div>
 <div id="container">
            <div id="content" style="position: relative" class="clearfix">
            <div id="wide-personal-info">
<?php     
   $getUserInfo = mysql_query("SELECT look FROM `users` WHERE id = '".$_SESSION['user']['id']."' ORDER BY look");
                                while ($userInfo= mysql_fetch_assoc($getUserInfo))
                                     {
                                echo '
            <div id="habbo-plate">
                    <img alt="1oClock" src="https://avatar-retro.com/habbo-imaging/avatarimage?figure={figure}&direction=2&head_direction=3&gesture=sml&action=wav"/>
                </a>
			';
									 }
			?>
			</div>
            <div id="name-box" class="info-box">
                <div class="label">Name:</div>
                <div class="content">{username}</div>
            </div>
            <div id="motto-box" class="info-box">
                <div class="label">Motto:</div>
                <div class="content">{motto}</div>
            </div>
            <div id="last-logged-in-box" class="info-box">
                <div class="label">Last signed in:</div>
                <div class="content">{lastSignedIn}</div>
            </div>

        <div class="enter-hotel-btn">
            <div class="open enter-btn">
                    <a href="{url}/client" target="38c35fe8bac3cff9c706f467ca3909ac2e5d7f52" onclick="HabboClient.openOrFocus(this); return false;">Enter {hotelname} Hotel<i></i></a> 
                <b></b>
            </div>
        </div>

        </div>
        <div id="promo-box">
		<div id="promo-bullets"></div>
        

                <?php
                $to5 = mysql_query("SELECT * FROM cms_news ORDER BY ID DESC LIMIT 5") or die(mysql_error());
                ?>

                <?php $i = 0; while($newsobject = mysql_fetch_assoc($to5)){ $i++; ?>

                        <div class="promo-container" style="background-image: url({url}/web_promo/<?php echo $newsobject['image']; ?>)<?php if($i != '1'){ ?>; display: none<?php } ?>">
                            <div class="promo-content-container">
                                <div class="promo-content">
                                    <div class="title"><?php echo $newsobject['title']; ?></div>
                                    <div class="body"><?php echo $newsobject['shortstory']; ?></div>
                                </div>
                            </div>
                            <div class="promo-link-container">
                <div class="enter-hotel-btn">
                <div class="open enter-btn">
                             <a href="{url}/news/<?php echo $newsobject['id'] ?>">Read the full article »</a>
                        <b></b>
                    </div>
                </div>
                <div style="color:#FFF;margin-top:25px;margin-left:10px;">Posted on: <b><?php echo date('F
                d, Y', $newsobject['published']); ?></b></div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>

                <div class = "right"></div>
                            <script type="text/javascript">
                                document.observe("dom:loaded", function() { PromoSlideShow.init(); });
                            </script>                       
<div id="column1" class="column">
<div class="habblet-container ">
<div class="cbb clearfix green ">
<h2 class="title"><span style="float: center;">{hotelName} FM!</span></h2>
 <div align="center"><br> </br> <!-- BEGINS: HTML5 PLAYER CODE SHOUTCASTWIDGETS.COM --><audio controls autoplay style="width:80%; height:10;  background-color:#000; color:#000;" src="http://94.23.26.22:8040/"></audio><!-- ENDS: HTML5 PLAYER CODE SHOUTCASTWIDGETS.COM --> </div>
<div id="room-more-data-h124" style="display: none">
<ul class="habblet-list room-more-data"> 
</div>
<table style="margin-left: 55px; padding-top: 6px;">
<tr style="padding: 0;">
</td>
</tr>
</table>
</div>
</div>
</div>
<div id="column2" class="column">
<div class="habblet-container ">
<div class="cbb clearfix blue ">
<h2 class="title"><span style="float: center;">Spark Discord</span></h2>
 <div align="center"><br> </br> <iframe src="https://discordapp.com/widget?id=393186776258183169&theme=dark" width="270" height="400" allowtransparency="true" frameborder="0"></iframe></div>
<div id="room-more-data-h124" style="display: none">
<ul class="habblet-list room-more-data"> 
</div>
<table style="margin-left: 55px; padding-top: 6px;">
<tr style="padding: 0;">
</td>
</tr>
</table>
</div>
</div>
</div>

</div>
</div>
</div>
</div>
</div>
                <script type="text/javascript">
                    document.observe("dom:loaded", function() { PromoSlideShow.init(); });
                </script>


				<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
				
        <!--[if lt IE 7]>
            <script type="text/javascript">
                Pngfix.doPngImageFix();
            </script>
        <![endif]-->
        </div>
        </div>

        <div id="footer">
                    </div>
                    <?php  include('includes/footer.php'); ?>

    </body>
</html>
 
Upvote 0
Newbie Spellweaver
Joined
May 13, 2017
Messages
31
Reaction score
1
Re: [Help] CMS news error? [RevCMS Arcturus]

Still curious what version of php your server is on
 
Upvote 0