Jump to content

smiley


smiles

Recommended Posts

You can use bbCodes

<?phpfunction someName($text) {$text = str_replace(':)', '<img src="img_smile.jpg" alt="" />', $text);$text = str_replace(':D', '<img src="img_bigsmile.jpg" alt="" />', $text);$text = str_replace(':(', '<img src="img_sad.jpg" alt="" />', $text);return $text;}?>

You get it? You do something like that :)Add this line to each new smiley:

$text = str_replace(' in here you write in example :) ', ' and here you continue with the img code', $text);=:) replaced with <img src="url to image" alt="" />

If you're relative new with functions and stuff, in the while loop, you write:

echo someName($row['content']);

Link to comment
Share on other sites

Lol, okay.. That's good :)I presume you found out that you can put it anywhere, hehe. It's best to include it, because if you need to change or add a smiley, you don't need to go to all pages hehe...oh well, I think you know that already :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...