Lionel
04-14-2005, 03:46 AM
I tweaked an existing hack so I could display a caption under thumb images, if any. I placed in posbit_attachmentthumbnail template: $post['caption']. It looks really nice.
I noticed that news.php uses the same template too. So in the $getnews select statement i added post.caption in there so it looks like
forumid, post.postid, post.caption AS caption, pagetext, allowsmilie
and down in the // attachments section, I did
if ($counter==1)
{
$post['caption'] = '';
$post['caption'] = $news['caption'];
$attachment = '<a href="' . $vboptions['bburl'] . '/attachment.php?' . $session['sessionurl'] . 'attachmentid=' . $news['attachmentid'] . '" target="_blank"><img border="0" src="' . $vboptions['bburl'] . '/attachment.php?' . $session['sessionurl'] . 'attachmentid=' . $news['attachmentid'] . '&stc=1&thumb=1" /></a>';
}
else
The caption is not displaying. Please, what am I missing in there? How do I get that caption post element? Is it possible? Don't know if it needs the left join thing or what?
First image is how it looks in showthread.
Second image is front page with problem
I noticed that news.php uses the same template too. So in the $getnews select statement i added post.caption in there so it looks like
forumid, post.postid, post.caption AS caption, pagetext, allowsmilie
and down in the // attachments section, I did
if ($counter==1)
{
$post['caption'] = '';
$post['caption'] = $news['caption'];
$attachment = '<a href="' . $vboptions['bburl'] . '/attachment.php?' . $session['sessionurl'] . 'attachmentid=' . $news['attachmentid'] . '" target="_blank"><img border="0" src="' . $vboptions['bburl'] . '/attachment.php?' . $session['sessionurl'] . 'attachmentid=' . $news['attachmentid'] . '&stc=1&thumb=1" /></a>';
}
else
The caption is not displaying. Please, what am I missing in there? How do I get that caption post element? Is it possible? Don't know if it needs the left join thing or what?
First image is how it looks in showthread.
Second image is front page with problem