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
  #197  
Old 03-29-2005, 01:24 PM
Dennis Olson Dennis Olson is offline
 
Join Date: Jul 2004
Location: Wisconsin
Posts: 137
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Problem went away on its own after a day or so...

??
Reply With Quote
  #198  
Old 03-31-2005, 05:20 PM
The Kiss The Kiss is offline
 
Join Date: May 2004
Location: France
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Mystics,

I'm the administrator of the French forum of a famous website (check out my PM). We currently have 3 forums in several languages. Today i'm ready to try your hack but I wondering if you can add the following changes. Please, have a look to the attached pic.

#1 - Display categories under titles of forums [important request, please]
#2 - Let users to select categories from top of the page (as showed on the pic)

Another question. I saw you are member of the vBulletin programming commulity. So, can you tell me if your hack could be integrated as a standard feature in next releases of VB?

Bye
Reply With Quote
  #199  
Old 04-01-2005, 05:48 PM
Mystics's Avatar
Mystics Mystics is offline
 
Join Date: Oct 2001
Location: Germany
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by The Kiss
#1 - Display categories under titles of forums [important request, please]
#2 - Let users to select categories from top of the page (as showed on the pic)
Feel free to edit the hack for your purpose...I won't add this because not many users (including me) need such a feature. And if you have many categories you can't display them all as plain links.
Reply With Quote
  #200  
Old 04-01-2005, 06:10 PM
The Kiss The Kiss is offline
 
Join Date: May 2004
Location: France
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok, I understand your position. BTW perhaps I can use the Replacement Variable Manager if I can't display all categories as plain links. Possible ?

e.g: [cat1] = http://www.xxxxxxxx.xxx/forum/showthread.p....

Another solution should be to extend the length of descriptions below Forum title. Is it possible and does this affect something?


Quote:
I won't add this because not many users (including me) need such a feature.
Well, in fact the biggest French forum (22.905.990 messages and 253.967 members) uses the system I describe. That's why I asked the question. I want the same thing as them.

check it out at: http://forum.hardware.fr/


Thanks anyway,
Bye
Reply With Quote
  #201  
Old 04-01-2005, 06:14 PM
Mystics's Avatar
Mystics Mystics is offline
 
Join Date: Oct 2001
Location: Germany
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by The Kiss
Another solution should be to extend the length of descriptions below Forum title. Is it possible and does this affect something?
You can do that.
Quote:
Originally Posted by The Kiss
Well, in fact the biggest French forum (22.905.990 messages and 253.967 members) uses the system I describe. That's why I asked the question. I want the same thing as them.

check it out at: http://forum.hardware.fr/
This looks just like normal sub forums, not like categories.

You should consider using sub forums instead of categories.
Reply With Quote
  #202  
Old 04-01-2005, 06:37 PM
The Kiss The Kiss is offline
 
Join Date: May 2004
Location: France
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mystics
You should consider using sub forums instead of categories.
ok, here is a typical exemple of what I'm trying to do:

Forum Nokia
Entry level | Middle class | Pro class


By clicking on 'Forum Nokia' members display threads of the 3 categories. If not, then they display only the selected category.

This possible with your hack but not by using sub-forums. Perhaps there is a special PHP command to do this but I don't know it..
Reply With Quote
  #203  
Old 04-01-2005, 08:45 PM
TTG's Avatar
TTG TTG is offline
 
Join Date: May 2004
Location: Sth London
Posts: 1,042
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In vB 3.0.6 "Edit the file: clientscript/vbulletin_stdedit.js"

Find this code:
Code:
function validatePost(tform, subjectVal, minLength, maxLength)
{
	return validatemessage(tform.message.value, subjectVal, minLength, maxLength, false, tform);
}
Replace it with this code:

Code:
function validatePost(tform, subjectVal, minLength, maxLength, categoryVal)
{
	if (typeof categoryVal == "undefined")
	{
		var categoryVal = 0;
	}
	return validatemessage(tform.message.value, subjectVal, minLength, maxLength, false, tform, categoryVal);
}
The Code in 3.0.6 :

Code:
function validatePost(tform, subjectVal, minLength, maxLength)
{
	postOK = validatemessage(tform.message.value, subjectVal, minLength, maxLength, false, tform);
        if ((postOK == true) & is_ie) {
          Copied = tform.message.createTextRange();
          Copied.execCommand("Copy");
        }
        return postOK;
}
What needs changin' ? Everything else went through nice and easy !
Reply With Quote
  #204  
Old 04-01-2005, 10:43 PM
The Kiss The Kiss is offline
 
Join Date: May 2004
Location: France
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

TTG,

Thank but what for? Can you explain?
Reply With Quote
  #205  
Old 04-02-2005, 07:17 AM
TTG's Avatar
TTG TTG is offline
 
Join Date: May 2004
Location: Sth London
Posts: 1,042
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by The Kiss
TTG,

Thank but what for? Can you explain?
er.. my previous post was 'my problem' .. I can't edit the code as per the installation 'cos 3.0.6 code is different !?
Reply With Quote
  #206  
Old 04-02-2005, 11:06 AM
Mystics's Avatar
Mystics Mystics is offline
 
Join Date: Oct 2001
Location: Germany
Posts: 273
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@TTG

You obviously have already modified vbulletin_stdedit.js....yours is not the original code...so either upload the original vbulletin_stdedit.js or use this:
Code:
function validatePost(tform, subjectVal, minLength, maxLength, categoryVal)
{
	if (typeof categoryVal == "undefined")
	{
		var categoryVal = 0;
	}
	postOK = validatemessage(tform.message.value, subjectVal, minLength, maxLength, false, tform, categoryVal);
        if ((postOK == true) & is_ie) {
          Copied = tform.message.createTextRange();
          Copied.execCommand("Copy");
        }
        return postOK;
}
Reply With Quote
  #207  
Old 04-02-2005, 08:44 PM
TTG's Avatar
TTG TTG is offline
 
Join Date: May 2004
Location: Sth London
Posts: 1,042
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Mystics .. that solved the problem.
Clicked Install ..

One of the best set of hack instructions I've used .. very well done m8
Reply With Quote
  #208  
Old 04-11-2005, 11:25 AM
TouchStone TouchStone is offline
 
Join Date: Apr 2005
Posts: 11
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I installed Mystics' Prefix Hack but prefixes aren't showing on the cmps. Any idea on how to fix this?
Reply With Quote
  #209  
Old 05-03-2005, 07:27 AM
PIKenPIK PIKenPIK is offline
 
Join Date: Feb 2005
Location: Netherlands
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm gonna use this Was looking it for ages ..... Excellent ....

** Clicks Install **
Reply With Quote
  #210  
Old 05-20-2005, 03:48 AM
Kaishi Kaishi is offline
 
Join Date: Apr 2005
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

has anyone gotten this to work with vbadvance? i want to display the prefix in the news module
Reply With Quote
  #211  
Old 05-27-2005, 04:37 PM
Kaishi Kaishi is offline
 
Join Date: Apr 2005
Posts: 70
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i don't know if it's a bug with this hack, or it's something else. but if someone is viewing a thread in a forum, it doesn't say (x Viewing). only people viewing the forum is counted as viewing.
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 06:13 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.05895 seconds
  • Memory Usage 2,383KB
  • Queries Executed 30 (?)
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_code
  • (6)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
  • (16)post_thanks_box
  • (16)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (16)post_thanks_postbit_info
  • (15)postbit
  • (16)postbit_onlinestatus
  • (16)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