« MTDynamic v0.6 (Beta) | Main | BlacklistStats v0.5 Beta »

MT Smileys

There are a number of different implementations of Smileys :) for Movable Type. Here's mine.

The smilieys that I use on most of my sites display in both the entries and comments. The smileys images and javascript are borrowed from phpBB. For comments, the smileys are displayed above the comment form, enabled the comment author to click on a smiley to include with their comments.

Instructions

1. The MTMacro plugin is required for the smileys to work. If you don't already have it, click here to get it.

2. Download the smiley images and templates: mt-smiley.zip

3. Upload the smiley images to a folder called "images". This folder should reside within the local site path of your blog.

4. Create a Template Module called "smiley javascript". (If you have never created a Template Module before, go to your Templates page, and scroll all the way to the bottom, below the Miscellaneous Templates). In the body of the "smiley javascript" Template Module, cut and paste the text from the "smiley-javascript.txt" file.

5. Create a Template Module called "smiley macros". Cut and paste the text from the "smiley-macros.txt" file into the new template module.

Note: If you want to place the smiley images in location other than an "images" subfolder of your blog, you need to edit the path of each "img" tag in this module.

6. If you want to display "clickable smileys" above your comment submission form, create a Template Module called "smileys". In it, cut and paste the text from the "smileys.txt" file.

Note: If you want to place the smiley images in location other than an "images" subfolder of your blog, you need to edit the path of each "img" tag in this module.

7. To make the clickable smileys appear on the comment submission form, open your comment listing template. Within the <HEAD> tags, cut and paste the following:

<$MTInclude module="smiley javascript"$>

Now find the line that reads:

<label for="forget">No</label>

After that line, cut and paste the following and save the template:

<br /><br />

<$MTInclude module="smileys"$>

8. To make the smileys appear in entries and comments, add the following line to the top of every template where you want smileys to show (ie. Main Index, Comment Listings, Comment Preview, Individual Archives, etc.):

<$MTInclude module="smiley macros"$>

9. To apply the Smiley Macros to your entries and comments you need to enclose them with MTMacroApply tags. For example, for entry text you would edit your templates as follows:

<MTMacroApply><MTEntryBody></MTMacroApply>

And for comment text:

<MTMacroApply><MTCommentBody></MTMacroApply>

10. Rebuild your site.

And that's it - 10 steps to MT Smileys. Let me know if any of that didn't make any sense. :) :) :)

Rate this entry:

  • Currently 3.6/5
  • 1
  • 2
  • 3
  • 4
  • 5
Rating: 3.6/5 (152 votes cast). Powered by the Ajax Rating plugin.

TrackBack

TrackBack URL for this entry:

Listed below are links to weblogs that reference MT Smileys:

» Lessons in MT Smileys from Mama Write's Sideblog
Lessons in MT Smileys... [Read More]

» Smile When You Say That! from Mama Write's Sideblog
MT Smileys is a 10-step tutorial to add smiles to a blog. Seems simple enough.... [Read More]

» http://www.twhgrafx.com/help/archives/001248.php from Movable type resourses
MT Hacks MT Smileys MT Smileys... [Read More]

» psp video games free shipping from psp games
sony games downloads [Read More]

» Duwir's Formmailer from Duwir's Formmailer
Das E-Mail-Form kann auch z.B. in Foren verwendet werden. [Read More]

Comments (18)

Amy:

I love the smiles! The only thing is the clickable smiles arnt showing up on my comments page. I put all the images in my images folder.

Thanks for pointing that out Amy. I have made a small adjustment to the "smileys.txt" file. It should work better now.

(I also emailed you the new version of the that module) :-)

Amy:

Now it shows the images, but when you click on the smile, it doesnt do anything. There is also a '):> next to every face.

The Macro is being applied to the code in the smiley links - this is a bad thing. On your Comment Listing template, make sure that only your MTCommentBody tag is enclosed by MTMacroApply tags, like this:

<MTMacroApply><MTCommentBody></MTMacroApply>

Amy:

My smiles are showing up everywhere except in my monthly archive page? What do i have to do to the archives.html template to get them to show up?

Well, the Master Archives page usually just lists entries with a link to each. I'm not sure how you would want to use Smileys there, but the general rules are:

1. If you want tu use smileys in a template, be sure to include <MTInclude module="smiley macros"> at the top.

2. Enclose which ever tags or text that you want MT Smileys to convert to smileys with <MTMacroApply>text or MT tags here</MTMacroApply>

Anonymous:

:blush: :evil: :twisted: :roll: :wink: :cry: :lol: :o :-(

Hey, how did you manage to tuck the smileys right under "Remember personal info?"?

I'd like to do that instead of having them under the URL field.

Thanks,

Vic

Screen Rant,

See step 7 above. I just checked your pages -- you need to put the smilies immediately after the </label> tag as described above. It needs to be before the <br style="clear: both;" /> part.

Mark,

Thanks very much! I had to insert a couple of extra line breaks, but it looks much better now. :D

Vic

Do you have any tips that you could share on how to add the smilies to the MT Entry screen. I'd like to use them in my posts as well.

Thanks in advance.

Wow! It worked the first time. I had to think hard exactly whether "top of every template" meant within the [head] section or within the [body] section.

I made a little text file to keep handy with the shortcuts to type in post entry fields, but it would be nice to have the smileys in clickable form on the MT entry somehow, but that probably requires a little more geekery than I'm willing to tackle. I'll stick it in a code area on my blog.

Thanks again.

I can get the smilies to work on my index, but they will not work on the individual pages. As soon as I add the to the head of the page I get this:
~~~~~~~~~~~
Smarty error: [in evaluated template line 1]: syntax error: unrecognized tag 'MTMacroDefine' (Smarty_Compiler.class.php, line 556)
~~~~~~~~~~~~

Is this because I'm using dynamic publishing?

Yes. The MTMacro plugin that is used my MT Smileys works only with static publishing.

Thanks for the quick reply.

:cry:

I wonder if there is a way to do smilies with dynamic publishing...back to the drawing board.

Anonymous:

:twisted: :roll: kk :o

ray:

hi this is great! :x :P :evil:

helene:

will this work with MT 4.0?!?

Post a comment

Gift idea: Buy Seinfeld DVD box set, complete 9 seasons!