/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function smiley($str){ //smileys to check for ":)",":-)",":D",":-D",";)",";-)",":O", ":-O",":P",":-P","w00t","8)","8-)",":S", ":s","\:\(","\;\(","\|\)",":@" ); // replace with emoticons "<img src="http//yourwebsite.com/image/smile.gif" width="20" height="20" title="happy smiley" />", "<img src="http//yourwebsite.com/image/smile.gif" width="20" height="20" title="happy smiley" />", "<img src="http//yourwebsite.com/image/biggrin.gif" width="20" height="20" title="big grin smiley" />", "<img src="http//yourwebsite.com/image/biggrin.gif" width="20" height="20" title="big grin smiley" />", "<img src="http//yourwebsite.com/image/wink.gif" width="20" height="20" title="winking smiley" />", "<img src="http//yourwebsite.com/image/wink.gif" width="20" height="20" title="winking smiley" />", "<img src="http//yourwebsite.com/image/ohmy.gif" width="20" height="20" title="oh my smiley" />", "<img src="http//yourwebsite.com/image/ohmy.gif" width="20" height="20" title="oh my smiley" />", "<img src="http//yourwebsite.com/image/tongue.gif" width="20" height="20" title="tongue smiley" />", "<img src="http//yourwebsite.com/image/tongue.gif" width="20" height="20" title="tongue smiley" />", "<img src="http//yourwebsite.com/image/w00t.gif" width="20" height="20" title="w00t smiley" />", "<img src="http//yourwebsite.com/image/roll.gif" width="20" height="20" title="roll eyes smiley" />", "<img src="http//yourwebsite.com/image/roll.gif" width="20" height="20" title="roll eyes smiley" />", "<img src="http//yourwebsite.com/image/huh.gif" width="20" height="20" title="huh smiley" />", "<img src="http//yourwebsite.com/image/huh.gif" width="20" height="20" title="huh smiley" />", "<img src="http//yourwebsite.com/image/sad.gif" width="20" height="20" title="sad smiley" />", "<img src="http//yourwebsite.com/image/crying.gif" width="20" height="20" title="crying smiley" />", "<img src="http//yourwebsite.com/image/sleep.gif" width="20" height="20" title="sleep smiley" />", "<img src="http//yourwebsite.com/image/mad.gif" width="20" height="20" title="mad smiley" />", ); } return $str; }