Najczęściej komentowane

W menu Układ => dodaj gadżet HTML/Javascript z poniższym kodem:

<script type="text/javascript"> function stripTags(s,n) { return s.replace(/<.*?>/ig,"").split(/\s+/).slice(0,n-1).join(" ") } function mostcommented(feed) { var i; for (i = 0; i < feed.count ; i++) { var postURL = "'" + feed.value.items[i].link + "'"; var postTitle = feed.value.items[i].title; var postthumbnail = "<img src="+feed.value.items[i].postthumbnail+" />"; var postDescription = feed.value.items[i].postdescription; var postComments = feed.value.items[i].commentcount; var postList = '<div class="most-commented"><ul><li><div class="comment-count">' + postComments + "</div>" + postthumbnail + "<a href="+ postURL + '">' + postTitle + "</a>" + '<p>' +stripTags(postDescription,10)+'...</p>' + '</li></ul></div>'; document.write(postList); } } </script> <script src="http://pipes.yahoo.com/pipes/pipe.run? AddUrlHere=http://blokotek.pl &NumberofPosts=5 &_id=2cb5eb603ed55a6264ee1484e5fdd45c &_callback=mostcommented &_render=json" type="text/javascript"></script>


Link zaznaczony na zielono zamień na adres swojego bloga.

Brak komentarzy :

Prześlij komentarz

Copyright © 2014 Sunny Boats
Designed By Blokotek