forum.coppermine-gallery.net
Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: wakedave on January 23, 2008, 09:32:04 am
-
I'm looking for a solution to a problem I'm having... For example, I want to search for "big apple" and I use:
thumbnails.php?album=search&search=big+apple
But it returns me all the images that either has "big" OR "apple". Is there a way I can change the link that will search ONLY images that has "big" AND "apple" ?
Also is there a way to change the link that will search within a specific album no.?
I know I can do all this from the Search page, but I would like to be able to have one link address, so I can email to someone and they can go directly to the search results page based on the search keywords I have specified.
Thanks in advance.
PS. I posted this question on what i thought was a similar thread, but I've been told not to hijack it, so I'm starting a new thread. So sorry if this is a repeat.
-
I'm also interested in building a link to search for keyword AND keyword. Anyone?
-
I'm stuck with the same problem, I need to create search links with more than one word and don't know how. I tried to add "&type=AND" to the link, but it still doesn't work.
Help would be very appreciated :)
-
If you want &type=AND to work you need to change include/search.inc.php
$type = $_POST['type'] == 'AND' ? " AND " : " OR ";
to
$type = $_REQUEST['type'] == 'AND' ? " AND " : " OR ";
-
It works, thanks a lot!
-
Sorry, too fast..
Now I noticed that the search results for those links show the correct thumbnails, but when I click on them they link to the wrong pictures. I checked my thumbnails, but they work fine in the album view, so the problem must be the change in the search file.
When I use the coppermine search with single words it works fine, but it doesn't work anymore with more than one word :(. Is there something else I have to change in this file?
-
http://forum.coppermine-gallery.net/index.php/topic,55415.msg270616.html#msg270616
-
This is the link to the gallery (not official yet... I'm still working on it and hope noone will see it here because it sould be a surprise ;) ):
http://www.planearium.de/galerie/
I need the search-links for certain episodes. Every picture will have the title of the episode where it's from.
For example when I search for "103 - Volcano" the correct thumbnails are shown, but they link to the worng pictures.
-
I suggest upgrading before doing anything else.
-
If you want &type=AND to work you need to change include/search.inc.php
$type = $_POST['type'] == 'AND' ? " AND " : " OR ";
to
$type = $_REQUEST['type'] == 'AND' ? " AND " : " OR ";
I've made the above alteration in my test gallery, what I was hoping it would do is only show images that included "both" search strings. Try this:-
http://www.sharpos-world.co.uk/testing/cpg1424test/thumbnails.php?album=search&search=t99%20t2
Only 1 image includes t99 and t2, which is the result I wanted, but it also shows another image which has just t99.
Is there a solution to this, please.
-
http://www.sharpos-world.co.uk/testing/cpg1424test/thumbnails.php?album=search&search=t99%20t2&type=AND
-
http://www.sharpos-world.co.uk/testing/cpg1424test/thumbnails.php?album=search&search=t99%20t2&type=AND
Thanks very much for that, Nibbler.