Просмотр файла globalchat/view/globalchat/templates/plugins/function.user_nick.php

Размер файла: 1.28Kb
<?php

/**
* User_nick
*
* Возвращет сгенерированный вид ника
*
* @attrs
*
* @return string
*/

function smarty_function_user_nick ($params)
{
global $gc_browser_type;

$result = "<a $params[attrs]>";
	if (!empty ($params['icon']))
	$result .= "<img src='icons/sex_{$params['user']['sex']}.png' alt='' /> ";
	$result .= $params['user']['nick']."</a>";
	if ($gc_browser_type == 'web' && !empty ($params['quick_menu']))
	$result .= " <span id='user_quick_menu_".$params['user']['id']."_back' onmouseover='show_user_menu (\"user_quick_menu_".$params['user']['id']."\");' onmouseout='hide_user_menu (\"user_quick_menu_".$params['user']['id']."\");'><a href='user_menu.php?user_id=".$params['user']['id']."' class='".DIV_C_USER_ID."'>[ID".$params['user']['id']."]</a><span id='user_quick_menu_".$params['user']['id']."' style='display: none;'> <a href='user_profile.php?user_id=".$params['user']['id']."'><img src='icons/user_info.png' alt='' align='top' /></a> <a href='quick_msg.php?user_id=".$params['user']['id']."'><img src='icons/msgs.png' alt='' align='top' /></a> </span>";
	else
	$result .= " <a href='user_menu.php?user_id=".$params['user']['id']."'><span class='".DIV_M_USER_ID."'>[ID".$params['user']['id']."]</span></a>";
	
return $result;
}