Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
ImpEx Module: Xenforo Details »»
ImpEx Module: Xenforo
Version: 1.0.0, by Andreas Andreas is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 4.1.11 Rating:
Released: 05-17-2012 Last Update: Never Installs: 33
Is in Beta Stage  
No support by the author.

This is a Xenforo module for ImpEx, the vBulletin Import System,
it does allow you to import a Xenforo Database into a vBulletin 4 installation.

Currently, the following data will be imported:
  • Usergroups
  • Users including Avatars
  • Forums
  • Threads including Polls
  • Posts
  • Smilies
  • Attachments
  • Conversations
    As vBulletin does not have an equivalent to the Conversations feature in Xenforo, conversations will be converted to Private Messages in vBulletin.
    Please note that any attachments used in conversations will get lost as vBulletin does not (yet) support attachments in PMs.

This module has been developed for Xenforo 1.0.4, but it should also work with Xenforo 1.1.X.
Please not that Xenforo 1.1.X features (Profile Fields, Thread Prefixes, etc.) are not yet supported.

If there is enough interest I might add those features in a later release.

Warning
This module is BETA and has not been tested extensively - use it at your own risk.
If you find bugs, please report them!

Important - See Post #87 about an important potential security issue and fix if you use this.

Download Now

File Type: zip impex_xenforo.zip (26.8 KB, 692 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #52  
Old 06-13-2012, 07:30 AM
iBaker's Avatar
iBaker iBaker is offline
 
Join Date: Oct 2006
Location: Melbourne, Australia
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am just about to run a test instance however the first thing that is displayed in impex before I even start importing is:
Code:
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at [path]/impex/ImpExFunction.php:522) in [path]/includes/facebook/facebook.php on line 37
Reply With Quote
  #53  
Old 06-13-2012, 09:27 AM
iBaker's Avatar
iBaker iBaker is offline
 
Join Date: Oct 2006
Location: Melbourne, Australia
Posts: 152
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have finished a test run...very test only run to see what problems come up.

1. Firstly there is the error message across the top of the impex page that I posted about just above
2. As far as tables go, it reported 2 tables not found:
xf_identity_service NOT found.
xf_user_identity NOT found.
3. The Attachments path I just could not get right. I tried echoing the path and it showed the correct web address for the internal_data/attachments of the source web site but it failed on all attachments. I copied the source attachments folder to a folder in the target domain (i.e. vb site) and used the path /home/xxx/public_html/source_att/attachments/ and that worked for about 500 attachments out of 14,500

NOTES:
I am using XF v1.1.2 and vb v4.2 PL1
I run a dedicated server using WHM/cPanel and both domains (source and target) are on the same server
My XF site has 7,000 users, 25,000 Threads and 180,000 Posts

Andreas, if you want to test it all with access to the source and target domains let me know
Reply With Quote
  #54  
Old 07-05-2012, 06:34 PM
big dan's Avatar
big dan big dan is offline
 
Join Date: Jun 2006
Location: New York
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the great addon Andreas!

I'm seeing a problem running the import forums module.

The last forum errors out with

Code:
ImpEx Database error

mysql error: Invalid SQL: 
					UPDATE forum
					SET parentid = 366
					WHERE forumid = 369
				

mysql error: Table 'xxxxx_vbulldev.forum' doesn't exist

mysql error number: 1146

Date: Thursday 05th 2012f July 2012 03:31:07 PM
Database: xxxxxx_vbulldev
MySQL error:
Reply With Quote
  #55  
Old 07-24-2012, 09:17 PM
Sadikb's Avatar
Sadikb Sadikb is offline
 
Join Date: Aug 2008
Location: Internet
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If importing in a new VB instance, does this retain the same IDs (thread_id, forum_id etc) as the ones used in XF or not?
Reply With Quote
  #56  
Old 07-27-2012, 06:54 PM
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Posts: 1,630
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

"bug" in 000.php

PHP Code:
function parent_id_update($Source_Db_object$Target_Db_object$Source_tableprefix$Target_tableprefix)
    {
        
// mapping table: importforumid => forumid
        
$importforums = array();
        
        
$forums $Target_Db_object->query("
            SELECT forumid, importforumid, importcategoryid
            FROM 
{$Target_tableprefix}forum
            WHERE importforumid != 0 OR importcategoryid != 0
        "
);
        while (
$forum $Target_Db_object->fetch_array($forums))
        {
            if (
$forum['importcategoryid'] > 0)
            {
                
$importforums[$forum['importcategoryid']] = $forum['forumid'];
            }
            else
            {
                
$importforums[$forum['importforumid']] = $forum['forumid'];
            }
        
            
$forumcache[$forum['forumid']] = $forum;
        }
        
        
// mapping table: nodeid -> parentnodeid
        
$parentnodes = array();
        
        
$nodes $Source_Db_object->query("
            SELECT node_id, parent_node_id
            FROM 
{$Source_tableprefix}node
        "
);
        while (
$node $Source_Db_object->fetch_array($nodes))
        {
            
$parentnodes[$node['node_id']] = $node['parent_node_id'];
        }
        
        foreach (
$forumcache AS $forumid => $forum)
        {
            if (
$forum['importcategoryid'] > 0)
            {
                
$importid $forum['importcategoryid'];
            }
            else
            {
                
$importid $forum['importforumid'];
            }
            
            if (isset(
$parentnodes[$importid]) AND isset($importforums[$parentnodes[$importid]]))
            {
                
$Target_Db_object->query("
                    UPDATE 
{$tableprefix}forum
                    SET parentid = " 
$importforums[$parentnodes[$importid]] . "
                    WHERE forumid = 
$forumid
                "
);
            }
        }
    } 
should be
PHP Code:
function parent_id_update($Source_Db_object$Target_Db_object$Source_tableprefix$Target_tableprefix)
    {
        
// mapping table: importforumid => forumid
        
$importforums = array();
        
        
$forums $Target_Db_object->query("
            SELECT forumid, importforumid, importcategoryid
            FROM 
{$Target_tableprefix}forum
            WHERE importforumid != 0 OR importcategoryid != 0
        "
);
        while (
$forum $Target_Db_object->fetch_array($forums))
        {
            if (
$forum['importcategoryid'] > 0)
            {
                
$importforums[$forum['importcategoryid']] = $forum['forumid'];
            }
            else
            {
                
$importforums[$forum['importforumid']] = $forum['forumid'];
            }
        
            
$forumcache[$forum['forumid']] = $forum;
        }
        
        
// mapping table: nodeid -> parentnodeid
        
$parentnodes = array();
        
        
$nodes $Source_Db_object->query("
            SELECT node_id, parent_node_id
            FROM 
{$Source_tableprefix}node
        "
);
        while (
$node $Source_Db_object->fetch_array($nodes))
        {
            
$parentnodes[$node['node_id']] = $node['parent_node_id'];
        }
        
        foreach (
$forumcache AS $forumid => $forum)
        {
            if (
$forum['importcategoryid'] > 0)
            {
                
$importid $forum['importcategoryid'];
            }
            else
            {
                
$importid $forum['importforumid'];
            }
            
            if (isset(
$parentnodes[$importid]) AND isset($importforums[$parentnodes[$importid]]))
            {
                
$Target_Db_object->query("
                    UPDATE 
{$Target_tableprefix}forum
                    SET parentid = " 
$importforums[$parentnodes[$importid]] . "
                    WHERE forumid = 
$forumid
                "
);
            }
        }
    } 
the last prefix is wrong
Reply With Quote
Благодарность от:
big dan
  #57  
Old 07-27-2012, 09:04 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I cannot see any difference between the two bits of code, you probably want to make it more obvious.
Reply With Quote
  #58  
Old 07-27-2012, 09:11 PM
big dan's Avatar
big dan big dan is offline
 
Join Date: Jun 2006
Location: New York
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Ragtek! That fixed my forums import issue. :up:
Reply With Quote
Благодарность от:
ragtek
  #59  
Old 07-28-2012, 06:52 AM
ragtek ragtek is offline
 
Join Date: Mar 2006
Location: austria, croatia
Posts: 1,630
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M View Post
I cannot see any difference between the two bits of code, you probably want to make it more obvious.
Quote:
the last prefix is wrong
PHP Code:
 if (isset($parentnodes[$importid]) AND isset($importforums[$parentnodes[$importid]]))
            {
                
$Target_Db_object->query("
                    UPDATE 
{$tableprefix}forum
                    SET parentid = " 
$importforums[$parentnodes[$importid]] . "
                    WHERE forumid = 
$forumid
                "
);
            } 
vs

PHP Code:
if (isset($parentnodes[$importid]) AND isset($importforums[$parentnodes[$importid]]))
            {
                
$Target_Db_object->query("
                    UPDATE 
{$Target_tableprefix}forum
                    SET parentid = " 
$importforums[$parentnodes[$importid]] . "
                    WHERE forumid = 
$forumid
                "
);
            } 
Reply With Quote
  #60  
Old 08-01-2012, 12:04 AM
merk_aus merk_aus is offline
 
Join Date: Feb 2008
Location: Australia
Posts: 582
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

So what is the best way to get passwords to work?
Reply With Quote
  #61  
Old 08-10-2012, 01:03 AM
big dan's Avatar
big dan big dan is offline
 
Join Date: Jun 2006
Location: New York
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by merk_aus View Post
So what is the best way to get passwords to work?
After importing email your members with the password reset link. That's what I did. It wasn't too bad.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:46 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05469 seconds
  • Memory Usage 2,401KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (4)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (17)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete