Market Leverage

JackBook.Com

(Alpha Version)
"There are millions of people using wordpress.org because they want to make money online,
and there are millions of people using blogspot.com because they can't make money online with wordpress.com". ~ Jacky Supit

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

Have Our Post Delivered to Your Inbox!

Enter your email address:


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.

Related Entries

Have Our Post Delivered to Your Inbox!

Enter your email address:

Or Read Our Articles Via Your Feed Readers?
Our Feed Subscriber

68 Comments »

Comment by Anonymous
2007-09-03 20:53:00

cool

 
Comment by Keshav Khera
2007-09-17 12:42:45

may i know where to put this code, in the page element or in the html of the template

 
Comment by keite
2007-09-24 16:17:33

your hacks did not work in my blog.i’ve tried so many times both recent posts and comments.what could be the problem

 
Comment by keite
2007-09-24 17:28:47

oh now i can use recent post hack. still i want recent comments hack and i see only on your post title.. :???:

 
Comment by keite
2007-09-24 18:38:00

thank you jack

 
2007-09-27 11:46:54

[...] the right is a Feed Widget Element. You can change it with your own feed url, or you can have the recent post and recent comment for blogger simple hack [...]

 
Comment by keite
2007-09-28 00:36:17

your recent comments hack did not work properly, it shows only the button.though recent posts works fine

 
2007-10-01 16:48:22

[...] the right is a Feed Widget Element. You can change it with your own feed url, or you can have the recent post and recent comment for blogger simple hack [...]

 
2007-10-29 13:34:57

[...] I have written the tips and the widgets there about Recent Comments and Recent Posts on Blogger. but I think I need to still write this tip, so we can learn that there are many alternative ways [...]

 
Comment by Siddu
2007-10-31 04:14:01

Hi Jack,
Your blog inspires me. Can you tell us how to do the below hacks in blogspot blog.
1. “Popular ” or most popular/viewed posts on left side bar
2. post date in an icon , right side of every post

thanks

 
Comment by Indigegraigue
2007-10-31 05:58:20

You don’t really need or want that lifestyle, it might hurt y’all slowly more…….Just tell him you
don’t wanna repeat something your not too proud of z7uas.

 
Comment by Ade Kurnia
2007-11-01 14:39:50

Hi Jack… I’m very grateful to your information… it’s very useful :grin: :grin: … I’m adding this to my blog … once again, thanks :mrgreen:

 
2007-11-05 13:37:07

[...] can see how to get a recent comment list and recent post list on blogger there.  [...]

 
Comment by Piseth
2007-11-21 17:54:07

Thank you very much for sharing the tips and tricks. It is very useful :smile:

 
Comment by channelofhealing
2007-11-26 03:45:38

Thanks Alot for this Help I tell you that your ttorial has been of great help to me, God bless you.
I have not been able to do the top commentators, and related posts widgets.

id like you to help where you can

Thanks

 
Comment by Church
2007-11-27 07:41:08

:?: Jack, love the template, but having troubles editing the right sidebar WITHIN “Page Elements” I see where widgets are posted like “Blog Archive” and “Search” but the link to “Edit” them won’t work nor can I move them around. Also, how do I add content in the “About” Tab.

 
Comment by KOmeyggg
2007-12-03 12:14:51

58964
58964

 
Comment by Hyvqeuon
2007-12-07 05:24:28

i
i

 
Comment by cozuni
2007-12-13 18:32:04

Thanks. It’s great to find the code for recent posts here and it works.

 
Comment by hwey
2007-12-26 00:07:17

Thanks for this.

I’ve added Recent Comments to my blog but is it possible to show the poster’s name and the post title?

Because all it shows is the comment. Plain comment. It doesn’t indicate which post the comment was meant for or who the poster is.

 
2007-12-28 13:50:25

[...] 3. On that demo site sidebar , I use this blogger recent post tricks. But you can try this other trick to get blogger recent posts and tricks. [...]

 
Comment by Samrat
2007-12-29 16:09:20

Thank you for your information

 
Comment by Helix
2008-01-01 11:56:18

Jack,

Happy New Year!

I am now using your Fresh Blogger Template. It is very nice, thanks!

But when I add this Recent Post or Recent Comment widgets, the following errors occur while viewing in IE.

‘title’ is null or not an object, ‘feed.entry’ is null or not an object.

May i know how to solve these errors? Thanks!

 
 
Comment by Sergiu
2008-02-17 21:19:12

Hello, I’m using ur “delicious” blogger template, It’s great :) but i’m havin some problems with posting date :(
i’ve made some changes but…it doesn’t work :( I’m kinda newbie. Please a little bit help. Thank you

P.S. http://blogu-negru.blogspot.com

 
Comment by Only Easy Things
2008-02-17 21:55:41

Jack, your googlepage where you host the javascript file for recent post widget had exceeded bandwidth limit.

Once it normal again, I will host the file to other server. Is that ok Jack?

 
Comment by Faizan
2008-02-18 02:55:56

Hi jack,
great hacks as always,but can you change the recent comment widget to show who commented and on which post?
I found a recent comment widget on another site which showas the names of thise who commented but ot does not integrate well with my red-white template.

 
Comment by Sergiu
2008-02-18 22:41:18

@ Faizan

On which site ?

 
Comment by Faizan
2008-02-19 03:15:06

on bloggerbuster…www.bloggerbuster.com/2007/08/create-your-oen-recent-comments-widgets.html

 
Comment by Loves Flash Games
2008-02-19 04:03:09

Great info thanks

 
Comment by moongy
2008-02-19 15:07:47

nice articles :mrgreen:

 
Comment by hungls87
2008-02-29 13:23:25

hiiiiiiiii ba con oi o dai nay hay lam do co ai ma vao web site cua anh ay thi vui phai biet nhieu mau va hack blogger tuyet dung la khong ton cong ma tim thay web site nay
thank you many thinks about you :evil: writes it verry good
hello i am hungls87 from to VietNam have a good time !

 
Comment by Big Brother 9 Blog
2008-03-15 09:43:16

I’m gonna use this. thanks!

 
Comment by forexforall
2008-04-12 00:00:45

 
Comment by forexforall1
2008-04-12 15:03:08

 
Comment by Xue
2008-04-17 17:25:13

Thanks for this widget. I have had problems with Blogger because it doesn’t send me email anymore when somebody comments my blog. This widget should help me.

 
Comment by robin
2008-04-21 13:06:36

the trick to insert recent post and recent comment doesnt not work for me….nothing appear even i did post a test msg…

 
Comment by sylvesteR
2008-04-29 23:39:28

Hey jack, just want to ask, I’m currently trying to place a small icon beside the start of a comment and repeats for every single one. I have tried using the document.images function in the javascript file, but it doesn’t seem to work. Could you give lend me a hand? Thanks in advance!!

 
Comment by robin
2008-04-30 11:55:08

i just wondering why my recent post intermittent on and off…sometime i could see the posting and next day i dont see…

 
Comment by nancy drew
2008-05-05 21:29:22

others are just too lazy to do whtever u have asked ppl to do here :wink: ………..u know am lazy to know wht’s this site abt……. :lol: - and hey thts not my real name :wink:

 
Comment by Gv
2008-05-13 19:45:14

Thank you Jacky Supit,

I hv been searching for such a gr8 code

Thanks again

Gv

 
Comment by chetan
2008-05-14 18:06:20

Hey Jack I was wondering if you could give us the code for a tabview widget looking just like that in Doshdosh.com.

 
Comment by Wii
2008-05-16 05:54:07

Just installed this and the top commentator widget on my blogs, much appreciated as ever, thanks.

 
Comment by mike
2008-05-16 08:56:45

Hey,

Great post. Few Questions for you.

I want to edit the javascript so the post summer is shown below the headline, and indented. How do I edit the code?

Also, I still don’t understand where to put the java in the widget html box. What other code has to change?

I’m assuming this gets deleted?

Or does the Java code just get pasted above the the other code in the widget area? Sorry for such a long post…

 
Comment by mike
2008-05-16 08:59:37

Oops. I meant, does this code get deleted, or replaced by something else? The one inside script tags that references that:

http://files.lifewg.googlepages.com/blogger-widget.js

 
Comment by sipuri
2008-05-17 09:50:05

hi jack..same as robin, sometimes my recent post disappear when i make some changes to my template. mmm..wonder why.. currently, i have to change back to the normal 5 post feed.

 
Comment by sipuri
2008-05-20 09:45:07

thanks Jack.
may be later i will do that.
anyway, thanks for your answer.

 
2008-05-23 16:41:32

[...] The demo blog has Recent Posts and Recent Comments lists on it. Click the link follow if you want to have your own Recent Posts and Recent Comments on Blogger. [...]

 
Comment by Danny
2008-05-29 14:31:39

Thanks for the recent post hack! Much appreciated. :smile:

 
Comment by rizal akbar
2008-06-05 00:26:22

unstable..
sometimes it works..sometimes it don’t ??????

 
Comment by LVCHEN
2008-06-24 20:04:41

For recent comments, I recomment this one

http://lvchen716.googlepages.com/rc20_eng

It is nice and easy to setup.

 
Comment by Amrielle
2008-06-29 16:48:27

hi jack, how can I make two right sidebars on my blogger just like your two sidebars?

Amrielles last blog post..Visit Indonesia 2008

 
Comment by Halim-Belajar SEO
2008-07-04 17:22:13

I am using your widget and it is work :grin: , however it just show comment post and not include name of commentator. Is there any way to work with it?

Halim-Belajar SEOs last blog post..Belajar SEO | Wah, so much competitor lately eh?

 
2008-07-08 19:43:32

[...] know, these widgets was posted so many times on so many blogs, but I still want to re-write them with more details to make it [...]

 
2008-07-10 11:40:13

[...] 2. The recent post is using this recent posts blogger hack. [...]

 
2008-07-22 23:41:53

[...] I have written the tips and the widgets there about Recent Comments and Recent Posts on Blogger. but I think I need to still write this tip, so we can learn that there are many alternative ways [...]

 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.

Press Enter
Our Feed Subscriber
Advertise Here

JackBook Sponsors

The Hottest Blogs

Network Blogs Last Posts

    Jack's Recent Comments

    Jack's Archives List

    JackBook.Com Blogs Network, Some Right Reserved | Contact Us | Advertise Here | Join Us get YourName.JackBook.Com | Sitemap