JACKBOOK.COM

About Us | Contact Us | Advertise Here | My Money Maker

Recent Comment on blogger and Recent Post on Blogger - Teach you how to customize it

posted under blogger hacks by admin
sponsored links




Just simply edit the “http://YourBlogNameHere.blogspot.com” on the code with your own blog url. and done :)

If you want to learn about this widget, then please read this article more

Recent Comments on Blogger

This hack probably is one of the oldest blogger hacks ever.

So easy, Just do this steps;
1. Go to your Dashboard
2. Go to Template Tab
3. There you will see a widget manager. Click Add a Page Elements on the section you want to place the recent comment.
4. Now you should see a list of widget elements you can pick. click on the Add to Blog Button under HTML/Javascript. this element is useful if we want to add a 3rd party functionality or other code. so we pick this. remember to choose this elements each time you need to add third-party codes.
5. Now you should have a new popup window open,
- Leave the title blank
- And go to the content area.
- Copy this Code and paste on that widget content area.
please note: you should change the “http://YourBlogNameHere.blogspot.com” on the code with your own blog url.

<script src="http://files.lifewg.googlepages.com/blogger-widget.js"></script>

<script>

var numposts = 10;

var showpostdate = false;

var showpostsummary = false;

var numchars = 100;

</script>

<h2>RECENT COMMENTS</h2>

<script src="http://YourBlogNameHere.blogspot.com/feeds/comments/default?orderby=published&alt=json-in-script&callback=rp"></script>

6. Click Save Changes
7. Refresh your blog and done.

Hey Jack, I can do that, but i’m to lazy to do all that, can’t just give me any simpler way?

Oh yes of course. for you lazy boy, you can click on the button below, and just follow the instruction. yeah.. it’s easier for you lazy boy :)

But still, you need to edit the “http://YourBlogNameHere.blogspot.com” on the code with your own blog url.

Recent Posts on Blogger

Jack, I see that you have a Recent Post. Can I have that too for my blogspot / blogger blog?
Yes Sir, You can! :) If you are not too lazy. you can follow the steps above, just focus on the last line. we need to make some changing there.

There you’ll see that the script source is like this:

src="http://YourBlogNameHere.blogspot.com/feeds/comments/default?orderby=published&alt=json-in-script&callback=rp"

see the word comment with green color there?
Comments means it will gives you list of comments. change it with posts if you want to have a list of your recent posts.
It should become like this:

src="http://YourBlogNameHere.blogspot.com/feeds/posts/default?orderby=published&alt=json-in-script&callback=rp"

Oh and also don’t forget about the title, see <h2>RECENT COMMENTS</h2> there? You know what to do ;)

Jack, I’m too lazy to…
ok.. ok.. here it is :)


And still, you need to edit the “http://YourBlogNameHere.blogspot.com” on the code with your own blog url.

Jack, I don’t like the result. it’s shown as a list. How can i modify it?
Oh.. I see that you are not that lazy ;)
Ok, please just follow this steps carefully

1. Click this file. yes i mean this. The link will let you download the javascript file resource.
2. You would probably seen your browsers is asking you whether to open or to save the file. Choose to save it as wherever you want.
3. Open it with Notepad or your favorite editor. I use Textpad
4. The source would be like this;

//credit to hoctro

function rp(json) {

document.write('<ul>');for (var i = 0; i < numposts; i++) {

document.write('<li>');

var entry = json.feed.entry[i];

var posttitle = entry.title.$t;

var posturl;

if (i == json.feed.entry.length) break;

for (var k = 0; k < entry.link.length; k++) {

if (entry.link[k].rel == 'alternate') {

posturl = entry.link[k].href;

break;

}

}

posttitle = posttitle.link(posturl);

var readmorelink = "(more)";

readmorelink = readmorelink.link(posturl);

var postdate = entry.published.$t;

var cdyear = postdate.substring(0,4);

var cdmonth = postdate.substring(5,7);

var cdday = postdate.substring(8,10);

var monthnames = new Array();

monthnames[1] = "Jan";

monthnames[2] = "Feb";

monthnames[3] = "Mar";

monthnames[4] = "Apr";

monthnames[5] = "May";

monthnames[6] = "Jun";

monthnames[7] = "Jul";

monthnames[8] = "Aug";

monthnames[9] = "Sep";

monthnames[10] = "Oct";

monthnames[11] = "Nov";

monthnames[12] = "Dec";

if ("content" in entry) {

var postcontent = entry.content.$t;

} else if ("summary" in entry) {

var postcontent = entry.summary.$t;

} else

var postcontent = "";

var re = /<\S[^>]*>/g;

postcontent = postcontent.replace(re, "");

document.write(posttitle);

if (showpostdate == true) document.write(' - ' + monthnames[parseInt(cdmonth,10)] + ' ' + cdday);

if (showpostsummary == true) {

if (postcontent.length < numchars) {

document.write(postcontent);

} else {

postcontent = postcontent.substring(0, numchars);

var quoteEnd = postcontent.lastIndexOf(" ");

postcontent = postcontent.substring(0,quoteEnd);

document.write(postcontent + '...' + readmorelink);

}

}

document.write('</li>');

}

document.write('</ul>');

}

There are some parameters you can use, they are:
var numposts = 10; /* How many posts do you want?
var showpostdate = false; /* DO you want us to show the date?
var showpostsummary = false; /* Do you want to show the post summary?
var numchars = 100; /* If you want to show the post summary, how many characters do you want to show?

5. There you’ll see that i have this lines inside

document.write('<ul>');document.write('<li>');

document.write('</li>');

document.write('</ul>');

Basically, the structure of the file is like this

function rp(json) {

HERE YOU CAN ADD ANYTHING YOU WANT, AS AN EXAMPLE IS TITLE

document.write('<ul>'); //This 2 line should keep together, without any text or whate-

(loop function start)

document.write('<li>'); // ver inside it. so don't put anything here.

------------------------------------------------------------------

HERE IS THE CONTENT.

YOUR CONTENT WOULD BE REPEATED HERE.

------------------------------------------------------------------

document.write('</li>');    //This 2 line should keep together, without any text or whate-

(loop function stop)

document.write('</ul>'); // ver inside it. so don't put anything here.

6. Here you can modify the result.
if you don’t like it’s shown on a list, you can delete all 4 lines. so it becomes like this

function rp(json) {

HERE YOU CAN ADD ANYTHING YOU WANT, AS AN EXAMPLE IS TITLE

document.write('<ul>'); //This 2 line should keep together, without any text or whate-

(loop function start)

document.write('<li>'); // ver inside it. so don't put anything here.

------------------------------------------------------------------

HERE IS THE CONTENT.

YOUR CONTENT WOULD BE REPEATED HERE.

------------------------------------------------------------------

document.write('</li>');    //This 2 line should keep together, without any text or whate- HERE YOU CAN ADD ANYTHING TO SEPARATE BETWEEN CONTENT RESULTS LINES. example <br/>

(loop function stop)

document.write('</ul>'); // ver inside it. so don't put anything here.

Just remember to always backup your original widget first if you want to do any changing or modifying on them.

Wish you luck and Have a nice try.



Readers who read this page, also read:

  • Another Easy Way to get Recent Comments and Recent Posts on Blogger/Blogspot
  • Money Maker List
  • Blogger To Have A Comment Pagination List
  • Introducing JackBook.Com Blogs Network (Alpha)
  • Good Bye HaloSCAN!

  • Another Easy Way to get Recent Comments and Recent Posts on Blogger/Blogspot
  • Three Columns Art Blogger Template
  • HaloScan
  • Blogger To Have A Comment Pagination List
  • Mushblue Blogger Template - another dark template, right sidebar
  • Dreamwork Redux Blogger Template
  • Comment Form Under Post On Blogger, Finally Officially Embedded!
  • Dark Blogger Template - Red Glow
  • Top Commentator List For Blogger / Blogspot
  • A Comment Form under the post - Good News for blogger/blogspot users
  • Good Bye HaloSCAN!
  • 3 Columns Blogger Templates - Blogohblog
  • Should we use HaloScan? (I am so disappointed to HaloScan)
  • Bloggingtips.com definitely needs help!
  • iTheme Blogger Template (The Full Version)
  • Some FAQ’s on customizing blogger templates
  • Introducing GIMME BLOG, Let’s Build A Blog Network With Me
  • How to remove nofollow tag on Blogger / Blogspot
  • No Popup Window on Your Blogger / Blogspot Comment System.
  • Introducing JackBook.Com Blogs Network (Alpha)

« Fresh Blogger Template
HaloScan »


Press Enter
Our Feed Subscriber

Popular Articles

  • Watch Transformers: Revenge of the Fallen Free Movie Online
  • Watch True Blood Season 2 Full Online Videos
  • Watch The Hangover Online Stream
  • Watch Full TV Shows and Movies on Hulu
  • Watch Full Length Episodes on Fancast
  • Watch Free Streaming Episodes at TV.com

Never Pay for Movie Tickets Again!

Hulu connects you to full episodes of your favorite hit TV shows. Enjoy full length movies at your own convenience. You can access thousands of streaming videos online anytime for free!
Amazon Black Friday
  • Recent Articles
  • Categories
  • Archives
  • Watch Public Enemies Stream Online
  • Watch Ice Age 3: Dawn of the Dinosaurs Movie Online Free
  • Watch I Hate Valentine’s Day Online Free
  • Watch Harry Potter and the Half-Blood Prince Online Free
  • Naruto Shippuden 117 | Naruto Shippuden 117 Watch Raw English Sub Online Free
  • Naruto Shippuden 117 | Naruto Shippuden 117 Watch Raw Online Free
  • Scrubs Season 8 Episode 12 | Watch Scrubs Their Story II Online Video
  • Scrubs Season 8 Episode 11 | Watch Scrubs My Nah Nah Nah Online Video
  • Watch I Hate Valentine’s Day Full Stream
  • Watch I Hate Valentine’s Day Online Stream
  • Watch Ice Age: Dawn of the Dinosaurs Full Stream
  • Watch Public Enemies Free Online Stream
  • Bleach 227 | Bleach 227 Watch Raw English Sub Online Free
  • Bleach 227 | Bleach 227 Watch Raw Online Free
  • Watch Burn Notice Season 3 Episode 4 | Burn Notice Fearless Leader Online Stream
  • Watch Public Enemies Full Video Online
  • Jon & Kate Plus 8 Season 5 Episode 7 | Watch Jon & Kate Plus 8 The First 10 Years Online Free
  • The Secret Life of An American Teenager Season 2 Episode 3 | Watch The Secret Life of An American Teenager Par of The Course Online Free
  • Watch Ice Age: Dawn of the Dinosaurs Stream Online
  • Watch Weeds Season 5 Episode 5 | Weeds Van Nuys Online Free
  • animay
  • anime
  • blog
  • blog-tips
  • blogger hacks
  • blogger templates gallery
  • boxing
  • cars
  • cooking
  • coupons
  • download freeware
  • electronics
  • featured sites
  • funny pictures
  • gadgets
  • games
  • health
  • july 09 anime
  • july 09 movies
  • july 09 tv
  • july anime
  • june 09 anime
  • june 09 movies
  • june 09 tv
  • make money online
  • may anime
  • may movies
  • may tv
  • misc fun sexy
  • moovee
  • Movies
  • music
  • notebook
  • personal
  • seo tips
  • sexy
  • sexy-news
  • sports
  • teevee
  • top 2007 movies
  • top 2008 movies
  • tv
  • virus
  • wordpress
  • July 2009 (22)
  • June 2009 (552)
  • May 2009 (806)
  • April 2009 (497)
  • March 2009 (462)
  • February 2009 (309)
  • January 2009 (367)
  • December 2008 (301)
  • November 2008 (238)
  • October 2008 (198)
  • September 2008 (202)
  • August 2008 (93)
  • July 2008 (22)
  • June 2008 (25)
  • May 2008 (33)
  • April 2008 (18)
  • March 2008 (10)
  • February 2008 (6)
  • November 2007 (13)
  • October 2007 (14)
  • September 2007 (8)
  • August 2007 (12)
  • July 2007 (19)
  • June 2007 (10)
  • May 2007 (18)
  • April 2007 (3)
JackBook.Com | sitemap | Privacy Policy | Copyright
Copyright © Jackbook 2009