This extension allows you to add clickable smileys for comments/posts forms, so that when pressing them they will be inserted in the content of the given textarea.
Also, the extension offers a helper class to parse the smiley codes into images so that before saving the comment/post to database, you can parse the content, and replace the smileys codes with actual images.
More than this, you can create groups of smileys and use them in different textareas.
Every group of smileys, has it's own configuration file, which allows you to specify the code for your smiley and the image name/width/height/title/alt.
With other words, if you need to add smileys to a textarea, this is the extension you need.
Tested on Yii 1.1.7
This is how you can use this extension, bellow the defaults are shown:
The above code, will generate the smileys and when each of them is clicked, is inserted into the textarea. Next, after the user submits the form, we can parse the smileys into images, like:
Yii::import('application.extensions.smileys.SmileysParser'); $content=$_POST['textarea']; $content=SmileysParser::parse($content,'default');
As you see the process is simple enough.
If you need to create other smiley groups, for your own use, just take the default or the light groups as an example and you will see how easy is to create and use your own groups of smileys.
Before posting questions here, take a look into the extension files as they are commented very well. If you still have doubts after this, please ask here any question you might have.
Also, worth noticed that this extension has been created a few hours ago, and i already implemented it in two of my projects, if you find any bugs, or you have suggestions, don't hesitate to let me know.