I entered the custom user fields for each photo, and they do show up on the image page with the file information. However, I would also like this information to show up on the top thumbnails page with all the images and their captions. I've looked at theme.php and template.html, but it's not clear to me where I can go to edit this and what form the edit must take to specify the extra fields.
Thank you for any help.
Marianne
http://forum.coppermine-gallery.net/index.php/topic,54176.0.html
Hi Nibbler - thanks, but I'm still not clear on where this code chunk is?
I've searched in thumbnails.php, displayimage.php,theme.php looking for either "build_caption()" or for the code:
"if ($CONFIG['caption_in_thumbview']){"
but - no luck finding that anywhere.
In the referenced post, it says that the code is in "include/functions.in.php" -- but I don't see anything called that anywhere?
This seems like I am missing something really obvious, so I apologize in advance.
Thanks,
Marianne
I just wanted to edit my post.
I also checked for that function in index.php.
There's a directory called 'include' and a file named 'functions.inc.php' inside it. If you didn't have it Coppermine would not be working.
Hello,
Sorry to be such a dimwit about the include directory. I must've been very sleep deprived.
I modified the code in functions.inc.php as follows:
if ($CONFIG['caption_in_thumbview']){
$caption .= $row['caption'] ? "<span class=\"thumb_caption\">".strip_tags(bb_decode($row['caption']))."</span>" : '';
}
// MBC modifications to show custom fields on thumbnail view
if ($CONFIG['user_field1_name']){
$caption .= $row['user1'] ? "<span class=\"thumb_caption\">".strip_tags(bb_decode($row['user1']))."</span>" : '';
}
if ($CONFIG['user_field2_name']){
$caption .= $row['user2'] ? "<span class=\"thumb_caption\">".strip_tags(bb_decode($row['user2']))."</span>" : '';
}
if ($CONFIG['user_field3_name']){
$caption .= $row['user3'] ? "<span class=\"thumb_caption\">".strip_tags(bb_decode($row['user3']))."</span>" : '';
}
IT is loaded. No errors are showing up, but no custom fields are showing up either.
Is there somewhere else that needs to be modified as well for these to show up?
I was expecting them to show up here:
http://useaboston.com/2008a/thumbnails.php?album=1&page=1&sort=na
Thank you!
Marianne
I have figured out that the extra fields DO show up when I search for something - so if you click on search by location or search by medium...then the extra fields show up - no problem. Just not on the main thumbnails page that I referenced above.