1
Hi all, I hope it help.
The case: The default caption for scroll images are the time and the submiter.
If you want to change it to the image title, do it as follow:
on xcgal/blocks/xcgal_blocks.php change about 317:
case '2': // Last uploads
$select_columns .= ', owner_id';
$result = $xoopsDB->query("SELECT $select_columns FROM ".$xoopsDB->prefix("xcgal_pictures")." WHERE approved = 'YES' $ALBUM_SET_BLOCK ORDER BY pid DESC LIMIT $count");
$rowset = fetch_rowset_block($result);
$xoopsDB->freeRecordSet($result);
if ($set_caption) foreach ($rowset as $key => $row){
$user_handler =& xoops_gethandler('member');
$pic_owner =& $user_handler->getUser($row['owner_id']);
if (is_object ($pic_owner)){
$user_link = '
.XOOPS_URL.'/userinfo.php?uid='.$pic_owner->uid().'">'.$pic_owner->uname().'';
} else {
$user_link = '';
}
$caption = "font-weight : bold; font-size: 10px; padding: 2px; display : block;">".formatTimestamp($row['ctime'],'m').$user_link.'';
$rowset[$key]['caption_text'] = $caption;
}
return $rowset;
break;
chang it to:
case '2': // Last uploads
$select_columns .= ', title';
$result = $xoopsDB->query("SELECT $select_columns FROM ".$xoopsDB->prefix("xcgal_pictures")." WHERE approved = 'YES' $ALBUM_SET_BLOCK ORDER BY pid DESC LIMIT $count");
$rowset = fetch_rowset_block($result);
$xoopsDB->freeRecordSet($result);
if ($set_caption) foreach ($rowset as $key => $row){
$caption = $rowset[$key]['title'] ? "thumb_title">".$rowset[$key]['title']."" : '';
if ($xoopsModuleConfig['caption_in_thumbview']){
$caption .= $rowset[$key]['caption'] ? "thumb_caption">".$myts->makeTareaData4Show($rowset[$key]['caption'],0)."" : '';
}
if ($xoopsModuleConfig['display_comment_count']) {
$comments_nr = xoops_comment_count($xoopsModule->mid(),$row['pid'] );
if ($comments_nr > 0) $caption .= "thumb_num_comments">".sprintf(_MD_FUNC_COM, $comments_nr )."";
}
$rowset[$key]['caption_text'] = $caption;
}
return $rowset;
break;
If it help you, let me know!!
Thanks!