Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons

Reply
 
Thread Tools
Change Guest to User on threads (EZBoard) Details »»
Change Guest to User on threads (EZBoard)
Version: 1.00, by Freddie Bingham Freddie Bingham is offline
Developer Last Online: Aug 2016 Show Printable Version Email this Page

Version: 3.5.1 Rating:
Released: 11-11-2005 Last Update: Never Installs: 12
 
No support by the author.

This is an updated of the Ezboard Guest -> Registered user script. I took feldon's copy and hacked it up to 3.5 support.

The 3.0 version is here

Please realize that I am extremely busy and probably won't be able to support this much. I do plan to integrate something more robust into vBulletin so you no longer need to come here to gain this functionality. Perhaps you can bug feldon23 for support? The 3.0/3.5 code differences are easy enough to understand when you compare the two.

Save this as ezimport.php and place it in your admincp directory. Also note that it has no Admincp permission checking so buyer beware.

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
*            Updated to vBulletin 3.5.x by Freddie, pester Feldon for support
*
*        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');

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

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

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

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

print_cp_header('EZBoard Post Associator');

if ($_POST['do'] == 'update')
{
    $vbulletin->input->clean_array_gpc('p', array(
        'newusername' => TYPE_NOHTML,
        'oldusername' => TYPE_NOHTML,
    ));

    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;">';
    if (!empty($vbulletin->GPC['oldusername']) AND  !empty($vbulletin->GPC['newusername']))
    {
        if (!($getuser = $db->query_first("SELECT userid FROM " . TABLE_PREFIX . "user WHERE username='" . $db->escape_string($vbulletin->GPC['newusername']) . "'")))
        {
            echo "<b>You have entered an invalid vBulletin username!</b><br />\n";
            echo "There is no user by the name of <b>" . $vbulletin->GPC['newusername'] . "</b> registered on this forum.<br><br>\n";
        }
        else
        {
            // get hold of his/her posts and update threads
            echo "Associating vB user <b>" . $vbulletin->GPC['newusername'] . " (#" . $getuser['userid'] . ")</b> with their EZBoard posts under username <b>" . $vbulletin->GPC['oldusername'] . "</b>...";
         $db->query_write("
             UPDATE " . TABLE_PREFIX . "post
             SET userid = $getuser[userid],
                 username = '" . $db->escape_string($vbulletin->GPC['newusername']) . "'
             WHERE username = '" . $db->escape_string($vbulletin->GPC['oldusername']) . "'
         ");
         $db->query_write("
             UPDATE " . TABLE_PREFIX . "thread
             SET postuserid = $getuser[userid],
                 postusername = '" . $db->escape_string($vbulletin->GPC['newusername']) . "'
             WHERE postusername = '" . $db->escape_string($vbulletin->GPC['oldusername']) . "'
         ");
         $db->query_write("
             UPDATE " . TABLE_PREFIX . "thread
             SET lastposter = '" . $db->escape_string($vbulletin->GPC['newusername']) . "'
             WHERE lastposter = '" . $db->escape_string($vbulletin->GPC['oldusername']) . "'
         ");
         $db->query_write("
             UPDATE " . TABLE_PREFIX . "forum
             SET lastposter = '" . $db->escape_string($vbulletin->GPC['newusername']) . "'
             WHERE lastposter = '" . $db->escape_string($vbulletin->GPC['oldusername']) . "'
         ");
         echo "<b>Done!</b><br /><br />\n";

         // Update post counts
         if (!($totalposts = $db->query_first("SELECT COUNT(postid) AS posts FROM " . TABLE_PREFIX . "post WHERE userid = $getuser[userid]")))
         {    // some versions of mysql like to return nothing if there are no matching rows when they should return 0
             $totalposts['posts'] = 0;
         }
         $db->query_write("UPDATE " . TABLE_PREFIX . "user SET posts = $totalposts[posts] WHERE userid = $getuser[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('ezimport', 'update');
print_table_header('Merge vBulletin account with old EZBoard Posts');
print_input_row('vBulletin username', 'newusername');
print_input_row('EZBoard username', 'oldusername');
print_submit_row();
print_table_footer();

print_cp_footer();

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

?>

Show Your Support

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

Comments
  #2  
Old 11-11-2005, 11:27 PM
Daniel's Avatar
Daniel Daniel is offline
 
Join Date: Jul 2005
Location: USA
Posts: 707
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Will check it out
/me installs
Reply With Quote
  #3  
Old 11-12-2005, 05:43 AM
Okie's Avatar
Okie Okie is offline
 
Join Date: Oct 2005
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

woow thankyou alot this is very usefull hack.. i have convert my board from IPB and i have alot of User that is deleted and showing as guest .. i think this hack going to help me as alot
Reply With Quote
  #4  
Old 11-12-2005, 06:03 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you Freddie for taking the time to convert this to 3.5.

I am sure that there are plenty members that will try to give support for this.
Reply With Quote
  #5  
Old 11-12-2005, 07:46 AM
Alex Apple Alex Apple is offline
 
Join Date: Aug 2004
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Freddie, you are a GOD! Thank you very much!
Reply With Quote
  #6  
Old 11-12-2005, 11:25 AM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Freddie!
Reply With Quote
  #7  
Old 11-12-2005, 03:19 PM
EasyTarget EasyTarget is offline
 
Join Date: Nov 2004
Posts: 660
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

wow, thank you. I asked on vbulletin.com how to do this and never got a response. I have all the old posts from ezboard just sitting in their own locked forum just waiting for this.
Reply With Quote
  #8  
Old 11-14-2005, 07:07 PM
feldon23's Avatar
feldon23 feldon23 is offline
 
Join Date: Oct 2001
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by EasyTarget
wow, thank you. I asked on vbulletin.com how to do this and never got a response. I have all the old posts from ezboard just sitting in their own locked forum just waiting for this.
Thanks, Freddie!

I really must learn this OOP stuff.
Reply With Quote
  #9  
Old 01-06-2006, 09:31 AM
JonUrban JonUrban is offline
 
Join Date: Jul 2003
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This works GREAT! I just tried it on my vB 3.5.2 install, and it works perfectly.

THANKS!

:-jon
www.quadraphonicquad.com/forums
Reply With Quote
  #10  
Old 08-30-2006, 02:26 PM
Big-K Big-K is offline
 
Join Date: Feb 2005
Posts: 139
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does this work on 3.6.0?
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 11:32 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.04196 seconds
  • Memory Usage 2,303KB
  • Queries Executed 23 (?)
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
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)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_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