...

View Full Version : Adding smileys -



SRBuckey5266
10-14-2009, 12:54 AM
How would I do this? I've tried everything, I've tried adding this line to my code:



if ($message==":happy:")
$message = "<img src='crown_gold.gif'>"


How would I add a smileys system on this? http://chataddict.netau.net/index.php

Fumigator
10-14-2009, 12:57 AM
Use str_replace(). You can use arrays for the parameters so you can list all smileys in one array and the images to replace them with in another array.

http://us2.php.net/manual/en/function.str-replace.php

SRBuckey5266
10-14-2009, 01:12 AM
Ok, but how would I use it?...I'm a noobie at PHP....

SRBuckey5266
10-14-2009, 01:30 AM
Anyone?...

Fumigator
10-14-2009, 04:34 PM
Click on the link I provided and follow the examples in the manual.

abduraooft
10-14-2009, 04:48 PM
Ok, but how would I use it?...I'm a noobie at PHP....


Click on the link I provided and follow the examples in the manual.
Yes, hope you don't need to be a noobie forever :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum