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: Custom Searching address  (Read 2942 times)

0 Members and 1 Guest are viewing this topic.

ManicMan

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Custom Searching address
« on: December 30, 2007, 11:58:18 pm »

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
Code: [Select]
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 ^_^
Logged

Nibbler

  • Guest
Re: Custom Searching address
« Reply #1 on: December 31, 2007, 12:29:52 am »

include/search.inc.php, find

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

Change to

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

Should do it.
Logged

ManicMan

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Custom Searching address
« Reply #2 on: December 31, 2007, 09:33:01 am »

great! Thanks ^_^ Nice reply time as always
Logged

wakedave

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: Custom Searching address
« Reply #3 on: January 23, 2008, 08:46:57 am »

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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Custom Searching address
« Reply #4 on: January 23, 2008, 09:14:18 am »

Your issue differs from the one asked by the original thread starter. You shouldn't have tried to hijack this thread.
Logged
Pages: [1]   Go Up
 

Page created in 0.021 seconds with 20 queries.