|
|
| Модератор форума: chocopie, Samuel, Mihail |
| Форум » uCoz » Помощь по uCoz » Рейтинг |
| Рейтинг |
off-line Добавлено: 2012-Дек-14 - 13:38 | Сообщение #1
http://s13.radikal.ru/i186/1212/31/471610fdd51b.png
Вот рейтинг не правильно считает, на скрине видать, что рейтинг 2 ниже 1 как это исправить? Code <center><script type="text/javascript" rel="nofollow" src="http://helper.ucoz.ru/_ld/0/47_rate.js"></script> <span style="font-size:9pt"><span style="color:green"><b title="Голосов: $RATED$" id="rate_$ID$" rel="nofollow" class="positiveRate "><script type="text/javascript">document.write(Math.round(<?($RATING$*$RATED$)?>)-<?2*$RATED$?>)</script></b></span></span> <a href="#" rel="nofollow" onclick="rateForm(1,$ID$);return false"><img src="/monitoring/Thumbs_up_reiting.png" width="12" height="12"/></a></center> |
off-line Добавлено: 2012-Дек-14 - 15:55 | Сообщение #3
Code rateForm=function(c,d,f,g){if(typeof d=='undefined'||typeof c=='undefined'||(c!=1&&c!=-1))return false;c+=2;if(!f)f=location.pathname.match(/[^\\\/]+/i)+'';if(!f)return false;var h=$('#rate_'+d);g=$.extend({'before':function(a){a.prev('a').remove();a.next('a').remove()},'after-success':function(a,b){a.html(b).addClass(b>0?'positiveRate':(b==0?'nullRate':'negativeRate'));_uWnd.alert('Оценка засчитана!')},'after-error':function(a){try{eval(a)}catch(e){}}},g||{});g.before(h);$.post('/'+f+'/',{'a':'65','id':d,'mark':c,'mod':f,'ajax':'2'},function(a){a=$('cmd:first',a).text();var b=a.match(/рейтинг:\s*([\d.]+)\/(\d+)/i);if(!b)return g['after-error'](a);b=Math.round(b[1]*b[2])-2*b[2];g['after-success'](h,b)})} Сообщение отредактировал brain727 - Пятница, 2012-Дек-14, 15:56
|
| |||
| |||
