Version: 1.2, by Xenon
Developer Last Online: Oct 2023
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.
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);
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.
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.
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
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.
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!!!