Hi,
I would like to enable users to search each customized fields of my gallery separately and, if possible offer them the possibility to view the list of keywords (pick list ) they can choose among.. (i hope I'm making myself clear enough!!)
Which file should I edit first ?
Thank you very much for your help
Posts: 16504
Clear enough for me to understand. That would be a pretty cool feature. But it would be a feature request. You can file a feature request here: www.sf.net/projects/gallery click on RFE. In a couple of hours the list of requests will be updated here http://gallery.menalto.com/sfvote/all and you'll be able to vote on it.
If you're a coder, you could hit the Module Develpment forum for assistence on writing such a module or extending the search module to add these features: http://gallery.menalto.com/forum/71
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here
Posts: 40
Allright, I'll try to develop this myself but I don't know which way to start. Which file am I suppose to modify??
This may sound as a completely silly question, I apologize, but I'm a new user ;)
Thank you
Posts: 40
Sorry to insist, but can anyone tell me which file I should edit to make all the fields the advanced search is serching on appear?
Any help would be great..
Thanks
Posts: 94
The main file for searching individual fields in the Item table is the GalleryCoreSearch.class in modules/core/classes
As for the keywords list you would have to code this on your own. So far nothing exist for this type of thing.
Posts: 40
Thank you very much for the info, I was becoming desperate about ever getting any answer!!!
If I'll manage to code this I'll post it there...
Thanks again
Posts: 109
You can show the keywords of an item just by printing $theme.item.keywords in the photo.tpl file of the theme you're working with (might as well work in any other tpl file), but this just dumps the keywords on the screen. To accompany all keywords with their own toggle box and have a search button to go searching on the ticked items, you'll have to explode the keywords string (If you have 'keyword' entries that span several words, you can't explode on break, but could seperate all keywords with a bar '|' and explode on that) . Or maybe preg_match. And then you loop through the resulting array, placing a toggle box with every element. Beneath it you can have the submit button. To see how to implement your own search form, just view source in your browser of a page containing the search form of gallery...
Hope this helps you a bit.
Posts: 2
Over this past year since this thread's last posting, has any additional work been done on an advanced search feature such as the one stated above and possibly made into a module? Would be *very* interested in this as well.
Posts: 17
I am working on something quite similar to all this. This topic has been inactive for a while and no more informations about this "custom search engine" have been posted. I am really interested on this feature, and I have some ideas to work it out, but my php-sql programming skills are pathetic, so if there is anyone working on it, or interested, we could work together.
My idea was to adapt the code used to "bulk edit custom fields" to create a similar interface, where all the custom fields would be shown next to a checkbox. Then, once the form is filled (some boxes checked, and its custom fields values entered), click on a "SEARCH" button, and it would do the comparsions between this values and the pictures ones.
I guess the search should be made using the GalleryCoreSearch.class, or maybe some SQL searches...anyway, the BULK EDIT of Custom fields patch is found here:
http://gallery.menalto.com/node/56658
PLEASE,SOMEONE HELP ME! THNX