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
[Addon] RevCMS- Campaigns through database (habbo theme only) [Addon]
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="DaLightz" data-source="post: 111068" data-attributes="member: 17436"><p>Hi there devbest <img src="/styles/default/xenforo/smilies/emojione/smile.png" class="smilie" loading="lazy" alt=":)" title="Smile :)" data-shortname=":)" />, as many of you should know, ive left ubercms to start working on revcms <img src="/styles/default/xenforo/smilies/emojione/biggrin.png" class="smilie" loading="lazy" alt=":D" title="Big Grin :D" data-shortname=":D" /></p><p>Now, my php skills are ok, but i feel i want to advance in my skills so i am releasing some good stuff this week ^.^</p><p>----------------</p><p>So here is the release,</p><p>Campaigns on your cms BUT database powered!</p><p>------------------</p><p>WHAT DOES THIS DO? <img src="/styles/default/xenforo/smilies/emojione/eek.png" class="smilie" loading="lazy" alt=":eek:" title="Eek! :eek:" data-shortname=":eek:" /></p><p>-</p><p>Ok well, as you know in ubercms, it would read campaigns from the db.. This also does that <img src="/styles/default/xenforo/smilies/emojione/smile.png" class="smilie" loading="lazy" alt=":)" title="Smile :)" data-shortname=":)" /></p><p>--------------------</p><p>Screen shot of it on cms: <a href="http://prntscr.com/ai8w0" target="_blank">http://prntscr.com/ai8w0</a></p><p>Screen shot of db (for proof): <a href="http://prntscr.com/ai8wn" target="_blank">http://prntscr.com/ai8wn</a></p><p>Note: once my revcms hk is out, you will be able to edit, or delete campaigns instead of using the db.</p><p>-------------------</p><p>VERY IMPORTANT! RUN THIS IN YOUR DATABASE:!!</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> `descr` text NOT NULL,</p><p> `url` text NOT NULL,</p><p> PRIMARY KEY (`id`)</p><p>) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;</p><p> </p><p>INSERT INTO `cms_campaigns` (`id`, `order_id`, `enabled`, `image_url`, `caption`, `descr`, `url`) VALUES</p><p>(2, 1, '1', 'http://65.96.141.124/app/tpl/skins/Habbo/images/facebookconnect.gif', 'Test 2', 'MOAR MOAR MOAR!', 'http://devbest.com'),</p><p>(3, 1, '1', 'http://65.96.141.124/app/tpl/skins/Habbo/images/facebookconnect.gif', 'MOAR TEST!', 'LOOOOOL MOAR!', 'http://devbest.com'),</p><p>(1, 1, '1', 'http://65.96.141.124/app/tpl/skins/Habbo/images/facebookconnect.gif', 'Test', 'This is a test for my shit..', 'http://devbest.com');</p><p>[/CODE]</p><p>Now, on your me.php,under column 1 tag add this: </p><p>[CODE]</p><p><?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> $descr = $row["descr"];</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>'.$descr.'</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></p><p></div></p><p></div>[/CODE]</p><p> </p><p>Enjoy <img src="/styles/default/xenforo/smilies/emojione/smile.png" class="smilie" loading="lazy" alt=":)" title="Smile :)" data-shortname=":)" /></p></blockquote><p></p>
[QUOTE="DaLightz, post: 111068, member: 17436"] Hi there devbest :), as many of you should know, ive left ubercms to start working on revcms :D Now, my php skills are ok, but i feel i want to advance in my skills so i am releasing some good stuff this week ^.^ ---------------- So here is the release, Campaigns on your cms BUT database powered! ------------------ WHAT DOES THIS DO? :o - Ok well, as you know in ubercms, it would read campaigns from the db.. This also does that :) -------------------- Screen shot of it on cms: [url]http://prntscr.com/ai8w0[/url] Screen shot of db (for proof): [url]http://prntscr.com/ai8wn[/url] Note: once my revcms hk is out, you will be able to edit, or delete campaigns instead of using the db. ------------------- VERY IMPORTANT! RUN THIS IN YOUR DATABASE:!! [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, `descr` text NOT NULL, `url` text NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; INSERT INTO `cms_campaigns` (`id`, `order_id`, `enabled`, `image_url`, `caption`, `descr`, `url`) VALUES (2, 1, '1', 'http://65.96.141.124/app/tpl/skins/Habbo/images/facebookconnect.gif', 'Test 2', 'MOAR MOAR MOAR!', 'http://devbest.com'), (3, 1, '1', 'http://65.96.141.124/app/tpl/skins/Habbo/images/facebookconnect.gif', 'MOAR TEST!', 'LOOOOOL MOAR!', 'http://devbest.com'), (1, 1, '1', 'http://65.96.141.124/app/tpl/skins/Habbo/images/facebookconnect.gif', 'Test', 'This is a test for my shit..', 'http://devbest.com'); [/CODE] Now, on your me.php,under column 1 tag add this: [CODE] <?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"]; $descr = $row["descr"]; $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>'.$descr.'</p> <p class="link"><a href="'.$url.'">Go there »</a></p> </li> </ul> '; } ?> </div></div> </div> </div>[/CODE] Enjoy :) [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
[Addon] RevCMS- Campaigns through database (habbo theme only) [Addon]
Top