PEAK XOOPS - User Avatar in englishin japanese

User Avatar

  • You cannot open a new topic into this forum
  • Guests cannot post into this forum

none User Avatar

msg# 1
Previous post - Next post | Parent - Children.1 | Posted on 2009/2/10 9:21 | Last modified
auxiv  Corporal   Posts: 42
Can someone help with adding a user avatar in a block or in the template itself. The smarty variables and member handler?

I can not seem to invoke it from the database :?

thank you much; in advance
Votes:13 Average:6.15

none Re: User Avatar

msg# 1.1
Previous post - Next post | Parent - No child | Posted on 2009/2/28 17:12 | Last modified
auxiv  Corporal   Posts: 42
<{php}>

$avatar_handler =& xoops_gethandler('avatar');
$handler =& xoops_gethandler('user');
	$user =& $handler->get(intval($uid));
	if (is_object($user) && $user->isActive() && ($user->get('user_avatar') != "blank.gif")) {
		if (file_exists(XOOPS_UPLOAD_PATH . "/" . $user->get('user_avatar'))) {
			echo   XOOPS_UPLOAD_URL . "/" . $user->getShow('user_avatar');
		}
	}

	echo  "<img src=". XOOPS_URL . "/modules/user/images/no_avatar.gif " ">";

<{/php}>

I can not invoke users avatar in the theme.
Votes:13 Average:5.38

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!