Register Members List Search Today's Posts Mark Forums Read

Reply
 
Article Options
Show Threads Sitewide by Prefix [Tutorial]
shlomot
Join Date: Apr 2007
Posts: 246

Haifa, Israel
by shlomot shlomot is offline 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[]=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.

Last edited by Princeton; 11 Nov 2008 at 15:01..
Views: 9874
Reply With Quote
Comments
  #2  
Old 07 Nov 2008, 06:32
shlomot's Avatar
shlomot shlomot is offline
 
Join Date: Apr 2007
Real name: Shlomo Tommer
Known Bugs & Issues

Reserved for listing known bugs and issues.
__________________
Cheers to all,
Shlomo Tommer

tsConnections | Celebrities Galore
Reply With Quote
  #3  
Old 07 Nov 2008, 10:59
Spank Spank is offline
 
Join Date: Jan 2007
Real name: Mark
Simple and useful. Thanks
Reply With Quote
  #4  
Old 07 Nov 2008, 15:44
Magnumutz's Avatar
Magnumutz Magnumutz is offline
 
Join Date: Feb 2006
Real name: Alex
Isn't this just a template edit?
Why did you file it under products?
__________________

Reply With Quote
  #5  
Old 07 Nov 2008, 16:02
shlomot's Avatar
shlomot shlomot is offline
 
Join Date: Apr 2007
Real name: Shlomo Tommer
It isn't even a template edit.

I filed it under products because:
  1. Many members are looking for this solution throughout the site;
  2. Ongoing support might be required;
  3. The use of prefixes is under-rated and the post here may increase awareness to this important feature.

Originally Posted by Magnumutz View Post
Isn't this just a template edit?
Why did you file it under products?
__________________
Cheers to all,
Shlomo Tommer

tsConnections | Celebrities Galore
Reply With Quote
  #6  
Old 11 Nov 2008, 09:18
GrendelKhan{TSU's Avatar
GrendelKhan{TSU GrendelKhan{TSU is offline
 
Join Date: Jun 2005
love it. will implement.

Originally Posted by shlomot View Post
It isn't even a template edit.


I filed it under products because:
  1. Many members are looking for this solution throughout the site;
  2. Ongoing support might be required;
  3. The use of prefixes is under-rated and the post here may increase awareness to this important feature.

agreed
__________________
Unreal Addicts: The Ultimate UT Fraggin Fix
Unreal Tournament Sniper Clan and UT Gaming Community.
Serving frags and fun to the UT Community Since 1999
www.UnrealAddicts.com
Reply With Quote
  #7  
Old 11 Nov 2008, 10:21
punchbowl punchbowl is offline
 
Join Date: Nov 2006
Is it possible to hide threads of a specific prefix from a group?

e.g. MEMBERS ONLY: A thread for members only

won't show for guests?
Reply With Quote
  #8  
Old 11 Nov 2008, 11:09
shlomot's Avatar
shlomot shlomot is offline
 
Join Date: Apr 2007
Real name: Shlomo Tommer
I'd love to say YES, but the answer is NO.

The prefix permissions (that can be set per prefix-set or each prefix individually) are directed at who can use that prefix in their threads, and are not about who can watch threads of a specific prefix.

Also, threads from forums that are not accessible to "non-members" won't show up in the search results.

But if you refer to filtering out of certain threads from the result-set, I'm afraid it's impossible.

I hope that vB 4 will allow permission management of prefixes for viewing also.

Originally Posted by punchbowl View Post
Is it possible to hide threads of a specific prefix from a group?

e.g. MEMBERS ONLY: A thread for members only

won't show for guests?
__________________
Cheers to all,
Shlomo Tommer

tsConnections | Celebrities Galore
Reply With Quote
  #9  
Old 11 Nov 2008, 11:19
punchbowl punchbowl is offline
 
Join Date: Nov 2006
Cheers for the answer - pity!
Reply With Quote
  #10  
Old 11 Nov 2008, 15:01
Princeton's Avatar
Princeton Princeton is offline
 
Join Date: Nov 2001
Real name: Joe Velez
moved to Articles
__________________
Former vBulletin.org Staff Member

Latest Articles:
Liquid Layout = Less Ad Revenue?
How to Monetize Your Site
Improve Web Page Performance
How To Write For The Web


If it needs instructions, there's room for improvement.
Give users what they actually want, not what they say they want. And whatever you do, don't give them new features just because your competitors have them!
Reply With Quote
  #11  
Old 25 Jul 2009, 17:32
esperone esperone is offline
 
Join Date: Feb 2006
thanks. this is very usefull.
Reply With Quote
  #12  
Old 18 Feb 2010, 08:33
acanuck acanuck is offline
 
Join Date: Feb 2009
This doesn't seem to work with vb4 anymore. Any idea how I can get this to work with vb4?
Reply With Quote
  #13  
Old 14 Jun 2011, 11:35
MagicThemeParks's Avatar
MagicThemeParks MagicThemeParks is offline
 
Join Date: Sep 2009
It didn't work for me if I have multiple words in the search term. Do I have to place a particular character into the search code to show correctly?
Reply With Quote
Reply

Similar Article
Article Author Type Replies Last Post
Prefix for closed threads Scrub vBulletin 2.x Full Releases 36 08 Jan 2003 23:43



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Article Options

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


New To Site? Need Help?

All times are GMT. The time now is 13:23.

Layout Options | Width: Wide Color: