Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

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
  #12  
Old 01-10-2004, 04:10 AM
squawell's Avatar
squawell squawell is offline
 
Join Date: Oct 2001
Posts: 681
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
How would we add a button in the editor for this?
also want to know this
Reply With Quote
  #13  
Old 01-10-2004, 04:13 AM
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 squawell
also want to know this
Hello there, sir. Where you been?
Reply With Quote
  #14  
Old 01-10-2004, 09:59 AM
squawell's Avatar
squawell squawell is offline
 
Join Date: Oct 2001
Posts: 681
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
Hello there, sir. Where you been?
Hello,Bobim come from Asia ........nice to meet u

by the way...if anyone want to replace the word--SQL query to phrase

variable just open the file(functions_bbcodeparse_custom_created.php) find
PHP Code:
function handle_bbcode_sql($code

below it add:
PHP Code:
global $vboptions$vbphrase$stylevar
i test it,and it works...hope u guys like it
Reply With Quote
  #15  
Old 01-10-2004, 10:13 AM
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 squawell
Hello,Bobim come from Asia ........nice to meet u

by the way...if anyone want to replace the word--SQL query to phrase

variable just open the file find
PHP Code:
function handle_bbcode_sql($code

below it add:
PHP Code:
global $vboptions$vbphrase$stylevar
i test it,and it works...hope u guys like it
Make sure you let them know which file to open.

I had already done this but why did you add the $stylevar and $vboptions to it?
Reply With Quote
  #16  
Old 01-10-2004, 10:46 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Bob: if you want to use other variables within the template you have to add them as well, he just made an all in one thing

@Chris: hmm, i can think of it, maybe i'll do it

@Bob2: hmm, you have to add it o the main JS scripts, but as i don't know JS i cannot answer this
Reply With Quote
  #17  
Old 01-10-2004, 10:48 AM
squawell's Avatar
squawell squawell is offline
 
Join Date: Oct 2001
Posts: 681
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
Make sure you let them know which file to open.

I had already done this but why did you add the $stylevar and $vboptions to it?
ok...ill edit my post above let others know

because i paste it from another file and LAZY to edit the code
Reply With Quote
  #18  
Old 01-10-2004, 10:56 AM
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 squawell
ok...ill edit my post above let others know

because i paste it from another file and LAZY to edit the code
LOL Don't feel bad, I have done the same thing many times in the past. I had to also add $bbuserinfo to that line to allow my block codes hack to work.
Reply With Quote
  #19  
Old 01-10-2004, 11:02 AM
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
@Bob: if you want to use other variables within the template you have to add them as well, he just made an all in one thing

@Chris: hmm, i can think of it, maybe i'll do it

@Bob2: hmm, you have to add it o the main JS scripts, but as i don't know JS i cannot answer this
I was just razzin' him, Stefan.

The disable tags would be great if you decide you want to do it.

Wouldn't there be a way to just make a bbcode for the sql tags, without having to add the code that is? That allows buttons to be entered in the editor.
Reply With Quote
  #20  
Old 01-10-2004, 11:05 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Wouldn't there be a way to just make a bbcode for the sql tags, without having to add the code that is? That allows buttons to be entered in the editor.
not that i know of, as you have to call some functions...
also i'm a purist, so i don't use the editors, a plain textbox is really enough for me
Reply With Quote
  #21  
Old 01-17-2004, 07:01 AM
gmarik's Avatar
gmarik gmarik is offline
 
Join Date: May 2002
Location: Mocsow
Posts: 1,288
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Do you use it over the board or somewhere in the admin panel as well?
Reply With Quote
Reply


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 06:21 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.09346 seconds
  • Memory Usage 2,320KB
  • 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
  • (8)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
  • (3)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