ok for some reason if the commenter isnt using a custom avatar their avatar info only works if their the viewing user. anyone know y this is happening?
here is my code:
PHP Code:
/*###############Begin Displaying Comments###############*/
$fcomment=$DB_site->query("SELECT * FROM gallery_comments WHERE image_id='$imgid' AND gallery_id='$id' ORDER BY comment_date ASC");
while($comment=$DB_site->fetch_array($fcomment)){
require_once('./includes/functions_bbcodeparse.php');
$fuserinfo=$DB_site->query("SELECT user.usertitle,user.avatarid,usertextfield.signature".iif($comment[show_avatar],',avatar.*')." FROM user,usertextfield
".iif($comment[show_avatar],"LEFT JOIN " . TABLE_PREFIX . "avatar AS avatar ON(avatar.avatarid = user.avatarid) LEFT JOIN " . TABLE_PREFIX . "customavatar AS customavatar ON(customavatar.userid = user.userid)") . "
WHERE user.userid='$comment[commenter_id]' AND usertextfield.userid='$comment[commenter_id]'");
$commenter=$DB_site->fetch_array($fuserinfo);
if($comment[show_sig]==1){
$commenter['signature'] = parse_bbcode($commenter['signature'], 0, 1);
$show['signature']="true";
}
else{
$show['signature']="";
}
if($commenter[avatarid]==0){
$show['customava']="true";
}
else{
$show['customava']="false";
}
$commentmessage = parse_bbcode2($comment['comment_text'], 0, 1, 1, 1, 0, 0);
$commentdate=date("m/d/Y - g:i A",$comment[comment_date]);
eval('$commentbits .= "' . fetch_template('gallery_entry_commentbits') . '";');
}
/*###############End Displaying Comments###############*/