Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Apr 2002
Posts: 206
Member
Member
Offline
Joined: Apr 2002
Posts: 206
Script attached. It goes in your ubbthreads install directory, and you can delete it afterwards. [:"red"]You will require a backup from previous to the upgrade, specifically your w3t_Posts table. A new, renamed table (w3t_OldPosts) containing your old posts data is required - you will have to use PHPMyAdmin or some kind of tool or whatever to do this. Be sure and back up your current w3t_Posts table again just in case.[/]

I don't know if it's been noticed, but currently when you upgrade to 6.2, it deletes the Usernames from the w3t_Posts table, which means you lose the names of the people who posted stuff and had their username later deleted, because their username ID is 1 (appears as **DONOTDELETE**).

If you happen to have a backup of your w3t_Posts table (from 6.1.1 or earlier), with this script you can restore those lost names. You need to Restore your backup as w3t_OldPosts, then execute the script.

What it does is it grabs all posts that have been posted by Registed Users with the ID of 1, which means they were deleted. It takes their Username from the old table, and places it in the AnonName from the new table, and reflags them as unregistered posters.

When I ran it, it went through about 10,000 posts, and for some reason, some names could not be restored. Most were, though. Probably 90%. YMMV, but it's better than having **DONOTDELETE** everywhere.

If there are problems that you encounter, I'll watch this thread for replies.

Thanks!

ps. -demo of the result here: http://www.legendsoftacendia.com/fo...collapsed&sb=5&o=all&fpart=1
Attachments
63662-fix.php.txt (0 Bytes, 37 downloads)

Last edited by Dalar; 01/06/2003 7:16 PM.
Sponsored Links
Entire Thread
Subject Posted By Posted
[6.2] Restore Lost Usernames to Old Posts (fix) Dalar 01/05/2003 9:20 AM
Re: [6.2] Restore Lost Usernames to Old Posts (fix) Dalar 01/06/2003 11:49 AM
Re: [6.2] Restore Lost Usernames to Old Posts (fix caymuc 01/06/2003 12:19 PM
Re: [6.2] Restore Lost Usernames to Old Posts (fix caymuc 01/06/2003 2:06 PM
Re: [6.2] Restore Lost Usernames to Old Posts (fix Dalar 01/06/2003 10:53 PM
Re: [6.2] Restore Lost Usernames to Old Posts (fix Dalar 01/06/2003 10:56 PM
Updated the script Dalar 01/06/2003 11:09 PM
Re: Updated the script xyzyzzyx 01/07/2003 12:07 AM
Re: Updated the script Dalar 01/07/2003 1:33 AM
Re: Updated the script Dalar 01/07/2003 2:04 AM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,575
Posts293,930
Members13,823
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)