Popularity Contest SQL and bug fix

The first step of two to fixing Popularity Contest is to edit popularity-contest.php and update the contest of a single line so the plugin can support the new WordPress 2.5.

Open popularity-contest.php (within /wp-content/plugins/popularity-contest/) and scroll to line 59. Replace require('../../wp-blog-header.php’); with require(’../wp-blog-header.php’);

The second step is to manually create the default Popularity Contest tables within your WordPress site database, this is done with a simple SQL statement through PHPMyAdmin.

CREATE TABLE IF NOT EXISTS `PREFIX_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 `PREFIX_ak_popularity_options` (
`option_name` varchar(50) NOT NULL,
`option_value` varchar(50) NOT NULL
) ENGINE=MyISAM;