forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: fotomad on June 20, 2006, 03:43:35 pm

Title: SEARCH WITHIN RESULTS MOD
Post by: fotomad on June 20, 2006, 03:43:35 pm
does anyone know of a mod for adding a checkbox below the main search field to 'search within results' i have searched all the forum still cannot find one ?

thanks
Title: Re: SEARCH WITHIN RESULTS MOD
Post by: Paver on June 22, 2006, 02:44:35 pm
I'm not sure I understand your question.  I do understand most search forms that have a "search within results" option.  But on Coppermine's search results page, there is no search field.  If you have set up a "quick search" box or some other extra search box, then I can see how you could add a "search within results". 

The way to implement it I guess is to merely add the new keywords to the old ones.  I wonder if it would be simpler to do that in the search field, put the current search terms into the search box, and let the user add more terms and search again - instead of having a "search within results".  The end effect would be the same (as long as the "AND" operation is selected), and it's much easier to implement.  To implement this without putting the search terms in the search box explicitly, I guess you'd have to set up a hidden field with the current search terms, to which the user will add others in the blank search box.  But to process this extra hidden field would take a little work.

The plugin "Search Album Title & Description (http://forum.coppermine-gallery.net/index.php?topic=26483.0)" shows one way of processing new fields on the search form, and even though that way is clumsy (it uses a replacement search form and effectively replaces the search processing for those new fields), it may be the only way to do it as a plugin.  A mod or hack would be not preferable since future upgrades would be a pain.