Blogger - how to edit comments
Saturday, July 09, 2005UPDATE please note that on New Blogger, rolled out fully in May 2007, you can no longer edit comments. I'm leaving this post up just for historical interest.
Editing comments posted using Blogger's own commenting system is impossible, Blogger say.
Well, no. It IS possible.The ingenious idea/insight comes from the one and only Truckspy, and this post is brought to you by the Truckspy/Improbulus Magical Sheep team...
[Edited 17 August 2005] So, to edit comments on Blogger there are three ways:
1. Edit an individual comment on a one off basis, or
2. If you use Firefox, use Browservulsel's Greasemonkey user script (for more information and instructions, please see this post), or
3. Add simple code to your blog template to produce an "Edit" link by every comment, effectively enabling one-click editing of any comment.
I'll start with the last - it's the neatest solution, and works for all browser types.
Finding out your Blog ID
Before you can do either, however, you need first to find out your blog's ID, a number unique to your blog. See this page for how. Note that down, better still copy it for easy pasting.Adding an Edit link to your template
For this solution you need to take one more preliminary step - find out your blog's admin and PID numbers. See this post for more info on how. (If you have enabled conditional new post links, you already have the info you need and you can just copy it wholesale).Next, you just add this code to your blog template (changing XXXXXXXXXX to your blog's admin number, YYYYYYYYYY to your PID number and ZZZZZZZZ to your blog's ID number) - you'll notice the first section is what you use for conditional new posts on Blogger:
<span class="item-control admin-XXXXXXXXXX pid-YYYYYYYYYY"><a href="http://www.blogger.com/post-edit.g?blogID=ZZZZZZZZ&postID=<$BlogCommentNumber<span class="item-control admin-XXXXXXXXXX pid-YYYYYYYYYY"><a href="http://www.blogger.com/post-edit.g?blogID=ZZZZZZZZ&postID=<$BlogCommentNumber$>">Edit Comment</a></span>amp;gt;">Edit Comment</a></span>
(Of course you can change the "Edit comment" link text to just "Edit", or "Edit this sucker", or whatever you like!)
That's it. When you are logged in to Blogger and then view your blog, in each individual post (but only on the post page/item page for the post, depending on how you've got your template set up) you will see, against each comment, not only the usual Blogger "Delete" icon, but also a new link "Edit Comment".
When you click that link it calls up a page which looks just like Blogger's "Create post" form, with the existing comment text in the box where you'd usually write your post. (The comment box even has a "Title" textbox above it but neither Truckspy nor I can figure out what it's for, filling it in doesn't do anything, but (at least in Firefox) if you have the title field cursor active as if you were going to type something in the Title box, and hit enter on the keyboard, it seems to delete the entire comment - so best not to go click in or otherwise go near the Title box!).
Edit the comment to your heart's content, then click Publish Post, and voila - comment duly edited. BUT BE WARNED THAT YOU TRY THIS AT YOUR OWN RISK - IT IS REALLY, REALLY EASY TO ACCIDENTALLY DELETE A COMMENT EVEN WHEN YOU DON'T THINK YOU'VE GONE NEAR THE TITLE FIELD, so if you've clicked "Edit Comment" just to experiment and you have no intention of deleting that comment, publish it with the existing text anyway when you're done, or close that window without doing anything. So don't say I didn't warn you - I've gone and accidentally deleted one comment myself, today (sorry, Otis!).
You'll notice that if you view your blog without being logged in to Blogger, you won't see the Edit Comment link (or Delete link) - and neither will anyone else reading your blog. Which is the point of the admin and PID bits; you don't want other people to see the Edit Comment link (even though they shouldn't be able to do anything with it unless they're logged in with your proper login/password, it's just neater to hide it from those who can't use it).
One-off editing
The manual way, if you want to edit a single comment without tweaking your code, is first to make sure you're logged in to Blogger, then go to the post page with the comment you want to edit, then view source.Find that comment in the view source. Towards the start or end of the comment, depending on how you've got it set up, there will be a long number hidden in the code, something like <a name="AAAAAAAAAA"> or <a href="#AAAAAAAAAA">. Note that number down or ideally copy it to your clipboard. It's the "Post ID" for that comment.
Next, go to this URL (where ZZZZZZZZ is your blog ID that you already found out earlier, and AAAAAAAAAA is the number you just noted down, the post ID):
http://www.blogger.com/post-edit.g?blogID=ZZZZZZZZ&postID=AAAAAAAAAA
Or, you can just fill in the blog ID and post ID in the form below and hit the Edit Comment button:
And it will call up the page I mentioned above, which looks like a Create Post page but actually enables you to edit and save the comment text.
Again try this at your own risk - you have to be really careful you don't accidentally delete the comment, as mentioned before, no comeback on Truckspy or me if you do!
[Edited 17 August 2005] Finally, for the method using a Greasemonkey script for Firefox, which just involves a few clicks to install the script, see this post.
UPDATE please note that on New Blogger, rolled out fully in May 2007, you can no longer edit comments. I'm leaving this post up just for historical interest.
Technorati Tags: Edit posts, editing posts, Blogger, Blogger.com, tip, tips, trick, tricks, hack, hacks, template hacks, blogging tools, tools, blogging, blog, blogs, blogging, weblog, weblogs, introduction, guide, tutorial, addons, blog addons, blogging addons, blog add-ons, blogging add-ons, Magical Sheep, Improbulus, A Consuming Experience, Consuming Experience
« Home | Previous Post »







Links to this post on:
Create link here by posting on Blogger
44 Comment(s):
As usual, a very helpful post. Thanks.
(By
SatishTalim, at 10 July, 2005 02:12)
Edit Comment
That's so cool! I always wondered if I could do that. Now to find the time and try it....Thanks again for another useful post :).
(By
ChickyBabe, at 10 July, 2005 06:12)
Edit Comment
Thank you, that's a very helpful post. I used it immediately.
(By
Steve, at 10 July, 2005 18:39)
Edit Comment
dang.. but wut a pain to do.. you would think blogger would have this huh? i really like their cmt system too.
as usual though top notch post.
(By
TaB, at 12 July, 2005 08:52)
Edit Comment
Thanks for the comments. You can blame Truckspy for this post!
Absolutely right Tab, Blogger should have this built in.
(By
Improbulus, at 14 July, 2005 08:59)
Edit Comment
Thanks Improbulus, that's a very helpful one..
BTW it would be nice if you could find out how to list all the comments that i have made in other blogger blogs, so that i can keep track of them.
Am i demanding too much...?
(By
Sudar, at 15 July, 2005 06:31)
Edit Comment
Hey! This is a really useful and cool tool. I just tried it out and it worked great! I'm going to bookmark this page immediately. Thanks a lot!
(By
mumsgather, at 26 July, 2005 09:48)
Edit Comment
great tip
I use it all the time
(By
andrew landeryou, at 03 August, 2005 10:52)
Edit Comment
Glad you like it, Sudar, mumsgather and Andrew, thanks for the comments.
Sudar - it would be good, what you suggest, but I don't know how yet. May get Truckie on to it! :-D
(By
Improbulus, at 07 August, 2005 14:05)
Edit Comment
Yes Sudar..you are demanding too much. :-)
From everything I know about it that would be impossible ( I hate to use that word but ) the way things are setup with Blogger as of now.
(By
RedRyder, at 08 August, 2005 04:00)
Edit Comment
If Lord Truckie says it, then believe it! Sorry Sudar, maybe if enough people have requested it in their recent survey, Blogger might introduce it...
(By
Improbulus, at 29 August, 2005 17:29)
Edit Comment
Have you seen the nifty <$BlogID$> template tag that gets rid of the need to enter BlogIDs manually?
RE: tracking comments in blogger blogs -- nothing automatic to do stuff like this has ever crossed my path -- hence the creation of Commentosphere, who's purpose this is
(By
Singpolyma, at 09 January, 2006 13:03)
Edit Comment
Thanks singpolyma, very handy to know that, and it's not documented in the Blogger Help.
Commentosphere is a cool idea too.
(By
Improbulus, at 14 January, 2006 17:29)
Edit Comment
Ermmm... This might sound weird but can I know where exactly in my template I'll have to add the script to make it work? I've tried many times but to no avail. Still can't get it to work :(
(By
noir169, at 17 March, 2006 00:55)
Edit Comment
Hi noir169, sorry for the delay, have been exceptionally busy of late.
You just add the script between the <Blogger> and </Blogger> tags, by the code for the comments - I have mine just after the <$BlogCommentDeleteIcon$> code, if that helps?
(By
Improbulus, at 26 March, 2006 00:12)
Edit Comment
I've put the code into my template exactly where it was explained in the above comment but it isn't working. Any idea why? ~Sharon J
(By
Sharon J, at 27 March, 2006 13:30)
Edit Comment
Sharon, I don't know why, but I can't see it in your template. Are you sure you saved the template AND republished it after adding the code, and did you doublecheck that you definitely entered the correct PID number and blog ID number for your blog?
(By
Improbulus, at 28 March, 2006 00:39)
Edit Comment
Excellent tips thankyou. It did take me a while to find the right id numbers but got there in the end! I do have greasemonkey script for this but it doesn't always work. Now I can edit the the comment to reply directly to it!! I'll be linking this page and posting about it tomorrow (today is wordless wednesday!!)
(By
debambam, at 29 March, 2006 01:52)
Edit Comment
Glad to have been of help debambam and thanks for the link (on Talkative Thursday, I presume)!
(By
Improbulus, at 30 March, 2006 09:23)
Edit Comment
Sorry. I took it out again when it wasn't working. I'll have another go when I get the time and come back to you. Thanks. Sharon
(By
Sharon J, at 21 May, 2006 12:54)
Edit Comment
Good luck with that then Sharon, let me know how it goes.
(By
Improbulus, at 29 May, 2006 21:08)
Edit Comment
can I edit this?
(By
Anonymous, at 05 June, 2006 02:56)
Edit Comment
Anon, there are only 2 ways to edit comments made on a Blogger blog.
1. You sign up for a free Blogger account (you can use it just to comment on other blogs, you don't have to start a blog yourself). When you want to comment on a Blogger blog, you should sign in to Blogger first and comment via that ID if you want to be able to edit the comment. Then in future, when you go back to that comment, you will have the option to delete it via the pencil icon.
2. You have your own Blogspot blog and have follow the instructions above. Then you can edit comments that anyone (including yourself) have made on your own blog. The person who wrote the comment still can't though, unless it's you, or unless they made the comment via Blogger, signed in.
Hope that helps.
(By
Improbulus, at 09 June, 2006 09:03)
Edit Comment
Hi Improbulus,
I added your script and it works beuatufully. Thanks a lot for the detailed explanation.
(By
Priya, at 15 June, 2006 04:47)
Edit Comment
Thanks for your comment priya, glad it works for you!
(By
Improbulus, at 08 July, 2006 17:18)
Edit Comment
hey improbulus. i'm also having the same problem gettin this to work.. in one of my blogs, when i put this tag next to <$deleteicon$>, it doesn't appear, and same happens with another blog.. but in the first blog, when i put it next to <$backlinkdeleteicon$> it works. n in my second blog, there's no backlink tag.. please can u help me solve this problem.. my blogs are www.testmatsoc.blogsot.com and www.matsoc.blogspot.com . i'll be puttin the tag without the span so that if atall, its visible to you as well.. though it might not work.
Aniket
(By
Àñìkét §®ívá§tàvâ, at 31 July, 2006 00:05)
Edit Comment
This is just SOOOOOOOOOOO cool! Thanks. I've been trying to make my own, and to no avail. I've done google searches for hacks of this sort, also to no avail!
I've wanted to have a 'reply' button so I can go in and 'reply' to the comments. And this just works perfectly.
Thank you, thank you. From the bottom of my heart.
(By
Wystful1, at 06 August, 2006 20:32)
Edit Comment
Aniket, the first blog whose URL you gave doesn't seem to have the edit comments code in it at all. The second blog seems to have the correct format of code so I don't know what to suggest. Perhaps you could try Blogger Forum, which has more people with lots of good ideas? Have you tried the Greasemonkey userscript for editing comments?
Wystful1, thanks for your comment, glad you found this useful. Sadly it doesn't seem to work for the new Blogger Beta, but we'll see if a way round that can be found...
(By
Improbulus, at 24 August, 2006 22:27)
Edit Comment
"For this solution you need to take one more preliminary step - find out your blog's admin and PID numbers. See this post for more info on how."
Well "this post" doesn't explain that, at least in any kind of obvious way. Help! Thank you.
(By
Newbie, at 10 September, 2006 14:26)
Edit Comment
OK so I'm a little slow but I finally figured it out.
Very handy item! Thanks!
(By
Newbie, at 10 September, 2006 21:04)
Edit Comment
Is there any way to edit posts on others owned blogs?
I stupidly signed a comment with my flatly writed email address and would correct in order to avoid spamming...
thanks
please reply to:
error { at } interfree { dot } it
(By
Anonymous, at 24 November, 2006 10:21)
Edit Comment
Newbie, glad you figured it out!
Error, sorry I don't think so - if you're logged in, on some blog platforms maybe you could edit, but most just let you delete (if you're logged in), if at all - not edit. That's why it's good to be logged in when you comment. Plus with the new Beta they've closed the editing loophole so NO one will be able to edit comments, not even the blog owner. (And I no longer reply by email.)
(By
Improbulus, at 26 November, 2006 18:49)
Edit Comment
Hello
It doesn't works in blogger beta.
thanks, bye.
(By
linus, at 31 December, 2006 10:28)
Edit Comment
Hi Linus, no sadly it doesn't work in Beta as I said at the end of this post. Blogger have fixed it so that the blog owner can no longer edit comments, or at least made it more difficult to figure out how to do it! Which many people would say has to be right as arguably the owner shouldn't be editing other people's comments.
What I'd like though is to be able to edit my own comments, with maybe a short time window after posting in which to do it in, see this post.
(By
Improbulus, at 01 January, 2007 11:22)
Edit Comment
Donn't in 'New Blogger'. :(
Is there any workaround for New Blogger.
(By
Shrish, at 31 January, 2007 23:29)
Edit Comment
Shrish, Blogger Beta is now New Blogger and as mentioned on that, no, I don't know of any workaround, sorry.
(By
Improbulus, at 03 February, 2007 19:47)
Edit Comment
Hi, is there a way to track anonymous comments? maybe get an IP address? seems not doable from the users end though would be helpful for some
(By
rdcimafranca, at 28 August, 2007 09:12)
Edit Comment
rdcimafranca, I don't know of any, sorry. Bloggger may well track their IP addresses but they don't make it available to us users as far as I know.
(By
Improbulus, at 28 August, 2007 20:46)
Edit Comment
i could not find out what admin-XXXXXXXXXX should be replaces with on that page, i tried my blogger (admin) login id and then cu and paste the code before the </body> in edit template and get:
Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly.
XML error message: The reference to entity "postID" must end with the ';' delimiter.
How can I get this working? Thanks.
(By
boardtc, at 17 September, 2007 14:02)
Edit Comment
Boardtc, unfortunately there's no point looking for the correct admin- number in this case, as Blogger no longer allow editing of comments - they've closed this loophole. I've updated the post to make that clear.
(By
Improbulus, at 18 September, 2007 22:17)
Edit Comment
Very useful blog. But please help me, can i put a commentary form in my blog http://famouspharaohs.blogspot.com
(By
Anonymous, at 01 August, 2008 18:28)
Edit Comment
going well ....Blogger Beta is New Blogger and it have to more facility then older one...
(By
SEO Pune, at 23 January, 2010 11:40)
Edit Comment
Can't make the manual one work=(!!
(By
Rukhpar Mor, at 22 March, 2010 14:44)
Edit Comment
Works Great on my Blog!
Took a while to get it working, but now it's working great.
Thanks, so much!
(By
Slim, at 31 March, 2010 20:09)
Edit Comment
Post a Comment | Subscribe to all comments on all posts