pliggIntense

Adding IntenseDebate to Pligg

IntenseDebate is a commenting system. Pligg is a social bookmarking CMS.

By installing IntenseDebate, your Pligg site will lose the ability to connect users with their comments. However, your commenters will be able to tie their comments to their accounts on Facebook, Twitter, IntenseDebate, etc. These notes apply to the Pligg Wistie template.

To add the IntenseDebate comment section:

  1. Copy the comment section snippet code from IntenseDebate > Sites > YourSite > Tools > Reinstall.
  2. Find <div id="comments"> at the end of story_center.tpl.
  3. Delete the Pligg code up to the end of the </div>.
  4. Paste the IntenseDebate code inside the comments div.

To add a comment link with the current comment count on the front page:

  1. Copy the comment link snippet code from IntenseDebate > Sites > YourSite > Tools > Reinstall.
  2. Open link_summary.tpl and find <div class="storyfooter">.
  3. Replace all the code from <span id="ls_comments_url-{$link_shakebox_index}"> to </span> with the IntenseDebate code.
  4. Make these edits to the IntenseDebate snippet:
    var idcomments_post_id = 'http://www.yoursite.com' + '{$story_url}';
    var idcomments_post_url = 'http://www.yoursite.com' + '{$story_url}';

By the way, how is Pligg working out for you? Please comment with a link to your Pligg site!

wordpress100

Limit WordPress Search Scope to Blog Posts

When using get_search_form(), WordPress returns results from all pages and posts. To force WordPress to return results only from posts, copy & paste the code below into your theme’s function.php file. Create a new function.php file if you don’t have one.

&lt;?php
function SearchFilter($query) {
     if ($query->is_search) {
          $query->set('post_type','post');
     }
     return $query;
}
add_filter('pre_get_posts','SearchFilter');
?>

To limit the search to page content only, change line 4 to $query->set('post_type','page'); .

Notes