PDA

View Full Version : Is there such a way to ...


msimplay
03-05-2003, 12:08 AM
Hello i was wondering if there is such a way to remove the case sensitivity from emoticons

cuz all my users hardly ever bother using the clickable emoticons
and they are all msn based so they know the basic ones
trouble is they either use caps or no caps

so :S would not be same as :s

If there is such a hack or an easy way to implement this please help me

mr e
03-05-2003, 12:30 AM
you'd have to find this line in functions.php and change it to do an eregi instead of a str_replace


while ($smilie=$DB_site->fetch_array($smilies)) {
if(trim($smilie[smilietext])!="") {
$bbcode=str_replace(trim($smilie[smilietext]),"<img src=\"$smilie[smiliepath]\" border=\"0\" alt=\"\">",$bbcode);
}
}

msimplay
03-05-2003, 01:00 AM
Originally posted by mr e
you'd have to find this line in functions.php and change it to do an eregi instead of a str_replace


while ($smilie=$DB_site->fetch_array($smilies)) {
if(trim($smilie[smilietext])!="") {
$bbcode=str_replace(trim($smilie[smilietext]),"<img src=\"$smilie[smiliepath]\" border=\"0\" alt=\"\">",$bbcode);
}
}


does that mean the above code changes to

while ($smilie=$DB_site->fetch_array($smilies)) {
if(trim($smilie[smilietext])!="") {
$bbcode=eregi(trim($smilie[smilietext]),"<img src=\"$smilie[smiliepath]\" border=\"0\" alt=\"\">",$bbcode);
}
}


Can someone tell me if thats correct please