From cc1ac794502e116f3367c12cc0e4fa272d0a29ec Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Fri, 1 Feb 2008 12:47:00 +0000 Subject: fixing one small typo git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8360 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/coding-guidelines.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/docs/coding-guidelines.html') diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 124ac74bb9..5ad2627d6e 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -1059,7 +1059,7 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp; <!-- END loopname --> -

A bit later loops will be explained further. To not irretate you we will explain conditionals as well as other statements first.

+

A bit later loops will be explained further. To not irritate you we will explain conditionals as well as other statements first.

Including files

Something that existed in 2.0.x which no longer exists in 3.0.x is the ability to assign a template to a variable. This was used (for example) to output the jumpbox. Instead (perhaps better, perhaps not but certainly more flexible) we now have INCLUDE. This takes the simple form:

-- cgit v1.2.1 From 6accc46024d436e69802793956653412cde8f404 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 23 Feb 2008 13:18:33 +0000 Subject: some language/style/code fixes (refer to the diff of the changelog) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8389 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/coding-guidelines.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/docs/coding-guidelines.html') diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 5ad2627d6e..837ae55227 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -110,7 +110,7 @@

If entered with tabs (replace the {TAB}) both equal signs need to be on the same column.

Linefeeds:

-

Ensure that your editor is saving files in the UNIX format. This means lines are terminated with a newline, not with a CR/LF combo as they are on Win32, or whatever the Mac uses. Any decent editor should be able to do this, but it might not always be the default. Know your editor. If you want advice on Windows text editors, just ask one of the developers. Some of them do their editing on Win32.

+

Ensure that your editor is saving files in the UNIX (LF) line ending format. This means that lines are terminated with a newline, not with Windows Line endings (CR/LF combo) as they are on Win32 or Classic Mac (CR) Line endings. Any decent editor should be able to do this, but it might not always be the default setting. Know your editor. If you want advice for an editor for your Operating System, just ask one of the developers. Some of them do their editing on Win32.

1.ii. File Header

-- cgit v1.2.1 From 378684cde3b8af2f4b96a1e2575fbad123760eac Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Wed, 4 Jun 2008 14:44:33 +0000 Subject: spelling mistake git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8596 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/coding-guidelines.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/docs/coding-guidelines.html') diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 837ae55227..7d777056d9 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -1450,7 +1450,7 @@ div

What are Unicode, UCS and UTF-8?

-

The Universal Character Set (UCS) described in ISO/IEC 10646 consists of a large amount of characters. Each of them has a unique name and a code point which is an integer number. Unicode - which is an industry standard - complements the Universal Character Set with further information about the characters' properties and alternative character encodings. More information on Unicode can be found on the Unicode Consortium's website. One of the Unicode encodings is the 8-bit Unicode Transformation Format (UTF-8). It encodes characters with up to four bytes aiming for maximum compatability with the American Standard Code for Information Interchange which is a 7-bit encoding of a relatively small subset of the UCS.

+

The Universal Character Set (UCS) described in ISO/IEC 10646 consists of a large amount of characters. Each of them has a unique name and a code point which is an integer number. Unicode - which is an industry standard - complements the Universal Character Set with further information about the characters' properties and alternative character encodings. More information on Unicode can be found on the Unicode Consortium's website. One of the Unicode encodings is the 8-bit Unicode Transformation Format (UTF-8). It encodes characters with up to four bytes aiming for maximum compatibility with the American Standard Code for Information Interchange which is a 7-bit encoding of a relatively small subset of the UCS.

phpBB's use of Unicode

Unfortunately PHP does not faciliate the use of Unicode prior to version 6. Most functions simply treat strings as sequences of bytes assuming that each character takes up exactly one byte. This behaviour still allows for storing UTF-8 encoded text in PHP strings but many operations on strings have unexpected results. To circumvent this problem we have created some alternative functions to PHP's native string operations which use code points instead of bytes. These functions can be found in /includes/utf/utf_tools.php. They are also covered in the phpBB3 Sourcecode Documentation. A lot of native PHP functions still work with UTF-8 as long as you stick to certain restrictions. For example explode still works as long as the first and the last character of the delimiter string are ASCII characters.

-- cgit v1.2.1 From cf3d5c3416f6f1a319128568413e310ca153d87b Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Mon, 28 Jul 2008 13:29:46 +0000 Subject: force the use of sql_multi_insert() for multi inserts... also adjusted the coding guidelines accordingly. git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8693 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/coding-guidelines.html | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 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 7d777056d9..1e7faf88e5 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -690,7 +690,29 @@ $sql = 'UPDATE ' . SOME_TABLE . ' $db->sql_query($sql); -

The $db->sql_build_array() function supports the following modes: INSERT (example above), INSERT_SELECT (building query for INSERT INTO table (...) SELECT value, column ... statements), MULTI_INSERT (for returning extended inserts), UPDATE (example above) and SELECT (for building WHERE statement [AND logic]).

+

The $db->sql_build_array() function supports the following modes: INSERT (example above), INSERT_SELECT (building query for INSERT INTO table (...) SELECT value, column ... statements), UPDATE (example above) and SELECT (for building WHERE statement [AND logic]).

+ +

sql_multi_insert():

+ +

If you want to insert multiple statements at once, please use the separate sql_multi_insert() method. An example:

+ +
+$sql_ary = array();
+
+$sql_ary[] = array(
+	'somedata'		=> $my_string_1,
+	'otherdata'		=> $an_int_1,
+	'moredata'		=> $another_int_1,
+);
+
+$sql_ary[] = array(
+	'somedata'		=> $my_string_2,
+	'otherdata'		=> $an_int_2,
+	'moredata'		=> $another_int_2,
+);
+
+$db->sql_multi_insert(SOME_TABLE, $sql_ary);
+	

sql_in_set():

@@ -2195,6 +2217,13 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
+

Revision 8596+

+ +
    +
  • Removed sql_build_array('MULTI_INSERT'... statements.
  • +
  • Added sql_multi_insert() explanation.
  • +
+

Revision 1.31

    -- cgit v1.2.1 From b6d3eff8c8ae6888364c287afc0d2fc1d2079017 Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Wed, 30 Jul 2008 11:45:44 +0000 Subject: updated to mention template changes git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8732 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/coding-guidelines.html | 51 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 4 deletions(-) (limited to 'phpBB/docs/coding-guidelines.html') diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 1e7faf88e5..2f333756d0 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -69,7 +69,15 @@
  • Styling
  • -
  • Templating
  • +
      +
    1. Style Config Files
    2. +
    3. General Styling Rules
    4. +
    +
  • Templating +
      +
    1. General Templating
    2. +
    3. Template Fallbacks
    4. +
  • Character Sets and Encodings
  • Translation (i18n/L10n) Guidelines
      @@ -995,8 +1003,15 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;
      - -

      General things

      +

      3.i. Style Config Files

      +

      Style cfg files are simple name-value lists with the information necessary for installing a style. Similar cfg files exist for templates, themes and imagesets. These follow the same principle and will not be introduced individually. The important part of the style configuration file is assigning an unique name.

      +
      +# General Information about this style
      +name = prosilver
      +copyright = © phpBB Group, 2007
      +version = 3.0.2
      +	
      +

      3.2. General Styling Rules

      Templates should be produced in a consistent manner. Where appropriate they should be based off an existing copy, e.g. index, viewforum or viewtopic (the combination of which implement a range of conditional and variable forms). Please also note that the intendation and coding guidelines also apply to templates where possible.

      The outer table class forumline has gone and is replaced with tablebg.

      @@ -1063,7 +1078,8 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;
      - +

      4.i. General Templating

      +

      File naming

      Firstly templates now take the suffix ".html" rather than ".tpl". This was done simply to make the lifes of some people easier wrt syntax highlighting, etc.

      @@ -1451,6 +1467,25 @@ div </fieldset> </form>

      + +

      4.ii. Template Fallbacks

      +

      When basing a new template on an existing one, it is not necessary to provide all template files. By declaring the template to be "inheriting" in the template configuration file.

      +

      The Limitation on this is that the base style has to installed and complete, meaning that it is not itself using a fallback.

      +

      The effect of doing so is that the template engine will use the files in the new template where they exist, but fall back to files in the base template otherwise. Declaring a style to be inheriting also causes it to use some of the configuration settings of the base style, notably database storage.

      +

      We strongly encourage the use of fallbacks for styles based on the bundled styles, as it will ease the update procedure.

      +
      +		# General Information about this template
      +		name = inherits
      +		copyright = © phpBB Group, 2007
      +		version = 3.0.2
      +
      +		# Defining a different template bitfield
      +		template_bitfield = lNg=
      +
      +		# Are we inheriting?
      +		inherit_from = prosilver
      +		
      +
      @@ -2217,6 +2252,14 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
      + +

      Revision 8732

      + +
        +
      • Added cfg files.
      • +
      • Added template fallbacks.
      • +
      +

      Revision 8596+

        -- cgit v1.2.1 From ee7b8834e3fff0c2734740288617f7879cb80ff6 Mon Sep 17 00:00:00 2001 From: Henry Sudhof Date: Fri, 29 Aug 2008 12:03:23 +0000 Subject: minor fixes to guidelines git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8798 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/coding-guidelines.html | 39 +++++++++++++++++++++------------------ 1 file changed, 21 insertions(+), 18 deletions(-) (limited to 'phpBB/docs/coding-guidelines.html') diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 2f333756d0..3e73e186b2 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -76,7 +76,7 @@
      • Templating
        1. General Templating
        2. -
        3. Template Fallbacks
        4. +
        5. Template Inheritance
      • Character Sets and Encodings
      • Translation (i18n/L10n) Guidelines @@ -1004,12 +1004,15 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;

        3.i. Style Config Files

        -

        Style cfg files are simple name-value lists with the information necessary for installing a style. Similar cfg files exist for templates, themes and imagesets. These follow the same principle and will not be introduced individually. The important part of the style configuration file is assigning an unique name.

        +

        Style cfg files are simple name-value lists with the information necessary for installing a style. Similar cfg files exist for templates, themes and imagesets. These follow the same principle and will not be introduced individually. Styles can use installed components by using the required_theme/required_template/required_imageset entries. The important part of the style configuration file is assigning an unique name.

        -# General Information about this style
        -name = prosilver
        -copyright = © phpBB Group, 2007
        -version = 3.0.2
        +        # General Information about this style
        +        name = prosilver_duplicate
        +        copyright = © phpBB Group, 2007
        +        version = 3.0.2
        +        required_template = prosilver
        +        required_theme = prosilver
        +        required_imageset = prosilver
         	

        3.2. General Styling Rules

        Templates should be produced in a consistent manner. Where appropriate they should be based off an existing copy, e.g. index, viewforum or viewtopic (the combination of which implement a range of conditional and variable forms). Please also note that the intendation and coding guidelines also apply to templates where possible.

        @@ -1468,22 +1471,22 @@ div </form>

        -

        4.ii. Template Fallbacks

        +

        4.ii. Template Inheritance

        When basing a new template on an existing one, it is not necessary to provide all template files. By declaring the template to be "inheriting" in the template configuration file.

        -

        The Limitation on this is that the base style has to installed and complete, meaning that it is not itself using a fallback.

        +

        The Limitation on this is that the base style has to installed and complete, meaning that it is not itself inheriting.

        The effect of doing so is that the template engine will use the files in the new template where they exist, but fall back to files in the base template otherwise. Declaring a style to be inheriting also causes it to use some of the configuration settings of the base style, notably database storage.

        -

        We strongly encourage the use of fallbacks for styles based on the bundled styles, as it will ease the update procedure.

        +

        We strongly encourage the use of inheritance for styles based on the bundled styles, as it will ease the update procedure.

        -		# General Information about this template
        -		name = inherits
        -		copyright = © phpBB Group, 2007
        -		version = 3.0.2
        +        # General Information about this template
        +        name = inherits
        +        copyright = © phpBB Group, 2007
        +        version = 3.0.2
         
        -		# Defining a different template bitfield
        -		template_bitfield = lNg=
        +        # Defining a different template bitfield
        +        template_bitfield = lNg=
         
        -		# Are we inheriting?
        -		inherit_from = prosilver
        +        # Are we inheriting?
        +        inherit_from = prosilver
         		
      @@ -2257,7 +2260,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))

      Revision 8596+

      -- cgit v1.2.1 From fcd0eae9ddee220fa6e5d82278024d062ede88dd Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Tue, 2 Sep 2008 06:06:39 +0000 Subject: #32115 (small typo in coding guidelines) git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8803 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/coding-guidelines.html | 6 +++++- 1 file changed, 5 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 3e73e186b2..4556e53b9b 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -1473,9 +1473,13 @@ div

      4.ii. Template Inheritance

      When basing a new template on an existing one, it is not necessary to provide all template files. By declaring the template to be "inheriting" in the template configuration file.

      -

      The Limitation on this is that the base style has to installed and complete, meaning that it is not itself inheriting.

      + +

      The limitation on this is that the base style has to be installed and complete, meaning that it is not itself inheriting.

      +

      The effect of doing so is that the template engine will use the files in the new template where they exist, but fall back to files in the base template otherwise. Declaring a style to be inheriting also causes it to use some of the configuration settings of the base style, notably database storage.

      +

      We strongly encourage the use of inheritance for styles based on the bundled styles, as it will ease the update procedure.

      +
               # General Information about this template
               name = inherits
      -- 
      cgit v1.2.1
      
      
      From abff17ba87c95630dd9f3b84c409e6b899bac252 Mon Sep 17 00:00:00 2001
      From: Chris Smith 
      Date: Fri, 26 Sep 2008 18:43:34 +0000
      Subject: Remove reference to old mysql4 abstraction layer. #26065
      
      git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8947 89ea8834-ac86-4346-8a33-228a782c2dd0
      ---
       phpBB/docs/coding-guidelines.html | 3 +--
       1 file changed, 1 insertion(+), 2 deletions(-)
      
      (limited to 'phpBB/docs/coding-guidelines.html')
      
      diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html
      index 4556e53b9b..363f529357 100644
      --- a/phpBB/docs/coding-guidelines.html
      +++ b/phpBB/docs/coding-guidelines.html
      @@ -196,8 +196,7 @@ class ...
       				
    1. /includes/db/firebird.php
      Firebird/Interbase Database Abstraction Layer
    2. /includes/db/msssql.php
      MSSQL Database Abstraction Layer
    3. /includes/db/mssql_odbc.php
      MSSQL ODBC Database Abstraction Layer for MSSQL
    4. -
    5. /includes/db/mysql.php
      MySQL Database Abstraction Layer for MySQL 3.x/4.0.x
    6. -
    7. /includes/db/mysql4.php
      MySQL4 Database Abstraction Layer for MySQL 4.1.x/5.x
    8. +
    9. /includes/db/mysql.php
      MySQL Database Abstraction Layer for MySQL 3.x/4.0.x/4.1.x/5.x
    10. /includes/db/mysqli.php
      MySQLi Database Abstraction Layer
    11. /includes/db/oracle.php
      Oracle Database Abstraction Layer
    12. /includes/db/postgres.php
      PostgreSQL Database Abstraction Layer
    13. -- cgit v1.2.1 From ba3d777bbdadca91b61a94e37134e7b4438589aa Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Mon, 13 Oct 2008 02:24:10 +0000 Subject: Grammar #28865 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9008 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/coding-guidelines.html | 6 +++--- 1 file changed, 3 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 363f529357..ddd2ce453b 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -525,7 +525,7 @@ switch ($mode) break; default: - // Always assume that the case got not catched + // Always assume that a case was not caught break; }
      @@ -548,7 +548,7 @@ switch ($mode) default: - // Always assume that the case got not catched + // Always assume that a case was not cought break; } @@ -576,7 +576,7 @@ switch ($mode) default: - // Always assume that the case got not catched + // Always assume that a case was not caught break; } -- cgit v1.2.1 From 9197c949463c7c2d4ebfaf32f7eed9cce786f6dd Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Mon, 13 Oct 2008 02:27:22 +0000 Subject: Maybe I am falling asleep? Spelling in r9008 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9009 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/coding-guidelines.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/docs/coding-guidelines.html') diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index ddd2ce453b..06ff249b97 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -548,7 +548,7 @@ switch ($mode) default: - // Always assume that a case was not cought + // Always assume that a case was not caught break; } -- cgit v1.2.1 From 5d9306c5128f45cfc9a448ce888b725bbc4408b8 Mon Sep 17 00:00:00 2001 From: Meik Sievertsen Date: Sat, 25 Oct 2008 14:16:17 +0000 Subject: up the version number git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9036 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/coding-guidelines.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'phpBB/docs/coding-guidelines.html') diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 06ff249b97..bfd134faac 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -1008,7 +1008,7 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp; # General Information about this style name = prosilver_duplicate copyright = © phpBB Group, 2007 - version = 3.0.2 + version = 3.0.3 required_template = prosilver required_theme = prosilver required_imageset = prosilver @@ -1081,7 +1081,7 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;

      4.i. General Templating

      - +

      File naming

      Firstly templates now take the suffix ".html" rather than ".tpl". This was done simply to make the lifes of some people easier wrt syntax highlighting, etc.

      @@ -1469,7 +1469,7 @@ div </fieldset> </form>

      - +

      4.ii. Template Inheritance

      When basing a new template on an existing one, it is not necessary to provide all template files. By declaring the template to be "inheriting" in the template configuration file.

      @@ -1483,7 +1483,7 @@ div # General Information about this template name = inherits copyright = © phpBB Group, 2007 - version = 3.0.2 + version = 3.0.3 # Defining a different template bitfield template_bitfield = lNg= -- cgit v1.2.1 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 @@
    14. 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&amp;

    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 From 9dc5c9271a3518b829b5f8d858a61c2a936538a2 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 1 Jan 2010 23:39:31 +0000 Subject: Fix Bug #56125 - XHTML mistakes in Coding Guidelines. Patch by leviatan21. git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@10395 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/coding-guidelines.html | 31 ++++++++++--------------------- 1 file changed, 10 insertions(+), 21 deletions(-) (limited to 'phpBB/docs/coding-guidelines.html') diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 8ac2e4e89d..7f747e09e2 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -69,7 +69,7 @@
  • General Guidelines
  • -
  • Styling
  • +
  • Styling
    1. Style Config Files
    2. General Styling Rules
    3. @@ -125,7 +125,7 @@

      If entered with tabs (replace the {TAB}) both equal signs need to be on the same column.

      Linefeeds:

      -

      Ensure that your editor is saving files in the UNIX (LF) line ending format. This means that lines are terminated with a newline, not with Windows Line endings (CR/LF combo) as they are on Win32 or Classic Mac (CR) Line endings. Any decent editor should be able to do this, but it might not always be the default setting. Know your editor. If you want advice for an editor for your Operating System, just ask one of the developers. Some of them do their editing on Win32. +

      Ensure that your editor is saving files in the UNIX (LF) line ending format. This means that lines are terminated with a newline, not with Windows Line endings (CR/LF combo) as they are on Win32 or Classic Mac (CR) Line endings. Any decent editor should be able to do this, but it might not always be the default setting. Know your editor. If you want advice for an editor for your Operating System, just ask one of the developers. Some of them do their editing on Win32.

      1.ii. File Header

      @@ -203,7 +203,7 @@ class ...
    4. /includes/db/firebird.php
      Firebird/Interbase Database Abstraction Layer
    5. /includes/db/msssql.php
      MSSQL Database Abstraction Layer
    6. /includes/db/mssql_odbc.php
      MSSQL ODBC Database Abstraction Layer for MSSQL
    7. -
    8. /includes/db/mysql.php
      MySQL Database Abstraction Layer for MySQL 3.x/4.0.x/4.1.x/5.x +
    9. /includes/db/mysql.php
      MySQL Database Abstraction Layer for MySQL 3.x/4.0.x/4.1.x/5.x
    10. /includes/db/mysqli.php
      MySQLi Database Abstraction Layer
    11. /includes/db/oracle.php
      Oracle Database Abstraction Layer
    12. /includes/db/postgres.php
      PostgreSQL Database Abstraction Layer
    13. @@ -224,7 +224,7 @@ class ...
    14. styles
      /styles, style.php
      phpBB Styles/Templates/Themes/Imagesets
    15. - 1.iv. Special Constants +

      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.

      @@ -1170,24 +1170,13 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp; <!-- INCLUDE {FILE_VAR} --> -

      Template defined variables can also be utilised. +

      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:

      @@ -1541,11 +1530,11 @@ div <form method="post" id="mcp" action="{U_POST_ACTION}"> <fieldset class="submit-buttons"> - <input type="reset" value="{L_RESET}" name="reset" class="button2" />  - <input type="submit" name="action[add_warning]" value="{L_SUBMIT}" class="button1" /> + <input type="reset" value="{L_RESET}" name="reset" class="button2" />  + <input type="submit" name="action[add_warning]" value="{L_SUBMIT}" class="button1" /> {S_FORM_TOKEN} - </fieldset> -</form> + </fieldset> +</form>

      4.ii. Template Inheritance

      @@ -2337,7 +2326,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
      -

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

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

      7.i. Repository Structure

      -- cgit v1.2.1