Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: search.php syntax  (Read 4092 times)

0 Members and 1 Guest are viewing this topic.

wim

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
search.php syntax
« on: November 25, 2006, 05:30:48 pm »

Hi,

I have put extra fields for the file-info: Country and Location.
I want to make a search for pictures with Location = "Bukk". I thought that it be is possible to use the syntax http://www.naturephotography.nl/photogallery/thumbnails.php?album=search&search=Bukk&type=match

There is something strange with it. It don't work until I go to http://www.naturephotography.nl/photogallery/search.php and set Location=on and put Bukk in the search field. When I cut and past the first mentiond syntax again it works fine. It looks that then the search syntax works with a catch or something like that.

My question is..... Witch syntax I must use to get what I want?
I want use that syntax / direct link for a direct link on one off my webpages.

Thanks in advance...

Wim
« Last Edit: December 01, 2006, 08:32:50 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: search.php syntax
« Reply #1 on: November 27, 2006, 10:36:30 pm »

You need to make your custom field a default search field by modifying the code in include/search.inc.php

Code: [Select]
if (!isset($USER['search']['params'])){
        $USER['search']['params']['title'] = $USER['search']['params']['caption'] = $USER['search']['params']['keywords'] = $USER['search']['params']['filename'] = 1;
}

Your Location is user2, so the code becomes

Code: [Select]
if (!isset($USER['search']['params'])){
        $USER['search']['params']['title'] = $USER['search']['params']['caption'] = $USER['search']['params']['keywords'] = $USER['search']['params']['filename'] = $USER['search']['params']['user2'] = 1;
}

After that you can use http://www.naturephotography.nl/photogallery/thumbnails.php?album=search&search=Bukk
Logged

wim

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: search.php syntax
« Reply #2 on: December 01, 2006, 07:31:25 pm »

Hi Nibbler

I am very grateful that you have helped me with this problem. It works exactly as I wanted.
Thanks again...

Kind Regards
Wim
www.naturephotography.nl
Logged
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 20 queries.