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

Reply
 
Thread Tools Display Modes
  #1  
Old 01-30-2004, 11:25 PM
Teresa Teresa is offline
 
Join Date: Jan 2004
Posts: 84
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Change Guest to User on threads (EZBoard)

Freddie just updated my vB3 with my old EZBoard posts. Worked GREAT! Yea.

Now I'd like to be able to convert the old GUEST userid's to registered members (including my own) as the new come over and register on the site.

I think I've found two vB tables: POSTS and THREADS that contain the userid and the user name.

I manually changed one post to test it, and changing the userid from zero to the correct userid number works perfectly.

So, I just need a simple script to search for users of a certain name and change the associated userid's to the appropriate number.

ALSO, I need to rerun some query to properly update the number of posts for that user.

Anybody??
Reply With Quote
  #2  
Old 05-28-2004, 04:09 PM
Titus Titus is offline
 
Join Date: Apr 2004
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry to bump this, but I too would like this hack. Our board is planning on moving off of ezBoard very soon, and I really, really do not want to import to vb2, and then upgrade to 3.

If someone could update this hack to vB3, I would be incredibly grateful.

Thanks!
Reply With Quote
  #3  
Old 05-31-2004, 01:44 PM
Titus Titus is offline
 
Join Date: Apr 2004
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Pretty Please?

*blinks bambi-eyes*
Reply With Quote
  #4  
Old 05-31-2004, 03:16 PM
dstruct2k's Avatar
dstruct2k dstruct2k is offline
 
Join Date: Dec 2002
Location: Winnipeg
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Actually, that code looks like it would work with vb3 as well... At least, the part where it links new registrants to old accounts.

I'll still look for antiquated functions and fix if needed, but I think it's good.
Reply With Quote
  #5  
Old 05-31-2004, 03:23 PM
dstruct2k's Avatar
dstruct2k dstruct2k is offline
 
Join Date: Dec 2002
Location: Winnipeg
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Alright, it was just missing TABLE_PREFIX's but I added them and cleaned up the code.

In register.php find:
PHP Code:
        $userid $DB_site->insert_id(); 
After add:
PHP Code:
        // get hold of his posts and update threads 
        
$DB_site->query("UPDATE " TABLE_PREFIX "post SET userid='$userid' WHERE username='".addslashes(htmlspecialchars($_POST['username']))."' AND visible<>0"); 
        
$DB_site->query("UPDATE " TABLE_PREFIX "thread SET postuserid='$userid' WHERE postusername='".addslashes(htmlspecialchars($_POST['username']))."' AND visible<>0"); 
        
$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'"); 
Reply With Quote
  #6  
Old 06-01-2004, 02:36 AM
Titus Titus is offline
 
Join Date: Apr 2004
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Awesome, thanks!
Reply With Quote
  #7  
Old 07-07-2004, 11:54 PM
Berethorn Berethorn is offline
 
Join Date: Jun 2004
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is this a proven working script, then? And if I someone registers with their username before the old posts move from ezboard, will those old posts not get linked?
Reply With Quote
  #8  
Old 08-16-2004, 03:28 PM
Titus Titus is offline
 
Join Date: Apr 2004
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It worked great for me. I deleted all the user accounts that had been registered prior to our ezboard being moved over, so I can't say whether or not this would work with an existing user.

Hmm.. If you have a lot of users registered already, and they want their old posts back, I would say you would (short of writing a merge hack, which I recall seeing for vb2 somewhere) change the existing user name (Like: Bob2), then have the person register their old name (Bob), and then merge the two together.

Lots of trouble to go through though.
Reply With Quote
  #9  
Old 09-12-2004, 05:11 PM
lazserus's Avatar
lazserus lazserus is offline
 
Join Date: Mar 2004
Location: Planet Earth
Posts: 72
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Has anyone figured how to implement these hacks after the board has been converted by vB? I've been with vB for over a year and no hack I've tried links usernames. For instance, my username here is the same on my board, but all the old EzBoard posts (under the exact same name) show me as a guest. I see how hacking the register.php would link NEW users to a guest name, but I need to link currently registered members over. The vB2 script did this, but it doesn't work for vB3.

I'm not a coder, so I can't write a script for it. I'm also not about to make 600 of my members register again and do merging. That's just too much.
Reply With Quote
  #10  
Old 07-18-2005, 10:40 PM
feldon23's Avatar
feldon23 feldon23 is offline
 
Join Date: Oct 2001
Posts: 124
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This works on vB3.0.7?
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 12:20 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.05586 seconds
  • Memory Usage 2,260KB
  • Queries Executed 11 (?)
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_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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_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