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 by album name or custom field?  (Read 3996 times)

0 Members and 1 Guest are viewing this topic.

virgvv

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Search by album name or custom field?
« on: April 10, 2007, 07:00:15 am »

I was wondering if it is possible to fetch photos by album name (rather than numeric ID) and/or the text in a custom field.  The $format tags seem to have what I need, but if I understand the user manual correctly, they're used in the options array, not the source parameters.

Is there a way to do what I want without hacking the code?

Thanks!
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Search by album name or custom field?
« Reply #1 on: April 10, 2007, 03:59:19 pm »

I was wondering if it is possible to fetch photos by album name (rather than numeric ID) and/or the text in a custom field.  The $format tags seem to have what I need, but if I understand the user manual correctly, they're used in the options array, not the source parameters.

Is there a way to do what I want without hacking the code?

Thanks!

Not directly.  Instead of hacking the code, I would recommend adding code to handle it on your page.  You can use CpmFetch to get a list of albums, search that, then call the normal code with the number.   At least for the album.  There is no search in a custom field as of yet.  You can now search the title and caption text though.

If you do opt to hack a search the custom fields, do it in the makesourcesql function and post a patch...  maybe I will just merge it in (thats for the latter).




Logged
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 19 queries.