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

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

Version: 3.5.4 Rating:
Released: 11-01-2005 Last Update: 04-24-2006 Installs: 175
DB Changes Uses Plugins Template Edits
Code Changes Additional Files  
No support by the author.

Thread Prefixes

Version: 1.5.5
vBulletin Version: 3.5.4
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.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
  • forumdisplay_announcement
  • newthread
  • search_forums
  • search_results
  • SUBSCRIBE
  • threadadmin_editthread
  • threadbit
  • 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
  #322  
Old 07-17-2006, 06:46 AM
Mystics's Avatar
Mystics Mystics is offline
 
Join Date: Oct 2001
Location: Germany
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by paul41598
If I make the template change I still get the prefix cell, in my results. I dont want it at all there. What do I do?
You have to edit the threadbit template. You can't remove the prefix column completely, you have to use template conditions around it:
Code:
<if condition="THIS_SCRIPT != 'search'">
</if>
Reply With Quote
  #323  
Old 07-19-2006, 07:11 AM
Algren_San Algren_San is offline
 
Join Date: Feb 2005
Location: NY U.S.A
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

INSTALLED GREAT GREAT ADDON what i just need it , but should i request something? (just if i can of course).

just admin can set the prefix that all the member should use, and there is any way to put the prefixes next to the tittle? i mean with out any (prefixes) colum, like [XXXXX]Topic-tittle but once again my respect.
Reply With Quote
  #324  
Old 07-19-2006, 03:47 PM
Mystics's Avatar
Mystics Mystics is offline
 
Join Date: Oct 2001
Location: Germany
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Algren_San
and there is any way to put the prefixes next to the tittle? i mean with out any (prefixes) colum, like [XXXXX]Topic-tittle
Take a look in your vbulletin options (or readme/screenshots in first posting)
Reply With Quote
  #325  
Old 07-20-2006, 02:48 AM
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
Location: Black Lagoon
Posts: 1,090
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mystics,
How do the thread prefixes work in conjunction with external.php and sending content via RSS to other websites? Do the thread prefixes show up in the titles, etc...?
Reply With Quote
  #326  
Old 07-21-2006, 08:39 AM
TygerTyger TygerTyger is offline
 
Join Date: Aug 2005
Posts: 182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi there, absolutely terrific modifcation love it to pieces and thank you for all your work. i've got it going on 3.6 RC2 without problem as far as I can tell so far, didn't have to change a thing but there is a bug/inconsistency.

If you have the prefixes set to display by number order, they are listed in reverse order in the forum search dropdown section, but the correct order in when making a thread/post.
Reply With Quote
  #327  
Old 07-25-2006, 06:41 PM
firstrebel's Avatar
firstrebel firstrebel is offline
 
Join Date: Dec 2005
Location: West London
Posts: 380
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have just started using this on our car club forum, great piece of work. However, it does not go far enough for us. I need to add a second box where the user can select the model year of the car. This is sometimes important as the designs vary from year to year and without the MY it is difficult to offer help.

Incorporating the year into the current prefix system is not feasible, I would have to create a group of prefixes for each model year; that would be over 100 if not more.

Any ideas please?

Bob
Reply With Quote
  #328  
Old 07-26-2006, 06:23 PM
BitMite BitMite is offline
 
Join Date: Apr 2005
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tgillespie
Any ideas if this works or will be upgraded for 3.6?
I would like to know too
Reply With Quote
  #329  
Old 07-29-2006, 02:51 AM
Camz Camz is offline
 
Join Date: Mar 2003
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by LaCN
I love this

But I want to have colored prefixes.
Or be able to use images instead.

As a temporal sollution, I added it into the templates.
(dunno where to make it in php, since it all got very confusing now lol)

find in threadbit template
PHP Code:
<if condition="$show['threadprefix'] == 2">
  <
td class="alt1" align="$prefixalignnowrap="nowrap">
    <if 
condition="$thread['threadprefix']">
      
$prefixmarkup[0]$thread[threadprefix]$prefixmarkup[1]
    </if>
  </
td>
</if> 
:bunny: If you want an image, do something like this:
PHP Code:
<if condition="$show['threadprefix'] == 2">
  <
td class="alt1" align="$prefixalignnowrap="nowrap">
    <if 
condition="$thread['threadprefix']">
      <if 
condition="$thread['threadprefix'] == '[GAME]'">
        <
img src="images/Casino_icon.gif" title="Win Win !! The game is open !" border=/>
      <else />
        
$prefixmarkup[0]$thread[threadprefix]$prefixmarkup[1]
      </if>
    </if>
  </
td>
</if> 
:bunny: If you want colored prefixes:
PHP Code:
<if condition="$show['threadprefix'] == 2">
  <
td class="alt1" align="$prefixalignnowrap="nowrap">
    <if 
condition="$thread['threadprefix']">
      
$prefixmarkup[0]
      <
span style="color: 
        <if condition="
in_array($thread['threadprefix'], array('[GREEN]''[GREEN2]''[GREEN3]'))">green</if>
        <if condition="
$thread['threadprefix'] == '[SCHEDULED]'">orange</if>
        <if condition="
$thread['threadprefix'] == '[PACK]'">purple</if>
        <if condition="
$thread['threadprefix'] == '[PACI]'">blue</if>
        <if condition="
$thread['threadprefix'] == '[PROGRESS]'">gray</if>
        <if condition="
$thread['threadprefix'] == '[STOPPED]'">red</if>
      "
>
        
$thread[threadprefix]
      </
span>
      
$prefixmarkup[1]
    </if>
  </
td>
</if> 
:bunny: Or if you want it all...
PHP Code:
<if condition="$show['threadprefix'] == 2">
  <
td class="alt1" align="$prefixalignnowrap="nowrap">
    <if 
condition="$thread['threadprefix']">
      <if 
condition="$thread['threadprefix'] == '[GAME]'">
        <
img src="images/Casino_icon.gif" title="Win Win !! The game is open !" border=/>
      <else />
        
$prefixmarkup[0]
        <
span style="color: 
          <if condition="
in_array($thread['threadprefix'], array('[GREEN]''[GREEN2]''[GREEN3]'))">green</if>
          <if condition="
$thread['threadprefix'] == '[SCHEDULED]'">orange</if>
          <if condition="
$thread['threadprefix'] == '[PACK]'">purple</if>
          <if condition="
$thread['threadprefix'] == '[PACI]'">blue</if>
          <if condition="
$thread['threadprefix'] == '[PROGRESS]'">gray</if>
          <if condition="
$thread['threadprefix'] == '[STOPPED]'">red</if>
        "
>
          <else />
            
$thread[threadprefix]
          </if>
        </
span>
      </if>
      
$prefixmarkup[1]
    </if>
  </
td>
</if> 
Are you sure this code is working?
Reply With Quote
  #330  
Old 07-29-2006, 03:09 PM
tfw2005 tfw2005 is offline
 
Join Date: Sep 2004
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed. Thanks!

Having a slight issue.

I am using the prefixes in a forum which my VBA CMPS uses to pull news onto the front page.

Each time I add a story in that forum, whether or not I choose a prefix or not, the title does not show up in VBA CMPS on the main page. If I manually edit the title by editing the thread, after it's posted (adding a period or question mark, etc to change it a bit), it updates on the main page and works from there on. Is there any way to connect the VBS CMPS $news[title] and the altered prefix $thread[title] ?

In relation to that...

I am/will be using a series of if/then statements to display an image within the first post based on the prefix of the thread. These threads will always be one post deep, so it works out. I have that working in the forum, but those if/then statements pulling the images do not show up in the VBA CMPS versions on the main page.

So, could we figure a way to hook these prefix calls into VBA CMPS for both the story and the title areas.

Hope that made sense. Thanks in advance!
Reply With Quote
  #331  
Old 07-30-2006, 06:39 PM
TygerTyger TygerTyger is offline
 
Join Date: Aug 2005
Posts: 182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't believe support for VBA is that reliable in general, with entirely good reason.

But out of the box, this appears to work perfectly in 3.6 minus the bug I pointed out earlier in the thread.
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 12:37 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.05701 seconds
  • Memory Usage 2,390KB
  • 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
  • (1)bbcode_code
  • (4)bbcode_php
  • (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
  • (4)pagenav_pagelink
  • (1)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