4 Replies - 8449 Views - Last Post: 03 February 2013 - 01:34 PM

#1 goku87  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 4
  • View blog
  • Posts: 77
  • Joined: 17-October 09

Adding Blogger Comments to External Website

Posted 03 February 2013 - 12:39 PM

So I have been working on incorporating my Blogger into a website and so far it has worked well, however I still have issues with comments. I cannot figure out how to enable users to add comments to posts without redirecting them to each post via the permalink after which they are able to add a comment. Is there something I can do or is this pretty much the only way to get it done?
Is This A Good Question/Topic? 0
  • +

Replies To: Adding Blogger Comments to External Website

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8964
  • View blog
  • Posts: 33,624
  • Joined: 12-June 08

Re: Adding Blogger Comments to External Website

Posted 03 February 2013 - 12:41 PM

Quote

I cannot figure out how to enable users to add comments to posts without redirecting them to each post via the permalink after which they are able to add a comment.

What is happening? What language is it in?
Was This Post Helpful? 0
  • +
  • -

#3 goku87  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 4
  • View blog
  • Posts: 77
  • Joined: 17-October 09

Re: Adding Blogger Comments to External Website

Posted 03 February 2013 - 12:50 PM

View Postmodi123_1, on 03 February 2013 - 12:41 PM, said:

What is happening? What language is it in?

It is all in PHP. I am using SimplePie to pull in the Atom feed from the posts and then process everything "locally" to get individual posts/comments/whatnot. However, since I am using feeds, I have to separately handle how users actually add comments to each post. I am guessing that Javascript would be the best possible approach so I was looking through the Blogger API documentation but I do not see anything about this except for a person who is logged in a specified application, which does not really fit my situation...
Was This Post Helpful? 0
  • +
  • -

#4 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8964
  • View blog
  • Posts: 33,624
  • Joined: 12-June 08

Re: Adding Blogger Comments to External Website

Posted 03 February 2013 - 12:53 PM

I would figure a quick AJAX/jquery would let you have a comment box and quietly submit (no redirect) to the system.
Was This Post Helpful? 0
  • +
  • -

#5 goku87  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 4
  • View blog
  • Posts: 77
  • Joined: 17-October 09

Re: Adding Blogger Comments to External Website

Posted 03 February 2013 - 01:34 PM

Ugh, I feel so inadequate. In an act of despiration, I simply copy/pasted the comment form code from the Blogger page itself just to see what would happen, and it worked, so for future reference to anyone who may need it: just copy/paste works so long as you change the blog id and post id as necessary:

<div class='comment-form'>
	<a href='http://www.blogger.com/comment-iframe.g?blogID=<?php echo $blogID ;?>&postID=<?php echo $postID ;?>' id='comment-editor-src'></a>
	<iframe allowtransparency='true' class='blogger-iframe-colorize blogger-comment-from-post' frameborder='0' height='410' id='comment-editor' name='comment-editor' src='' width='100%'></iframe>
	<script type='text/javascript' src='//www.blogger.com/static/v1/jsbin/3643097517-comment_from_post_iframe.js'></script>
	<script type='text/javascript'>
		  BLOG_CMT_createIframe('http://www.blogger.com/rpc_relay.html', '03485901868105668148');
	</script>
</div>


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1