Resource icon

vBulletin Big Board Importer [vBulletin 3 + vBulletin 4] [Paid] 1.5.0

No permission to buy ($150.00)
@CreationNation

The member count in XF excludes banned and invalid (moderation or email confirmation) users. vB counts them differently.

The difference in thread count might be due to the thread statuses (deleted, moderated, redirects).

You can probably ignore the difference. If you want to try to reconcile it then I can take a look if you give me access to both databases.
 
I'm thinking you are right. After running on cache rebuilds they got much closer, close enough that I'm more comfortable on the numbers. Appreciate the offer (and would have done it were I more nervous about it).

New numbers after all caches rebuilt:

Old:
Threads: 879,370, Posts: 9,248,333, Members: 145,219

New:
Discussions: 880,222, Messages: 9,286,246, Members: 142,090
 
Have you guys ever encountered a sub forum from VB (I'm looking at it on my old server right now) - somehow being converted into a category on the XF side after export/import?

Any idea what could cause that, or if it is fixable?

FOLLOWUP:
I'm looking directly inside the database. I see the posts for the old subforum in there, I see the thread, and then when I look at the node_id, it does indeed say it is a "category" in here. No idea how this happened though. I don't want to mess with anything until I hear back from some of you gurus!

I know I have read they are "different" (category vs. forum etc.?) and "can't be changed" unless I am thinking of something else. Any guidance appreciated.

I did just find this: https://xenforo.com/community/resources/tinhte-node-converter-forum-category.3716/
 
Last edited:
I was running into a lot of trouble converting youtube links so I tried the addon above, worked perfectly!

@Jake Bunce @Slavik @digitalpoint if any of you guys are wiz'z at redirecting links, my last major hurdle on my site conversion is that my old links don't seem to be forwarding to my new locations. I'm starting to enter panic mode :(

I went from VB 3.8.x to latest XF.


Old format:
http://www.ultimatemetal.com/forum/old-school-metal-discussion-152/
http://www.ultimatemetal.com/forum/.../988066-king-diamond-fans-check-out-them.html

New format:
http://www.ultimatemetal.com/forum/forums/old-school-metal-discussion/
http://www.ultimatemetal.com/forum/threads/king-diamond-fans-check-out-them.988066/

I took advantage of the URL portions for my nodes in XF which is why there's no ID on my new URL. Was also playing with (and want to do more) routing in some nodes, if that will matter.

I'm stumped on this one. Any help/guidance/"willing to pay" work is appreciated before I start getting dinged by google, plus I have a ton of internal links all dead right now.

My current htaccess (standard XF and just added the lower portion per the xfseo tool, uncommented rewritebase):
Code:
ErrorDocument 401 default
ErrorDocument 403 default
ErrorDocument 404 default
ErrorDocument 405 default
ErrorDocument 406 default
ErrorDocument 500 default
ErrorDocument 501 default
ErrorDocument 503 default

<IfModule mod_rewrite.c>
    RewriteEngine On

    #    If you are having problems with the rewrite rules, remove the "#" from the
    #    line that begins "RewriteBase" below. You will also have to change the path
    #    of the rewrite to reflect the path to your XenForo installation.
    RewriteBase /forum

    #    This line may be needed to enable WebDAV editing with PHP as a CGI.
    #RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -l [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [NC,L]
    RewriteRule ^(data/|js/|styles/|install/|favicon\.ico|crossdomain\.xml|robots\.txt) - [NC,L]
    RewriteRule ^.*$ index.php [NC,L]

    RewriteRule [^/]+/([\d]+)-.+-([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
    RewriteRule [^/]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]
    RewriteRule [^/]+-([\d]+)/index([\d]+).html forumdisplay.php?f=$1&page=$2 [NC,L]
    RewriteRule [^/]+-([\d]+)/ forumdisplay.php?f=$1 [NC,L]

</IfModule>

Current 301config file per Kier's redirection scripts:

$fileDir = '/home/my/site/path/public_html/forum';

I didn't do anything with the import_log_x setting as I've done nothing (knowingly) with that.



I just discovered that a couple formats ARE working, not sure what that means though:

http://www.ultimatemetal.com/forum/andy-sneap/258421-eq-rhythm-guitars-mixdown.html
...worked! Resolved to:
http://www.ultimatemetal.com/forum/threads/eq-on-rhythm-guitars-in-mixdown.258421/

http://www.ultimatemetal.com/forum/andy-sneap/488999-collective-questions-mr-sneap-thread.html
...worked! Resolved to:
http://www.ultimatemetal.com/forum/threads/collective-questions-for-mr-sneap-thread.488999/
 
Last edited:
Has anyone encountered a problem with threads moved from one forum to another? I have an extremely long thread (more than 100.000 posts) that was moved from one forum to another at some point in time. The original location lists the thread with NEW, different thread_id and paging beings visible (40% of pages listed, up to the point of transfer), but the posts are not visible, pages are empty. The node it was moved to shows the original thread_id, 60% of pages it should and posts are visible.
 
Has anyone encountered a problem with threads moved from one forum to another? I have an extremely long thread (more than 100.000 posts) that was moved from one forum to another at some point in time. The original location lists the thread with NEW, different thread_id and paging beings visible (40% of pages listed, up to the point of transfer), but the posts are not visible, pages are empty. The node it was moved to shows the original thread_id, 60% of pages it should and posts are visible.
not sure if same as https://xenforo.com/community/threa...-3-vbulletin-4-paid.52796/page-47#post-949559 and subsequent 4-5 reply posts ?
 
@eva2000 - thank you! The mechanism is the same, but I actually want to retain these moved threads. In xenforo they are defined differently - For the redicrect threads xf_thread discussion-type is set to redirect, and xf_thread_redirect contains the data, including the URL:
Code:
   thread_id: 82436
  target_url: temat/pomoc-jak-wstawic-fotki-suwaczki-avantar.21953/
redirect_key: thread-21953-277-
 expiry_date: 0
Any idea how to fill the data during the export/import? Or if the url is needed?
 
I'm working on a solution - I export the data for xf_thread_redirect without urls, then update after import by going through each record and using the following code:
Code:
        $threadId = $row[0];
        XenForo_Link::useFriendlyUrls(true);
        XenForo_Link::romanizeTitles(true); 
        $thread = XenForo_Model::create('XenForo_Model_Thread')->getThreadById($threadId);
        $targetThread = explode('-',$row[2]);
        $targetThreadId = $targetThread[1];
        $title = $thread['title'];
        $url = XenForo_Link::buildPublicLink('threads',array('thread_id' => $targetThreadId, 'title' => $title));
        $db->query('UPDATE xf_thread_redirect SET target_url = "' . $url . '" WHERE thread_id = ' . $threadId);
It isn't pretty, but it seems to work on the table itself. Tomorrow I'll test the import.
 
If anyone else ever needs to transfer thread redirects (moved threads), here's what I did:
Export:
1. main threads() export query changed to properly mark threads as redirects, and to get a proper number of posts, views, lastposter and lastpostid from the original thread. I don't know if these values are updated later on by xenforo, but in my case I've had multiple super long threads, and xenforo, unlike VB, was only showing small part of pages under the thread title.

Code:
exec('mysql -h' . $this->slaveDbHost . ' ' . $this->sourceDb . ' ' . $this->sourceDBuser . ' ' . $this->sourceDBpassword . ' -N -q -e "SET NAMES binary; SELECT thread.threadid AS thread_id, thread.forumid AS node_id, REPLACE(REPLACE(REPLACE(REPLACE(thread.title, \'&amp;\', \'&\'), \'&lt;\', \'<\'), \'&gt;\', \'>\'), \'&quot;\', \'\\"\') AS title, IF(thread.open = 10, (SELECT ' . self::$tablePrefix . 'thread.replycount from ' . self::$tablePrefix . 'thread where threadid=thread.pollid), thread.replycount) AS reply_count, IF(thread.open = 10, (SELECT ' . self::$tablePrefix . 'thread.views from ' . self::$tablePrefix . 'thread where threadid=thread.pollid), thread.views) AS view_count, thread.postuserid AS user_id, thread.postusername AS username, thread.dateline AS post_date, thread.sticky, IF(thread.visible = 0, \'moderated\', IF(thread.visible = 2, \'deleted\', \'visible\')) AS discussion_state, IF(thread.open > 0, 1, 0)  AS disussion_open, IF(thread.pollid > 0 AND thread.open != 10, \'poll\', IF(thread.open = 10, \'redirect\', \'\')) AS discussion_type, thread.firstpostid AS first_post_id, (SELECT COUNT(*) FROM ' . self::$tablePrefix . 'reputation as reputation WHERE reputation.postid = thread.firstpostid AND (reputation > 0 OR (reason = \'\' AND reputation = 0))) AS first_post_likes, IF(thread.open = 10, (SELECT ' . self::$tablePrefix . 'thread.lastpost from ' . self::$tablePrefix . 'thread where threadid=thread.pollid), thread.lastpost) AS last_post_date, IF(thread.open = 10, (SELECT ' . self::$tablePrefix . 'thread.lastpostid from ' . self::$tablePrefix . 'thread where threadid=thread.pollid), thread.lastpostid) AS last_post_id,  ' . (self::$isVB4 ? 'IF(thread.open = 10, (SELECT ' . self::$tablePrefix . 'thread.lastposterid from ' . self::$tablePrefix . 'thread where threadid=thread.pollid), thread.lastposterid)' : "'0'") . 'AS last_post_user_id, IF(thread.open = 10, (SELECT ' . self::$tablePrefix . 'thread.lastposter from ' . self::$tablePrefix . 'thread where threadid=thread.pollid), thread.lastposter) AS last_post_username, \'0\' AS prefix_id FROM ' . self::$tablePrefix . 'thread as thread ORDER BY thread.threadid" | ' . self::$sedCommand . ' -r \'s/\&\#[0-9]*?\;//ig\' ' . self::$extraOutCommand . ' > ' . self::$dataDir . 'xf_thread.txt');

2. additional export of a xf_thread_redirect but without urls:

Code:
        //redirected threads
        $start = microtime(true);
        echo "          redirected threads";
        exec('mysql -h' . $this->slaveDbHost . ' ' . $this->sourceDb . ' ' . $this->sourceDBuser . ' ' . $this->sourceDBpassword . ' -N -q -e "SET NAMES binary; select thread.threadid as threadid, \'\' as url, CONCAT(\'thread-\',thread.pollid,\'-\',thread.forumid) as redirect_key, 0 as expiry_date  from ' . self::$tablePrefix . 'thread as thread where thread.open = 10 order by thread.threadid" '  . self::$extraOutCommand . ' > ' . self::$dataDir .  'xf_thread_redirect.txt');
        echo " (" . number_format(intval(shell_exec('wc -l ' . self::$dataDir . 'xf_thread_redirect.txt'))) . ' records in ' .  number_format(microtime(true) - $start, 2) . "s)...\r\n";

Import part:
3. add the table to import:
Code:
importTable('xf_thread_redirect');
4. Somewhere in the cleanup part:
Code:
// thread redirects urls
if ($queryResult = $db->getConnection()->query("
        SELECT * from xf_thread_redirect;"
))
{  

    XenForo_Link::useFriendlyUrls(true);
    XenForo_Link::romanizeTitles(true);
    while ($row = $queryResult->fetch_row())
    {
        $threadId = $row[0];
        XenForo_Link::useFriendlyUrls(true);
        XenForo_Link::romanizeTitles(true);
        $thread = XenForo_Model::create('XenForo_Model_Thread')->getThreadById($threadId);
        $targetThread = explode('-',$row[2]);
        $targetThreadId = $targetThread[1];
        $title = $thread['title'];
        $url = XenForo_Link::buildPublicLink('threads',array('thread_id' => $targetThreadId, 'title' => $title));
        $db->query('UPDATE xf_thread_redirect SET target_url = "' . $url . '" WHERE thread_id = ' . $threadId);                          
    }  
    $queryResult->close();
}
echo "\r\n   thread redirects done, total time: " . number_format(microtime(true) - $startTime, 2) . "s)...\r\n";

The last part assumes you are using "friendly urls". I don't know how to retrieve these values properly from the board configuration. You may want to tweak it.

I am working on vbulletin 4.2.3 and xenforo 1.5.3. YMMV.
 
Much of the media on my forums is within [video] and bbcodes. Included within those tags is a multitude of access urls for the media. I wanted to transfer the code before forum import and came up with a collection of regex expressions for the sed to use in _getReplaceBBCodeCommand() function. Hope these help anyone with similar embedded media content.

Youtube
Code:
s/\[((video.*?|url)\]|url=).*?youtu.*?(\.be\/|v\/|v=|embed\/|\/u\/.*?\/)([-_[:alnum:]]{11}).*?\[\/(video|url)\]/\[media=youtube\]\4\[\/media\]/ig

Facebook
Code:
s/\[((video.*?|url)\]|url=).*?(facebook)\.com.*?(photo\.php\?v=|video\.php\?v=|videos\/)([[:digit:]]+).*?\[\/(video|url)\]/\[media=\3\]\5\[\/media\]/ig

Vimeo
Code:
s/\[((video.*?|url)\]|url=).*?(vimeo)\.com\/(video\/)?([[:digit:]]+).*?\[\/(video|url)\]/\[media=\3\]\5\[\/media\]/ig

Dailymotion and Metacafe
Code:
s/\[((video.*?|url)\]|url=).*?(metacafe|dailymotion).*?\/(watch|video)\/([[:alnum:]]+)[_\/].*?\[\/(video|url)\]/\[media=\3\]\5\[\/media\]/ig
 
2) Any idea why signatures are not being imported/exported right? It says NULL for whichever member not having a signature...
Users who don't have Occupation, Location or Signature in the vbulletin installation, after the import is showing NULL.

Is there a query that i can fire which would replace NULL with ("") in vbulletin so they come up empty after the import? Many thanks. @digitalpoint
I have this issue also.
Any advice for this?
Thanks!

Edit fixed:
UPDATE xf_user_profile SET signature = REPLACE(signature,'NULL','');
 
I'm working on an export,... Posts, threads, and other stuff seems fine, but users throws an exception:

Code:
 Make Selection [1-9]: 2

exporting users...
          user & user authenticate[root@xxxx]
 
I'm working on an export,... Posts, threads, and other stuff seems fine, but users throws an exception:

Code:
 Make Selection [1-9]: 2

exporting users...
          user & user authenticate[root@xxxx]

Is there a specific error message? Also check the log in XenForo:

Admin CP -> Tools -> Server Error Log
 
I'm getting this on Users:

user account confirmation IPs
An exception occurred: Undefined offset: 5138 in /xxx/html/forums/Export.php on line 416
#0 /var/www/html/forums/Export.php(416): XenForo_Application::handlePhpError(8, 'Undefined offse...', '/xxx/html/f...', 416, Array)
#1 /xxx/html/forums/Export.php(1974): DigitalPointExporter->users()
#2 {main}
(49,852 records in 1.11s)...

We have 272k users.
 
I'm getting this on Users:

user account confirmation IPs
An exception occurred: Undefined offset: 5138 in /xxx/html/forums/Export.php on line 416
#0 /var/www/html/forums/Export.php(416): XenForo_Application::handlePhpError(8, 'Undefined offse...', '/xxx/html/f...', 416, Array)
#1 /xxx/html/forums/Export.php(1974): DigitalPointExporter->users()
#2 {main}
(49,852 records in 1.11s)...

We have 272k users.

You havent mapped that usergroup.
 
I double checked the mapping, and searched the database. There is no 5138 in there. After double checking the mapping, I get this now:

An exception occurred: Undefined offset: 72 in /var/www/html/forums/Export.php on line 344

Is this script just mapping the primary usergroup, or additional usergroups
 
Back
Top Bottom