Code: Difference between revisions From Online Manual

Jump to: navigation, search
No edit summary
(Undo revision 16323 by Illori (talk))
Line 8: Line 8:
|description=The <tt>code</tt> tag outputs code directly with simple formatting. Any BB Codes, html, php, javascript, c++, or any other text will be outputted exactly the same. The box will scroll for long lines so that the line breaks are preserved at the correct places, which is important in many languages. This is a block level tag. If php code is placed inside, with the initial &lt;?php tag, then it will be color formated according to php syntax.
|description=The <tt>code</tt> tag outputs code directly with simple formatting. Any BB Codes, html, php, javascript, c++, or any other text will be outputted exactly the same. The box will scroll for long lines so that the line breaks are preserved at the correct places, which is important in many languages. This is a block level tag. If php code is placed inside, with the initial &lt;?php tag, then it will be color formated according to php syntax.
<code><span style="color: #000000"><span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Hello&nbsp;world!"</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">?&gt;</span></span></code>
<code><span style="color: #000000"><span style="color: #0000BB">&lt;?php&nbsp;</span><span style="color: #007700">echo&nbsp;</span><span style="color: #DD0000">"Hello&nbsp;world!"</span><span style="color: #007700">;&nbsp;</span><span style="color: #0000BB">?&gt;</span></span></code>
|result={{code|<nowiki>if (node.attributes&#91;i&#93;.nodeValue != null)
|result=<code>if (node.attributes&#91;i&#93;.nodeValue != null)<br/>
str += ' ' + node.attributes&#91;i&#93;.nodeName + '=&quot;' + node.attributes&#91;i&#93;.nodeValue + '&quot;';</nowiki>}}
str += ' ' + node.attributes&#91;i&#93;.nodeName + '=&quot;' + node.attributes&#91;i&#93;.nodeValue + '&quot;';<br/></code>
}}
}}
[[Category:Bulletin_Board_Code]]
[[Category:Bulletin_Board_Code]]
[[Category:Basic Bulletin Board Code]]
[[Category:Basic Bulletin Board Code]]

Revision as of 10:32, 20 June 2013

button: Code.gif

description: The code tag outputs code directly with simple formatting. Any BB Codes, html, php, javascript, c++, or any other text will be outputted exactly the same. The box will scroll for long lines so that the line breaks are preserved at the correct places, which is important in many languages. This is a block level tag. If php code is placed inside, with the initial <?php tag, then it will be color formated according to php syntax.

<?php echo "Hello world!"?>

example: [code]

if (node.attributes[i].nodeValue != null)
str += ' ' + node.attributes[i].nodeName + '="' + node.attributes[i].nodeValue + '"';

[/code]

result: if (node.attributes[i].nodeValue != null)
str += ' ' + node.attributes[i].nodeName + '="' + node.attributes[i].nodeValue + '"';



Advertisement: