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
  #22  
Old 12-22-2007, 09:50 AM
Pottsy Pottsy is offline
 
Join Date: Sep 2006
Location: UK
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Trigr View Post
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
If you want to continue using Mystics hack with 3.7, then you do NOT need to run this converter. Just revert and re-modify a whole load of templates.

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.
Reply With Quote
  #23  
Old 12-22-2007, 12:52 PM
Trigr Trigr is offline
 
Join Date: Jun 2007
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Pottsy View Post
If you want to continue using Mystics hack with 3.7, then you do NOT need to run this converter. Just revert and re-modify a whole load of templates.

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.


gotcha ..... Thanks.
Reply With Quote
  #24  
Old 12-23-2007, 10:47 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice, I'll be looking at this for the upgrade of vb.org to 3.7 as we use prefixes.
Reply With Quote
  #25  
Old 12-23-2007, 06:36 PM
Kaleem's Avatar
Kaleem Kaleem is offline
 
Join Date: May 2006
Location: New Jersey
Posts: 324
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Worked perfectly great
Reply With Quote
  #26  
Old 12-23-2007, 10:19 PM
Rageem Rageem is offline
 
Join Date: Oct 2004
Posts: 10
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 "?????"



And see this error in running

Code:
Doing forum 2...........
Doing forum 4..........
Doing forum 8...
Warning: Duplicate entry '?????8' for key 1 in /home/_/public_html/forum/ez_sql_mysql.php on line 204

Warning: Duplicate entry 'prefix_?????8_title_rich-0-global' for key 2 in /home/_/public_html/forum/ez_sql_mysql.php on line 204

Warning: Duplicate entry 'prefix_?????8_title_plain-0-global' for key 2 in /home/_/public_html/forum/ez_sql_mysql.php on line 204
......Done. 
Now you MUST rebuild all languages in AdminCP > Languages & Phrases > Language Manager > Rebuild All Languages.
Thanks
Reply With Quote
  #27  
Old 12-30-2007, 07:56 AM
Pottsy Pottsy is offline
 
Join Date: Sep 2006
Location: UK
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Rageem, I'm sorry I have no experience with non-Roman characters in databases like this.
Reply With Quote
  #28  
Old 01-17-2008, 09:13 AM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Pottsy, do you have ideas about how to merge prefixes or prefix sets?
Reply With Quote
  #29  
Old 01-17-2008, 02:26 PM
Pottsy Pottsy is offline
 
Join Date: Sep 2006
Location: UK
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #30  
Old 01-18-2008, 04:56 AM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That would be a big enhancement. Is it possible to add a feature where the admin can select which sets to merge?
Reply With Quote
  #31  
Old 04-06-2008, 01:36 PM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Pottsy View Post
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.
Please see this modification request:
https://vborg.vbsupport.ru/showthread.php?p=1484367
Quote:
Originally Posted by Alfa1 View Post
Before vbulletin 3.7 I used this hack: Thread Prefixes to have this functionality. Since vbulletin 3.7 thread prefixes are built into vbulletin.
I used this hack to import my thread prefixes into vb 3.7: Thread Prefixes upgrade from Mystics to 3.7

This hack created one prefixes set per forum, because vbulletin 3.7 introduced prefixes sets. This means that I now have 46 almost identical sets of prefixes. Each set contains between 10 and 25 prefixes. Most sets and most prefixes are almost identical. I would like to merge many thread prefixes and sets, so that I just have a few different prefixes sets left. But I do not want to loose prefixes on the thousands of threads that have been categorized with them.

As far as I understand this would be a simple script to code. I may be wrong. Either way; it will be very helpful to many admins and safe loads of work.
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:12 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.10288 seconds
  • Memory Usage 2,316KB
  • 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
  • (1)bbcode_code
  • (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
  • (3)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