diff options
Diffstat (limited to 'smartyplugins/modifier.avatarize.php')
| -rw-r--r-- | smartyplugins/modifier.avatarize.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/smartyplugins/modifier.avatarize.php b/smartyplugins/modifier.avatarize.php new file mode 100644 index 0000000..029ed6b --- /dev/null +++ b/smartyplugins/modifier.avatarize.php @@ -0,0 +1,26 @@ +<?php +/** + * Smarty plugin + * @package Smarty + * @subpackage plugins + */ + +/** + * Smarty plugin + * ------------------------------------------------------------- + * Type: modifier + * Name: capitalize + * Purpose: capitalize words in the string + * ------------------------------------------------------------- + */ +function smarty_modifier_avatarize($user) +{ + global $gBitSystem; + $avatar = $gBitSystem->get_user_avatar($user); + if($gBitUser->userNameExists($user)&&$gBitSystem->getConfig('users_information','public',$user)=='public') { + $avatar = '<a title="'.$user.'" href="'.USERS_PKG_URL.'index.php?home='.$user.'">'.$avatar.'</a>'; + } + return $avatar; +} + +?> |
