Go Back   vb.org Archive > Community Discussions > Modification Requests/Questions (Unpaid)
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 07-27-2005, 03:47 PM
Alex Apple Alex Apple is offline
 
Join Date: Aug 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by feldon23
This works on vB3.0.7?
I'm in the same boat. I'm about to convert an ezboard over to vBulletin but this user question is going to be key.

The only way I think this might be possible is use the ezboard-->phpBB converter available here, which I've tested and which seems to work quite well. It's basically a spider, but which creates dummy accounts. It gives all the dummy usernames the same dummy password and email, but it's obviously changeable (bit of a security risk though). I'm currently planning to do the ezb-->phpBB import, and then use Impex to import the phpBB database. It's a bit long-winded, but I can't see much other of a way round.
Reply With Quote
  #12  
Old 07-27-2005, 05:35 PM
feldon23's Avatar
feldon23 feldon23 is offline
 
Join Date: Oct 2001
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alex Apple
I'm in the same boat. I'm about to convert an ezboard over to vBulletin but this user question is going to be key.

The only way I think this might be possible is use the ezboard-->phpBB converter available here, which I've tested and which seems to work quite well. It's basically a spider, but which creates dummy accounts. It gives all the dummy usernames the same dummy password and email, but it's obviously changeable (bit of a security risk though). I'm currently planning to do the ezb-->phpBB import, and then use Impex to import the phpBB database. It's a bit long-winded, but I can't see much other of a way round.
I tried to rewrite the EZBoard user importer posted here:
https://vborg.vbsupport.ru/showthread.php?t=31443

to work with vBulletin 3 but I have failed. I am now having to restore a forum database because of it.

The problem is that one of the users I imported has an apostrophe in their name.


EDIT: Please see the updated version of this script later down the page that fixes various bugs and cleans up the rest of the code.
Reply With Quote
  #13  
Old 07-27-2005, 07:56 PM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Change:
PHP Code:
        $getuserid=$DB_site->query_first("SELECT userid FROM user WHERE username='$newusername'"); 
to:
PHP Code:
        $getuserid=$DB_site->query_first("SELECT userid FROM user WHERE username='" addslashes($newusername) . "'"); 
Do that everywhere the username is used in a query.
Reply With Quote
  #14  
Old 07-27-2005, 10:22 PM
feldon23's Avatar
feldon23 feldon23 is offline
 
Join Date: Oct 2001
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarcoH64
Change:
PHP Code:
        $getuserid=$DB_site->query_first("SELECT userid FROM user WHERE username='$newusername'"); 
to:
PHP Code:
        $getuserid=$DB_site->query_first("SELECT userid FROM user WHERE username='" addslashes($newusername) . "'"); 
Do that everywhere the username is used in a query.
Should I go ahead and do addslashes(htmlspecialchars($newusername)) for every occurence of $newusername to be thorough?

Also wrestling with getting some kind of CSS to load.
Reply With Quote
  #15  
Old 07-28-2005, 03:26 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Only addslashes, never said anything about htmlspecialchars.
Reply With Quote
  #16  
Old 07-28-2005, 02:18 PM
feldon23's Avatar
feldon23 feldon23 is offline
 
Join Date: Oct 2001
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This script allows you to associate the imported posts from an EZBoard forum (which show up as username/Guest) with your newly registered vBulletin users. They will be able to edit their old posts, see their new avatars and signatures reflected in their old posts, and more importantly, their post count will include all of these old posts.

This script is particularly handy if users have already signed up on your new vBulletin forum or if users are registering with different usernames than they had on EZBoard.

You will still want to change each user's Join Date under their User options in AdminCP to reflect when they first registered on EZBoard. I may add this feature to a future revision of this script.

Supports: vBulletin 3.0.7
Should work with vBulletin 3.0.1-3.0.8 but have not had time to test.

Thanks to MarcoH64 for his assistance with this script!


I have really cleaned up the display of this script to look like a vB3 AdminCP panel. I have also added some basic idiot checks if you put a vB username that does not exist or leave one of the fields blank.


NOTE: PLEASE backup your database prior to using this script!

I consider this Pre-Release code and once it has been verified by other EZBoard users, I will release it here on vB.org. Please save this script as ezimport.php and place it in /admincp/

PHP Code:
<?
/******************************************************************************
*        ezboard import member converter 3.0b2
*        Originally By Jason "DarkReaper" Rodzik
*        Special Thanks to Firefly and Stallion
*        Updated to vBulletin 3.0.x by Feldon
*
*        http://www.unrealtournament.org/forums
*
*        Support for this hack at:
*        http://vbulletin.com/forum/showthread.php?t=31443
*******************************************************************************/


// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & E_NOTICE);

// ##################### DEFINE IMPORTANT CONSTANTS #######################
define('THIS_SCRIPT', 'ezimport');
define('NO_REGISTER_GLOBALS', 1);

// #################### PRE-CACHE TEMPLATES AND DATA ######################
$phrasegroups = array();
$specialtemplates = array();

// ########################## REQUIRE BACK-END ############################
require_once('./global.php');
require_once('./includes/adminfunctions.php');
require_once('./includes/functions.php');

// ########################################################################
// ######################### START MAIN SCRIPT ############################
// ########################################################################

// #############################################################################

print_cp_header('EZBoard Post Associator');

if ($_POST['do']=="update") {
    echo '<table cellpadding="4" cellspacing="0" border="0" align="center" width="90%" class="tborder"><tr><td class="alt1" style="padding-left: 20px; padding-top: 20px;">';
    globalize($_POST, array(
        'oldusername' => STR,
        'newusername' => STR
    ));
    if (isset($oldusername) and isset($newusername)) {
     $getuserid=$DB_site->query_first("SELECT userid FROM " . TABLE_PREFIX . "user WHERE username='".addslashes($newusername)."'");
        $userid=$getuserid[userid];
        if (!isset($userid)) {
            echo "<b>You have entered an invalid vBulletin username!</b><br />\n";
            echo "There is no user by the name of <b>".addslashes($newusername)."</b> registered on this forum.<br><br>\n";
        } else {
        
            // get hold of his/her posts and update threads
            echo "Associating vB user <b>".$newusername." (#".$userid.")</b> with their EZBoard posts under username <b>".$oldusername."</b>...";
         $DB_site->query("UPDATE " . TABLE_PREFIX . "post SET userid='$userid',username='".addslashes($newusername)."' WHERE username='".addslashes(htmlspecialchars($oldusername))."'");
         $DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET postuserid='$userid',postusername='".addslashes($newusername)."' WHERE postusername='".addslashes(htmlspecialchars($oldusername))."'");
         $DB_site->query("UPDATE " . TABLE_PREFIX . "thread SET lastposter='".addslashes($newusername)."' WHERE lastposter='".addslashes(htmlspecialchars($oldusername))."'");
         $DB_site->query("UPDATE " . TABLE_PREFIX . "forum SET lastposter='".addslashes($newusername)."' WHERE lastposter='".addslashes(htmlspecialchars($oldusername))."'");
            echo "<b>Done!</b><br /><br />\n";

            // Update post counts
         $totalposts=$DB_site->query_first("SELECT COUNT(postid) AS posts FROM " . TABLE_PREFIX . "post WHERE userid='$userid'");
         $DB_site->query("UPDATE " . TABLE_PREFIX . "user SET posts='$totalposts[posts]' WHERE userid='$userid'");
            echo "New post count is <b>".$totalposts[posts]."</b><br />\n";
            
            echo "You should now update your member titles.<br /><br />\n";
        }
    } else {
        echo "<b>You have not entered a vBulletin username!</b><br />\n";
        echo "Please enter new and old usernames and then click Update!<br />\n";
    }
    echo '</td></tr></table>';
}

// #############################################################################

print_form_header(THIS_SCRIPT, 'update');
print_table_header("Merge vBulletin account with old EZBoard Posts");
print_input_row("vBulletin username","newusername","$newusername");
print_input_row("EZBoard username","oldusername","$oldusername");
print_description_row('<input type="submit" class="button" value="Submit"/>', 0, 2, 'thead');
print_table_footer();

print_cp_footer();

// #############################################################################

?>
Reply With Quote
  #17  
Old 08-02-2005, 10:18 AM
swepics swepics is offline
 
Join Date: Aug 2005
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did this and named it ezboard.php. When I enter in the two names to merge, I get this message:

Quote:
Not Found
The requested URL /forums/admincp/ezimport.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Was I supposed to name this bit of code anything in particular when I put it in the admincp?
Reply With Quote
  #18  
Old 08-02-2005, 11:39 AM
feldon23's Avatar
feldon23 feldon23 is offline
 
Join Date: Oct 2001
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by swepics
I did this and named it ezboard.php. When I enter in the two names to merge, I get this message:

Was I supposed to name this bit of code anything in particular when I put it in the admincp?
I forgot to mention the filename. Yes, the filename is hardcoded as ezimport.php. You can either rename it to ezimport.php or change:
Code:
print_form_header('ezimport', 'update');
to
Code:
print_form_header('ezboard', 'update');

Updated my original note.
Reply With Quote
  #19  
Old 09-27-2005, 12:24 AM
a squared's Avatar
a squared a squared is offline
 
Join Date: Jul 2005
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I will be importing from ezBoard shortly and would like to run this script. I see that this should work in v 3.0.8 Has anyone run it yet in 3.0.8 or 3.0.9?

I wanted to add that I'm a new vB user running v 3.0.8
Reply With Quote
  #20  
Old 10-04-2005, 03:36 AM
a squared's Avatar
a squared a squared is offline
 
Join Date: Jul 2005
Posts: 51
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, installed and ran the script last night. Got a database error:


Quote:
Database error in vBulletin 3.0.8:

Invalid SQL: SELECT userid FROM user WHERE username='LSIntegra94'
mysql error: Table 'slotcari_vBforums.user' doesn't exist

mysql error number: 1146

If it helps, I have a table named "slotcari_vBforums.vb3_user"


.
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 11:57 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.04191 seconds
  • Memory Usage 2,300KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (5)bbcode_php
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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