View Full Version : 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...
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:
$bbcode=preg_replace("/(<br \/>){2,}/siU", "<br />", $bbcode);
in functions.php right AFTER this:
$bbcode=nl2br($bbcode);
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... :(
Firefly, can you help me out with the extra carriages request? The hack is still not working :confused:
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?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.