forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: gtgillis on March 20, 2012, 03:59:05 pm
-
I am looking for an option, hack, plugin, etc. that will all me to select an individual album that I want to search from the search page.
-
So you want to add a drop-down list with all albums to search.php, correct?
-
So you want to add a drop-down list with all albums to search.php, correct?
A drop down or a list with check boxes. With over 9000 photos in 246 albums my search results can be a little overwhelming. If I can specify an album or albums I could reduce the number of irrelevant results.
-
A list may be too much depending on the number of albums (246 albums are already too much IMHO, and there are galleries with much more albums). A drop-down with the option "Search in all albums" followed by all albums is the better option I think. I'll check if it's easy to modify the code accordingly.
-
Here is a hack to add a drop down list of albums to the search page. This will allow you to search an individual album for the search words. If you do not select an album then all albums are search just like normal
You can see it in action at http://www.rudebastard.com/coppermine/search.php (http://www.rudebastard.com/coppermine/search.php)
Replace your files with the ones attached. search.php goes in the main coppermine directory, search.inc.php goes in the include directory and english.php goes in the lang directory. If you are using a different language file you will need to add the following line to the lang_search section of the file you use and translate the words "All Albums".
$lang_search_php['all_albums'] = 'All Albums';
I am marking this thread as solved.