Jump to content
View in the app

A better way to browse. Learn more.

IPBMafia.ru - поддержка Invision Community, релизы, темы, плагины и приложения

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

2 вопроса про репутацию

Featured Replies

Posted

Доброго времени суток дамы и господа, хотелось бы задать два вопроса про репутацию (хук TB_Show_Reputation_in_User_Info версия 3.1.0):

1. Как изменить отображение репутации. Что имею:

Form Manager v1.0.0.zip

Что хотелось бы иметь:

post-1442-0-69035600-1359569354_thumb.pn

Т.е. тип отображения: Слово "Репутация:" [пробел] [в маленькой рамке цифровое значение]

2. Как запретить пользователю, самостоятельно самому себе ставить репутацию за свои же посты и запретить отмену выбранной репутации.

А то получается, что нафлудив много сообщений типа "Да, это класс", "Спасибо, забираю" итп. и проставив самоу себе за свои же сообщения репутацию, он начитерит себе незаслуженных плюсов

Цитирование выделенного текста.zip

  1. АЦ → Внешний вид → выберите ваш стильГлобальные tbSruiHook → найдите

    <if test="parsedReputation:|:!empty($author['author_reputation']['text']) || !empty($author['author_reputation']['image'])">
    <br />
    <if test="RepText:|:!empty($author['author_reputation']['text'])">
    <span class='title' style='font-weight: normal;'>{$author['author_reputation']['text']}</span>
    </if>
    <if test="RepImage:|:!empty($author['author_reputation']['image'])">
    &nbsp;<span class='image'><img src='{$author['author_reputation']['image']}' alt='{$this->lang->words[ $likesMode ]}' /></span>
    </if>
    </if>
    [/CODE]

    и удалите это.

  2. АЦ → Системные настройки → Пользователи → Настройки системы репутаций → [i]Разрешить пользователям оценивать свои публикации?[/i]
  3. А чтобы запретить отмену репутации нужно поставить в [i]Тип репутации[/i] [i][u]любое изменение репутации[/u][/i]

  • Author

Большое спасибо, все отлично получилось с вопросом №2

msg-1442-0-56212000-1359580702_thumb.png

По поводу вопроса №1, пришлось чуточку поправить код

Кому интересно, вот что имел в Глобальные → tbSruiHook:


<php>
if ( $author['pp_reputation_points'] > 0 )
{
$tbSruiStyle = 'positive';

}
elseif ( $author['pp_reputation_points'] < 0 )
{
$tbSruiStyle = 'negative';
}
else
{
$tbSruiStyle = 'zero';
}
$likesMode = ( $this->settings['reputation_point_types'] == 'like' ) ? 'tb_srui_likes' : 'tb_srui_reputation';
</php>
<if test="parsedReputation:|:!empty($author['author_reputation']['text']) || !empty($author['author_reputation']['image'])">
<br />
<if test="RepText:|:!empty($author['author_reputation']['text'])">
<span class='title' style='font-weight: normal;'>{$author['author_reputation']['text']}</span>
</if>
<if test="RepImage:|:!empty($author['author_reputation']['image'])">
&nbsp;<span class='image'><img src='{$author['author_reputation']['image']}' alt='{$this->lang->words[ $likesMode ]}' /></span>
</if>
</if>
<div style='margin:5px auto;min-width:80px;' class='reputation {$tbSruiStyle}' data-tooltip="{$this->lang->words[ $likesMode ]}">
<span class='number'>{parse format_number="$author['pp_reputation_points']"}</span>
</div>

Вот что получил:


<php>
if ( $author['pp_reputation_points'] > 0 )
{
$tbSruiStyle = 'positive';

}
elseif ( $author['pp_reputation_points'] < 0 )
{
$tbSruiStyle = 'negative';
}
else
{
$tbSruiStyle = 'zero';
}
$likesMode = ( $this->settings['reputation_point_types'] == 'like' ) ? 'tb_srui_likes' : 'tb_srui_reputation';
</php>
Репутация:
<div style='margin:5px auto;min-width:20px;' class='reputation {$tbSruiStyle}' data-tooltip="{$this->lang->words[ $likesMode ]}">
<span class='number'>{parse format_number="$author['pp_reputation_points']"}</span>
</div>

А вот результат этого:

post-77-0-67850600-1359579524_thumb.png

Еще раз спасибо за помощь

=)

Guest
This topic is now closed to further replies.

Последние посетители 0

  • No registered users viewing this page.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.