Dragonfly CMS v9 ⇒ CPG-BB (forum) ⇒ Convert ForumsPro to CPG-BB DF v9.2.1 ⇒ Community Forums ⇒ CPG Dragonfly™ CMS
Forum Index Modules & Blocks CPG-BB (forum)

Convert ForumsPro to CPG-BB DF v9.2.1 Reply to topic


There was a topic here describing how to convert ForumsPro to the standard DF 9.2.1 CPG-BB forums.
dragonflycms.org/Forum.../p=146701/

For some reason, it is now deleted and I would like the information again.
I would have saved it if I thought it was going to be deleted.

EDIT: I expanded upon the linked topic and wrote my own guide below, enjoy!

Please enter your server specs in your user profile! 😢

Last edited by zanix on Sun Mar 29, 2009 12:25 pm; edited 1 time in total


Looks like the post is back up

Please enter your server specs in your user profile! 😢


I have just experienced the most wonderful time in converting ForumsPro back to CPG-BB Forums.
And I would like to share this experience with anyone that happens to stumble on this topic.

This conversion was written for ForumsPro 2.0.0.1 and DragonFly 9.2.1
So if you get errors about missing tables or colums or whatnot because you didn't have FPro 2.0.0.1 and/or DF 9.2.1, I'm sorry...you should pay more attention when modifying a database (and hope you made a backup)


And yes, and do make a backup of your database, or bad things may happen.


First, drop all of the CPG-BB tables except cms_bbsearch_wordlist and cms_bbsearch_wordmatch.

DROP TABLE cms_bbattachments, cms_bbattachments_desc, cms_bbauth_access, cms_bbcategories, cms_bbforums, cms_bbposts, cms_bbposts_text, cms_bbtopics, cms_bbtopics_watch, cms_bbvote_desc, cms_bbvote_results, cms_bbvote_voters;



Then, rename all the ForumsPro equivalents from ForumsPro to CPG-BB:

RENAME TABLE cms_fpro_attachments TO cms_bbattachments; RENAME TABLE cms_fpro_auth_access TO cms_bbauth_access; RENAME TABLE cms_fpro_categories TO cms_bbcategories; RENAME TABLE cms_fpro_forums TO cms_bbforums; RENAME TABLE cms_fpro_posts TO cms_bbposts; RENAME TABLE cms_fpro_posts_text TO cms_bbposts_text; RENAME TABLE cms_fpro_topics TO cms_bbtopics; RENAME TABLE cms_fpro_topics_watch TO cms_bbtopics_watch; RENAME TABLE cms_fpro_vote_desc TO cms_bbvote_desc; RENAME TABLE cms_fpro_vote_results TO cms_bbvote_results; RENAME TABLE cms_fpro_vote_voters TO cms_bbvote_voters;



Now to rebuild the attachments_desc table

CREATE TABLE `cms_bbattachments_desc` ( `attach_id` int(10) unsigned NOT NULL auto_increment , `physical_filename` varchar(255) NOT NULL default '', `real_filename` varchar(255) NOT NULL default '', `download_count` int(11) NOT NULL default '0', `comment` varchar(255) default '', `extension` varchar(100) default '', `mimetype` varchar(100) default '', `filesize` int(11) NOT NULL default '0', `filetime` int(11) NOT NULL default '0', `thumbnail` tinyint(4) NOT NULL default '0', `post_id` int(11) NOT NULL default '0', `user_id` int(11) NOT NULL default '0', PRIMARY KEY (`attach_id`) , UNIQUE KEY `attach_id` (`attach_id`) , KEY `filetime` (`filetime`) , KEY `physical_filename` (`physical_filename`) , KEY `filesize` (`filesize`) , KEY `attach_id_post_id` (`attach_id`,`post_id`) ) ENGINE = MyISAM DEFAULT CHARSET = utf8; INSERT INTO `cms_bbattachments_desc` SELECT * FROM `cms_bbattachments`;


Modify the `cms_bbattachments` table

Drop the duplicate columns
ALTER TABLE `cms_bbattachments` DROP `physical_filename`, DROP `real_filename`, DROP `download_count`, DROP `comment`, DROP `extension`, DROP `mimetype`, DROP `filesize`, DROP `filetime`, DROP `thumbnail`;

Alter the table
ALTER TABLE `cms_bbattachments` CHANGE `attach_id` `attach_id` MEDIUMINT(9) NOT NULL DEFAULT '0', CHANGE `post_id` `post_id` MEDIUMINT(9) NOT NULL DEFAULT '0', CHANGE `user_id` `user_id_1` MEDIUMINT(9) NOT NULL DEFAULT '0';

Add missing columns
ALTER TABLE `cms_bbattachments` ADD `privmsgs_id` MEDIUMINT(9) NOT NULL DEFAULT '0' AFTER `post_id`; ADD `user_id_2` MEDIUMINT(9) NOT NULL DEFAULT '0' AFTER `user_id_1` ;

Alter Indexes
ALTER TABLE `cms_bbattachments` DROP PRIMARY KEY; ALTER TABLE `cms_bbattachments` DROP INDEX `attach_id`; ALTER TABLE `cms_bbattachments` ADD INDEX `attach_id_privmsgs_id` (`attach_id`,`privmsgs_id`);


Modify the `cms_bbattachments_desc` table

Remove duplicate columns
ALTER TABLE `cms_bbattachments_desc` DROP `post_id`, DROP `user_id`;

Modify columns
ALTER TABLE `cms_bbattachments_desc` CHANGE `download_count` `download_count` MEDIUMINT(9) NOT NULL DEFAULT '0';

Modify Indexes
ALTER TABLE `cms_bbattachments_desc` DROP INDEX `attach_id`; ALTER TABLE `cms_bbattachments_desc` DROP INDEX `attach_id_post_id`;


Modify the `cms_bbauth_access` table

Remove extra columns
ALTER TABLE `cms_bbauth_access` DROP `auth_report`, DROP `auth_thank`;


Modify the `cms_bbcategories` table
ALTER TABLE `cms_bbcategories` DROP INDEX `cat_id`;


Modify the `cms_bbforums` table
ALTER TABLE `cms_bbforums` DROP `auth_report`, DROP `forum_link_icon`, DROP `required_posts`, DROP `rss_enable`, DROP `required_posts_attach`, DROP `auth_thank`;

ALTER TABLE `cms_bbforums` CHANGE `forum_status` `forum_status` TINYINT(4) NOT NULL DEFAULT '0', CHANGE `prune_enable` `prune_enable` TINYINT(1) NOT NULL DEFAULT '1';

Modify Indexes
ALTER TABLE `cms_bbforums` DROP INDEX `forum_id`;

Set `parent_id` to 0
UPDATE `cms_bbforums` SET `parent_id` = 0;


Modify the `cms_bbposts` table
ALTER TABLE `cms_bbposts` DROP `post_edit_user_id`; ALTER TABLE `cms_bbposts` CHANGE `poster_ip` `poster_ip` VARBINARY(17) NULL; ALTER TABLE `cms_bbposts` DROP INDEX `post_id`;


Modify the `cms_bbtopics` table

Remove extra columns
ALTER TABLE `cms_bbtopics` DROP `topic_description`, DROP `topic_descmod`;

Modify columns
ALTER TABLE `cms_bbtopics` CHANGE `topic_status` `topic_status` TINYINT( 4 ) NOT NULL DEFAULT '0', CHANGE `topic_vote` `topic_vote` TINYINT( 1 ) NOT NULL DEFAULT '0', CHANGE `topic_attachment` `topic_attachment` TINYINT( 1 ) NOT NULL DEFAULT '0'

Modify Indexes
ALTER TABLE `cms_bbtopics` DROP INDEX `topic_id`; ALTER TABLE `cms_bbtopics` DROP INDEX `topic_title`;


Modify the `cms_bbtopics_watch` table
ALTER TABLE `cms_bbtopics_watch` CHANGE `user_id` `user_id` MEDIUMINT(9) NOT NULL DEFAULT '0';


Modify the `cms_bbvote_desc` table
ALTER TABLE `cms_bbvote_desc` DROP INDEX `vote_id`;

Please enter your server specs in your user profile! 😢


You do realize that your old cms_bbsearch_wordlist and cms_bbsearch_wordmatch tables will not reflect the subsequent topics/posts posted under ForumsPro?

You will need to empty (backup first) those tables and reconstruct them - covered in another sticky topic.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Oh yeah, I did forget about the script to rebuild the search lists

Thanks for reminding me

Please enter your server specs in your user profile! 😢


Would there be much alteration needed to get this to work with FP 2.03 and the current (forms plus) 9.3.3.0 ?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
2.6.18-164.11.1.el5xen/2.2.13/5.0.89-community-log/5.2.11/9.3.3.0


There are plans to create a module "downgrade" option and code traces can already be found in v10.
Potentially will become, a "convert" only option.

To answer your question.
There are more steps now then before, and more time pass, more modifications will be needed.

I'll suggest you two things:
1. Unless you receive good instruction by someone, try all known steps into a backup site and drop two lines here if you get stuck.
2. Wait for the commodity to show up, then go straight to v10.

.:: I met php the 03 December 2003 :: Unforgettable day! ::.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
CloudLinux / Apache 2.4 LSAPI / MySQLi 5.6 / PHP 5.6 / DCVS


Well I'm following the recommendation that we all drop Forums Pro, but ours is six years old, so I will need to convert it all to Forums Plus.

I have a backup site to do it all on first, but I imagine Forums Plus has more, or different tables to the old CPG-BB.

So far I have succesfully upgraded and repaired our DB to 9.3.3.0, still using Forums Pro 2.03. And pruned our DB down to 24Mb.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
2.6.18-164.11.1.el5xen/2.2.13/5.0.89-community-log/5.2.11/9.3.3.0


Well I guess the real question here only Phoenix would know, and that is do these 9.2.1 instructions still fit for the current 9.3.3.0 forums?

I'm ready to do this, but it seems pointless unless we can confirm its correct still. Is it feasible to see if there are any DB changes between 9.2.1 and the current forums at all?

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
2.6.18-164.11.1.el5xen/2.2.13/5.0.89-community-log/5.2.11/9.3.3.0


Ok I have gone ahead as asked and tested the above method on a test site.

A lot of the sql queries failed, but there are the correct amount of forums/posts, and the permission system seems to be working.

Unfortunately no topics are readable, they all fail with the following message.

includes\db\db.php

CMS Warning line 75: On /index.php?name=Forums&file=viewtopic&t=3911 While executing query "SELECT topic_archive_flag FROM cms_bbtopics WHERE topic_id = 3911" the following error occured: Unknown column 'topic_archive_flag' in 'field list' In: C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\modules\Forums\viewtopic.php on line: 111

I have enabled all debugging if anyone wants to take a look.

jw.servegame.org/index...ame=Forums

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
2.6.18-164.11.1.el5xen/2.2.13/5.0.89-community-log/5.2.11/9.3.3.0


By definition it can only work for 9.2.1 - 9.3 changes as below:

dragonflycms.org/Wiki/id=141/

DonationsPro for DragonflyCMS & SMF

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):


Thats a very handy list thanks!!! Big grin

Yeah, I've gathered there were quite a few changes after a frustrating day of trying this. Sad

In the end I've worked out a less destructive method than renaming tables.

I implemented the above changes to the ForumsPro Tables, then exported only the tables I wanted.

Opened the resulting SQL in notepad, and did a replace all with cms_bb replacing cms_fpro.

Then I MT'ed all the same Forums tables, and imported the SQL into them. I make that sound easy, but it was five goes and quite a few hours before I got it fairly right.

Then I run your very nice rebuild script for the search tables, and the result is here.

jw.servegame.org/index...ame=Forums

I've been through and checked all the Forum Settings, cleaned up the DB etc, but haven't really tested it much yet. PHP and CMS warnings are on.

I did get some user id index errors changing Groups, but they seem to have righted themselves now touchwood.

If it survives testing, I will make a new topic for Converting Forums Pro (2.0.1.0 CVS) to Forums 9.3.3.0 tomorrow, and try to step through it for others. Cool

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
2.6.18-164.11.1.el5xen/2.2.13/5.0.89-community-log/5.2.11/9.3.3.0


After a couple more hours testing, its not looking too shabby,
Hopefully this is my last post on ForumsPro.

www.junglewraiths.net/...4443#44443

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
2.6.18-164.11.1.el5xen/2.2.13/5.0.89-community-log/5.2.11/9.3.3.0


While the rebuilding of the attachements tables went well, in that they are all there and searchable, it seems its not quite right somewhere.

admin\modules\forums\admin_attach_cp.php

Notice line 460: Undefined index: search
Notice line 596: Undefined index: start
Notice line 619: Undefined variable: total_attachments


and I'm unsure what this means

cache\tpl_halo_forums#admin#attach_cp_user.html.inc

Notice line 8: Undefined index: U_BACK
Notice line 42: Undefined index: PAGE_NUMBER
Notice line 43: Undefined index: PAGINATION


and weirdly this one from your account

includes\functions\language.php

CMS Notice line 282: There is no language file for module DonationsPro


I say weird because we actually DONT have a DonationsPro module, we do however have treasury.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
2.6.18-164.11.1.el5xen/2.2.13/5.0.89-community-log/5.2.11/9.3.3.0


i did this instructions for ForumsPro 2.0.3 and DragonFly 9.2.1.
It works for me. Thanks for the help.

NOTE: this topic should be sticky.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):
OS Linux/MySQL 5.0.51a-log/PHP 4.4.8/CMS 9.2.1

All times are UTC


Jump to: