vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Post Quote Length Limit (vB3) (https://vborg.vbsupport.ru/showthread.php?t=309637)

ozzy47 03-17-2014 11:00 PM

Post Quote Length Limit (vB3)
 
1 Attachment(s)
As some of you know, when someone quotes a post, sometimes they are long posts. This can make the post hard to read, and IMO, not look as good as it can.

Sure you could limit the characters of the quote one way or another, but this is not the best approach. Someone may actually want to see all the quoted text in the post.

So I have come up with the solution, of adding a scroll bar in the quote bubble. This way you can keep the post looking neat, with out loosing functionality. So here we go wit the tutorial.

Take for example this post, [OzzModz] Classifieds

Now if someone were to quote that, and reply something like, " Thanks for sharing Ozzy. " the post would look bad, because the amount of info in the quote would overwhelm the reply.

So what you can do is go to your ACP --> Styles & Templates --> Style Manager, then choose Edit Templates for your style.

Now in the scroll box find, BB Code Layout Templates, then double click on that, then find bbcode_quote and double click on that.

Once inside that template, find this bit of code:

HTML Code:

<div style="font-style:italic">$message</div>
And change it to this:
HTML Code:

<div style="font-style:italic; max-height:300px; width:auto; overflow:auto;">$message</div>
Then click on the Save button. This will have to be done for each of your styles. :)

Now when someone quotes a post that is longer that 300px high, it will add a scroll bar inside the quote bubble. This allows anyone viewing the post, to be able to still see all the original quoted text, but without making the post longer than it needs to be. In the attached image, is this post quoted, [OzzModz] Classifieds but as you can see, it is much shorter.

Max Taxable 03-18-2014 02:06 AM

Installed and tested on my v3.8.7 installations and works flawlessly.

I like a really compressed showthread page and this really helps - I used 200px instead of 300 as the setting. It's really sweet.

Thanks Ozzy!

Max Taxable 03-18-2014 02:20 AM

U da MAN!

ozzy47 03-18-2014 02:21 AM

Not a problem, glad to help. :)

blind-eddie 03-18-2014 10:39 AM

This should have been a default part of vbulletin from day one. Nice edit!

ozzy47 03-18-2014 10:48 AM

Thanks, glad you like it. I just think it makes things look much nicer. :)

Max Taxable 03-18-2014 03:20 PM

Any way to make it not work in first post of the new thread?

ozzy47 03-19-2014 12:20 AM

This should work, change:
HTML Code:

<div style="font-style:italic; max-height:300px; width:auto; overflow:auto;">$message</div>
To this:
HTML Code:

<div style="font-style:italic; <if condition="$post[postcount] > 1">max-height:300px; width:auto; overflow:auto;</if>">$message</div>

Max Taxable 03-19-2014 12:44 AM

I gotta do that in six styles.

Am I reading that right? The <if> conditional seems to make this work ONLY on postcount 1 of a thread?

ozzy47 03-19-2014 02:38 AM

Nope, sadly conditionals can not be used in bbcode templates like that. :(


All times are GMT. The time now is 01:35 PM.

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.01511 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
  • (4)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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