The vB Geek

The vB Geek (http://www.thevbgeek.com/index.php)
-   Tutorials (http://www.thevbgeek.com/forumdisplay.php?f=12)
-   -   Filter This! (http://www.thevbgeek.com/showthread.php?t=2582)

The Geek 12-13-2006 03:43 PM

Filter This!
 
3 Attachment(s)
Please note that this tutorial pertains to GARS 2.1.1 and GARS 2.1.2
Earlier versions will not have the filter module and later versions may be slightly different (but how the hell do I know that as I haven't written any newer versions yet!).

The custom field

The filter module is a new module and feature in GARS that will enable you to filter a forum by a custom field. The custom field MUST be a 'Select Box' type. A select box is a drop down list of pre-defined text. You define the text when you create (or edit) a Select Box custom field

Attachment 652
A select box custom field

Adding to your type

Then your type must have the select box custom field associated with it. To do this, edit the correct type and scroll to the bottom. You will notice that there will be a tick box to associate the custom field to your type. There will also be an additional tick box (only available with select box custom fields) to allow users to filter by the field.

Attachment 653
Allow users to filter by field

Setting up the module

You need to add the filter module to your module set in order for it to appear. It is important to note that the filter module only works on forumdisplay pages so don't add it to the showthread page!

Attachment 654
Editing the modules settings

You can currently only filter by 1 select field at a time.

Want an example? The forum this tutorial in is set up to filter between GARS, GAL and GAB tutorials :)

nJoy

phlogiston 12-14-2006 08:38 AM

not working for me in firefox 1.5

Problem seems to be the same as something else I saw where using & rather than & in urls for javascript's document.location gives an incorrect url.

ie. I'm being left with http://www.thevbgeek.com/forumdisplay.php?f=12&filter[20]=GAB

IE quick swaps the url in the address bar from what I can see, dunno which browser is doing the "right" thing though!

goyo 12-14-2006 09:01 AM

Quote:

Originally Posted by phlogiston (Post 14913)
not working for me in firefox 1.5

Problem seems to be the same as something else I saw where using & rather than & in urls for javascript's document.location gives an incorrect url.

ie. I'm being left with http://www.thevbgeek.com/forumdisplay.php?f=12&filter[20]=GAB

IE quick swaps the url in the address bar from what I can see, dunno which browser is doing the "right" thing though!

I had the same problem, here's the solution:
http://www.thevbgeek.com/showthread....4716#post14716

:)

The Geek 12-14-2006 11:34 AM

hmmm. Youre right. FF doesnt like it unless its an &... Ill mark it as a bug. In the meantime, check the post above for a fix

Ramses 12-14-2006 03:20 PM

I can confirm this, it's only working if change as described above, but still not filtering words containing ü ä ö etc.
B.t.w. this filtering thing is a very cool idea, thanks geek.

goyo 12-14-2006 05:55 PM

Quote:

Originally Posted by Ramses (Post 14936)
I can confirm this, it's only working if change as described above, but still not filtering words containing ü ä ö etc.
B.t.w. this filtering thing is a very cool idea, thanks geek.

Yeah it doesn't work with other characters like: ()
It should be stated somewhere... :D

Otherwise GARS is not "just" an article/review system anymore...it's soooo flexible :)

The Geek 12-14-2006 08:07 PM

Ill look into the special character issue. Im suprised it doesnt, but I will have to run tests with it to figure out why. Im sure another minor update will make an appearence within the next week :)

Tigratrus 12-14-2006 08:25 PM

Heh. In time for Xmas! Actually, having the Filters pretty much already qualifies as an extra Xmas present... We were talking about ways to do exactly what the filter provides just the night before you released it. I'm thinkin the Geek must be psychic... Or Psycho... Or something like that ;-).

We've been using the filters quite a bit setting up a whole slew of GARS enabled forums of different flavors, and they're working great so far. Once we figured out the quirks... Nice addition to the tutorial btw!

James

trana 12-14-2006 10:32 PM

It doesn't seem to be working for me. I have the filter module enabled and in the module set. Also the fields are selected within the module edit screen. I cleaned my module cache as well.

Any ideas?

The Geek 12-15-2006 08:33 AM

Can you provide a URL trana?


All times are GMT. The time now is 01:01 AM.

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

Tutorial powered by GARS 2.1.9 ©2005-2006