RevCMS News Error {newsTitle-1}! HELP?!

minthotel

New Member
May 13, 2012
18
1
Hello, I recently set up my R63B RevCMS server and Im running into some issues with it, everything works fine but the Housekeeping and the "stafflogin" which I can deal with later, I was hoping to do the old run around and use the database to create news articles "Considering its a quick fix till I get around to it" and its not seeming to work, I've provided everything you'll need to know about my database below with pictures and I hope this helps. Please if someone could provide me with a fix to this issue that would be great.
NOTE:
I am using the Habbo-Custom Theme, And this issue is happening on other themes as well.
Main Problem (Not Showing)
7a3abb99f616474ebfb4876dcb436bfa.png

My site_news
a9ecd8e4fdf6418192fb0726df40b262.png

results when clicking on a title that isn't there
42f222e5e9e04c69ab97e38ede22e457.png

Finally my cms_news
dc03652af760476e897de1b96283eb31.png

Here is a snippet which is from the "/me.php" page that includes news.
Code:
 <div id="topstories">
                                        <div class="topstory" style="background-image: url({url}/r63/c_images/Top_Story_Images/{newsIMG-1})">
                                            <h4>Hotest News</h4>
                                            <h3><a href="{url}/index.php?url=news&id={newsID-1}">{newsTitle-1}</a></h3>
                                            <p class="summary">
                                                {newsCaption-1}
                                            </p>
                                            <p>
                                                <a href="{url}/index.php?url=news&id={newsID-1}">Read more &raquo;</a>
                                            </p>
                                        </div>
                                        <div class="topstory" style="background-image: url({url}/r63/c_images/Top_Story_Images/{newsIMG-2}); display: none">
                                            <h4>Latest news</h4>
                                            <h3><a href="{url}/index.php?url=news&id={newsID-2}">{newsTitle-2}</a></h3>
                                            <p class="summary">
                                                {newsCaption-2}
                                            </p>
                                            <p>
                                                <a href="{url}/index.php?url=news&id={newsID-2}">Read more &raquo;</a>
                                            </p>
                                        </div>
                                        <div class="topstory" style="background-image: url({url}/r63/c_images/Top_Story_Images/{newsIMG-3}); display: none">
                                            <h4>Latest news</h4>
                                            <h3><a href="{url}/index.php?url=news&id={newsID-3}">{newsTitle-3}</a></h3>
                                            <p class="summary">
                                                {newsCaption-3}
                                            </p>
                                            <p>
                                                <a href="{url}/index.php?url=news&id={newsID-3}">Read more &raquo;</a>
                                            </p>
                                        </div>
                                        <div class="topstory" style="background-image: url({url}/r63/c_images/Top_Story_Images/{newsIMG-4}); display: none">
                                            <h4>Latest news</h4>
                                            <h3><a href="{url}/index.php?url=news&id={newsID-4}">{newsTitle-4}</a></h3>
                                            <p class="summary">
                                                {newsCaption-4}
                                            </p>
                                            <p>
                                                <a href="{url}/index.php?url=news&id={newsID-4}">Read more &raquo;</a>
                                            </p>
                                        </div>
                                        <div class="topstory" style="background-image: url({url}/r63/c_images/Top_Story_Images/{newsIMG-5}); display: none">
                                            <h4>Latest news</h4>
                                            <h3><a href="{url}/index.php?url=news&id={newsID-5}">{newsTitle-5}</a></h3>
                                            <p class="summary">
                                                {newsCaption-5}
                                            </p>
                                            <p>
                                                <a href="{url}/index.php?url=news&id={newsID-5}">Read more &raquo;</a>
                                            </p>
                                        </div>
                                        <div id="topstories-nav" style="display: none"><a href="#" class="prev">&laquo; Previous</a><span>1</span> / 5<a href="#" class="next">Next &raquo;</a></div>
                                    </div>
                                    <ul class="widelist">
                                        <li class="even"><a href="{url}/index.php?url=news&id={newsID-1}">{newsTitle-1} &raquo;</a><div class="newsitem-date">{newsDate-1}</div></li>         
                                        <li class="odd"><a href="{url}/index.php?url=news&id={newsID-2}">{newsTitle-2} &raquo;</a><div class="newsitem-date">{newsDate-2}</div></li>
                                        <li class="odd"><a href="{url}/index.php?url=news&id={newsID-3}">{newsTitle-3} &raquo;</a><div class="newsitem-date">{newsDate-3}</div></li>
                                       
                                        <li class="last"><a href="/news">More news &raquo;</a></li>
Also here is a snippet of my news.php page
Code:
  <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>
                             
                                    <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>
                                 
                              </div>  </div>
                            </div>
                        </div>

Could you find the problem and potentially help me fix this issue?
Here is my class.template.php also
Code:
<?php

namespace Revolution;
if(!defined('IN_INDEX')) { die('Sorry, you cannot access this file.'); }
class template implements iTemplate
{

    public $tpl;
   
    private $params = array();

    final public function Initiate()
    {
        global $_CONFIG, $users, $engine, $core, $template;
        $this->setParams('hotelName', $_CONFIG['hotel']['name']);
        $this->setParams('hotelDesc', $_CONFIG['hotel']['desc']);
        $this->setParams('url', $_CONFIG['hotel']['url']);
        $this->setParams('online', $core->getOnline());
        $this->setParams('status', $core->getStatus());
        $this->setParams('web_build', $_CONFIG['hotel']['web_build']);
        $this->setParams('external_vars', $_CONFIG['hotel']['external_vars']);
        $this->setParams('external_texts', $_CONFIG['hotel']['external_texts']);
        $this->setParams('swf_folder', $_CONFIG['hotel']['swf_folder']);
        $this->setParams('furni_data', $_CONFIG['hotel']['furni_data']);
        $this->SetParams('product_data', $_CONFIG['hotel']['product_data']);
        $this->setParams('server_ip', $_CONFIG['hotel']['server_ip']);
       
        $this->setParams('mysql_host', $_CONFIG['mysql']['hostname']);
        $this->setParams('mysql_port', $_CONFIG['mysql']['port']);
       
        $this->setParams('skin', $_CONFIG['template']['style']);
       
        if($users->isLogged())
        {   
            $this->setParams('username', $users->getInfo($_SESSION['user']['id'], 'username'));
            $this->setParams('rank', $users->getInfo($_SESSION['user']['id'], 'rank'));
            $this->setParams('motto', $users->getInfo($_SESSION['user']['id'], 'motto'));
            $this->setParams('email', $users->getInfo($_SESSION['user']['id'], 'mail'));
            $this->setParams('coins', $users->getInfo($_SESSION['user']['id'] ,'credits'));
            $this->setParams('activitypoints', $users->getInfo($_SESSION['user']['id'], 'activity_points'));
            $this->setParams('figure', $users->getInfo($_SESSION['user']['id'], 'look'));
            $this->setParams('ip_last', $users->getInfo($_SESSION['user']['id'], 'ip_last'));
           
            if($this->params['rank'] > 3)
            {
                $this->setParams('housekeeping', '<li><a href="ase/index.php?url=login">Housekeeping</a></li>');
            }
            else
            {
                $this->setParams('housekeeping', '');
            }
           
            if($_GET['url'] == 'me' || $_GET['url'] == 'account' || $_GET['url'] == 'home' || $_GET['url'] == 'settings' || $_GET['url'] == 'community')
            {
                $template->form->getPageHome();               
            }
           
            if($_GET['url'] == 'news' || $_GET['url'] == 'articles')
            {
                $template->form->getPageNews();
            }       
        }
       
    }
   
    final public function setParams($key, $value)
    {   
        $this->params[$key] .= $value;
    }
   
    final public function filterParams($str)
    {
        foreach($this->params as $key => $value)
        {
            $str = str_ireplace('{' . $key . '}', $value, $str);
        }

        return $str;
    }
       
    final public function write($str)
    {
        $this->tpl .= $str;
    }
   
    final public function outputTPL()
    {
        echo $this->filterParams($this->tpl);
        unset($this->tpl);
    }
}
?>
 
If you need any addition information let me know I'll try to provide some.
 
Last edited:

Pinkman

Posting Freak
Jul 27, 2016
818
194
Erm, why do you have 2 different tables? I think the error is occurring when it's trying to read the news from database,which could be a MySQL Error, I'll hop on my of later and fix this for you.
 

Joe

Well-Known Member
Jun 10, 2012
4,172
1,955
Erm, why do you have 2 different tables? I think the error is occurring when it's trying to read the news from database,which could be a MySQL Error, I'll hop on my of later and fix this for you.
There is only one cms_news ?_?
The two entries you're seeing are two completely different news articles - which looks right?
However, I would recommend an IIS/Navicat setup rather than phpmyadmin (it looks like)

Your cms_news looks a little wrong though - here's the correct format.
Code:
-- ----------------------------
-- Table structure for cms_news
-- ----------------------------
DROP TABLE IF EXISTS `cms_news`;
CREATE TABLE `cms_news` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) COLLATE latin1_general_ci DEFAULT NULL,
`shortstory` text COLLATE latin1_general_ci,
`longstory` text COLLATE latin1_general_ci,
`published` int(10) NOT NULL DEFAULT '0',
`image` varchar(255) COLLATE latin1_general_ci DEFAULT '/Public/Images/news/TS_Web60.png',
`campaign` int(1) NOT NULL DEFAULT '0',
`campaignimg` varchar(255) COLLATE latin1_general_ci NOT NULL,
`author` int(6) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci;
 

minthotel

New Member
May 13, 2012
18
1
I've tried IIS/Navicat and it continuesly gives me a 404 error or a 500 error and I can't seem to find out why, is there a R63B Emulator and CMS files I can use that are good and working when it comes to news for XAMPP? if so I'd appreciate you linking me it.
 

iGlenn

:)
Jul 21, 2015
618
92
like jmg said your news table looks off. did you try replacing it with the one he gave u above? i recommend plus because its the most updated emu with support unlike others and stable.
 

Users who are viewing this thread

Top