Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Thread Prefixes upgrade from Mystics to 3.7 Details »
Thread Prefixes upgrade from Mystics to 3.7
Mod Version: 1.04, by Pottsy (Member) Pottsy is offline
Developer Last Online: May 2014 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.7.x Rating: (0 vote - 0 average) Installs: 33
Released: 21 Dec 2007 Last Update: 21 Dec 2007 Downloads: 287
Not Supported DB Changes Re-usable Code  

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.

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	tpup1.gif
Views:	773
Size:	48.5 KB
ID:	73520   Click image for larger version

Name:	tpup2.gif
Views:	1120
Size:	39.0 KB
ID:	73521  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Miscellaneous Hacks Thread Prefixes Mystics vBulletin 3.6 Add-ons 516 18 Jan 2016 11:24
Thread Prefixes Mystics vBulletin 3.5 Add-ons 368 09 Aug 2009 00:52

Comments
  #2  
Old 21 Dec 2007, 07:37
Pottsy Pottsy is offline
 
Join Date: Sep 2006
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.
Reply With Quote
  #3  
Old 21 Dec 2007, 10:02
Delazar Delazar is offline
 
Join Date: May 2004
Hi Pottsy,

for my system your add-on doesnīt work, because the system accept the tableprefix.
My tapleprefix is fantasy.

regards
Delazar


Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #4  
Old 21 Dec 2007, 11:01
Pottsy Pottsy is offline
 
Join Date: Sep 2006
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.
Reply With Quote
  #5  
Old 21 Dec 2007, 11:59
Delazar Delazar is offline
 
Join Date: May 2004
Sorry, but the tableprefix is still not being accepted.

regards
Delazar

Warning: Table 'vbtest.forum' doesn't exist in /var/www/xxx/htdocs/test/ez_sql_mysql.php on line 204

Warning: Invalid argument supplied for foreach() in /var/www/xxx/htdocs/test/tpup.php on line 10
Done.
Now you MUST rebuild all languages in AdminCP > Languages & Phrases > Language Manager > Rebuild All Languages.
my db.php

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #6  
Old 21 Dec 2007, 12:08
Mystics's Avatar
Mystics Mystics is offline
 
Join Date: Oct 2001
Real name: Mike
Remove this line in tpup.php:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

And change:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

to:
Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Reply With Quote
  #7  
Old 21 Dec 2007, 12:15
Pottsy Pottsy is offline
 
Join Date: Sep 2006
Dalazar,

Just updated it.
Reply With Quote
  #8  
Old 21 Dec 2007, 12:20
Pottsy Pottsy is offline
 
Join Date: Sep 2006
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!
Reply With Quote
  #9  
Old 21 Dec 2007, 12:26
Mystics's Avatar
Mystics Mystics is offline
 
Join Date: Oct 2001
Real name: Mike
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_';
Reply With Quote
  #10  
Old 21 Dec 2007, 12:35
Pottsy Pottsy is offline
 
Join Date: Sep 2006
Aha!

Can you tell I picked up a "How to program php" book 2 days ago?

I'll make the appropriate changes.
Reply With Quote
  #11  
Old 21 Dec 2007, 12:45
Delazar Delazar is offline
 
Join Date: May 2004
Thanks Pottsy and Mystics,

itīs working now

regards
Delazar
Reply With Quote
  #12  
Old 21 Dec 2007, 13:42
rellek rellek is offline
 
Join Date: Sep 2006
Thanks a lot. Will try it soon - and give my vote for MOTM
Reply With Quote
  #13  
Old 21 Dec 2007, 14:55
daFish's Avatar
daFish daFish is offline
 
Join Date: Nov 2002
Real name: Marcus
Great converter - works perfectly on my testboard.
Thanks for this.
Reply With Quote
  #14  
Old 21 Dec 2007, 15:11
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Real name: Josh
Thanks for this!
Reply With Quote
  #15  
Old 21 Dec 2007, 16:05
rellek rellek is offline
 
Join Date: Sep 2006
Okay, tested, working well, nominated for MOTM

Thank you again!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 21:39.

Layout Options | Width: Wide Color: