Tuto: Como poner Top entradas mas comentadas
Holuuu!!♥♥ les traigo este lindo tuto n.n se trata de como poner un gadget de Top entradas mas comentadas espero que les agrade! :33 acabo de llegar de la escuela y estoy muuy cansada T.T pero no tengo tarea!!! y podre estar todooo este fin de semana con ustedes!!! ♥.♥ ojala les guste el tuto!!
paso 1: ve a diseño♥añadir gadget♥ html javascript♥
paso 2: copia y pega este codigo en el gadget:
<script language='javascript'>
aBold = true;
numposts=500;
maxshowresult=10;
home_page = "URL DE TU BLOG";
</script>
<script type='text/javascript'>
//<![CDATA[
var
postTitlear=new Array();var postUrlar=new Array();var postCommentar=new
Array();var totalpost;document.write("<ul>");function
showrecentposts(j){var a=j.feed.entry.length;totalpost=a;for(var
f=0;f<a;f++){var h=j.feed.entry[f];var c=h.title.$t;var b;var
g;if(f==j.feed.entry.length){break}for(var
d=0;d<h.link.length;d++){if(h.link[d].rel=="alternate"){g=h.link[d].href;break}}for(var
d=0;d<h.link.length;d++){if(h.link[d].rel=="replies"&&h.link[d].type=="text/html"){b=h.link[d].title.split("
")[0];break}}c=(aBold)?"<b>"+c+"</b>":c;postTitlear.push(c);postUrlar.push(g);postCommentar.push(b)}sortPosts();for(var
f=0;f<maxshowresult;f++){var e='<li><a
href="'+postUrlar[f]+'" class="recent-link">'+postTitlear[f]+"
("+postCommentar[f]+"
comentarios)</a>";document.write(e)}}function sortPosts(){function
c(d,f){var
e=postTitlear[d];postTitlear[d]=postTitlear[f];postTitlear[f]=e;var
e=postUrlar[d];postUrlar[d]=postUrlar[f];postUrlar[f]=e;var
e=postCommentar[d];postCommentar[d]=postCommentar[f];postCommentar[f]=e}for(var
b=0;b<postTitlear.length-1;b++){for(var
a=b+1;a<postTitlear.length;a++){if(parseInt(postCommentar[b])<parseInt(postCommentar[a])){c(b,a)}}}}document.write('<script
src="'+home_page+"feeds/posts/default?max-results="+numposts+'&orderby=published&alt=json-in-script&callback=showrecentposts"><\/script>');
//]]>
</script>
Y asi de facil!!! espero que les guste!!!♥♥ ya saben si les gusto dejenme sus lindos comentarios aqui abajo!! n.n los amo!! que tengan un hermoso viernes!!
Etiquetas: Tutoriales
OLDER POST • NEWER POST
Bienvenido!
♥♥♥♥
Hola! yo soy Amy y este es mi blog! aqui encontraras recursos tutoriales y muchas cositas kawaii, ojala te guste♥
C-box ♥
dejame un mensajito!♥
|
0 comentarios:
Publicar un comentario
Holaa!!♥♥♥ Gracias por tu comentario!!!♥ Besos!!