![]() |
Case-Insensitive Smilies.
I imagine this is a fairly easy modification to write, i'm guessing perhaps adding a strtoupper or lower or something somewhere.
What I want to do is make a "catch-all" for my smilies, whereby typing the smilie code in any case will make it work. At the moment only lower case works. I don't want to have to create duplicates of each of my smilies just to get upper case to work as well. Is this possible? I'm using vb 3.0.7. |
Well this is a minor edit, shouldn't cause any problems from what i can see, open includes/functions_bbcodeparse.php
Find: Code:
$bbcode = preg_replace('#(?<!&|"|<|>|©)' . preg_quote($smiliefind, '#') . '#s', $smilie_replace["$smiliekey"], $bbcode); Code:
$bbcode = preg_replace('#(?<!&|"|<|>|©)' . preg_quote($smiliefind, '#') . '#is', $smilie_replace["$smiliekey"], $bbcode); - Zero Tolerance |
Works perfectly.
Cheers. |
is there a similar change that can be made for 3.5?
|
Bump.
Anyone know how to do this in 3.6? |
I wonder...
At least for 3.6.0 in /includes/class_bbcode.php find: Code:
$text = preg_replace('/(?<!&|"|<|>|©|&#[0-9]{1}|&#[0-9]{2}|&#[0-9]{3}|&#[0-9]{4}|&#[0-9]{5})' . preg_quote($find, '/') . '/s', $replace, $text); Code:
$text = preg_replace('/(?<!&|"|<|>|©|&#[0-9]{1}|&#[0-9]{2}|&#[0-9]{3}|&#[0-9]{4}|&#[0-9]{5})' . preg_quote($find, '/') . '/is', $replace, $text); |
That works buddy :) Thanks alot.
|
Cool. :)
|
This no longer seems to work (in 3.6.8 at least). Anyone?
|
*bump*
|
In /includes/class_bbcode.php, find (2 instances):
PHP Code:
PHP Code:
|
Thanks, but that doesn't work. When I post the (Y)-smilie now it returns nothing.
|
*another bump*
|
me 2
bump |
Oh, I've been wondering the same exact thing. Is anyone aware of a solution that works for 3.6.8? This would be great b/c my fat fingers sometimes hold the shift key a little too long and I end up leaving the first letter as a cap, so the smilie doesn't show.
|
Ok, this works for me
Find (2 instances): PHP Code:
PHP Code:
Find (2 instances): PHP Code:
PHP Code:
Find (2 instances): PHP Code:
PHP Code:
Find: PHP Code:
PHP Code:
|
If anyone's interested in having vB support case-insensitive smilies out of the box, you might consider chiming in on this poll.
http://www.vbulletin.com/forum/showthread.php?t=247519 |
Quote:
|
All times are GMT. The time now is 05:50 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|