PEAK XOOPS - CBB (3.08) --> D3forum .81(current) in englishin japanese

CBB (3.08) --> D3forum .81(current)

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum
Previous post - Next post | Parent - Children.1 .2 .3 .4 | Posted on 2008/2/11 7:21
MrTheme  企霹始   Posts: 8
Hello GiJoe

I am trying to nail down the converter for cbb3 to your forum module.

However. I have ran into a few snags and cannot seem to find a solution.

function d3forum_import_from_cbb( $mydirname , $import_mid )
{
	$db =& Database::getInstance() ;
	$from_prefix = 'bb' ;

	// get group_ids
	$group_handler =& xoops_gethandler( 'group' ) ;
	$group_objects =& $group_handler->getObjects() ;
	$group_ids = array() ;
	foreach( $group_objects as $group_object ) {
		$group_ids[] = $group_object->getVar('groupid') ;
	}

	// categories
	$table_name = 'categories' ;
	$to_table = $db->prefix( $mydirname.'_'.$table_name ) ;
	$from_table = $db->prefix( $from_prefix.'_'.$table_name ) ;
	$db->query( "DELETE FROM `$to_table`" ) ;
	$irs = $db->query( "INSERT INTO `$to_table` (cat_id,cat_title,cat_weight) SELECT cat_id,cat_title,cat_order FROM `$from_table`" ) ;
	if( ! $irs ) d3forum_import_errordie() ;

	// forums
	$table_name = 'forums' ;
	$to_table = $db->prefix( $mydirname.'_'.$table_name ) ;
	$from_table = $db->prefix( $from_prefix.'_'.$table_name ) ;
	$db->query( "DELETE FROM `$to_table`" ) ;
	$irs = $db->query( "INSERT INTO `$to_table` (forum_id,forum_title,forum_desc,forum_weight,cat_id) SELECT forum_id,forum_name,forum_desc,forum_order,cat_id FROM `$from_table`" ) ;
	if( ! $irs ) d3forum_import_errordie() ;

	// topics
	$table_name = 'topics' ;
	$to_table = $db->prefix( $mydirname.'_'.$table_name ) ;
	$from_table = $db->prefix( $from_prefix.'_'.$table_name ) ;
	$db->query( "DELETE FROM `$to_table`" ) ;
	$irs = $db->query( "INSERT INTO `$to_table` (topic_id,topic_title,topic_views,forum_id,topic_locked,topic_sticky,topic_solved,topic_invisible) SELECT topic_id,topic_title,topic_views,forum_id,topic_status,topic_sticky,1,approved FROM `$from_table`" ) ;
	if( ! $irs ) d3forum_import_errordie() ;

	// posts
	$table_name = 'posts' ;
	$to_table = $db->prefix( $mydirname.'_'.$table_name ) ;
	$from_table = $db->prefix( $from_prefix.'_'.$table_name ) ;
	$from_text_table = $db->prefix( $from_prefix.'_'.'posts_text') ;
	$db->query( "DELETE FROM `$to_table`" ) ;
	$irs = $db->query( "INSERT INTO `$to_table` (post_id,pid,topic_id,post_time,modified_time,uid,poster_ip,modifier_ip,subject,html,smiley,xcode,br,number_entity,special_entity,icon,attachsig,invisible,approval,post_text) SELECT p.post_id,pid,topic_id,post_time,post_time,uid,poster_ip,poster_ip,subject,!nohtml,!nosmiley,1,1,1,1,IF(SUBSTRING(icon,5,1),SUBSTRING(icon,5,1),1),attachsig,0,1,pt.post_text FROM `$from_table` p LEFT JOIN `$from_text_table` pt ON p.post_id=pt.post_id" ) ;
	if( ! $irs ) d3forum_import_errordie() ;
}

Works sometimes, not all the time. This will import (only when it feels like it):

Categories
Forums
Topics
Posts

But never posts_text. I took out all of the permission based queries, because the tables don't exist in cbb. So users would need to reset their permissions after import, but the import thing is that we are able to move away from cbb.

I have made the modifications to admin_advanced.php as well so that it knows to execute the d3forum_import_from_cbb.

I am not sure if you have given any more thought to creating a conversion from cbb. If so, that would be fantastic! Many people would highly enjoy moving to d3. If not, is there anything that you can notice from above that may be causing my problem?

Also, why does it only sporadically work?

Thanks for any light you can shed.
Votes:5 Average:8.00
Previous post - Next post | Parent - No child | Posted on 2008/2/11 7:28
MrTheme  企霹始   Posts: 8
Votes:2 Average:10.00
Previous post - Next post | Parent - No child | Posted on 2008/2/23 17:29
GIJOE  黎扦烦菱   Posts: 4110
hi MrTheme.

First, I'm sorry my too late answer.
And it looks quite good to create converter from cbb to d3forum.

But I've never tried CBB at all...
All I know about CBB is that made by phppp and is an old style module with dirname "newbb".

Then, I have to learn how to install it into my environment, for creating the converter.
(I've already removed xoops.org version XOOPS 2.0.x from my environment)

Can CBB run with ImpressCMS?

If it's true, I'll install both ImpressCMS and CBB, and test them.
Votes:1 Average:10.00
Previous post - Next post | Parent - Children.1 .2 | Posted on 2008/2/23 19:28 | Last modified
stranger  惧霹始   Posts: 22
Hi Gijoe,
CBB 3.08 runs with ImpressCMS, no problem with that, but you have to install the Frameworks too...
Votes:1 Average:10.00
Previous post - Next post | Parent - No child | Posted on 2008/2/23 23:42
MrTheme  企霹始   Posts: 8
Also the xoopseditor addons.

TY in advance for anything you can do.
Votes:1 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2008/2/24 6:06 | Last modified
GIJOE  黎扦烦菱   Posts: 4110
hi stranger.

Your information is both required and enough
Thank you!


I've just installed ImpressCMS RC and CBB3.0.
It is not so hard to create the converter.

Try d3forum-0.82.
Don't forget "sync" after importing

# Importing "votes" and "permissions" is not implemented yet, sorry.
----
add a notice. (thx MrTheme)
Votes:1 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2008/2/24 7:15
MrTheme  企霹始   Posts: 8
Thank you very much for your efforts.

Import worked perfectly, needed to do a sync afterwards, but this is understandable.

Thank you again, excellent work!
Votes:1 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2008/2/24 8:07 | Last modified
MrTheme  企霹始   Posts: 8
Small bug.

All topics are imported as invisible, locked, and solved.
Votes:1 Average:10.00
Previous post - Next post | Parent - Children.1 | Posted on 2008/2/24 9:47
GIJOE  黎扦烦菱   Posts: 4110
Thank you for the reporting.

Quote:

All topics are imported as invisible, locked, and solved.
Certainly 'invisible' is a bug.
I've just fixed it.

But, 'locked' looks imported correctly.

And CBB looks without the feature of 'solved', then all topics should be imported as 'solved'.
Votes:4 Average:7.50
Previous post - Next post | Parent - No child | Posted on 2008/2/24 14:46 | Last modified
MrTheme  企霹始   Posts: 8
yep, you are right.

I applied the patched files and redid the import. Went perfectly. Thank you for your time on this.

D3Forum @ Mr. Theme Design http://www.mrtheme.com/modules/boards/
Votes:1 Average:10.00
Previous post - Next post | Parent - No child | Posted on 2008/2/24 14:55
avtx30  惧霹始   Posts: 36
This great news has just been noticed on xoops.org. Thanks GIJOE and MrTheme.

Hello d3forum, goodbye CBB
Votes:2 Average:10.00

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!