Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: Custom Fields searchable  (Read 3907 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.033 seconds with 20 queries.