search troubles in custom fields search troubles in custom fields
 

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

search troubles in custom fields

Started by jardin, December 27, 2005, 06:57:28 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jardin

I add seven custom fields applying a technique found in the forum. All is working well except the search function where I'm not able to search in my new fields.

Any idea ?

Nibbler


jardin

I applied this mod to CPG 1.4.2

http://forum.coppermine-gallery.net/index.php?topic=7803.0

Result is visible at

http://biereetjardin.free.fr/coppermine/

new custom fields I'm interested in are couleur, precocite, poids (associated with tomates album)

Thanks for help

Nibbler

You need to add the new fields into the list of fields that can be legally searched. Look for this array

$allowed = array('title', 'caption', 'keywords', 'owner_name', 'filename', 'pic_raw_ip', 'pic_hrd_ip', 'user1', 'user2', 'user3', 'user4');

in include/search.inc.php and in thumbnails.php and add in the new fields, eg

$allowed = array('title', 'caption', 'keywords', 'owner_name', 'filename', 'pic_raw_ip', 'pic_hrd_ip', 'user1', 'user2', 'user3', 'user4', 'user5', 'user6');

Are you using the 1.4 search page ?

jardin

Thanks Nibbler,

All is OK now, I forgot to modify the thumbnails.php file