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] Facebook News Comments.
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="Sledmore" data-source="post: 83923" data-attributes="member: 591"><p>Hey,</p><p> </p><p>So I saw <a href="http://devbest.com/threads/plugin-revcms-facebook-comment-system.13473/" target="_blank">this thread</a> and I enjoyed it, but I then found another way of doing it much easier/less effort and no database needed..</p><p> </p><p>So basically lets begin..</p><p> </p><p><strong>Step 1)</strong> Find app/tpl/skins/(THE SKIN YOUR USING)/news.php</p><p><strong>Step 2)</strong> Find '<div id="column2" class="column">'</p><p><strong>Step 3)</strong> Before the closing </div> add this code:</p><p> </p><p>[PHP]</p><p> </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="{url}/index.php?url=news&id={newsID}" data-num-posts="10" data-width="530"></div></p><p> </div></p><p> </div></p><p> </div></p><p> </p><p><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/en_US/all.js#xfbml=1";</p><p> fjs.parentNode.insertBefore(js, fjs);</p><p>}(document, 'script', 'facebook-jssdk'));</script></p><p>[/PHP]</p><p> </p><p> </p><p><strong>Step 4)</strong> Find app/tpl/class.forms.php</p><p><strong>Step 5)</strong> Find 'final public function getPageNews()'</p><p><strong>Step 6)</strong> Change this query;</p><p>[php]$news = $engine->fetch_assoc("SELECT title, shortstory, longstory, author, published FROM cms_news WHERE id = '" . $engine->secure($_GET['id']) . "' LIMIT 1")'[/php]</p><p><strong>To this:</strong></p><p>[php]$news = $engine->fetch_assoc("SELECT id, title, shortstory, longstory, author, published FROM cms_news WHERE id = '" . $engine->secure($_GET['id']) . "' LIMIT 1");[/php]</p><p> </p><p><strong>Step 7)</strong> Under that query add this '$template->setParams('newsID', $news['id']);'.</p><p><strong>Step 8)</strong> Enjoy.</p><p>---------------</p><p>Credits to: <a href="http://devbest.com/members/vvess.9520/" target="_blank">VVess</a> for the inspiration.</p><p>Credits to: <a href="http://devbest.com/members/nigga.540/" target="_blank">Nigga</a> for a nice helping hand.</p><p>Credits to <a href="http://devbest.com/members/bobba.591/" target="_blank">bobba</a>(Me) or the rest.</p></blockquote><p></p>
[QUOTE="Sledmore, post: 83923, member: 591"] Hey, So I saw [URL='http://devbest.com/threads/plugin-revcms-facebook-comment-system.13473/']this thread[/URL] and I enjoyed it, but I then found another way of doing it much easier/less effort and no database needed.. So basically lets begin.. [B]Step 1)[/B] Find app/tpl/skins/(THE SKIN YOUR USING)/news.php [B]Step 2)[/B] Find '<div id="column2" class="column">' [B]Step 3)[/B] Before the closing </div> add this code: [PHP] <div class="habblet-container "> <div class="cbb clearfix notitle "> <div id="article-wrapper"> <div class="fb-comments" data-href="{url}/index.php?url=news&id={newsID}" data-num-posts="10" data-width="530"></div> </div> </div> </div> <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/en_US/all.js#xfbml=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> [/PHP] [B]Step 4)[/B] Find app/tpl/class.forms.php [B]Step 5)[/B] Find 'final public function getPageNews()' [B]Step 6)[/B] Change this query; [php]$news = $engine->fetch_assoc("SELECT title, shortstory, longstory, author, published FROM cms_news WHERE id = '" . $engine->secure($_GET['id']) . "' LIMIT 1")'[/php] [B]To this:[/B] [php]$news = $engine->fetch_assoc("SELECT id, title, shortstory, longstory, author, published FROM cms_news WHERE id = '" . $engine->secure($_GET['id']) . "' LIMIT 1");[/php] [B]Step 7)[/B] Under that query add this '$template->setParams('newsID', $news['id']);'. [B]Step 8)[/B] Enjoy. --------------- Credits to: [URL='http://devbest.com/members/vvess.9520/']VVess[/URL] for the inspiration. Credits to: [URL='http://devbest.com/members/nigga.540/']Nigga[/URL] for a nice helping hand. Credits to [URL='http://devbest.com/members/bobba.591/']bobba[/URL](Me) or the rest. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Releases
CMS Releases
[PLUGIN] Facebook News Comments.
Top