<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: &quot;Recently Popular&quot; WordPress Plugin</title>
	<atom:link href="http://eric.biven.us/2008/12/03/recently-popular-wordpress-plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://eric.biven.us/2008/12/03/recently-popular-wordpress-plugin/</link>
	<description>...professional nerd-speak translator</description>
	<lastBuildDate>Sat, 04 Feb 2012 01:04:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Eric Biven</title>
		<link>http://eric.biven.us/2008/12/03/recently-popular-wordpress-plugin/comment-page-14/#comment-3025</link>
		<dc:creator>Eric Biven</dc:creator>
		<pubDate>Sat, 04 Feb 2012 01:04:12 +0000</pubDate>
		<guid isPermaLink="false">http://eric.biven.us/?p=190#comment-3025</guid>
		<description>It&#039;s hard to say without knowing what stats package you use, if that stats package is tracking views by robots, etc. At this time Recently Popular doesn&#039;t differentiate between robot viewers and all other viewers.</description>
		<content:encoded><![CDATA[<p>It&#8217;s hard to say without knowing what stats package you use, if that stats package is tracking views by robots, etc. At this time Recently Popular doesn&#8217;t differentiate between robot viewers and all other viewers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Crimsonleaf</title>
		<link>http://eric.biven.us/2008/12/03/recently-popular-wordpress-plugin/comment-page-14/#comment-3023</link>
		<dc:creator>Crimsonleaf</dc:creator>
		<pubDate>Fri, 03 Feb 2012 05:41:35 +0000</pubDate>
		<guid isPermaLink="false">http://eric.biven.us/?p=190#comment-3023</guid>
		<description>I&#039;m having an issue with this plugin. I have it set to show the most popular posts over the past week and the post it shows at the top is nowhere near the top in my site stats for the same time period. In fact, when I look at the view count in the plugin it shows over 2000 views for this post and my site stats only show 160 (and that&#039;s over the entire life of the post!). Any thoughts?</description>
		<content:encoded><![CDATA[<p>I&#8217;m having an issue with this plugin. I have it set to show the most popular posts over the past week and the post it shows at the top is nowhere near the top in my site stats for the same time period. In fact, when I look at the view count in the plugin it shows over 2000 views for this post and my site stats only show 160 (and that&#8217;s over the entire life of the post!). Any thoughts?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NeoSting</title>
		<link>http://eric.biven.us/2008/12/03/recently-popular-wordpress-plugin/comment-page-14/#comment-3006</link>
		<dc:creator>NeoSting</dc:creator>
		<pubDate>Sun, 22 Jan 2012 01:18:33 +0000</pubDate>
		<guid isPermaLink="false">http://eric.biven.us/?p=190#comment-3006</guid>
		<description>Hello, just testing it and great job you made here. I found maybea bug/problem. Using in &#039;output_format&#039; in php like this :
&lt;code&gt;
&#039;&lt;a href=&quot;%post_url%&quot; rel=&quot;nofollow&quot;&gt;%category% (%hits%) %post_title%&lt;/a&gt;%publish_date% - %post_excerpt%&#039;
&lt;/code&gt;
All works except the excerpt. An idea ?

And maybe another question : i am using the add theme support function. Is it possibile to display the thumbnail of the post ? %thumbnail_url% should have which value in this case ? Thansk a lot, &amp; carry on your good work. Wanting this plugin to replace apkc popularity form alex.</description>
		<content:encoded><![CDATA[<p>Hello, just testing it and great job you made here. I found maybea bug/problem. Using in &#8216;output_format&#8217; in php like this :<br />
<code><br />
'<a href="%post_url%" rel="nofollow">%category% (%hits%) %post_title%</a>%publish_date% - %post_excerpt%'<br />
</code><br />
All works except the excerpt. An idea ?</p>
<p>And maybe another question : i am using the add theme support function. Is it possibile to display the thumbnail of the post ? %thumbnail_url% should have which value in this case ? Thansk a lot, &amp; carry on your good work. Wanting this plugin to replace apkc popularity form alex.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex orton</title>
		<link>http://eric.biven.us/2008/12/03/recently-popular-wordpress-plugin/comment-page-14/#comment-2751</link>
		<dc:creator>Alex orton</dc:creator>
		<pubDate>Tue, 15 Nov 2011 06:02:16 +0000</pubDate>
		<guid isPermaLink="false">http://eric.biven.us/?p=190#comment-2751</guid>
		<description>Hi Eric,

I have gone through all the comments. I do not have lots of experience in php. Is it possible to tweak this code to pull an image attached with defined custom field value?

$images =&amp; get_children(&#039;post_type=attachment&amp;post_mime_type=image&amp;order=ASC&amp;post_parent=&#039;.$post-&gt;post_id);
    			$img = wp_get_attachment_image_src(array_shift(array_keys($images, &#039;biggerimage&#039;)));
    $img_url = $img[0];</description>
		<content:encoded><![CDATA[<p>Hi Eric,</p>
<p>I have gone through all the comments. I do not have lots of experience in php. Is it possible to tweak this code to pull an image attached with defined custom field value?</p>
<p>$images =&amp; get_children(&#8216;post_type=attachment&amp;post_mime_type=image&amp;order=ASC&amp;post_parent=&#8217;.$post-&gt;post_id);<br />
    			$img = wp_get_attachment_image_src(array_shift(array_keys($images, &#8216;biggerimage&#8217;)));<br />
    $img_url = $img[0];</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Biven</title>
		<link>http://eric.biven.us/2008/12/03/recently-popular-wordpress-plugin/comment-page-14/#comment-2747</link>
		<dc:creator>Eric Biven</dc:creator>
		<pubDate>Tue, 15 Nov 2011 02:55:56 +0000</pubDate>
		<guid isPermaLink="false">http://eric.biven.us/?p=190#comment-2747</guid>
		<description>&quot;Category names in single quotes, separated by commas.&quot; So for the call you posted:

get_counts(array(
‘enable_categories’ =&gt;true,
‘categories’ =&gt; &quot;‘Landscape’&quot;,
‘limit’ =&gt; 5,
‘post_type’ =&gt; RecentlyPopularPostType::POSTS,
‘user_type’ =&gt; RecentlyPopularUserType::ANONYMOUS,
‘interval_length’ =&gt; 3,
‘interval_type’ =&gt; ‘WEEK’,
));

Basically all it&#039;s doing is taking what you have in the string and using it as a &quot;where in&quot; clause.</description>
		<content:encoded><![CDATA[<p>&#8220;Category names in single quotes, separated by commas.&#8221; So for the call you posted:</p>
<p>get_counts(array(<br />
‘enable_categories’ =&gt;true,<br />
‘categories’ =&gt; &#8220;‘Landscape’&#8221;,<br />
‘limit’ =&gt; 5,<br />
‘post_type’ =&gt; RecentlyPopularPostType::POSTS,<br />
‘user_type’ =&gt; RecentlyPopularUserType::ANONYMOUS,<br />
‘interval_length’ =&gt; 3,<br />
‘interval_type’ =&gt; ‘WEEK’,<br />
));</p>
<p>Basically all it&#8217;s doing is taking what you have in the string and using it as a &#8220;where in&#8221; clause.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Waqas Lone</title>
		<link>http://eric.biven.us/2008/12/03/recently-popular-wordpress-plugin/comment-page-14/#comment-2745</link>
		<dc:creator>Waqas Lone</dc:creator>
		<pubDate>Tue, 15 Nov 2011 00:54:24 +0000</pubDate>
		<guid isPermaLink="false">http://eric.biven.us/?p=190#comment-2745</guid>
		<description>Thanks for your quick reply.

I also tried your function in body - how are we supposed to filter by category names? I have tried putting category name, slug, id with and without quotes but it&#039;s not filtering it properly.

Could you please tell me how to apply category filter properly?

get_counts(array(
   &#039;enable_categories&#039; =&gt;true,
    &#039;categories&#039; =&gt; &#039;Landscape&#039;,
    &#039;limit&#039; =&gt; 5,
    &#039;post_type&#039; =&gt; RecentlyPopularPostType::POSTS,
    &#039;user_type&#039; =&gt; RecentlyPopularUserType::ANONYMOUS,
    &#039;interval_length&#039; =&gt; 3,
    &#039;interval_type&#039; =&gt; &#039;WEEK&#039;,
  ));
?&gt;</description>
		<content:encoded><![CDATA[<p>Thanks for your quick reply.</p>
<p>I also tried your function in body &#8211; how are we supposed to filter by category names? I have tried putting category name, slug, id with and without quotes but it&#8217;s not filtering it properly.</p>
<p>Could you please tell me how to apply category filter properly?</p>
<p>get_counts(array(<br />
   &#8216;enable_categories&#8217; =&gt;true,<br />
    &#8216;categories&#8217; =&gt; &#8216;Landscape&#8217;,<br />
    &#8216;limit&#8217; =&gt; 5,<br />
    &#8216;post_type&#8217; =&gt; RecentlyPopularPostType::POSTS,<br />
    &#8216;user_type&#8217; =&gt; RecentlyPopularUserType::ANONYMOUS,<br />
    &#8216;interval_length&#8217; =&gt; 3,<br />
    &#8216;interval_type&#8217; =&gt; &#8216;WEEK&#8217;,<br />
  ));<br />
?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Biven</title>
		<link>http://eric.biven.us/2008/12/03/recently-popular-wordpress-plugin/comment-page-14/#comment-2741</link>
		<dc:creator>Eric Biven</dc:creator>
		<pubDate>Mon, 14 Nov 2011 14:26:16 +0000</pubDate>
		<guid isPermaLink="false">http://eric.biven.us/?p=190#comment-2741</guid>
		<description>It sounds like you have a pretty specific use-case. You&#039;d probably be better off forking the code and modifying the get_counts() function to work differently.</description>
		<content:encoded><![CDATA[<p>It sounds like you have a pretty specific use-case. You&#8217;d probably be better off forking the code and modifying the get_counts() function to work differently.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric Biven</title>
		<link>http://eric.biven.us/2008/12/03/recently-popular-wordpress-plugin/comment-page-14/#comment-2740</link>
		<dc:creator>Eric Biven</dc:creator>
		<pubDate>Mon, 14 Nov 2011 14:14:52 +0000</pubDate>
		<guid isPermaLink="false">http://eric.biven.us/?p=190#comment-2740</guid>
		<description>The simplest way is to resize them in the HTML. The longer, correct way is to register a different thumbnail size and change the plugin to use that new size.

http://codex.wordpress.org/Function_Reference/add_image_size</description>
		<content:encoded><![CDATA[<p>The simplest way is to resize them in the HTML. The longer, correct way is to register a different thumbnail size and change the plugin to use that new size.</p>
<p><a href="http://codex.wordpress.org/Function_Reference/add_image_size" rel="nofollow">http://codex.wordpress.org/Function_Reference/add_image_size</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Waqas Lone</title>
		<link>http://eric.biven.us/2008/12/03/recently-popular-wordpress-plugin/comment-page-14/#comment-2739</link>
		<dc:creator>Waqas Lone</dc:creator>
		<pubDate>Mon, 14 Nov 2011 07:57:16 +0000</pubDate>
		<guid isPermaLink="false">http://eric.biven.us/?p=190#comment-2739</guid>
		<description>Thanks for providing an excellent plugin. 

I have been trying to use your plugin code in theme pages. Because I do not want to use  for listing posts, instead I am trying to list them in a layout which I like. 

I have read your comments above in trying to help Kegan. Is there any way i can use your SQL query directly into the code?

I have tried this approach with many plugins and was successful. But your SQL query is bit different. If you can please help me modifying it it would be great. 

I am trying to apply your code on different content styles in my theme pages. I am trying to retrieve data and then pass it on to a Loop which will layout data the way I want:

This is the query which I have come up after some changes and need your help here. I&#039;m trying to list most read 5 articles from category &quot;4309&quot; in last two hours?

$sql=&quot;SELECT
    	`rp`.`hits` AS `hits`,
        `rp`.`postid` AS `post_id`,
    	`p`.`post_title` AS `post_title`,
    	`p`.`post_excerpt` AS `post_excerpt`,
       	`p`.`post_date` AS `post_date`,
    	`p`.`post_type` AS `post_type`,
    	`u`.`display_name` AS `display_name`,
    	`u`.`user_url` AS `user_url`,
    	GROUP_CONCAT(DISTINCT `t`.`name` ORDER BY `t`.`name` SEPARATOR &#039;, &#039;) AS `category`
     FROM ( SELECT
     COUNT(`post_id`) AS `hits`,
     MIN(`ts`) AS `ts`,
     MIN(`user_type`) AS `user_type`,
     MIN(`post_id`) AS `postid`
     FROM 	`wp_recently_popular`
     WHERE   `ts` &gt; (CURRENT_TIMESTAMP() - INTERVAL 2 HOUR)
               GROUP 	BY `post_id`
               ORDER	BY `hits` DESC
           ) AS `rp`
    LEFT JOIN `wp_posts` AS `p` ON `rp`.`postid` = `p`.`ID`
    LEFT JOIN `wp_users` AS `u` ON `p`.`post_author` = `u`.`ID`
    LEFT JOIN `wp_term_relationships` AS `tr` ON `p`.`ID` = `tr`.`object_id`
    LEFT JOIN `wp_term_taxonomy` AS `tt` ON `tr`.`term_taxonomy_id` = `tt`.`term_taxonomy_id`
    LEFT JOIN `wp_terms` AS `t` ON `tt`.`term_id` = `t`.`term_id`
    	WHERE 1
	AND `rp`.`user_type` = &#039;0&#039;
        AND `p`.`post_type` = &#039;post&#039;
        AND `tt`.`taxonomy` = &#039;category&#039;
        AND `t`.`name` IN (&#039;4309&#039;)
        AND `rp`.`postid` = &#039;&#039;
    		GROUP BY `rp`.`postid`
    		ORDER BY `rp`.`hits` DESC, `rp`.`ts` DESC
    		LIMIT 5&quot;;

Do you think your query can be modified and can be directly used inside the code?</description>
		<content:encoded><![CDATA[<p>Thanks for providing an excellent plugin. </p>
<p>I have been trying to use your plugin code in theme pages. Because I do not want to use  for listing posts, instead I am trying to list them in a layout which I like. </p>
<p>I have read your comments above in trying to help Kegan. Is there any way i can use your SQL query directly into the code?</p>
<p>I have tried this approach with many plugins and was successful. But your SQL query is bit different. If you can please help me modifying it it would be great. </p>
<p>I am trying to apply your code on different content styles in my theme pages. I am trying to retrieve data and then pass it on to a Loop which will layout data the way I want:</p>
<p>This is the query which I have come up after some changes and need your help here. I&#8217;m trying to list most read 5 articles from category &#8220;4309&#8243; in last two hours?</p>
<p>$sql=&#8221;SELECT<br />
    	`rp`.`hits` AS `hits`,<br />
        `rp`.`postid` AS `post_id`,<br />
    	`p`.`post_title` AS `post_title`,<br />
    	`p`.`post_excerpt` AS `post_excerpt`,<br />
       	`p`.`post_date` AS `post_date`,<br />
    	`p`.`post_type` AS `post_type`,<br />
    	`u`.`display_name` AS `display_name`,<br />
    	`u`.`user_url` AS `user_url`,<br />
    	GROUP_CONCAT(DISTINCT `t`.`name` ORDER BY `t`.`name` SEPARATOR &#8216;, &#8216;) AS `category`<br />
     FROM ( SELECT<br />
     COUNT(`post_id`) AS `hits`,<br />
     MIN(`ts`) AS `ts`,<br />
     MIN(`user_type`) AS `user_type`,<br />
     MIN(`post_id`) AS `postid`<br />
     FROM 	`wp_recently_popular`<br />
     WHERE   `ts` &gt; (CURRENT_TIMESTAMP() &#8211; INTERVAL 2 HOUR)<br />
               GROUP 	BY `post_id`<br />
               ORDER	BY `hits` DESC<br />
           ) AS `rp`<br />
    LEFT JOIN `wp_posts` AS `p` ON `rp`.`postid` = `p`.`ID`<br />
    LEFT JOIN `wp_users` AS `u` ON `p`.`post_author` = `u`.`ID`<br />
    LEFT JOIN `wp_term_relationships` AS `tr` ON `p`.`ID` = `tr`.`object_id`<br />
    LEFT JOIN `wp_term_taxonomy` AS `tt` ON `tr`.`term_taxonomy_id` = `tt`.`term_taxonomy_id`<br />
    LEFT JOIN `wp_terms` AS `t` ON `tt`.`term_id` = `t`.`term_id`<br />
    	WHERE 1<br />
	AND `rp`.`user_type` = &#8217;0&#8242;<br />
        AND `p`.`post_type` = &#8216;post&#8217;<br />
        AND `tt`.`taxonomy` = &#8216;category&#8217;<br />
        AND `t`.`name` IN (&#8217;4309&#8242;)<br />
        AND `rp`.`postid` = &#8221;<br />
    		GROUP BY `rp`.`postid`<br />
    		ORDER BY `rp`.`hits` DESC, `rp`.`ts` DESC<br />
    		LIMIT 5&#8243;;</p>
<p>Do you think your query can be modified and can be directly used inside the code?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William</title>
		<link>http://eric.biven.us/2008/12/03/recently-popular-wordpress-plugin/comment-page-14/#comment-2738</link>
		<dc:creator>William</dc:creator>
		<pubDate>Mon, 14 Nov 2011 03:19:29 +0000</pubDate>
		<guid isPermaLink="false">http://eric.biven.us/?p=190#comment-2738</guid>
		<description>Hi Eric,

Love your plugin. How can I choose/modify your code to pick or generate smaller thumbnails? eg: 40x40 or 48x48

Thanks</description>
		<content:encoded><![CDATA[<p>Hi Eric,</p>
<p>Love your plugin. How can I choose/modify your code to pick or generate smaller thumbnails? eg: 40&#215;40 or 48&#215;48</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
</channel>
</rss>

