!! This tutorial has not been updated since movable type version 2. It is most likely obsolete !!
So you want smilies in your MT blog and comments?
Requirements:
-- Movable Type, version 2.5 or higher
-- MT Plugin, MTMacro
1. First, you'll need to get the smilie graphics that you want. Save them all in a folder on your website.
(Here are a couple of good Smilie Websites: Crack Smilies, Smiling Faces, Mood Smiles )
2 . Download Brad Choates MTMacro and install it. (Here's a tutorial on how to use MT Macro to autolink frequently used text in entries! It's VERY handy!)
3 . Open up MT, go to Templates, and at the bottom of the page, Create a new Template Module and call it smilies. Open it up to modify it.
4 . Then comes the fun part. For each smile you want available on your blog and comments, you'll need to code this (So if you want to have 20 smilies available, you'll need to have this code in the smilies template module 20 times):
[code]
[/code]
We'll go through this piece by piece.
name="______" (Put what you want to call the smilie. I always call it the same name as the graphic. So if my graphic is wink.gif, I put wink here.)
string="______" (Put what you want to use to call it in your blog. Then, whenever you type that specific phrase, it will replace it with the corresponding smilie. I used : : around all of my smilies, just in case I actually used some of the words that my smilies were called -- with the : : surrounding it, you know the smile is only going to show up where you want it to)
img src="_____" (I put the full URL of my smilies in. It's safer that way!)
5. This is all that goes in the template module. So save it and go back to the templates main page.
6. Now you'll need to modify each template (main, archive, comments) that you want to have the smilies work on -- which will basically be all of them, unless you don't mind your smilies not showing up on archive pages, etc. Open up each template either in MT, or in your outside editor, and place this line directly below your body tag:
[code]
[/code]
7. Now you'll need to edit each of these tags:
(In your main and archive templates)
Change <$MTEntryBody> to
<$MTEntryBody apply_macros="1"$>
Change <$MTEntryIfExtended> to
(And in your Comment Listing Templates)
Change <$MTCommentBody> to
<$MTCommentBody apply_macros="1"$>
(And in your Comment Preview Template)
Change <$MTCommentPreviewBody> to
<$MTCommentPreviewBody apply_macros="1"$>
8. Now you can finally rebuild.
9 . Blog a new entry and test out a smilie, to be sure it's all working properly. Then Comment on that entry and test out the smilies there.
Now you need to set up clickable smilies in your comments (so that visitors can see the graphics, click them and smilie will be added to their comment.) Just follow these quick instructions:
Add this javascript in the head of your comment and preview comment templates:
[code]
[/code]
Next ... right above the message area in the comments, add in this code. For each smilie that you want available in your comments to be clicked, code this line:
[code]
[/code]
Here's a sample of how I've got the form in my comments listing template set up:
[code]