WordPress 2.5.1 With Alex King Popularity Contest Plugins
Article Source: The Only Yard For The Internet Junkie
As some of you might have noticed that we’re currently using the Popularity Contest plugins for WordPress by Alex King . There’s been a lot of controversial issues about this plugins compatibility with WordPress 2.5 and above. Some says that it could not be activated when you’re using the latest version of WordPress 2.5.1 and some says it gave a fatal error message after they have upgraded their WordPress.
The plugins author himself has noted that this plugins is boken in WordPress 2.5 and has a compatiblility issues with WordPress version 2.5 and above. You can read the "WordPress 2.5 Plugin Compatibility " page at the author’s website. He says that a fix has been found but it’s not released yet I think.
I’ve been searching for the fix to make the plugins work with WordPress 2.5.1 and finally found a way to make it works. I’ve found a blog somewhere (I forgot where I found it) and it says something about editing the plugins file and change the code in it and create a new table for the plugins. That won’t work if you’re a first time user of the plugins because the plugins will trigger an error saying that it can’t find the table for the plugins. But if you’re previously using the plugins and upgraded your WordPress then that method will work for you.
So, here’s a solutions that I’ve found. This will only work if you’re using WordPress 2.5 and above and never used the plugins before and it required you to have access to your phpMyAdmin to create a new table for the plugins. Now, log in to your phpMyAdmin and execute this command to create the table manually. BACKUP your database table first and always create a BACKUP of your database before you change anything.
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; |
Please NOTE that if you’re using a table PREFIX other than the default WordPress table PREFIX then you have to change the table PREFIX to your custom PREFIX. This code is for the default WordPress PREFIX "wp_" and after you’ve successfully created the database table then you just activate the plugins and it will works like a charm.
And this method is used if you’re previously using the plugins and upgraded your WordPress to version 2.5 and above. You need to edit the plugins file and make some change in it.
Now, find this code in the plugins file.
58 59 60 61 | if (!isset($wpdb)) {
require('../../wp-blog-header.php');
akpc_init();
} |
See this line.
59 | require('../../wp-blog-header.php'); |
And change it to this one.
59 | require('../wp-blog-header.php'); |
Then re-activate your plugins. It works for me. :w00t:
*** UPDATE ***
Updated the source code viewer for easy view.
I’ve tried this method up to WP 2.7 and it still works…
Similar Posts:
- Protect Your Sites from SPAM!!!
- Some useful WordPress plugins and software
- A Step by Step Wordpress Tutorial For Beginners (Paperback)
- Search Engine Optimizing your Wordpress installation
- K3 Reloaded WordPress Theme Released!
Article Source: The Only Yard For The Internet Junkie
If you like all this stuff here then you can buy me a pack of cigarettes.








I did the suggested workaround from Alex King and Popularity Contest plugin worked for my blog.
Rais last blog post… How PayPerPost Works For Me
I was thinking that it was a post about making a plugin for a contest :dizzy:
I’ve heard about this, haven’t tried it out yet. Thanks for the tip!
RegretfulMornings last blog post… Regretful Submission – Bare feet n’ Baby Batter
Nice Site!
http://google.com
I would have liked to make use of such a plugin. Great thing I read your post about the popularity contest plugin first. Thanks.