Raised This Month: $51 Target: $400
 12% 

Why not remove the [code] tag?


Post New Thread Reply   
 
Thread Tools Display Modes
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-25-2017 , 09:24   Re: Why not remove the [code] tag?
Reply With Quote #11

Lol, did someone add scrolling just when I posted this?
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 04-25-2017 , 09:36   Re: Why not remove the [code] tag?
Reply With Quote #12

It's WYSIWYG (What you see is what you get) Early implementations are very buggy, like AM's for example. No surprise it breaks everything.
__________________
gabuch2 is offline
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 04-25-2017 , 09:48   Re: Why not remove the [code] tag?
Reply With Quote #13

Quote:
Originally Posted by Timocop View Post
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
;)
__________________
edon1337 is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-25-2017 , 13:45   Re: Why not remove the [code] tag?
Reply With Quote #14

I guess the topic is solved since some anonymous guy anonymously added scrolling.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 04-25-2017 , 14:24   Re: Why not remove the [code] tag?
Reply With Quote #15

The code block has always had a height limit with scrolling.
__________________
asherkin is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-25-2017 , 14:35   Re: Why not remove the [code] tag?
Reply With Quote #16

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)
__________________

Last edited by OciXCrom; 04-25-2017 at 14:38.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
asherkin
SourceMod Developer
Join Date: Aug 2009
Location: OnGameFrame()
Old 04-25-2017 , 14:53   Re: Why not remove the [code] tag?
Reply With Quote #17

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.
__________________

Last edited by asherkin; 04-25-2017 at 14:57.
asherkin is offline
Timocop
AlliedModders Donor
Join Date: Mar 2013
Location: Germany
Old 04-26-2017 , 03:32   Re: Why not remove the [code] tag?
Reply With Quote #18

Quote:
Originally Posted by edon1337 View Post
;)
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]
Timocop is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 04-26-2017 , 08:46   Re: Why not remove the [code] tag?
Reply With Quote #19

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?
__________________

Last edited by OciXCrom; 04-26-2017 at 08:46.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Timocop
AlliedModders Donor
Join Date: Mar 2013
Location: Germany
Old 04-26-2017 , 16:38   Re: Why not remove the [code] tag?
Reply With Quote #20

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

Last edited by Timocop; 04-26-2017 at 16:39.
Timocop is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 22:36.


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