I’m offering free smilies and thought I should add a tutorial for WordPress users explaining how to add smilies you have downloaded from other sites or smilies they you have made. You may need some knowledge of PHP before editing the code.
Upload Your Smiley Set
The first step is to upload your images to the wp-includes/images/smilies directory. You can name them whatever you want to, I suppose. For example, stfu-please.gif and chuck-norris.gif can both be used. However, I followed the default WordPress set: icon_name.gif.
You may replace the default smilies or delete all of them and upload your new set. Make sure you back them them up before deletion.
Finding The Array
There is an array that converts text into images in a file called functions.php (vars.php in older versions) located in the wp-includes folder. The array starts somewhere around line 1863. I suggest you use a program for code editing such as Notepad++ or TextWrangler (for Mac).
Adding To The Array
If you are going to create a new array, I suggest you back up the old array or leave /* */ comment tags around the default array like in the example below:
// my new array
':chuck:' => 'icon_chucknorris.gif',
':stfu:' => 'icon_stfu.gif',
/*
'8)' => 'icon_cool.gif',
'8O' => 'icon_eek.gif',
':(' => 'icon_sad.gif',
':)' => 'icon_smile.gif',
':?' => 'icon_confused.gif',
':D' => 'icon_biggrin.gif',
':P' => 'icon_razz.gif',
':o' => 'icon_surprised.gif',
':x' => 'icon_mad.gif',
':|' => 'icon_neutral.gif',
';)' => 'icon_wink.gif',
*/
As you can see it is very straightforward and easy to do. To make it clearer, I will “translate” the array for you.
:-) convert to =>
You may also want several ways for WordPress to convert an image, like so:
':)' => 'icon_smile.gif',
':-)' => 'icon_smile.gif',
':smile:' => 'icon_smile.gif',
Results
If I write :-) it will come out as
If I write :-P it will come out as
Hopefully, I made it clear enough for you to understand. If you need any help, drop a comment or contact me.