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();
?>
Just added some fancy code, includes a form now so you can just enter two usernames and click update.