![]() |
Thread Prefixes upgrade from Mystics to 3.7
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. |
I have only tested this on my forum, on a test server.
I would suggest testing this on a test server first, until we have had a bit of feedback. If it works for you, please post your success (or not) here. |
Hi Pottsy,
for my system your add-on doesn?t work, because the system accept the tableprefix. My tapleprefix is fantasy. regards Delazar Code:
Warning: Table 'vbtest.forum' doesn't exist in /var/www/xxxxx/htdocs/test/ez_sql_mysql.php on line 204 |
Delazar,
Have a go with ver 1.01. There is now another variable you can specify in db.php where you can enter your table prefix. |
Sorry, but the tableprefix is still not being accepted.
regards Delazar Quote:
PHP Code:
|
Remove this line in tpup.php:
Code:
if ($table_prefix != "") {$table_prefix .= ".";} Code:
FROM forum"); Code:
FROM " . $table_prefix . "forum"); |
Dalazar,
Just updated it. |
Mystics, if I remove that line, then it errors because the table name is tableprefixtable not tableprefix.table. Have I missed something?
PS thanks for dropping by, and many thanks for the original hack! |
You can't just add "." to the table prefix as the user itself has to choose if and which delimiter he uses. Most users uses "_", not "." :)
Just compare it with the vBulletin Code, they don't add "." to the prefix. FROM " . TABLE_PREFIX . "forum AS forum You may define such a prefix for example: $config['Database']['tableprefix'] = 'vb3_'; |
Aha!
Can you tell I picked up a "How to program php" book 2 days ago? I'll make the appropriate changes. |
Thanks Pottsy and Mystics,
it?s working now:up: regards Delazar |
Thanks a lot. Will try it soon - and give my vote for MOTM :)
|
Great converter - works perfectly on my testboard.
Thanks for this. |
Thanks for this!
|
Okay, tested, working well, nominated for MOTM :)
Thank you again! |
thanks for sharing... works great..
:D:D:D |
just so im understanding .......
i must have your original from https://vborg.vbsupport.ru/showthread.php?t=123033 installed on my 3.6.x board before i try the upgrade to 3.7 then once i upgrade to 3.7 i have to use this to convert over so it will work again? id love to use this .... just want to be clear. thanks |
Quote:
If you're using Mystics prefix hack a lot in your forums, then this hack is for you if you're upgrading to vB3.7. Otherwise not. ;) |
This is greatly appreciated. At what stage do we:
remove the product remove the files: threadprefix.php and includes/functions_threadprefix.php remove the templates: threadprefix_listbit and threadprefix_modify revert the two templates that are not changed for 3.7: threadbit_announcement and SUBSCRIBE Bob |
I would do that once you know you are never going to need the old data. So for me it will be once I upgrade my live site to 3.7.? and get it happily running, and take a "I'm happy with it" backup.
|
Quote:
If you want to abandon Mystics hack and start using the native vbulletin thread prefixes, then this script will move your data from Mystics hack into the right place so the native vbulletin system can see it. |
Quote:
gotcha ..... Thanks. |
Nice, I'll be looking at this for the upgrade of vb.org to 3.7 as we use prefixes.
|
Worked perfectly great :)
|
I happy for this script :) , and I would be very happy if you fixed this problem ;)
I have Arabic language "UTF-8" and I use Collation "utf8_general_ci" in mysql for my forum. And I test this script, after the script was used on the characters to "?????" https://vborg.vbsupport.ru/attachmen...1&d=1198455472 And see this error in running Code:
Doing forum 2........... |
Rageem, I'm sorry I have no experience with non-Roman characters in databases like this.
|
Pottsy, do you have ideas about how to merge prefixes or prefix sets?
|
Alfa1, it was me at vb.com... I think I know what you want, and shall try to achieve this when I test and re-build on the next beta release. In essence, I shall try to get the script to (optionally) read all prefixes everywhere and make one set, then apply that one set to all forums.
|
That would be a big enhancement. Is it possible to add a feature where the admin can select which sets to merge?
|
Quote:
https://vborg.vbsupport.ru/showthread.php?p=1484367 Quote:
|
I was just attempting to use this on my 3.7.0 installation, but all the prefixes I get now have no names. Any idea why?
|
Does this work as a stand-alone script or is it just an upgrade? I am looking to have prefixes for my new vB 3.7
|
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 . |
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! |
Quote:
No idea why it should invent prefixes, unless you have old ones in your database that shouldn't be there. |
Quote:
Quote:
|
I get following error
Quote:
|
This script does not work with the Unicode Character, it will make a lot prefix become empty and error.
Any ideas ? |
Has anyone tried this to do a more drastic upgrade? Like *gulp* go from a 3.0 'category hack' to v. 3.8 integrated prefixes?
|
I tried to run this and ran into a problem with any forum that had an apostrophe in the title. What's a good way around that?
|
All times are GMT. The time now is 06:18 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|