Code: Difference between revisions From Online Manual

Jump to: navigation, search
(Created page with '<tr><td><center><span style="font-size: 12pt;" class="bbc_size"><tt>'''<span id="post_code">code</span>'''</tt></span></center></td><td><center>'''Code'''</center></td><td><cente…')
 
No edit summary
Line 2: Line 2:


<tr><td><nowiki>[code]if (node.attributes[i].nodeValue != null)
<tr><td><nowiki>[code]if (node.attributes[i].nodeValue != null)
str += &#039; &#039; + node.attributes[i].nodeName + &#039;=&quot;&#039; + node.attributes[i].nodeValue + &#039;&quot;&#039;;[/code]</nowiki></td><td>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.</td><td><div class="codeheader">: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation"></a></div><code>if (node.attributes[i].nodeValue != null)
str += &#039; &#039; + node.attributes[i].nodeName + &#039;=&quot;&#039; + node.attributes[i].nodeValue + &#039;&quot;&#039;;[/code]</nowiki></td><td>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.
str += &#039; &#039; + node.attributes[i].nodeName + &#039;=&quot;&#039; + node.attributes[i].nodeValue + &#039;&quot;&#039;;</code></td></tr>
<code>if (node.attributes[i].nodeValue != null)
str += &#039; &#039; + node.attributes[i].nodeName + &#039;=&quot;&#039; + node.attributes[i].nodeValue + &#039;&quot;&#039;;</code></td></tr>


<tr><td><nowiki>&#91;code&#93;&lt;?php echo &quot;Hello world!&quot;; ?&gt;&#91;/code&#93;</nowiki></td><td>If php code is placed inside, with the initial &lt;?php tag, then it will be color formated according to php syntax.</td><td><div class="codeheader">: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation"></a></div><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></td></tr>
<tr><td><nowiki>&#91;code&#93;&lt;?php echo &quot;Hello world!&quot;; ?&gt;</code></nowiki></td><td>If php code is placed inside, with the initial &lt;?php tag, then it will be color formated according to php syntax.</td><td><div class="codeheader">: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation"></a></div><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></td></tr>

Revision as of 00:00, 8 May 2010

code
Code
<img src="http://docs.simplemachines.org/Themes/default/images/bbc/code.gif" alt="" class="bbc_img" />

[code]if (node.attributes[i].nodeValue != null) str += ' ' + node.attributes[i].nodeName + '="' + node.attributes[i].nodeValue + '"';[/code]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 (node.attributes[i].nodeValue != null)

str += ' ' + node.attributes[i].nodeName + '="' + node.attributes[i].nodeValue + '"'; [code]<?php echo "Hello world!"; ?></code>If php code is placed inside, with the initial <?php tag, then it will be color formated according to php syntax.

: <a href="javascript:void(0);" onclick="return smfSelectText(this);" class="codeoperation"></a>

<?php echo "Hello world!"?>



Advertisement: