Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vBulletin Merge Tool for v2.2.x Details »»
vBulletin Merge Tool for v2.2.x
Version: 1.00, by JulianD JulianD is offline
Developer Last Online: Sep 2018 Show Printable Version Email this Page

Version: 2.3.x Rating:
Released: 11-17-2002 Last Update: Never Installs: 69
Is in Beta Stage  
No support by the author.

Well, I did this for a friend and I saw some request for this tool before, so here you got.

My code is based on the import scripts that you found on vbulletin.com.

What it does?
- Merge: users, forums, threads, posts, polls, PMs and attachments of two vBulletin databases.
- It allows to associate usernames with current vBulletin users, to prevent duplication

Both databases should be in the same server, and use the same password.

If there's a duplicated name in both databases, the script will postfix the username from the database you're merging with something like: [imported]. So you probably will find users that looks like username[imported] after the merge. To solve this problem of two usernames being one person, there's a tool in the script to merge users individually.

New version
- The database to merge can now have a different host/username/password. *
- Ability to auto merge users with the same username (to avoid 4000 users with the [imported] thing. ) *
- You can now skip the forum merging, and use the tool only to merge users.
- The poll bug seems to be fixed now. Post your feedback.


Installation:

Simply upload the attached file to /forum/importers/ and go to your Admin CP > BB Import Systems and choose vBulletin Merge Tool for v2.2.x.

Note that this script requires vBulletin 2.2.7 (or newer) to work. I have tested it with 2.2.6 but you need to upgrade the file /forum/admin/bbimport.php to the version you found on vBulletin 2.2.7 or newer.



Important Information:
This merger is beta! You should backup everything before starting. Use it under your own risk!


I decided to reopen this thread with a new version of this merger. I hope it fixes all the problems with previous versions.

REMEMBER:

If you're going to merge two database that are located on the same host, you SHOULD use a different hostname for both database.

For example:

If you have 'localhost' configured as your $servername variable on the admin/config.php file, and you want to merge a database stored on the same server, you should use something like '127.0.0.1'. Another example... If you have $servername configured to 'vbulletin.org', and you want to merge a database located on vbulletin.org, use the IP address for that server instead... In this case '205.214.66.221'. Get it?

Sorry, I'm not very good with english and it's very hard to explain this. I hope you've understood this.

Show Your Support

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

Comments
  #92  
Old 03-12-2003, 09:43 PM
tucklis tucklis is offline
 
Join Date: Feb 2003
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

Thanks very much for developing this hack.

I have downloaded the beta but have had some problems. After I click "start merge", it says database initialised for import and then when I click associate users it gives me the following error:

Database error in vBulletin Control Panel 2.2.9:

Invalid SQL: SELECT COUNT(*) AS count FROM soccerpages.user
mysql error: select command denied to user: 'tucklis6@server84l.xtreme-support.com' for table 'user'

mysql error number: 1142

Date: Wednesday 12th of March 2003 11:35:19 PM
Script: http://yupz.com/forum/forums/importers/bbimport_vb2.php
Referer: http://yupz.com/forums/importers/bbimport_vb2.php

Does this mean it hasn't worked? My forum now seems to read 0 posts and threads What am I doing wrong?

Thanks for your time,
Kerry
Reply With Quote
  #93  
Old 03-13-2003, 12:06 AM
JulianD's Avatar
JulianD JulianD is offline
 
Join Date: Jan 2002
Posts: 455
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Give me some time, it's a bug and I'll fix it probably today
Reply With Quote
  #94  
Old 03-13-2003, 09:09 AM
tucklis tucklis is offline
 
Join Date: Feb 2003
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

I think I may have uploaded the old version - that's maybe why I got that error. I have now uploaded the latest beta and changed the global $vbdbhostname,$vbdbusername,$vbdbpassword,$vbdbnam e; fields to match the database I'm importing from. But now I have a new one!

Warning: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/domains/yupz.com/user/htdocs/forums/admin/db_mysql.php on line 32

Database error in vBulletin Merge Tool 2.2.9:

Link-ID == false, connect failed
mysql error:

mysql error number: 0

Date: Thursday 13th of March 2003 11:02:12 AM
Script: http://yupz.com/forums/forums/import...p?action=start
Referer: http://yupz.com/forums/admin/bbimport.php?action=

I think this maybe because the two databases that I want to merge are both on different ips to my webspace? Do I have to include the database ip / password for both databses? Where do I edit this?

One other thing (sorry for all these questions!!), should I make all the forums names match so they merge properly?

Thanks alot,
Kerry
Reply With Quote
  #95  
Old 03-14-2003, 02:21 AM
JulianD's Avatar
JulianD JulianD is offline
 
Join Date: Jan 2002
Posts: 455
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 06:09 AM tucklis said this in Post #93
One other thing (sorry for all these questions!!), should I make all the forums names match so they merge properly?

Thanks alot,
Kerry

Hi Kerry. Please give me some time and let me come out with a solution to this problem. I'm busy with some tests on school right now.

About the forums, no... The forums are not "merged" but it's easy to move all the post from one forum to another using the tools you found on the admin cp.
Reply With Quote
  #96  
Old 03-14-2003, 08:03 AM
tucklis tucklis is offline
 
Join Date: Feb 2003
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, Thanks very much!
Reply With Quote
  #97  
Old 03-15-2003, 05:50 PM
tucklis tucklis is offline
 
Join Date: Feb 2003
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any more news? Sorry to be a pest but I really need this script to work!!! I think it mat just be a small alteration that is needed...
Reply With Quote
  #98  
Old 03-15-2003, 10:38 PM
Colon33
Guest
 
Posts: n/a
Default

Im running vb 2.2.9.. an i get this error... I uploaded the new BBIMPORT.php but as soon as i click associate users i get the DB error.

----
Database error in vBulletin Control Panel 2.2.9:

Invalid SQL: SELECT COUNT(*) AS count FROM ndream.user
mysql error: select command denied to user: 'moguslan_mogusad@localhost' for table 'user'

mysql error number: 1142

Date: Saturday 15th of March 2003 07:31:32 PM
Script: http://www.mogusland.com/forums/foru...import_vb2.php
Referer: http://www.mogusland.com/forums/impo...import_vb2.php
---
Reply With Quote
  #99  
Old 03-18-2003, 11:42 AM
tucklis tucklis is offline
 
Join Date: Feb 2003
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have edited the following fields in the import script:

<?php
// vBulletin Merge Tool for v2.2.x
error_reporting(7);
require ("./../admin/bbimport.php");

function makehiddenfields() {
global $vbdbhostname,$vbdbusername,$vbdbpassword,$vbdbnam e;
makehiddencode("DBIPADDRESS",$vbdbhostname);
makehiddencode("DBUSERNAME",$vbdbusername);
makehiddencode("DBPASSWORD",$vbdbpassword);
makehiddencode("DBNAME", $vbdbname);

Are these variables supposed to be for the database I'm trying to import or the database I'm importing the records into?

Cheers,
Kerry
Reply With Quote
  #100  
Old 03-18-2003, 11:09 PM
JulianD's Avatar
JulianD JulianD is offline
 
Join Date: Jan 2002
Posts: 455
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, download this file again:

https://vborg.vbsupport.ru/attachmen...&postid=359490

Make sure you get the NEW version. The new file (uncompressed) is about 41KB, so make sure you get the new version and not a version from your local cache. If the new file is not about 41KB, clear your browser cache.
Reply With Quote
  #101  
Old 03-19-2003, 09:24 AM
tucklis tucklis is offline
 
Join Date: Feb 2003
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much for updating the hack. But I still have problems. When I click "start merge" it says "Database initialised for import."

When I click on step 2 it says "Database not selected! Warning! Restart application! (I always wanted to say that!) ".

I think it may be to do with settings I have changes - please take a look as I was unsure what I should change here:

PHP Code:
<?php
// vBulletin Merge Tool for v2.2.x
error_reporting(7);
require (
"./../admin/bbimport.php");

function 
makehiddenfields() {
    global 
$vbdbhostname,$vbdbusername,$vbdbpassword,$vbdbname;
    
makehiddencode("IPOFDBTOBEIMPORTED",$vbdbhostname);
    
makehiddencode("DBUSERNAME",$vbdbusername);
    
makehiddencode("DBPASSWORD",$vbdbpassword);
    
makehiddencode("DBNAME"$vbdbname);
    
}



// ##############################################################################
// ok you wanted it quicly fixed, it didn't work with the same db class from vb,
// so i created another one.
class DB_Sql_merge {
  var 
$database "NAMEOFEXISTINGDB";

  var 
$link_id  1;
  var 
$query_id 0;
  var 
$record   = array();

  var 
$errdesc    "";
  var 
$errno   0;
  var 
$reporterror 1;

  var 
$server   "IPOFEXISTINGDB";
  var 
$user     "USERNAME";
  var 
$password "PASSWORD";

  var 
$appname  "vBulletin";
  var 
$appshortname "vBulletin (cp)";

  function 
connect() {
    global 
$usepconnect;
    
// connect to db server
I also changed the link_id to 1. Are these settings correct? Why am I getting this error

Thanks Julian,

I appreciate any help you can provide!

Regs,
Kerry
Reply With Quote
Reply


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 06:01 AM.


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.05332 seconds
  • Memory Usage 2,327KB
  • Queries Executed 25 (?)
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
  • (1)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (10)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete