Minahito
minah****@users*****
2006年 9月 25日 (月) 18:34:19 JST
Index: xoops2jp/html/class/smarty/plugins/modifier.xoops_user_avatarize.php diff -u xoops2jp/html/class/smarty/plugins/modifier.xoops_user_avatarize.php:1.1.2.1 xoops2jp/html/class/smarty/plugins/modifier.xoops_user_avatarize.php:1.1.2.2 --- xoops2jp/html/class/smarty/plugins/modifier.xoops_user_avatarize.php:1.1.2.1 Fri Nov 25 00:25:56 2005 +++ xoops2jp/html/class/smarty/plugins/modifier.xoops_user_avatarize.php Mon Sep 25 18:34:18 2006 @@ -9,17 +9,17 @@ * Input: uid: user id * ------------------------------------------------------------- */ -function smarty_modifier_xoops_user_avatarize($uid, $key) +function smarty_modifier_xoops_user_avatarize($uid) { - $handler=&xoops_gethandler('user'); - $user=&$handler->get(intval($uid)); - if(is_object($user)&&$user->isActive()) { - if(file_exists(XOOPS_UPLOAD_PATH."/".$user->getVar('avatar'))) { - return XOOPS_UPLOAD_URL."/".$user->getVar('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'))) { + return XOOPS_UPLOAD_URL . "/" . $user->getShow('user_avatar'); } } - return XOOPS_UPLOAD_URL."/blank.gif"; + return XOOPS_UPLOAD_URL . "/modules/user/images/no_avatar.gif"; } ?>