Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Filter Threads By Thread Prefix - MyBB 1.6 Only
RateU Offline
Administrator
*******
Posts: 2,350
Joined: Mar 2010
Post: #1
Filter Threads By Thread Prefix - MyBB 1.6 Only
Now, we can filter threads by the default MyBB thread prefix using XThreads.

Then, we need to edit our forumdisplay_thread template:
Find:

Code:
{$thread['threadprefix']}


Replace with:

HTML Code
<a href="{$forumurl_q}filterxt_prefix={$thread['prefix']}">{$thread['threadprefix']}</a>


With the modification above, we can filter threads by thread prefix (click the thread prefix).


Additional Info:

The filter format should be like this:

Code:
filterxt_prefix=prefix_id


Example:
We want to display threads which has thread prefix id = 2 only. So, the filter format should be like this:

Code:
filterxt_prefix=2


And, we can use an array for this too. The format should be like this:

Code:
filterxt_prefix[]=prefix_id_a&filterxt_prefix[]=prefix_id_b&filterxt_prefix[]=prefix_id_c


Example:
We want to display threads which has thread prefix id = 1, threads which has thread prefix id = 2 and threads which has thread prefix id = 3. The filter format should be like this:

Code:
filterxt_prefix[]=1&filterxt_prefix[]=2&filterxt_prefix[]=3


With this concept, as an optional, we can place the thread prefix filter in our forumdisplay_threadlist template manually.
Example:

HTML Code
<a href="{$forumurl_q}filterxt_prefix[]=1&amp;filterxt_prefix[]=2&amp;filterxt_prefix[]=3">Display Prefix 1, Prefix 2 and Prefix 3</a>


(This post was last modified: 02-05-2011 12:38 PM by RateU.)
11-05-2010 07:20 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
Filter Threads By Thread Prefix - MyBB 1.6 Only - RateU - 11-05-2010 07:20 AM
Filtering Thread By Thread Icon - RateU - 11-06-2010, 03:11 AM

 Standard Tools
Forum Jump: