Use Facebook Comments Plugin in Pligg

Posted In Tutorials - By kcrazy On Tuesday, June 7th, 2011 With 14 Comments

Updated: June 13, 2011

With more that 6.5 billion users in Facebook, using Facebook Comments Plugin will help you to gain more traffic to your site in less time. In few steps, we’ll be able to achieve that.

I tried this plugin in Pligg CMS 1.1.4 and within the default template Wistie and it worked like a charm. Its probably the same for the previous versions of Pligg and other themes also.

Ok, lets get started.

Facebook comments Plugin for Pligg

Step 1: Modify template

Locate your default template (Wistie, in this case) and open story_center.tpl .Usually, its http://YOUR_PLIGG_SITE/templates/wistie/story_center.tpl

Look for {include file=$the_template.”/comment_form.tpl”} and replace it with the following code:

<div id="fb-root"></div>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<fb:comments href="{php} echo $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];{/php}" num_posts="2" width="760"></fb:comments>

Change the values of num_posts and width as required by your theme. And its done! One easy step huh?

If you do not want to show comments your site already received from the internal commenting system of Pligg, you could remove the following lines of code in the same file(story.php). Its right above the facebook comments plugin you just pasted.

{checkActionsTpl location="tpl_pligg_story_comments_individual_start"}
{$the_comments}
{checkActionsTpl location="tpl_pligg_story_comments_individual_end"}

I hope you enjoy this tutorial. Have a nice day!

Related Search:

  • The comments plugin requires an href parameter
  • pligg facebook comment
  • Powered By Pligg advertising
  • facebook comments plugin
  • Powered By Pligg security card
  • pligg torrent
  • Powered By Pligg location
  • pligg in
  • Powered By Pligg free stories
  • Powered By Pligg card numbers

About - Razu Kc is a web developer and he has been experimenting on Pligg CMS since last couple of years. He writes tutorials on Pligg modules, templates and other hacks.

  • Pingback: Pligg CMS Forum

  • Pingback: Pligg CMS Forum

  • Jive

    It doenst work here on a pligg 1.1.4 install did all above i get this error or message:
    The comments plugin requires an href parameter.

    Thats it what could be the problem?

  • Jive

    Ok the problems get bigger:

    I only see the above message: The comments plugin requires an href parameter. when im logged in as admin.When i log out i still have the normal pligg comments system.Sidenote: i do have anonymous comments on and anonymous story.

  • http://www.facebook.com/kcrazy Razu Kc

    Hi Jive!
    Thank you for your comment. Facebook Comment Plugin seems to throw error while working with smarty variables. This time i have used PHP to fetch the story and put it in the ‘href’ attribute of tag. I have modified the tutorial and reduced the steps to one. Please read through the tutorial again. I hope it will solve your problem.

  • http://www.facebook.com/kcrazy Razu Kc

    Hi Jive!
    Thank you for your comment. Facebook Comment Plugin seems to throw error while working with smarty variables. This time i have used PHP to fetch the story and put it in the ‘href’ attribute of tag. I have modified the tutorial and reduced the steps to one. Please read through the tutorial again. I hope it will solve your problem.

  • Ashish7422

    hey thanks ! it works …… 

  • http://www.seopositiveltd.co.uk/link-building.php Sarah

    Nice tutor.Your way of representation is really great. Its really an informative post.You have done a great job by sharing this post with us.I like this post.Keep sharing with us in future too.

  • Anonymous

    nice

  • http://www.bookmarkocean.com social bookmarking site

    I use this script as you said above, but it does not work. tell me the details steps.Thanks in advance.

  • http://www.addvalue.com.au/ branded items

    do this script capable of working the new timeline of facebook? And also the ones that facebook uses about emoticons or small thumbnail pictures?

  • Jyoti

    Facebook Comments script is giving me error of “FB.provide is not a function”

  • Pingback: Buy Sell Swap

  • Alex

    thanks it works for me