Page 2 of 2

Posted: 07 April 03 9:31 pm
by Two Goth Geeks
I will test it on my other phpBB2 forums.

Posted: 07 April 03 9:45 pm
by Two Goth Geeks
Okay, got it.
It's a part of phpBB2.
The data doesn't have < br /> in the database, but when phpBB2 displays data to the screen, it always puts the < br /> after every line so that it shows properly when you view the forum posts.
Unfortunately, unless there is some way to tag the post as "HTML ONLY", it's a bit difficult to know whether to add the line breaks or not.
It'd be one for the ideo's to work out.

filxed (hopefully)

Posted: 08 April 03 8:55 am
by ideology
yes, it's in the code for viewing forum posts. it could be argued that it's a feature to allow you to sprinkle HTML tags within your post, but we think it's a bug!

after a bit of poking around, we've added a fix which appears to work

the drawback is that if you uncheck "Disable HTML in this post" (sorry about the double negative) you'll have to code in pure HTML, ie add your own <br> for newlines. please let us know if you see any other irregularities

red dwarf, if you have the same problem on your board, our modification was in viewtopic.php line 1131. we added the the if-statement in front of the string replacement:

Code: Select all

if (!($board_config['allow_html'] and $postrow[$i]['enable_html']))
    $message = str_replace("n", "n<br />n", $message);
thanks for bringing it up, leek. those HTML imports are much easier to read

HTML Mod

Posted: 08 April 03 10:34 am
by leek
Hi Ideology,
Can you apply the same mod to the script that allows you to preview your message before submitting it as this still displays the blank lines...
Cheers,
Leek

Posted: 08 April 03 11:02 pm
by Two Goth Geeks
Thanks, id!
I don't generally allow HTML on my boards, so I don't have the problem. For those boards, there is no need for HTML.

PS: I reckon these boards are so much nicer than the ezboards. One of my phpbb2 boards I run was set up to get a bunch of people off ezboards. phpBB2 is so much nicer and easier to use IMO.

Posted: 09 April 03 8:02 am
by ideology
oops, wouldn't you think that the preview used the same code?

we've updated posting.php line 708 to read

Code: Select all

  if (!$html_on)
      $preview_message = str_replace("n", '<br />', $preview_message);
it seems to work. please let us know if you see any problems.