vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Change Guest to User on threads (EZBoard) (https://vborg.vbsupport.ru/showthread.php?t=60983)

Teresa 01-30-2004 11:25 PM

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??

Titus 05-28-2004 04:09 PM

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!

Titus 05-31-2004 01:44 PM

Pretty Please?

*blinks bambi-eyes*

dstruct2k 05-31-2004 03:16 PM

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. :)

dstruct2k 05-31-2004 03:23 PM

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'"); 

:D

Titus 06-01-2004 02:36 AM

Awesome, thanks!

Berethorn 07-07-2004 11:54 PM

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? :)

Titus 08-16-2004 03:28 PM

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.

lazserus 09-12-2004 05:11 PM

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.

feldon23 07-18-2005 10:40 PM

This works on vB3.0.7?


All times are GMT. The time now is 06:54 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.02088 seconds
  • Memory Usage 1,743KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete