« b2media | Bookmarklet 2 Plugin » |
Most Commented Posts plugin
This 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
- Download this file: _mostcomments.plugin.1.7.txt.
- Remove the .1.7.txt from the filename and upload it to your b2evolution plugins folder.
- In the backoffice, go to Settings > Plugins and find MostComments in the list. Click "install".
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.

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!

trying but not working

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?

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

Most commented posts is bad for SE spammers

_mostcomments.plugin.php code line 115
replace get_permalink on get_permanent_url :)

Thanks!
Michael Locker MD
Recent comments