vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Limiting size of quotes? (https://vborg.vbsupport.ru/showthread.php?t=270935)

bfdzio 09-26-2011 01:51 PM

Limiting size of quotes?
 
Anyone know how to limit the size of quoted text? I have the ability for people to quote just certain parts of a post but sometimes people will still quote an entire post that is really big. It isn't a big issue but I would like to clean things up because it is annoying for users on mobile.

I would like to find a way to make it like I have seen on some vbulletin based forums where if the amount of words inside the quote box exceeds a certain amount, or number of characters...that it replaces the text that would be shown with something else (I would probably just put a link in it that is more obvious than the go to post button).

Any ideas?

Mooff 09-26-2011 03:52 PM

plugin with hook location bbcode_(something) (check the php file for which hook you need) and some if condition whether you are in the bbcode_quote. There the quoted text should be in the variable $code, use some php functions like strlen($code) to find out how long it is and if it is above 1000 characters or something manipulate it to $code = substr($code, 1000) and $code .= '<a href="">read full quote here</a>'.

bfdzio 09-27-2011 01:26 PM

Appreciate it, I actually found a good solution in the meantime that I might stick with. I'll share it here in case anyone searches and finds this post but another guy on the forum posted this:

add this to your headerinclude template:
PHP Code:

<vb:literal><style>
div.quote_container {max-height:180px;overflow:auto;}
</
style></vb:literal

editing max-height will change how big the quote box can be and will add a scroll bar to it.

Mooff 09-27-2011 02:12 PM

i see, that's a nice and easy way to do it.

But i would put
div.quote_container {max-height:180px;overflow:auto;}
in the additional.css and not in the headinclude template.

Vibhor 09-12-2013 03:27 PM

What would be the solution for this for boards running on vBulletin 3?


All times are GMT. The time now is 02:32 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.01057 seconds
  • Memory Usage 1,716KB
  • 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_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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