vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   BB Code Enhancements - BBCode SQL/MYSQL query highlighter (https://vborg.vbsupport.ru/showthread.php?t=230714)

vbenhancer 12-20-2009 10:00 PM

BBCode SQL/MYSQL query highlighter
 
1 Attachment(s)
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
[sql]
#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

('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');
[/sql]

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

Quote:

Originally Posted by vbenhancer (Post 1937723)
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..


All times are GMT. The time now is 04:05 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02802 seconds
  • Memory Usage 1,730KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete