Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
[REL] RevCMS hot campaigns W/ Housekeeping
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Kristopher" data-source="post: 155131" data-attributes="member: 1958"><p>[PHP]<?php</p><p> $campaign = mysql_query("SELECT * FROM cms_campaigns ORDER BY `id` DESC"); // Query, Select data from cms_camps..</p><p> if(mysql_num_rows($campaign) == 0){</p><p> echo 'MAKE A CAMPAIGN TO FIX ME!!!'; // No campaigns? This will show.</p><p> }else{</p><p> echo '<div class="habblet-container ">'; // Container..</p><p> echo '<div class="cbb clearfix orange ">'; // Decor..</p><p> echo '<h2 class="title">Hot Campaigns</h2></p><p> <div id="hotcampaigns-habblet-list-container"></p><p> <div class="hotcampaign-container">';</p><p> }</p><p> </p><p> while($row = mysql_fetch_array($campaign)){ // Fetch shit from $camps..</p><p> </p><p> // Start variables</p><p> $id = $row["id"];</p><p> $caption = $row["caption"];</p><p> $image_url = $row["image_url"];</p><p> $description = $row["description"];</p><p> $url = $row["url"];</p><p> // End variables</p><p> </p><p> echo '<ul id="hotcampaigns-habblet-list"></p><p> <li class="even"></p><p> <a href="'.$url.'"></p><p> <img src="'.$image_url.'" align="left" alt="'.$caption.'" /></a></p><p> <h3>'.$caption.'</h3></p><p> <p>'.$description.'</p></p><p> <p class="link"><a href="'.$url.'">Go there &raquo;</a></p></p><p> </li> </ul></p><p> ';</p><p> }</p><p> ?></p><p> </div></div>[/PHP]</p><p> </p><p>[CODE]CREATE TABLE IF NOT EXISTS `cms_campaigns` (</p><p> `id` int(11) NOT NULL AUTO_INCREMENT,</p><p> `order_id` int(11) NOT NULL DEFAULT '1',</p><p> `enabled` enum('0','1') NOT NULL DEFAULT '1',</p><p> `image_url` text NOT NULL,</p><p> `caption` text NOT NULL,</p><p> `description` text NOT NULL,</p><p> `url` text NOT NULL,</p><p> PRIMARY KEY (`id`)</p><p>) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;[/CODE]</p><p> </p><p> </p><p>For Housekeeping: <a href="http://devbest.com/threads/1-x-x-housekeeping-release.24211/" target="_blank">http://devbest.com/threads/1-x-x-housekeeping-release.24211/</a></p><p> </p><p>Credits:</p><p>Cookiemonsta - Campaigns</p><p>Sledmore - HK</p><p>Myself - Little edit</p></blockquote><p></p>
[QUOTE="Kristopher, post: 155131, member: 1958"] [PHP]<?php $campaign = mysql_query("SELECT * FROM cms_campaigns ORDER BY `id` DESC"); // Query, Select data from cms_camps.. if(mysql_num_rows($campaign) == 0){ echo 'MAKE A CAMPAIGN TO FIX ME!!!'; // No campaigns? This will show. }else{ echo '<div class="habblet-container ">'; // Container.. echo '<div class="cbb clearfix orange ">'; // Decor.. echo '<h2 class="title">Hot Campaigns</h2> <div id="hotcampaigns-habblet-list-container"> <div class="hotcampaign-container">'; } while($row = mysql_fetch_array($campaign)){ // Fetch shit from $camps.. // Start variables $id = $row["id"]; $caption = $row["caption"]; $image_url = $row["image_url"]; $description = $row["description"]; $url = $row["url"]; // End variables echo '<ul id="hotcampaigns-habblet-list"> <li class="even"> <a href="'.$url.'"> <img src="'.$image_url.'" align="left" alt="'.$caption.'" /></a> <h3>'.$caption.'</h3> <p>'.$description.'</p> <p class="link"><a href="'.$url.'">Go there »</a></p> </li> </ul> '; } ?> </div></div>[/PHP] [CODE]CREATE TABLE IF NOT EXISTS `cms_campaigns` ( `id` int(11) NOT NULL AUTO_INCREMENT, `order_id` int(11) NOT NULL DEFAULT '1', `enabled` enum('0','1') NOT NULL DEFAULT '1', `image_url` text NOT NULL, `caption` text NOT NULL, `description` text NOT NULL, `url` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;[/CODE] For Housekeeping: [URL]http://devbest.com/threads/1-x-x-housekeeping-release.24211/[/URL] Credits: Cookiemonsta - Campaigns Sledmore - HK Myself - Little edit [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
[REL] RevCMS hot campaigns W/ Housekeeping
Top