I decided to make a few changes in the blog. The first thing I did was made the comments appearable in-line. It required a few changes in the moveable type back-end.
I needed to add the ability to strip extraneous bits from the comment.cgi form. This was accomplished with a ‘raw’ parameter, that allowed it to remove code that fell within a <COOKED></COOKED> pair of tags. I also added in a ‘redir’ tag. This allows it to rediret the page somewhere other than the default redirect page – namely back to the homepage instead of back to the comments page as it is by default.
I was greedy, and wanted to add the ability to control output if there already were comments, so I added the <MTEntryIfHasComments> tag, which works quite nicely. I may need to add an inverse to this. This allows me to have entries on the main page that read Comments or Comments (<Number>)
Finally, and slightly annoyingly, I had to add a redirect to the proper hostname of my website, as the XMLHttpRequest open operator will not operate correctly cross domains (security feature for unsigned scripts). I have no intention of signing my scripts, so a simple javascript redirect is in place there.
Mozilla throws an exception if you try to cross-site execute and XMLHttpRequest, IE does a security confirmation and Konqueror (and probably safari) simply ignore the open request. annoying, but I suppose the have a point.
Things learned at this point
- XMLHttpRequest rocks!
- MT is a bit of a pain to customize
- IE caches more than it should – I can’t get the comments to reload.