Открыть edit_user_profile.php
Перед
case 'u_up_total':
вставить
case 'user_reputation':
$repa = $this->request['value'];
if($repa > $bb_cfg['reputation']['max_repa']) $repa = $bb_cfg['reputation']['max_repa'];
if($repa < $bb_cfg['reputation']['min_repa']) $repa = $bb_cfg['reputation']['min_repa'];
$this->response['new_value'] = ($repa);
break;
Открыть usercp_viewprofile.tpl
Перед
<var class="ajax-params">{action: "edit_user_profile", id: "u_up_total"}</var>
вставить
<var class="ajax-params">{action: "edit_user_profile", id: "user_reputation"}</var>
Перед
<!-- IF TRAF_STATS -->
вставить
<!-- IF REPUTATION_ON -->
<script type="text/javascript">
ajax.reputation = function(user_id, mode) {
ajax.exec({
action : 'reputation',
mode : mode,
user_id : user_id,
});
};
ajax.callback.reputation = function(data) {
if(data.info) alert(data.info);
$('#reputation').html(data.html);
};
</script>
<!-- ENDIF -->
Перед
<tr>
<td colspan="2" class="pad_4">
<table id="traf-stats-tbl" <!-- IF TRAF_STATS -->style="display: none;"<!-- ENDIF --> class="ratio bCenter borderless" cellspacing="1" width="200">
вставить
<!-- IF REPUTATION_ON -->
<tr>
<th>{L_REPUTATION}:</th>
<td id="user_reputation"><span id="reputation" style="color:{REPUTATION_COLOR}" class="editable bold">{REPUTATION}</span> <span onclick="ajax.reputation({PROFILE_USER_ID}, 'add'); return false;" class="txtb" style="color: blue">[+]</span> <span onclick="ajax.reputation({PROFILE_USER_ID}, 'del'); return false;" class="txtb" style="color: red">[-]</span></td>
</tr>
<!-- ENDIF -->