Custom Search Link Custom Search Link
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Custom Search Link

Started by wakedave, January 23, 2008, 09:32:04 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

wakedave

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.

Pacjack

I'm also interested in building a link to search for keyword AND keyword. Anyone?

Zwerg-im-Bikini

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 :)

Nibbler

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 ";

Zwerg-im-Bikini


Zwerg-im-Bikini

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?

Joachim Müller


Zwerg-im-Bikini

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.

Joachim Müller

I suggest upgrading before doing anything else.

sharpo

Quote from: Nibbler on June 03, 2009, 05:07:11 PM
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.
Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25


sharpo

Sharpo (not an expert, just a Coppermine user)
3 live galleries, first started in 2006.
http://www.sharpos-world.co.uk/BB3cpg/ with over 8,000 images.
http://www.sharpos-world.co.uk/cpg/ with over 25,000 images. 1.6.25
http://www.sharpos-world.co.uk/kc/ with over 300 images. 1.6.25