Slynderdale
06-02-2002, 09:44 AM
I made a mood hack but for some reason it shows up blank in postbit
$post=$DB_site->query_first("
SELECT
post.*,post.username AS postusername,post.ipaddress AS ip,user.*,userfield.*,".iif($forum[allowicons],'icon.title as icontitle,icon.iconpath,','')."
mood.title as moodtitle,mood.moodpath,attachment.attachmentid,at tachment.filename,attachment.visible AS attachmentvisible,attachment.counter
".iif($avatarenabled,",avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar,customavatar.dateline AS avatardateline","")."
FROM post
".iif($forum[allowicons],'LEFT JOIN icon ON icon.iconid=post.iconid','')."
LEFT JOIN mood ON mood.moodid=post.moodid
LEFT JOIN user ON user.userid=post.userid,ratetotal,ratenum,allowrat e
LEFT JOIN userfield ON userfield.userid=user.userid
".iif ($avatarenabled,"LEFT JOIN avatar ON avatar.avatarid=user.avatarid
LEFT JOIN customavatar ON customavatar.userid=user.userid","")."
LEFT JOIN attachment ON attachment.attachmentid=post.attachmentid
WHERE post.postid = '$postid'
");
thats what i have in showthread and heres what i have in functions
if ($post[moodid]!=0) {
$post[currentmood]="<b>Mood:</b> $post[moodtitle] <img src=\"$post[moodpath]\" border=\"0\" alt=\"$post[moodtitle]\">";
} else {
$post[currentmood]="<b>Mood:</b> No Mood";
}
$post=$DB_site->query_first("
SELECT
post.*,post.username AS postusername,post.ipaddress AS ip,user.*,userfield.*,".iif($forum[allowicons],'icon.title as icontitle,icon.iconpath,','')."
mood.title as moodtitle,mood.moodpath,attachment.attachmentid,at tachment.filename,attachment.visible AS attachmentvisible,attachment.counter
".iif($avatarenabled,",avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar,customavatar.dateline AS avatardateline","")."
FROM post
".iif($forum[allowicons],'LEFT JOIN icon ON icon.iconid=post.iconid','')."
LEFT JOIN mood ON mood.moodid=post.moodid
LEFT JOIN user ON user.userid=post.userid,ratetotal,ratenum,allowrat e
LEFT JOIN userfield ON userfield.userid=user.userid
".iif ($avatarenabled,"LEFT JOIN avatar ON avatar.avatarid=user.avatarid
LEFT JOIN customavatar ON customavatar.userid=user.userid","")."
LEFT JOIN attachment ON attachment.attachmentid=post.attachmentid
WHERE post.postid = '$postid'
");
thats what i have in showthread and heres what i have in functions
if ($post[moodid]!=0) {
$post[currentmood]="<b>Mood:</b> $post[moodtitle] <img src=\"$post[moodpath]\" border=\"0\" alt=\"$post[moodtitle]\">";
} else {
$post[currentmood]="<b>Mood:</b> No Mood";
}