$str = mb_strtolower(trim($string),'UTF-8');
if (mb_strlen($str) > 1)
{
$br = preg_split('//',$str,-1,PREG_SPLIT_DELIM_CAPTURE);
foreach ($br as $value)
{
$out .= array_search($value,$trans);
}
}
else
$out .= array_search($str,$trans);
if($out != $string)
return $out;
else
return 'e'.$string;
.comment .avatar {
clear: both;
min-width: 70px;
border: 1px solid #ccc;
border-radius: 3px;
}
.comment .icon:before {
content: '';
background: url(/site/img/icon-avatar.png) no-repeat; /* подставьте сюда адрес своего спрайта */
background-position: 65px 65px; /* здесь нужно указать координаты иконки по умолчанию */
margin: 0 3px;
left: 0;
top: 3px; /* это свойство смещает иконку вниз относительно базовой линии текста */
position: relative;
width: 65px;
height: 65px;
display: inline;
display: inline-block;
}
.comment .icon-1:before { background-position: 3px 0; overflow: hidden;}
.comment .icon-2:before { background-position: 3px -60px; overflow: hidden;}
.comment .icon-3:before { background-position: 3px -123px; overflow: hidden;}
.comment .icon-4:before { background-position: -70px 0; overflow: hidden;}
.comment .icon-5:before { background-position: -65px -60px; overflow: hidden;}
.comment .icon-6:before { background-position: -65px -123px; overflow: hidden;}
.comment .icon-7:before { background-position: -123px 0; overflow: hidden;}
.comment .icon-8:before { background-position: -125px -60px; overflow: hidden;}
.comment .icon-9:before { background-position: -125px -123px; overflow: hidden;}