Custom Searching address Custom Searching address
 

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]

Main Menu

Custom Searching address

Started by ManicMan, December 30, 2007, 11:58:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ManicMan

I know it has been asked before about search bars on a HTML site to the gallery but what i am looking for is a simple link that automatical searchs for a pre-set word.  So far i use
thumbnails.php?album=search&search=[Search Word]
and that works all well an good BUT, i want it to ONLY search the keywords. What i am doing on my site is i have alot of images and screenshots so when you go to a character profile page, i want a link that when you click on it, it searchs all the images and screenshots for ones with the name of the character as a keyword. This way people have easy and quick access to what they want more then having to do it all themselfs and having to scroll though what might be useless images because of a word they have in common. For example, Since i run a Sonic the Hedgehog website, people might want to find Images of Metal Sonic. If they type in Metal Sonic and it looks via everything, they will not only find Metal Sonic images but Sonic Images and anything else with the word 'Sonic'. By doing the above quick link, it basicly does the same thing for them and gives them all images that they want and a lot they don't. So if i could tick ONLY keywords and it searchs the whole string, it only finds images with 'Metal Sonic' fully.

well.. am sure you can get the idea and see why i would like to offer my visters this feature, it means alot of work for me putting these key words in 10,000+ images but it should make everything easyer for the user to find.

Thanks and sorry if this (with the presets) has been asked before. I did search but well.. i found alot of results that didn't quite get as far as i wanted them to ^_^

Nibbler

include/search.inc.php, find


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


Change to


if (!isset($USER['search']['params'])){
        $USER['search']['params']['keywords'] = 1;
}


Should do it.

ManicMan

great! Thanks ^_^ Nice reply time as always

wakedave

I'm also looking for a similar 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.

Joachim Müller

Your issue differs from the one asked by the original thread starter. You shouldn't have tried to hijack this thread.