$message['member']['avatar']['image'] outside of forum

Started by alchemyx, January 09, 2006, 10:44:39 AM

Previous topic - Next topic

alchemyx

I'm building a CMS for my website, integrated completely around SMF, but I'm having a few problems showing the users' avatars in the comments area of the news module. I can see in display.template you use $message['member']['avatar']['image'] but I don't know exactly how $message would corrospond to work for me.... this is what I currently have for showing avatars in the comments section...
if (!($ComPoster_query->Fields('avatar') == NULL)) {
echo "<a href=\"http://www.rpgfreeze.com/forums/index.php?action=profile;u=".$ComPoster_query->Fields('ID_MEMBER')."\">".$ComPoster_query->Fields('memberName')."<center><img src=\"".$ComPoster_query->Fields('avatar')."\" border=\"0\"></img></center></a>";
} else {
echo "<a href=\"http://www.rpgfreeze.com/forums/index.php?action=profile;u=".$ComPoster_query->Fields('ID_MEMBER')."\">".$ComPoster_query->Fields('memberName')."</a>";
};


And, generally, it works, but only when the user uses an avatar that is hotlinked... not an uploaded avatar or one from the avatars folder in my forums directory.

The layout of the news sql looks like this...

QuoteTable `news_news`
news_id primary key, int, auto_increment
cat_id //corrosponding category ID for individual news categories
poster_id //ID_MEMBER(from smf_members) of the person posting the article
post_title
post_post // the post content

Table `news_comments`
comment_id primary key, int, auto_increment
cor_news_id // primary key of the corrosponding news post the comment is replying to
poster_id // ID_MEMBER(from smf_members) of the person posting the comment
post_post // the comment content
rating // the rating given to the article

So... how do I make the avatar show correctly for the comments section per comment by each user? Whether it's uploaded, directory, or hotlinked?

Any help would be appreciated.

alchemyx


Advertisement: