vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   [SQL] - vB Code (https://vborg.vbsupport.ru/showthread.php?t=59904)

Xenon 01-17-2004 06:32 PM

just on the board

Boofo 01-31-2004 01:36 AM

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. ;)

Xenon 02-01-2004 04:31 PM

seems there are changes in rc3 i never noticed ^^

g-force2k2 02-01-2004 04:38 PM

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

Xenon 02-01-2004 04:41 PM

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 :)

Boofo 02-01-2004 05:40 PM

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. ;)

Xenon 02-01-2004 05:44 PM

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 :)

Boofo 02-01-2004 05:49 PM

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!!! ;)

Boofo 02-02-2004 12:42 AM

Don't forget the add the SQL template to the showthread.php and the showpost.php, too. ;)

Xenon 02-02-2004 02:07 PM

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 :)


All times are GMT. The time now is 12:53 PM.

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.01073 seconds
  • Memory Usage 1,740KB
  • 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
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete