From cbed011ee3ca1fb545c23b2feba84a329a0f65c5 Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Tue, 21 Jul 2009 22:51:39 +0000 Subject: Adding info on the VCS to coding guidelines git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9817 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/coding-guidelines.html | 65 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 63 insertions(+), 2 deletions(-) (limited to 'phpBB/docs/coding-guidelines.html') diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index bfd134faac..32312054d9 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -86,6 +86,12 @@
  • Writing Style
  • +
  • VCS Guidelines +
      +
    1. Repository structure
    2. +
    3. Commit messages
    4. +
    +
  • Guidelines Changelog
  • Copyright and disclaimer
  • @@ -2252,12 +2258,67 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
    -

    7. Guidelines Changelog

    +

    7. VCS Guidelines

    +
    +

    The version control system for phpBB3 is subversion. The repository is available at http://code.phpbb.com/svn/phpbb. + +

    7.i. Repository Structure

    + +
      +
    • trunk
      The latest unstable development version with new features etc. Contains the actual board in /trunk/phpBB
    • +
    • branches
      Development branches of stable phpBB releases. Copied from /trunk at the time of release. +
        +
      • phpBB3.0/branches/phpBB-3_0_0/phpBB
        Development branch of the stable 3.0 line. Bug fixes are applied here.
      • +
      • phpBB2/branches/phpBB-2_0_0/phpBB
        Old phpBB2 development branch.
      • +
      +
    • +
    • tags
      Released versions. Copies of trunk or the respective branch, made at the time of release. +
        +
      • /tags/release_3_0_BX
        Beta release X of the 3.0 line.
      • +
      • /tags/release_3_0_RCX
        Release candidate X of the 3.0 line.
      • +
      • /tags/release_3_0_X-RCY
        Release candidate Y of the stable 3.0.X release.
      • +
      • /tags/release_3_0_X
        Stable 3.0.X release.
      • +
      • /tags/release_2_0_X
        Old stable 2.0.X release.
      • +
      +
    • +
    + +

    7.ii. Commit Messages

    + +

    The commit message should contain a brief explanation of all changes made within the commit. Often identical to the changelog entry. A bug ticket can be referenced by specifying the ticket ID with a hash, e.g. #12345. A reference to another revision should simply be prefixed with r, e.g. r12345.

    + +

    Junior Developers need to have their patches approved by a development team member first. The commit message must end in a line with the following format:

    + +
    +Authorised by: developer1[, developer2[, ...]]
    +	
    + +
    + + + +
    +
    + +
    + +

    8. Guidelines Changelog

    +
    +
    + +
    + + +

    Revision 9817

    + +
      +
    • Added VCS section.
    • +

    Revision 8732

    @@ -2330,7 +2391,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
    -

    8. Copyright and disclaimer

    +

    9. Copyright and disclaimer

    -- cgit v1.2.1 From e4b60c6d8a672fc2f59dd599cd347f3d25962def Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Sat, 25 Jul 2009 10:23:05 +0000 Subject: Add some docs for dynamic includes adding in r9570 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9848 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/coding-guidelines.html | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'phpBB/docs/coding-guidelines.html') diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 32312054d9..37bad06587 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -1116,6 +1116,16 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&

    You will note in the 3.0 templates the major sources start with <!-- INCLUDE overall_header.html --> or <!-- INCLUDE simple_header.html -->, etc. In 2.0.x control of "which" header to use was defined entirely within the code. In 3.0.x the template designer can output what they like. Note that you can introduce new templates (i.e. other than those in the default set) using this system and include them as you wish ... perhaps useful for a common "menu" bar or some such. No need to modify loads of files as with 2.0.x.

    +

    Added in 3.0.6 is the ability to include a file using a template variable to specify the file, this functionality only works for root variables (i.e. not block variables).

    +
    +<!-- INCLUDE {FILE_VAR} -->
    +
    +

    Template defined variables can also be utilised. +

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

    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 From fe01a43d453f81e4c6229eed2d40e2281a7dcffa Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 17 Aug 2009 14:42:27 +0000 Subject: Added section about special constants able to be used. git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10007 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/coding-guidelines.html | 59 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 3 deletions(-) (limited to 'phpBB/docs/coding-guidelines.html') diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 37bad06587..37b9629362 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -57,6 +57,7 @@
  • Editor Settings
  • File Header
  • File Locations
  • +
  • Special Constants
  • Code Layout/Guidelines @@ -223,6 +224,54 @@ class ...
  • styles
    /styles, style.php
    phpBB Styles/Templates/Themes/Imagesets
  • + 1.iv. Special Constants + +

    There are some special constants application developers are able to utilize to bend some of phpBB's internal functionality to suit their needs.

    + +
    +PHPBB_MSG_HANDLER          (overwrite message handler)
    +PHPBB_DB_NEW_LINK          (overwrite new_link parameter for sql_connect)
    +PHPBB_ROOT_PATH            (overwrite $phpbb_root_path)
    +PHPBB_ADMIN_PATH           (overwrite $phpbb_admin_path)
    +PHPBB_USE_BOARD_URL_PATH   (use generate_board_url() for image paths instead of $phpbb_root_path)
    +PHPBB_DISABLE_ACP_EDITOR   (disable ACP style editor for templates)
    +PHPBB_DISABLE_CONFIG_CHECK (disable ACP config.php writeable check)
    +
    +PHPBB_ACM_MEMCACHE_PORT     (overwrite memcached port, default is 11211)
    +PHPBB_ACM_MEMCACHE_COMPRESS (overwrite memcached compress setting, default is disabled)
    +PHPBB_ACM_MEMCACHE_HOST     (overwrite memcached host name, default is localhost)
    +
    +PHPBB_QA                   (Set board to QA-Mode, which means the updater also checks for RC-releases)
    +
    + +

    PHPBB_USE_BOARD_URL_PATH

    + +

    If the PHPBB_USE_BOARD_URL_PATH constant is set to true, phpBB uses generate_board_url() (this will return the boards url with the script path included) on all instances where web-accessible images are loaded. The exact locations are:

    + +
      +
    • /includes/session.php - user::img()
    • +
    • /includes/functions_content.php - smiley_text()
    • +
    + +

    Path locations for the following template variables are affected by this too:

    + +
      +
    • {T_THEME_PATH} - styles/xxx/theme
    • +
    • {T_TEMPLATE_PATH} - styles/xxx/template
    • +
    • {T_SUPER_TEMPLATE_PATH} - styles/xxx/template
    • +
    • {T_IMAGESET_PATH} - styles/xxx/imageset
    • +
    • {T_IMAGESET_LANG_PATH} - styles/xxx/imageset/yy
    • +
    • {T_IMAGES_PATH} - images/
    • +
    • {T_SMILIES_PATH} - $config['smilies_path']/
    • +
    • {T_AVATAR_PATH} - $config['avatar_path']/
    • +
    • {T_AVATAR_GALLERY_PATH} - $config['avatar_gallery_path']/
    • +
    • {T_ICONS_PATH} - $config['icons_path']/
    • +
    • {T_RANKS_PATH} - $config['ranks_path']/
    • +
    • {T_UPLOAD_PATH} - $config['upload_path']/
    • +
    • {T_STYLESHEET_LINK} - styles/xxx/theme/stylesheet.css (or link to style.php if css is parsed dynamically)
    • +
    • New template variable {BOARD_URL} for the board url + script path.
    • +
    +
    @@ -1123,7 +1172,7 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;

    Template defined variables can also be utilised.

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

    PHP

    @@ -2297,13 +2346,13 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) - +

    7.ii. Commit Messages

    The commit message should contain a brief explanation of all changes made within the commit. Often identical to the changelog entry. A bug ticket can be referenced by specifying the ticket ID with a hash, e.g. #12345. A reference to another revision should simply be prefixed with r, e.g. r12345.

    Junior Developers need to have their patches approved by a development team member first. The commit message must end in a line with the following format:

    - +
     Authorised by: developer1[, developer2[, ...]]
     	
    @@ -2322,7 +2371,11 @@ Authorised by: developer1[, developer2[, ...]]
    +

    Revision 10007

    +

    Revision 9817

    -- cgit v1.2.1 From 03568fd176501c6a6c629590ab701eadef5841aa Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Mon, 24 Aug 2009 15:12:40 +0000 Subject: Add INC (working name) to template syntax git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10051 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/coding-guidelines.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'phpBB/docs/coding-guidelines.html') diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 37b9629362..03b2949eba 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -1174,7 +1174,12 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp; <!-- 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).

    +
    +<!-- DEFINE $SOME_VAR = 1 -->
    +<!-- INC $SOME_VAR -->
    +

    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 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/coding-guidelines.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'phpBB/docs/coding-guidelines.html') 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&amp;
     <!-- 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 From fd24241044338f9210319398ae10bc6ad02983ea Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sun, 30 Aug 2009 11:15:24 +0000 Subject: Revert INC/DEC feature. It is not consistent with the other template variables - bad idea. ;) We will get to it though... but not now. git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10064 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/coding-guidelines.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'phpBB/docs/coding-guidelines.html') diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 29fce50b54..8ac2e4e89d 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -1176,7 +1176,7 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp; <!-- DEFINE $SOME_VAR = 'my_file.html' --> <!-- INCLUDE {$SOME_VAR} -->
    - +

    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