Emoticon Module Tag
Smileys are graphical representations of commonly used "emoticons", such as :-).
When smileys are turned on, the system will display a small graphic of a smiley-face instead of the emoticon text, like this:
Showing smileys with your comments
In order to show a pop-up window containing smilies next to your comment form you must do several things:
1. You must create a template called "smilies" (or whatever you like).
2. In the template containing your comment form, add a link similar to this:
<a href="#" onclick="window.open('{path=weblog/smileys}', '_blank',
'width=300,height=400')">Smilies</a>
Note the "path" variable.
3. In your new smiley template, add the following Javascript in your html head:
<script language="javascript">
<!--
function add_smiley(smiley)
{
opener.document.getElementById('comment_form').comment.value += " " + smiley + " ";
window.close();
opener.window.document.getElementById('comment_form').comment.focus();
}
//-->
</script>
Then, use the following code to create a table containing the smileys:
<table border="0" width="100%" cellpadding="6" cellspacing="1">
{exp:emoticon columns="4"}
<tr class="row">
<td class="red"><div>{smiley}</div></td>
</tr>
{/exp:emoticon}
</table>
Note the "column" parameter in the emoticon tag. It allows you to specify how many columns of smilies the table will show.
ExpressionEngine will then automatically populate the table with all of the smiley images that you have in whatever directory you have specified as your "smilies" directory in the Admin > System Preferences > Emoticon Preferences section of the Control Panel.
Creating or Modifying Emoticons
Please see the Developer Documentation section on Emoticon Development
User Contributed Notes
To turn on and off emoticons, go to admin > system preferences > emoticon preferences. That’s it.
If you switch hosts, your emoticons might try to load from the old host. This is easy to fix.
From your control panel, simply click on admin -> system preferences -> Emoticon Preferences. You can enter a new path from there.
You must have an ExpressionEngine license and have attained a forum rank of "Lab Assistant" (100 posts) to contribute notes to the User Guide