<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>WordPress &#8250; Support Tag: most-commented</title>
<link>http://wordpress.org/support/</link>
<description>WordPress &#8250; Support Tag: most-commented</description>
<language>en</language>
<pubDate>Wed, 25 Nov 2009 22:47:41 +0000</pubDate>

<item>
<title>tydende on "[Plugin: Most Commented]  2 lists in sidebar?"</title>
<link>http://wordpress.org/support/topic/326333#post-1264845</link>
<pubDate>Fri, 30 Oct 2009 21:54:51 +0000</pubDate>
<dc:creator>tydende</dc:creator>
<guid isPermaLink="false">1264845@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Wow. Thanks tugbucket!&#60;/p&#62;
&#60;p&#62;I'll check this out as soon as I can and post my results. Thank you for the help!&#60;/p&#62;
&#60;p&#62;Cheers,&#60;br /&#62;
Ty
&#60;/p&#62;</description>
</item>
<item>
<title>tugbucket on "[Plugin: Most Commented]  2 lists in sidebar?"</title>
<link>http://wordpress.org/support/topic/326333#post-1264771</link>
<pubDate>Fri, 30 Oct 2009 20:41:20 +0000</pubDate>
<dc:creator>tugbucket</dc:creator>
<guid isPermaLink="false">1264771@http://wordpress.org/support/</guid>
<description>&#60;p&#62;well it looks like you'll need to hack the plugin to include an offset for example you have:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;?php mdv_most_commented(10, &#38;#39;&#38;#39;, &#38;#39;&#38;#39;, true, 1000, true); ?&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;and&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;?php mdv_most_commented(10, &#38;#39;&#38;#39;, &#38;#39;&#38;#39;, true, 7, true); ?&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;the &#34;10&#34; is the number to show. So if you call the plugin the same way twice both having 10 results, you'll get the same 10 results both times. &#60;/p&#62;
&#60;p&#62;So if you're showing the top 10 out of each of the date ranges you're asking for you are basically saying:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;?php mdv_most_commented(20, &#38;#39;&#38;#39;, &#38;#39;&#38;#39;, true, 1000, true); ?&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;so basically you need a way to add another option to the string like:&#60;/p&#62;
&#60;p&#62;&#60;code&#62;&#38;lt;?php mdv_most_commented(10, &#38;#39;&#38;#39;, &#38;#39;&#38;#39;, true, 1000, 30, true); ?&#38;gt;&#60;/code&#62;&#60;/p&#62;
&#60;p&#62;Where &#34;30&#34; in the back end would be an offset on days.&#60;/p&#62;
&#60;p&#62;I'm using a popular post code myself not sure if it's the same as your's but here some hacked code to achiebve what you want:&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Put this where you want the result to display:&#60;/strong&#62;&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;h2&#38;gt;past 30 days&#38;lt;/h2&#38;gt;
&#38;lt;ul&#38;gt;
&#38;lt;?php most_popular_posts_past30(); ?&#38;gt;
&#38;lt;/ul&#38;gt;
&#38;lt;h2&#38;gt;past 1000 days&#38;lt;/h2&#38;gt;
&#38;lt;ul&#38;gt;
&#38;lt;?php most_popular_posts_past1000(); ?&#38;gt;
&#38;lt;/ul&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Put this in your functions.php:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;/* most_popular_posts_past30 */
function most_popular_posts_past30($no_posts = 5, $before = &#38;#39;&#38;lt;li&#38;gt;&#38;#39;, $after = &#38;#39;&#38;lt;/li&#38;gt;&#38;#39;, $show_pass_post = false, $duration=&#38;#39;&#38;#39;) {
global $wpdb;
$date = date(&#38;#39;Y-m-d&#38;#39;, strtotime(&#38;#39;-1 months&#38;#39;));
$days = (strtotime($date) - strtotime(date(&#38;quot;Y-m-d&#38;quot;))) / (60 * 60 * 24);
$days = str_replace(&#38;quot;-&#38;quot;, &#38;quot;&#38;quot;, $days);
$duration = $days;
$request = &#38;quot;SELECT ID, post_title, COUNT($wpdb-&#38;gt;comments.comment_post_ID) AS &#38;#39;comment_count&#38;#39; FROM $wpdb-&#38;gt;posts, $wpdb-&#38;gt;comments&#38;quot;;
$request .= &#38;quot; WHERE comment_approved = &#38;#39;1&#38;#39; AND $wpdb-&#38;gt;posts.ID=$wpdb-&#38;gt;comments.comment_post_ID AND post_status = &#38;#39;publish&#38;#39;&#38;quot;;
if(!$show_pass_post) $request .= &#38;quot; AND post_password =&#38;#39;&#38;#39;&#38;quot;;
if($duration !=&#38;quot;&#38;quot;) { $request .= &#38;quot; AND DATE_SUB(CURDATE(),INTERVAL &#38;quot;.$duration.&#38;quot; DAY) &#38;lt; post_date &#38;quot;;
}
$request .= &#38;quot; GROUP BY $wpdb-&#38;gt;comments.comment_post_ID ORDER BY comment_count DESC LIMIT $no_posts&#38;quot;;
$posts = $wpdb-&#38;gt;get_results($request);
$output = &#38;#39;&#38;#39;;
if ($posts) {
foreach ($posts as $post) {
$post_title = stripslashes($post-&#38;gt;post_title);
$comment_count = $post-&#38;gt;comment_count;
$permalink = get_permalink($post-&#38;gt;ID);
if (($comment_count)&#38;gt;1){
$numcoms = &#38;quot;&#38;amp;nbsp;comments&#38;quot;;
}
else{
$numcoms = &#38;quot;&#38;amp;nbsp;comment&#38;quot;;
};
$output .= $before . &#38;#39;&#38;lt;a href=&#38;quot;&#38;#39; . $permalink . &#38;#39;&#38;quot; title=&#38;quot;&#38;#39; . $post_title.&#38;#39;&#38;quot;&#38;gt;&#38;#39; . $post_title . &#38;#39;&#38;lt;span&#38;gt;&#38;lt;small&#38;gt; (&#38;#39; . $comment_count. $numcoms .&#38;#39;)&#38;lt;/small&#38;gt;&#38;lt;/span&#38;gt;&#38;lt;/a&#38;gt;&#38;#39; . $after . &#38;quot;\n&#38;quot;;
}
} else {
$output .= $before . &#38;quot;None found&#38;quot; . $after;
}
echo $output;
}
/* end most_popular_posts_past30 */

/* most_popular_posts_past1000 */
function most_popular_posts_past1000($no_posts = 5, $before = &#38;#39;&#38;lt;li&#38;gt;&#38;#39;, $after = &#38;#39;&#38;lt;/li&#38;gt;&#38;#39;, $show_pass_post = false, $duration=&#38;#39;&#38;#39;) {
global $wpdb;
$date = date(&#38;#39;Y-m-d&#38;#39;, strtotime(&#38;#39;-1 months&#38;#39;));
$date2 = date(&#38;#39;Y-m-d&#38;#39;, strtotime(&#38;#39;-1000 days&#38;#39;));
$days = (strtotime($date2) - strtotime($date)) / (60 * 60 * 24);
$days = str_replace(&#38;quot;-&#38;quot;, &#38;quot;&#38;quot;, $days);
$duration = $days;
$request = &#38;quot;SELECT ID, post_title, COUNT($wpdb-&#38;gt;comments.comment_post_ID) AS &#38;#39;comment_count&#38;#39; FROM $wpdb-&#38;gt;posts, $wpdb-&#38;gt;comments&#38;quot;;
$request .= &#38;quot; WHERE comment_approved = &#38;#39;1&#38;#39; AND $wpdb-&#38;gt;posts.ID=$wpdb-&#38;gt;comments.comment_post_ID AND post_status = &#38;#39;publish&#38;#39;&#38;quot;;
if(!$show_pass_post) $request .= &#38;quot; AND post_password =&#38;#39;&#38;#39;&#38;quot;;
if($duration !=&#38;quot;&#38;quot;) { $request .= &#38;quot; AND DATE_SUB(CURDATE(),INTERVAL &#38;quot;.$duration.&#38;quot; DAY) &#38;lt; post_date &#38;quot;;
}
$request .= &#38;quot; GROUP BY $wpdb-&#38;gt;comments.comment_post_ID ORDER BY comment_count DESC LIMIT $no_posts&#38;quot;;
$posts = $wpdb-&#38;gt;get_results($request);
$output = &#38;#39;&#38;#39;;
if ($posts) {
foreach ($posts as $post) {
$post_title = stripslashes($post-&#38;gt;post_title);
$comment_count = $post-&#38;gt;comment_count;
$permalink = get_permalink($post-&#38;gt;ID);
if (($comment_count)&#38;gt;1){
$numcoms = &#38;quot;&#38;amp;nbsp;comments&#38;quot;;
}
else{
$numcoms = &#38;quot;&#38;amp;nbsp;comment&#38;quot;;
};
$output .= $before . &#38;#39;&#38;lt;a href=&#38;quot;&#38;#39; . $permalink . &#38;#39;&#38;quot; title=&#38;quot;&#38;#39; . $post_title.&#38;#39;&#38;quot;&#38;gt;&#38;#39; . $post_title . &#38;#39;&#38;lt;span&#38;gt;&#38;lt;small&#38;gt; (&#38;#39; . $comment_count. $numcoms .&#38;#39;)&#38;lt;/small&#38;gt;&#38;lt;/span&#38;gt;&#38;lt;/a&#38;gt;&#38;#39; . $after . &#38;quot;\n&#38;quot;;
}
} else {
$output .= $before . &#38;quot;None found&#38;quot; . $after;
}
echo $output;
}
/* end most_popular_posts_past1000 */&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;and here it is working on my test page:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://tugbucket.net/list-sample/#mostComm&#34; rel=&#34;nofollow&#34;&#62;http://tugbucket.net/list-sample/#mostComm&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>tydende on "[Plugin: Most Commented]  2 lists in sidebar?"</title>
<link>http://wordpress.org/support/topic/326333#post-1264701</link>
<pubDate>Fri, 30 Oct 2009 19:20:15 +0000</pubDate>
<dc:creator>tydende</dc:creator>
<guid isPermaLink="false">1264701@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Hey tugbucket,&#60;/p&#62;
&#60;p&#62;Thanks for the response!  But, actually all we're trying to do is show the most commented posts (as the plugin is designed to work), but show 2 lists based on 2 date ranges. One for the posts that were written in the last 30 days that have the most comments, and one for the psts that were written in the last 1000 days that have the most comments.&#60;/p&#62;
&#60;p&#62;it seems pretty straightforward but will not show the two lists, only the first one queried in the sidebar.&#60;/p&#62;
&#60;p&#62;Does this make sense?&#60;/p&#62;
&#60;p&#62;Thanks again for the response,&#60;br /&#62;
Ty
&#60;/p&#62;</description>
</item>
<item>
<title>tugbucket on "[Plugin: Most Commented]  2 lists in sidebar?"</title>
<link>http://wordpress.org/support/topic/326333#post-1264600</link>
<pubDate>Fri, 30 Oct 2009 17:30:48 +0000</pubDate>
<dc:creator>tugbucket</dc:creator>
<guid isPermaLink="false">1264600@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Okay this might be better to some extent, it will show the number of comments for the week off to the side.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;h2&#38;gt;Most commented posts from the last 7 days&#38;lt;/h2&#38;gt;
&#38;lt;ul&#38;gt;
&#38;lt;?php
$date1 = date(&#38;#39;Y-m-d&#38;#39;, strtotime(&#38;#39;+1 days&#38;#39;));
$date2 = date(&#38;#39;Y-m-d&#38;#39;, strtotime(&#38;#39;-8 days&#38;#39;));
$result = $wpdb-&#38;gt;get_results(&#38;quot;SELECT comment_date, comment_post_ID, comment_approved, COUNT($wpdb-&#38;gt;comments.comment_post_ID) AS &#38;#39;comment_count&#38;#39; FROM $wpdb-&#38;gt;posts, $wpdb-&#38;gt;comments WHERE comment_date BETWEEN &#38;#39;&#38;quot;. $date2 .&#38;quot;&#38;#39; AND &#38;#39;&#38;quot; . $date1  . &#38;quot;&#38;#39; AND $wpdb-&#38;gt;posts.ID=$wpdb-&#38;gt;comments.comment_post_ID GROUP BY comment_post_ID ORDER BY comment_count DESC LIMIT 0 , 10&#38;quot;);

foreach ($result as $topten) {
    $postid = $topten-&#38;gt;comment_post_ID;
    $commentapproved = $topten-&#38;gt;comment_approved;
	$commentcount = $topten-&#38;gt;comment_count;
    if ($commentapproved != 0) {
    ?&#38;gt;
         &#38;lt;li&#38;gt;&#38;lt;a href=&#38;quot;&#38;lt;?php echo get_permalink($postid); ?&#38;gt;&#38;quot;&#38;gt;&#38;lt;?php echo get_the_title($postid); ?&#38;gt;&#38;lt;/a&#38;gt; &#38;lt;small&#38;gt;(&#38;lt;?php echo $commentcount.&#38;#39; this week&#38;#39;; ?&#38;gt;)&#38;lt;/small&#38;gt;&#38;lt;/li&#38;gt;
    &#38;lt;?php }
}
?&#38;gt;
&#38;lt;/ul&#38;gt;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>tugbucket on "[Plugin: Most Commented]  2 lists in sidebar?"</title>
<link>http://wordpress.org/support/topic/326333#post-1264440</link>
<pubDate>Fri, 30 Oct 2009 15:23:34 +0000</pubDate>
<dc:creator>tugbucket</dc:creator>
<guid isPermaLink="false">1264440@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Just to make sure I know what you're wanting.&#60;/p&#62;
&#60;p&#62;You want to get the most commented posts where the &#60;strong&#62;comment&#60;/strong&#62; occurred in the last week right?&#60;/p&#62;
&#60;p&#62;If that's right, you can't use the same plug-in your using. That plugin is looking at the &#60;strong&#62;posts&#60;/strong&#62; in the database not the &#60;strong&#62;comments&#60;/strong&#62;. It is looking for the date in which a post was actually posted and then seeing if it had comments. &#60;/p&#62;
&#60;p&#62;The info you want to check is in a different table in the database so you need a totally different connection.&#60;/p&#62;
&#60;p&#62;Try this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;h2&#38;gt;Most commented posts from the last 7 days&#38;lt;/h2&#38;gt;
&#38;lt;ul&#38;gt;
&#38;lt;?php
$date1 = date(&#38;#39;Y-m-d&#38;#39;, strtotime(&#38;#39;+1 day&#38;#39;));
$date2 = date(&#38;#39;Y-m-d&#38;#39;, strtotime(&#38;#39;-8 days&#38;#39;));
$result = $wpdb-&#38;gt;get_results(&#38;quot;SELECT * FROM $wpdb-&#38;gt;comments WHERE comment_date BETWEEN &#38;#39;&#38;quot;. $date2 .&#38;quot;&#38;#39; AND &#38;#39;&#38;quot; . $date1 . &#38;quot;&#38;#39; GROUP BY comment_post_ID ORDER BY comment_date DESC LIMIT 0 , 10&#38;quot;);

foreach ($result as $topten) {
    $postid = $topten-&#38;gt;comment_post_ID;
    $commentapproved = $topten-&#38;gt;comment_approved;

    if ($commentapproved != 0) {
    ?&#38;gt;
         &#38;lt;li&#38;gt;&#38;lt;a href=&#38;quot;&#38;lt;?php echo get_permalink($postid); ?&#38;gt;&#38;quot;&#38;gt;&#38;lt;?php echo get_the_title($postid); ?&#38;gt;&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;
    &#38;lt;?php }
}
?&#38;gt;
&#38;lt;/ul&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This appears to list the 10 most commented posts based on if the comment it self was made in the last 7 days (well 8 days actually or it won't count today).
&#60;/p&#62;</description>
</item>
<item>
<title>tydende on "[Plugin: Most Commented]  2 lists in sidebar?"</title>
<link>http://wordpress.org/support/topic/326333#post-1263719</link>
<pubDate>Thu, 29 Oct 2009 21:25:40 +0000</pubDate>
<dc:creator>tydende</dc:creator>
<guid isPermaLink="false">1263719@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I'm trying to add two most commented lists to our sidebar, Most Commented This Week, and Most Commented All-Time.&#60;/p&#62;
&#60;p&#62;However, whichever list is second in the sidebar code automatically displays the same results as the first. In other words, the secodn list does not show the most commented posts for the number of days stated in the code, but rather the number of days stated in the first bit of code.&#60;/p&#62;
&#60;p&#62;I'm using&#60;br /&#62;
&#38;lt;?php mdv_most_commented(10, '', '&#60;/p&#62;
&#60;p&#62;', true, 1000, true); ?&#38;gt;&#60;br /&#62;
for Most Commented All-Time&#60;br /&#62;
and&#60;br /&#62;
&#38;lt;?php mdv_most_commented(10, '', '&#60;/p&#62;
&#60;p&#62;', true, 7, true); ?&#38;gt;&#60;br /&#62;
fr Most Commented This Week&#60;/p&#62;
&#60;p&#62;Has anyone else been able to show two Most Commented lists or have an idea how to get around this?&#60;/p&#62;
&#60;p&#62;Thanks!
&#60;/p&#62;</description>
</item>
<item>
<title>dimitryz on "[Plugin: Most Commented] Notice about $mdv_most_commented"</title>
<link>http://wordpress.org/support/topic/313921#post-1221562</link>
<pubDate>Wed, 23 Sep 2009 05:04:22 +0000</pubDate>
<dc:creator>dimitryz</dc:creator>
<guid isPermaLink="false">1221562@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Please initialize $mdv_most_commented before use:&#60;br /&#62;
if ( $echo ) {&#60;br /&#62;
    $mdv_most_commented = '';&#60;br /&#62;
    if ( !empty($posts) ) {&#60;br /&#62;
    ...&#60;/p&#62;
&#60;p&#62;Thanks&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://wordpress.org/extend/plugins/most-commented/&#34; rel=&#34;nofollow&#34;&#62;http://wordpress.org/extend/plugins/most-commented/&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>EllipsisAeon on "Popular Posts by Comments with Categories"</title>
<link>http://wordpress.org/support/topic/248350#post-1139925</link>
<pubDate>Thu, 16 Jul 2009 05:09:15 +0000</pubDate>
<dc:creator>EllipsisAeon</dc:creator>
<guid isPermaLink="false">1139925@http://wordpress.org/support/</guid>
<description>&#60;p&#62;ok, stuck again. I basically want to sort the categories by name then group the posts below the category name/link in a semi-forum layout fashion:&#60;/p&#62;
&#60;blockquote&#62;
&#60;ul&#62;
Category 1:&#60;/p&#62;
&#60;li&#62; posts (#of comments)&#60;/li&#62;
&#60;li&#62; posts (#of comments)&#60;/li&#62;
&#60;li&#62; posts (#of comments)&#60;/li&#62;
&#60;/ul&#62;
&#60;ul&#62;
Category 2:&#60;/p&#62;
&#60;li&#62; posts (#of comments)&#60;/li&#62;
&#60;li&#62; posts (#of comments)&#60;/li&#62;
&#60;/ul&#62;
&#60;/blockquote&#62;
&#60;p&#62;I'm thinking this would be done with something like &#34;foreach $category_id&#34; but am stuck on the implementation; I think my caffiene levels are low.&#60;/p&#62;
&#60;p&#62;Any tips/links/help is greatly appreciated.
&#60;/p&#62;</description>
</item>
<item>
<title>EllipsisAeon on "Popular Posts by Comments with Categories"</title>
<link>http://wordpress.org/support/topic/248350#post-1139718</link>
<pubDate>Thu, 16 Jul 2009 00:15:55 +0000</pubDate>
<dc:creator>EllipsisAeon</dc:creator>
<guid isPermaLink="false">1139718@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Back with an update on this. If you would like to turn that category name into an actual link to the category from the comment, here's the code:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;$permalink = get_permalink($post-&#38;gt;ID);
$category = get_the_category($post-&#38;gt;ID);
$first_category = $category[0]-&#38;gt;cat_name;

$category_id = get_cat_ID($first_category);
$category_link = get_category_link($category_id);

$mdv_most_commented .= $before . &#38;#39;&#38;lt;a href=&#38;quot;&#38;#39; . $category_link . &#38;#39;&#38;quot; title=&#38;quot;&#38;#39; . $first_category .&#38;#39;&#38;quot;&#38;gt;&#38;#39; . $first_category . &#38;#39;&#38;lt;/a&#38;gt;:&#38;amp;nbsp;&#38;lt;a href=&#38;quot;&#38;#39; . $permalink . &#38;#39;&#38;quot; title=&#38;quot;&#38;#39; . $post_title.&#38;#39;&#38;quot;&#38;gt;&#38;#39; . $post_title . &#38;#39;&#38;lt;/a&#38;gt; (&#38;#39; . $comment_count . &#38;#39;)&#38;#39; . $after;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>EllipsisAeon on "Popular Posts by Comments with Categories"</title>
<link>http://wordpress.org/support/topic/248350#post-1138213</link>
<pubDate>Tue, 14 Jul 2009 22:20:01 +0000</pubDate>
<dc:creator>EllipsisAeon</dc:creator>
<guid isPermaLink="false">1138213@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Another thanks to Michael for the code, very helpful in getting one step closer to what I'm trying to do :)
&#60;/p&#62;</description>
</item>
<item>
<title>carblanco on "[Pulgin: Most Commented] How to translate strings"</title>
<link>http://wordpress.org/support/topic/284230#post-1117464</link>
<pubDate>Fri, 26 Jun 2009 14:46:04 +0000</pubDate>
<dc:creator>carblanco</dc:creator>
<guid isPermaLink="false">1117464@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Hi all,&#60;/p&#62;
&#60;p&#62;A stupid question: I need to translate &#34;Most Commented&#34; to &#34;lo más Comentado&#34; but I can't find the string.&#60;br /&#62;
Could please tell where to change it?&#60;br /&#62;
Thanks.
&#60;/p&#62;</description>
</item>
<item>
<title>Miroslav on "[Plugin: Most Commented] which i could pick which category it gets them from"</title>
<link>http://wordpress.org/support/topic/209139#post-1031246</link>
<pubDate>Mon, 30 Mar 2009 13:27:35 +0000</pubDate>
<dc:creator>Miroslav</dc:creator>
<guid isPermaLink="false">1031246@http://wordpress.org/support/</guid>
<description>&#60;p&#62;I just came across this thread in search of the same solution: ability to pick/exclude categories to be used by the plugin.&#60;/p&#62;
&#60;p&#62;Any help would be greatly appreciated! Thanks!
&#60;/p&#62;</description>
</item>
<item>
<title>ex272 on "Popular Posts by Comments with Categories"</title>
<link>http://wordpress.org/support/topic/248350#post-1002565</link>
<pubDate>Mon, 02 Mar 2009 05:52:09 +0000</pubDate>
<dc:creator>ex272</dc:creator>
<guid isPermaLink="false">1002565@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Worked like a charm, thanks Michael.
&#60;/p&#62;</description>
</item>
<item>
<title>MichaelH on "Popular Posts by Comments with Categories"</title>
<link>http://wordpress.org/support/topic/248350#post-1002029</link>
<pubDate>Sun, 01 Mar 2009 17:14:41 +0000</pubDate>
<dc:creator>MichaelH</dc:creator>
<guid isPermaLink="false">1002029@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Best thing to do is install and activate  &#60;a href=&#34;http://wordpress.org/extend/plugins/most-commented&#34; rel=&#34;nofollow&#34;&#62;http://wordpress.org/extend/plugins/most-commented&#60;/a&#62; then just put this in your sidebar:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;&#38;lt;?php mdv_most_commented(); ?&#38;gt;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;If you insist on the category displaying then in &#60;code&#62;most-commented.php&#60;/code&#62; change&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$permalink = get_permalink($post-&#38;gt;ID);
$mdv_most_commented .= $before . &#38;#39;&#38;lt;a href=&#38;quot;&#38;#39; . $permalink . &#38;#39;&#38;quot; title=&#38;quot;&#38;#39; . $post_title.&#38;#39;&#38;quot;&#38;gt;&#38;#39; . $post_title . &#38;#39;&#38;lt;/a&#38;gt; (&#38;#39; . $comment_count.&#38;#39;)&#38;#39; . $after;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;to&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;$permalink = get_permalink($post-&#38;gt;ID);
$category = get_the_category($post-&#38;gt;ID);
$first_category = $category[0]-&#38;gt;cat_name;
$mdv_most_commented .= $before . &#38;#39;&#38;lt;a href=&#38;quot;&#38;#39; . $permalink . &#38;#39;&#38;quot; title=&#38;quot;&#38;#39; . $post_title.&#38;#39;&#38;quot;&#38;gt;&#38;#39; . $post_title . &#38;#39;&#38;lt;/a&#38;gt; (&#38;#39; . $comment_count . &#38;#39; in &#38;#39; . $first_category . &#38;#39;)&#38;#39; . $after;&#60;/code&#62;&#60;/pre&#62;</description>
</item>
<item>
<title>ex272 on "Popular Posts by Comments with Categories"</title>
<link>http://wordpress.org/support/topic/248350#post-1001376</link>
<pubDate>Sat, 28 Feb 2009 21:05:26 +0000</pubDate>
<dc:creator>ex272</dc:creator>
<guid isPermaLink="false">1001376@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Hi Michael,&#60;/p&#62;
&#60;p&#62;So since this is a sidebar function, it seems that rather than using a wpdb query, I'd have to execute The Loop in the sidebar as well as the content area, in order to call get_the_category() from the sidebar, correct? Then how would I grab the top 5 posts ordered by comment count within this sidebar Loop? I looked into query_posts(), but did not see comment_count as an option for its orderby parameter. &#60;/p&#62;
&#60;p&#62;Sorry, this is only my second day at this.&#60;/p&#62;
&#60;p&#62;Thanks again!
&#60;/p&#62;</description>
</item>
<item>
<title>MichaelH on "Popular Posts by Comments with Categories"</title>
<link>http://wordpress.org/support/topic/248350#post-1001075</link>
<pubDate>Sat, 28 Feb 2009 14:24:51 +0000</pubDate>
<dc:creator>MichaelH</dc:creator>
<guid isPermaLink="false">1001075@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Look at using &#60;a href=&#34;http://codex.wordpress.org/Template_Tags/get_the_category&#34;&#62;get_the_category()&#60;/a&#62;.
&#60;/p&#62;</description>
</item>
<item>
<title>ex272 on "Popular Posts by Comments with Categories"</title>
<link>http://wordpress.org/support/topic/248350#post-1000961</link>
<pubDate>Sat, 28 Feb 2009 10:26:07 +0000</pubDate>
<dc:creator>ex272</dc:creator>
<guid isPermaLink="false">1000961@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;I am trying to place on my sidebar an area listing the most commented, i.e. popular, posts, which I was able to do with a basic wpdb query. But I am having the problem of getting the category names for those posts, arising from the obsoleteness of &#34;post_category.&#34;&#60;/p&#62;
&#60;p&#62;Here is the code I currently have:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;global $wpdb ;
$result = $wpdb-&#38;gt;get_results ( &#38;quot;SELECT comment_count, ID, post_title FROM $wpdb-&#38;gt;posts WHERE post_status = &#38;#39;publish&#38;#39; ORDER BY comment_count DESC LIMIT 0 , 5&#38;quot; ) ;
foreach ( $result as $post )
{
	setup_postdata ( $post ) ;
	$postid = $post-&#38;gt;ID ;
	$title = $post-&#38;gt;post_title ;
	$category = $post-&#38;gt;post_category ;
	$commentcount = $post-&#38;gt;comment_count ;
	echo &#38;#39;&#38;lt;li&#38;gt;&#38;lt;a href=&#38;quot;&#38;#39; . get_permalink($postid) . &#38;#39;&#38;quot;&#38;gt;in &#38;#39; . $category . &#38;#39;: &#38;#39; . $title . &#38;#39; (&#38;#39; . $commentcount . &#38;#39;)&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;&#38;#39; ;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I know category information is now stored in separate tables. How can I retrieve that information in the same query?&#60;/p&#62;
&#60;p&#62;Thanks
&#60;/p&#62;</description>
</item>
<item>
<title>ember on "[Plugin: Most Commented] How To: Exclude Pages"</title>
<link>http://wordpress.org/support/topic/219165#post-958299</link>
<pubDate>Sat, 17 Jan 2009 02:41:42 +0000</pubDate>
<dc:creator>ember</dc:creator>
<guid isPermaLink="false">958299@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Wow that actually works! I was looking all over for a Most comments plugin that doesn't show pages until I found this post.&#60;/p&#62;
&#60;p&#62;Cheers fhamilton!
&#60;/p&#62;</description>
</item>
<item>
<title>fhamilton on "[Plugin: Most Commented] How To: Exclude Pages"</title>
<link>http://wordpress.org/support/topic/219165#post-904245</link>
<pubDate>Fri, 21 Nov 2008 02:08:24 +0000</pubDate>
<dc:creator>fhamilton</dc:creator>
<guid isPermaLink="false">904245@http://wordpress.org/support/</guid>
<description>&#60;p&#62;It doesn't exclude pages by default but if you add to the query it will. look for the first line, then add the second. cheers!&#60;/p&#62;
&#60;p&#62;1) $request .= &#34; WHERE post_status = 'publish'&#34;;&#60;br /&#62;
2) $request .= &#34; AND post_type = 'post'&#34;;&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://wordpress.org/extend/plugins/most-commented/&#34; rel=&#34;nofollow&#34;&#62;http://wordpress.org/extend/plugins/most-commented/&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>netbuddy34 on "[Plugin: Most Commented] which i could pick which category it gets them from"</title>
<link>http://wordpress.org/support/topic/209139#post-871816</link>
<pubDate>Wed, 08 Oct 2008 12:14:45 +0000</pubDate>
<dc:creator>netbuddy34</dc:creator>
<guid isPermaLink="false">871816@http://wordpress.org/support/</guid>
<description>&#60;p&#62;any chance of getting this plugin modified to allow you to select which post category comments are selected from?&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://wordpress.org/extend/plugins/most-commented/&#34; rel=&#34;nofollow&#34;&#62;http://wordpress.org/extend/plugins/most-commented/&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>Kafkaesqui on "hard to find"</title>
<link>http://wordpress.org/support/topic/146849#post-660000</link>
<pubDate>Sat, 08 Dec 2007 23:14:12 +0000</pubDate>
<dc:creator>Kafkaesqui</dc:creator>
<guid isPermaLink="false">660000@http://wordpress.org/support/</guid>
<description>&#60;p&#62;&#60;a href=&#34;http://wordpress.org/extend/plugins/most-commented/&#34; rel=&#34;nofollow&#34;&#62;http://wordpress.org/extend/plugins/most-commented/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;There is a Download Plugin button on that page.&#60;/p&#62;
&#60;p&#62;(LenK, check the tags above...)
&#60;/p&#62;</description>
</item>
<item>
<title>LenK on "hard to find"</title>
<link>http://wordpress.org/support/topic/146849#post-659872</link>
<pubDate>Sat, 08 Dec 2007 17:03:13 +0000</pubDate>
<dc:creator>LenK</dc:creator>
<guid isPermaLink="false">659872@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Huh? &#60;strong&#62;What&#60;/strong&#62; plugin?
&#60;/p&#62;</description>
</item>
<item>
<title>kimranrar on "hard to find"</title>
<link>http://wordpress.org/support/topic/146849#post-659868</link>
<pubDate>Sat, 08 Dec 2007 16:51:55 +0000</pubDate>
<dc:creator>kimranrar</dc:creator>
<guid isPermaLink="false">659868@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Well it is hard to fint this plugin when the authors page not  are working :(
&#60;/p&#62;</description>
</item>

</channel>
</rss>
