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 Fields searchable  (Read 3905 times)

0 Members and 1 Guest are viewing this topic.

Skipper

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 29
Custom Fields searchable
« on: September 26, 2004, 10:02:22 pm »

How do you make the custom fields so that they are searched when using the search facility?

Thanks.
Logged

stock

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 109
Re: Custom Fields searchable
« Reply #1 on: September 28, 2005, 08:16:44 pm »

I'd like to know this too. I'm continuing to look on the forum but better not double post in the meantime or will get a telling off!

Stock

If I find anything I'll post it here
Logged

Azrayen

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 87
    • azrayen.net
Re: Custom Fields searchable
« Reply #2 on: September 29, 2005, 12:48:23 am »

Custom fields are nammed user1 to user4 in the database.

You have to edit this line
Code: [Select]
$result = db_query("SELECT category, title, aid, keyword,description FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid='" . (- $cat) . "'");
in thumbnails.php to add the fields you want to search (user1 to user4). For example to search in original fields + custom field 1, use this code :
Code: [Select]
$result = db_query("SELECT category, title, aid, keyword,description, user1 FROM {$CONFIG['TABLE_ALBUMS']} WHERE aid='" . (- $cat) . "'");

NOTICE : This code works for the search function, but I'm not sure it had not a bad influence on other functions of Coppermine. Use with caution !

Azy
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 19 queries.