Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 [request] Advanced XThreads Prefix Filter
Jumper Offline
Member
***
Posts: 75
Joined: Aug 2010
Post: #1
[request] Advanced XThreads Prefix Filter
i use XThreads prefix system, and we have more than only one prefix in one line.

before the subject we have 3 prefixes, one for "category" and one for "quality" and one for "language". every prefix is sortable. but you can only sort by one prefix. is it possible to create a menue with a triple dropdown-menu where you can select individually the Values List from all 3 prefixes, and the results are only Posts where the selected Values match?

Example:

prefix 1
values: value1, value2, value3, value4, value5
prefix 2
values: example1, example2, example3, example4, example5
prefix 3
values: test1, test2, test3, test4, test5

now i need a triple dropdown-menue, where you can select the values from prefix 1, prefix 2 and prefix 3, and for example: if you select the values "value2" & "example1" & "test4", and click on a search-button, results should only be displayed entries where this 3 values match.

possible?
(This post was last modified: 08-11-2012 08:01 PM by Jumper.)
08-11-2012 08:00 PM
Find all posts by this user Quote this message in a reply
leefish Offline
Hamster
*****
Posts: 1,009
Joined: Apr 2010
Post: #2
RE: [request] Advanced XThreads Prefix Filter
Yes. I do exactly this on leefish. I have three prefixes set up.

http://www.leefish.nl/mybb/forumdisplay....http://www.leefish.nl/mybb/forumdisplay.php?filtertf_prefix=Sims2&filtertf_pfcat=Buy&fid=7&filtertf_dld_ep_prefix=OFB&sortby=lastpost&order=desc

I will get the template for it.

xxx_forumdisplay_searchforum_inline

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<tr><td class="trow1" align="center">
<br />
			<form action="forumdisplay.php" method="get">
				<label>prefix1</label><select name="filtertf_prefix1">
<option value="">All</option>
<option value="px1"{$GLOBALS['filters_set']['prefix1']['selected']['px1']}>px1</option>
<option value="px2"{$GLOBALS['filters_set']['prefix1']['selected']['px2']}>px2</option>
 </select>

				<label>prefix2</label><select name="filtertf_prefix2">
					<option value="">All</option>
<option value="apx1"{$GLOBALS['filters_set']['prefix2']['selected']['apx1']}>apx1</option>
<option value="apx2"{$GLOBALS['filters_set']['prefix2']['selected']['apx2']}>apx2</option>
				
				</select>
				<label>prefix3</label><select name="filtertf_prefix3">
					<option value="">All</option>
<option value="opx1"{$GLOBALS['filters_set']['prefix3']['selected']['opx1']}>opx1</option>
<option value="opx2"{$GLOBALS['filters_set']['prefix3']['selected']['opx2']}>opx2</option>
				
				</select>


<br /><br />
<label><input type="submit" class="button" value="go" /></label>
				<input type="hidden" name="fid" value="{$fid}" />
				<input type="hidden" name="sortby" value="{$sortby}" />
				<input type="hidden" name="order" value="{$sortordernow}" />
				<input type="hidden" name="datecut" value="{$datecut}" />
			</form>
		</td>
</tr>



[Image: leelink.gif]
MYBB1.6 & XThreads
(This post was last modified: 08-11-2012 09:58 PM by leefish.)
08-11-2012 09:45 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Jumper Offline
Member
***
Posts: 75
Joined: Aug 2010
Post: #3
RE: [request] Advanced XThreads Prefix Filter
Ooohh leefish, you are my hero [Image: smiley-hug006.gif]

i use your code in additional forumdisplay template. was better for me than using searchforum inline.
language prefix will be added next week. all works perfect Biggrin BIG Thanks Yipi

   
08-13-2012 09:08 PM
Find all posts by this user Quote this message in a reply
Jumper Offline
Member
***
Posts: 75
Joined: Aug 2010
Post: #4
RE: [request] Advanced XThreads Prefix Filter
one question:

i have add one prefix for the language (pref_lang). values are:
1.german
2.english
3.german & english
4.other

but if somebody select "german & english"-filter, the single languages "german" and "english" are not included. i know, that´s normaly correct. but is there any solution, that if you select "german & english", that the other 2 values are included in the search-result?
08-14-2012 07:47 PM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #5
RE: [request] Advanced XThreads Prefix Filter
You can filter on multiple values for a single field, but I don't really know of a way like you described above.

My Blog
08-15-2012 09:21 AM
Find all posts by this user Quote this message in a reply
ezeql Offline
Junior Member
**
Posts: 7
Joined: Jul 2013
Post: #6
RE: [request] Advanced XThreads Prefix Filter
Is there any way for dynamically generate the list for all available values for a certain thread field?

Thanks
07-27-2013 12:44 AM
Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #7
RE: [request] Advanced XThreads Prefix Filter
Unfortunately there isn't.

My Blog
07-27-2013 11:25 AM
Find all posts by this user Quote this message in a reply
tempo Offline
Junior Member
**
Posts: 30
Joined: Aug 2012
Post: #8
RE: [request] Advanced XThreads Prefix Filter
(08-11-2012 09:45 PM)leefish Wrote:  Yes. I do exactly this on leefish. I have three prefixes set up.

http://www.leefish.nl/mybb/forumdisplay....http://www.leefish.nl/mybb/forumdisplay.php?filtertf_prefix=Sims2&filtertf_pfcat=Buy&fid=7&filtertf_dld_ep_prefix=OFB&sortby=lastpost&order=desc

I will get the template for it.

xxx_forumdisplay_searchforum_inline

Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<tr><td class="trow1" align="center">
<br />
			<form action="forumdisplay.php" method="get">
				<label>prefix1</label><select name="filtertf_prefix1">
<option value="">All</option>
<option value="px1"{$GLOBALS['filters_set']['prefix1']['selected']['px1']}>px1</option>
<option value="px2"{$GLOBALS['filters_set']['prefix1']['selected']['px2']}>px2</option>
 </select>

				<label>prefix2</label><select name="filtertf_prefix2">
					<option value="">All</option>
<option value="apx1"{$GLOBALS['filters_set']['prefix2']['selected']['apx1']}>apx1</option>
<option value="apx2"{$GLOBALS['filters_set']['prefix2']['selected']['apx2']}>apx2</option>
				
				</select>
				<label>prefix3</label><select name="filtertf_prefix3">
					<option value="">All</option>
<option value="opx1"{$GLOBALS['filters_set']['prefix3']['selected']['opx1']}>opx1</option>
<option value="opx2"{$GLOBALS['filters_set']['prefix3']['selected']['opx2']}>opx2</option>
				
				</select>


<br /><br />
<label><input type="submit" class="button" value="go" /></label>
				<input type="hidden" name="fid" value="{$fid}" />
				<input type="hidden" name="sortby" value="{$sortby}" />
				<input type="hidden" name="order" value="{$sortordernow}" />
				<input type="hidden" name="datecut" value="{$datecut}" />
			</form>
		</td>
</tr>


first of all, thank for the code.

I have 2 problems

problem_1) i can't receive any data if one or two or three of the options set to "All"

problem_2) i really like the automatic way on your site http://www.leefish.nl/mybb/forumdisplay....http://www.leefish.nl/mybb/forumdisplay.php?filtertf_prefix=&filtertf_pfcat=&search=&fid=7&sortby=lastpost&order=desc
the filter is valid before the user push any button....
07-06-2015 05:10 AM
Find all posts by this user Quote this message in a reply
WINBOY Offline
Member
***
Posts: 71
Joined: Nov 2012
Post: #9
RE: [request] Advanced XThreads Prefix Filter
Where to add this code???
08-16-2015 02:55 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

 Standard Tools
Forum Jump: