Retrofit Your MT3.x Templates With New MT4 Comments
I know this is kind of weird to post this here on Vox, but I didn't see this posted anywhere else and it wasn't exactly obvious for me to figure out. So, I hope this helps someone else.
Ok, so you just upgraded your Movable Type blog to MT4. You were using pretty much default MT3.x templates (especially the comments code). You're happy with how you blog looks and aren't really interested in overhauling your templates, but you would really like to make use of the new MT4 commenting features. Here's how I did it:
Create a New Blog for parts*
- put it somewhere like yoursite.com/test/ -- do not build it over your old blog
- really, you don't even need to publish it and you can delete it later
- below when I tell you to "Create template X" you will go to this blog to copy that template
Add Captcha Info to mt-config.cgi
- Add the following line (modified with your info):
- CaptchaSourceImageBase [absolute path to]/mt-static/images/captcha-source
- Example: CaptchaSourceImageBase /home/melody/www/www/mt-static/images/captcha-source
Change Blog Settings
- Your (old) Blog > Blog Settings > Comments > CAPTCHA Provider > Movable Type default > Save Changes
- Your (old) Blog > Blog Settings > Registration > [check boxes & save]
Create Index Template
- JavaScript
Create Template Modules
- Comment Detail
- Comment Form
- Comments
On Individual Entry Archive Template:
Remove from Head
- <script type="text/javascript" src="<$MTBlogURL$>mt-site.js"></script>
Add to Head
- <script type="text/javascript" src="<$MTLink template="javascript"$>"></script>
Remove from Body
- [all commenting code from <MTIfCommentsActive> to </MTIfCommentsActive>]
Add to Body (in place of above code)
- <$MTInclude module="Comments"$>
Save & Publish
*I know you can "Refresh Templates" but I think it much cleaner to
harvest parts, especially if you only want to update the comments.
Comments