From e9b7cb13245778f8ee31dca618a138e56feb61e8 Mon Sep 17 00:00:00 2001
From: Crizzo
- These are the phpBB Coding Guidelines for Ascraeus, all attempts should be made to follow them as closely as possible.
+ These are the phpBB Coding Guidelines for Rhea, all attempts should be made to follow them as closely as possible.
Coding Guidelines
@@ -1187,8 +1187,8 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&
# General Information about this style
name = prosilver_duplicate
copyright = © phpBB Limited, 2007
-style_version = 3.1.0
-phpbb_version = 3.1.0
+style_version = 3.2.0
+phpbb_version = 3.2.0
# Defining a different template bitfield
# template_bitfield = lNg=
@@ -1677,8 +1677,8 @@ div
# General Information about this style
name = Custom Style
copyright = © phpBB Limited, 2007
-style_version = 3.1.0-b1
-phpbb_version = 3.1.0-b1
+style_version = 3.2.0-b1
+phpbb_version = 3.2.0-b1
# Defining a different template bitfield
# template_bitfield = lNg=
@@ -1725,7 +1725,7 @@ This may span multiple lines.
+ first/file/path.html
+ second/file/path.html
* Purpose: Same as above.
-* Since: 3.1.0-b1
+* Since: 3.2.0-b1
event_name
@@ -1734,7 +1734,7 @@ This may span multiple lines.
+ first/file/path.html (2)
+ second/file/path.html
* Purpose: Same as above.
-* Since: 3.1.0-b1
+* Since: 3.2.0-b1
forumlist_body_last_post_title_prepend
@@ -1743,7 +1743,7 @@ This may span multiple lines.
+ styles/prosilver/template/forumlist_body.html
+ styles/subsilver2/template/forumlist_body.html
* Purpose: Add content before the post title of the latest post in a forum on the forum list.
-* Since: 3.1.0-a1
+* Since: 3.2.0-a1
--
cgit v1.2.1
From 4dfd12d5b2b007b220789712cb6d50a04a3efeee Mon Sep 17 00:00:00 2001
From: Crizzo [1/21/31] slon
, [2/3/4] slona
, [0/5/6] slonova
and [7/8/9/11] ...
and some more difficult rules.
The plural system takes care of this and can be used as follows:
+The plural system takes care of this and can be used as follows:
The PHP code will basically look like this:
-- cgit v1.2.1 From f8fbe3793680af1dae2db2829cfc84068831c52f Mon Sep 17 00:00:00 2001 From: rxuif (isset($forum) && $forum == 5)-
The empty()
function is useful if you want to check if a variable is not set or being empty (an empty string, 0 as an integer or string, NULL, false, an empty array or a variable declared, but without a value in a class). Therefore empty should be used in favor of isset($array) && sizeof($array) > 0
- this can be written in a shorter way as !empty($array)
.
The empty()
function is useful if you want to check if a variable is not set or being empty (an empty string, 0 as an integer or string, NULL, false, an empty array or a variable declared, but without a value in a class). Therefore empty should be used in favor of isset($array) && count($array) > 0
- this can be written in a shorter way as !empty($array)
.
Switch/case code blocks can get a bit long sometimes. To have some level of notice and being in-line with the opening/closing brace requirement (where they are on the same line for better readability), this also applies to switch/case code blocks and the breaks. An example:
@@ -994,9 +994,9 @@ $sql = $db->sql_build_query('SELECT', $sql_array);Always try to optimize your loops if operations are going on at the comparing part, since this part is executed every time the loop is parsed through. For assignments a descriptive name should be chosen. Example:
-// On every iteration the sizeof function is called
+// On every iteration the count function is called
-for ($i = 0; $i < sizeof($post_data); $i++) +for ($i = 0; $i < count($post_data); $i++) { do_something(); }@@ -1004,7 +1004,7 @@ for ($i = 0; $i < sizeof($post_data); $i++)
// You are able to assign the (not changing) result within the loop itself
-for ($i = 0, $size = sizeof($post_data); $i < $size; $i++) +for ($i = 0, $size = count($post_data); $i < $size; $i++) { do_something(); }-- cgit v1.2.1