Sprinklino

wp-forum fixed!

So just got the wp-forum plugin fixed, lots of problems with the db.

For starters it doesn’t create the tables you need, so I found the sql script (that cunningly has a .txt suffic) forum_db.txt and ran that directly against my db.

That didn’t work either because I was using a different prefix for my wp tables so I had to change all the wp_forum* table names to myprefix_forum* instead.

The other problem was that the code was referencing a bunch of columns that weren’t created either. I’ve included the actual script you need to run here at which point it all works as expected.

Enjoy!


-- --------------------------------------------------------

--
-- Table structure for table `wp_forum_threads`
--

DROP TABLE IF EXISTS `wp_forum_threads`;
CREATE TABLE IF NOT EXISTS `wp_forum_threads` (
`id` int(11) NOT NULL auto_increment,
`forum_id` int(11) NOT NULL default '0',
`views` int(11) NOT NULL default '0',
`subject` varchar(255) NOT NULL default '',
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`last_post` date NOT NULL default '0000-00-00',
`status` varchar(50) NOT NULL default '',
`starter` varchar(50) NOT NULL default '',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

DROP TABLE IF EXISTS `wp_forum_posts`;
CREATE TABLE IF NOT EXISTS `wp_forum_posts` (
`id` int(11) NOT NULL auto_increment,
`author_name` varchar(255) default NULL,
`author_email` varchar(255) default NULL,
`author_web` varchar(255) default NULL,
`text` longtext,
`thread_id` int(11) NOT NULL default '0',
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`author_id` int(11) NOT NULL default '0',
`subject` varchar(255) NOT NULL default '',
`views` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

DROP TABLE IF EXISTS `wp_forum_forums`;
CREATE TABLE IF NOT EXISTS `wp_forum_forums` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`parent_id` int(11) NOT NULL default '0',
`description` varchar(255) NOT NULL default '',
`views` int(11) NOT NULL default '0',
`sort` int(11) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

DROP TABLE IF EXISTS `wp_forum_groups`;
CREATE TABLE IF NOT EXISTS `wp_forum_groups` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`sort` int(11) default NULL,
`passwd` varchar(20) default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

Leave a Reply