1 (edited by 2011-05-23 05:35:32)

Topic: Before posting long code...

When posting code that is more than a handful of lines long, it is best to use codebox instead of code.
Here's an example:

[code]Using the [code] tag is best for this[/code]

<div class='codetop'>CODE</div><div class='codemain' style='height:200px;white-space:pre;overflow:auto'>Whereas the codebox tag
is best for this
or this

or perhaps this...









...it can even create scrollbars </div>

To do this just place your code in the codebox tags:

[codebox] my code goes here [/codebox]
It's easier to read, saves scrolling space. Please use [code] if your code is not too long! Ironically, [codebox] would use more space than [code] and might produce a horizontal scrolling bar.

Edit FUNimations: Sometimes, codebox does not work. Codebox is not replaced in the preview feature of this forum (when posting).

If you are putting a HTML, PHP or mdu code of a whole file up in a post do not use any of the code tags but paste it to http://pastebin.com (and then give us the link) or upload the file instead. You can do this by clicking on the Browse button next to File Attachments then click Add This Attachment, note this can only be done in Add Reply or Add Topic modes, not Fast Reply https://cutephp.com/forum/style_emoticons/default/wink.gif