Code: Difference between revisions From Online Manual

Jump to: navigation, search
m (Bot: Automated text replacement (-  + ))
m (Used a shorter code snippet that will fit in the BBCcodes page page better)
 
Line 2: Line 2:
|tag=code
|tag=code
|button=code.gif
|button=code.gif
|example=[code]<br/>
|example=[code]
if (node.attributes[i].nodeValue != null)<br/>
if ($message === &#39;&#39;)<br/>
str += ' ' + node.attributes[i].nodeName + '="' + node.attributes[i].nodeValue + '"';<br/>
&nbsp;&nbsp;&nbsp;&nbsp;return &#39;&#39;;
[/code]
[/code]
|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.
|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.
<code><span style="color: #000000"><span style="color: #0000BB"><?php </span><span style="color: #007700">echo </span><span style="color: #DD0000">"Hello world!"</span><span style="color: #007700">; </span><span style="color: #0000BB">?></span></span></code>
<code><span style="color: #000000"><span style="color: #0000BB"><?php </span><span style="color: #007700">echo </span><span style="color: #DD0000">"Hello world!"</span><span style="color: #007700">; </span><span style="color: #0000BB">?></span></span></code>
|result={{code|if (node.attributes[i].nodeValue !{{=}} null)
|result={{code|1=if ($message ===&#39;&#39; )
str +{{=}} ' ' + node.attributes[i].nodeName + '{{=}}"' + node.attributes[i].nodeValue + '"';}}
&nbsp;&nbsp;&nbsp;&nbsp;return &#39;&#39;;}}
}}
}}
[[Category:Bulletin_Board_Code]]
[[Category:Bulletin_Board_Code]]
[[Category:Basic Bulletin Board Code]]
[[Category:Basic Bulletin Board Code]]

Latest revision as of 21:21, 3 May 2014

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 ($message === '')
    return '';

[/code]

result:

if ($message ==='' )
    return '';



Advertisement: