vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Remove excess line carriage (https://vborg.vbsupport.ru/showthread.php?t=35462)

pran 02-26-2002 12:10 PM

Remove excess line carriage
 
Can someone whip up a hack to remove excessive line carriages from posts?

Admin 02-26-2002 12:19 PM

Can you give an example of such post? Not sure I understand...

pran 02-26-2002 12:36 PM

Here's the link http://www.kuro.ph/forums/showthread.php?threadid=392, look at the post of benz it has a big gap between his post and the quoted text. I noticed that if a user enters a line carriage, it gets interpreted as < br /> .

Admin 02-26-2002 12:43 PM

That's because he just entered lots of lines












like that.

If you want to remove this from ALL posts, stick this line:
Code:

  $bbcode=preg_replace("/(<br \/>){2,}/siU", "<br />", $bbcode);
in functions.php right AFTER this:
Code:

  $bbcode=nl2br($bbcode);

pran 02-26-2002 12:48 PM

I believe this hack would take effect on the next reply or post? I tested it on new replies and it does work but how about for < br /> codes appearing within the post? Thanks firefly! ;)

Admin 02-26-2002 12:55 PM

No it will work on all posts but it doesn't work... :(

pran 03-13-2002 05:11 AM

Firefly, can you help me out with the extra carriages request? The hack is still not working :confused:

pran 02-03-2004 11:10 PM

Quote:

Originally Posted by pran
Firefly, can you help me out with the extra carriages request? The hack is still not working :confused:

*bump*
Where can I find this code in vBulletin 3?


All times are GMT. The time now is 12:28 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.01070 seconds
  • Memory Usage 1,720KB
  • 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
  • (2)bbcode_code_printable
  • (1)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