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 - Limit width of quote box container if quoted text isn't wide as page (https://vborg.vbsupport.ru/showthread.php?t=316924)

Alan_SP 01-24-2015 10:00 PM

Limit width of quote box container if quoted text isn't wide as page
 
1 Attachment(s)
Well, first of all, I saw this on XDA forums. Here's link to one example on their site, to get idea how it looks like. I also attached image, so you can look here how it looks like. Of course, actual look depends on width of quoted text. If text is really wide, you wouldn't notice any difference.

Quote box is normally wide as screen (i.e. it depends on your postbit type, either new or legacy), not as quoted text. And if quoted text is relatively short, to some it might look unaesthetic.

Anyway, if you'd like to limit quote box to width of quoted message, add this to additional.css:

HTML Code:

.bbcode_container .bbcode_quote {
flex: 0 1 auto;
flex-basis: auto;
flex-direction: row;
flex-flow: row;
flex-grow: 0;
flex-shrink: 1;
flex-wrap: nowrap;
justify-content: flex-start;
float: left;
}

This would produce funny effect, your text would appear on the right of quoted block if there's space. To avoid it if you don't like it (probably you wouldn't) edit template bbcode_quote and add at the very beginning this:

HTML Code:

<div></div>
Also, you need to add at the very end of the same template (bbcode_quote) this:

HTML Code:

<div style="clear:left"></div>
In case your forum is RTL (arabic etc), you need to change float: left; into float: right; and in template you need to clear:right.

v1.0 - Initial version
v1.0.1 - solved problem with multiple (3 or more) nested quotations
v1.0.2 - solved problem with very short text and quote in the same line
v1.0.3 - solved problem with PHP and HTML BBcode

You can see attached image how it looks.

Alan_SP 01-26-2015 12:08 AM

1 Attachment(s)
Solved problem with multiple nested quotations like in this image:

https://vborg.vbsupport.ru/attachmen...1&d=1422237938

When more than two nested quotations is used, with original version text outside quotations also appeared as a part of first quotation. In image Tekst 5 should be outside quote, but it isn't. Strange bug.

To avoid this, instead this template change:

HTML Code:

<div style="clear:left"/>
Use this template change:

HTML Code:

<div style="clear:left"></div>
First post is changed accordingly.

Alan_SP 02-13-2015 12:17 PM

There's also a problem with very short text and quote in the same line, for example:

Text: [QUOTE]some quote[/QUOTE]

To resolve this, add at the very beginning of bbcode_quote template one div to clear it:

HTML Code:

<div></div>
First post changed accordingly.

babyv0x 07-26-2016 01:05 AM

Quote:

Originally Posted by Alan_SP
This would produce funny effect, your text would appear on the right of quoted block if there's space. To avoid it if you don't like it (probably you wouldn't) edit template bbcode_quote and add at the very beginning this:

when i use this mod, my text appear on the right of HTML & PHP BBCODE

please fix

MarkFL 07-26-2016 01:57 AM

Quote:

Originally Posted by babyv0x (Post 2573932)
when i use this mod, my text appear on the right of HTML & PHP BBCODE

please fix

Try using the following selector:

HTML Code:

.bbcode_container .bbcode_quote {
        flex: 0 1 auto;
        flex-basis: auto;
        flex-direction: row;
        flex-flow: row;
        flex-grow: 0;
        flex-shrink: 1;
        flex-wrap: nowrap;
        justify-content: flex-start;
        float: left;
}


Alan_SP 07-26-2016 02:03 PM

Please confirm if it solves your problem, so I can change first post.

babyv0x 07-26-2016 02:17 PM

Quote:

Originally Posted by MarkFL (Post 2573935)
Try using the following selector:

HTML Code:

.bbcode_container .bbcode_quote {
        flex: 0 1 auto;
        flex-basis: auto;
        flex-direction: row;
        flex-flow: row;
        flex-grow: 0;
        flex-shrink: 1;
        flex-wrap: nowrap;
        justify-content: flex-start;
        float: left;
}


Quote:

Originally Posted by Alan_SP (Post 2573966)
Please confirm if it solves your problem, so I can change first post.

Problem solved.

Thanks to MarkFL & Alan_SP

Alan_SP 07-26-2016 02:28 PM

Changed to version 1.0.3 - Solved problem with PHP i HTML BBcode.


All times are GMT. The time now is 02:45 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.01658 seconds
  • Memory Usage 1,735KB
  • 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
  • (8)bbcode_html_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)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