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?
Adding Blogger Comments to External Website
Page 1 of 14 Replies - 1846 Views - Last Post: 03 February 2013 - 01:34 PM
Replies To: Adding Blogger Comments to External Website
#2
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?
#3
Re: Adding Blogger Comments to External Website
Posted 03 February 2013 - 12:50 PM
modi123_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...
#4
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.
#5
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>
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote







|