Why not remove the [code] tag?
Since the code tag doesn't allow scrolling and it takes a huge amount of the page when using longer codes, and people tell that user to use php tag instead, why not simply remove it, or even better - make it work like the php tag, aka replace it? There's literally no point of having a non-scrollable code block when we already have a better version which is used by everyone who isn't new around here.
|
Re: Why not remove the [code] tag?
Or it's always nice to
Spoiler
|
Re: Why not remove the [code] tag?
Remove the [code] tag. Can't scroll and doesn't highlight.
Remove the [php] tag. Almost no one is pasting actual PHP code compared to Pawn or Sourcepawn code. Remove the [pawn] tag. Highlighting is mediocre and it breaks when quoting, editing. |
Re: Why not remove the [code] tag?
Quote:
Almost (if not) all boards has the CODE tag. Not all boards have the PHP tag. In fact, AM is the only board I've seen where there appear to be more for "PHP" (or other tags) than the "CODE" tags. So if you ask me, it would make sense to ditch the PHP tag, and only to keep the CODE tag. In regards to highlighting and other things, there are occasionally board specific things, such as things only available here on AM, as well as for other boards something only available there. With most boards out there, pull requests could possibly be sent towards the upstream of such boards to include syntax highlighting also for Pawn/SourcePawn, as well as other coding/scripting languages. There could be done so many things in regards to different things, but life is never simple, is it? You live yours, I live mine. You have your opinions, I have mine.... In the end, it all turns out that we might go in different directions. But you're "literally" correct: Everything would indeed be much easier if we all had the same opinions and thoughts. ;-) |
Re: Why not remove the [code] tag?
Quote:
PHP Code:
|
Re: Why not remove the [code] tag?
Wat there is a pawn tag?!
Didnt know that! Code:
|
Re: Why not remove the [code] tag?
Code:
|
Re: Why not remove the [code] tag?
Quote:
|
Re: Why not remove the [code] tag?
If I remember correctly, in some cases it removes all new lines from the pawn tag once you quote someone. May be dependent on which text area style you use? I don't know why, but I've seen it happen. That could be the reason why people avoid it.
|
Re: Why not remove the [code] tag?
Try it with the WHYRYT (idk how it's called) post option enabled and see what happens when you edit a post that contains a pawn tag.
@arne1288 - this is not about different opinions, it's about what's wrong and what's right. Why would you want to see and scroll 5000 lines of code just to read all comments in the thread instead of scrolling pass the code block? I don't think that anyone cares what kind of content is used within the tag, people simply prefer to see the code in some colors rather than in pain black. Here's a simple example that demonstrates the difference between the two tags and why the first one should be removed OR enhanced: Code:
Can your scroll wheel handle this?PHP Code:
|
Re: Why not remove the [code] tag?
Lol, did someone add scrolling just when I posted this? :)
|
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.
|
Re: Why not remove the [code] tag?
Quote:
|
Re: Why not remove the [code] tag?
I guess the topic is solved since some anonymous guy anonymously added scrolling.
|
Re: Why not remove the [code] tag?
The code block has always had a height limit with scrolling.
|
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> |
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. |
Re: Why not remove the [code] tag?
Quote:
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:
|
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?
|
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
|
Re: Why not remove the [code] tag?
The pawn tag representation is astonishing. Pretty accurate as well.
|
Re: Why not remove the [code] tag?
Quote:
Quote:
|
Re: Why not remove the [code] tag?
Quote:
Code:
|
Re: Why not remove the [code] tag?
Quote:
|
Re: Why not remove the [code] tag?
Quote:
That makes sense LOL |
Re: Why not remove the [code] tag?
I think that line numbers would be useful in [PAWN] message window.
EDIT: I've also noticed a little issue with horizontal scrolling, like in this spoiler. You have to scroll to the bottom to be able to read the whole text at the top of the spoiled message. Maybe a word wrap could be useful or duplicated horizontal scroll bar? |
| All times are GMT -4. The time now is 01:19. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.