Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons

Reply
 
Thread Tools
Thread Prefixes Details »»
Thread Prefixes
Version: 1.6.2, by Mystics Mystics is offline
Developer Last Online: Jun 2015 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.6.x Rating:
Released: 08-03-2006 Last Update: 05-24-2008 Installs: 459
DB Changes Uses Plugins Template Edits
Re-useable Code Code Changes Additional Files Translations  
No support by the author.

Thread Prefixes

Version: 1.6.2
vBulletin Version: 3.6.10
Developer: Michael (Mystics) Koenig (www.vbulletin-germany.com)
Modification-Language: English & German & French (thanks to ReadWrite - Note: Readme has not yet been translated to french.)
Install-difficulty: Medium
File-edits: 5
Template-edits: 10


Brief Description of the Modification

This modification allows your users to choose a thread prefix for each thread. To do this you are able to select an appropriate prefix from a list beside the title while posting a new thread - for example 'Help', 'Problem', 'Search' etc.

This prefix will be displayed in front of the thread title. The result will be for example:
Problem - I can't find this setting

Problem is the thread prefix, I can't find this setting is the title of the thread.

The prefixes displayed in this list may be defined by a moderator for each of his moderated forums (Forum Tools -> Manage Thread Prefixes); of course an administrator and a super moderator is allowed to do this for every forum.


Features
  • Moderators are able to create own prefixes for each of their moderated forums.
    (Forum -> Forum Tools -> Manage Thread Prefixes -> threadprefix.php)
  • Display of the prefixes on forum display, search results, subscribed threads and within the thread itself.
  • It is possible to change the prefix with editing the first post of a thread or with the thread tools available for moderators at any time.
Settings in Admin CP
  • Maximum prefixes per forum
  • Thread Prefix required: Users have to select a thread prefix for their threads. You can select this globally for all forums or on a per forum basis.
  • Default Thread Prefixes: You may set default prefixes which will either be shown only in forums without own prefixes or be shown in addition to existing prefixes
  • Show Thread Prefixes in extra column or in front of the thread title in the same column
  • Alignment of the prefixes (if 'Show in extra column' is enabled): Align left, align right, center
  • Show Prefix in 'Last Post' column
  • Prefix HTML Markup: Specify an HTML tag with which to display the prefixes (bold, italic, red etc.)
  • Allow Thread Prefix search: If enabled, the prefixes of all forums the user has access to will be grouped in a list and displayed in the search engine.
  • Per Forum:
    • Allow Thread Prefixes in this Forum
    • Thread Prefix Required in this Forum.
Screenshots

See attachments.


Version-History

1.6.2 (2008-05-24 - 9:30 pm CET)
  • Fixed XSS security issue:
    Import the updated xml file (product-threadprefix_*.xml) to fix the security issue!
  • Changes for vBulletin 3.6.10 (Updated Template modifications)
  • Bugfix: It's possible again to search for prefixes
  • Installation script prefixinstall.php now works with IE7 too.
1.6.1 (2006-08-29 - 11:30 pm CET)
  • Bugfix: It's possible again to change the prefix by editing the first post of a thread.
  • Bugfix: The prefix will be forwarded correctly and without an error to the advanced editor while editing the first post via AJAX.
  • New: Thread Prefixes for discussion threads for user infractions and reported posts.
    You can enter those thread prefixes within your vBulletin settings.
  • New: Ability to sort the thread prefixes in descending order.
    (Forum Tools -> Manage Thread Prefixes)
  • New: Version check for the Thread Prefix Product within the AdminCP.
  • Import the updated xml file (product-threadprefix_*.xml) and upload the updated file /upload/threadprefix.php to your server.
1.6.0 (2006-08-04 - 07:00 pm CET)
  • Changes for vBulletin 3.6.0
  • Because you have to upload all files of vBulletin 3.6, there are no instructions for the update. Just follow the standard instructions for the file and template changes.
  • Fixed error within the search engine.
  • New: Prefixes are displayed within Content Syndication (external.php)
  • Do not forget to import the updated xml file (product-threadprefix_*.xml)!
1.5.5 (2006-04-09 - 03:00 pm CET)
  • Fixed database error within the search engine.
    (if prefix was selected and results were shown as posts)
  • Just import the updated xml file.
1.5.4 (2006-03-20 - 01:30 am CET)
  • Fixed small error within the search engine.
  • Just import the updated xml file.
1.5.3 (2006-03-19 - 03:30 pm CET)
  • Changes in includes/class_dm_threadpost.php for vB 3.5.4
  • Changes in includes/functions_threadprefix.php for vB 3.5.4
  • New: Search for prefixes only is now possible (without keywords)
  • New: Prefixes are displayed in "Similar Threads"
  • New: Separator between prefix and thread title within threads/emails may now be defined in your Admin Control Panel (used to be always " - ").
  • New: Save Thread Prefix in Search Preferences
1.5.2 (2005-11-03 - 07:30 pm CET)
  • Missing phrase: updateprefixes
  • Fixed small error in /threadprefix.php
1.5.1 (2005-11-02 - 09:30 pm CET)
  • First version for vBulletin 3.5.1
1.5.0 (2005-11-02 - 09:30 pm CET)
  • First version for vBulletin 3.5.0 (only one file edit more because of a missing hook)
Installation
  1. Upload all files from the upload directory to your vBulletin directory on your server.

    Overview of the files and corresponding directories:
    • /threadprefix.php
    • /admincp/prefixinstall.php
    • /admincp/prefixinstall_text.php
    • /includes/functions_threadprefix.php
  2. Import the file "product-threadprefix_english.xml" with 'Manage Products':
    Admin Control Panel -> Plugin System -> Manage Products ->
    [Add/Import Product] -> Select file -> Import
  3. Open this file with your browser:
    http://www.yourdomain.com/forum/admincp/prefixinstall.php
  4. Log in as administrator and follow the instructions
Time needed for installation: approx. 30 min.
Tested for version: 3.5.0 (and above).

Note: If you have used the Thread Category / Prefix Hack in vBulletin 3.0.x, don't worry: all existing prefixes will be imported during the installation. You just have to re-do your thread prefix settings in your vBulletin Options.

Update Product
  1. Upload all files from the upload directory to your vBulletin directory on your server.

    Overview of the files and corresponding directories:
    • /threadprefix.php
    • /admincp/prefixinstall.php
    • /admincp/prefixinstall_text.php
    • /includes/functions_threadprefix.php
  2. Import the file "product-threadprefix_english.xml" with 'Manage Products':
    Admin Control Panel -> Plugin System -> Manage Products ->
    [Add/Import Product] -> Select file -> Import

    You have to select 'Allow Overwrite' -> 'Yes' before clicking on Import!
  3. Open this file with your browser:
    http://www.yourdomain.com/forum/admincp/prefixinstall.php
  4. Log in, select the version you want to update from (at Step 2 -> 'Update Modification') and follow the instructions.
Short overview of the needed modifications

1. Files that need to be edited:
  • /showthread.php (Display prefix in 'Similar Threads')
  • /clientscript/vbulletin_textedit.js (JavaScript error message if no prefix was selected)
  • /includes/class_dm_threadpost.php (Prefix within emails to moderators)
  • /includes/functions_databuild.php (Update prefix in column 'Last Post' for mod functions)
  • /includes/functions_online.php (Display prefix in 'Who's online')

    It is your decision if you need the above functions or if you decide do use the product without file modifications!
    You don't have to do the file modifications as the product will work even though without them!
2. New files:
  • /threadprefix.php
  • /includes/functions_threadprefix.php
3. Templates that need to be edited:
  • editpost
  • FORUMDISPLAY
  • newthread
  • search_forums
  • search_results
  • SUBSCRIBE
  • threadadmin_editthread
  • threadbit
  • threadbit_announcement
  • threadbit_deleted
4. New templates:
  • threadprefix_listbit
  • threadprefix_modify
5. New phrases:
  • Too many to list them all - they will be created automatically while importing the xml file
Final words

If the modification doesn't work correct after installation, please verify all modifications you have made within the files and the templates. Be sure you have uploaded all edited and new files.

The modification was tested extensive and will function properly if installed correct.

Thanks to ReadWrite for his french translation.

Special Thanks to Andreas for his help with the hooks.

Have fun with the modification!

Please click Install if you have installed it

Mike

Supporters / CoAuthors

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #112  
Old 10-25-2006, 06:54 PM
hitmanuk2k hitmanuk2k is offline
 
Join Date: Dec 2002
Location: Durham, England
Posts: 168
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'd also like to see a Recent Threads prefix hack for vBadvaced so that they show the prefix. Surely someone can do this? I have tried but couldn't get it to work.
Reply With Quote
  #113  
Old 10-27-2006, 10:48 AM
blankoboy blankoboy is offline
 
Join Date: Apr 2006
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quick question:

Is it possible to have a different set of prefixes for each forum? For example:

Quote:
Forum1 (prefix1, prefix2, prefix3, prefix4, prefix5)

Forum2 (prefix6, prefix7, prefix8, prefix9, prefix10)
etc......

Or is this the only option:


Quote:
Forum1 (prefix1, prefix2, prefix3, prefix4, prefix5, prefix6, prefix7, prefix8, prefix9, prefix10)

Forum2 (prefix1, prefix2, prefix3, prefix4, prefix5, prefix6, prefix7, prefix8, prefix9, prefix10)
Is there anyone who has this installed that can confirm this?? Thanks.
Reply With Quote
  #114  
Old 10-28-2006, 01:35 PM
Hexemer's Avatar
Hexemer Hexemer is offline
 
Join Date: Sep 2003
Posts: 30
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by hitmanuk2k
I'd also like to see a Recent Threads prefix hack for vBadvaced so that they show the prefix. Surely someone can do this? I have tried but couldn't get it to work.
Cam someone help us?
Reply With Quote
  #115  
Old 10-30-2006, 06:13 PM
nix's Avatar
nix nix is offline
 
Join Date: Mar 2005
Posts: 975
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by blankoboy
Quick question:

Is it possible to have a different set of prefixes for each forum? For example:


etc......

Or is this the only option:




Is there anyone who has this installed that can confirm this?? Thanks.
Yea you can do that.
Reply With Quote
  #116  
Old 10-31-2006, 06:54 AM
LaCN LaCN is offline
 
Join Date: Feb 2005
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would like to see the option that threadprefixes are only usuable by moderators or specific member-groups.

Say for example there's a request-forum.
Somoene posts a request.
And then teh mod can set/update a prefix to it saying something like "accepted".
(instead of the current situation: a member can set that prefix already by himself which ain't the right way)

Also, it would be very nice to be able to use images instead of text.
it just hit me: Can I set those prefix-HTML-markup to:
<img src="images/prefixes/{1}.gif" border=0 title="{1}" /> ?

But IF that would work, u couldnt' use text prefixes (in other forums) next to it
Reply With Quote
  #117  
Old 10-31-2006, 07:21 PM
Eq4bits Eq4bits is offline
 
Join Date: May 2006
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed this a couple of weeks or so ago, no probs with forum until then.
Started getting this error message anytime any member tries to access their subscription list from their usercp:
Code:
Database error in vBulletin 3.6.2:

Invalid SQL:

			SELECT
				IF(votenum >= 1, votenum, 0) AS votenum,
				IF(votenum >= 1 AND votenum > 0, votetotal / votenum, 0) AS voteavg,
				post.pagetext AS preview, thread.threadid, IF(thread.threadprefix <> '', CONCAT('', thread.threadprefix, ' - ', thread.title), thread.title) AS title AS threadtitle, forumid, pollid, open, replycount, postusername,
				thread.lastpost, thread.lastposter, thread.lastpostid, postuserid, thread.dateline, views, thread.iconid AS threadiconid, notes, thread.visible, thread.attach
				, threadread.readtime AS threadread
				, thread.threadprefix
			FROM *****_thread AS thread
			LEFT JOIN *****_post AS post ON(post.postid = thread.firstpostid)
			 LEFT JOIN *****_threadread AS threadread ON (threadread.threadid = thread.threadid AND threadread.userid = 5)
			
			
			WHERE thread.threadid IN (2937,2834,2913,3003,2977,3000,2828,2986,3005,2983,2955,2992,2954,2969,2935,3002,2909,2854,2994,2974)
				
			ORDER BY thread.lastpost DESC;

MySQL Error  : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS threadtitle, forumid, pollid, open, replycount, postusername,
				thread.last' at line 4
Error Number : 1064
Date         : Tuesday, October 31st 2006 @ 07:48:27 AM
Script       : http://www.*********.net/forums/subscription.php?do=viewsubscription
Referrer     : http://www.*********.net/forums/usercp.php
IP Address   : *****************
Username     : *****************
Classname    : vb_database
So after asking elsewhere in the vb.org forums I've tracked it down to the thread prefix modification to subscription.php particularly a 'double AS phrase',
mine looks like:
Code:
$previewfield thread.threadid, IF(thread.threadprefix <> '', CONCAT('" . $vbulletin->options['prefixmarkup_start'] . "', thread.threadprefix, '" . $vbulletin->options['prefixmarkup_end'] . "', thread.title), thread.title) AS title AS threadtitle, forumid, pollid, open, replycount, postusername,
				$lastpost_info, postuserid, thread.dateline, views, thread.iconid AS threadiconid, notes, thread.visible, thread.attach
				" . ($vbulletin->options['threadmarking'] ? ", threadread.readtime AS threadread" : '') . "
				$hook_query_fields
and a 'clean' vb3.6.2 subscription.php looks like:
Code:
$previewfield thread.threadid, thread.title AS threadtitle, forumid, pollid, open, replycount, postusername,
				$lastpost_info, postuserid, thread.dateline, views, thread.iconid AS threadiconid, notes, thread.visible, thread.attach
				" . ($vbulletin->options['threadmarking'] ? ", threadread.readtime AS threadread" : '') . "
				$hook_query_fields
so what can I do to 'fix' this so members can actually view their subscription list but we can also have the thread prefix?
Reply With Quote
  #118  
Old 11-02-2006, 12:15 PM
MrD's Avatar
MrD MrD is offline
 
Join Date: Aug 2003
Location: Germany/NRW
Posts: 419
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,
Quote:
Originally Posted by tako
When I narrow search results with prefix on search.php, prefix drowdown has no effect on the results. Is it 3.6.2 issue? or just me? Or anyone has experienced same problem and have any solution?
i think it?s a Problem of vb 3.6.2, i have the same Problem.
Reply With Quote
  #119  
Old 11-02-2006, 01:28 PM
Eq4bits Eq4bits is offline
 
Join Date: May 2006
Posts: 468
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Fixed mine by changing
Code:
$previewfield thread.threadid, IF(thread.threadprefix <> '', CONCAT('" . $vbulletin->options['prefixmarkup_start'] . "', thread.threadprefix, '" . $vbulletin->options['prefixmarkup_end'] . "', thread.title), thread.title) AS title AS threadtitle, forumid, pollid, open, replycount, postusername,
				$lastpost_info, postuserid, thread.dateline, views, thread.iconid AS threadiconid, notes, thread.visible, thread.attach
				" . ($vbulletin->options['threadmarking'] ? ", threadread.readtime AS threadread" : '') . "
				$hook_query_fields
to
Code:
$previewfield thread.threadid, IF(thread.threadprefix <> '', CONCAT('" . $vbulletin->options['prefixmarkup_start'] . "', thread.threadprefix, '" . $vbulletin->options['prefixmarkup_end'] . "', thread.title), thread.title) AS threadtitle, forumid, pollid, open, replycount, postusername,
				$lastpost_info, postuserid, thread.dateline, views, thread.iconid AS threadiconid, notes, thread.visible, thread.attach
				" . ($vbulletin->options['threadmarking'] ? ", threadread.readtime AS threadread" : '') . "
				$hook_query_fields
(just took out the 'AS title' before the 'AS threadtitle')

not sure it that was all that was affecting subscriptions or not, there was also a problem with instant email notifications not being received but was only tackling one problem at a time. waiting to hear back from members as to whether that also cleared up with the above fix.
Reply With Quote
  #120  
Old 11-04-2006, 07:17 PM
LaCN LaCN is offline
 
Join Date: Feb 2005
Posts: 76
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

For peeps, who don't want the prefixes to be set by members, but only by moderators:
revert or not edit the template newthread, so u won't find the dropdownlist there

For those who only want images as prefixes, go to:
vBulletin Options / Help Thread Prefixes v1.6.1
And edit the Prefix HTML Markup (within forums) to:
<img src="images/prefixes/{1}.gif" title="" />

Unfortunately I tried to use {1} two times (as title="{1}") with no luck

But with images as prefixes, u can make ur prefix any color u want.
(type a word in a image-program, give it a color, save it as gif, and u're done
or just make a cute pic for it
Reply With Quote
  #121  
Old 11-05-2006, 01:55 PM
stabmyback stabmyback is offline
 
Join Date: Nov 2006
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

HMM, is it just me or does the display options dont work??

[_] Have Prefixes in alphabetical order
(Prefix Number will be ignored)

[o]Ascending [o]Descending

when i submit the form it resets >_<
Reply With Quote
Reply

Thread Tools

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 12:38 AM.


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.12339 seconds
  • Memory Usage 2,337KB
  • Queries Executed 26 (?)
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
  • (5)bbcode_code
  • (5)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
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (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