Version: 1.00, by Boots
Developer Last Online: Feb 2015
Version: 3.0.3
Rating:
Released: 12-23-2004
Last Update: Never
Installs: 24
Is in Beta Stage
No support by the author.
As many of you know, the parsing of vB smilies is rather odd and can be a huge headache when it comes to multiple codes not parsing correctly
ie:
uke: and
as you can see, the smilies are parsed by display order so
Code:
:p
gets parsed before
Code:
:puke:
therefore the longer smilie code doesn't display correctly. An easy fix is to parse the smilies in order of their code length. The following two quick hacks will do just that!
Whenever you are changing files you should always have a proper backup!
open /includes/adminfunctions.php and goto line 2192
you will see this line
Code:
$items = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "$table ORDER BY imagecategoryid, displayorder");
replace that line with this code
Code:
if ($table == 'smilie')
{
$items = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "smilie ORDER BY LENGTH(smilietext) DESC");
}
else
{
$items = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "$table ORDER BY imagecategoryid, displayorder");
}
open includes/functions_bbcodeparse.php and goto line 385
you will see this line
Code:
SELECT smilietext, smiliepath, smilieid FROM " . TABLE_PREFIX . "smilie
replace it with this
Code:
SELECT smilietext, smiliepath, smilieid FROM " . TABLE_PREFIX . "smilie ORDER BY LENGTH(smilietext) DESC
After this is complete, go into your Admin CP, view your smilies and just click "Save Display Order" This will update the cached smilie's datastore. This hack won't have any effect until this is done
Enjoy proper smilies ! Let me know how it works for ya!
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
Doing this modification now produces this when updating cache counters.
Code:
Database error in vBulletin 3.0.3:
Invalid SQL:
SELECT smilietext, smiliepath, smilieid FROM smilie ORDER BY LENGTH(smilietext) DESC ORDER BY LENGTH(smilietext) DESC
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY LENGTH(smilietext) DESC' at line 1
mysql error number: 1064
Date: Monday 09th of May 2005 09:39:44 AM
Script: http://www.mysite.net/web/forum/admincp/misc.php
Referer: http://www.mysite.net/web/forum/admincp/misc.php
Username: JohnBee
IP Address: *.*.*.*
I found it!
It was my own typo, carry on ... :classic:
Quote:
Originally Posted by JohnBee
Doing this modification now produces this when updating cache counters.
Code:
Database error in vBulletin 3.0.3:
Invalid SQL:
SELECT smilietext, smiliepath, smilieid FROM smilie ORDER BY LENGTH(smilietext) DESC ORDER BY LENGTH(smilietext) DESC
mysql error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY LENGTH(smilietext) DESC' at line 1
mysql error number: 1064
Date: Monday 09th of May 2005 09:39:44 AM
Script: http://www.mysite.net/web/forum/admincp/misc.php
Referer: http://www.mysite.net/web/forum/admincp/misc.php
Username: JohnBee
IP Address: *.*.*.*