« b2mediaBookmarklet 2 Plugin »

Most Commented Posts plugin

01/16/06 | by [mail] | Categories: b2evolution

Most Comments plugin in actionThis plugin has been replaced by Mini Stats.

Purpose
This plugin creates a section in your blog sidebar that lists the most commented posts on your blog. It's an easy way to keep track of your most popular/controversial posts. It may even lead to those posts getting more comments.

Installation
Requires b2evolution 1.7 or later

  1. Download this file: _mostcomments.plugin.1.7.txt.
  2. Remove the .1.7.txt from the filename and upload it to your b2evolution plugins folder.
  3. In the backoffice, go to Settings > Plugins and find MostComments in the list. Click "install".
  4. Add this bit of code in your skin where you want the list to appear:

    <?php
    // MostComments plugin:
    $Plugins->call_by_code( 'mostCmts', array(
    'limit'=>5,
    'list_start'=>'<ol>',
    'list_end'=>'</ol>'
    ) );
    // Add parameters in the array.
    ?>


    You can edit the limit value to make it show more or less in the list. If you want an unordered list instead of an ordered one, then you can change those tags, too.

Misc info
If you're interested, you can check out the forum thread where the idea for the plugin came from. Thanks to MarcDK for suggesting it. And here is the most commented post on my blog. Actually, my wife wrote the post. A lot of people have strong feelings on this issue.

Permalink

10 comments

How did you make this plugin to be the Most views & Most Words plugin? At least that is what I belive you have done here. If that is the case im very interested of the code. Cheers!


Marcus Sörensson [Visitor]  http://www.kamero.se11/13/06 @ 13:11
[Member]  http://www.brendoman.com/11/13/06 @ 13:18

trying but not working


chloe [Visitor]  http://www.bedrijfs-kleding.nl12/04/06 @ 08:51
[Member]  http://www.brendoman.com/12/04/06 @ 09:13

I wonder if you could do one more feature in this plugin..? I would like to list random entrys also. Like 5 random posts and so on. Pls could it be possible?


mojman [Visitor]  http://www.kamero.se12/14/06 @ 05:31

sorry for not reacting but it’s working now, thanx for your help

werkschoenen


Most commented posts is bad for SE spammers


Ilya Burkaltsev [Visitor]  http://www.artpromcompany.com05/16/07 @ 09:42

_mostcomments.plugin.php code line 115

replace get_permalink on get_permanent_url :)


DF77 [Visitor]  06/29/07 @ 00:50
[Member]  http://www.brendoman.com/06/29/07 @ 07:08

Thanks!

Michael Locker MD


Michael Locker MD [Visitor]  07/09/07 @ 11:23


Form is loading...