mahiwaga

I'm not really all that mysterious

notes on remotedotcomments

I was using remotedotcomments for the commenting system on my old blog. Since I know nothing about PHP and since dotcomments itself is no longer supported by the author (the last update was 2 years ago), while Phil Ringnalda—who is responsible for the remotedotcomments kludge—is very responsive with regards to support, I installed it despite my host supporting PHP directly. It is basically a Javascript client side include kludge which some fancy DOM manipulation for the comment count that I don’t understand. This makes it perfect if you want to keep your blog on blogspot.com, but have access to another site that allows PHP. (Why not just move your blog to the site that supports PHP in the first place? Well, inertia—or pure laziness—is a powerful force, I guess. Plus, cool URI aren’t supposed to change.)

Now that I’ve started using Blosxom with the writeback plugin enabled, I don’t really need dotcomments anymore, but since I’ve been playing with Blogger lately, I decided to keep it around.

Phil Ringnalda has pretty good instructions on how to install remotedotcomments although it is not exactly plug and play. The most common problem seems to be failing to set the permissions on the comment subdirectory properly (while more restrictive permissions may be possible, chmod 777 should allow it to work.) There is also a caveat now that Blogger has switched to a new system, particularly with regards to the unique blog item ID. The ID is actually being interpreted as a number by Javascript, and the new IDs are getting rounded, resulting in problems with saving comments and in counting comments. The work-around is really simple: add quotes to the function call.

In a Blogger template, this is the critical line to change (usually where your byline would be placed, in the <Blogger> section):

instead of: <a href="javascript:viewComments(<$BlogItemNumber$>)"><span id="comment<$BlogItemNumber$>">comment</span></a>

do this: <a href="javascript:viewComments('<$BlogItemNumber$>')"><span id="comment<$BlogItemNumber$>">comment</span></a>
(Note the single quotes in the function call)

(I found this solution in the comments to the remotedotcomments page, which has swollen to 366 comments at the time of this writing.)

initially published online on:
page regenerated on: