The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
<pre> Problems
I added the following BBCode to my site:
Title: Pre Name: pr Replacement: <pre>{param}</pre> The same bb code is used here at vbulletin.org as well. Problem is when I hit enter it adds 2 spaces. When I type (without *): [*pre]test test[*/pre] It comes out as: [pre]test test[/pre] Is there a way to remove that second gap it creates? |
#2
|
|||
|
|||
Any solution?
|
#3
|
||||
|
||||
First of all, the BBCode you should be using is [noparse]... Any bbcode in that tag will not be parsed/translated into what it's actually supposed to be.
[pre]test test[/pre] See? No silly * symbols to make things ugly. Next, you must have typoed your replacement, it should be: Code:
Replacement: <pre>{param}</pre> Now then, this issue comes from the "cleaning" that vBulletin does on outputting your stored data. See, vBulletin stores the line breaks in your posts with a \n character. The character is then translated into <br \> upon output - and in the source code vBulletin will insert a newline character after the <br \> so that the actual viewable source code on the page is pretty. Your pre tag catches that <br \> html that vBulletin outputs and correctly outputs a newline. Then it catches the newline after the <br \> and outputs another newline. Can you dig it? Anyway, without implementing a plugin or a change in the .php file source code - there is no way to resolve this issue. Although, a few people explain that they've been able to achieve more desirable results with a different replacement value... Code:
<code style="white-space: pre">{param}</code> Code:
<div style="white-space:nowrap; width:300px; overflow:scroll;"><code>{param}</code></div> According to them, this replacement value works properly in firefox, but not in internet explorer. I haven't tested it... But you're welcome to attempt it. |
#4
|
|||
|
|||
Thx for noparse idea ^ _^
I got the whole thing about vbauto adding the <br /> but thanks for that. I tried the other commands with no luck in google chrome. The first one may show promise in ff but the second only messes things up. This is a matter that doesn't bother me to much. Thanks for you help. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|