Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Thread Prefixes upgrade from Mystics to 3.7 Details »»
Thread Prefixes upgrade from Mystics to 3.7
Version: 1.04, by Pottsy Pottsy is offline
Developer Last Online: May 2014 Show Printable Version Email this Page

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.

Comments
  #32  
Old 04-30-2008, 09:38 PM
antialiasis's Avatar
antialiasis antialiasis is offline
 
Join Date: Jan 2006
Location: Iceland
Posts: 346
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #33  
Old 05-10-2008, 07:04 PM
Lucas Lucas is offline
 
Join Date: Dec 2001
Posts: 38
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #34  
Old 05-15-2008, 07:16 PM
Mecho's Avatar
Mecho Mecho is offline
 
Join Date: Aug 2006
Posts: 648
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 .
Reply With Quote
  #35  
Old 06-15-2008, 07:58 PM
Pottsy Pottsy is offline
 
Join Date: Sep 2006
Location: UK
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #36  
Old 06-15-2008, 08:00 PM
Pottsy Pottsy is offline
 
Join Date: Sep 2006
Location: UK
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mecho View Post
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.
Reply With Quote
  #37  
Old 06-15-2008, 08:02 PM
Pottsy Pottsy is offline
 
Join Date: Sep 2006
Location: UK
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by antialiasis View Post
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?
Quote:
Originally Posted by LucasG View Post
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
This script converts Mystics prefixes from his TP hack found in 3.6 into prefixes in 3.7 format. You run it once and then delete it.
Reply With Quote
  #38  
Old 06-27-2008, 07:19 PM
gullim gullim is offline
 
Join Date: Oct 2006
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I get following error

Quote:
Warning: Unknown column 'threadprefix' in 'field list' in C:\xampp\htdocs\board\tpup\ez_sql_mysql.php on line 204

Warning: Invalid argument supplied for foreach() in C:\xampp\htdocs\board\tpup\tpup.php on line 10
Done.
The connection through database is correct Has anyone some tips?!
Reply With Quote
  #39  
Old 06-28-2008, 04:00 AM
hoangminh hoangminh is offline
 
Join Date: Jan 2005
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This script does not work with the Unicode Character, it will make a lot prefix become empty and error.

Any ideas ?
Reply With Quote
  #40  
Old 01-19-2009, 11:40 AM
Birched Birched is offline
 
Join Date: Sep 2007
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #41  
Old 01-19-2009, 05:19 PM
Birched Birched is offline
 
Join Date: Sep 2007
Posts: 35
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 07:29 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09294 seconds
  • Memory Usage 2,306KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete