Sep 18, 2011

List of Blog Post Gadget for blogger using javascript

Blogger Data API Sample

Following post will help in retrieving the information related to list of post from a blog. One can use this to display the list of blogs by following easy step mentioned below

 1) Add one html/javascript gadget to your blog.

2) Copy paste below code to your gadget.

3) Replace feeduri with your blog feed uri.

           var feedUri = 'http://www.blogger.com/feeds/10861780/posts/default';

 4) just save the gadget and its ready to use. Here goes the code for list of post for a blog :-








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

/* 
* Retrieve a list of blog posts
*/

// Obtain a reference to the 'content' div
var content = document.getElementById('content');

// Create the blogger service object
var bloggerService =
    new google.gdata.blogger.BloggerService('com.appspot.interactivesampler');

// The feed for a single blog. (In this case, the Official Google Blog.)
//
// The ID included in this URI can be retrieved from the
// <link rel="service.post"> element in the Blog's HTML source
var feedUri = 'http://www.blogger.com/feeds/10861780/posts/default';

// A callback method invoked getBlogPostFeed() returns data
var handleBlogPostFeed = function(postsFeedRoot) {
  var posts = postsFeedRoot.feed.getEntries();
  
  // This variable will buffer HTML output until function completes
  var html = '';
  
  // Display blog's title
  html += '<dl>'
       + '<dt><strong>Blog:</strong> '
       + '<a href="'
       + postsFeedRoot.feed.getLink('alternate').getHref()
       + '">'
       + postsFeedRoot.feed.getTitle().getText()
       + '</a></dt>';
  
  // Display blog posts
  html += '<dd><ul>';
  for (var i = 0, post; post = posts[i]; i++) {
    var postTitle = post.getTitle().getText();
    var postURL = post.getHtmlLink().getHref();
    html += '<li><a href="' + postURL + '" target="_blank">'
              + postTitle
              + '</a></li>';
  }
  html += '</ul></dd>';
  
  // Write out buffered HTML, and clear the "Loading..." message
  content.innerHTML = html;
};

var handleError = function(error) {
  content.innerHTML = '<pre>' + error + '</pre>';
};

bloggerService.getBlogPostFeed(feedUri, handleBlogPostFeed, handleError);

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

 

Below is the demo of above code for my blog :-

 





Loading...



77 comments:

ผมอยากให้googleกับfirefoxจับมือกันเพื่อความสําเร็จและก้าวหน้า

Blogspot post list javascript

i found your site through search, yours site is a nice and excellent website.. contents are nice.. will grow higher in future


http://winterreifen.ms/

tried it step by step and changed the blog url, not working though

what exactly you are getting as output, and specify error if you are getting any

Hi, i get this as output when i paste the code in the default HTML/Javascript widget

// Obtain a reference to the 'content' div var content = document.getElementById('content'); // Create the blogger service object var bloggerService = new google.gdata.blogger.BloggerService('com.appspot.interactivesampler'); // The feed for a single blog. (In this case, the Official Google Blog.) // // The ID included in this URI can be retrieved from the // element in the Blog's HTML source var feedUri = 'http://interblog.blogspot.com/feeds/posts/default'; // A callback method invoked getBlogPostFeed() returns data var handleBlogPostFeed = function(postsFeedRoot) { var posts = postsFeedRoot.feed.getEntries(); // This variable will buffer HTML output until function completes var html = ''; // Display blog's title html += '

' + '
Blog: ' + '' + postsFeedRoot.feed.getTitle().getText() + ''; // Display blog posts html += '

'; for (var i = 0, post; post = posts[i]; i++) { var postTitle = post.getTitle().getText(); var postURL = post.getHtmlLink().getHref(); html += '
' + postTitle + '
'; } html += '

'; // Write out buffered HTML, and clear the "Loading..." message content.innerHTML = html; }; var handleError = function(error) { content.innerHTML = '

' + error + '

'; }; bloggerService.getBlogPostFeed(feedUri, handleBlogPostFeed, handleError);

Good presentation, You give is very helpful and we thank you very much..

Thanks for your suggestions. It helped me to develop my site http://learningmsofficepackage.blogspot.com

Wish you all the best.

Very nice post.
Get more offer of online mobile recharge and DTH at cuponswall freecharge India.

Learning new technolgoy would help oneself at hard part of their career. And staying updated is the only way to survive in current position. Your content tells the same. Thanks for sharing this information in here. Keep blogging like this.

Best JAVA Training institute in Chennai | Best JAVA Training in Chennai | Hadoop training in chennai

Many website builders rely on JavaScript to make their websites functional. Functions such as drop down menus, image changes, and linking to other websites are all done through the JavaScript program.
See more at: javascript

Thanks for sharing this post.There are more job vacancies in IT sectors.JAVA is really useful for IT professionals.
Regards

Java courses in Chennai |
Best JAVA Training in chennai

Your content is nice and understandable.Keep sharing like this.
Regards,
Hadoop course in Chennai |
Hadoop Training institutes in Chennai

The expansion of internet and other business intelligence leads to large volume of data. Industries are looking for talented professionals to maintain and process huge volume of data with latest tools available in the market. Taking Hadoop Training in Chennai | Big Data Training in Chennai will ensure better career prospects for talented professionals.

Hello,
you have written a great article on gadget for blogger do check out some article in my blog gadjet geek

I have read your blog its very attractive and impressive. I like it your blog.
Java Training institute in velachery

Croma campus is best IT training institute and best class IT trainer provides croma campus is great JavaScript training in noida wiht jo b placement support. croma campus best facilities and lab provides then best option for you join us croma campus

This blog is very informative about the concepts involved in hadoop and its scope in future. Interesting concepts on its architectute and syllabus which are covered by big data hadoop training institute in Chennai that is functioning effectively.

Really a good technical site,keep on writing good stuffs
dot net training in chennai

Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging…
Regards,
PHP Training Chennai|PHP Training Institute in Chennai

Great informational resource as always!I really love the way of explaining this post.You are just ouststanding..Keep posting more

White Label Website Builder

Amazing article! I was confused about PHP Training in Chennai , but now got a clear view of the definition. Appreciate your hard work!

Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging...
PHP developers in chennai | PHP developers in India

I am following your blog regularly and got great information. Keep blogging.!!
Responsive Website Development Company Chennai

I simply wanted to thank you so much again. I am not sure the things that I might have gone through without the type of hints revealed by you regarding that situation.
Advance Digital Marketing Training in chennai– 100% Job Guarantee

Thanks a lot very much for the high your blog post quality and results-oriented help. I won’t think twice to endorse to anybody who wants and needs support about this area.
java training in chennai

Great article.Thanks a lot very much for the high your blog post quality and results-oriented help. I won’t think twice to endorse to anybody who wants and needs support about this area.
Best Java Training Institute Chennai

My rather long internet look up has at the end of the day been compensated with pleasant insight to talk about with my family and friends.
google-cloud-platform-training-in-chennai

Appreciation for really being thoughtful and also for deciding on certain marvelous guides most people really want to be aware of.
amazon-web-services-training-institute-in-chennai

I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.

Best Java Training Institute Chennai



Amazon Web Services Training in Chennai






I wish to show thanks to you just for bailing me out of this particular trouble.As a result of checking through the net and meeting techniques that were not productive, I thought my life was done.
Best Python training Institute in chennai

Thank you for allowing me to read it, welcome to the next in a recent article. And thanks for sharing the nice article, keep posting or updating news article.
MEAN stack training in Chennai
MEAN stack training in bangalore
MEAN stack training in tambaram
MEAN stack training in annanagar
MEAN stack training in Velachery
MEAN stack training Sholinganallur

Useful information.I am actual blessed to read this article.thanks for giving us this advantageous information.I acknowledge this post.and I would like bookmark this post.Thanks
Hadoop Training in Chennai
Hadoop Training in Bangalore
Big data training in tambaram
Big data training in Sholinganallur
Big data training in annanagar

It seems you are so busy in last month. The detail you shared about your work and it is really impressive that's why i am waiting for your post because i get the new ideas over here and you really write so well.
Big data training in Marathahalli
Big data training in btm
Big data training in Rajajinagar
Big data training in bangalore

Thank you for sharing such great information with us. I really appreciate everything that you’ve done here and am glad to know that you really care about the world that we live in
python training in chennai | python training in bangalore

python online training | python training in pune

python training in chennai | python training in bangalore

python training in tambaram | python training in velachery

It's interesting that many of the bloggers to helped clarify a few things for me as well as giving.Most of ideas can be nice content.The people to give them a good shake to get your point and across the command
java training in omr

java training in annanagar | java training in chennai

java training in marathahalli | java training in btm layout

java training in rajaji nagar | java training in jayanagar

Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
Devops Training in pune

Devops Training in Chennai

Devops Training in Bangalore

AWS Training in chennai

AWS Training in bangalore

Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information..

rpa training in Chennai

rpa training in anna nagar | rpa training in marathahalli

rpa training in btm | rpa training in kalyan nagar

rpa training in electronic city | rpa training in chennai

rpa online training | selenium training in training

Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.

rpa training in Chennai | rpa training in pune

rpa training in tambaram | rpa training in sholinganallur

rpa training in Chennai | rpa training in velachery

rpa online training | rpa training in bangalore

Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.

rpa training in Chennai | rpa training in pune

rpa training in tambaram | rpa training in sholinganallur

rpa training in Chennai | rpa training in velachery

rpa online training | rpa training in bangalore

Just stumbled across your blog and was instantly amazed with all the useful information that is on it. Great post, just what i was looking for and i am looking forward to reading your other posts soon!
python training in Bangalore
python training in pune
python online training
python training in chennai

The site was so nice, I found out about a lot of great things. I like the way you make your blog posts. Keep up the good work and may you gain success in the long run.
java training in marathahalli | java training in btm layout

java training in jayanagar | java training in electronic city

Really very nice blog information for this one and more technical skills are improve,i like that kind of post.
python online training
python training in OMR
python training in chennai

Nice post. By reading your blog, i get inspired and this provides some useful information. Thank you for posting this exclusive post for our vision..... Best software Training institute in Bangalore

Thank you a lot for providing individuals with a very spectacular possibility to read critical reviews from this site.
Devops training in sholinganallur
Devops training in velachery

I prefer to study this kind of material. Nicely written information in this post, the quality of content is fine and the conclusion is lovely. Things are very open and intensely clear explanation of issues
Best software Training institute in Bangalore

Hmm, it seems like your site ate my first comment (it was extremely long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well as an aspiring blog writer, but I’m still new to the whole thing. Do you have any recommendations for newbie blog writers? I’d appreciate it.

Best Selenium Training in Chennai | Selenium Training Institute in Chennai | Besant Technologies

Selenium Training in Bangalore | Best Selenium Training in Bangalore

AWS Training in Bangalore | Amazon Web Services Training in Bangalore

This is an awesome post.Really very informative and creative contents. These concept is a good way to enhance the knowledge.I like it and help me to development very well.Thank you for this brief explanation and very nice information.Well, got a good knowledge.
Java training in Bangalore |Java training in Rajaji nagar | Java training in Bangalore | Java training in Kalyan nagar

Java training in Bangalore | Java training in Kalyan nagar | Java training in Bangalore | Java training in Jaya nagar

I found your blog while searching for the updates, I am happy to be here. Very useful content and also easily understandable providing.. Believe me I did wrote an post about tutorials for beginners with reference of your blog. 
Online DevOps Certification Course - Gangboard | Java online training

Really very nice blog information for this one and more technical skills are improve,i like that kind of post.
python course in pune | python course in chennai | python course in Bangalore

I just see the post i am so happy the post of information's.So I have really enjoyed and reading your blogs for these posts.Any way I’ll be subscribing to your feed and I hope you post again soon.

best selenium training institute in hyderabad
best selenium online training institute in hyderabad
best institute for selenium training in hyderabad
best software testing training institute in hyderabad
selenium online training
selenium training in hyderabad

Really you have done great job,There are may person searching about that now they will find enough resources by your post
excel advanced excel training in bangalore
Devops Training in Chennai

This is quite educational arrange. It has famous breeding about what I rarity to vouch. Colossal proverb. This trumpet is a famous tone to nab to troths. Congratulations on a career well achieved. This arrange is synchronous s informative impolites festivity to pity. I appreciated what you ok extremely here 
Python training in bangalore
Python course in pune
Python training in bangalore

Post a Comment