Clickable smilies for your comments!


Finally took some time to adapt the Greymatter smilies mod to add clickable smilies to the Movable Type comments forms! If you go to leave a comment you'll see what I mean... and if you go to MORE... you can get more details on how it was done.

Last week I used Lynda's instructions to add smilies to this MT installation. So at this point, a directory containing my chosen smilies GIFs already exists on the server.

UPDATE 4/11/02: Not only are the smilies already uploaded to the server; just wanted to make it a little clearer that the entire mod from the link above is already done and installed on the server, including all updates needed to the file for both the entries and comments sections.

UPDATE 2/20/03: This page from Josh Cooper's site also explains the mods you need to make to and also provides a .zip of smilies.

Here is what I did to add clickable smilies to the comment entry form page. I made a backup copy of the default Comment Listing Template in case anything went wrong. Then, as the last item in the <HEAD> tag, these lines were inserted:

<script language="JavaScript">
function commentEmoticon(code)
   var cache = document.comments_form.text.value;

   document.comments_form.text.value = cache + " " + code;

The Post a Comment title starts with these lines:

<div class="comments-head">Post a comment</div>

<div class="comments-body">

Immediately following them, one entry for each smilie was inserted as follows:

<img alt=":)" onclick="commentEmoticon(':)')" src="" alt="smile" />

where :) is the key combination that produces :) which corresponds to the src file smile.gif (specified with its full path; in this example, the smilies subdirectory is in the images subdirectory which is in the default location of the MT installation).

After you have added one entry for each smilie you wish to use, and put in line breaks where appropriate, save the template and rebuild your files. You can also add this code to the Individual Entry Archive template if you have commenting available there.

UPDATE 2/20/03: I have not yet upgraded my main blog sites to Movable Type 2.6 but I understand you will need to check this thread from the MT support forums in order to make sure your smilies still work.

Hopefully this all makes sense; but if not, please leave a comment and I will try to explain whatever I didn't explain so well the first time around!


I keep getting an error or a million when I update!!!

:rolleyes: This is an older post but I hope you get this and can help. I've posted for help in the forum, but I guess I'm impatient. :blush: You've probably heard this a million times, but the smilies are showing up, but when you click on them nothing happens. I thought I did everything as you said here, but I just can't figure it out. :( Hope someone can help.


great site :lol:

very godo website
this website is cool :lol: :lol: :lol:

Hiya. Firstly, thanks for the hack.

But, it's not working for me. I've inserted the scripts, as instructed. I've uploaded my smilies. They show up, but when clicked, they just show up as the text :) or :smile:, not the actual smiley.

I've been reading about this file, but I have no idea what that is, where i find it or where it goes or how I modify it? And is that the only file i need to modify or are there others? I went to Lynda's site and read her instructions, but since it's for another program (pmachines), I'm feeling a little like it's in Chinese.

Help? Thanks!

Michael, you need to follow the link in the post to Lynda's site and her clickable smilies post to get the instructions on how to modify

Hi! Thanks for allowing me to this area. :) I am having a bit of trouble, however. It appears to work until the actual post, when [ex.] ": )" is processed; it's not displaying the image, rather just the ": )", itself.

I see Eve ^^up there mentioned modifying, but I'm not seeing any mention of the said modification in your directions. Perhaps I'm overlooking something?

Thanks for your time and any advice you may have to offer. :)

i cant get this to work on my site, i followed all your instructions, but when i click on my smilies nothing happens! it doesnt insert anything... please help, what am i doing wrong??? did i miss a step??

I love this smilie option! I'm going to try doing this...

Erik: Then there is a typo or wrong path somewhere in your code... these instructions combined with Lynda's instructions are running successfully here and on many other sites. You didn't leave an e-mail address or URL so I can't take a look at your specific site...

it didnt work for me... added the code and everything. but image just wont appear....
only the text smiley appears...

test :)

i need some help

Thank you so much! Works perfectly now!!

:( I keep getting an error when i update the file. have no idea what i am doing wrong. :(

Thank you soooooooo much!!!!! :lol:

Thanks for the code! Your directions were so easy to follow.

scratch that. The answer is yes. nothing like a little trial and error! Thanks for the Mod

My smilies won't render for some strange reason. do my strings for the clickable smiles and the post smilies have to be the same? that's the only thing I can think of that's not "right".

:D I got it working! Thanks for the mod!

Beat me later ;) Just read your prior post, am off to the forums to hunt up the thread. :blush:

Nope, can't make them work in the comment part of things... you mention.. "including all updates needed to the file for both the entries and comments sections."

I just finished reading her site... was the comment part in a different entry than the original smilie hack post? I did everything in her orignial smilie post, and it did replace the smilies... they all work in my entries, but I can't get this particular thing to behave... help? LOL

Ha! I was just reading the hack to put these little puppies in my post and wondering if they could be added like this to the comments section! Thanks so much, now my whole day will be spent adding these little suckers to my MT and hoping that it all works right :lol:

Ooh, I forgot to put in my #5! Either Fight Club or Brazil. So hard to chose just five! (Or seven in my case.) OK, since I've already gone over, I'll add a French movie, Delicatessen. There. That's my list now. :D

*makes note to self to send paul here to see this.

smilies ^_^

Hey Kathi? Can I hide under with you @ under radar? *brings teddy bear and blankie*

About this Entry

This page contains a single entry by published on April 10, 2002 5:40 PM.

Side trip... five movies was the previous entry in this blog.

Update... just a really quick one is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.