Member
Member
flu   08-11-2008, 18:00
#1

Hi,
I'm looking for a way to add some parameters to the search box like, for example, checkboxes corresponding to some tags I use in order to limit the search results to these parameters.
For example :
search form
checkbox tag 1 checkbox tag 2 *checkbox tag 3

Do you have any idea about how to proceed ?

Thank you for your time.

Member
Member
sbillard   08-11-2008, 19:02
#2

I wish I did, this would be a trememdous feature. But so far we have had problems with the styling of the feature--how to get it to be available but unobtrusive.

There is code in admin-options.php for making a checkbox list of the possible search options (including checking the ones that are set by the options.) This could easily be made into a function that could be called from the printSearchForm() function.

The Post handling of the search request would have to be extended to process this list. All this is doable and not too hard if the first issue of styling can be handled.

If you are interested in collaberating on this, I will be glad to do the "easy" part.

Member
Member
flu   08-11-2008, 19:38
#3

Thank you for your answer Stephen.

Yes I'd love to collaborate with you on this (even if I don't see what I could do that you can't do yourself !).
IMHO, in a first time, have it as an option would be nice with calling a special function.

Well... just tell me what you want me to do !

Member
Member
sbillard   08-11-2008, 23:30
#4

I've released the base code into the current SVN. Currently there is a comment around the code that activates it in printSearchForm() in template-functions.php. If you remove the comment you will get the checkbox list. But it is "out of place". It needs to be hidden so that with some sort of icon to click on to show it. I am not so good at CSS and styling stuff.

See if you can make it look pretty!

Member
Member
sbillard   09-11-2008, 02:34
#5

Well, I did a bit more work. It is now an acceptable implementation all be it some improvement would be welcome.

The search fields are hidden and exposed when you click on an icon between the input field and the search button. (But it there is only one possible field, all this is supressed.)

The searcher may choose any field from the list that the admin has designated as allowed fields. The form will remember the fields used on the last search (of that form) and offer those as the default set of fields.)

Member
Member
flu   09-11-2008, 20:52
#6

Hi Stephen,
The svn and the last nightly version are the same thing, right ?

Member
Member
sbillard   09-11-2008, 21:15
#7

You probably should wait for tonight's build or the current SVN since acrylin has also colaborated on the effort. But, in answer to your question, the nightly build represents the SVN as of 11:00pm Pacific time. The SVN perhaps has more recent changes. If we had not made changes today then you would be correct that the two were equivalent.

Member
Member
flu   09-11-2008, 21:24
#8

Ok, I'll give a try with this one.
Thank you for your time.

Member
Member
flu   12-11-2008, 16:30
#9

Woaw, it works great for me !
I'm about to try to customize what you've done with checkboxes of my own tags.
Thank you !

Member
Member
flu   12-11-2008, 17:25
#10

Just noticed some really minor typos with checkboxes as 'Descripton' in the displayed fieldset and "serach criteria" in the admin options panel.

The criterias are not multilingual, aren't they ?

Member
Member
flu   12-11-2008, 17:45
#11

I'd like to have more criterias available :
For example in my gallery, I've tagged every image with "color photography" or "black-and-white photography".
I'd like to display two checkboxes with these values under the search field.

Do you have any idea about how to proceed ?

Member
Member
sbillard   12-11-2008, 20:03
#12

You would have to make some kind of auto fill of the search criteria itself as these are not fields to be searched but values to be looked for. Look at the tag suggest plugin. That might be a good starting point.

Member
Member
sbillard   12-11-2008, 20:07
#13

The criteria are not multi-lingual, but of course, you can have multiple tags, one for each language.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.