A new beta of my Popularity Contest plugin for WordPress is available – this has some minor bug fixes and some new features and nicer handling of some edge cases. Since this version is the best known version, I have made it the default download at WordPress.org’s plugin hosting.
Changes since beta 1:
- Added tag reports. I’m pretty pleased at how these work – you type in the name of a tag you want a report on, it will auto-complete just like in the tags form on the New Post page, and then bring back the tag report when you hit Add.
- Added nice re-flowing code so that reports take up all available horizontal space when displaying.
- Added some additional refinements to the overall Popularity list at the top of the reports page.
- Added a Last (n) Days option to the widget (you can configure the # of days for the widget).
- Removed tags from category reports list.
- Fixed an issue with AJAX deletion of comments.
- Fixed a divide by 0 error that I’m not sure how could happen, but apparently did for someone. The code is more robust now anyway.
- Don’t add JavaScript code to the post content if not using the API (default) method of recording views.
- Works around a broken data situation where there are no rows in the Popularity Contest options table. I have no idea how you’d trigger this situtation, and still can’t reproduce the issue – but now the code works around it. Thanks to Dave (who apparently has never heard of Hanlon’s Razor) for finding the cause of the issue.
Known Issue in beta 2:
When installing for the first time, the WordPress plugins page reports an error:
Plugin could not be activated because it triggered a fatal error.
with an empty “fatal error” message. It also successfully activates the plugin and creates the proper default settings – everything seems to work just as planned. I spent a few minutes playing with various things, but without any error message or anything in the error log, I haven’t found the cause of this yet. If any other devs have time to check this out, I’d certainly appreciate the help.
Aside from this and perhaps a few minor tweaks based on feedback, I think this is just about ready for the final 2.0 release.
The download and more information are available on my WordPress Plugins page.
If you have any trouble with this, please contact the WordPress HelpCenter or you can try the WP Support Forums.
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.
[…] Popularity Contest 2.0 Beta 2 Released […]
I got the following error when hitting “reset trackback counts”.
Catchable fatal error: Object of class stdClass could not be converted to string in /home4/kingratb/public_html/reading/wp-content/plugins/popularity-contest/popularity-contest.php on line 539
I also get the error with reset trackback counts. Otherwise, this is a nice plugin!
Thanks for the reports. I’ve reproduced this and will have it fixed shortly.
To fix the stdClass error when trying to Reset Comments/Pingbacks/Trackbacks, change line 772:
$this->populate_post_data($post_id);
to:
$this->populate_post_data($post_id->ID);
That changes it to access the actual ID variable inside the stdClass object. As far as I can tell, it works like it’s supposed to with this fix.
Or just grab the fixed version from SVN:
http://svn.wp-plugin[...]ntest/trunk/
Is there a bug with the percentage display next to the post title?
I set it to no in the settings for PC, but it still appears in the list of popular posts in the widget?
I can remove it from the code, but would like to first see if there is a bug, and if it has been fixed.
Thanks
Nice update! I have one problem, though:
I cannot change the Popularity Values on the options page. They go back to their default values when I submit the form.
WordPress 2.8.2
Popularity Contest 2.0b2
Oh, and the search engine domains field on the options page doesn’t seem to accept more than 50 characters which is too little.
When is the next update being released for the plugin?
Is it b3 or RC1 or the final release?
I haven’t upgraded to this version after reading all the errors reported in the comments above.
Here’s how you can make the Popularity Values updating work:
In my case, the corresponding fields in the ak_popularity_options mysql table were missing. I had to add them manually. If you have the same problem, you can use the following sql:
INSERT INTO `your_prefix_ak_popularity_options` (`option_name`, `option_value`) VALUES
(‘searcher_value’, ‘2’),
(‘single_value’, ’10’),
(‘home_value’, ‘2’),
(‘archive_value’, ‘4’),
(‘category_value’, ‘6’),
(‘tag_value’, ‘7’),
(‘feed_value’, ‘1’),
(‘comment_value’, ’20’),
(‘pingback_value’, ’50’),
(‘trackback_value’, ’80’);
After that you can change the Popularity Values from the plugin options page.
This version is the best known released version.
You may also want to try the current version in SVN.
I’m running 2.8.2 on a site, and the reset comments/pingbacks count just loads a solid white screen and doesn’t recount them. Any idea if this is a bug, or something on my end? Thanks!
Great plugin. Wonderful work. Will gladly donate to the cause, but also had a question. What’s the best way to style the Popularity link? I know it’s not in settings, so assume I need to do it on a template-by-template level?
Thanks again!