forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 miscellaneous => Topic started by: TerraNaut on February 08, 2007, 11:29:30 am

Title: Problems with the Search Syntax
Post by: TerraNaut on February 08, 2007, 11:29:30 am
I cant get my url search function to work. I want to make a hyperlink search (http://www.terranaut.dk/billeder/thumbnails.php?album=search&search=Tokina) but the search comes out blank.

If I go and make a manual search (through coppermine and set a mark in lens) there is no problem.

My humble questions is how do I make this work? I have tried to alter the searh.inc.php file by adding =$USER['search']['params']['user1'] (trying user1 through user4) but without any results.

My Coppermine URL is: http://www.terranaut.dk/grafik/map/kort-e.htm

Thank you - Rasmus
Title: Re: Problems with the Search Syntax
Post by: Nibbler on February 08, 2007, 02:17:45 pm
Set user3 as a default search field, so change

Code: [Select]
$USER['search']['params']['title'] = $USER['search']['params']['caption'] = $USER['search']['params']['keywords'] = $USER['search']['params']['filename'] = 1;

to

Code: [Select]
$USER['search']['params']['title'] = $USER['search']['params']['caption'] = $USER['search']['params']['keywords'] = $USER['search']['params']['filename'] = $USER['search']['params']['user3'] = 1;

in search.inc.php
Title: Re: Problems with the Search Syntax
Post by: TerraNaut on February 08, 2007, 05:54:51 pm
Hi Nibbler

A million thanx - it's working like a dream.  ;D
Title: Re: Problems with the Search Syntax
Post by: soro on February 12, 2007, 06:56:30 am
I'm searching with a form button. Gives me more flexibility, I believe.  :D Looks something like this:
Code: [Select]
<form method="post" action="/path to gallery/thumbnails.php">
<input type="hidden" name="search" value="search strings" /> <!-- multiple strings separated by blank spaces -->
    <input type="submit" value="Some name for your button" class="button" />
    <input type="hidden" name="album" value="search" />
    <input type="hidden" name="title" />
    <input type="hidden" name="keywords" />
    <input type="hidden" name="caption" />
    <input type="hidden" name="filename" />
    <input type="hidden" name="type" value="AND" /> <!-- or whatever the desired operator -->
</form>
Not saying all this cannot be passed on in a URL.