This script is designed to help a YaBB SE Administrator "recover" posts that were made by a now defunct poster, who has since re-signed up to the forums. This script will review the existing posts that have deleted/closed accounts and update the originating poster's info with the new member's user ID and memberName. This will NOT update the topics table, since that is tied into ID_MEMBER, and if you don't know the member's old ID, it's just too hard to track it down.
Without this script, there are 1 tables/2 fields that need to be adjusted manually. This script solves that dilema very quickly and easily. Read on for instructions/directions.
DIRECTIONS -=- DIRECTIONS -=- DIRECTIONS -=- DIRECTIONS -=- DIRECTIONS
Okay, after much testing and troubleshooting and fixing, it'll work with the YSE system.
This is designed to work SPECIFICALLY with 1.5.1 FINAL THROUGH 1.5.4, if anyone else needs to utilize this "tool". This has been confirmed to work on Linux/Unix systems, but not on Windows (Don't know why, though).
Please read this before you download it.
I have tested this on one of my own forums to ensure that it works. While it does work, I will not guarantee that it will work on your system.
VERY IMPORTANT! VERY IMPORTANT! VERY IMPORTANT! VERY IMPORTANT!
After you run this script, DELETE it from your FTP area or CHMOD it 000 IMMEDIATELY! Leaving this file up provides a VERY major security risk, as anyone can use this to reset an Admin's post as their own! I cannot and will not be held responsible for any negligent action as a result of you leaving this file up or not CHMODding it.
VERY IMPORTANT! VERY IMPORTANT! VERY IMPORTANT! VERY IMPORTANT!Using this is done at your OWN risk. I cannot and will not be held responsible for any potential or actual damage this script does. I have tested this on one of my client's sites to ensure it works. By downloading this file and uploading it to your server, you signify that you agree to this.Having said this, this script will make the following changes:
Updates the following tables/fields, as indicated:
Quote
messages SET ID_MEMBER='newmemberID' WHERE posterName='oldmemberName'
messages SET posterName='newmemberName' WHERE posterName='oldmemberName'
Once you run this script, it will update all posts, but not threads, to point it from a deleted account to the newly created account. Download this, unzip it and then upload it to the same directory that Settings.php is located at (Settings.php is case sensitive). If you have renamed or changed casings of Settings.php, open the file in any text editor and change the first line to reflect your current settings file.
To the YaBB SE Devel team, if you want to incorporate this into a future version, be my guest, no credits necessary. To any forum developer outside of the YaBB SE Devel Team, you will need to obtain written authorization from me (Douglas, webmaster at therealms dot net) before you include this in your systems (yes, this means you too, ajp! You know who you are. :/ ).
Credit goes to charlottezweb for kickin' me in the butt to come up with this.
IMPORTANT: After running the script, log into your Admin area and click on the link to update post counts. While my script adjusts the posts, assigning them to a valid user, it does NOT adjust post counts. You will need to manually do that.