forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: uk_martin on March 27, 2009, 02:14:43 pm
-
Hi
I was wondering if it is possible to send search results by means of URL syntax?
What 'd like to do is to embed images in web pages that link to Coppermine, in such a way that if someone clicks on an image of "Joe Bloggs", it will send the user to the Coppermine Gallery, at a page that has done a search for all Joe Bloggs images, and is displaying them as if a manual search for Joe Bloggs has been done. So somehow, the URL has to program Coppermine to do the search.
Is there a suitable URL syntax that can be used in this way?
Thanks in advance
Martin
-
thumbnails.php?album=search&search=whatever
-
Excellent, thanks for that.
Just to be sure about something though, would it be "thumbnails.php?album=search&search=joe+bloggs" or "thumbnails.php?album=search&search=joe&bloggs", or ...?
-
You can't specify an AND search in the url.
-
Hi Nibbler
Thanks for the reply. Oh dear...I have a "Phil Hart" and a "John Hart", and I have a "Harry Bastable" and a "Steve Bastable" Any suggestions about how to search for Phil Hart's photos without getting any John Hart photos, how to get Harry Bastable photos but not Steve Bastable's?
Thanks
Martin
-
Edit include/search.inc.php, change
$type = $_POST['type'] == 'AND' ? " AND " : " OR ";
to
$type = $_REQUEST['type'] == 'AND' ? " AND " : " OR ";
Then use
thumbnails.php?album=search&type=AND&search=joe+bloggs
-
Thanks Nibbler, that's great :)