Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

Reply
 
Thread Tools
[SQL] - vB Code Details »»
[SQL] - vB Code
Version: 1.2, by Xenon Xenon is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 01-07-2004 Last Update: 08-03-2004 Installs: 21
 
No support by the author.

This hack is more or less Selfexplaining as we use it since a long time on vb.org .
Credits go to Chen Avinadav for the original version for vBulletin 2.

It allows you and your users to use [ SQL] Tags to highlight special SQL Tags and so on.
example:
[SQL]
SELECT *
FROM user
LEFT JOIN userfield USING(userid)
[/sql]

most of the queries are working perfectly, just nested quotes can make problems, i'll try to fix these, soon

Enjoy

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 01-17-2004, 06:32 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just on the board
Reply With Quote
  #23  
Old 01-31-2004, 01:36 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you want to be able to use the new codemaxlines variable that is in RC3 so the boxes won't ever go past the point that the others do now, you need to add:

PHP Code:
 // fetch height of block element
$blockheight fetch_block_height($code); 
right above:

PHP Code:
 eval('$html = "' fetch_template('bbcode_sql') . '";');
return 
$html
in the included functions_bbcodeparse_custom_created.php that comes with this hack. If you also add:

PHP Code:
 global $vbphrase$stylevar
right under

PHP Code:
 function handle_bbcode_sql($code

in the same file, you can use the same code for the sql template for the box as the code template (with a few small modifications, of course) instead of hard-coding everything.
Reply With Quote
  #24  
Old 02-01-2004, 04:31 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

seems there are changes in rc3 i never noticed ^^
Reply With Quote
  #25  
Old 02-01-2004, 04:38 PM
g-force2k2 g-force2k2 is offline
 
Join Date: Mar 2002
Location: Everywhere you wanna be..
Posts: 1,608
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice Hack Xenon

Was wondering how when vb.org used to run vb2 people got the sql code to work, didn't even know it existed for vb2. Even though most places won't find this useful I find it interesting.

Cheers,
g-force2k2
Reply With Quote
  #26  
Old 02-01-2004, 04:41 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the vb2 version was written by Chen just for vb.org and was never released

i just ported it over to vb3, optimized it and then asked chen if i could release it.
i know that there are not much boards which can use it, but if at least one other board can use it, it was worth the release
Reply With Quote
  #27  
Old 02-01-2004, 05:40 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xenon
seems there are changes in rc3 i never noticed ^^
Just trying to help.

It took me a while with the padding not working right when following the other bbcode templates for the sql template. Then it hit me with the stylevar[cellpadding] variable they were using. I had hardcoded it into the template, but it is easier this way if you ever want to do a global change. The blockcodeheight is new in RC3 and doesn't quite work right yet. I reported it over to vb.com and they are wroking on it, I guess.

I even got the sql box (as well as the others) set up with the double-click that they had for vB2, totally revamped for vB3. It makes it alot easier now that the boxes are smaller.
Reply With Quote
  #28  
Old 02-01-2004, 05:44 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well i use a codebox height coded myself on vb.org, that'S why i have not noticed the rc3's as i have not reverted the templates

i'll add your fixes into my next installfile
Reply With Quote
  #29  
Old 02-01-2004, 05:49 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you share your height code until RC3 gets theirs working right?

If you want the double-click code for it, let me know. It works different with the pre tags than it did as a replacement with the td tags.

You can use the same template as one of the other bbcodes with that stuff added to the install file. No more having to hard-code it.

Oh, and we also added a SQL button to the editors. Just had to add something to 2 templates. Didn't have to mess with any js files. This vB3 is GREAT!!!
Reply With Quote
  #30  
Old 02-02-2004, 12:42 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Don't forget the add the SQL template to the showthread.php and the showpost.php, too.
Reply With Quote
  #31  
Old 02-02-2004, 02:07 PM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm, i think the height hack isn't that perfect, too.
at least sometimes it does things it shouldn't do

but i'll look at it at all
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:48 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05249 seconds
  • Memory Usage 2,304KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete