diff options
Diffstat (limited to 'includes/smilies.php')
| -rwxr-xr-x | includes/smilies.php | 64 | 
1 files changed, 64 insertions, 0 deletions
| diff --git a/includes/smilies.php b/includes/smilies.php new file mode 100755 index 0000000..843af05 --- /dev/null +++ b/includes/smilies.php | |||
| @@ -0,0 +1,64 @@ | |||
| 1 | <?php | ||
| 2 | /* | ||
| 3 | 444444444 | ||
| 4 | 4::::::::4 | ||
| 5 | 4:::::::::4 | ||
| 6 | 4::::44::::4 | ||
| 7 | 4::::4 4::::4 Four Island | ||
| 8 | 4::::4 4::::4 | ||
| 9 | 4::::4 4::::4 Written and maintained by Starla Insigna | ||
| 10 | 4::::444444::::444 | ||
| 11 | 4::::::::::::::::4 includes/smilies.php | ||
| 12 | 4444444444:::::444 | ||
| 13 | 4::::4 Please do not use, reproduce or steal the | ||
| 14 | 4::::4 contents of this file without explicit | ||
| 15 | 4::::4 permission from Hatkirby. | ||
| 16 | 44::::::44 | ||
| 17 | 4::::::::4 | ||
| 18 | 4444444444 | ||
| 19 | */ | ||
| 20 | |||
| 21 | if (!defined('S_INCLUDE_FILE')) {define('S_INCLUDE_FILE',1);} | ||
| 22 | |||
| 23 | require('headerproc.php'); | ||
| 24 | |||
| 25 | class Smilies | ||
| 26 | { | ||
| 27 | var $init = false; | ||
| 28 | var $smilies; | ||
| 29 | |||
| 30 | function init() | ||
| 31 | { | ||
| 32 | $this->smilies[':)'] = '001_smile.gif'; | ||
| 33 | |||
| 34 | $this->init = true; | ||
| 35 | } | ||
| 36 | |||
| 37 | function parseSmilies($text) | ||
| 38 | { | ||
| 39 | if (!$this->init) | ||
| 40 | { | ||
| 41 | $this->init(); | ||
| 42 | } | ||
| 43 | |||
| 44 | foreach ($this->smilies as $name => $value) | ||
| 45 | { | ||
| 46 | $text = str_replace($name, '<IMG SRC="http://fourisland.com/theme/images/smilies/' . $value . '" ALT="' . $name . '" />', $text); | ||
| 47 | } | ||
| 48 | |||
| 49 | return $text; | ||
| 50 | } | ||
| 51 | } | ||
| 52 | |||
| 53 | function parseSmilies($text) | ||
| 54 | { | ||
| 55 | global $smilies; | ||
| 56 | if (!isset($smilies)) | ||
| 57 | { | ||
| 58 | $smilies = new Smilies(); | ||
| 59 | } | ||
| 60 | |||
| 61 | return $smilies->parseSmilies($text); | ||
| 62 | } | ||
| 63 | |||
| 64 | ?> | ||
