RevCMS News Picture

Bran

habcrush.pw
Mar 13, 2017
1,789
1,609
so my news articles work fine but the only thing that isn't working is on the homepage the picture behind it doesn't show up but everything else does? i have default images in my c_images > web_promos folder, but i do all the articles via navicat and not housekeeping
TSqAubK.png
 

Joshhh

Member
Apr 13, 2016
325
177
you only need to put the file name in there like 1.png.. Like this;

VSQ8zppBSgiNVc04N5BCDQ.png

Also look where it is getting your images from , e.g. swfs/c_images/web_promos or the one in your skin folder...
 

Bran

habcrush.pw
Mar 13, 2017
1,789
1,609
you only need to put the file name in there like 1.png.. Like this;

VSQ8zppBSgiNVc04N5BCDQ.png

Also look where it is getting your images from , e.g. swfs/c_images/web_promos or the one in your skin folder...
yeah i've got that and it isn't working :( i've tried just putting the file name and .png and it won't work
 

Joshhh

Member
Apr 13, 2016
325
177
fLcI3wZyRj25F6VKWa6g-w.png

On the page wherever you want the image to go, does that page have this included, the code may look like this;
Code:
 <div class="promo-container" style="background-image: url({url}/swf/c_images/web_promos/<?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>
 

Bran

habcrush.pw
Mar 13, 2017
1,789
1,609
fLcI3wZyRj25F6VKWa6g-w.png

On the page wherever you want the image to go, does that page have this included, the code may look like this;
Code:
 <div class="promo-container" style="background-image: url({url}/swf/c_images/web_promos/<?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>
Code:
<!DOCTYPE html>
<html lang="en">
    <head>
        <link rel="shortcut icon" href="{url}/app/tpl/skins/{skin}/images/habcrushfavicon.ico" type="image/vnd.microsoft.icon"/>
        <meta http-equiv="content-type" content="text/html; charset=utf-8">
        <title>{hotelName}: Home</title>
        
        <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/common.css" type="text/css">
        <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/lightweightmepage.css" type="text/css">
        <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/alert.css" type="text/css">
        <link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/campaigns.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>
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/lightweightmepage.js"></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" type="text/css">
        <script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/habboclub.js"></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 include ("includes/header.php"); ?>
                <ul id="navi">
                    <li class="metab selected"><strong>{username}</strong><span></span></li>
                    <li><a href="{url}/community">Community</a><span></span></li>

                    <li id="tab-register-now"><a href="{url}/store">Store</a><span></span></li>
                    <?php
                    if(isset($_SESSION['user']['id']))
                    if(mysql_result(mysql_query("SELECT rank FROM users WHERE id = '" . $_SESSION['user']['id'] . "'"), 0) >= 2)                    {
                    echo '<li id="tab-register-now"><a href="{url}/ase/login" target="_blank">Staff Panel</a><span></span></li>';
                    }
                    ?>
                </ul>
                <div id="habbos-online"><div id="content"><div class="cbb "><span><b>{online}</b><br>user(s)<br>online!</span></div></div></div>
            </div>
        </div>
        <div id="content-container">
            <div id="navi2-container" class="pngbg">
                <div id="navi2" class="pngbg clearfix">
                    <ul>
                        <li class="selected">Home</li>
                        <li class=""><a href="{url}/home/{username}">My Page</a></li>
                        <li class=""><a href="{url}/account">Account Settings</a></li>
                    </ul>
                </div>
            </div>
        <div id="container">
            <div id="content" style="position: relative" class="clearfix">
            <div class="alert alert-info" style="margin-bottom: 6px;width:730px;">
<strong>Heads up!</strong> If you have any bugs to report on use our <a href="https://discord.gg/EensBUC">discord</a> to report them!
</div>
            <div id="wide-personal-info">

            <div id="habbo-plate">
                    <a href="{url}/account"><img alt="1oClock" src="https://www.habbo.com.br/habbo-imaging/avatarimage?hb=img&figure={figure}&action=wav&direction=2&head_direction=3&gesture=sml&size=m"/></a>
                </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="/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 10") or die(mysql_error());
                ?>

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

                        <div class="promo-container" style="background-image: {url}/app/tpl/skins/Habbo/images/web_promos/<?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}/index.php?url=news&id=<?php echo $newsobject['id']; ?>">Read More &raquo;</a>
                        <b></b>
                    </div>
                </div>
                            </div>
                        </div>

                        <?php }?>

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

                </div>
              
                <script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
                
                <div id="column1" class="column">   
<div class="habblet-container ">       
    <div class="cbb clearfix red ">
        <h2 class="title"><span style="float:left;">Daily Gift</span><span style="float:right;font-weight:normal;font-size:75%">Collect your daily gift!</span></h2>
        <div class="box-content">
                
                <p>
                Click Frank and his gift to collect your daily gift!<br> You will only be allowed to claim it once a day.
                </p>
                <a href="/gift"><img style="float: right;" src="https://img.webme.com/pic/i/imagehabbo/club_gift.gif"></a>
                <p>
                If by any chance your daily gift doesn't give you anything, click <a href="/gift">here</a>.
                </p>
        </div>
        <iframe src="https://discordapp.com/widget?id=391024386057961472&theme=dark" width="350" style="float:right height="300" allowtransparency="true" frameborder="0"></iframe>
    </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>       
            
        </div>
        
        <!--[if lt IE 7]>
            <script type="text/javascript">
                Pngfix.doPngImageFix();
            </script>
        <![endif]-->
        
<br>
            <?php include('includes/footer.php'); ?>
            <?php include('includes/checktheban.php'); ?>

    </div>
    </body>
</html>
that's my /me page where the news thing is not showing and it does say that
 

Users who are viewing this thread

Top