Advanced search

AVSF

Joined: 2005-11-22
Posts: 40
Posted: Tue, 2005-11-22 12:57

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

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Tue, 2005-11-22 14:30

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

 
AVSF

Joined: 2005-11-22
Posts: 40
Posted: Mon, 2005-12-05 09:59

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

 
AVSF

Joined: 2005-11-22
Posts: 40
Posted: Mon, 2005-12-12 15:45

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

 
jrmint

Joined: 2005-08-20
Posts: 94
Posted: Tue, 2005-12-13 13:35

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.

 
AVSF

Joined: 2005-11-22
Posts: 40
Posted: Tue, 2005-12-13 14:21

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

 
saul11

Joined: 2005-10-04
Posts: 109
Posted: Sat, 2006-01-14 15:13

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.

 
temptingfate

Joined: 2006-09-28
Posts: 2
Posted: Thu, 2006-09-28 15:34

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.

 
cervantes_roger

Joined: 2006-10-25
Posts: 17
Posted: Mon, 2006-12-11 17:44

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