Custom Fields searchable Custom Fields searchable
 

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

Main Menu

Custom Fields searchable

Started by Skipper, September 26, 2004, 10:02:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Skipper

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

Thanks.

stock

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

Azrayen

Custom fields are nammed user1 to user4 in the database.

You have to edit this line
$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 :
$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