brsy
nah mang
- May 12, 2011
- 1,530
- 272
Here is rFacts 1.0, which displays random facts. The facts are edited within the database, and once you follow the instructions below, just read the first fact and it will show you the final step. I MIGHT create a backend plugin so you can edit it within the housekeeping. This can be used on a RevCMS hotel, and it is mostly used on the Habbo themes. Do not re-release on any forum without valid permissions.
Installation Instructions
- Open up class.core.php within the RevCMS app folder. Insert this code above the first class.
- Next, open app-->class.template.php and within the Init() function, put the following code.
- Then, go to where ever you want the facts to be and type {rFacts}
- Finally, run the following query in the database.
You are done!
Credits:
ChrizPHP - Creating & coding the release (90%)
Fresh Hotel - Giving me the idea (10%)
Installation Instructions
- Open up class.core.php within the RevCMS app folder. Insert this code above the first class.
PHP:
public function rFacts() {
$getFacts = mysql_query("SELECT facts FROM r_facts ORDER by RAND() LIMIT 10");
return mysql_result($getFacts);
}
- Next, open app-->class.template.php and within the Init() function, put the following code.
PHP:
$this->setParams('rFacts', $core->rFacts());
- Then, go to where ever you want the facts to be and type {rFacts}
- Finally, run the following query in the database.
PHP:
CREATE TABLE IF NOT EXISTS `r_facts` (
`facts` varchar(999) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Dumping data for table `r_facts`
--
INSERT INTO `r_facts` (`facts`) VALUES
('These messages can be edited from within the r_facts table :)');
You are done!
Credits:
ChrizPHP - Creating & coding the release (90%)
Fresh Hotel - Giving me the idea (10%)