Мануал Репутация с меняющимися картинками

#Rips

Эксперт
Пользователь
Регистрация
16 Дек 2015
Сообщения
1,737
Лучшие ответы
0
Репутация
499
1. Открываем шаблон userInfoPane (глобальные).
2. Находим:

PHP:
<if test="postCount:|:$author['member_id']"><li class='post_count desc lighter'>{parse exp[b][/b]ression="$this->registry->getClass('class_localization')->formatNumber( intval( $author['posts'] ) )"} {$this->lang->words['m_posts']}</li></if></ul>
Ниже добавить:

PHP:
<if test="cardRep:|:$this->settings['reputation_enabled'] && $this->settings['reputation_show_profile']"><div class='reputation-container'><!-- Blue Reputation Bar --><if test="$author['pp_reputation_points']>=1 && $author['pp_reputation_points']<=10"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_1c.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><if test="$author['pp_reputation_points']>=11 && $author['pp_reputation_points']<=20"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_2c.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><if test="$author['pp_reputation_points']>=21 && $author['pp_reputation_points']<=30"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_3c.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><if test="$author['pp_reputation_points']>=31 && $author['pp_reputation_points']<=40"><img class="inlineimg" src="http://localhost/ipb/public/style_extra/reputation_icons/level_4c.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><if test="$author['pp_reputation_points']>=41 && $author['pp_reputation_points']<=50"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_5c.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><!-- /Blue Reputation Bar --><!-- Green Reputation Bar --><if test="$author['pp_reputation_points']>=51 && $author['pp_reputation_points']<=80"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_1b.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><if test="$author['pp_reputation_points']>=81 && $author['pp_reputation_points']<=110"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_2b.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><if test="$author['pp_reputation_points']>=111 && $author['pp_reputation_points']<=140"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_3b.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><if test="$author['pp_reputation_points']>=141 && $author['pp_reputation_points']<=170"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_4b.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><if test="$author['pp_reputation_points']>=171 && $author['pp_reputation_points']<=200"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_5b.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><!-- /Green Reputation Bar --><!-- Gold Reputation Bar --><if test="$author['pp_reputation_points']>=201 && $author['pp_reputation_points']<=250"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_1a.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><if test="$author['pp_reputation_points']>=251 && $author['pp_reputation_points']<=300"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_2a.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><if test="$author['pp_reputation_points']>=301 && $author['pp_reputation_points']<=350"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_3a.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><if test="$author['pp_reputation_points']>=351 && $author['pp_reputation_points']<=400"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_4a.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><if test="$author['pp_reputation_points']>=401"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_5a.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><!-- /Gold Reputation Bar --><!-- Neutral Reputation Bar --><if test="$author['pp_reputation_points']==0"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_0.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><!-- /Neutral Reputation Bar --><!-- Negative Reputation Bar --><if test="$author['pp_reputation_points']<=-1 && $author['pp_reputation_points']>=-10"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_-1.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><if test="$author['pp_reputation_points']<=-11 && $author['pp_reputation_points']>=-20"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_-2.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><if test="$author['pp_reputation_points']<=-21 && $author['pp_reputation_points']>=-30"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_-3.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><if test="$author['pp_reputation_points']<=-31 && $author['pp_reputation_points']>=-40"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_-4.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><if test="$author['pp_reputation_points']<=-41"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_-5.png" alt="Репутация: {$author['pp_reputation_points']}" data-tooltip="Репутация: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if><!-- /Negative Reputation Bar --></div></if>
Для <div class='reputation-container'> можно добавить следующий CSS код:

PHP:
.reputation-container{margin:9px 0 0;}
Чтобы красивее смотрелось

Разъяснение:

PHP:
<if test="$author['pp_reputation_points']>=21 && $author['pp_reputation_points']<=30"><img src="http://localhost/ipb/public/style_extra/reputation_icons/level_3c.png" alt="{$this->lang->words['word_reputation']}: {$author['pp_reputation_points']}" data-tooltip="{$this->lang->words['word_reputation']}: {$author['pp_reputation_points']}" border="0" height="17" width="117" /></if>
PHP:
<if test="$author['pp_reputation_points']>=21 && $author['pp_reputation_points']<=30">
— если репутация БОЛЬШЕ или РОВНА 21 баллам репутации + МЕНЬШЕ или РОВНА 30 баллам репутации, показывать следующую картинку.
PHP:
data-tooltip="{$this->lang->words['word_reputation']}: {$author['pp_reputation_points']}"
— всплывающая подсказка в стиле IPB.

Все картинки заливать по этому пути:
PHP:
public/style_extra/reputation_icons/
Скачать
 
Сверху Снизу