Trying in a separate thread in case this is viewed as a separate issue.
Using the help in another thread with a code chunk provided by Nibbler, I modified functions.inc.php intending that my custom user fields would show up in each thumbnail view as part of the caption.
It is showing up on thumbnail views in the search function, but it is not showing up on thumbnails.php. In other words,
I can see the custom fields here:
http://www.useaboston.com/2008a/thumbnails.php?album=search&type=full&search=Fabric
But not here:
http://www.useaboston.com/2008a/thumbnails.php?album=1&page=1&sort=na
I thought that the build caption() function would be used in both places. Is there some other place that I need to modify to have the fields show up on thumbnails.php?
Here is the code as it is right now:
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_field4_name']){
$caption .= $row['user4'] ? "<span class=\"thumb_caption\">".strip_tags(bb_decode($row['user4']))."</span>" : '';
}
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>" : '';
}
Many thanks for the guidance!
Marianne
Am I missing something obvious about why build caption() does not work for all instances of caption?
You need to edit include/functions.inc.php
if($select_columns != '*') $select_columns .= ', title, caption,hits,owner_id,owner_name';
Change to
if($select_columns != '*') $select_columns .= ', title, caption,hits,owner_id,owner_name, user1, user2, user3, user4';
Thank you Nibbler!