View Full Version : How to disable line breaks in posts?
alhatali
Sat 12th May '01, 1:56am
Hi everyone,
I have pre-formatted information that I want to post in my forum. When I copy the HTML code directly into the post, vBulletin inserts line breaks at the end of each line which messes my posts.
My question is how to disable vBulletin from inserting line breaks at every line when I am posting pre-formatted HTML code?
tubedogg
Sat 12th May '01, 2:01am
You can enclose it in
tags, like so: (remove the space between code and the ] and /code and the ])
[code ]my information[/code ]
would appear as
[code]my information
and you can do tabs, etc.
column 1 column 2
info 1 info 2
info 3 info 4
alhatali
Sat 12th May '01, 2:42am
Thanks tubedogg for your reply. However, what I am asking is a little bit different.
I am posting a page pre-formatted using HTML tags (e.g., tables, lists, forms, etc.) and I want the tags to be taken and displayed as HTML tags.
Here is an example:
<table width=100% border=2>
<tr>
<td>this is column 1</td>
<td>this is column 2</td>
<td>this is column 3</td>
</tr>
</table>
I want to see on my posting a table with border size=2 and three columns.
When you posted the above code in my forum, I got a table with three columns. However, the table was preceded with a bunch of empty lines. This is the resultant code that vBulletin generated for the post (I took this using View Source):
<table width=100% border=2>
<br>
<tr>
<br>
<td>this is column 1</td>
<br>
<td>this is column 2</td>
<br>
<td>this is column 3</td>
<br>
</tr>
<br>
</table>
<br>
which adds the <br> command after each line. I want to supress adding that <br> tag, but only for posts which are pre-formatted using HTML tags.
tubedogg
Sat 12th May '01, 2:54am
I think you have to put the code all on one line, like
<table bla><tr><td>blah</td><td>blah</td></tr></table>
etc. At least that's what i remeber from the last time this discussion came up.
In any event, it's because nl2br() is applied to the message before it is displayed. Every time you hit return in the message box, that's a nl (new line) and therefore you get a <br>.
alhatali
Sun 13th May '01, 1:17am
If I want to post only few lines of HTML code, then I can put everything in one line. However, what I want to post spans over a hundred lines.
Mike Sullivan
Sun 13th May '01, 12:10pm
You'll have to create a bbcode (say, [html]) that strips out output from nl2br(). (\n<br>\n I think. May have some \r's too)
Yes, that involves hacking.
Powered by vBulletin™ Version 4.0.2 Copyright © 2010 vBulletin Solutions, Inc. All rights reserved.