Popularity Contest Plugin Cannot Be Activated Due To Fatal Error
Tric how to Activate Alex King’s Popularity Contest Plugin for WordPress if you got “Plugin Cannot Be Activated Due To Fatal Error”. The solutions are:
Open pupularity-contest.php
Goto Line 59
Replacerequire('../../wp-blog-header.php');
withrequire('../wp-blog-header.php');
Also you will need to do the following if the top alone does not work. This step is to create the tables needed for the plugin.
CREATE TABLE `wp_ak_404_log` (
`id` int(11) NOT NULL auto_increment,
`url_404` text NOT NULL,
`url_refer` text,
`user_agent` text,
`date_gmt` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=100 ;
CREATE TABLE `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 DEFAULT CHARSET=latin1;
CREATE TABLE `wp_ak_popularity_options` (
`option_name` varchar(50) NOT NULL,
`option_value` varchar(50) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
NOTE that the three tables created wp_ak_404_log, wp_ak_popularity and wp_ak_popularity_options have to be changed to the correct prefix. Default prefix is wp_
Have Fun!