vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Miscellaneous Hacks - ImpEx Module: Xenforo (https://vborg.vbsupport.ru/showthread.php?t=283111)

BirdOPrey5 06-02-2012 09:48 AM

Here is the manual on using Impex, the import tool:
https://www.vbulletin.com/docs/html/impex

TheInsaneManiac 06-03-2012 08:03 AM

Quote:

Originally Posted by TheInsaneManiac (Post 2333429)
Anyway to make it accept current xf password and force them to change the password?

Bump. I mean if XenForo can convert passwords to their own format why can't vB convert back?

Andreas 06-03-2012 08:42 AM

Quote:

Originally Posted by TheInsaneManiac (Post 2336053)
Bump. I mean if XenForo can convert passwords to their own format why can't vB convert back?

XF doesn't convert passwords, it simply has code to support other authentication systems besides its own as well - vBulletin and IPB.
vBulletin does not have such a system, it only understands its own format :)

If you want it to support other authentcation systems you have to do that on your own.

TheInsaneManiac 06-03-2012 09:29 AM

So XF doesnt convert it just uses existing and recognizes if it is a vB password?

Andreas 06-03-2012 09:51 AM

Exactly.

TheInsaneManiac 06-03-2012 07:56 PM

How hard is that to do? Think if you get a lil spare time you can accomplish this? I'm no expert like you are.

Andreas 06-03-2012 08:54 PM

Not much, all necessary hooks are there.

I don't have spare time, and even if I hand I most likely wouldn't do it as it's a rather boring task and I don't think there would be much interest..

Sorry :(

TheInsaneManiac 06-04-2012 12:26 AM

Quote:

Originally Posted by Andreas (Post 2336285)
Not much, all necessary hooks are there.

I don't have spare time, and even if I hand I most likely wouldn't do it as it's a rather boring task and I don't think there would be much interest..

Sorry :(

I could send some money your way. I do a boring job too, so I understand, how long would it take you and how much would you charge?

iBaker 06-04-2012 08:33 AM

Passwords is, and always will be, the major stumbling block with this Andreas...hats off to you if you can work a solution into the pack

pjfry 06-08-2012 08:27 PM

Hi do anybody have a redirect script or code to redirect the old xenforo links (forums, threads, ...) to the new vbulletin ones?

Is this possible? Thanks!

Benny

iBaker 06-13-2012 07:30 AM

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

iBaker 06-13-2012 09:27 AM

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

big dan 07-05-2012 06:34 PM

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:


Sadikb 07-24-2012 09:17 PM

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?

ragtek 07-27-2012 06:54 PM

"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

Paul M 07-27-2012 09:04 PM

I cannot see any difference between the two bits of code, you probably want to make it more obvious.

big dan 07-27-2012 09:11 PM

Thanks Ragtek! That fixed my forums import issue. :up:

ragtek 07-28-2012 06:52 AM

Quote:

Originally Posted by Paul M (Post 2351984)
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
                "
);
            } 


merk_aus 08-01-2012 12:04 AM

So what is the best way to get passwords to work?

big dan 08-10-2012 01:03 AM

Quote:

Originally Posted by merk_aus (Post 2353195)
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.

Brandon Sheley 08-25-2012 02:25 AM

Quote:

Originally Posted by iBaker (Post 2339224)
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



Ouch...
What did you do about the attachments, where you just testing things out?

iBaker 08-25-2012 02:39 AM

Yes I was just testing things out and couldn't get them imported so had to give up...very funny that you have just posted as about 2hrs ago I reinstalled vb and are going to make a concentrated effort to try and get things right so if anyone can help with the attachments then please, let us know what you did...also the other biggest worry is passwords, I will pay to be able for my users to keep their passwords

RedFlamePro 08-27-2012 02:20 PM

who can convert this mod to vbb 3.8x , please

iBaker 09-02-2012 12:54 AM

Ok, I have been working on this a fair bit and are overcoming many of the problems that it has, both within Impex and this mod.

I have been doing this on my local PC using xampps and once it is all going properly will try on a web server and then if all goes well I will post here the little things that I have had to do to make it work...for example Attachments should use database not file system as that will cause an error etc.

The final error that I have come up with is in the very last process of changing the in-line attachments (step 11).

The error I get is:
Code:

ImpEx Database error

mysql error: Invalid SQL:
            SELECT attachmentid
            FROM attachment
            WHERE importattachmentid != 0
            ORDER BY attachmentid ASC
            LIMIT , 1000
       

mysql error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 1000' at line 5

mysql error number: 1064

Date: Saturday 01st 2012f September 2012 12:24:14 PM
Database: recflynew_forum
MySQL error:

This is the code in the php file that causes the error (011.php):
Code:

        // Get an array data
        $attachments = $Db_target->query("
            SELECT attachmentid
            FROM {$t_tb_prefix}attachment
            WHERE importattachmentid != 0
            ORDER BY attachmentid ASC
            LIMIT $start_at, $per_page
        ");

MySQL Error 1064 seems to fire up if the delimiter is incorrect...it also interesting that there seems to be no value inserted for $start_at

Can anyone help with this final error...thanks!

iBaker 09-03-2012 07:26 AM

I give up on this...after 2 days of solid work I can't get it to work...maybe some of you can that only have very small sites but for example if you have any more than 1,000 attachments it will fail...you don't get passwords or even the videos that XF allows you in posts and more.

The only option for me now, and others that are not happy with XF is to go to IPB...a real pity for vb

big dan 09-03-2012 04:35 PM

Ian,

For what it's worth I imported 400,000+ posts with something like 20k attachments with this module. The only thing I had to change was Ragtek's edit here: https://vborg.vbsupport.ru/showpost....4&postcount=55

Inline attachments stalled for me with no error given so I skipped it. It isn't a major step it just places the attachment code in posts.

iBaker 09-03-2012 11:11 PM

Quote:

Originally Posted by big dan (Post 2362281)
Ian,

For what it's worth I imported 400,000+ posts with something like 20k attachments with this module. The only thing I had to change was Ragtek's edit here: https://vborg.vbsupport.ru/showpost....4&postcount=55

Inline attachments stalled for me with no error given so I skipped it. It isn't a major step it just places the attachment code in posts.

So are you saying that any post that has an inline attachment will still show the attach code in the post and no image but the attached image will show as a standard attachment?

This would result in messy posts wouldn't it?

Also what did you do about Avatars as my attempts show the user's avatar ok when viewing the user in the ACP however their avatar doesn't display in any postbits?

Also XF has the ability to display YouTube, Vimeo etc videos inline in posts. How did you handle their display instead of just leaving the bbcode text of them again making posts look messy?

Also what process do you do after step 10 given that you didn't run step 11?

iBaker 09-04-2012 04:14 AM

Just completed another import in my test xampp environment on my PC and are resolving 3many of the little issues...eg, Avatars are now working etc.

A couple of big issues that I have found is that the importer doesn't seem to do is:
Poll information...it only imports the first option of a poll and not all the other options so all polls just have one entry
Profile Messages don't seem to import either
IP addresses of posts don't get imported

big dan 09-06-2012 04:42 PM

Quote:

Originally Posted by iBaker (Post 2362447)
Just completed another import in my test xampp environment on my PC and are resolving 3many of the little issues...eg, Avatars are now working etc.

A couple of big issues that I have found is that the importer doesn't seem to do is:
Poll information...it only imports the first option of a poll and not all the other options so all polls just have one entry
Profile Messages don't seem to import either
IP addresses of posts don't get imported

I noticed the lack of IP address and Profile messages after the import. Visitor messages are rarely used on my board and the IP address I can live without.

Quote:

Originally Posted by iBaker (Post 2362384)
So are you saying that any post that has an inline attachment will still show the attach code in the post and no image but the attached image will show as a standard attachment?

This would result in messy posts wouldn't it?

Also what did you do about Avatars as my attempts show the user's avatar ok when viewing the user in the ACP however their avatar doesn't display in any postbits?

Also XF has the ability to display YouTube, Vimeo etc videos inline in posts. How did you handle their display instead of just leaving the bbcode text of them again making posts look messy?

Also what process do you do after step 10 given that you didn't run step 11?

Yeah, I left the posts messy. I'll edit them as they come up but I'm not very worried about it.

After step 10 I clicked the database cleanup and restart link to delete the session then dumped the IMPEX files and ran all the counter updates.

Alien 09-07-2012 04:41 PM

I hope to see this updated for profile messages and thread prefixes.

Thanks, Andreas!

daveaite 09-08-2012 01:00 AM

Surprized you guys made an impex when vbulletin is in a lawsuit with xenforo?

toibs 09-18-2012 10:46 PM

I'm not - makes perfect sense when xF announce last week that development has stopped...

Therefore I make a request of Andreas - PLEASE could you add as much as possible to import from Xenforo - i expect there will be a lot of interest....

Thx

iBaker 11-04-2012 12:10 AM

Quote:

Originally Posted by soniceffect (Post 2378212)
Your gonna start that conversation within a mod topic? Seriously?

Thanks for confirming the attitude

iBaker 11-04-2012 12:15 AM

Looks like this mod has stalled like Xenforo has...all that is left is vb5 or IPB...need I say any more YUK!!!!!!!!

How to destroy a complete industry in one big foul swoop

soniceffect 11-04-2012 12:56 AM

Quote:

Originally Posted by iBaker (Post 2378206)
Looks like this mod has stalled like Xenforo has...all that is left is vb5 or IPB...need I say any more YUK!!!!!!!!

How to destroy a complete industry in one big foul swoop

Your gonna start that conversation within a mod topic? Seriously?

mattpist 11-20-2012 06:17 AM

Quote:

Originally Posted by iBaker (Post 2361862)
Ok, I have been working on this a fair bit and are overcoming many of the problems that it has, both within Impex and this mod.

I have been doing this on my local PC using xampps and once it is all going properly will try on a web server and then if all goes well I will post here the little things that I have had to do to make it work...for example Attachments should use database not file system as that will cause an error etc.

The final error that I have come up with is in the very last process of changing the in-line attachments (step 11).

The error I get is:
Code:

ImpEx Database error

mysql error: Invalid SQL:
            SELECT attachmentid
            FROM attachment
            WHERE importattachmentid != 0
            ORDER BY attachmentid ASC
            LIMIT , 1000
       

mysql error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 1000' at line 5

mysql error number: 1064

Date: Saturday 01st 2012f September 2012 12:24:14 PM
Database: recflynew_forum
MySQL error:

This is the code in the php file that causes the error (011.php):
Code:

        // Get an array data
        $attachments = $Db_target->query("
            SELECT attachmentid
            FROM {$t_tb_prefix}attachment
            WHERE importattachmentid != 0
            ORDER BY attachmentid ASC
            LIMIT $start_at, $per_page
        ");

MySQL Error 1064 seems to fire up if the delimiter is incorrect...it also interesting that there seems to be no value inserted for $start_at

Can anyone help with this final error...thanks!

I'm having this same exact issue. it looks like changing the code "LIMIT $start_at, $per_page" but i don't know enough to know what to fix.

vB-Tr 01-12-2013 02:39 AM

Hi. l move the my friend's forum.

xenforo=>vbulletin

but l login with only username. l dont write a password but l login site.

I've tried all the username!!

How do I fix this error?

xenforo version => 1.1.2

vB-Tr 01-12-2013 05:41 PM

who can help me?

vB-Tr 01-12-2013 10:04 PM

l solved this problem.


UPDATE user set password = MD5(concat(MD5('vb-tr'), user.salt)) WHERE usergroupid = 2


and all password is => vb-tr :) and don't login only username :)

fabiocesar 01-31-2013 04:58 PM

Quote:

Originally Posted by iBaker (Post 2361862)
Ok, I have been working on this a fair bit and are overcoming many of the problems that it has, both within Impex and this mod.

I have been doing this on my local PC using xampps and once it is all going properly will try on a web server and then if all goes well I will post here the little things that I have had to do to make it work...for example Attachments should use database not file system as that will cause an error etc.

The final error that I have come up with is in the very last process of changing the in-line attachments (step 11).

The error I get is:
Code:

ImpEx Database error

mysql error: Invalid SQL:
            SELECT attachmentid
            FROM attachment
            WHERE importattachmentid != 0
            ORDER BY attachmentid ASC
            LIMIT , 1000
       

mysql error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 1000' at line 5

mysql error number: 1064

Date: Saturday 01st 2012f September 2012 12:24:14 PM
Database: recflynew_forum
MySQL error:

This is the code in the php file that causes the error (011.php):
Code:

        // Get an array data
        $attachments = $Db_target->query("
            SELECT attachmentid
            FROM {$t_tb_prefix}attachment
            WHERE importattachmentid != 0
            ORDER BY attachmentid ASC
            LIMIT $start_at, $per_page
        ");

MySQL Error 1064 seems to fire up if the delimiter is incorrect...it also interesting that there seems to be no value inserted for $start_at

Can anyone help with this final error...thanks!

still no solution for this bug??


All times are GMT. The time now is 02:37 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01467 seconds
  • Memory Usage 1,920KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (4)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete