aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/docs/coding-guidelines.html
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2009-08-25 09:48:44 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2009-08-25 09:48:44 +0000
commitb47b35a07d47435ecb35aa386783c42721bb4764 (patch)
treec6f2802bf1445252e02d286b5492aafc9bc4149d /phpBB/docs/coding-guidelines.html
parent17f40511bf4df9dd46cd13cbd2c7802c49575783 (diff)
downloadforums-b47b35a07d47435ecb35aa386783c42721bb4764.tar
forums-b47b35a07d47435ecb35aa386783c42721bb4764.tar.gz
forums-b47b35a07d47435ecb35aa386783c42721bb4764.tar.bz2
forums-b47b35a07d47435ecb35aa386783c42721bb4764.tar.xz
forums-b47b35a07d47435ecb35aa386783c42721bb4764.zip
This is an enhancement for revision r10051 (INC template variable)
Within the mentioned revision INC was only able to be applied to defined template variables. I extended it now to work on all supported variables (template vars, defines, loops, defines in loops) I also added a DEC template variable to logically complete this. git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10054 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/docs/coding-guidelines.html')
-rw-r--r--phpBB/docs/coding-guidelines.html12
1 files changed, 10 insertions, 2 deletions
diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html
index 03b2949eba..29fce50b54 100644
--- a/phpBB/docs/coding-guidelines.html
+++ b/phpBB/docs/coding-guidelines.html
@@ -1169,17 +1169,25 @@ append_sid(&quot;{$phpbb_root_path}memberlist.$phpEx&quot;, 'mode=group&amp;amp;
<div class="codebox"><pre>
<span class="comment">&lt;!-- INCLUDE {FILE_VAR} --&gt;</span>
</pre></div>
+
<p>Template defined variables can also be utilised.
+
<div class="codebox"><pre>
<span class="comment">&lt;!-- DEFINE $SOME_VAR = 'my_file.html' --&gt;</span>
<span class="comment">&lt;!-- INCLUDE {$SOME_VAR} --&gt;</span>
</pre></div>
-<p>Also added in <strong>3.0.6</strong> is the ability to increment an variable on use. This can be used for instances like tabindexes, where the amount of entries is not statically known.
-The INC command will print the current state of a defined var and then increment it by one (postincrement).</p>
+
+<p>Also added in <strong>3.0.6</strong> is the ability to increment or decrement a variable on use. This can be used for instances like tabindexes, where the amount of entries is not statically known.
+The INC (for incrementing) and DEC (for decrementing) commands will print the <strong>current</strong> state of a defined var and then increment/decrement it by one (postincrement/postdecrement).</p>
+
<div class="codebox"><pre>
<span class="comment">&lt;!-- DEFINE $SOME_VAR = 1 --&gt;</span>
<span class="comment">&lt;!-- INC $SOME_VAR --&gt;</span>
+Result: 1<br />
+<span class="comment">{$SOME_VAR}</span>
+Result: 2<br />
</pre></div>
+
<h4>PHP</h4>
<p>A contentious decision has seen the ability to include PHP within the template introduced. This is achieved by enclosing the PHP within relevant tags:</p>