PDA

View Full Version : [mini-request] make smilies NOT case sensitive


corsacrazy
11-29-2002, 08:32 AM
i hate when user type in : P or : D (no spaces) and the smilie doesnt show because its case sensitive, and i dont want to add anoth smilie with the Text to replace as : P because it will show up as double in the smilie list, threfore i would just like the smilies to not b case sensitive if possible, thanks in advance :D

corsacrazy
11-29-2002, 08:39 AM
i swear i looked already and coulddt find it, however one simple search later reveals its already requested, sorry for your trouble

In admin/functions.php:

If you find:

$bbcode=str_replace(trim($smilie[smilietext]),"<img src=\"$smilie[smiliepath]\" border=\"0\" alt=\"\">",$bbcode);

and replace it as:

$bbcode=str_replace(strtolower(trim($smilie[smilietext])),"<img src=\"$smilie[smiliepath]\" border=\"0\" alt=\"\">",$bbcode);
$bbcode=str_replace(strtoupper(trim($smilie[smilietext])),"<img src=\"$smilie[smiliepath]\" border=\"0\" alt=\"\">",$bbcode);

Xenon
11-29-2002, 11:26 AM
that won't help you out if someone writes a smilie like this:
:sMilIeCode:, but for one Letter smilies it works :)

at php.net there are some methods to make str_replace caseinsensitiv, but they don't work perfect as i know..

Mark Hewitt
11-29-2002, 01:29 PM
Myself I would like a way to associate multiple codes to the same smilie but only have it appear once in the list e.g.

: p : P :- p :- P (without spaces) would all give :p

corsacrazy
11-29-2002, 01:42 PM
thats what i am tryin to make/find :S still no luck