This little chunk of code takes the string passed to it, and replaces any instances of MSN Emoticon codes with the corrisponding icon.
Explanations:
#.gif - All the different emoticon image files. index.php - A redirecting index page to prevent directory viewing. gpl.txt - A copy of the General Public License. msn.php - The script page. Include it in the page you want emoticons with, then call its functions. readme.txt - A quick readme file.
EXAMPLE:
<? # Format:
# Smilies($text)
# $text is the string that you want the image codes to be replaced in
include ("msn.php"); $text = "Look at me! :) All fancy with my MSN emoticons! :P Woo! |-)";
echo Smilies($text); ?>
+-o im confused can u please help me? i wanna do this on may stie but i cant seem to get it thanks
JMan: I've updated the script with a version that *should* work no matter what. Let me know how it goes. Future reference: adding your email address to your comment would let me reply to you directly. Enjoy.
disclaimer:
the comments posted throughout my site are submitted by other users.
the things said are not endorsed by me, and do not represent my opinion.