Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Can we just get rid of [source] tags?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 Cornstalks   Crossbones+   -  Reputation: 6999

Posted 31 July 2012 - 11:45 PM

Honestly, they're doing waaay more harm than good. Source tags seriously mangle any code, especially if it has any angle brackets. Can we just get rid of them (and just replace them in existing posts with code tags)?

And as a side note, has IP.Board made any progress on fixing things so that posting and formatting and tags don't get mangled so bad? And is there some way we can disable formatting of text in code tags (like if you copy 'n' paste from Visual Studio, but put the code in code tags, can we just have the formatting removed from everything between code tags?)?
[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

Sponsor:

#2 SiCrane   Moderators   -  Reputation: 10710

Posted 01 August 2012 - 12:06 AM

If you switch editing modes out of the WYSWYG (upper left button on the toolbars above the post textbox) it should strip formatting from anything you paste.

#3 Cornstalks   Crossbones+   -  Reputation: 6999

Posted 01 August 2012 - 12:22 AM

If you switch editing modes out of the WYSWYG (upper left button on the toolbars above the post textbox) it should strip formatting from anything you paste.

I know, but I think the majority of the community does not know this (particularly the newer fellas) (I actually just use Chrome with it's paste-as-plain-text (crtl-shift-v)). But even if the majority of the community knew this and used it, auto-removing formatting from code would be a nice feature. But that doesn't fix the source tags.

I know the GameDev staff has a lot to do with little time, but I have to request this. Actually, what happens when someone makes a request like this? Does it go in some bug tracker as a feature request (or in some scrum system as a user story or whatever)? If so, is it possible to open this to the community so we can see what has been requested (and acknowledged and logged) so we don't pester people with already logged things (maybe don't show bugs (for secureity reasons?) but just feature requests)? And if a feature request is denied, can we get a firm acknowledgment in the thread that "we hear you, but don't currently plan on doing this" so we can know it's been denied instead of forgotten?
[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

#4 Michael Tanczos   Senior Staff   -  Reputation: 5556

Posted 03 August 2012 - 07:24 PM

If you post code from visual studio into a wysiwyg editor, it's going to have the rich formatting already embedded. There is a little code button above that should help at least put the code in. We do have a number of editor fixes from our forum software vendor that should be available soon.. that should resolve most of the problems we've been experiencing.

#5 Cornstalks   Crossbones+   -  Reputation: 6999

Posted 22 September 2012 - 03:28 PM

So... I'm still hopeful we can just get rid of source tags. They eat your code.

Does anyone here actually like source tags? If so, why? I see no benefit to them, and they usually just cause trouble.

Note: I'm talking about source tags, not code tags
[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

#6 Gaiiden   Senior Staff   -  Reputation: 5431

Posted 22 September 2012 - 04:36 PM

I think the real trouble is that we have both source and code tags. We should really only have one, and work to tweak that one to best suit our needs. Code is the original BBCode formatting that comes with the forum, and Source is an add-in script that we put there ourselves. Either can be disabled just as easily but the question is which one? I'm not technical enough (in regards to which is easiest to modify) nor use them enough to have a full opinion but I'd like to hear others. For articles I've used both - Source has given me line numbers when the article uses them for reference and it also has text coloring, although now it appears Code has text coloring too (didn't originally). Source seems to handle nesting indentation better than Code. And yea, the Source box parses HTML, which has been a problem we've known about for months now and either can't patch it ourselves or haven't convinced the author to fix. That alone turns me off to Source... and is a pretty stupid issue to have in a code box script anyhow IMO

Edited by Gaiiden, 22 September 2012 - 04:39 PM.

Drew Sikora
Executive Producer
GameDev.net


#7 Cornstalks   Crossbones+   -  Reputation: 6999

Posted 22 September 2012 - 05:25 PM

I think the real trouble is that we have both source and code tags. We should really only have one, and work to tweak that one to best suit our needs.

Completely agree.

Code is the original BBCode formatting that comes with the forum, and Source is an add-in script that we put there ourselves. Either can be disabled just as easily but the question is which one? I'm not technical enough (in regards to which is easiest to modify) nor use them enough to have a full opinion but I'd like to hear others.

I don't know what it's like on the back end, but for those curios the code tags just use prettify and source tags use SyntaxHighlighter. I'll lay down my thoughts on the two:
prettify pros:
  • More lightweight (or so it seems)
  • (IMO) Better looking (uses just font-family: monospace instead of SyntaxHighlighter's Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier, monospace;)
  • Always highlights (see the link I posted in this thread with the eating of the code... the code is auto-marked with the "plain" brush in SyntaxHighlighter if the user doesn't specify the brush type (and I can never remember exactly how to do that (i.e. is it cpp or cxx or c++ etc)))
  • If JavaScript is disabled, it preserves the background and border of the text box, unlike SyntaxHighlighter, which just does plain monospace text
pretiffy cons:
  • Weird line numbering system (by default it's off; if you turn it on it numbers every 5th line)
  • Doesn't really let you specify the language (you kind of can, but for the most part it just uses "common" keywords)
  • Copy 'n' paste of code copies line numbers (if they're enabled)
SyntaxHighlighter pros:
  • Seems a bit more configurable from what bit of messing around I've done (or at least that it respects the given language more)
  • Shows line numbers by default
  • Copy 'n' paste doesn't copy and paste line numbers
  • Double-click highlighting lets you copy 'n' paste plain text (without formatting)
SyntaxHighlighter cons:
  • Sometimes the javascript is slower and it's really easy to see it change the code from simple <pre> formatted text to syntax highlighted
  • When you double-click to highlight, you can actually edit the text (it changes back though when you click away) (this isn't that big of a deal, it's minor thing, and is what makes copy 'n' paste without formatting work)
  • I don't think it supports quite as many languages as prettify
I don't know how easy it is to add languages to these things. Support for HLSL and GLSL would be cool and useful on these forums. I don't have a huge preference between the two, but I hate SyntaxHighlighter's default look (both font and colors).

Source seems to handle nesting indentation better than Code.

I haven't compared tabs in code/source tags, but I know they get mangled in code tags. Just try creating a post using code tags, indent (with four spaces), post it, then edit that post (you may notice the four spaces got converted to tabs) and save it... It's super frustrating whenever I want to edit a post that I've put code in.

And yea, the Source box parses HTML, which has been a problem we've known about for months now and either can't patch it ourselves or haven't convinced the author to fix. That alone turns me off to Source... and is a pretty stupid issue to have in a code box script anyhow IMO

Yeah, IMO that's dumb. I don't know what's involved in fixing that, but that's one of my biggest turn offs for source tags and the primary reason I created this thread. That "feature" completely makes source tags useless, and is the reason I prefer code tags. If that issue got fixed, I might not have such strong feelings against source tags.
[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS