stoshrocket
Senior Member
formerly methos
Posts: 748 Reputation: 31
34 / /
Joined: Aug 2005
|
O.P. RE: php smilie code check
ok, it shows as it should, it replaces the smilies with the appropriate pics, and as for the code, ill just go and fetch it.....
this is the whole php code that is in the document::
code: <?php
$smiley_list = array(":)", "0:)", ":D", ":S", "B)", ":'(", ":$",
":|", "8-)", "^o)", ":o", ":P", ";)", ":refuck:", ">(", "='(",
"=D", "O.o", "=(", "=)", "=P", "=/", );
$replacement_list = array(
'<img alt="smilie" src="smilies/grin.gif" />',
'<img alt="smilie" src="smilies/angel.gif" />',
'<img alt="smilie" src="smilies/biggrin.gif" />',
'<img alt="smilie" src="smilies/confuzzled.gif" />',
'<img alt="smilie" src="smilies/cool.gif" />',
'<img alt="smilie" src="smilies/cry.gif" />',
'<img alt="smilie" src="smilies/embarrassed.gif" />',
'<img alt="smilie" src="smilies/notamused.gif" />',
'<img alt="smilie" src="smilies/rolleyes.gif" />',
'<img alt="smilie" src="smilies/sarcastic.gif" />',
'<img alt="smilie" src="smilies/shock.gif" />',
'<img alt="smilie" src="smilies/tongue.gif" />',
'<img alt="smilie" src="smilies/wink.gif" />',
'<img alt="smilie" src="smilies/refuck.gif" />',
'<img alt="smilie" src="smilies/bangry.gif" />',
'<img alt="smilie" src="smilies/bcry.gif" />',
'<img alt="smilie" src="smilies/blaugh.gif" />',
'<img alt="smilie" src="smilies/bwassat.gif" />',
'<img alt="smilie" src="smilies/bsad.gif" />',
'<img alt="smilie" src="smilies/bsmile.gif" />',
'<img alt="smilie" src="smilies/btongue.gif" />',
'<img alt="smilie" src="smilies/bwink.gif" />',
);
$text = str_replace($smiley_list, $replacement_list, $text);
?>
This post was edited on 12-24-2005 at 08:19 PM by stoshrocket.
|
|