Custom Fields searchable Custom Fields searchable
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

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