vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   BB Code Enhancements - Improved templates for [code], [html] and [php] bbcodes (https://vborg.vbsupport.ru/showthread.php?t=298520)

nerbert 05-27-2013 10:00 PM

Improved templates for [code], [html] and [php] bbcodes
 
1 Attachment(s)
This is a new template for [code], [html] and [php] bbcodes. With these the horizontal scrolling actually works and there is no word wrapping. In Chrome you can resize the box too.

Code:

<div class="bbcode_container" style="resize:vertical;">
        <div class="bbcode_description">{vb:rawphrase code}:</div>
        <div class="bbcode_code" style="overflow:auto;<vb:if condition="$vboptions['codemaxlines']">height:<vb:if condition="$blockheight<$vboptions['codemaxlines']">{vb:math {vb:raw blockheight}*{vb:stylevar mid_fontSize}+{vb:stylevar mid_fontSize}*2}<vb:else />{vb:math {vb:raw blockheight}*{vb:stylevar mid_fontSize}+{vb:stylevar mid_fontSize}}</vb:if>;"</vb:if>>
                <pre style="overflow:hidden;display:inline-block;margin:0px;resize:none;">{vb:raw code}</pre>
        </div>
</div>

Just paste in the new code in for the bbcode_code, bbcode_html and bbcode_php templates. Then change
{vb:rawphrase code} to {vb:rawphrase html_code}
in the bbcode_html template, and change
{vb:rawphrase code} to {vb:rawphrase php_code}
in the bbcode_php template.

Note that in the image provided, the number of lines was set to 10 to show multiple posts. Default is 30 in

Settings > Options > BB Code > Maximum [CODE] Lines.


All times are GMT. The time now is 06:47 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.00945 seconds
  • Memory Usage 1,707KB
  • 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_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (1)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