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
[PLUGIN] RevCMS Facebook Comment system
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="Weasel" data-source="post: 79759" data-attributes="member: 9520"><p>Alright... I'm kinda newbish with PHP/MySQL, but somehow I managed to create some sort of little RevCMS comment system. This wil go trough Facebook - so you need one. Make SURE you have the cms_news table. Also, make sure you don't have done some modifications in the news and news2 file, or added a costum alter_table.</p><p> </p><p>Before you do this, please note the following: You need to enter a facebook link always when posting a new article. If you don't do this, the comment space will go act weard. Because I'm not that skilled, if the "facebook" string is empty (null), it still shows it with 'n error. If you can do this, so when the facebook string is null it doesn't shows, please say so.</p><p> </p><p><strong>Step 1:</strong></p><p>First, create a Facebook account.</p><p> </p><p><strong>Step 2:</strong></p><p>Create a alter table: ALTER TABLE `cms_news` ADD COLUMN `facebook` VARCHAR( 999 );</p><p> </p><p><strong>Step 3:</strong></p><p>Now we are gonna edit the template system to make the {facebook} tag work. Find: <strong>app/tpl/class.forms.php</strong> and find<strong> /* Manage different pages *</strong>. Under this, replace the whole code with the following:</p><p><a href="http://pastebin.com/amSYhRkR" target="_blank">http://pastebin.com/amSYhRkR</a></p><p>Now you have the facebook alter table in your database, and you can call it with {facebook}.</p><p> </p><p><strong>Step 4:</strong></p><p>Now we are gonna fix the Housekeeping so you have a field where you can paste the link of the news article from your facebook.</p><p> </p><p>Search in<strong> app/tpl/skins/YOURSKIN(Habbo)/</strong> and find<strong> news.php & news2.ph</strong>p</p><p>Replace news.php with the following:</p><p><a href="http://pastebin.com/zyrZvArf" target="_blank">http://pastebin.com/zyrZvArf</a></p><p> </p><p>And replace news2.php with this:</p><p><a href="http://pastebin.com/7Lh2Ze1d" target="_blank">http://pastebin.com/7Lh2Ze1d</a></p><p> </p><p><strong>Step 5:</strong></p><p>Now we are gonna add the comment space beneath the news article.</p><p>This is the most easy thing to do. Go to <strong>app/tpl/skins/YOURSKIN(Habbo)/news.php</strong> Just find the place the script calls {newsTitle}, {newsContent} and so on... find the last of the contentarea, and paste the following:</p><p>[PHP]<div id="column2" class="column"></p><p> <div class="habblet-container "></p><p> <div class="cbb clearfix notitle "></p><p> <div id="article-wrapper"></p><p><div class="fb-comments" data-href="{facebook}" data-num-posts="400" data-width="520"></div></p><p> </div></p><p> </div></p><p> </div>[/PHP]</p><p> </p><p> </p><p>Step 6:</p><p>Just add somewhere in news.php the following code to make the facebook comment script work:</p><p>[PHP]<div id="fb-root"></div></p><p><script>(function(d, s, id) {</p><p> var js, fjs = d.getElementsByTagName(s)[0];</p><p> if (d.getElementById(id)) return;</p><p> js = d.createElement(s); js.id = id;</p><p> js.src = "//connect.facebook.net/nl_NL/all.js#xfbml=1";</p><p> fjs.parentNode.insertBefore(js, fjs);</p><p>}(document, 'script', 'facebook-jssdk'));</script>[/PHP]</p><p> </p><p>Thats it. I hope you like it!</p><p> </p><p>(Sorry for my english).</p><p> </p><p>- VVess</p></blockquote><p></p>
[QUOTE="Weasel, post: 79759, member: 9520"] Alright... I'm kinda newbish with PHP/MySQL, but somehow I managed to create some sort of little RevCMS comment system. This wil go trough Facebook - so you need one. Make SURE you have the cms_news table. Also, make sure you don't have done some modifications in the news and news2 file, or added a costum alter_table. Before you do this, please note the following: You need to enter a facebook link always when posting a new article. If you don't do this, the comment space will go act weard. Because I'm not that skilled, if the "facebook" string is empty (null), it still shows it with 'n error. If you can do this, so when the facebook string is null it doesn't shows, please say so. [B]Step 1:[/B] First, create a Facebook account. [B]Step 2:[/B] Create a alter table: ALTER TABLE `cms_news` ADD COLUMN `facebook` VARCHAR( 999 ); [B]Step 3:[/B] Now we are gonna edit the template system to make the {facebook} tag work. Find: [B]app/tpl/class.forms.php[/B] and find[B] /* Manage different pages *[/B]. Under this, replace the whole code with the following: [url]http://pastebin.com/amSYhRkR[/url] Now you have the facebook alter table in your database, and you can call it with {facebook}. [B]Step 4:[/B] Now we are gonna fix the Housekeeping so you have a field where you can paste the link of the news article from your facebook. Search in[B] app/tpl/skins/YOURSKIN(Habbo)/[/B] and find[B] news.php & news2.ph[/B]p Replace news.php with the following: [url]http://pastebin.com/zyrZvArf[/url] And replace news2.php with this: [url]http://pastebin.com/7Lh2Ze1d[/url] [B]Step 5:[/B] Now we are gonna add the comment space beneath the news article. This is the most easy thing to do. Go to [B]app/tpl/skins/YOURSKIN(Habbo)/news.php[/B] Just find the place the script calls {newsTitle}, {newsContent} and so on... find the last of the contentarea, and paste the following: [PHP]<div id="column2" class="column"> <div class="habblet-container "> <div class="cbb clearfix notitle "> <div id="article-wrapper"> <div class="fb-comments" data-href="{facebook}" data-num-posts="400" data-width="520"></div> </div> </div> </div>[/PHP] Step 6: Just add somewhere in news.php the following code to make the facebook comment script work: [PHP]<div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/nl_NL/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>[/PHP] Thats it. I hope you like it! (Sorry for my english). - VVess [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
[PLUGIN] RevCMS Facebook Comment system
Top