News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

User Avatar

Started by Aaron Nelsen, March 14, 2004, 04:19:56 AM

Previous topic - Next topic

Aaron Nelsen

I'm updating my old theme and I need to know how to get the avatar displayed for each user.

[Unknown]

Well, if you don't know PHP, try putting this in your template somewhere:

', $context['user']['avatar'], '

If you do know PHP, it's in that variable I named above ;).

-[Unknown]

Aaron Nelsen

In Firefox 0.8 it just displays the text "array" when I use that when I'm logged in. And when I log out it gives me this error
QuoteNotice: Undefined index: avatar in /home/r181471/public_html/forum/Themes/test/index.template.php on line 226

[Unknown]

I'm sorry, I'm sorry... forgot that it changed.  In fact, I changed it.  Boy does that make me quick, eh?

You want:

', $context['user']['is_guest'] ? '' : $context['user']['avatar']['image'], '

-[Unknown]

Aaron Nelsen

Thanks man, works like a charm! SMF freaking rocks!

Advertisement: