Singpolyma

Technical Blog

Blogger Comment Permalinks

Posted on

Johan of Ecmanaut has pointed out on a couple occasions that Blogger’s ‘default’ comment permalink URL was POSTURL#cCOMMENTID. I had never found much proof of this claim, except for some default code in the blogger templates — but some of them (like the one mine is based off of) actually have the anchor that works set to the above, and the links themselves set to #COMMENID with no ‘c’… confusing that.

In some recent work I did on the XOXO Blog and in the creation of the Commentosphere Userscript I found out something very disturbing — this discrepancy extends beyond the template codes! Johan’s claim stems from the fact that the anchors on comment pages (those ugly things I partly avoid by my inline comments form) use the #cCOMMENTID format, and hence his commentblogging script (and my commentosphere script) both pull in this format when passing data to del.icio.us or commentosphere, respectively.

There is, however, a Blogger template tag (<$BlogCommentPermalinkURL$>) that is meant to output the entire permalink of a comment (including posturl), something I’ve been looking for for awhile to alleiviate the need for the ugly JavaScript hackery I have in my blog template to facilitate the same. This template tag, however, outputs using the #COMENTID format! If this isn’t confusing I don’t know what is — which one is standard, Blogger?

For now, I would reccomend using both. How? Change your comment anchor to read something like <a id=”c<$BlogCommentNumber$>” name=”<$BlogCommentNumber$>”> </a>.

7 Responses

Johan Sundström

Owww! For $Deity’s sake, Blogger; get your act together!

Pardon my exasperation. I just can’t help finding this very aggravating, as I had hoped they had been much better at this than they apparently seem to be now. The Blogger Backlinks code expects divs with plain number ids, without any prefix, to be the injection point of the number of backlinks for an entry. With the present look of Blogger’s backlink code, this must be standardized on to work anywhere (and everywhere).

That of course does not mean that they could not use the same name convention for the different purpose of naming comment targets in posts, only that it is less good than the standard I thought they hade decided on.

For practical purposes, I’ll keep acting as if Blogger standardizes on the #cN format, hoping it might help that become actual reality too. Not only as a way of trying to look consistent in the face of reality. 😉

Singpolyma

What I fail to completly understand as far as this particular case is concerned is why they would assume that for ID-fields, when ID cannoy legally start with a digit in valid XHTML…

Improbulus

Thanks for the heads up about that undocumented BlogID tag, and this one too, Stephen.

Commentosphere looks cool. Are you planning on doing a basic howto?

And by the way I like your hide sidebar idea, very neat. I may well borrow it..! 😀

Cheers
Imp.

Trev

It’s weird that there isn’t consistancy like that…might you want to write blogger?

Pieter Joubert

I can’t find instructions on how to hide the sidebar on blogger… help?

Jim

Adriaan check the faqs.

Anyhow this it is silly to have inconsistancies, they should choose one and stick with it.

Leave a Response