WordPress Yahoo/MSN Messenger Style Smileys Plugin
This plugin lets you use Yahoo! Messenger or MSN Messenger style smileys on your post, excerpts and comments. It replaces the built in Wordpress smilies. I created this plugin because commenters are probably more used to IM smilies than the WordPress built in smileys, especially for the more obscure ones.
Features
- Lets you use either Yahoo! Messenger or MSN Messenger style smileys instead of the built in WordPress smileys.
- Adds the correct
widthandheightattributes in smileys. In addition it also adds the smiley in bothtitleandaltattributes, i.e. it shows the smileys code when you hover on any smileys.
Compatibility
WordPress 1.5.
Instructions
- Download the smiley image files: smilies2.tar.gz.
- Extract it in your Wordpress installation directory. It should create the directory ’smilies’ with MSN and Yahoo! smilies in it.
- Download the plugin: im_smiley.txt.
- Edit the plugin file. Near the top of the file, you can choose whether to use Yahoo! or MSN style smileys. You can also choose to enable Javascript smiley replacement function.
- Save the file as ‘im_smiley.php’ and put it in your
wp-content/pluginsdirectory. - Activate the plugin from your Wordpress Plugins administration menu.
- Go to Options - Writing and disable “Convert emoticons like
and
to graphics on display”. - (optional) You can change how the smileys look in your CSS by modifying style for selector
img.wp-smilies. In my case, they look best with:img.wp-smiley { vertical-align: -25%; } - (optional) If you enable Javascript smileys, you can use Javascript code
text smiley_convert_text(text);in order to process smileys inside Javascript code. Useful if you are using Javascript based comment preview. See the source of this page for more information. - (optional) If you enable Javascript smileys, you can use clickable smileys, just put
< ?php smilies_clickable() ?>next to your comment textarea. - (optional) If you are using both Javascript comment preview and clickable smileys, you may wish to specify Javascript function that refreshes comment preview so that the comment preview will be properly updated when clickable smileys is being used. To do this, edit
im_smiley.phpand edit the variable$js_reloader. Mine is$js_reloader = "ReloadTextDiv();";.
Known Bugs
- False positives, especially in program listing. Unfortunately this is very hard to avoid. Let me know if you have an elegant solution to avoid this.
- Sometimes, smileys appear in posts but not in comments. Possible incompatibilites with WP 1.2. Need more reports from 1.2 users.
Absolute path problem, smileys don’t appear in blogs located not in web root.- Javascript based smileys doesn’t work in Konqueror

Credits
Yahoo and MSN smiley images were taken from Gaim source code. Some code are borrowed from Wordpress original smiley code.
Changelog
1.0:
- First release
1.2:
- Fix bug with smileys which substring matches another smileys
1.4:
- Partially fix bug with smileys containing &, < or >
2.0:
- Bring smileys through balanceTags safely
- Fix < on smileys being treated as start of tag
2.1:
- Various cleanups
3.0:
- Hopefully fix absolute path problem
- Javascript based smiley replacement! Useful if you are using Javascript based comment preview.
3.1:
- Fixed smileys not showing on text below ‘<!–more–>’, tricksy regexes!
3.2:
- Fixed problem with Javascript and blogs located not in document root directory. Thanks to Ronny
4.0:
- Fixed smileys with <, > or & not showing in comments
- Clickable smileys! Thanks to Ronny
4.1:
- Fixed problem with smileys containing backslash in clickable smileys
4.4:
- Updated Yahoo! smileys to version 7.0 of Yahoo! Messenger. Thanks to Sy41ful, basibanget.net, Mark Sellers, and maybe others I can’t remember.
Examples
![]()
kalo emotikon ini ada ga?
*tes emotikon*
wah ada, besok beneran pasang ah
*junk emotikon*
weks, bugs emotikon tuh?
*loh kok jadi junk posting*
OK, bugnya udah dibenerin
ntar ikutan pasang aaaaah
wahhh.. rajin banget bikin plugin? hehe..
wah ternyata lumayan ya …

eh pri, comment preview loe bikin lemot abis nih
ngejunk ah….
[…] er Style Smileys Sunday February 27th 2005, 1:42 pm Filed under WordPress Plugins This plugin lets you use Yahoo! Messenger or MSN Messen […]
Eh, ada comment previewnya juga
. Emoticonnya gak muncul ya di comment preview? (Banyak maunya deh)
Lucu, Pri. Lagi plugin-frenzy ya pak?
waaah keren lho bisa implement smilies Yahoo kayak gitu
*ngetes smiley:
*
[…]
2005-02-28 Yahoo/MSN Messenger style smileys plugin Filed under: Skills A interesting plugin was released on Priyadi’s Plac […]
Nurudin Jauhari sedang
kadang juga
, sekarang sedang
enak tenan
Sweet
[…] WordPress Yahoo/MSN Messenger Style Smileys Plugin I was use great Plugin from Priyadi, I hope with this great plugin smiley I can som […]
emoticon yahoo kayaknya emang familier nih
Horeee!! Keren-keren
Test ah..
X-D :-
test 1 2 3
nice ! plug in !!! nice nice !!
add me as your friend please…
makasih !
wow keren….very useful

Bahhhh asyik juga nih
kok di comment sayah gak nongol yah smile nya ?

just testing to see if they work
ok I see them in everybody else’s posts but not mine?
Where are they?
and I cant see them on my blog either. I copied the .txt file, saved it as a .php file, left the yahoo smilies as active, uploaded the smilies folder to the root of my site, activated the plugin and disabled the bit in options. They are nowhere to be seen.
What have I done wrong?
Jewel,
The problem is on the site path.
1. Upload the images folder under the plugins directory (/wp-content/plugins/smilies)
2. Look for the following tag in the php file:
// generates smilies’ search & replace arrays
3.On both tags existing there, define /wp-content/plugins/smilies/$img’ alt=’$smiley_masked’(and son on) as the SITEURL.
Please see MSN smilies working on my blog
.
[…] Smileys! You can now use Yahoo! style smileys to comment on this blog thanks to this plugin! They look kinda eh but they all work, and […]
#30, #31: the path problem is hopefully fixed in last version
OK: I have now downloaded version 3, copied and pasted it into a text editor, and resaved it as a.php file. I uploaded that to my plugins folder. I uploaded the smilies folder to the root of my webspace (jewelswebgraphics.com/smilies) activated the plugin and deactivated the convert stuff in options. Still absolutely nothing. Also, everyone else has posted smilies here, but I dont see any. All I get is the plain comment window. Any ideas please? (sorry to be a bore, but I do like these smilies and think they would be good for the users on my blog who use MSN and like that sort of stuff.)
#34: Which wordpress version? On my friend’s blog which uses 1.2, smilies appear in posts but not in comments. If that’s the case then the 1.2 bug is still there. Unfortunately I no longer use 1.2. So, consider this plugin as for 1.5 only unless somebody can send me a fix
I am using 1.5 actually. (but why dont I get the chance to use them on your blog when writing a comment?)
#36: I don’t know, I can use smileys here just fine
I currently use WP 1.2 and the smilies appear in posts but not in comments.
I’m not sure whether the plugin is incompatible or if it is just my comments because I’ve been having trouble with them. Anytime I try to make changes to stylize them, they quit working.
I’ve had some people look into it but they can’t figure it out. I also can’t get the preview script/plugin to work either. But I love your smiley plugin nonetheless. Thanks 
#38: Yes, that’s a known bug with WP 1.2. I’m sorry but I can’t fix the bug unless someone can send me a fix. The best solution is to upgrade to 1.5.
huaaaaaaa… bagus bagus bagus
[…] di Indonesia
Icons Smilies Hi Roy! - Google it!
Ikutan Priyadi ah, tapi gw nggak pake pluginsnya gw pake defau […]
Gw gak suka emoticon yang diconvert jadi grafik.
X- (
Kadang malah membuat suatu posting/comment jadi tidak terbaca.
contoh
epaya
urian
1:nanas
2
3
Emoticon kan rangkaian karakter yang kalau diputar 90 derajat, jadi mirip expresi muka orang.
http://en.wikipedia.org/wiki/Emoticon
“Javascript based smileys doesn’t work in Konqueror” .. yeah, it’s likely to be Konqueror bug?
.. it’s horrible when you try to post some entry with Konqueror .. the tag toolbar will be useless
, ie: only render the opening tag.
iya pri, bugnya benerin dong, biar yg diparse hanya yg tertulis “spasi-emoticon-spasi”
#44: ok, nanti gua bikin option supaya harus ada spasi di depan, tapi gak di belakang, soalnya banyak emoticon yang gak diikuti spasi.
#43: yes, and it is hard to debug javascript in konqueror. it doesn’t have something like venkman, and it doesn’t even have a javascript console.
#42: kalau teks biasa dan formatnya gak aneh2 kayanya jarang ada ‘false positive’ kaya gitu. contoh di atas, sesudah titik dua harusnya kan ada spasi. yang susah itu kalau source code.
I’m having a problem with my RSS feed not working and I think it’s going back to the smilies. The error I received is:
XML Parsing Error: not well-formed
:”>

Location: http://kissmegreeneyes2.com/blog/wp-rss2.php
Line Number 122, Column 44:
whoops… the tag in the error must have cut off the rest of my comment.
I’m trying to publish my RSS feed with FeedBurner, Feedster, etc. Do you have any ideas on how to fix this? Any tips would be *greatly* appreciated. Thanks so much!
Nicole:
Smilies are working fine in my RSS feeds, so I guess the plugin is not ready for 1.2 yet
I’m sorry I can’t really fix this unless somebody else can send me a fix (I don’t have any 1.2 installation around anymore).
I do have problem my comment RSS not validating, but that’s not related to smilies.
If not having smilies keeping you up at night, you have two options now:
* fix the problem with wp-rss2.php yourself, you will need to wrap the function that print out the entries with htmlspecialchars, but be careful not to escape the xml tags itself
* upgrade to 1.5, but you will need to spend some time converting your existing template. this is the best for long term as some new plugins are for 1.5 only.
hope that helps
Thanks so much! I thought it might be a problem with 1.2 but I wasn’t sure. I’ll be switching over to 1.5 soon so I guess I’ll just elave it alone until then. Thanks for responding.
[…] -RSS from del.icio.us to keep me updated on new Wordpress-stuff. And today, someone posted this neat plugin at Priyadi’s Place. It’s a […]
Simply excellent
But, I have a suggestion.
Can you also create a way we can click and insert your smilies into the comment / post forms?
#53: that feature is on my to do list
[…] r to select from all previously uploaded images and add the appropriate code to the post. Yahoo/MSN Style Smileys Displays Yahoo […]