PDA

View Full Version : Remove excess line carriage


pran
02-26-2002, 12:10 PM
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:
$bbcode=preg_replace("/(<br \/>){2,}/siU", "<br />", $bbcode);
in functions.php right AFTER this:
$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
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?