Resource icon

vB4 Importer 3.6b2

No permission to download

speedway

Well-known member
Whoops, someone delete these two posts please (this one and my last above), didn't see BSG's post above.
 

Jake Bunce

XenForo moderator
Staff member

Jake Bunce

XenForo moderator
Staff member
Does this apply to avatars too? Have just tried a test import with this, and whilst some people's avatars worked correctly, most didn't and were lost in the import... :( Saying that, it didnt ask for any alternate path other than the standard one... unless i have to specify somewhere else these may be stored...

Also noticed that it wouldn't import likes - i'm guessing that's because a relatively stock vb4 doesnt have likes (i have a 3rd party likes system installed, and i'm not expecting it to pick these up!)..
Yes it will ask for an avatar path if appropriate.

What kind of likes exactly? What is the name of the table in the database?

Two possibles:

http://xenforo.com/community/threads/vb4-importer.36391/page-2#post-459580
http://xenforo.com/community/threads/importing-from-vb4-with-vbseo-to-latest-xen.46663/#post-503889
 

speedway

Well-known member
Ok, heres a question - I just imported my data into a new DB with this addon and while it took a while most things went well. However, I don't really understand why I cannot see any Reported items (yes I have all the permissions to do so - double checked that) when I click on Reported Items yet there are entries in xf_report and xf_report_comment. All of the records in xf_report indicate they are "open" hence my confusion.

Anyone care to explain how this might be possible?

Der me, was looking at the wrong database on my local server - embarrassing!

Cheers
 

notus

Member
Hi, I've run the importer and all appears well, except, I cannot see forums/threads that had user group specific permissions applied to them on vbulletin and changing permissions for them manually in the admin panel on xenforo (admin panel seems to show permissions as they were on vbulletin as well as the forums) seems to do nothing to resolve the issue. I can see forums and content that was viewable by non members in vbulletin. I've also rebuilt information after the import but to no avail. It's likely I'm missing something obvious but I can't seem to work it out.
 

Jake Bunce

XenForo moderator
Staff member
Hi, I've run the importer and all appears well, except, I cannot see forums/threads that had user group specific permissions applied to them on vbulletin and changing permissions for them manually in the admin panel on xenforo (admin panel seems to show permissions as they were on vbulletin as well as the forums) seems to do nothing to resolve the issue. I can see forums and content that was viewable by non members in vbulletin. I've also rebuilt information after the import but to no avail. It's likely I'm missing something obvious but I can't seem to work it out.
Permissions are imported, but the permission systems are different such that the end result can be different. Review your node permissions.

http://xenforo.com/community/resources/understanding-permissions.360/

You probably had this in vB:

Inherited Yes + Explicit No = Overall Yes

...which imported as this:

Inherited Allow + Revoke = Overall No
 

theRKF

Member
Hi - long time vB user, brand new XenForo convert.

I just ran a test import last night from our vB 4.2 site and everything went smoothly until I got to the Import Post Thanks step. At this point I get a PHP error:
Code:
PHP Fatal error:  Call to undefined method XenForo_Model_Import::importPostThanks() in /home/xxxxxxxx/public_html/community/library/XenForo/Importer/myvbulletin4.php on line 309
We're using Abe1's Post Thank You Hack on vB. I've read a bit about importing Thanks as Likes from links earlier in this thread, but they seem a bit dated, and I don't think they address this particular issue. Any suggestions would be greatly appreciated!
 

Jake Bunce

XenForo moderator
Staff member
Hi - long time vB user, brand new XenForo convert.

I just ran a test import last night from our vB 4.2 site and everything went smoothly until I got to the Import Post Thanks step. At this point I get a PHP error:
Code:
PHP Fatal error:  Call to undefined method XenForo_Model_Import::importPostThanks() in /home/xxxxxxxx/public_html/community/library/XenForo/Importer/myvbulletin4.php on line 309
We're using Abe1's Post Thank You Hack on vB. I've read a bit about importing Thanks as Likes from links earlier in this thread, but they seem a bit dated, and I don't think they address this particular issue. Any suggestions would be greatly appreciated!
You need to install the addon-vb4ToXf11.xml file through your Admin CP as an addon. That, in addition to the files you uploaded for this importer, will enable the "post thanks" module.
 

Paul

Well-known member
I did an import recently that had a dbtech_thanks_entry table. I modified this step in the myvbulletin4.php file to import from that table. Copy/paste this step into that file, replacing the existing function of the same name:

Code:
    public function stepPostThanks($start, array $options)
    {
        $options = array_merge(array(
            'limit' => 200,
            'max' => false
        ), $options);
 
        $sDb = $this->_sourceDb;
        $prefix = $this->_prefix;
 
        /* @var $model PostThanksImporter_Model_Import */
        $model = $this->_importModel;
     
        if ($options['max'] === false)
        {
            $options['max'] = $sDb->fetchOne('
                SELECT MAX(entryid)
                FROM ' . $prefix . 'dbtech_thanks_entry
            ');
        }
 
        $postThanks = $sDb->fetchAll($sDb->limit(
            '
                SELECT pt.*, post.userid as content_userid
                FROM ' . $prefix . 'dbtech_thanks_entry AS pt
                LEFT JOIN ' . $prefix . 'post AS post ON (post.postid = pt.contentid)
                WHERE pt.entryid > ?
                ORDER BY pt.entryid
            ', $options['limit']
        ), $start);
        if (!$postThanks)
        {
            return true;
        }
 
        $next = 0;
        $total = 0;
 
        $userIds = array();
        $postIds = array();
        foreach ($postThanks AS $thanks)
        {
            $userIds[] = $thanks['userid'];
            $userIds[] = $thanks['content_userid'];
            $postIds[] = $thanks['contentid'];
        }
        $userIdMap = $model->getImportContentMap('user', $userIds);
        $postIdMap = $model->getImportContentMap('post', $postIds);
        XenForo_Db::beginTransaction();
 
        foreach ($postThanks AS $thanks)
        {
            $next = $thanks['entryid'];
 
            $likeUserId = $this->_mapLookUp($userIdMap, $thanks['userid']);
            $contentUserId = $this->_mapLookUp($userIdMap, $thanks['content_userid']);
            $postId = $this->_mapLookUp($postIdMap, $thanks['contentid']);
            if (!$likeUserId OR !$contentUserId OR !$postId)
            {
                continue;
            }
         
            $model->importPostThanks($postId, $contentUserId, $likeUserId, $thanks['dateline']);
            $total++;
        }
 
 
        XenForo_Db::commit();
 
        $this->_session->incrementStepImportTotal($total);
     
        // 1.0.0 Beta 2 introduces percentage progress format
        if (XenForo_Application::$versionId > 1000031)
        {
            return array($next, $options, $this->_getProgressOutput($next, $options['max']));
        }
        else
        {
            return array($next, $options, "$next / $options[max]");
        }
    }
Jake,

Sorry to drag this up, however does this just import thanks, or likes as well from the same add-on??? Supposed to be migrating back from vB to xF in the morning, and just realised this seems to do thanks only. Most users on my board seem to use "likes" more than thanks... :(

Drat!!

Cheers
Paul
 

Jake Bunce

XenForo moderator
Staff member
Jake,

Sorry to drag this up, however does this just import thanks, or likes as well from the same add-on??? Supposed to be migrating back from vB to xF in the morning, and just realised this seems to do thanks only. Most users on my board seem to use "likes" more than thanks... :(

Drat!!

Cheers
Paul
What is the name of your likes table?
 

Code Monkey

Well-known member
I did a test import and it went fairly smooth. I notice a few members had other members avatars though. Not a big issue since they can change them if they wish.

The question I have is this. When I do my final before live import can I import forums and usergroups first so I can check permissions and such, and then import users and posts?
 

Jake Bunce

XenForo moderator
Staff member
When I do my final before live import can I import forums and usergroups first so I can check permissions and such, and then import users and posts?
Maybe. I haven't tried this. You can try running up to that module and then close the import. Then revisit it later. It will resume where it left off.
 

dono

Member
I successfully convert 16 millions post in test/UAT server, whe you go to the sub forum, you can click and read the post or select the thread, but from forum index, I cannot got to each post

its going to urlforum/index.php?posts/0/

anything I miss or I need to do ?

Thanks
 

Jake Bunce

XenForo moderator
Staff member
I successfully convert 16 millions post in test/UAT server, whe you go to the sub forum, you can click and read the post or select the thread, but from forum index, I cannot got to each post

its going to urlforum/index.php?posts/0/

anything I miss or I need to do ?

Thanks
Rebuild the caches:

Admin CP -> Tools -> Rebuild Caches

This is done automatically at the end of an import (except the search index) unless the process is interrupted. But you can run them manually.
 

dono

Member
I am technical person, how do I run manually ? I think got interrupted. Any query I can run in the background for fix that ?

Thanks
 
Top