Custom Fields searchable Custom Fields searchable
 

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]

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