![]() |
smiley code - clickable only with IE
Can anybody help me to fix that problem, because smileys are clickable ony with Internet Explorer, with Firefox they only work if you manualy write them in message body.
Code:
|
Hello,
what do you mean by making an image clickable? Like a simple a-href link? I think your problem isn't a PHP specific issue. Anyway, I'd like to help you. Concerning your code: There are some things I'd do a bit different. For instance it would be faster to have to arrays $search and $replace that you pass to str_replace() instead of calling str_replace() for every smiley you replace by the filename. Here's the modified code. I hope there aren't any mistakes as I haven't tested it: PHP Code:
|
Also, for future reference, instead of using str_replace() to get new lines to <br>, you can use nl2br(). PHP: nl2br - Manual
|
Good idea! ^^
I've changed that in my code. :-) |
| All times are GMT. The time now is 12:08 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0