Sunday, June 1, 2008
Inline comments on blogger with i-frames. Not the greatest of hacks, but pretty good, I must say. Now, "you can customize your blogger template to show comments form on the same page like wordpress "
Here is how to add it on your blog. ( Save your template in case things don't work as expected and you want to revert back )
i) On blogger layout menu, choose 'Edit template HTML' and select 'Expand Widget Templates'
ii) Find and replace
<b:include data='post' name='comments'/> with
<b:include name='inlineComment'/>
iii) Paste the following code-fragment where all the "includable" sections are located.
<b:includable id='inlineComment'>
<iframe expr:src='data:post.addCommentUrl' frameborder='0' height='700' scrolling='auto' style='background:white;margin-top:-10px;margin-bottom:10px' width='100%' longdesc='http://blogger-station.blogspot.com/2008/06/blogger-inline-comments-hack.html' title='blogger inline comment (blogger-station.blogspot.com)' />
</b:includable>
If you are unsure, paste it just before
<b:includable id='post' var='post'>
iv) Save template and change the following blogger settings for comments:
Show comments in a popup window --> yes
The popup style comments structure is ideal for inlining the comments with the blogger post.
Show word verification for comments --> no
Word/ visual verification doesn't seem to work on IE ( the image doesn't show up in my browser IE7 ), however, disabling this option can increase comment spams on your blog by automated systems.
That's it !! you are ready to go....
There's still much left to be desired....
The comments are best visible on a white background. (can't do much about it, since the comment page has its own styling)
The comments form will appear only on individual URLs/ posts. (by design, I have set it to appear on pagetype=='item', and hence it won't appear on home page, archives and posts-by-labels; comments will still appear on a popup window for these pages)
I Wish someone could fiddle with javascript to destroy the 'close this window' span element located on top-right of the comments form ( though it is dysfunctional ). I might as well dabble in CSS to overlap the span with some element at a later date.
If you think you like the hack even with the shortcomings, leave me a feedack comment.
Labels: BLOGGER HACKS