21
NeoPlug
Re: User Avatar in theme.html
  • 2004/4/20 13:33

  • NeoPlug

  • Just popping in

  • Posts: 18

  • Since: 2004/4/18


Hmm it doesn't seem to work, it's even worse actually lol! I now get a blank page for both logged in and logged out users.
I'm really trying to find what's wrong but i have to admit my knowledge is still small councerning php :-/ ...
I hope i'm not buggin you too much :P

22
phppp
Re: User Avatar in theme.html
  • 2004/4/20 13:59

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


header.php or index.php
if (is_object($xoopsUser)) {
    
$NeoPlug_avatar $xoopsUser->getVar('user_avatar');
    if (
file_exists(XOOPS_ROOT_PATH.'/uploads/'.$NeoPlug_avatar)) { 
        
$NeoPlug_avatar '<img
        src="'
.XOOPS_URL.'/uploads/'.$NeoPlug_avatar.'" alt="avatar" />';
    } else {
        
$NeoPlug_avatar '';
    }
} else {
    
$NeoPlug_avatar '<img src="'.XOOPS_URL.'/upload/guest.gif" alt="avatar" />';
}

$xoopsTpl->assign('NeoPlug_avatar'$NeoPlug_avatar);

theme.html
avatar:<{$NeoPlug_avatar}>



23
NeoPlug
Re: User Avatar in theme.html
  • 2004/4/20 16:16

  • NeoPlug

  • Just popping in

  • Posts: 18

  • Since: 2004/4/18


ok it now works for all users! thanks again for your precious help

Login

Who's Online

183 user(s) are online (138 user(s) are browsing Support Forums)


Members: 0


Guests: 183


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits