The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Comments |
#2
|
|||
|
|||
Is there anyway you can update this script so that you can type the old and new usernames in a form and press an update button, instead of having to upload the script 100 times?
I would be SO greatful if someone could do this. It would totally ROCK! |
#3
|
||||
|
||||
Nice addition Darkreaper
|
#4
|
||||
|
||||
Save this file as whatever you want .php and upload to your admin folder:
Code:
<? /****************************************************************************** * ezboard import member converter * By Jason "DarkReaper" Rodzik * Special Thanks to Firefly and Stallion * * http://www.unrealtournament.org/forums * * * Support for this hack at: * http://vbulletin.com/forum/showthrea...threadid=31443 *******************************************************************************/ error_reporting(7); require("./global.php"); $thisscript=substr($PHP_SELF, 0, strlen($PHP_SELF)-4); cpheader(); if ($HTTP_POST_VARS['action']=="update") { if (isset($oldusername) and isset($newusername)) { $getuserid=$DB_site->query_first("SELECT userid FROM user WHERE username='$newusername'"); $userid=$getuserid[userid]; // get hold of his posts and update threads $DB_site->query("UPDATE post SET userid='$userid',username='$newusername' WHERE username='".addslashes(htmlspecialchars($oldusername))."'"); $DB_site->query("UPDATE thread SET postuserid='$userid',postusername='$newusername' WHERE postusername='".addslashes(htmlspecialchars($oldusername))."'"); $DB_site->query("UPDATE thread SET lastposter='$newusername' WHERE lastposter='".addslashes(htmlspecialchars($oldusername))."'"); $DB_site->query("UPDATE forum SET lastposter='$newusername' WHERE lastposter='".addslashes(htmlspecialchars($oldusername))."'"); // Update post counts $totalposts=$DB_site->query_first("SELECT COUNT(postid) AS posts FROM post WHERE userid='$userid'"); $DB_site->query("UPDATE user SET posts='$totalposts[posts]' WHERE userid='$userid'"); echo "Fixing user with ID of $userid and posts are $totalposts[posts]\n\nYou should now update your member titles."; } else { echo "Please enter new and old usernames."; } } doformheader("$thisscript","update"); maketableheader("Update user stuff"); makeinputcode("His new username","newusername","$newusername"); makeinputcode("His old username","oldusername","$oldusername"); doformfooter("Update!"); cpfooter(); ?> |
#5
|
||||
|
||||
I'll see if I can't put something in the CP that will help with this or just reinstating a user who you deleted. There is already an option to rebuild post counts in the next version.
|
#6
|
|||
|
|||
Thanks FireFly, I updated the attachment
freddie: Great! |
#7
|
|||
|
|||
For some reason, if the old and new usernames are not the same, it will not work. I tried this with a few of my users, and instead of the usual message it said
Fixing user with ID and posts are 8900 You should now update your member titles. There was No user ID, and I think the 8900 is the number of total posts on the board. Anyway, I hope this doesn't mess anything up. It's not a big, deal, I don't have to have it, but I was just letting people know that it doesn't work...The rest of it works great though... On the other hand thier are a few users on my board that changed usernames... |
#8
|
|||
|
|||
It works fine for me when they're different. If it didn't, I wouldn't have released it
What version of vBulletin are you running? Are you sure that you're inputting the EXACT nicknames correctly? And that you're putting the old username and new username in the correct box? What are some of the old/new usernames that are giving you problems? |
#9
|
|||
|
|||
I am running the most cuurent version. 2.0.3. The usernames I tried were hooky27 to Alex....Eson to Emerson...
I just tired it again and got thepotterconnection to Wizard Girl to work... Don't know why...I am confused. Thanks for the help though. well it said it worked..but I don't think it did...the posts don't show up in the search for username...I think I messed it up...now not even the posts she has posted since vbulletin show up.... Is there anyway to fix this... |
#10
|
|||
|
|||
Try rebuilding your search index. That *should* fix it.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|