PDA

View Full Version : BB Code Enhancements - BBCode SQL/MYSQL query highlighter


vbenhancer
12-20-2009, 10:00 PM
There is a missing bbcode for coders, highlighting SQL queries... and while i have the only one in hands for vBulletin, i provide it right away...

Simply upload that product. The usage is quite simple... you use the [SQL] or [MYSQL] bbcodes to wrap your sql queries, and the result will look like this:

if you are willing to change the highlight colors, they are located in the function nex_fetch_mysql_colors() inside the product file. I do not base my colors to the ini_set hightlight colors, like most of the other guys, because these colors are horrible.

btw, this is for SQL queries, if you insert your sql queries in PHP code, use the [PHP] bbcode instead, because the highlight is working on sql queries, not code, as it is supposed to be... :)

smirnoff
12-23-2009, 03:41 PM
Hi,

just found your code, very nice one, but still some "bug to correct"

like the ' into comment or request

or interaction with orthe BBCode like [b] or [url]

here is an exemple

#Xevozz
update creature_template set ainame = 'EventAI' where entry = 29266;
DELETE FROM `creature_ai_scripts` WHERE `creature_id` =29266;
insert into `creature_ai_scripts` (`id`, `creature_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `.....`) values
('2926600', '29266','10','2','100','7','1','1','5000','8000',' 2','14','0','0','19','832','0','0','22','1','0','0 ','Xevozz - become attackable'),
('2926611', '29266', '4', '0', '100', '6', '0', '0', '0', '0', '1', '-292660', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Xevozz - aggro'),
('2926601', '29266', '0', '0', '100', '3', '11000', '15000', '12000', '14000', '11', '54202', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Xevozz - Arcane Barrage Volley (normal)'),
('2926602', '29266', '0', '0', '100', '5', '11000', '15000', '12000', '14000', '11', '59483', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Xevozz - Arcane Barrage Volley (heroic)'),
('2926603', '29266', '0', '0', '100', '3', '8200', '9400', '22100', '24000', '11', '54226', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Xevozz - Arcane Buffet (normal)'),
('2926604', '29266', '0', '0', '100', '5', '8200', '9400', '22100', '24000', '11', '59485', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Xevozz - Arcane Buffet (heroic)'),
('9292605', '29266', '0', '0', '100', '3', '16000', '19500', '39700', '43400', '11', '54102', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Xevozz - Summon Ethereal Sphere (normal1)'),
('2926606', '29266', '0', '0', '100', '5', '16000', '19500', '39700', '43400', '11', '54137', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Xevozz - Summon Ethereal Sphere (heroic1)'),
-- here you can place a nice comment's and bad luck failed... with a lil URL link Clic here (http://test.com/titi)

('2926607', '29266', '0', '0', '100', '3', '10200', '11500', '20700', '24400', '11', '54138', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Xevozz - Summon Ethereal Sphere (normal2)'),
('2926608', '29266', '0', '0', '100', '5', '10200', '11500', '20700', '24400', '11', '61337', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Xevozz - Summon Ethereal Sphere (heroic2)'),
('2926609', '29266', '7', '0', '100', '6', '0', '0', '0', '0', '2', '35', '0', '0', '0', '0', '0', '0', '22', '0', '0', '0', 'Xevozz - evade reset'),
('2926610', '29266', '6', '0', '100', '6', '0', '0', '0', '0', '2', '35', '0', '0', '1', '-292661', '0', '0', '22', '0', '0', '0', 'Xevozz - death');


and when you have more than 200 lignes of SQl request, it tae alot of time to parse and show the result

vbenhancer
12-23-2009, 05:16 PM
oh, you are right with the " ' "... will edit the release. for the parsing, i use vBulletin protocol for doing so, not my fault if it looks complex and long...

yahooooh
12-24-2009, 10:36 PM
is there update to fix what smitnoff wrote

vbenhancer
12-25-2009, 01:33 AM
after christmas time there will be updates on each release done here.

ChiNa
09-15-2012, 09:18 PM
after christmas time there will be updates on each release done here.

Did you update this one after 3 years? Or its still not updated?

Waiting for a reply befor I can go on and download..