IP.Board:Изменение вида репутации для 3.0.x
Материал из CSI
Анализ: SuperMod Автор: DarkForces Корректировка: Tails
Общими усилиями с DarkForcesмы немного откорректировали отображение репутации в сообщении. Дело в том, что когда кнопки [+] и [-] находятся рядом, можно неаккуратно нажать не на ту, на котороую хотелось.
Теперь кнопки разнесены по обе стороны от счётчика.
В ipb_styles.css находим блок:
.reputation /*.post_block .rep_highlight*/ { font-weight: bold; padding: 3px 8px; margin: 6px; display: block; float: right; }
НИЖЕ вставляем:
.post_wrap .reputation /*(CSO) DarkForces Reputation*/ { margin: 0 6px; }
В Темы > topicViewTemplate находим:
<if test="reputationBox:|:$this->settings['reputation_enabled']"> <if test="canRep:|:!( $this->settings['reputation_protected_groups'] && in_array( $post['author']['member_group_id'], explode( ',', $this->settings['reputation_protected_groups'] ) ) )"> <div class='rep_bar clear right' id='rep_post_{$post['post']['pid']}'> <if test="hasNoRep:|:$post['post']['rep_points'] == 0"> <span class='reputation zero rep_show' title='{$this->lang->words['reputation']}'> </if> <if test="hasPosRep:|:$post['post']['rep_points'] > 0"> <span class='reputation positive rep_show' title='{$this->lang->words['reputation']}'> </if> <if test="hasNegRep:|:$post['post']['rep_points'] < 0"> <span class='reputation negative rep_show' title='{$this->lang->words['reputation']}' > </if> {$post['post']['rep_points']} </span> <if test="hasNotGivenRep:|:$post['post']['has_given_rep'] != 1 AND $post['post']['has_given_rep'] != -1 AND $this->memberData['member_id'] != 0 && ( $this->settings['reputation_can_self_vote'] OR $post['author']['member_id'] != $this->memberData['member_id'] )"> <ul> <if test="giveRepUp:|:$this->settings['reputation_point_types'] == 'positive' || $this->settings['reputation_point_types'] == 'both'"> <li><a href='{$this->settings['base_url']}app=core&module=global&section=reputation&do=add_rating&app_rate=forums&type=pid&type_id={$post['post']['pid']}&rating=1&secure_key={$this->member->form_hash}&post_return={$post['post']['pid']}' class='rep_up' title='{$this->lang->words['reputation_up']}'>{parse replacement="rep_up"}</a></li> </if> <if test="giveRepDown:|:$this->settings['reputation_point_types'] == 'negative' || $this->settings['reputation_point_types'] == 'both'"> <li><a href='{$this->settings['base_url']}app=core&module=global&section=reputation&do=add_rating&app_rate=forums&type=pid&type_id={$post['post']['pid']}&rating=-1&secure_key={$this->member->form_hash}&post_return={$post['post']['pid']}' class='rep_down' title='{$this->lang->words['reputation_down']}'>{parse replacement="rep_down"}</a></li> </if> </ul> </if> </div> </if> <script type='text/javascript'> ipb.global.registerReputation( 'rep_post_{$post['post']['pid']}', { app: 'forums', type: 'pid', typeid: '{$post['post']['pid']}' }, parseInt('{$post['post']['rep_points']}') ); </script> </if>
Заменяем на:
<!-- (CSO) DarkForces Reputation --> <if test="reputationBox:|:$this->settings['reputation_enabled']"> <if test="canRep:|:!( $this->settings['reputation_protected_groups'] && in_array( $post['author']['member_group_id'], explode( ',', $this->settings['reputation_protected_groups'] ) ) )"> <div class='rep_bar clear right' id='rep_post_{$post['post']['pid']}'> <ul> <if test="hasNotGivenRep:|:$post['post']['has_given_rep'] != 1 AND $post['post']['has_given_rep'] != -1 AND $this->memberData['member_id'] != 0 && ( $this->settings['reputation_can_self_vote'] OR $post['author']['member_id'] != $this->memberData['member_id'] )"> <if test="giveRepUp:|:$this->settings['reputation_point_types'] == 'positive' || $this->settings['reputation_point_types'] == 'both'"> <li><a href='{$this->settings['base_url']}app=core&module=global&section=reputation&do=add_rating&app_rate=forums&type=pid&type_id={$post['post']['pid']}&rating=1&secure_key={$this->member->form_hash}&post_return={$post['post']['pid']}' class='rep_up' title='{$this->lang->words['reputation_up']}'>{parse replacement="rep_up"}</a></li> </if> </if> <if test="hasNoRep:|:$post['post']['rep_points'] == 0"> <li><span class='reputation zero rep_show' title='{$this->lang->words['reputation']}'> </if> <if test="hasPosRep:|:$post['post']['rep_points'] > 0"> <li><span class='reputation positive rep_show' title='{$this->lang->words['reputation']}'> </if> <if test="hasNegRep:|:$post['post']['rep_points'] < 0"> <li><span class='reputation negative rep_show' title='{$this->lang->words['reputation']}' > </if> {$post['post']['rep_points']} </span></li> <if test="hasNotGivenRep:|:$post['post']['has_given_rep'] != 1 AND $post['post']['has_given_rep'] != -1 AND $this->memberData['member_id'] != 0 && ( $this->settings['reputation_can_self_vote'] OR $post['author']['member_id'] != $this->memberData['member_id'] )"> <if test="giveRepDown:|:$this->settings['reputation_point_types'] == 'negative' || $this->settings['reputation_point_types'] == 'both'"> <li><a href='{$this->settings['base_url']}app=core&module=global&section=reputation&do=add_rating&app_rate=forums&type=pid&type_id={$post['post']['pid']}&rating=-1&secure_key={$this->member->form_hash}&post_return={$post['post']['pid']}' class='rep_down' title='{$this->lang->words['reputation_down']}'>{parse replacement="rep_down"}</a></li> </if> </if> </ul> </div> </if> <script type='text/javascript'> ipb.global.registerReputation( 'rep_post_{$post['post']['pid']}', { app: 'forums', type: 'pid', typeid: '{$post['post']['pid']}' }, parseInt('{$post['post']['rep_points']}') ); </script> </if> <!-- / (CSO) DarkForces Reputation -->