Emoticon Engine!
I needed an emoticon engine, so I made one (tired of writing a ‘new’ one everytime a client needs one). How to use it:
- Include the class file
- Edit it as required (suggest a url for the path to the files)
- Then do something like:
$dpe = new DPEmoticonEngine();
$content = $dpe->parseText($content);
- And its done!
If you have a lot of icons, or lots of different sets of icons then you may want to pre-load the emoticon variable.
- Set the class file as required
- Then so something like:
$dpe = new DPEmoticonEngine();
$evar = $dpe->getEmoticons();
- Save $evar in a database, create as many different setups as you like, just edit the class file each time.
- To use the saved setup:
$evar = …
$dpe = new DPEmoticonEngine($evar);
- And everything else as normal
Have fun. (and Happy New Year)
Download DisputedIP Emoticon Engine (PHP) by clicking here
This work is licenced under a Creative Commons Licence.
Posted in: PHP
January 2008
Martyn
Post A Comment


