Color Tools for Web Designer, How To Access Blocked Web Sites,Download Internet Explorer 8,Download Google Chrome,Domain Gratis Indonesia, Translator website

Wednesday, January 6, 2010

Popular Posts Widget For Blogger Blogs

I would like to write about Popular Post Widget that can be used for Blogger Blogs. This topic may have been discussed by many blogger masters, but I hope it will be useful for you.
If you want to display your popular posts, or commented by many visitors, you have to install a widget. This widget is called Popular posts widget or Most Commented Posts. You can install this widget with two ways, manually and or automatically. If you want to install Popular posts widget manually, you can follow these steps:
  1. Login to blogger with your ID, on the Dashboard, click Layout of the blog you want to place the popular post widget.
  2. After you click Layout, make sure you are in the Page Element, now add a new gadget on the sidebar or on the footer of your blog by click on Add a Gadget.
  3. In the dialog box of Add a Gadget, please select HTML/JavaScript by give a click on the text or the sigh plus (+). After the field of Configuration HTML/JavaScript appears, copy the JavaScript below:

    <script type="text/javascript">
    function pipeCallback(obj) {
    document.write('<ul style="text-transform: capitalize;">');
    var i;
    for (i = 0; i < obj.count ; i++)
    {
    var href = "'" + obj.value.items[i].link + "'";
    var item = "<a href=" + href + ">" + obj.value.items[i].title + "</a> <br/>";
    document.write(item);
    }
    document.write('</ul>');
    }
    </script>

    <script src="http://pipes.yahoo.com/pipes/pipe.run?_render=json&_callback=pipeCallback&_id=1a1c6e4e6d4f148e3650fda46910e15f&url=http%3A%2F%2FYourblogname.com&num=10" type="text/javascript"></script>


  4. If the code above copied, paste into the field or text area of Configuration HTML/JavaScript. For the Title, you can fill out with Popular Posts or Most Commented Post or whatever you like, then don’t forget to click Save.
  5. Done

Remarks:

<script src="http://pipes.yahoo.com/pipes/pipe.run?_render=json&_callback=pipeCallback&_id=1a1c6e4e6d4f148e3650fda46910e15f&url=http%3A%2F%2FYourblogname.com&num=10" type="text/javascript"></script>

Replace the red-printed text above with your blog’s name, and the number 10 at code m&num=10 shows the max number of your popular posts that would be displayed. If you want more or less posts, just adjust the number, as you desire e.g. 15, 20, 5, 3, or anything you like.

I think the manually installation of Popular posts widget is enough, and now how about the automatic way?

To install the automatic widget, you can visit and follow the guide from Blogger Master Amanda here.

However, the widget by Amanda can be manually installed on your blog. The steps are like above as I mention. The JavaScript code would be as follow:

<script type="text/javascript">
function pipeCallback(obj) {
document.write('<ol style="text-transform: capitalize;">');
var i;
for (i = 0; i < obj.count ; i++)
{
var href = "'" + obj.value.items[i].link + "'";
var item = "<li>" + "<a href=" + href + ">" + obj.value.items[i].title + "</a> </li>";
document.write(item);
}
document.write('</ol>');
}
</script>
<script src="http://pipes.yahoo.com/pipes/pipe.run?_render=json&_callback=pipeCallback&_id=1cf38ae68efbe859c4ba1ee239cec099&url=http%3A%2F%2FYourblogname.com&num=10" type="text/javascript"></script>
<span style="font-size: 80%">Widget by <a href="http://www.bloggerbuster.com">Blogger Buster </a></span>

No comments: