PDA

View Full Version : Disallow tags by forum


Keesa
07-09-2008, 09:19 AM
is this possible?

We have offtopic forums that are being tagged and just cluttering our searching with extraneous nonsense.

Is there a way to do that?

Thanks

calorie
07-09-2008, 04:29 PM
Untested but look in the vB SHOWTHREAD template for <!-- thread tags --> and in the template conditional preceding that line, add in the part in bold red:

<if condition="$show['tag_box'] AND in_array($forumid, array(1,2,3))">

Where 1,2,3 are the forum IDs where you want the tags box to show on the showthread.php page.

Alternatively and also untested, but if you want to completely disable tags in certain forums, a plugin like the following at the global_start hook should work:

// 4,5,6 are non-tag forum IDs
if ($forumid && !in_array($forumid, array(4,5,6)))
{
$vbulletin->options['threadtagging'] = 0;
}

Adding that plugin will also remove the tag search from the navbar when in certain forums, so if you don't want that to happen, remove the threadtagging template conditional from the vB navbar template, assuming thread tagging is globally allowed in the vB options.

Keesa
07-21-2008, 06:10 AM
Hi there,

I finally got around to testing the first one. Thanks for the tip, I could not make it work. The second one I was too afraid to try. :eek:

Hopefully in future releases they will make some changes like this.

Thanks again.

leeherron
04-29-2009, 03:28 AM
I removed the Tag field so people couldn't enter Tags in the first place.

I found it in:

style manager >> new posting templates >> newthread

Modifying the string:

<if condition="$show['tag_option']">

with one of the following:

If you DON'T want the Tags field displayed for a specific forum, it would be:

<if condition="$show['tag_option'] AND $forumid!=12">
12 being the forum ID number you define.

If you DO want it displayed but only for forums 2, 4 and 5, it would be:
<if condition="$show['tag_box'] AND in_array($forumid, array(2,4,5))">

Works for me with 3.8.1