Спасибо за раздачу и оценка релиза

iFlooder

Пользователь
displaying_torrent
Найти
PHP:
//Thanks mod
'RATING' => '<span id="VR'.$attach_id.'">'. ($rating_sum ? round($rating_sum/$rating_count,1) : '-') .'</span>',
'RATING_VOTES' => '<span id="VC'.$attach_id.'">'. $rating_count .'</span>',
'THANKED' => '<span id="VT'.$attach_id.'">'. $thanks .'</span>'
. ($thanked || ($userdata['user_id'] == $poster_id) ? '' : '<span id="VB'.$attach_id.'">'. '&nbsp; <img src="images/sps.gif" onClick="this.disabled=true;ajax_do(\''
. append_sid("thanks.php?mode=thank&amp;a=" . $attach_id) .'\');" alt="'. $lang['THANKS'] .'" style="cursor:pointer" /></span>')
. ($thanks > 0 ? ' &nbsp; (<span id="VL'.$attach_id.'"><a href="#torrent" onClick="ajax_do(\'thanks.php?mode=list&a='.$attach_id.'\');">'. $lang['THANK_LIST'] .'</a></span>)' : ''),
'YOUR_VOTE' => $your_vote > 0 ? $your_vote : '',
'DO_VOTE' => $userdata['user_id'] == ANONYMOUS ? '' : ('<span id="VD'.$attach_id.'">'. $rate_html .'</span>'),
  //Thanks mod End
Заменить на
PHP:
//Thanks mod
'RATING' => '<span id="VR'.$attach_id.'">'. ($rating_sum ? round($rating_sum/$rating_count,1) : '-') .'</span>',
'RATING_VOTES' => '<span id="VC'.$attach_id.'">'. $rating_count .'</span>',
'THANKED' => '<span id="VT'.$attach_id.'">'. $thanks .'</span>'
. ($thanked || ($userdata['user_id'] == $poster_id) ? '' : '<span id="VB'.$attach_id.'">'. '&nbsp; <img src="images/sps.gif" onClick="this.disabled=true;ajax_do(\''
. "thanks.php?mode=thank&amp;a=" . $attach_id .'\');" alt="'. $lang['THANKS'] .'" style="cursor:pointer" /></span>')
. ($thanks > 0 ? ' &nbsp; (<span id="VL'.$attach_id.'"><a href="#torrent" onClick="ajax_do(\'thanks.php?mode=list&a='.$attach_id.'\');">'. $lang['THANK_LIST'] .'</a></span>)' : ''),
'YOUR_VOTE' => $your_vote > 0 ? $your_vote : '',
'DO_VOTE' => $userdata['user_id'] == ANONYMOUS ? '' : ('<span id="VD'.$attach_id.'">'. $rate_html .'</span>'),
  //Thanks mod End
Найти
PHP:
$rate_html = '';
for ($r = 5; $r >= 1; $r-- ) {
$rate_html .= '<input type="radio" name="rate'.$attach_id.'" value="'.$r.'" onClick="ajax_do(\''
. append_sid("rate.php?a=" . $attach_id . "&v=" . $r ) .'\');" />'
. '<span onclick="nodeClick(this);">' . $lang['RATING_'.$r] . '</span>';
  }
Заменить
PHP:
$rate_html = '';
for ($r = 5; $r >= 1; $r-- ) {
$rate_html .= '<input type="radio" name="rate'.$attach_id.'" value="'.$r.'" onClick="ajax_do(\''
. "rate.php?a=" . $attach_id . "&v=" . $r  .'\');" />'
. '<span onclick="nodeClick(this);">' . $lang['RATING_'.$r] . '</span>';
  }
В корне заменить файл на тот, что в атаче.
 

Вложения

  • thanks.rar
    1.5 KB · Просмотры: 230

Lange

Легенда
$your_vote = $attachments['_'. $post_id][$i]['rating'];
$thanks = $attachments['_'. $post_id][$i]['thanks'];

[27-Mar-2012 11:27:47] PHP Notice: Undefined index: rating in /var/www//data/www//attach_mod/displaying_torrent.php on line 70
[27-Mar-2012 11:27:47] PHP Notice: Undefined index: thanked in /var/www//data/www//attach_mod/displaying_torrent.php on line 72

Странно ругается, у кого было?
 
Сверху