Statistics widget for blogger


Statistics widget that shows all the statistics counting total no of posts and comments in your blog.The bloggers who have thousands of comments on there blog will sure love to use this widget in there blog as it will dispaly the all counts of there comments and post counts too.

Now How to add this widget to you Blog. Follow the instructions.

Go to dashboard of your blogger > Layout > Add a Gadget > HTML/JAVASCRIPT

Add the below codes to it-

<script style="text/javascript">

function numberOfPosts(json) {

document.write('Total Posts: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');

}

function numberOfComments(json) {

document.write('Total Comments: <b>' + json.feed.openSearch$totalResults.$t + '</b><br>');

}
</script>

<ul><li><script src="http://rilwanblog.blogspot.com/feeds/posts/default?alt=json-in-script&callback=numberOfPosts"></script></li>

<li><script src="http://rilwanblog.blogspot.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script></li></ul>

<noscript><a href="http://rilwanblog.blogspot.com" target="_blank">Blogger Hacks</a></noscript><a href="http://rilwanblog.blogspot.com/2009/10/statistics-widget-for-blogger.html" target="_blank">Get This

</a>
now change the red to your blog name .

0 comments :

Post a Comment