New Theme and Popularity Contest Plug-In
Thanks for all your kind comments on the new theme. Justin definitely has some great stuff out and keeps updating them for everyone to use. If you get a chance, head on over and wish him a happy belated birthday.
Upon changing my theme and getting all my plug-ins situated and layout just right, I hit a wall. It was not a major issue but something I wanted to use since it was already built into the theme. I’m talking about the popular posts feature. There are many plug-ins to create a popular post feature but this theme calls for the popularity contest plug-in. After I realized I needed another plug-in I downloaded it straight away and this is where my patience started to get tested.
I installed the plug-in to find that it would do nothing upon activation. I read for possible errors but this there was simply no action after clicking on ‘activate’. After a little reading at the publishers web site, I realized that I had downloaded an older version (Duh!), so I promptly got the latest version and uploaded to the server. I clicked activate and Bam! another brick wall "Error. The plug-in has caused some sort of error’ Great now what? I turned to Google and hoped that there was quick solution.
I found several entries on the error and possible fixes on Justin’s site as Alex King’s site(the maker of the plug-in). The conclusion I reached is that if you had the plug-in installed before upgrading to wordpress 2.5 then you could easily change some of the code in the plug-in and it could work (see below). However, this was my first time installing the plug-in.
Apparently, the main problem comes from the plug-in trying to create a table within the database and it doesn’t seem to be able to do this. No big deal, you just need to mak ethose tables yourself.
I found this bit of info over at WP Forums. You need to manually create the two tables in your wordpress database (it sounds much scarier than it really is). You need to login in to your phpMyAdmin or similar mySQL server control panel. From there you will open a query window and copy/paste the following code.
CREATE TABLE IF NOT EXISTS `wp_ak_popularity` (
`post_id` int(11) NOT NULL,
`total` int(11) NOT NULL,
`feed_views` int(11) NOT NULL,
`home_views` int(11) NOT NULL,
`archive_views` int(11) NOT NULL,
`category_views` int(11) NOT NULL,
`single_views` int(11) NOT NULL,
`comments` int(11) NOT NULL,
`pingbacks` int(11) NOT NULL,
`trackbacks` int(11) NOT NULL,
`last_modified` datetime,
KEY `post_id` (`post_id`)
) ENGINE=MyISAM;CREATE TABLE IF NOT EXISTS `wp_ak_popularity_options` (
`option_name` varchar(50) NOT NULL,
`option_value` varchar(50) NOT NULL
) ENGINE=MyISAM;
Execute the query and the tables should be created for you.
You need to change one line in the plug-ins php. Just use the built in editor in wordpress to open popularity-contest.php and scroll down to line 59. Replace
require(’../../wp-blog-header.php’)
with
require(’../wp-blog-header.php’);
Now you can go back to your plug-in list and activate.
[UPDATE} Looks like someone has been able to find an even easier way of getting around this compatibility issue. Head on over to WPGuy for the easy fix.
Popularity: 64% [?]









I read similar article also named me and Popularity Contest Plug-In | phoFuki, and it was completely different. Personally, I agree with you more, because this article makes a little bit more sense for me