The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Hand coding custom BB code
Hello,
I need to create a clone of [code] by editing the vbulletin files. We are currently trying to create custom BB code that will parse its contents with white-spacing and fixed width (similar to [code] tag). This is how we do it using the admincp custom bb code menu: <pre style="font-family:"Courier New", Courier, monospace !important;"> Your tabs here </pre> However, the WYSIWYG editor still adds <br> tags to every new line, resulting in twice as many new lines as we need: <pre style="font-family:"Courier New", Courier, monospace !important;"> Lorum ipsum<br> dolor ist </pre> shows as: Lorum ipsum dolor ist So how do I "carbon-copy" [code] but change the name to [chords] and change it's div width? Thanks! [EDIT] Just to add, I know next to nothing about how vBulletin uses "hooks" and "callbacks". I know PHP 4, but not too familiar with PHP 5's OOP. I am currently looking at https://vborg.vbsupport.ru/showthread.php?t=200769 for help. |
#2
|
||||
|
||||
well if <br> dosent work for me i would usually try something entirely different..
<p></p> perhaps.. <br /> same as <br> but for sometimes it changes something. just a few suggestions. wouldnt know, just experiment. |
#3
|
||||
|
||||
Wouldn't this as a custom BBCode essential do the same thing:
Code:
<div style="white-space: pre;width:300px; overflow:scroll"><code>{param}</code></div> |
#4
|
|||
|
|||
Quote:
This is why I need to hard code it in vBulletin so I can override the nl2br part of the bbcode |
#5
|
||||
|
||||
So your saying that it converts the literal posting of a <br /> tag into an actual carriage return?
|
#6
|
|||
|
|||
Quote:
So in the WYSIWYG editor: Code:
Lorum ipsum dolor ist Code:
Lorum ipsum dolor ist HTML Code:
<pre> Lorum ipmsum<br /> dolor ist </pre> |
#7
|
||||
|
||||
So if I'm understanding your right, you don't mind the breaking space, as long as it doesn't double it up.
If that's the case, I think pre, whether you use CSS or the HTML tag, automatically double spaces lines. I tried this and got the results I believe your looking for: Code:
<div style="white-space:nowrap; width:300px; overflow:scroll;"><code>{param}</code></div> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|