MSFN Forum: Code tag is weird... - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Code tag is weird... Rate Topic: -----

#1 User is offline   Dumpy Dooby 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 424
  • Joined: 16-May 05

Posted 07 June 2006 - 08:22 AM

Could we get a different code tag? The one here displays the code awkwardly. It has a wordwrap which just doesn't look right with code (who codes with wordwrap on?). I think it should be in a div with overflow: auto or something similar.

I'd be more than willing to write it, while taking multiple browsers into consideration. :)

This post has been edited by Dumpy Dooby: 07 June 2006 - 08:23 AM



#2 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,117
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 07 June 2006 - 10:14 AM

Use
 
 and  
, you will get scrollbars instead of wrap. The only problem this presents is it is really ugly if you require less than about six lines of code, because there is a minimum box height set.

Also bear in mind that in most coding it is generally accepted good practice to keep your lines to less than 80 characters in length.

This post has been edited by Alanoll: 22 June 2006 - 09:41 PM


#3 User is offline   Dumpy Dooby 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 424
  • Joined: 16-May 05

Posted 07 June 2006 - 06:35 PM

Thanks. I actually didn't know either of those.

#4 User is offline   Djé 

  • accent artist
  • PipPipPip
  • Group: Members
  • Posts: 359
  • Joined: 10-January 06

Posted 08 June 2006 - 12:09 AM

Actually, what I miss the most with the code tag is the syntaxical coloration.
this would be so much better and faster to catch the the aim and mechanism of a piece of code.
For example, I know pretty well Visual Basic (for application but hey...) but I could never read any Visual Basic code posted on the forum. Especially those with a lot of comments to explain the code!!!!

- AutoIt forum has an [AutoIt] tag, although not so much used.
- PHP has a buit-in syntaxical coloration function.
- modules for other languages (js, sql, etc.) do exists in php. I used to use them in a wiki (wikini).
Why not implementing a few of them?

#5 User is offline   Camarade_Tux 

  • MSFN Addict
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,760
  • Joined: 22-May 05

Posted 22 June 2006 - 12:46 PM

So, if I use
 
waaa
But I 
still
wonder
why
Yzöwl
was able
to write them
without
actually
getting
the
codebox
 :? 
 
, I should get a nice thing ?

edit, OK, I do. :)

edit2: it would be better if it width was maximal. :}

This post has been edited by Camarade_Tux: 22 June 2006 - 12:48 PM


#6 User is offline   Yzöwl 

  • Wise Owl
  • Group: Super Moderator
  • Posts: 4,117
  • Joined: 13-October 04
  • OS:Windows 7 x64

Posted 23 June 2006 - 03:02 AM

Thanks Alanoll, by editing my post, youve completely changed what I had to say. I will say it again here, however, if ther is some reason after sixteen days why what I had wrote was in some way in breach of some rule, please let me know by PM, Thanks.
What it said was:
[CODEBOX] [/CODEBOX]
<Edit>
Or more correctly:
[CODEBOX] and [/CODEBOX]

</Edit>

This post has been edited by Yzöwl: 23 June 2006 - 03:07 AM


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy