Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-11-2013, 01:53 PM
katie hunter's Avatar
katie hunter katie hunter is offline
 
Join Date: May 2007
Posts: 533
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to set BBcode Code to a fix width?

Hi, i need to set the a fix width for bbcode of php, html, code so probably there are 3 templates to edit but lets try to apply the change for the bbcode code as an example.

I remember on vb 3.7.x it was simple but i cant remember which to edit.

http://s2.ipicture.ru/uploads/20131007/7T25811z.jpg

Here is a link for example http://forum.nihonomaru.com/finished...bluray.343960/

See the long a url in the bbcode code the longer it will stretch out, i need to set the width for bbcode code for example to fix this issue. Making the width may be 750 px

I did it with vb 3.7.6 but that was long time ago, i can't remember what did i change.
-------------

This was based on vb 3.7.x template of bbcode_code

PHP Code:
<div style="margin:20px; margin-top:5px">

    <
div class="smallfont" style="margin-bottom:2px"><b>$vbphrase[code]:</b> <a href="#" onclick="selectCode(this); return false;"><input type="button" value="Select All" style="border: 1px solid #B8B8B8; background: #E8E8E8; color: #999999; -moz-border-radius: 6px;     font-family: Tahoma;     font-size: 9px;" /></a></div



    <
pre class="alt2" dir="ltr" style="
        margin: 0px;
        padding: 
$stylevar[cellpadding]px;
        border: 1px inset;
        width: 
$stylevar[codeblockwidth];
        height: 
{$blockheight}px;
        text-align: left;
        overflow: auto"
>$code</pre>
</
div

Now this is the template for vb 4.2.1 and it is the same for the default vb skin, all bbcode and css of bbcode are the same.

PHP Code:
<div class="bbcode_container">
    <
div class="bbcode_description">{vb:rawphrase code}:</div>
    <
pre class="bbcode_code"<vb:if condition="$vboptions['codemaxlines']">style="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>>{vb:raw code}</pre>
</
div

It is actually done and fixed here too on vbulletin.org since the txt does not stretch the border, you can scroll left and right as you can see above ^ it did not stretch he border.
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 07:57 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.03422 seconds
  • Memory Usage 2,176KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete