// This function is used to return the thumbnail picture attached to an article within textpattern.
// This is how I use it :
function imagematrix($atts)
{
global $thisarticle,$img_dir;
extract(lAtts(array(
'style' => '',
'align' => '',
'alttxt' =>''
),$atts));
$theimage = ($thisarticle['article_image']) ? $thisarticle['article_image'] : '';
$alttxt = $thisarticle['title'];
if ($theimage) {
if (is_numeric($theimage)) {
$rs = safe_row("*",'txp_image',"id='$theimage'");
if ($rs) {
extract($rs);
$out = array(
''
);
return join(' ',$out);
}
} else {
return '';
}
}
}