IPB 3 to vBulletin and cleaner.php
Collapse
X
-
Thank you very much, I ran into this problem again.. It's a bit sad it's been 4 years since this was posted yet impex still has this issue...Last edited by Loco.M; Fri 17 Oct '14, 12:27pm. -
We are doing a conversion of IPB3 to vB4 and saw this same issue with quotes. Looking at the code inside of impex/systems/ipb3/007.php line 229 there is a handling for the extended quote tags.
Code:preg_match('#\[[b][/b]quote name=\'(.*)\' date=\'(.*)\' post=\'(.*)\'(.*)\](.*)\[/quote\]#siU', $text, $matches); if ($matches[3]) { $new_id = $this->get_vb_post_id($Db_target, $target_database_type, $target_table_prefix, $matches[3]); $text = str_replace($matches[0], "[[b][/b]QUOTE=" . $matches[1] . ";{$new_id}]" . trim($matches[5]) . "[/QUOTE]", $text); } else { return $text; }
I ended up hacking cleaner.php to work with that though. I created a replacement for ' to '. Then I added two lines to the replacement:
Code:$replacer = array( "&[b][/b]#39;" => "'", "" => "", "" => "", "" => "", "" => "" ); .......... # Posts if($do_posts) { $posts = $Db_target->query("SELECT postid, pagetext, title FROM " . $targettableprefix . "post"); while ($post = $Db_target->fetch_array($posts)) { $text = str_replace(array_keys($replacer), $replacer, $post['pagetext']); $title_text = str_replace(array_keys($replacer), $replacer, $post['title']); // Custom Hack to parse quotes preg_match('#\[quote name=\'(.*)\' date=\'(.*)\' post=\'(.*)\'(.*)\](.*)\[/quote\]#siU', $text, $matches); $text = str_replace($matches[0], "[[b][/b]QUOTE=" . $matches[1] . "]" . trim($matches[5]) . "[/QUOTE]", $text);
IMO this would be a bug in how vB Impex handles the html entities.👍 1 -
bump?
I'm running into this problem too on an IPB 3 to vBulletin 4 importLeave a comment:
-
IPB 3 to vBulletin and cleaner.php
I'm converting from ipb to vb. Actually i have one problem with quotes, i would convert this:
[quote name='Rondell' date='11 settembre 2010 - 20:35' timestamp='1284233712&' post='85500']
[quote =Rondell]
PHP Code:// BACK UP YOUR DATABASE
$replacer = array(
"/[quote name='(.*)' date='(.*)' timestamp='(.*)' post='(.*)']" => "[quote=$1]",
"" => "",
"" => "",
"" => "",
"" => ""
);
Tags: None
widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
Leave a comment: