Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
Limit width of quote box container if quoted text isn't wide as page Details »»
Limit width of quote box container if quoted text isn't wide as page
Version: 1.0.3, by Alan_SP Alan_SP is offline
Developer Last Online: Oct 2023 Show Printable Version Email this Page

Category: BB Code Enhancements - Version: 4.x.x Rating:
Released: 01-24-2015 Last Update: Never Installs: 7
Template Edits
Re-useable Code  
No support by the author.

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.

Screenshots

File Type: gif quoted.gif (7.9 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
3 благодарности(ей) от:
babyv0x, Manoel J?nior, ozzy47

Comments
  #2  
Old 01-26-2015, 12:08 AM
Alan_SP's Avatar
Alan_SP Alan_SP is offline
 
Join Date: Nov 2009
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Solved problem with multiple nested quotations like in this image:



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.
Attached Images
File Type: gif quote_bug.gif (5.2 KB, 0 views)
Reply With Quote
  #3  
Old 02-13-2015, 12:17 PM
Alan_SP's Avatar
Alan_SP Alan_SP is offline
 
Join Date: Nov 2009
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #4  
Old 07-26-2016, 01:05 AM
babyv0x babyv0x is offline
 
Join Date: Jan 2012
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #5  
Old 07-26-2016, 01:57 AM
MarkFL's Avatar
MarkFL MarkFL is offline
 
Join Date: Feb 2014
Location: St. Augustine, FL
Posts: 3,853
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by babyv0x View Post
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;
}
Reply With Quote
Благодарность от:
Alan_SP
  #6  
Old 07-26-2016, 02:03 PM
Alan_SP's Avatar
Alan_SP Alan_SP is offline
 
Join Date: Nov 2009
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please confirm if it solves your problem, so I can change first post.
Reply With Quote
Благодарность от:
MarkFL
  #7  
Old 07-26-2016, 02:17 PM
babyv0x babyv0x is offline
 
Join Date: Jan 2012
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MarkFL View Post
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 View Post
Please confirm if it solves your problem, so I can change first post.
Problem solved.

Thanks to MarkFL & Alan_SP
Reply With Quote
2 благодарности(ей) от:
Alan_SP, MarkFL
  #8  
Old 07-26-2016, 02:28 PM
Alan_SP's Avatar
Alan_SP Alan_SP is offline
 
Join Date: Nov 2009
Posts: 1,122
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

Thread Tools

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 01:51 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04130 seconds
  • Memory Usage 2,310KB
  • Queries Executed 24 (?)
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
  • (8)bbcode_html
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (7)post_thanks_box_bit
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (4)post_thanks_postbit
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (2)postbit_attachment
  • (8)postbit_onlinestatus
  • (8)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete