2009-04-03

Image

Add Statistics Widget For Blogger/Blogspot !

While surfing and visiting to other blogs we have noticed that many of the bloggers use this statistics for their blogs. Some are also using Total Words in posts and total numbers of the words in comments. but I am going to talk about only total No of posts and total Number of comments.This Statistics Widget for Blogger showing total number of posts,total number of comments.

 

Follow These Step to Install this widget >>
1. Log in to your Blogger account
2. On your Blogger Dashboard, click on the "Layout" link as shown in the blow image

3. Click On "Add a Gadget" as displayed in the Below Image

4.Scroll down the list and find "HTML/ Javascript" and click on the "+" button

5.When we click on the "+" button it will open a window "Configure HTML/ Javascript". Now Enter what ever you want as in title section "Blog Statistics" or "Blog Information" or "Blog Data" or any idea in your Mind.
6.In the content section, please copy & paste the following code:


<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://yourblog.blogspot.com/feeds/posts/default?alt=json-in-script&callback=numberOfPosts"></script></li>
<li><script src="http://yourblog.blogspot.com/feeds/comments/default?alt=json-in-script&callback=numberOfComments"></script></li></ul>
<span ><a href="http://dacoolhunter.blogspot.com/" target="_blank">Widgets for Blogger</a></span>

7. Now Don't Forget To change "yourblog" With your blog address.
8.Click on "Save" button at the bottom right hand corner and u r done :)

0 التعليقات:

Total Pageviews