Good news, comments and trackbacks are now working on the blog! I tried to get comments going yesterday, but making them happen via TypeKey was more work than I thought. I’ll explain what happened below plus some changes I’d love to see, in case it helps others.
I know, I know — I should just use WordPress, as everyone tells me. I did like the program when I tried it in testing things for the SEW Blog last year, but as I explained over there. However, I liked the Movable Type category structure at that time better. And since I use MT over there, I wanted to stay with what I know for my personal blog.
Anyway, I wasn’t going to do comments at all initially, because I simply don’t have time to deal with spam. But I love comments on blogs! Movable Type has an option where you can let people comment through free TypeKey accounts and automatically let those flow through. So I thought that would be a good starting point. Maybe I’ll still get spam, but I’m hoping having to sign-in to a system will slow that down.
So I tick off the option under Feedback in the Settings area to make this happen. I get my authentication token for the site and figure it should work. But it doesn’t. The forms I’m using from the default template — the “comment ready” forms as Movable Type’s help files explain, aren’t working.
Hmm. Hmm. OK, so I do a little searching at Movable Type. I come across this help file: Enabling TypeKey on Your Weblog. Midway through that, I discover this:
3.x provides a new tag which will generate all of the required comment posting logic in your template. You can use this tag to replace your existing comments form code:
<MTCommentFields static=”1″>
Here’s a thought. A little question mark symbol appears in the Feedbacks setting area to give you advice about various comment authentication options. It brings up this help page. How about mentioning the fact there that for authentication to work, you’ve got to make this change.
Anyway, I wipe out all — and I mean all — my code about comments and insert this. Then I try testing. Slick. Now I see this showing up:
You are not signed in. You need to be registered to comment on this site. Sign in
When I sign-in and return, a form appears. Cool. But then when I try to sign-in, I’m told my site hasn’t enable TypeKey. Huh? But I got my token from TypeKey.
Two things turn out to be responsible. Yesterday, the site still responded to both http://daggle.com and http://www.daggle.com separately. I used the former, but the CGI calls still used the www prefix. My token was for the non-www version, and that made a difference. I’d gotten the token initially by entering the non-www address manually. This time, I tried using the automated handshake system. Now TypeKey listed both domains as working.
Back to testing, and still failure! After a little poking around, it turns out that I needed a trailing slash after the domain name. IE, http://www.daggle.com/, where you enter things in TypeKey. Despite the handshake, this wasn’t added.
Testing again, now it works! I’m rewarded with seeing a form on the page after I sign-in. I can finally post. And so I try, only to return to the page and see nothing.
Now I assumed that the issue was that thing were getting confused again because of the two domains. So I pack it up for the night, asking my friend Rob over at TigerTech, which hosts my blog, if he’d take a look at changing the CGI calls to use the non-www domain and also 301 redirect any www calls over to the non-www to help avoid any canonical problems with Google.
Rob quickly did that, so it was back to testing today. I tried again and still no comments appearing. What’s going on? What’s going on is that I’m an idiot. Well, confused, perhaps a little forgivably. Above, I said I removed ALL my comment code and used that special tag Movable Type uses. I should have only removed the comment FORM code. I obviously still needed all the other code controlling the display of comments.
A little work later, and I’m in business. Comments are showing up just fine. But I still have some annoyances with the system.
First, I can’t control the message TypeKey itself puts in. Remember what it says to people?
You are not signed in. You need to be registered to comment on this site. Sign in
How helpful and user friendly is that? I want TypePad to allow me to customize the message. Since I can’t, I’ve gone the route of saying right above what TypePad says what I wish it would actually say. Specifically, I do this:
Want to comment? If you are signed into TypeKey, you’ll see a form below. No form? Click on the sign-in link below, and you can sign-in or sign-up for a free account. Sorry you have to use TypeKey, but I use it to avoid comment spam. All comments currently appear automatically after posting.
Second issue, I can’t control the form and message TypeKey inserts if you are signed-in. Currently it says:
Thanks for signing in, [person's name]. Now you can comment. (sign out) (If you haven’t left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won’t appear on the entry. Thanks for waiting.)
Ugh. If they are signed-in and see a form, then don’t tell them they can comment. It’s obvious they can. You’ll only see a form here if you CAN comment because you are signed in, so lose that text. Plus, I have things set right now so comments from TypeKey people automatically appear. That means I don’t need that big hunk of text telling them that comments “may need” to be approved. Instead, once again, I want to control exactly what TypeKey is writing to my blog.
Another annoyance is that the form starts off with a URL field, then the comment field. I want the comment field first. Then I want to explain the URL field, because it’s not clear what that will do. I want to say, “Fill out this form if you want to turn your name into a link back to your blog or web site.”
Anyway, that’s the story of getting things going. In case you’re curious, here’s the code I’m using. I probably don’t need all the div classes that are in there, but I don’t have time to clean it all out, at the moment:
<b><font size=”2″>Comments</font></b>
<MTComments>
<a id=”c<$MTCommentID pad=”1″$>”></a>
<div class=”comment” id=”comment-<$MTCommentID$>”>
<div class=”comment-content”>
<font size=”2″><$MTCommentBody$></font>
</div>
<font size=”1″>
<p>Comment by <$MTCommentAuthorLink default_name=”Anonymous”$> <$MTCommentAuthorIdentity$> |
<a href=”#comment-<$MTCommentID$>”><$MTCommentDate$></a>
</font>
</p>
</div>
</MTComments>
<p>
<font size=”1″><b>Want to comment?</b> If you are signed into
<a href=”http://www.sixapart.com/typekey/”>TypeKey</a>, you’ll see a form below.
No form? Click on the sign-in link below, and you can sign-in or sign-up for a
free account. Sorry you have to use TypeKey, but I use it to avoid comment spam.
All comments currently appear automatically after posting.
</font>
</p>
<p>
<blockquote>
<b><font size=”1″>
<MTCommentFields static=”1″>
</font></b>
</blockquote>
</p>
<MTIfPingsActive>
<div class=”trackbacks-content”><MTPings>
<MTPingsHeader>
<font size=”2″>
<p>
<b>TrackBacks</b><br>
</font>
<font size=”1″>
Below are other blogs linking or writing about this post:
</font>
</p>
</MTPingsHeader><div class=”trackback” id=”ping-<$MTPingID$>”>
<div class=”trackback-content”><p>
<font size=”2″>
<a rel=”nofollow” href=”<$MTPingURL$>”>
<$MTPingTitle$></a>:
<$MTPingExcerpt$>
(from <$MTPingBlogName$>)
</font>
</p></div>
<div class=”trackbacks”>
<div id=”trackbacks-info”><MTIfPingsAccepted>
<blockquote>
<p><font size=”1″>TrackBacks appear after approval. Trackback URL for this post is <$MTEntryTrackbackLink$></font></p>
</blockquote>
</MTIfPingsAccepted>
Also, I should say that there might indeed be a workaround to some of the issues I have with not being able to control the text. If there are, they just aren’t things I’ve easily found yet.
