Back to vBulletin Tips & Tricks

Show Threads Sitewide by Prefix [Tutorial]
by shlomot 07 Nov 2008
Rating: (2 votes - 5.00 average)

Numerous questions have been posted throughout vB forums on how to perform a site-wide search (or filtering) and show only those threads with a specific prefix.

The goal is to construct a link - that is used as a tab, text-link, or even in the text-rich title box of the prefix itself - that once clicked it presents threads or posts with that prefix from all the forums on the board.

Principally, this is a complex task to perform because the search for the prefixed threads or posts should consider user and forum permissions, so once user is prohibited from viewing threads in one forum - threads from that forum shouldn't be displayed in the site-wide search, etc.

Luckily, VB provides us with great advance-search capabilities, and searching for threads or posts that are assigned a specific prefix is among them.

Thus, the search string: http://www.yoursite.com/search.php?prefixchoice%5B%5D=Video should do the trick.

However, the problem is that this link only leads users to the advanced search form, with the search criteria already in place, but users still have to activate the search.

The secret lays in adding the following parameter to the search string:

do=process

From now on, if you want a search criteria to be activated without showing the visitor that search form again, just add do=process to the string.

Before: search.php?prefixchoice[]=Video

After: search.php?do=process&prefixchoice[]=Video

About Clickable Prefix
Webmasters often plan on making their prefix clickable. Good MODs have been published to this effect, but if you just want to do it yourself, place the following text (or a similar one) in the Title (Rich Text) box of the prefix:

<span><a href="search.php?do=process&prefixchoice[]=Video" style="color: red;"><b>Video</b></a></span>

This coding answers also questions about how to assign different colors to an HTML link.

Similar Mods

Prefix for closed threads vBulletin 2.x Full Releases

vblts.ru supports vBulletin®, 2022-2024