<?php

/*
 * Smarty plugin
 * -------------------------------------------------------------
 * Type:     modifier
 * Name:     capitalize
 * Purpose:  capitalize words in the string
 * -------------------------------------------------------------
 */
function smarty_modifier_avatarize($user)
{
  global $tikilib;
  global $userlib;
  $avatar = $tikilib->get_user_avatar($user);
  if($userlib->user_exists($user)&&$tikilib->get_user_preference($user,'user_information','public')=='public') {
  	$avatar = "<a title='$user' href='tiki-user_information.php?view_user=$user'>".$avatar.'</a>';
  } 
  return $avatar;	
}

?>
