Version: 1.04, by Pottsy
Developer Last Online: May 2014
Category: Administrative and Maintenance Tools -
Version: 3.7.x
Rating:
Released: 12-20-2007
Last Update: 12-20-2007
Installs: 35
DB Changes
Re-useable Code
No support by the author.
Thread prefixes upgrade.
This script upgrades the old Thread Prefixes hack by Mystics to the new thread prefixes found in 3.7+. The only guarantee is that it works on my test server, going from 3.6.8 to 3.7.0B3.
It is a one-run operation. The script reads the details of the old thread prefix system from your database, and then writes new entries for the new system into your database. The code is rough and ready (OK, it's my first ever script), so do NOT use it unless you have backed up your database and are prepared to restore it.
It will create a fully populated prefixset for each forum with prefixes, and then assign the prefixes to the threads in that forum.
The rich text format of the new prefix is set to be bold with square brackets around, although if you want to change that you can edit tpup.php (there is a commented out version of the query, that will make the text plain - it should be obvious).
Instructions.
1. Upgrade to 3.7 and revert all templates.
2. Open dp.php in a text editor and enter your database login details.
3. Upload all 4 .php files to a new folder on your server (or test server).
4. Backup your database.
5. Browse to tpup.php in your browser to run it.
6. When it's done, close the browser window and delete the files from your server.
7. Now you must rebuild all languages in AdminCP > Languages & Phrases > Language Manager > Rebuild All Languages. If you miss this step, nothing will work!
8. Please report any success or failure in this thread.
Versions:
1.00 First go.
1.01 Added the facility to specify a database table prefix.
1.04 Got the table prefix right, thanks to Mystics.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Used this for real now on my forum - went from 3.6.8 PL1 to 3.7.1 PL1 without a hitch.
I suspect that this will fall over if you have special characters in your prefixes, so apologies if it doesn't work for you. Feel free to pick up the code and do what you like with it!
hmm it doesnt really import all the prefixes for me . just in some forums it add prefixes to some forums that i havent any prefix on them !!
also now all the prefixes are like this > [[prefix]]
Any idea ?
i can not open my forum until i can fix this as we are really using prefixes in our forum .
You can get rid of the formatting by changing the query in tpup.php (open the file and follow the instructions about commenting out one query and uncommenting the other).
No idea why it should invent prefixes, unless you have old ones in your database that shouldn't be there.