Popularity contest plugin in WordPress 2.5
Alex King’s popularity contest plugin has problems with WordPress 2.5 You need to make a small change in popularity-contest.php, the plugin’s file, which currently gives an error ( #1064 – You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax …) You need to search for ‘../../wp-blog-header.php‘ and replace it with ‘../wp-blog-header.php‘, that is, remove the second ../
Then you need to create two tables in your database.
Open PhpMyAdmin and run the following sql queries:
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;
Finally run this query to enter the default values of popularity criteria (You can change them later at the plugin’s Options page):
INSERT INTO wp_ak_popularity_options VALUES('feed_value', '1');
INSERT INTO wp_ak_popularity_options VALUES('home_value', '0');
INSERT INTO wp_ak_popularity_options VALUES('archive_value', '0');
INSERT INTO wp_ak_popularity_options VALUES('category_value', '0');
INSERT INTO wp_ak_popularity_options VALUES('single_value', '10');
INSERT INTO wp_ak_popularity_options VALUES('comment_value', '20');
INSERT INTO wp_ak_popularity_options VALUES('pingback_value', '50');
INSERT INTO wp_ak_popularity_options VALUES('trackback_value', '80');


