This version of Popularity Contest fixes a single small bug. I’ve got a good set of features to add to this plugin in the future when I get some roundtuit, but for now I wanted to at least get this fix out for those of you on WP 2.3+.
Popularity Contest is a WordPress plugin that helps you see which of your posts are most popular. Views, comments, etc. are tracked and given configurable point values to determine popularity.
The download and more information are available on my WordPress Plugins page.
If you have any trouble with this, please open a thread in the WP Support Forums and send me the link.
This post is part of the thread: Content Presentation – an ongoing story on this site. View the thread timeline for more context on this post.
This post is part of the project: Popularity Contest. View the project timeline for more context on this post.
Excellent!
A question for you: other than maybe a desire to get donations, why are you maintaining your own WordPress plugins page and not throwing your lot in with the official WordPress plugins directory?
This is so weird, with the upgrade it’s putting the value in the post again, but I’ll be darned if I can find the call in the loop to remove it.
I’m an idiot – I forgot it’s a config setting in the plugin code itself.
Alex,
What bug is it that this update resolves?
I ask because i once used your plugin, and it worked fine, with one exception. For whatever reason, it would list one multiple times, anywhere from 2 to 4 times.
…is it that one?
One more THANK YOU for that delicious plugin!
[…] SK2 å’Œ Akismet 一起工作,å‘现活下æ¥çš„ Spam 确实少了很多。今天 Akismet å’Œ Popularity Contest 这两款æ’件都更新了,虽然它们之间没有什么è”系,但对我æ¥è¯´éƒ½æ˜¯ […]
Thanks a ton for the wonderful plugin, i’ve updated it!
Hi there Alex! Is there a plan to make your plugin compatible with wp-supercache? Or perhaps a hack to use javascript instead of php?
thumbs up for your plugin! Thanx for the great job so far!
Great plugin! I thought you might be interested in a super easy modification I made to the plugin after I wanted to be able to show the “top posts and pages: today” section from my wordpress.com stats but couldn’t find a good solution.
I just duplicated and modified the show_top_ranked_in_month() function to show the top ranked in the last n days, like so:
function show_top_ranked_in_last_n($limit, $before, $after, $n = 7) {
if(!is_numeric($n)) $n = 7;
$n = intval($n);
global $wpdb;
$temp = $wpdb;
$join = apply_filters('posts_join', '');
$where = apply_filters('posts_where', '');
$groupby = apply_filters('posts_groupby', '');
if (!empty($groupby)) {
$groupby = ' GROUP BY '.$groupby;
}
else {
$groupby = ' GROUP BY '.$wpdb->posts.'.ID ';
}
$posts = $wpdb->get_results("
SELECT ID, post_title
FROM $wpdb->posts
LEFT JOIN $wpdb->ak_popularity pop
ON $wpdb->posts.ID = pop.post_id
$join
WHERE post_date > SUBDATE(NOW(), $n)
AND post_date ID).'">'
.$post->post_title.''.$after
);
}
}
else {
print($before.'(none)'.$after);
}
$wpdb = $temp;
}
and added the appropriate public function as well. It turns out to be pretty useful because I can show top ranked today, top ranked in the last week. This function could also be modified to show the top ranked posts in a range, by replacing NOW() in the query with a variable
I wanted to add this plug in to my page but my site has been live for about a year now and I have hundreds of posts. Is there a way I can go back and manually enter the popularity value for each post that was published prior to installing the plugin?
Thanks
IMHO, if you’re going to place a link to your site on every post in a person’s blog, it would be cool if you had the common decency to use target=_blank.
Disabled the plugin.
thanks,
json
target=_blank is bad, it removes choice from your visitors.
I would recommend reading the README, particularly the part of the FAQ titled:
How do I turn off the ‘[?]’ on my posts?
@Alex
I don’t agree with json exactly, especially the way they phrased their thought, but it would be nice if the link was rel=external for people who add target=_blank to their rel=external links via JavaScript.
Otherwise, fabulous plugin; it’s very useful. Two updates I’d like to see are:
1. Being able to place the popularity % somewhere rather than defaulting to the bottom of a post. So I can move it somewhere with the rest of my meta data content
2. If it isn’t there already (which I don’t believe it is) I’d love to see it not count hits when a WP logged in user loads the page/archive/listing. Or maybe an option to turn that feature on/off.
Hope they were already on your radar of features we might see soon
@jeff – i think some tags got stripped out when you posted that code, as well as some smart quotes put in. Could you say what is missing, as I really want to use that mod! Thanks
[…] met its match with my most popular post to date (according to the WordPress plug in Popularity Contest)… Please avoid […]
Thanks for plgn, following for updates
[…] download the Popularity Contest plugin from this page. From there most users will know what to do, but here’s my guide on how I set up the Popular […]
Is there a way to emphasize the date of the post to influence its popularity? Or to simply discard older posts? We have some evergreen posts that got a lot of traffic long ago and so the “most popular” list is practically etched in stone, making it nearly useless for a news site like ours. We want “what are people reading and linking most now” not a hall of fame. Adding a weight for date would be handy, so it could slowly de-emphasize older posts.
I’m also having the same trouble as @Mig above. Our most popular posts look like a hall of fame instead of a dynamic list. I tried adjusting the values under the popularity settings but I don’t really know which ones to adjust. Any suggestions?
[…] Popularity Contestã¯ã€è¨˜äº‹ã®äººæ°—度を集計ã—ã¦æ§˜ã€…ãªå½¢ã§è¡¨ç¤ºã§ãるプラグインã§ã™ã€‚比較的有åãªãƒ—ラグインãªã®ã§å°Žå…¥ã•れã¦ã„る方も多ã„ã®ã§ã¯ãªã„ã§ã—ょã†ã‹ã€‚ […]
Same problem as above. Our most popular are pretty stagnant. I’d love a simple solution, if possible, for have an option of most popular this week, or this month, etc. I see the mod listed above, but don’t know if I can handle that kind of coding.
Hi Alex,
Thank you for that very cool plugin!
I made sidebar widget plugin because the plugin that you made was very wonderful.
http://wordpress.org[...]ists-widget/
[…] Popularity Contest – Tracks your most popular content so you can manage which parts of your site are most visited (or referenced most externally). Also allows for you to display a list of the top content on your site to help users find your top content. […]
[…] for the most part it didn’t. The only plugin that I wasn’t able to reactivate was the Popularity Contest from Alex King. Fortunately there’s an easy fix for this plugin which you find […]
I’ve been doing some investigation and found the problem. It seems that as my homepage is not the default index.php but a wordpress page, the data in the $posts is the page data and not the posts data.
As a result, in the get_current_posts() functions the line $ids[] = $post->ID was filling the array with the page id.
The solution I found was to retrieve the post id on my template as told in the wp codex, replace the line 1314 with:
global $wpdb, $posts, $do_not_duplicate;
and replace the $ids[] = $post->ID; line with the following code:
if($do_not_duplicate) {
$ids[] = $do_not_duplicate;
} else {
$ids[] = $post->ID;
}
[…] primeiro que vos vou falar é o Popularity Contest que permite que mostre quais dos seus posts são mais populares, têm mais comentários, trackbacks […]
[…] Popularity Contest 1.3b3 (follow this hint to end “fatal error” issues) […]
[…] Popularity Contest 1.3b3 (прочитайте Ñто , чтобы прекратить “фатальные ошибкиâ€) […]
[…] Popularity Contest 1.3b3 (follow this hint to end fatal error issues) […]
[…] Alex King’s Popularity Contest WordPress Plugin which lists the most popular blog content has been triggering a fatal error and causing WordPress to deactivate it. After a few weeks of this strange behavior despite repeated update attempt and reinstalls, I finally found a quick solution that involves fixing a single line of code. Check out AlvinPoh.com ’s entry for the solution to the Popularity Contest fatal Error Bug. Hope this helps others also having this problem. Related Posts:Map of MXNA Articles by PopularityBlog Content Theft Prevention and ResponseWordpress 2.2 with bug-fixes is outChannel.Connect.Failed error NetConnection.Call.BadVersion I hate youWordpress 2.7 releasedPopularity: 1% [?] Share and Enjoy: […]
[…] Popularity Contest 1.3b3 (follow this hint to end fatal error issues) […]