AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Off-Topic (https://forums.alliedmods.net/forumdisplay.php?f=15)
-   -   Why not remove the [code] tag? (https://forums.alliedmods.net/showthread.php?t=296599)

OciXCrom 04-25-2017 09:24

Re: Why not remove the [code] tag?
 
Lol, did someone add scrolling just when I posted this? :)

gabuch2 04-25-2017 09:36

Re: Why not remove the [code] tag?
 
It's WYSIWYG (What you see is what you get) :P Early implementations are very buggy, like AM's for example. No surprise it breaks everything.

edon1337 04-25-2017 09:48

Re: Why not remove the [code] tag?
 
Quote:

Originally Posted by Timocop (Post 2515048)
Wat there is a pawn tag?!
Didnt know that!

Code:
new String:hello[] = "world\" bye bye"; #emit halt #define HelloDef "My god yes" int myInt = 1; // daw

;)

OciXCrom 04-25-2017 13:45

Re: Why not remove the [code] tag?
 
I guess the topic is solved since some anonymous guy anonymously added scrolling.

asherkin 04-25-2017 14:24

Re: Why not remove the [code] tag?
 
The code block has always had a height limit with scrolling.

OciXCrom 04-25-2017 14:35

Re: Why not remove the [code] tag?
 
I don't think so. There have been many cases in which users used the [code] tag for huge codes and it was expanded at the entire page. That was the reason for making this thread. Or... Did it confuse it with the [html] tag? I don't really see any visible difference between [code] and [html]. Just noticed that [html] doesn't have scrolling, so it would be nice if that's added, or simply remove it, since I don't think it makes much difference:

HTML Code:

<h2>Welcome to the HTML editor!</h2>
<p>Just type the HTML and it will be shown below.</p>

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed elementum neque id magna. Mauris sollicitudin nisi sit amet sem. Etiam sit amet lectus a velit interdum facilisis. Vestibulum ante ipsum primis in faucibus orci <strong>luctus et ultrices posuere</strong> cubilia Curae; In tincidunt eleifend neque. Maecenas interdum, neque in fringilla pellentesque, lacus massa eleifend elit, nec scelerisque nulla orci a nunc. Quisque sollicitudin. Sed pulvinar lacus id lacus. Vestibulum imperdiet tellus eget risus. Quisque libero nisl, feugiat eu, euismod at, elementum eget, tellus. <a href="http://www.clesto.com">Clesto.com</a></p>

<img src="http://www.google.se/images/google_80wht.gif" alt="Google logo">

<h2>Heading in h2, som more sample text</h2>

<p>Phasellus sem odio, varius quis, cursus at, ullamcorper eget, turpis. Maecenas a mi. Mauris dignissim lectus malesuada odio. Duis elit arcu, lobortis ut, porta ac, venenatis ornare, odio. Pellentesque scelerisque. Ut elementum laoreet massa. Suspendisse hendrerit odio eget turpis. Cras tellus dui, malesuada id, adipiscing ut, laoreet sed, magna. Phasellus scelerisque aliquet ligula. Quisque vitae elit sit amet enim suscipit interdum. Curabitur laoreet, mauris sit amet aliquet interdum, pede sapien malesuada metus, in tincidunt turpis justo id arcu. Donec gravida odio ac lectus. Nam rutrum ante in nisi laoreet aliquet. Sed at ante.</p>

<h3>Heading in h3, som more sample text</h3>

<p>Nulla facilisi. Nullam cursus scelerisque erat. Praesent convallis rhoncus dui. In hac habitasse platea dictumst. Nullam pellentesque. Mauris ac orci. Donec dictum. Etiam purus tortor, elementum a, posuere nec, pulvinar id, ipsum. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Quisque vel justo. Nullam posuere purus sed arcu.</p>

<ul>
        <li>Nulla facilisi.</li>
        <li>Pellentesque habitant morbi</li>
        <li>Quisque vel justo.</li>
        <li>Nullam posuere purus sed arcu.</li>
</ul>

(the colors are barely noticeable)

asherkin 04-25-2017 14:53

Re: Why not remove the [code] tag?
 
There was a missing { in the template for the [html] tag that was causing the height restriction to not get emitted into the HTML correctly, this is now fixed.

EDIT: The [code], [html], and [php] tags are all from standard vBulletin, we're not going to go and remove core BBCode tags.

Timocop 04-26-2017 03:32

Re: Why not remove the [code] tag?
 
Quote:

Originally Posted by edon1337 (Post 2515134)
;)

Ah i see.

Also seems like the pawn tag isnt actually a real tag, its just some kind parser tag.
If you switch the "Editor Mode" (in the top right corner) 4 times (Or hit Preview post) with a pawn tag somewhere you can see that the pawn tag is gone and instead its font and color hardcoded.

Also if you use a pawn tag inside a pawn tag (bug):
Code:
<!-- Code block --> <div style="margin:20px; margin-top:5px"> <div class="smallfont" style="margin-bottom:2px">Code:</div> <pre class="alt2" dir="ltr" style="margin: 0px;padding: 6px;border: 1px inset;width: auto; height: px; text-align: left; overflow: auto"><div class="pawn" style="font-family: monospace;"><font face=<span style="color: #800080;">"monospace"</span>><font face=<span style="color: #800080;">"monospace"</span>><font face=<span style="color: #800080;">"monospace"</span>><font face=<span style="color: #800080;">"monospace"</span>>new val = <span style="color: #0000dd;">1</span></font></font></font></font></div></pre> </div> <!-- /Code block -->


PHP tag inside PHP tag (correct):
PHP Code:

[PHP]new val 1

[/PHP]

OciXCrom 04-26-2017 08:46

Re: Why not remove the [code] tag?
 
There's nothing correct about having [/php] outside of it. You can't use multiple same tags one in another - what's the point of doing that?

Timocop 04-26-2017 16:38

Re: Why not remove the [code] tag?
 
Of course its correct having [/PHP] outside of it. The PHP tag (and any other) should stop at the first [/PHP] encounter. After that it becomes text again. Unlike the PAWN tag which breaks and prints its HTML code, because its not a "real tag".
Here is a visual what happens:
Spoiler


All times are GMT -4. The time now is 01:19.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.