RevCMS - Tips & Tricks

This will help some people!


  • Total voters
    32
Status
Not open for further replies.

lepos

thinking about you. yes you
Dec 11, 2011
2,024
687
MOST OF THESE TIPS ARE FOR NAVICAT ONLY!
There are many tips and tricks for revcms but instead of searching your ass off just come here and theres a list full of them - Comment and/or Like my post please. There are pretty simple and straight forward!

  • Unknown column 'seckey' in 'field list - SECKEY ERROR
Execute the following SQL in phpMyAdmin or Navicat - ALTER TABLE `users` ADD `seckey` VARCHAR(999)
  • Does your hotel ever say You can't register twice? - CANT VOTE TWICE ERROR
In class.users.php, line 104 this is found: if($engine->num_rows("SELECT * FROM users WHERE ip_reg = '" . $_SERVER['REMOTE_ADDR'] . "'") == 1) <-- Replace the 1 with the amount of users per IP you want.
  • Do you want every user to go to one certain room when they go on the client? - HOMEROOM TIP
Go to rooms in your database and find memorize the id of the room you want as homeroom then execute the following SQL in phpMyAdmin or Navicat - UPDATE users SET home_room = 'THEROOMIDHERE' change the 'THEROOMIHERE' to the Room ID you chose before.
For already registered members go to File > Design Table and edit the home_room to the ID of the chosen room.
  • Does your name never appear as the author on the news? - NEWS AUTHOR TIP
In Navicat Got to cms_news table> File > Design Table in Navicat and change type of "author" field to "varchar".


  • Haven't you ever wanted to have more than 3 respects? - RESPECTS TIP
Go to your database and go to user_stats (to change only one persons respect go to RESPECT TIP 2 if not continue to read) - and click File > Design Table and edit the DailyRespectPoints and the Pet ones if you want to whatever number you want!
RESPECT TIP 2 to change dailyrespect points for only one person - Go to your database and go to user_stats and find the ID of the person you want to change then edit the DailyRespectPoints to whatever amount you want e.g. 02382084294
  • Want every user to be dressed the same when they register? - REGISTER CLOTHES TIP
Go to your config and edit this part:
There are going to be two options either use the default clothes that most people use which is - hd-180-1.ch-210-66.lg-270-82.sh-290-91.hr-100 or go into your client dress as what you want everyone to dress as and go to your Database > Users > Find Your User & Click Edit > Copy the code that is in this section:
  • Want fix for {newspreview} on the habbo theme?

I was not meant to add fixes but some people suggested it - If you have some tips or tricks (not fixes) post below to be added above!
 

lepos

thinking about you. yes you
Dec 11, 2011
2,024
687
Thanks Lucas.

Got any tips or tricks? POST THEM!

OFT: Thanks for pointing out on skype on my spelling mistake - It's meant to bit It will & It won't ~ Sorry!
 

CronicHosts

Member
Aug 18, 2011
373
71
If you want to fix the {newsPreview} on the Habbo Theme, Replace from

PHP:
$news = $engine->fetch_assoc

all the way to the bottom of your class.forms.php

PHP:
    $news = $engine->fetch_assoc("SELECT title, shortstory, longstory, 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('newsAuthor', $news['author']);
                $template->setParams('newsDate', date("d-m-y", $news['published']));
               $template->setParams('newsPreview', $news['shortstory']); 
           
                unset($result);
                unset($news1);
                unset($news);
    }
   
    final public function getPageHome()
    {
        global $template, $engine;
        $a = 1;
        $data = mysql_query("SELECT title, id, published, shortstory, image FROM cms_news ORDER BY id DESC LIMIT 5");
               
        while($news = mysql_fetch_array($data, MYSQL_ASSOC))
          {
            $template->setParams('newsTitle-' . $a, $news['title']);
            $template->setParams('newsID-' . $a, $news['id']);
            $template->setParams('newsDate-' . $a, date("d-m-y", $news['published']));
            $template->setParams('newsPreview', $news['shortstory']);
            $template->setParams('newsCaption-' . $a, $news['shortstory']);
            $template->setParams('newsIMG-' . $a, $news['image']);
 
            $a++;
        }
       
        unset($news);
        unset($data);
    }
   
}
 
?>

I think saying it that way is more noob friendly than adding

PHP:
 $template->setParams('newsPreview', $news['shortstory']);
 

lepos

thinking about you. yes you
Dec 11, 2011
2,024
687
Thanks

Added to the bottom of the thread!
 

CronicHosts

Member
Aug 18, 2011
373
71
Edit how your navigator tabs look from with the description to this -

iaza16831384843100.png


PHP:
UPDATE navigator_publics SET bannertype = '0'

OR

Edit the bannertypes to 0.
 

lepos

thinking about you. yes you
Dec 11, 2011
2,024
687
Edit how your navigator tabs look from with the description to this -

iaza16831384843100.png


PHP:
UPDATE navigator_publics SET bannertype = '0'

OR

Edit the bannertypes to 0.

Keep them coming! I'll add that one to the thread in a secound.
 

Nike

#MGK
Jun 9, 2012
545
107
I tried the register twice thing. Didn't work. Anyways, it will help tons. Thanks, Lepos!
 

Flint

http://Dusk-Hotel.com
Jul 10, 2012
464
48
All I Actually Honestly want Is A Comment System ;D On The News
 

lepos

thinking about you. yes you
Dec 11, 2011
2,024
687
The register one worked fine for me? xd.

Look in the RevCMS plugins section for the new comments.
 

oltem4682

New Member
Jun 30, 2012
11
0
If you want to fix the {newsPreview} on the Habbo Theme, Replace from

PHP:
$news = $engine->fetch_assoc

all the way to the bottom of your class.forms.php

PHP:
    $news = $engine->fetch_assoc("SELECT title, shortstory, longstory, 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('newsAuthor', $news['author']);
                $template->setParams('newsDate', date("d-m-y", $news['published']));
              $template->setParams('newsPreview', $news['shortstory']);
         
                unset($result);
                unset($news1);
                unset($news);
    }
 
    final public function getPageHome()
    {
        global $template, $engine;
        $a = 1;
        $data = mysql_query("SELECT title, id, published, shortstory, image FROM cms_news ORDER BY id DESC LIMIT 5");
             
        while($news = mysql_fetch_array($data, MYSQL_ASSOC))
          {
            $template->setParams('newsTitle-' . $a, $news['title']);
            $template->setParams('newsID-' . $a, $news['id']);
            $template->setParams('newsDate-' . $a, date("d-m-y", $news['published']));
            $template->setParams('newsPreview', $news['shortstory']);
            $template->setParams('newsCaption-' . $a, $news['shortstory']);
            $template->setParams('newsIMG-' . $a, $news['image']);
 
            $a++;
        }
     
        unset($news);
        unset($data);
    }
 
}
 
?>

I think saying it that way is more noob friendly than adding

PHP:
 $template->setParams('newsPreview', $news['shortstory']);


Still get the same error:

Warning
: mysql_fetch_array() expects parameter 1 to be resource, boolean given in
C:\Habbo R63B Server\xampp\htdocs\app\tpl\class.forms.php
on line
86

My class.forms.php:
PHP:
<?php
 
namespace Revolution;
if(!defined('IN_INDEX')) { die('Sorry, you cannot access this file.'); }
class forms implements iForms
{
   
    public $error;
 
    final public function setData()
    {
        global $engine;
        foreach($_POST as $key => $value)
        {
            if($value != null)
            {
                $this->$key = $engine->secure($value);
            }
            else
            {
                $this->error = 'Please fill in all fields';
                return;
            }
        }
   
    }
   
    final public function unsetData()
    {
        global $template;
        foreach($this as $key => $value)
        {
            unset($this->$key);   
        }   
    }
   
    final public function writeData($key)
    {
        global $template;
        echo $this->$key;
    }
   
    final public function outputError()
    {
        global $template;
        if(isset($this->error))
        {
            echo "<div id='message'> " . $this->error . " </div>";
        }
    }
   
    /* Manage different pages */
   
    final public function getPageNews()
    {
        global $template, $engine;
       
            if(!isset($_GET['id']) || !is_numeric($_GET['id']))
            {
                $_GET['id'] = 1;
            }
                $result = mysql_query("SELECT title, id FROM cms_news WHERE id != '" . $engine->secure($_GET['id']) . "' ORDER BY id DESC");
               
                while($news1 = mysql_fetch_array($result))
                {
                    $template->setParams('newsList', '&laquo; <a href="index.php?url=news&id='.$news1["id"].'">' . $news1['title'] . '</a><br/>');
                }
               
                $news = $engine->fetch_assoc("SELECT title, longstory, 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('newsAuthor', $news['author']);
                $template->setParams('newsDate-' . $a, date("d-m-y", $news['date']));
           
                unset($result);
                unset($news1);
                unset($news);
    }
   
    final public function getPageHome()
    {
        global $template, $engine;
        $a = 1;
        $data = mysql_query("SELECT title, id, published, shortstory, image FROM cms_news ORDER BY id DESC LIMIT 5");
               
        while($news = mysql_fetch_array($data, MYSQL_ASSOC));
          {
            $template->setParams('newsTitle-' . $a, $news['title']);
            $template->setParams('newsID-' . $a, $news['id']);
            $template->setParams('newsDate-' . $a, date("d-m-y", $news['date']));
            $template->setParams('newsCaption-' . $a, $news['shortstory']);
            $template->setParams('newsIMG-' . $a, $news['image']);
            $a++;
        }
       
        unset($news);
        unset($data);
    }
   
}
 
?>

What is the problem in this script?
 
Status
Not open for further replies.

Users who are viewing this thread

Top