Skip to end of metadata
Go to start of metadata

<p><ac:emoticon ac:name="warning" /> still using old version of code macro, as the new version has a few bad bugs in it still. They have been reported to macro author.</p>
<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
$x = 5;
if (x == 1) {
$this.y = x;
}
]]></ac:plain-text-body></ac:macro>
<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
$x = 5;
if (x == 1) {
$this.y = x;
}
]]></ac:plain-text-body></ac:macro>
<ac:macro ac:name="code"><ac:plain-text-body><![CDATA[
Class_Name
]]></ac:plain-text-body></ac:macro>
<table><tbody>
<tr>
<th><p> Delphi </p></th>
<th><p> PHP </p></th>
<th><p> C/C++ </p></th>
</tr>
<tr>
<td><p> for i:=0 to 5 do <br class="atl-forced-newline" />
begin <br class="atl-forced-newline" />
     {* the code *} <br class="atl-forced-newline" />
end; </p></td>
<td><p> for($i=0; $i<=5; $i++) { <br class="atl-forced-newline" />
     /* the code */ <br class="atl-forced-newline" />
} </p></td>
<td><p> for(int i=0; i<=5; i++) { <br class="atl-forced-newline" />
     /* the code */ <br class="atl-forced-newline" />
} </p></td>
</tr>
</tbody></table>

<h2>New Code Macro test</h2>

<p><a href="http://confluence.atlassian.com/display/CONFEXT/New+Code+Macro">http://confluence.atlassian.com/display/CONFEXT/New+Code+Macro</a></p>
<table><tbody>
<tr>
<th><p> Parameter </p></th>
<th><p> Required </p></th>
<th><p> Description </p></th>
</tr>
<tr>
<td><p> language </p></td>
<td><p> no </p></td>
<td><p> (default param) the language to highlight, see below for support </p></td>
</tr>
<tr>
<td><p> collapse </p></td>
<td><p> no </p></td>
<td><p> "true" will collapse the code fragment by default </p></td>
</tr>
<tr>
<td><p> linenumbers </p></td>
<td><p> no </p></td>
<td><p> "true" will show line numbers in the left gutter (default: false) </p></td>
</tr>
<tr>
<td><p> firstline </p></td>
<td><p> no </p></td>
<td><p> if showing line numbers, where to start numbering from (default 1) </p></td>
</tr>
<tr>
<td><p> controls </p></td>
<td><p> no </p></td>
<td><p> "true" will show controls at the top of the code fragment to copy and print (default: false) </p></td>
</tr>
<tr>
<td><p> macro body </p></td>
<td><p> yes </p></td>
<td><p> the code to format </p></td>
</tr>
</tbody></table>

<ac:macro ac:name="code"><ac:parameter ac:name="language">php</ac:parameter><ac:parameter ac:name="controls">true</ac:parameter><ac:parameter ac:name="linenumbers">true</ac:parameter><ac:plain-text-body><![CDATA[
class Test
{
function __construct()

Unknown macro: { echo 'hello world!'; }

}
]]></ac:plain-text-body></ac:macro>

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jan 21, 2008

    <ac:macro ac:name="code"><ac:default-parameter>PHP</ac:default-parameter><ac:plain-text-body><![CDATA[
    public function __call($method, $params)
    {
    $priority = strtoupper($method);
    if (($priority = array_search($priority, $this->_priorities)) !== false)

    Unknown macro: { $this->log(array_shift($params), $priority, array_slice(debug_backtrace(), 1)); }

    else

    Unknown macro: { throw new Zend_Log_Exception('Bad log priority'); }

    }

    ]]></ac:plain-text-body></ac:macro>