Help with ” most popular comment ” plug in…please
-
I downloaded and installed to my folders the plugin – which is just a file basically- for “most popular comments”. yeah ,at least I did that.
The problem is that when installed to my side bar the <b> things are still outside all the links.
look at my sidebar – http://wonderlandornot.net
here is the code inserted into the sidebar as directed
<ul>
<li><h2>Most Commented Posts</h2></li>
<?php get_mostcommented(); ?>
</ul>
I’ve tried taking out the “ul” the “li” and the “h2” tags seperately and all together but it makes no differene.The code for the page is as follows – after the line that is not inclusive to the code
—————————
<?php
/*
Plugin Name: WP-MostCommentedPosts
Plugin URI: http://ja.rafi.pl/2006/05/01/wp-most-commented-posts/
Plugin Description: WP-MostCommentedPosts plugin by Rafal "RAFi" Krawczyk based on <a href="http://dev.wp-plugins.org/wiki/wp-stats">WP-STATS</a> Statistics Plugin for WordPress written by <a href="http://www.lesterchan.net/">Lester "GaMerZ" Chan</a>.
Version: 0.1
Author: Rafal "RAFi" Krawczyk
Author URI: http://ja.rafi.pl/
*/function get_mostcommented($limit = 10) {
global $wpdb, $post;
$mostcommenteds = $wpdb->get_results("SELECT $wpdb->posts.ID, post_title, post_name, post_date, COUNT($wpdb->comments.comment_post_ID) AS 'comment_total' FROM $wpdb->posts LEFT JOIN $wpdb->comments ON $wpdb->posts.ID = $wpdb->comments.comment_post_ID WHERE comment_approved = '1' AND post_date_gmt < '".gmdate("Y-m-d H:i:s")."' AND post_status = 'publish' AND post_password = '' GROUP BY $wpdb->comments.comment_post_ID ORDER BY comment_total DESC LIMIT $limit");
foreach ($mostcommenteds as $post) {
$post_title = htmlspecialchars(stripslashes($post->post_title));
$comment_total = (int) $post->comment_total;
echo "<li>» <a href="".get_permalink()."">$post_title</a> - $comment_total </li>";
}
}
?>the good thing is I actually installed something – the bad thing is that it has those “b” tags around it.
Any help appreciated.
Permanent link to my sidebar offered for help. I get a fair amount of traffic even though I am only a c list blogebrity.
Are bribes illegal?
my email is nowickedwitch@gmail.com
- The topic ‘Help with ” most popular comment ” plug in…please’ is closed to new replies.