Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Thread Category / Prefix Hack Details »»
Thread Category / Prefix Hack
Version: 1.3.7, by Mystics Mystics is offline
Developer Last Online: Jun 2015 Show Printable Version Email this Page

Version: 3.0.7 Rating:
Released: 02-11-2004 Last Update: 05-24-2005 Installs: 105
DB Changes
 
No support by the author.

Thread Category / Prefix Hack

Version: 1.3.7
vBulletin Version: 3.0.7
Developer: Mystics (www.vbulletin-germany.com)
Hack-Language: English & German & French (thanks to ReadWrite)
Install-difficulty: Medium
File-edits: 19
Template-edits: 16


Brief Description of the Hack

With this hack it is possible to assign a category/prefix to a thread. To do this you are able to select an appropriate category from a list beside the title while posting a new thread - for example 'Help', 'Problem', 'Search' etc.

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


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

See attachments.


Version-History

1.3.7 (02-22-2005 - 09:00 pm)
  • Modified instructions for vBulletin 3.0.7
    (3 more changes within the search_results template)
1.3.6 (01-15-2005 - 06:10 pm)
  • Modified instructions for vBulletin 3.0.5
    (only the third modification of the template FORUMDISPLAY has changed)
1.3.5 (11-02-2004 - 11:00 pm)
  • Bugfix: File: newthread.php
    Preview error with categories containing "&" fixed
1.3.4 (09-25-2004 - 04:00 pm)
  • Update: Template SUBSCRIBE (colspan have to be increased since vB 3.0.2)
  • Bugfix: File: includes/functions_forumlist.php
    Include category length in length of the shown last thread title
1.3.3 (04-08-2004 - 08:55 pm)
  • Bugfix: File: forumdisplay.php
    Selected category got lost when browsing through forum pages
1.3.2 (03-27-2004 - 05:45 pm)
  • Bugfix: File: clientscript/vbulletin_quickreply.js
    Javascript error when using Quick Reply
  • New: Added modification for postbit_legacy template (same as postbit modification)
  • Modified instructions for vBulletin 3.0.0 'Gold' (only the first modification of postings.php has changed)
1.3.1 (03-06-2004 - 00:20 am)
  • Bugfix: Template: threadbit_deleted
    Incorrect display of category column in this template
1.3 (02-23-2004 - 08:40 pm)
  • Bugfix: Don't display a category in a thread if categories are not allowed in the forum
  • Bugfix: Critical bug in threadcategory.php related to the option 'Update existing threads with changed categories' fixed
Upload the new threadcategory.php as soon as possible!
1.2.1 (02-14-2004 - 02:15 pm)
  • Bugfix: Template: forumdisplay_announcement
    Wrong 'colspan' value used, if categories are displayed in an extra
    column and forum contains announements in addition
1.2 (02-11-2004 - 11:30 pm)
  • New: Display category in notify mail next to the thread title
  • Bugfix: Improved display of the categories in "Who's Online"
1.1 (02-10-2004 - 11:55 pm)
  • New: Display of last category in the 'Last Post' column (may be disabled in the admin cp)
  • New: Display of hack version in the admin cp at the vBulletin options (for example 'Thread-Category Hack v1.1')
  • Bugfix: Show link to 'Manage Categories, if DHTML menus are disabled
  • Bugfix: Don't show categories from forums where categories are not (longer) allowed
  • Bugfix: Convert HTML code within categories
1.0.1 (02-08-2004 - 11:30 pm)
  • Bugfix: Correct display in "Who's Online" while managing categories
1.0.0 (02-08-2004 - 4:49 pm)
  • First version
Installation
  1. Upload the files categoryinstall.php and categoryinstall_text.php to the admincp directory of your forum
  2. Open this file with your browser:
    http://www.yourdomain.de/forum/admin...oryinstall.php
  3. Log in and follow the instructions
  4. You may delete the two files after the installation of the hack
Time needed for installation: approx. 30-60 min.
Tested for version: 3.0.0 RC 3 (and above).

Note: If you have already used the vBulletin 2 version of this hack (only available in german) and the categories are still stored in the vB3 database, you may convert them for the vB3 version. You will see a note to that in step 2 of the hack installation.


Update hack
  1. Upload the files categoryinstall.php and categoryinstall_text.php to the admincp directory of your forum
  2. Open this file with your browser:
    http://www.yourdomain.de/forum/admin...oryinstall.php
  3. Log in, select the version you want to update from (at Step 2 -> 'Update Hack') and follow the instructions
Short overview of the needed modifications

1. Files that need to be edited:
  • editpost.php
  • forumdisplay.php
  • moderator.php
  • newthread.php
  • postings.php
  • search.php
  • showthread.php
  • subscription.php
  • admincp/forum.php
  • clientscript/vbulletin_global.js
  • clientscript/vbulletin_quickreply.js
  • clientscript/vbulletin_stdedit.js
  • clientscript/vbulletin_wysiwyg.js
  • includes/functions.php
  • includes/functions_databuild.php
  • includes/functions_forumlist.php
  • includes/functions_newpost.php
  • includes/functions_online.php
  • includes/functions_search.php
2. New files:
  • threadcategory.php
3. Templates that need to be edited:
  • editor_clientscript
  • editpost
  • FORUMDISPLAY
  • forumdisplay_announcement
  • forumhome_lastpostby
  • newthread
  • postbit
  • postbit_legacy
  • search_forums
  • search_results
  • search_results_postbit
  • SHOWTHREAD
  • SUBSCRIBE
  • threadadmin_editthread
  • threadbit
  • threadbit_deleted
4. New templates:
  • threadcategory_listbit
  • threadcategory_modify
5. New phrases:
  • Too many to list them all - they will be created automatically by the install script
Final words

If the hack 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 hack was tested extensive and will function properly if installed correct.

Thanks to ReadWrite for his french translation.

Have fun with the hack.

Please click Install if you have installed it

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:

Comments
  #112  
Old 07-28-2004, 09:02 PM
The General's Avatar
The General The General is offline
 
Join Date: Aug 2002
Location: Netherlands
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mystics
/admincp/categoryinstall.php?hacklanguage=english&step=2

Step 6: Instructions for File Changes
Step 7: Instructions for Template Changes
Hmm...well I did do all the file changes again after my upgrade from 3.0.0 to 3.0.3, my templates all seem intact still. But somehow I lost all the current prefixes I had, they all got deleted or are hidden.

Did I forget something?
Reply With Quote
  #113  
Old 07-31-2004, 04:18 AM
Cryo Cryo is offline
 
Join Date: Dec 2003
Location: Buffalo, NY
Posts: 197
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great job, installing this hack now. This was EXACTLY what I was looking for. ^^
Reply With Quote
  #114  
Old 08-01-2004, 12:51 PM
spence2 spence2 is offline
 
Join Date: Jun 2002
Location: usa
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

13. Edit the template: SUBSCRIBE
Find this code: <td class="tcat" colspan="5">

This phrase does not exist in default text of template "SUBSCRIBE"

Code:
<!-- topic table -->
<form action="subscription.php" method="post">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="viewsubscription" />
<input type="hidden" name="type" value="thread" />

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
	<tr>
		<td class="tcat">
			<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('subslistinfo')"><img id="collapseimg_subslistinfo" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_subslistinfo].gif" alt="" border="0" /></a>
			$vbphrase[subscribed_threads_in_folder]<span class="normal">: <span id="nav_subsfolders.listinfo"><if condition="$show['allfolders']">$vbphrase[all]<else />$folder</if> <script type="text/javascript"> vbmenu_register("nav_subsfolders.listinfo"); </script></span></span>
		</td>
	</tr>
</thead>
<tbody id="collapseobj_subslistinfo" style="$vbcollapse[collapseobj_subslistinfo]">
<tr>
	<td class="panelsurround" align="center">
	<div class="panel">
		<div style="width:$stylevar[formwidth_usercp]" align="$stylevar[left]">
		
		<fieldset class="fieldset">
			<legend>$vbphrase[folder_controls]</legend>
			<table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0">
			<tr>
				<td>
					$vbphrase[jump_to_folder]:<br />
					<select name="folderid" onchange="window.location=('subscription.php?$session[sessionurl]do=viewsubscription&amp;folderid='+this.options[this.selectedIndex].value)">
					$folderjump
					</select>$gobutton
				</td>
			</tr>
			<tr>
				<td>
					<a href="subscription.php?$session[sessionurl]do=viewsubscription&amp;daysprune=-1&amp;folderid=all">$vbphrase[view_all_subscribed_threads]</a> |
					<a href="subscription.php?$session[sessionurl]do=editfolders">$vbphrase[edit_folders]</a>
				</td>
			</tr>
			</table>
		</fieldset>
		
		</div>
	</div>
	</td>
</tr>
</tbody>
</table>
</form>

<br />

<if condition="$show['pagenav']">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-bottom:3px">
<tr valign="bottom">
	<td align="$stylevar[right]">$pagenav</td>
</tr>
</table>
</if>

<!-- topic table -->
<form action="subscription.php" method="post" name="form">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="dostuff" />
<input type="hidden" name="folderid" value="$folderid" />

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
	<td class="tcat" colspan="6">
		<span class="smallfont" style="float:$stylevar[right]"><strong>$vbphrase[threads]</strong>: $totalallthreads</span>
		$vbphrase[subscribed_threads_in_folder]<span class="normal">: <span id="nav_subsfolders.threadlist"><if condition="$show['allfolders']">$vbphrase[all]<else />$folder</if> <script type="text/javascript"> vbmenu_register("nav_subsfolders.threadlist") </script></span></span>
	</td>
</tr>
<if condition="$show['havethreads']">
<tr>
	<td class="thead" colspan="2">&nbsp;</td>
	<td class="thead" width="100%">
		<a href="$sorturl&amp;order=asc&amp;sort=title">$vbphrase[thread]</a> $sortarrow[title] /
		<a href="$sorturl&amp;order=asc&amp;sort=postusername">$vbphrase[thread_starter]</a> $sortarrow[postusername]
	</td>
	<td class="thead" width="150" align="center" nowrap="nowrap"><span style="white-space:nowrap"><a href="$sorturl&amp;order=desc&amp;sort=lastpost">$vbphrase[last_post]</a> $sortarrow[lastpost]</span></td>
	<!--<td class="thead" align="center" nowrap="nowrap"><a href="$sorturl&amp;order=desc&amp;sort=replycount">$vbphrase[replies]</a> $sortarrow[replycount]</td>-->
	<!--<td class="thead" align="center" nowrap="nowrap"><a href="$sorturl&amp;order=desc&amp;sort=views">$vbphrase[views]</a> $sortarrow[views]</td>-->
	<td class="thead">$vbphrase[notification]</td>
	<td class="thead"><input name="allbox" type="checkbox" value="Check All" title="$vbphrase[check_uncheck_all]" onClick="checkall(this.form);" /></td>
</tr>
$threadbits
<tr>
	<td class="tfoot" colspan="6" align="$stylevar[right]"><div class="smallfont">
		
		$vbphrase[selected_threads]:
		<select name="what">
			<optgroup label="$vbphrase[move_delete_subscriptions]">
				<option value="move">$vbphrase[move_to_folder]...</option>
				<option value="delete">$vbphrase[delete_subscription]</option>
			</optgroup>
			<optgroup label="$vbphrase[update_subscription_type]">
				<option value="update0">$vbphrase[no_email_notification]</option>
				<option value="update1">$vbphrase[instant_email_notification]</option>
				<option value="update2">$vbphrase[daily_email_notification]</option>
				<option value="update3">$vbphrase[weekly_email_notification]</option>
			</optgroup>							
		</select>$gobutton
		
	</div></td>
</tr>
<else />
	<tr>
		<td class="alt1" align="center" colspan="6">
			<br />
			$vbphrase[folder_is_currently_empty]
			<br />
			<br />
		</td>
	</tr>
</if>
</table>

</form>
<!-- / topic table -->

<if condition="$show['pagenav']">
<table cellpadding="0" cellspacing="0" border="0" width="100%" style="margin-top:3px">
<tr valign="top">
	<td align="$stylevar[right]">$pagenav</td>
</tr>
</table>
</if>

<br />

<!-- icon key and forum jump -->
<table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
<tr valign="bottom">
	<td width="100%">
		<!-- icon key -->
		<table cellpadding="2" cellspacing="0" border="0">
		<tr align="$stylevar[left]">
			<td><img src="$stylevar[imgdir_statusicon]/thread_new.gif" alt="$vbphrase[new_posts]" border="0" /></td>
			<td class="smallfont">$vbphrase[new_posts]</td>
		</tr>
		<tr>
			<td><img src="$stylevar[imgdir_statusicon]/thread.gif" alt="$vbphrase[no_new_posts]" border="0" /></td>
			<td class="smallfont">$vbphrase[no_new_posts]</td>
		</tr>
		<if condition="$vboptions['usehotthreads']">
		<tr>
			<td><img src="$stylevar[imgdir_statusicon]/thread_hot_new.gif" alt="$vbphrase[hot_thread_with_new_posts]" border="0" /></td>
			<td class="smallfont"><phrase 1="$vboptions[hotnumberposts]" 2="$vboptions[hotnumberviews]">$vbphrase[more_than_x_replies_or_y_views]</phrase></td>
		</tr>
		<tr>
			<td><img src="$stylevar[imgdir_statusicon]/thread_hot.gif" alt="$vbphrase[hot_thread_with_no_new_posts]" border="0" /></td>
			<td class="smallfont"><phrase 1="$vboptions[hotnumberposts]" 2="$vboptions[hotnumberviews]">$vbphrase[more_than_x_replies_or_y_views]</phrase></td>
		</tr>
		</if>
		<tr>
			<td><img src="$stylevar[imgdir_statusicon]/thread_lock.gif" alt="$vbphrase[closed_thread]" border="0" /></td>
			<td class="smallfont">$vbphrase[thread_is_closed]</td>
		</tr>
		<if condition="$show['dotthreads']">
		<tr>
			<td><img src="$stylevar[imgdir_statusicon]/thread_dot.gif" alt="$vbphrase[thread_contains_a_message_written_by_you]" border="0" /></td>
			<td class="smallfont">$vbphrase[you_have_posted_in_this_thread]</td>
		</tr>
		</if>
		</table>
		<!-- / icon key -->
	</td>
	
	<td>$forumjump</td>
</tr>
</table>
<!-- / icon key and forum jump -->
How should I proceed?
Thanking you in advance for your reply!
Reply With Quote
  #115  
Old 08-01-2004, 01:30 PM
Mystics's Avatar
Mystics Mystics is offline
 
Join Date: Oct 2001
Location: Germany
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by spence2
13. Edit the template: SUBSCRIBE
Find this code: <td class="tcat" colspan="5">

This phrase does not exist in default text of template "SUBSCRIBE"
It's now:
Code:
<td class="tcat" colspan="6">
Replace it with:
Code:
	<td class="tcat" colspan="<if condition="$show['threadcategories'] == 2">7<else />6</if>">
Reply With Quote
  #116  
Old 08-02-2004, 02:15 AM
spence2 spence2 is offline
 
Join Date: Jun 2002
Location: usa
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, it's working now.

Thank you so much for your quality work and great hack ... and for your willingness to share it!

Your support is much appreciated as well. Thanks, again!
Reply With Quote
  #117  
Old 08-02-2004, 02:19 PM
M1th's Avatar
M1th M1th is offline
 
Join Date: Jul 2002
Location: UK
Posts: 224
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Possible bug:

Wrong Category prefix is displayed in the last post column (on forumhome) when you arrange the categories in alphabetic order. I've disabled that feature, as a result. Thought you should know.
Reply With Quote
  #118  
Old 08-05-2004, 04: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 M1th
Possible bug:

Wrong Category prefix is displayed in the last post column (on forumhome) when you arrange the categories in alphabetic order. I've disabled that feature, as a result. Thought you should know.
Hm, do you "Update existing threads with changed categories" at the same time? Just ordering does not change any thread infos.
Reply With Quote
  #119  
Old 08-05-2004, 07:57 PM
spence2 spence2 is offline
 
Join Date: Jun 2002
Location: usa
Posts: 284
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have your hack installed and it is working perfectly.

So, of course, I want MORE ... don't we always? ... so, my question:

Would there be a way to incorporate this with Erwin's hack so that users could choose a category when posting a new thread to a forum via a form?

Thanks.
Reply With Quote
  #120  
Old 08-09-2004, 02:45 PM
cinq's Avatar
cinq cinq is offline
 
Join Date: Oct 2002
Posts: 1,398
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack Mike, just installed this and working like a charm

One request though:
Is it possible to Force use of this thread prefix not across all the categories, but on a per-forum basis ?

Thanks for your work
Reply With Quote
  #121  
Old 08-09-2004, 04:10 PM
Mystics's Avatar
Mystics Mystics is offline
 
Join Date: Oct 2001
Location: Germany
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cinq
Great hack Mike, just installed this and working like a charm

One request though:
Is it possible to Force use of this thread prefix not across all the categories, but on a per-forum basis ?

Thanks for your work
No, that's not possible by default. You would have to create a new option, similar to the "forum.allowcategories" option. You may take that option as an example for a new one. Should be not too difficult.
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 08: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.05359 seconds
  • Memory Usage 2,353KB
  • 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
  • (3)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
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (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
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_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