Esse é um script de últimos comentários com ícone personalizados. que achei em um site, e irei disponibilizar o código aqui pra vocês.
Copie o código abaixo:
if (i == json.feed.entry.length) break; for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'alternate') { alturl = entry.link[k].href; break; } } var photoslink=new Array() photoslink[0]='<img src="http://1.bp.blogspot.com/_8PJ-pgoBhWQ/SeJp1pMWkLI/AAAAAAAAGmo/ggSsVIrdtms/s320/otros.png"/>'; Fernando='<img src="http://url-do-seu-icone/yo.png"/>'; anonymous='<img src="http://3.bp.blogspot.com/_8PJ-pgoBhWQ/SeJp4vL4RKI/AAAAAAAAGmw/x20-2kKSkEU/s320/anonymous.png"/>';
alturl = alturl.replace("#", "#comment-"); var postlink = alturl.split("#"); postlink = postlink[0]; var linktext = postlink.split("/"); linktext = linktext[5]; linktext = linktext.split(".html"); linktext = linktext[0]; var posttitle = linktext.replace(/-/g," "); posttitle = posttitle.link(postlink); var commentdate = entry.published.$t; var cdyear = commentdate.substring(0,4); var cdmonth = commentdate.substring(5,7); var cdday = commentdate.substring(8,10); var monthnames = new Array(); monthnames[1] = "Jan"; monthnames[2] = "Fev"; monthnames[3] = "Mar"; monthnames[4] = "Abr"; monthnames[5] = "Mai"; monthnames[6] = "Jun"; monthnames[7] = "Jul"; monthnames[8] = "Ago"; monthnames[9] = "Set"; monthnames[10] = "Out"; monthnames[11] = "Nov"; monthnames[12] = "Dez"; if ("content" in entry) { var comment = entry.content.$t;} else if ("summary" in entry) { var comment = entry.summary.$t;} else var comment = ""; var re = /<S[^>]*>/g; comment = comment.replace(re, ""); if (!standardstyling) document.write('<div class="bbrecpost">'); if (standardstyling) document.write('<br/>'); if (showcommentdate == true) document.write('Dia ' + cdday + ' ' + monthnames[parseInt(cdmonth,10)] + ' ');
if( entry.author[0].name.$t == 'Fernando'){ document.write(fernando)} else{ if( entry.author[0].name.$t == 'Anonymous'){ document.write(anonymous)}else{document.write(photoslink)} } document.write('<a href="' + alturl + '">' + entry.author[0].name.$t + ', disse' +'</a> '); if (showposttitle == true) document.write(' em ' + posttitle); if (!standardstyling) document.write('</div><div class="bbrecpostsum">'); if (standardstyling) document.write('<div class="txtmsg"><br/></div>'); if (comment.length < numchars) { if (standardstyling) document.write('<i>'); document.write(comment); if (standardstyling) document.write('</i>');} else { if (standardstyling) document.write('<i>'); comment = comment.substring(0, numchars); var quoteEnd = comment.lastIndexOf(" "); comment = comment.substring(0, quoteEnd); document.write(comment + '...<a href="' + alturl + '">(leia mais)</a>'); if (standardstyling) document.write('</i>');} if (!standardstyling) document.write('</div>'); if (standardstyling) document.write('<br/>'); } if (!standardstyling) document.write('<div class="bbwidgetfooter">'); if (standardstyling) document.write('<br/>'); if (!standardstyling) document.write('</div>');}
</script> <script type="text/javascript"> var numcomments = 8; var showcommentdate = true; var showposttitle = true; var numchars = 50; var standardstyling = true; </script> <script src="http://codigos-bloggerbr.blogspot.com/feeds/comments/default?alt=json-in-script&callback=showrecentcomments"></script>
Vá em LAYOUT - Elementos da página - Adicionar um Gadget => HTML/Javascript e cole o código.
Notas:
AZUL = coloque o nome do autor (seu nome por exemplo)
ROXO = é a URL ícone dos comentários comuns, onde vc pode trocar
LARANJA = é o ícone dos comentários anônimos //
VERMELHO = coloque a URL do seu blog
Caso queira configurar:
var numcomments = 8 Número máximo de comentários a ser exibido.
var showcommentdate = true; Mostrar a data | true - mostra | false não mostra
var showposttitle = true; O título do post comentado. false para esconder.
numchars var = 50; Número máximo de caracteres
Depois Salve e pronto! =D
Comentários