From b47b35a07d47435ecb35aa386783c42721bb4764 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Tue, 25 Aug 2009 09:48:44 +0000 Subject: 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 --- phpBB/docs/CHANGELOG.html | 2 +- phpBB/docs/coding-guidelines.html | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'phpBB/docs') diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 0d9409b142..0922372a78 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -282,7 +282,7 @@
  • [Feature] Separate PM Reply and PM Reply to all in prosilver.
  • [Feature] Place debug notices during captcha rendering in the error log - useful for debugging output already started errors.
  • [Feature] Ability to define constant PHPBB_USE_BOARD_URL_PATH to use board url for images/avatars/ranks/imageset...
  • -
  • [Feature] Added INC command to template syntax.
  • +
  • [Feature] Added INC/DEC command to template syntax, applicable to DEFINES and normal template variables, including loops.
  • 1.ii. Changes since 3.0.4

    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("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&
     <!-- INCLUDE {FILE_VAR} -->
     
    +

    Template defined variables can also be utilised. +

     <!-- DEFINE $SOME_VAR = 'my_file.html' -->
     <!-- INCLUDE {$SOME_VAR} -->
     
    -

    Also added in 3.0.6 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).

    + +

    Also added in 3.0.6 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 current state of a defined var and then increment/decrement it by one (postincrement/postdecrement).

    +
     <!-- DEFINE $SOME_VAR = 1 -->
     <!-- INC $SOME_VAR -->
    +Result: 1
    +{$SOME_VAR} +Result: 2
    +

    PHP

    A contentious decision has seen the ability to include PHP within the template introduced. This is achieved by enclosing the PHP within relevant tags:

    -- cgit v1.2.1