AD (728x60)

Blog Archive

Flickr Photostream


All About Love And God Spot


Dynamic Drive

Juni 11, 2009

Statistics Widget for Blogger

Share & Comment
Statistics Widget For BloggerHere is my latest widget for Blogger/ Blogspot; I am going to call it Statistics Widget for Blogger. I have noticed a few sites displaying blog statistics like, total number of posts, total number of comments, total words in posts, total words in comments and similar data on their sidebar. I thought of coming out with a similar widget for Blogger.

What is Statistics Widget for Blogger?
Statistics Widget for Blogger will display the total number of posts and total number of comments on your blog. As of now, I have included only these two data for display. I do not see any value in displaying the total words in posts and total words in comments. I find them meaningless. If you are interested to display the total number of posts and total number of comments on your blog, please follow the instructions below.

Instructions to install Statistics Widget for Blogger
  1. Log in to your Blogger account

  2. On your Blogger Dashboard, click on the "Layout" link

    Layout Link

  3. This will take you to the "Page Elements" tab. Decide where you want to insert the statistics widget and click on the "Add a Gadget" link accordingly.

    Gadget Link

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

    HTML/ Javascript Gadget

  5. This will open the "Configure HTML/ Javascript" window. In the title section, please type "Blog Statistics" or "Blog Information" or "Blog Data" or any other title as you may wish

  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 style="font-size:75%;"><a href="http://blogumulus.blogspot.com/2009/06/statistics-widget-for-blogger.html" target="_blank">Widgets for Blogger</a></span>

  7. Remember to replace the text in bold "yourblog" with your blog address. Take note to replace it in two locations.

  8. Your window should look like the image below.

    Configure HTML Gadget

  9. I have a link back to my blog at the bottom. You are free to remove the credit, if you don't like it

  10. Click on "Save" button at the bottom right hand corner

That's it. You have created a widget to display the number of posts and number of comments on your blog. Please contact me if you have any doubts or you face any problems with the widget.

Please subscribe to my feed if you like this post


Print this post

Sincerely,
Padhang Bulan
Layla Signature
Tags: ,

Written by

We are the second largest blogger templates author, providing you the most excellent and splendid themes for blogger cms. Our themes are highly professional and seo Optimized.

1 komentar :

  1. Ckckck... Tau aja ni lela, kalau aku ga bisa ngintung... liat aja disini:

    http://tipspack.blogspot.com/2009/05/kok-serba-2-ya.html

    :D
    Makasih dah, widget nya... Mantabz...!!!

    BalasHapus

“Komentar yang bagus dan benar lebih baik dari sedekah yang menyinggung perasaan.”

 
@2015 | Designed by Templatezy | Redesigned by FlyCreator