MyBB Hacks

Full Version: Using additional fields in search
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am thinking of using the additional fields as a way of adding 'tags' to each post. eg

support, urgent, client A

I understand the adding of the text field but I wondered how feasible it would be to have a way of searching just the tags.

For example if I searched for urgent, it would find every thread that had 'urgent' within the tag field?

Thanks
You can't really "search" however you can filter.
For an example, try clicking on the thread tags here: http://mybbhacks.zingaburga.com/forumdisplay.php?fid=25

Note that XThreads isn't particularly great with filtering (or searching if that feature ever gets added) on multivalued fields, such as thread tags.  Although it "works", it would probably be better to have a dedicated plugin for this, if you have quite a number of threads to search through.
That's great i can see what you mean and I think that would work. The field where in your example you can select multiple items, could that be a free form field?

The idea being that you could type whatever labels you want separated by a comma.

In the forum display page it will sparate these items into individual links(filters) and allow you to search on them, rather than having to predefine them?

Finally, and this is a bit optimistic, could that field be dynamic enough using something like AJAX to be able to use predictive text if you start to type previously used tags?  Alternatively, field which gives you the option to select commonly used 'tags'

If you don't ask.....!
(07-28-2011 06:10 PM)thegrape Wrote: [ -> ]That's great i can see what you mean and I think that would work. The field where in your example you can select multiple items, could that be a free form field?
Yes, you can set it as a textbox (with multiple values) - it'll use commas for separators, instead of a listbox for selection.

(07-28-2011 06:10 PM)thegrape Wrote: [ -> ]Finally, and this is a bit optimistic, could that field be dynamic enough using something like AJAX to be able to use predictive text if you start to type previously used tags?  Alternatively, field which gives you the option to select commonly used 'tags'
Unfortunately can't be done with XThreads alone.  Probably better with an actual tags system.
Reference URL's