[spoiler="Exemplu"][/spoiler]
Modificam Optiunea rating in Like
in CSS adaugam:
Code
.likeplus {font-size:1pt;background:url('http://i.imgur.com/BvP9N.png') top;width:13px;height:12px;overflow:hidden;cursor:pointer;margin-right:4px;margin-top:0px}
.likeplus_hover {font-size:1pt;background:url('http://yraaa.ru/_pu/10/58127939.png') bottom;width:13px;height:12px;overflow:hidden;cursor:pointer;margin-right:4px;margin-top:0px}
.like2 {font-size:8pt;font-weight:bold;color:#111C49;}
.likex {font-size:8pt;font-weight:bold;color:#223276;}
Urmatoru cod il adaugam sau in partea de sus sau in partea de jos a site-ului (de dorit jos):
Code
<script type="text/javascript">
likePlus = 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) {
},
'after-success': function (a, b) {
document.getElementById('frs2' + d).innerText++
a.html(b).addClass(b > 0 ? 'positiveRate' : (b == 0 ? 'nullRate' : 'negativeRate'));
},
'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)
})
}
function getClass(nameid, nameclass) {
document.getElementById(nameid).className=nameclass
}
</script>
in aspectul materialului sau pagina cu tot continutul si camentariile la el, adaugam urmatorul script in loc de tegul:
Atentie!!! in script schimbati publ cu modulul dorit.
Code
<?if($RATING$)?>
<div onclick="likePlus(1,$ID$,'publ');return false" style="cursor:pointer;height:16px;" onmouseover="getClass('hr2$ID$','likeplus_hover');getClass('frs2$ID$','like2')" onmouseout="getClass('hr2$ID$','likeplus');getClass('frs2$ID$','likex')">
<table cellspacing="0" cellpadding="0"><tr><td><div id="hr2$ID$" class="likeplus"> </div></td><td><div class="likex" id="frs2$ID$">$RATED$</div></td></tr></table>
</div>
<?endif?>
[texterror4]Sursa: http://webo4ka.ru
[/texterror4]