Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Transfer Errors, support needed! Details »»
Transfer Errors, support needed!
Version: , by K33nny K33nny is offline
Developer Last Online: Aug 2007 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 05-31-2002 Last Update: Never Installs: 0
 
No support by the author.

http://www.vbulletin.com/forum/showt...ghlight=tforum

When running the first script for Pyro's tForum hack I get an error which is as followed...

Quote:
removed
This is the "user" transfer script.

PHP Code:
removed 
What exactly is going wrong and how do I fix it?

Show Your Support

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

Comments
  #2  
Old 05-31-2002, 01:57 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I know what the problem is, it's not using the target database but only the tForum. I'll post a new script in a couple of hours or so...
Reply With Quote
  #3  
Old 05-31-2002, 01:59 PM
K33nny K33nny is offline
 
Join Date: May 2002
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks man. I feel kind of stupid asking so many questions about PHP, but I'm only in the learning process.
Reply With Quote
  #4  
Old 05-31-2002, 04:55 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, try this.
Bear in mind I don't know tForum at all, I just fixed the script above to really use two databases. It might or it might not work, it's not been tested.

Hmm, can't read from A:\... it's been a year since I used it, and now when I do it doesn't work.
Anyway, I wrote it on my laptop so it's on a floppy, I'll try and get it fixed soon.
Reply With Quote
  #5  
Old 05-31-2002, 05:02 PM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here we go...

PHP Code:
<?php

// tForum > vBulletin Transfer script for "user"
// Written by Pyro for <a href="http://www.feuerwerk.net" target="_blank">[url]http://www.feuerwerk.net[/url]</a>

$db_Database 'ewi_forums';           // name of database
$db_Database_target 'ewi_planet';    // enter the same

$db_UserName 'ewi_ewp';              // username or root
$db_UserName_target 'ewi_planet';    // enter the same

$db_Password '3wplan3t';             // password for root or user
$db_Password_target 'plan3t';        // enter the same

$db_Hostname 'localhost';            // e.g. "localhost"


###############################################################
###############################################################
###############################################################


$link mysql_connect($db_Hostname$db_UserName$db_Password);
if (!
$link) {
    echo 
'No connection to database.';
}
mysql_select_db($db_Database$link);

$query 'SELECT * FROM t_users ORDER BY ID ASC';
$result mysql_query($query$link);
echo 
"Transfer Users from tForum to vBulletin<br /><br />\n";

while (
$user mysql_fetch_array($result)) {
    
$userq[$user['ID']]  = 'INSERT INTO user (userid, usergroupid, username, password, email, styleid, parentemail, coppauser, ';
    
$userq[$user['ID']] .= 'homepage, icq, aim, yahoo, signature, adminemail, showemail, invisible, usertitle, customtitle, ';
    
$userq[$user['ID']] .= 'joindate, cookieuser, daysprune, lastvisit, lastactivity, lastpost, posts, timezoneoffset, ';
    
$userq[$user['ID']] .= 'emailnotification, buddylist, ignorelist, pmfolders, receivepm, emailonpm, pmpopup, avatarid, ';
    
$userq[$user['ID']] .= 'options, birthday, maxposts, startofweek, ipaddress, referrerid, nosessionhash) VALUES (';
    
$userq[$user['ID']] .= "'$user[ID]', ";
    if (
$user['ID'] == 1) {
        
$userlevel 6;
    } else {
        
$userlevel 2;
    }
    
$userq[$user['ID']] .= "'$userlevel', "// alle User=registriert
    
$userq[$user['ID']] .= "'$user[UserName]', ";
    
$userq[$user['ID']] .= "'$user[Password]', ";
    
$userq[$user['ID']] .= "'$user[Email]', ";
    
$userq[$user['ID']] .= "'0', ";
    
$userq[$user['ID']] .= "'', ";
    
$userq[$user['ID']] .= "'0', ";
    
$userq[$user['ID']] .= "'$user[Homepage]', ";
    if (
$user['ICQNumber'] == 0) {
        
$icq '';
    } else {
        
$icq $user['ICQNumber'];
    }
    
$userq[$user['ID']] .= "'$icq', ";
    
$userq[$user['ID']] .= "'', ";
    
$userq[$user['ID']] .= "'', ";
    
$userq[$user['ID']] .= "'$user[Signature]', ";
    
$userq[$user['ID']] .= "'1', ";
    
$userq[$user['ID']] .= "'1', ";
    
$userq[$user['ID']] .= "'0', ";
    
$userq[$user['ID']] .= "'', ";
    
$userq[$user['ID']] .= "'0', ";
    
$userq[$user['ID']] .= "'$user[RegDate]', ";
    
$userq[$user['ID']] .= "'1', ";
    
$userq[$user['ID']] .= "'-1', ";
    
$userq[$user['ID']] .= "'$user[LastActive]', ";
    
$userq[$user['ID']] .= "'$user[LastActive]', ";
    
$userq[$user['ID']] .= "'', "//lastpost
    
$userq[$user['ID']] .= "'$user[NumPost]', ";
    
$userq[$user['ID']] .= "'+2', ";
    
$userq[$user['ID']] .= "'1', ";
    
$userq[$user['ID']] .= "'', ";
    
$userq[$user['ID']] .= "'', ";
    
$userq[$user['ID']] .= "'', ";
    
$userq[$user['ID']] .= "'1', ";
    
$userq[$user['ID']] .= "'1', ";
    
$userq[$user['ID']] .= "'0', ";
    
$userq[$user['ID']] .= "'0', ";
    
$userq[$user['ID']] .= "'15', ";
    
$userq[$user['ID']] .= "'', ";
    
$userq[$user['ID']] .= "'-1', ";
    
$userq[$user['ID']] .= "'2', ";
    
$userq[$user['ID']] .= "'', ";
    
$userq[$user['ID']] .= "'0', ";
    
$userq[$user['ID']] .= "'1')";

    
$userfieldq[$user['ID']] = "INSERT INTO userfield (userid) VALUES ($user[ID])";
}

mysql_close($link);


###############################################################
###############################################################
###############################################################


$link mysql_connect($db_Hostname$db_UserName_target$db_Password_target);
if (!
$link) {
    echo 
'No connection to database.';
}
mysql_select_db($db_Database_target$link);

foreach (
$userq as $userID => $nevermind) {
    
// Enter in Table user
    
echo $userq[$userID] . '<br /><br />';
    if (!
$transfer_user mysql_query ($userq[$userID])) {
        echo 
"<font color=\"red\"><b>... Error!</b></font>";
        echo 
mysql_error();
    }

    
// Enter in Table userfield
    
echo $userfieldq[$userID] . '<br /><br />';

    if (!
$transfer_user mysql_query ($userq[$userID])) {
        echo 
"<font color=\"red\"><b>... Error!</b></font>";
        echo 
mysql_error();
    }
}

mysql_close($link);

?>
Reply With Quote
  #6  
Old 05-31-2002, 09:15 PM
K33nny K33nny is offline
 
Join Date: May 2002
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
removed
This is what things looked like when I ran your updated script. It transferred the first then caused an error for each one after.

Instead it would be ... Error!Duplicate entry '3' then ... Error!Duplicate entry '4' and so on.
Reply With Quote
  #7  
Old 06-01-2002, 01:11 AM
K33nny K33nny is offline
 
Join Date: May 2002
Posts: 184
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Getting this error when running 3_transfer_mess.php3

Quote:
removed
Quote:
removed
In order to not get that error should I have someone with a quicker connection run this script?

PHP Code:
removed 
Reply With Quote
  #8  
Old 06-01-2002, 06:36 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For post #6:
You already ran the script, so some users are already in the user table. Empty the table (using phpMyAdmin) and run the script again.
UNLESS you already had users before trying to import. In that case the script won't work.

For post #7:
The script is taking too much time to execute, so stick this line:
PHP Code:
set_time_limit(0); 
right at the beginning, after <?php.
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 10:39 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.04498 seconds
  • Memory Usage 2,329KB
  • Queries Executed 21 (?)
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
  • (4)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete