Import/mapping of custom MySQL forum tables
I’ve made the decision to develop my new websites using WordPress. My goal is to eventually re-write my PHP code as a WordPress plugin, but, until then I need to use what’s available, and bbPress seems like a good option. I need to import/map my current tables to work with bbPRess, but not sure how?
Here is the existing schema along with one parent record, and one child record:
Forum mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
Forum_Title varchar(200) NOT NULL DEFAULT ”,
Forum_Author varchar(100) NOT NULL DEFAULT ”,
Forum_Author_Email varchar(100) NOT NULL DEFAULT ”,
Forum_Text text NOT NULL,
Forum_Parent mediumint(8) unsigned NOT NULL DEFAULT ‘0’,
Forum_Ancestor mediumint(8) unsigned NOT NULL DEFAULT ‘0’,
Forum_Category smallint(5) unsigned NOT NULL DEFAULT ‘0’,
Forum_Approved enum(‘0′,’1’) NOT NULL DEFAULT ‘1’,
Forum_Entered_by varchar(10) NOT NULL DEFAULT ‘0’,
Forum_Date_Created datetime NOT NULL DEFAULT ‘0000-00-00 00:00:00’,
Forum_Last_Changed timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (Forum),
KEY Forum_Parent (Forum_Parent),
KEY Forum_Category (Forum_Category),
KEY Forum_Approved (Forum_Approved),
FULLTEXT KEY Forum_Title (Forum_Title),
FULLTEXT KEY Forum_Text (Forum_Text)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1;
(19261, ‘Can I rent an RV?’, ‘BillB’, ‘firstname.lastname@example.org’, ‘I\’d like to give RVing a try, but there\’s no way I\’m going to plunk down thousands of $$ to buy an RV. Is it possible to rent an RV like you\’d a car?’, 0, 19261, 1962, ‘1’, ‘rvcn’, ‘2002-12-12 13:52:29’, ‘2002-12-12 13:53:25’);
(19262, ‘Re: Can I rent an RV?’, ‘Mark’, ‘email@example.com’, ‘No problem. Just check your yellow pages for a rental agency in your area. I know there are a few national outfits too. Cruise America and El Monte come to mind off the top of my head.’, 19261, 19261, 1962, ‘1’, ”, ‘2002-12-12 13:59:42’, ‘2002-12-12 13:59:42’);
You’ll notice that there are fields for both parent and ancestor, which allows for infinite sub-topic threads (those replies to replies under one parent). Also, I the author name and email are also stored in this table, and not tied to a separate user table (so will need to address that). Each MySQL dump is between 1MB and 3MB.
Need any more information? Please advise.
My goal is one of two options:
- Import/Map existing table dumps in several websites to WordPress and bbPress using above forum schema as source, OR
- Convert my existing PHP forum code to be compatible with WordPress and forget about bbPress altogether if I can’t easily map the table (I don’t know WordPress enough to even think about doing this myself, even though the code is simple and fast, and will ne advice on someone who can)
I am doing this so I can better control the mobile templates and have a more robust way of controlling my websites. I need to do this for about 6 websites, and would like the method to do this myself after the first time.
Thanks in advance,
- You must be logged in to reply to this topic.