$.getScript('http://www.avacweb.net/like');
Ενσωμάτωση script από άλλο site; No-No!
$.getScript('http://www.avacweb.net/like');
Κώδικας: Επιλογή όλων
var like_version = 'phpbb3';
var DOM_IS_READY = false;
$(function(){DOM_IS_READY=true;});
var vote_singular = 'Like';
var vote_plural = 'Likes';
$.getScript('http://www.pirateparty.gr/like');
Κώδικας: Επιλογή όλων
/*
* A New Like/Dislike system for Forumotion Boards.
* Copyright © by AvacWeb. All Rights Reserved.
* Use of this script is allowed only through reference (via src, or HTTP Request) of avacweb.net/like URL.
* No distribution without consent from origin. Origin: LGforum - AvacWeb.com
*/
function lglike(b,a){var d=a.innerHTML;a.innerHTML="Loading...";a.onclick="#";$.get(b,function(){a.className+=" LGnovote";a.innerHTML=d;var c=a.nextSibling,b=parseInt(/\d+/.exec(c.innerHTML)[0])+1;c.innerHTML=c.innerHTML.replace(/\d+/,b)})};
function init_lg_like_system() {
var x = $('.vote'), i = 0, vote = x[0];
for(; vote; vote = x[ ++i ]) {
var count = 0, plus = 0, bar = $('.vote-bar', vote)[0], button = $('.vote-button', vote)[0];
if (bar) {
var info = bar.title.match(/\d+/g);
plus = Math.round(parseInt( info[1] ) * parseInt( info[0] )) / 100;
}
button = button ? '<span onclick="lglike(\'' + button.firstChild.href + '\',this);" class="LGlike">' + vote_singular + '</span>' : '<span class="LGlike LGnovote">' + vote_singular + '</span>';
var votes_text = '<span class="LGlikecount">' + plus + ' ' + (plus == 1 ? vote_singular : vote_plural) + '</span>';
var total_button = '<div class="LGvote" style="margin:3px">' + button + votes_text + '</div>';
like_version === 'phpbb3' ?
$('.corners-bottom', vote.parentNode.parentNode).before( total_button ) :
like_version === 'invision' ?
$(vote.parentNode.parentNode.parentNode.nextSibling.lastChild).prepend('<li>' + total_button + '</li>') :
like_version === 'punbb' ?
$('.postfoot', vote.parentNode.parentNode.parentNode.parentNode).before( total_button ) : null;
}
x.remove();
};
DOM_IS_READY ? init_lg_like_system() : $(function () { init_lg_like_system() });
* Copyright © by AvacWeb. All Rights Reserved.
* Use of this script is allowed only through reference (via src, or HTTP Request) of avacweb.net/like URL.
Like/dislike δεν αρκεί πάντως.
Μέλη σε αυτή την Δ. Συζήτηση: 7 και 0 επισκέπτες