Jump to content

[SOLVED] help with a shoutbox


lupld

Recommended Posts

I have a script from oxyscripts for a shoutbox (http://www.oxyscripts.com/item-418.html) and I want to put in emoticons. I would like to know if there is anything I can do to change given text, like :smile: from the message part of the form to an image tag before it get's posted into mysql. Or if there is something I can do to change it on the page before it gets displayed. I have already changed it to show the form above the shouts, allow up to 500 characters for the message, and post without entering an email. Any help would be greatly appreciated, it's for an after school project, if anyones ever heard of Academic Decathlon.
Link to comment
https://forums.phpfreaks.com/topic/28922-solved-help-with-a-shoutbox/
Share on other sites

  • 2 weeks later...
You need to search for the smile and replace it with a picture like this:
[code]$message = str_replace(":)","<img src=\"/images/smile.gif\" alt=\"Smile\">",$message);[/code]
it replaces any :) in the message with the smile picture, and in the last parameter you're passing in the string (in this case $message) to be searched and replaced.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.