Blogger Emoticons
========
Blogger Emoticons is an useful script that allows to display the emoticons (also called smilies) on your blog like Yahoo! Messenger. You can embed this script into your blog as a widget. It's standalone, lightweight and easy to use.
For a testing, please access your Blogger Dashboard, choose one of your blogs and start the setup process as bellow:
1. Add a HTML/Javascript element.
2. Put Blogger Emoticons script into.
3. Put the following line after what you paste down.
window.onload = talEmoti.run;
That's all. Now every special sign such as :), :D, :))... will be converted to the animate emoticons of Yahoo! Messenger.
Note : make sure that anything above are between a pair of <script></script> tags.
<h3>For developers:</h3>
The global object talEmoti has 2 public methods need to be concerned, <b>run</b> and <b>setEmoticon</b>.
- <b>talEmoti.run()</b>
Althrought named Blogger Emoticons, but this programm maybe work well on any webpage where you can embed JavaScript code into. Because it can scan a HTML page to find elements that have a class attribute set to one several possible values. That means you can use it on your Wordpress blog or your own website even.
To do that, you only need specify the class name of the HTML blocks which you want to parse, by providing some values as parametter of "run" methods. For example:
talEmoti.run(['CLASSNAME_OF_ELEMENT']);
or :
talEmoti.run(['post-content', 'post-entry-content', 'entry-text-content']);
The parametter of talEmoti.run must be an array. With Blogger blogs, usually you do not need to make anything. It's good enough for almost cases. But there are some Blogger template creators who change default class name of the related elements and talEmoti could not find out anything to parse. That time, you also must provide the exact class name to "run" method.
- <b>talEmoti.setIcon()</b>
If you are familiar with Javascript, you maybe also define a new emoticon collection from your owner icon library by using "setIcon" method provided by this programm.
The "setIcon" method has 3 parametters, 2 first values are required, TITLE is optional. Pretty simple to do this:
talEmoti.setIcon(SIGN, URL_TO_ICON, TITLE);
Every line for a defining.
Note : make sure that you call "run" method after defining.
To view list of emoticons supported by Yahoo! Messenger, go to here:
http://messenger.yahoo.com/features/emoticons/
Dong Nguyen
|