From e29e0e5018ee0f783ad8d5b8a6a93fec1d5800b3 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Tue, 27 May 2014 08:10:32 -0700 Subject: [ticket/12599] Remove corner images from documentation style. PHPBB3-12599 --- phpBB/docs/CHANGELOG.html | 16 ++++----- phpBB/docs/FAQ.html | 60 +++++++++++++++++----------------- phpBB/docs/INSTALL.html | 40 +++++++++++------------ phpBB/docs/README.html | 40 +++++++++++------------ phpBB/docs/auth_api.html | 24 +++++++------- phpBB/docs/coding-guidelines.html | 36 ++++++++++----------- phpBB/docs/corners_left.gif | Bin 55 -> 0 bytes phpBB/docs/corners_left.png | Bin 195 -> 0 bytes phpBB/docs/corners_right.gif | Bin 56 -> 0 bytes phpBB/docs/corners_right.png | Bin 201 -> 0 bytes phpBB/docs/stylesheet.css | 66 ++++++-------------------------------- 11 files changed, 118 insertions(+), 164 deletions(-) delete mode 100644 phpBB/docs/corners_left.gif delete mode 100644 phpBB/docs/corners_left.png delete mode 100644 phpBB/docs/corners_right.gif delete mode 100644 phpBB/docs/corners_right.png diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index acf5a318be..8077cb4d89 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -16,7 +16,7 @@ @@ -39,7 +39,7 @@

Changelog


@@ -102,7 +102,7 @@

1. Changelog

-
+
@@ -4713,7 +4713,7 @@ -
+

@@ -4721,7 +4721,7 @@

2. Copyright and disclaimer

-
+
@@ -4731,7 +4731,7 @@ -
+
diff --git a/phpBB/docs/FAQ.html b/phpBB/docs/FAQ.html index cd1ec4ae14..49804385ec 100644 --- a/phpBB/docs/FAQ.html +++ b/phpBB/docs/FAQ.html @@ -16,7 +16,7 @@ @@ -40,7 +40,7 @@

FAQ


@@ -74,7 +74,7 @@

I am finding phpBB too difficult to install. Will you do it for me?

-
+
@@ -88,7 +88,7 @@ -
+

@@ -99,7 +99,7 @@ A board is dealing in warez/porn/etc., you need to prevent them doing this!
-
+
@@ -111,7 +111,7 @@ I want to sue you because i think you host an illegal board! -
+

@@ -119,7 +119,7 @@ I want to sue you because i think you host an illegal board!

According to viewonline a user is doing/reading something they should not be able to!

-
+
@@ -131,7 +131,7 @@ I want to sue you because i think you host an illegal board! -
+

@@ -139,7 +139,7 @@ I want to sue you because i think you host an illegal board!

I keep getting Mail sending errors when I (or my users) post/send PM's/etc.!

-
+
@@ -151,7 +151,7 @@ I want to sue you because i think you host an illegal board! -
+

@@ -159,7 +159,7 @@ I want to sue you because i think you host an illegal board!

My users are complaining that emails are not in their selected language!

-
+
@@ -171,7 +171,7 @@ I want to sue you because i think you host an illegal board! -
+

@@ -179,7 +179,7 @@ I want to sue you because i think you host an illegal board!

My AOL based users keep getting logged out!

-
+
@@ -193,7 +193,7 @@ I want to sue you because i think you host an illegal board! -
+

@@ -201,7 +201,7 @@ I want to sue you because i think you host an illegal board!

I am unable to upload avatars from my computer, regardless of the settings.

-
+
@@ -213,7 +213,7 @@ I want to sue you because i think you host an illegal board! -
+

@@ -221,7 +221,7 @@ I want to sue you because i think you host an illegal board!

I just cannot get gallery avatars to appear!

-
+
@@ -231,7 +231,7 @@ I want to sue you because i think you host an illegal board! -
+

@@ -239,7 +239,7 @@ I want to sue you because i think you host an illegal board!

How do I use/set permissions?

-
+
@@ -249,7 +249,7 @@ I want to sue you because i think you host an illegal board! -
+

@@ -257,7 +257,7 @@ I want to sue you because i think you host an illegal board!

I (or my users) cannot stay logged in to the forum!

-
+
@@ -269,7 +269,7 @@ I want to sue you because i think you host an illegal board! -
+

@@ -277,7 +277,7 @@ I want to sue you because i think you host an illegal board!

My users are complaining about being logged out too quickly!

-
+
@@ -287,7 +287,7 @@ I want to sue you because i think you host an illegal board! -
+

@@ -295,7 +295,7 @@ I want to sue you because i think you host an illegal board!

My question isn't answered here!

-
+
@@ -309,7 +309,7 @@ I want to sue you because i think you host an illegal board! -
+

@@ -317,7 +317,7 @@ I want to sue you because i think you host an illegal board!

Copyright and disclaimer

-
+
@@ -327,7 +327,7 @@ I want to sue you because i think you host an illegal board! -
+
diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html index df863917e2..ce16606c13 100644 --- a/phpBB/docs/INSTALL.html +++ b/phpBB/docs/INSTALL.html @@ -16,7 +16,7 @@ @@ -44,7 +44,7 @@

Install


@@ -90,7 +90,7 @@

1. Quick install

-
+
@@ -114,7 +114,7 @@ -
+

@@ -122,7 +122,7 @@

2. Requirements

-
+
@@ -165,7 +165,7 @@ -
+

@@ -173,7 +173,7 @@

3. New installation

-
+
@@ -245,7 +245,7 @@ -
+

@@ -253,7 +253,7 @@

4. Updating from stable releases of phpBB 3.1.x

-
+
@@ -321,7 +321,7 @@ -
+

@@ -363,7 +363,7 @@

6. Conversion from phpBB 2.0.x to phpBB 3.1.x

-
+
@@ -418,7 +418,7 @@ -
+

@@ -426,7 +426,7 @@

7. Important (security related) post-Install tasks for all installation methods

-
+
@@ -456,7 +456,7 @@ -
+

@@ -464,7 +464,7 @@

8. Anti-Spam Measures

-
+

Like any online site that allows user input, your board could be subject to unwanted posts; often referred to as forum spam. The vast majority of these attacks will be from automated computer programs known as spambots. The attacks, generally, are not personal as the spammers are just trying to find accessible targets. phpBB has a number of anti-spam measures built in, including a range of CAPTCHAs. However, administrators are strongly urged to read and follow the advice for Preventing Spam in phpBB as soon as possible after completing the installation of your board.

@@ -472,7 +472,7 @@ -
+

@@ -480,7 +480,7 @@

9. Copyright and disclaimer

-
+
@@ -490,7 +490,7 @@ -
+
diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html index b66f47178e..3793cf003e 100644 --- a/phpBB/docs/README.html +++ b/phpBB/docs/README.html @@ -16,7 +16,7 @@ @@ -39,7 +39,7 @@

Readme


@@ -81,7 +81,7 @@

1. Installing phpBB

-
+

Installation, update and conversion instructions can be found in the INSTALL document in this directory. If you are intending on converting from a phpBB 2.0.x or 3.0.x installation we highly recommend that you backup any existing data before proceeding!

@@ -110,7 +110,7 @@ -
+

@@ -118,7 +118,7 @@

2. Running phpBB

-
+
@@ -162,7 +162,7 @@ -
+

@@ -170,7 +170,7 @@

3. Getting help with phpBB

-
+
@@ -208,7 +208,7 @@ -
+

@@ -216,7 +216,7 @@

4. Status of this version

-
+
@@ -232,7 +232,7 @@ -
+

@@ -240,7 +240,7 @@

5. Reporting Bugs

-
+
@@ -283,7 +283,7 @@ -
+

@@ -291,7 +291,7 @@

6. Overview of current bug list

-
+
@@ -307,7 +307,7 @@ -
+

@@ -315,7 +315,7 @@

7. PHP compatibility issues

-
+
@@ -333,7 +333,7 @@ -
+

@@ -341,7 +341,7 @@

8. Copyright and disclaimer

-
+
@@ -351,7 +351,7 @@ -
+
diff --git a/phpBB/docs/auth_api.html b/phpBB/docs/auth_api.html index 703e7a18c1..0ff2fca554 100644 --- a/phpBB/docs/auth_api.html +++ b/phpBB/docs/auth_api.html @@ -16,7 +16,7 @@ @@ -40,7 +40,7 @@

Auth API


@@ -73,7 +73,7 @@

1. Introduction

-
+
@@ -95,7 +95,7 @@ $auth = new phpbb\auth\auth(); -
+

@@ -103,7 +103,7 @@ $auth = new phpbb\auth\auth();

2. Methods

-
+
@@ -230,7 +230,7 @@ $result = $auth->acl_get_list($user_id, $permissions, $forum_id); -
+

@@ -238,7 +238,7 @@ $result = $auth->acl_get_list($user_id, $permissions, $forum_id);

3. Admin related functions

-
+
@@ -256,7 +256,7 @@ $auth_admin = new auth_admin(); -
+

@@ -264,7 +264,7 @@ $auth_admin = new auth_admin();

4. Copyright and disclaimer

-
+
@@ -274,7 +274,7 @@ $auth_admin = new auth_admin(); -
+
diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 98cfe0e717..541d39ac2c 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -16,7 +16,7 @@ @@ -40,7 +40,7 @@

Coding Guidelines


@@ -97,7 +97,7 @@

1. Defaults

-
+
@@ -274,7 +274,7 @@ PHPBB_QA (Set board to QA-Mode, which means the updater also c -
+

@@ -282,7 +282,7 @@ PHPBB_QA (Set board to QA-Mode, which means the updater also c

2. Code Layout/Guidelines

-
+
@@ -1169,14 +1169,14 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group& -
+

3. Styling

-
+

3.i. Style Config Files

@@ -1252,14 +1252,14 @@ parent = prosilver -
+

4. Templating

-
+

4.i. General Templating

@@ -1748,7 +1748,7 @@ This may span multiple lines. -
+

@@ -1758,7 +1758,7 @@ This may span multiple lines.

5. Character Sets and Encodings

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

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

6. Translation (i18n/L10n) Guidelines

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

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

7. Copyright and disclaimer

-
+
@@ -2556,7 +2556,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) -
+
diff --git a/phpBB/docs/corners_left.gif b/phpBB/docs/corners_left.gif deleted file mode 100644 index 206e50368d..0000000000 Binary files a/phpBB/docs/corners_left.gif and /dev/null differ diff --git a/phpBB/docs/corners_left.png b/phpBB/docs/corners_left.png deleted file mode 100644 index 256bde3daa..0000000000 Binary files a/phpBB/docs/corners_left.png and /dev/null differ diff --git a/phpBB/docs/corners_right.gif b/phpBB/docs/corners_right.gif deleted file mode 100644 index 0ba66d50b2..0000000000 Binary files a/phpBB/docs/corners_right.gif and /dev/null differ diff --git a/phpBB/docs/corners_right.png b/phpBB/docs/corners_right.png deleted file mode 100644 index df41823b4c..0000000000 Binary files a/phpBB/docs/corners_right.png and /dev/null differ diff --git a/phpBB/docs/stylesheet.css b/phpBB/docs/stylesheet.css index 6b8f5994c0..9be41468ad 100644 --- a/phpBB/docs/stylesheet.css +++ b/phpBB/docs/stylesheet.css @@ -145,44 +145,15 @@ a#logo:hover { .headerbar { background: #ebebeb none repeat-x 0 0; + border-radius: 7px; color: #FFFFFF; margin-bottom: 4px; - padding: 0 5px; -} - -span.corners-top, span.corners-bottom, span.corners-top span, span.corners-bottom span { - font-size: 1px; - line-height: 1px; - display: block; - height: 5px; - background-repeat: no-repeat; -} - -span.corners-top { - background-image: none; - background-position: 0 0; - margin: 0 -5px; -} - -span.corners-top span { - background-image: none; - background-position: 100% 0; -} - -span.corners-bottom { - background-image: none; - background-position: 0 100%; - margin: 0 -5px; - clear: both; -} - -span.corners-bottom span { - background-image: none; - background-position: 100% 100%; + padding: 5px; } .paragraph { - padding: 0 10px; + border-radius: 7px; + padding: 5px 10px; margin-bottom: 4px; background-repeat: no-repeat; background-position: 100% 0; @@ -231,23 +202,6 @@ hr { color: #28313F; } - -span.corners-top { - background-image: url("corners_left.png"); -} - -span.corners-top span { - background-image: url("corners_right.png"); -} - -span.corners-bottom { - background-image: url("corners_left.png"); -} - -span.corners-bottom span { - background-image: url("corners_right.png"); -} - .error { color: #BC2A4D; } @@ -257,10 +211,6 @@ a:visited { color: #105289; } a:hover { color: #D31141; } a:active { color: #368AD2; } -.paragraph span.corners-top, .paragraph span.corners-bottom { - margin: 0 -10px; -} - .content { padding: 0; line-height: 1.48em; @@ -288,8 +238,6 @@ a:active { color: #368AD2; } } * html hr { margin: 0; } -* html span.corners-top, * html span.corners-bottom { background-image: url("corners_left.gif"); } -* html span.corners-top span, * html span.corners-bottom span { background-image: url("corners_right.gif"); } .back2top { clear: both; @@ -350,3 +298,9 @@ a:active { color: #368AD2; } clear: both; margin-right: 1em; } + +.inner:after { + clear: both; + content: ''; + display: block; +} -- cgit v1.2.1 From 4565cac049be02e452de5707fdc692d624bdac8b Mon Sep 17 00:00:00 2001 From: Cesar G Date: Tue, 27 May 2014 08:12:06 -0700 Subject: [ticket/12599] Move documentation stylesheet to assets directory. PHPBB3-12599 --- phpBB/docs/CHANGELOG.html | 2 +- phpBB/docs/FAQ.html | 2 +- phpBB/docs/INSTALL.html | 2 +- phpBB/docs/README.html | 2 +- phpBB/docs/assets/css/stylesheet.css | 306 +++++++++++++++++++++++++++++++++++ phpBB/docs/auth_api.html | 2 +- phpBB/docs/coding-guidelines.html | 2 +- phpBB/docs/stylesheet.css | 306 ----------------------------------- 8 files changed, 312 insertions(+), 312 deletions(-) create mode 100644 phpBB/docs/assets/css/stylesheet.css delete mode 100644 phpBB/docs/stylesheet.css diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 8077cb4d89..60e59d2258 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -6,7 +6,7 @@ phpBB • Changelog - + diff --git a/phpBB/docs/FAQ.html b/phpBB/docs/FAQ.html index 49804385ec..18b0dbb616 100644 --- a/phpBB/docs/FAQ.html +++ b/phpBB/docs/FAQ.html @@ -6,7 +6,7 @@ phpBB • FAQ - + diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html index ce16606c13..0c0821a8cc 100644 --- a/phpBB/docs/INSTALL.html +++ b/phpBB/docs/INSTALL.html @@ -6,7 +6,7 @@ phpBB • Install - + diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html index 3793cf003e..b453a955ba 100644 --- a/phpBB/docs/README.html +++ b/phpBB/docs/README.html @@ -6,7 +6,7 @@ phpBB • Readme - + diff --git a/phpBB/docs/assets/css/stylesheet.css b/phpBB/docs/assets/css/stylesheet.css new file mode 100644 index 0000000000..9be41468ad --- /dev/null +++ b/phpBB/docs/assets/css/stylesheet.css @@ -0,0 +1,306 @@ +/* + The original "prosilver" theme for phpBB3 + Created by subBlue design :: http://www.subBlue.com +*/ + +* { margin: 0; padding: 0; } + +html { font-size: 100%; height: 100%; margin-bottom: 1px; } + +body { + font-family: Verdana, Helvetica, Arial, sans-serif; + color: #828282; + background-color: #FFFFFF; + font-size: 12px; + margin: 0; + padding: 12px 0; +} + +img { border-width: 0; } + +p { + line-height: 1.3em; + font-size: 1.1em; + margin-bottom: 1.5em; +} + +hr { + border: 0 none #FFFFFF; + border-top: 1px solid #CCCCCC; + height: 1px; + margin: 5px 0; + display: block; + clear: both; +} + +html, body { + color: #536482; + background-color: #FFFFFF; +} + +#doc-description h1 { + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + margin-right: 200px; + color: #FFFFFF; + margin-top: 15px; + font-weight: bold; + font-size: 2em; + color: #fff; +} + +h1 { + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + font-weight: normal; + color: #000; + font-size: 2em; + margin: 0.8em 0 0.2em 0; +} + +h2 { + font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; + font-weight: normal; + color: #28313F; + font-size: 1.5em; + margin: 0.8em 0 0.2em 0; +} + +h3 { + font-family: Arial, Helvetica, sans-serif; + font-weight: bold; + border-bottom: 1px solid #CCCCCC; + margin-bottom: 3px; + padding-bottom: 2px; + font-size: 1.05em; + color: #115098; + margin-top: 20px; +} + +h4 { + font-family: Arial, Helvetica, sans-serif; + font-weight: bold; + margin-bottom: 3px; + padding-bottom: 2px; + font-size: 1.05em; + color: #115098; + margin-top: 20px; +} + +.good { color: green; } +.bad { color: red; } + +.version { + margin-top: 20px; + text-align: left; + font-size: 70%; + color: #006600; + border-top: 1px solid #ccc; +} + +code { + color: #006600; + font-weight: normal; + font-family: 'Courier New', monospace; + border-color: #D1D7DC; + border-width: 1px; + border-style: solid; + background-color: #FAFAFA; +} + +#wrap { + padding: 0 20px; + min-width: 650px; +} + +#simple-wrap { + padding: 6px 10px; +} + +#page-body { + margin: 4px 0; + clear: both; +} + +#page-footer { + clear: both; +} + +#logo { + float: left; + width: auto; + padding: 10px 13px 0 10px; +} + +a#logo:hover { + text-decoration: none; +} + +#doc-description { + float: left; + width: 70%; +} + +#doc-description h1 { + margin-right: 0; +} + +.headerbar { + background: #ebebeb none repeat-x 0 0; + border-radius: 7px; + color: #FFFFFF; + margin-bottom: 4px; + padding: 5px; +} + +.paragraph { + border-radius: 7px; + padding: 5px 10px; + margin-bottom: 4px; + background-repeat: no-repeat; + background-position: 100% 0; + background-color: #ECF3F7; +} + +.paragraph:target .content { + color: #000000; +} + +.paragraph:target h3 a { + color: #000000; +} + +.content { + color: #333333; +} + +.content h2, .panel h2 { + color: #115098; + border-bottom-color: #CCCCCC; +} + +a:link { color: #898989; text-decoration: none; } +a:visited { color: #898989; text-decoration: none; } +a:hover { color: #d3d3d3; text-decoration: underline; } +a:active { color: #d2d2d2; text-decoration: none; } + +hr { + border-color: #FFFFFF; + border-top-color: #CCCCCC; +} + +.menu { + background-color: #cadceb; +} + +.headerbar { + background-color: #12A3EB; + background-image: url("bg_header.gif"); + color: #FFFFFF; +} + +.panel { + background-color: #ECF1F3; + color: #28313F; +} + +.error { + color: #BC2A4D; +} + +a:link { color: #105289; } +a:visited { color: #105289; } +a:hover { color: #D31141; } +a:active { color: #368AD2; } + +.content { + padding: 0; + line-height: 1.48em; + color: #333333; +} + +.content h2, .panel h2 { + color: #115098; + border-bottom-color: #CCCCCC; +} + +.notice { + border-top-color: #CCCCCC; +} + +.codebox { + padding: 3px; + background-color: #FFFFFF; + border: 1px solid #C9D2D8; + font-size: 1em; + margin-bottom: 10px; + display: block; + font: 0.9em Monaco, "Andale Mono","Courier New", Courier, mono; + line-height: 1.3em; +} + +* html hr { margin: 0; } + +.back2top { + clear: both; + height: 11px; + text-align: right; +} + +.content ol, .content ul { + margin-left: 25px; + margin-top: 0; +} + +.content ul + p, .content ul + div { + margin-top: 20px; +} + +.comment { + color: green; +} + +.indent { + margin-left: 20px; +} + +.paragraph table { + font-size: 8pt; + border-collapse: collapse; + border: 1px solid #cfcfcf; + margin-bottom: 20px; +} + +.paragraph table caption { + display: none; +} + +.paragraph table thead { + background-color: #cadceb; + color: #000; +} + +.paragraph table td, .paragraph table th { + border: 1px solid #006699; + padding: 0.5em; + background-color: #e1ebf2; +} + +.paragraph table th { + background-color: #cadceb; +} + +.paragraph table td dl { + margin: 0; + padding: 0; +} + +.paragraph table td dl dt { + float: left; + clear: both; + margin-right: 1em; +} + +.inner:after { + clear: both; + content: ''; + display: block; +} diff --git a/phpBB/docs/auth_api.html b/phpBB/docs/auth_api.html index 0ff2fca554..1049c2e56d 100644 --- a/phpBB/docs/auth_api.html +++ b/phpBB/docs/auth_api.html @@ -6,7 +6,7 @@ phpBB3 • Auth API - + diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 541d39ac2c..18038a1c22 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -6,7 +6,7 @@ phpBB3 • Coding Guidelines - + diff --git a/phpBB/docs/stylesheet.css b/phpBB/docs/stylesheet.css deleted file mode 100644 index 9be41468ad..0000000000 --- a/phpBB/docs/stylesheet.css +++ /dev/null @@ -1,306 +0,0 @@ -/* - The original "prosilver" theme for phpBB3 - Created by subBlue design :: http://www.subBlue.com -*/ - -* { margin: 0; padding: 0; } - -html { font-size: 100%; height: 100%; margin-bottom: 1px; } - -body { - font-family: Verdana, Helvetica, Arial, sans-serif; - color: #828282; - background-color: #FFFFFF; - font-size: 12px; - margin: 0; - padding: 12px 0; -} - -img { border-width: 0; } - -p { - line-height: 1.3em; - font-size: 1.1em; - margin-bottom: 1.5em; -} - -hr { - border: 0 none #FFFFFF; - border-top: 1px solid #CCCCCC; - height: 1px; - margin: 5px 0; - display: block; - clear: both; -} - -html, body { - color: #536482; - background-color: #FFFFFF; -} - -#doc-description h1 { - font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; - margin-right: 200px; - color: #FFFFFF; - margin-top: 15px; - font-weight: bold; - font-size: 2em; - color: #fff; -} - -h1 { - font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; - font-weight: normal; - color: #000; - font-size: 2em; - margin: 0.8em 0 0.2em 0; -} - -h2 { - font-family: "Trebuchet MS", Arial, Helvetica, sans-serif; - font-weight: normal; - color: #28313F; - font-size: 1.5em; - margin: 0.8em 0 0.2em 0; -} - -h3 { - font-family: Arial, Helvetica, sans-serif; - font-weight: bold; - border-bottom: 1px solid #CCCCCC; - margin-bottom: 3px; - padding-bottom: 2px; - font-size: 1.05em; - color: #115098; - margin-top: 20px; -} - -h4 { - font-family: Arial, Helvetica, sans-serif; - font-weight: bold; - margin-bottom: 3px; - padding-bottom: 2px; - font-size: 1.05em; - color: #115098; - margin-top: 20px; -} - -.good { color: green; } -.bad { color: red; } - -.version { - margin-top: 20px; - text-align: left; - font-size: 70%; - color: #006600; - border-top: 1px solid #ccc; -} - -code { - color: #006600; - font-weight: normal; - font-family: 'Courier New', monospace; - border-color: #D1D7DC; - border-width: 1px; - border-style: solid; - background-color: #FAFAFA; -} - -#wrap { - padding: 0 20px; - min-width: 650px; -} - -#simple-wrap { - padding: 6px 10px; -} - -#page-body { - margin: 4px 0; - clear: both; -} - -#page-footer { - clear: both; -} - -#logo { - float: left; - width: auto; - padding: 10px 13px 0 10px; -} - -a#logo:hover { - text-decoration: none; -} - -#doc-description { - float: left; - width: 70%; -} - -#doc-description h1 { - margin-right: 0; -} - -.headerbar { - background: #ebebeb none repeat-x 0 0; - border-radius: 7px; - color: #FFFFFF; - margin-bottom: 4px; - padding: 5px; -} - -.paragraph { - border-radius: 7px; - padding: 5px 10px; - margin-bottom: 4px; - background-repeat: no-repeat; - background-position: 100% 0; - background-color: #ECF3F7; -} - -.paragraph:target .content { - color: #000000; -} - -.paragraph:target h3 a { - color: #000000; -} - -.content { - color: #333333; -} - -.content h2, .panel h2 { - color: #115098; - border-bottom-color: #CCCCCC; -} - -a:link { color: #898989; text-decoration: none; } -a:visited { color: #898989; text-decoration: none; } -a:hover { color: #d3d3d3; text-decoration: underline; } -a:active { color: #d2d2d2; text-decoration: none; } - -hr { - border-color: #FFFFFF; - border-top-color: #CCCCCC; -} - -.menu { - background-color: #cadceb; -} - -.headerbar { - background-color: #12A3EB; - background-image: url("bg_header.gif"); - color: #FFFFFF; -} - -.panel { - background-color: #ECF1F3; - color: #28313F; -} - -.error { - color: #BC2A4D; -} - -a:link { color: #105289; } -a:visited { color: #105289; } -a:hover { color: #D31141; } -a:active { color: #368AD2; } - -.content { - padding: 0; - line-height: 1.48em; - color: #333333; -} - -.content h2, .panel h2 { - color: #115098; - border-bottom-color: #CCCCCC; -} - -.notice { - border-top-color: #CCCCCC; -} - -.codebox { - padding: 3px; - background-color: #FFFFFF; - border: 1px solid #C9D2D8; - font-size: 1em; - margin-bottom: 10px; - display: block; - font: 0.9em Monaco, "Andale Mono","Courier New", Courier, mono; - line-height: 1.3em; -} - -* html hr { margin: 0; } - -.back2top { - clear: both; - height: 11px; - text-align: right; -} - -.content ol, .content ul { - margin-left: 25px; - margin-top: 0; -} - -.content ul + p, .content ul + div { - margin-top: 20px; -} - -.comment { - color: green; -} - -.indent { - margin-left: 20px; -} - -.paragraph table { - font-size: 8pt; - border-collapse: collapse; - border: 1px solid #cfcfcf; - margin-bottom: 20px; -} - -.paragraph table caption { - display: none; -} - -.paragraph table thead { - background-color: #cadceb; - color: #000; -} - -.paragraph table td, .paragraph table th { - border: 1px solid #006699; - padding: 0.5em; - background-color: #e1ebf2; -} - -.paragraph table th { - background-color: #cadceb; -} - -.paragraph table td dl { - margin: 0; - padding: 0; -} - -.paragraph table td dl dt { - float: left; - clear: both; - margin-right: 1em; -} - -.inner:after { - clear: both; - content: ''; - display: block; -} -- cgit v1.2.1 From 14fecb2f028a618fc9856124a24ba3878406a658 Mon Sep 17 00:00:00 2001 From: Cesar G Date: Tue, 27 May 2014 08:37:17 -0700 Subject: [ticket/12599] Move images to assets/ and update the phpBB logo. PHPBB3-12599 --- phpBB/docs/CHANGELOG.html | 2 +- phpBB/docs/FAQ.html | 2 +- phpBB/docs/INSTALL.html | 2 +- phpBB/docs/README.html | 2 +- phpBB/docs/assets/css/stylesheet.css | 2 +- phpBB/docs/assets/images/bg_header.gif | Bin 0 -> 690 bytes phpBB/docs/assets/images/site_logo.gif | Bin 0 -> 5070 bytes phpBB/docs/auth_api.html | 2 +- phpBB/docs/bg_header.gif | Bin 690 -> 0 bytes phpBB/docs/coding-guidelines.html | 2 +- phpBB/docs/site_logo.gif | Bin 3430 -> 0 bytes 11 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 phpBB/docs/assets/images/bg_header.gif create mode 100644 phpBB/docs/assets/images/site_logo.gif delete mode 100644 phpBB/docs/bg_header.gif delete mode 100644 phpBB/docs/site_logo.gif diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 60e59d2258..4649cea6ed 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -19,7 +19,7 @@
- +

phpBB 3.1.x Changelog

Skip

diff --git a/phpBB/docs/FAQ.html b/phpBB/docs/FAQ.html index 18b0dbb616..409a7ce9be 100644 --- a/phpBB/docs/FAQ.html +++ b/phpBB/docs/FAQ.html @@ -19,7 +19,7 @@
- +

phpBB 3.1.x FAQ

phpBB 3.1.x frequently asked questions

Skip

diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html index 0c0821a8cc..a122d22274 100644 --- a/phpBB/docs/INSTALL.html +++ b/phpBB/docs/INSTALL.html @@ -19,7 +19,7 @@
- +

phpBB 3.1.x Install

phpBB 3.1.x Installation, updating and conversion informations

Skip

diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html index b453a955ba..8a9e2f4a17 100644 --- a/phpBB/docs/README.html +++ b/phpBB/docs/README.html @@ -19,7 +19,7 @@
- +

phpBB 3.1.x Readme

Skip

diff --git a/phpBB/docs/assets/css/stylesheet.css b/phpBB/docs/assets/css/stylesheet.css index 9be41468ad..ce5e7d08e4 100644 --- a/phpBB/docs/assets/css/stylesheet.css +++ b/phpBB/docs/assets/css/stylesheet.css @@ -193,7 +193,7 @@ hr { .headerbar { background-color: #12A3EB; - background-image: url("bg_header.gif"); + background-image: url("../images/bg_header.gif"); color: #FFFFFF; } diff --git a/phpBB/docs/assets/images/bg_header.gif b/phpBB/docs/assets/images/bg_header.gif new file mode 100644 index 0000000000..351de9f46a Binary files /dev/null and b/phpBB/docs/assets/images/bg_header.gif differ diff --git a/phpBB/docs/assets/images/site_logo.gif b/phpBB/docs/assets/images/site_logo.gif new file mode 100644 index 0000000000..2517fbedd6 Binary files /dev/null and b/phpBB/docs/assets/images/site_logo.gif differ diff --git a/phpBB/docs/auth_api.html b/phpBB/docs/auth_api.html index 1049c2e56d..6de7a7d12e 100644 --- a/phpBB/docs/auth_api.html +++ b/phpBB/docs/auth_api.html @@ -19,7 +19,7 @@
- +

Auth API

This is an explanation of how to use the phpBB auth/acl API

Skip

diff --git a/phpBB/docs/bg_header.gif b/phpBB/docs/bg_header.gif deleted file mode 100644 index 351de9f46a..0000000000 Binary files a/phpBB/docs/bg_header.gif and /dev/null differ diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 18038a1c22..8e7da53025 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -19,7 +19,7 @@
- +

Coding Guidelines

Ascraeus coding guidelines document

Skip

diff --git a/phpBB/docs/site_logo.gif b/phpBB/docs/site_logo.gif deleted file mode 100644 index 909114c377..0000000000 Binary files a/phpBB/docs/site_logo.gif and /dev/null differ -- cgit v1.2.1 From 5cd3e7627c468124a05030d98043022d959675bc Mon Sep 17 00:00:00 2001 From: Cesar G Date: Tue, 27 May 2014 08:37:51 -0700 Subject: [ticket/12599] Use the back to top icon instead of text. PHPBB3-12599 --- phpBB/docs/assets/css/stylesheet.css | 12 +++++++++--- phpBB/docs/assets/images/icon_back_top.gif | Bin 0 -> 204 bytes 2 files changed, 9 insertions(+), 3 deletions(-) create mode 100644 phpBB/docs/assets/images/icon_back_top.gif diff --git a/phpBB/docs/assets/css/stylesheet.css b/phpBB/docs/assets/css/stylesheet.css index ce5e7d08e4..9f09a57fd9 100644 --- a/phpBB/docs/assets/css/stylesheet.css +++ b/phpBB/docs/assets/css/stylesheet.css @@ -239,10 +239,16 @@ a:active { color: #368AD2; } * html hr { margin: 0; } -.back2top { - clear: both; +.top { + background: url("../images/icon_back_top.gif") no-repeat top left; + text-decoration: none; + width: 11px; height: 11px; - text-align: right; + display: block; + float: right; + overflow: hidden; + letter-spacing: 1000px; + text-indent: 11px; } .content ol, .content ul { diff --git a/phpBB/docs/assets/images/icon_back_top.gif b/phpBB/docs/assets/images/icon_back_top.gif new file mode 100644 index 0000000000..4d2b8f3822 Binary files /dev/null and b/phpBB/docs/assets/images/icon_back_top.gif differ -- cgit v1.2.1 From 62f69224a42d547ee8c2d39f78e8923c04b5b18e Mon Sep 17 00:00:00 2001 From: Cesar G Date: Tue, 27 May 2014 08:40:18 -0700 Subject: [ticket/12599] Add padding on the sides of the inline code boxes. PHPBB3-12599 --- phpBB/docs/assets/css/stylesheet.css | 1 + 1 file changed, 1 insertion(+) diff --git a/phpBB/docs/assets/css/stylesheet.css b/phpBB/docs/assets/css/stylesheet.css index 9f09a57fd9..d3934e3ca4 100644 --- a/phpBB/docs/assets/css/stylesheet.css +++ b/phpBB/docs/assets/css/stylesheet.css @@ -104,6 +104,7 @@ code { border-width: 1px; border-style: solid; background-color: #FAFAFA; + padding: 0 4px; } #wrap { -- cgit v1.2.1 From 6e5f33e5fb659350af2a5a3113295b1a91a60ddc Mon Sep 17 00:00:00 2001 From: Cesar G Date: Tue, 27 May 2014 09:11:06 -0700 Subject: [ticket/12599] Get the font sizes under control. PHPBB3-12599 --- phpBB/docs/assets/css/stylesheet.css | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/phpBB/docs/assets/css/stylesheet.css b/phpBB/docs/assets/css/stylesheet.css index d3934e3ca4..5e4a4535f1 100644 --- a/phpBB/docs/assets/css/stylesheet.css +++ b/phpBB/docs/assets/css/stylesheet.css @@ -11,13 +11,21 @@ body { font-family: Verdana, Helvetica, Arial, sans-serif; color: #828282; background-color: #FFFFFF; - font-size: 12px; + font-size: 10px; margin: 0; padding: 12px 0; } img { border-width: 0; } +ul, ol { + font-size: 1.1em; +} + +ul ul, ol ol { + font-size: inherit; +} + p { line-height: 1.3em; font-size: 1.1em; @@ -70,7 +78,7 @@ h3 { border-bottom: 1px solid #CCCCCC; margin-bottom: 3px; padding-bottom: 2px; - font-size: 1.05em; + font-size: 1.1em; color: #115098; margin-top: 20px; } @@ -80,7 +88,7 @@ h4 { font-weight: bold; margin-bottom: 3px; padding-bottom: 2px; - font-size: 1.05em; + font-size: 1.1em; color: #115098; margin-top: 20px; } @@ -154,6 +162,7 @@ a#logo:hover { .paragraph { border-radius: 7px; + font-size: 1.1em; padding: 5px 10px; margin-bottom: 4px; background-repeat: no-repeat; -- cgit v1.2.1 From a07b29c1df8519e31401ec3d5f472c8a8f04431c Mon Sep 17 00:00:00 2001 From: Cesar G Date: Tue, 27 May 2014 09:26:49 -0700 Subject: [ticket/12599] Place standalone text in a box. PHPBB3-12599 --- phpBB/docs/CHANGELOG.html | 5 ++++- phpBB/docs/FAQ.html | 7 ++++++- phpBB/docs/INSTALL.html | 14 ++++++++++---- phpBB/docs/README.html | 6 +++++- phpBB/docs/assets/css/stylesheet.css | 4 ++++ phpBB/docs/auth_api.html | 2 +- phpBB/docs/coding-guidelines.html | 4 +++- 7 files changed, 33 insertions(+), 9 deletions(-) diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index 4649cea6ed..9710014b56 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -34,7 +34,10 @@ -

This is a non-exhaustive (but still near complete) changelog for phpBB 3.1.x including release candidate versions. Our thanks to all those people who've contributed bug reports and code fixes.

+

+ This is a non-exhaustive (but still near complete) changelog for phpBB 3.1.x including release candidate versions. + Our thanks to all those people who've contributed bug reports and code fixes. +

Changelog

diff --git a/phpBB/docs/FAQ.html b/phpBB/docs/FAQ.html index 409a7ce9be..0b3b421e72 100644 --- a/phpBB/docs/FAQ.html +++ b/phpBB/docs/FAQ.html @@ -35,7 +35,12 @@ -

This is a very basic Frequently Asked Questions (FAQ) page which attempts to answer some of the more commonly asked questions. It is by no means exhaustive and should be used in combination with the 'built-in' User FAQ within phpBB, the community forums and our IRC channel (see README for details).

+

+ This is a very basic Frequently Asked Questions (FAQ) page which attempts to answer some of the + more commonly asked questions. It is by no means exhaustive and should be used in combination with + the 'built-in' User FAQ within phpBB3, the community forums and our IRC channel + (see README for details). +

FAQ

diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html index a122d22274..4050636b38 100644 --- a/phpBB/docs/INSTALL.html +++ b/phpBB/docs/INSTALL.html @@ -35,12 +35,18 @@ -

Please read this document completely before proceeding with installation, updating or converting.

+
+

Please read this document completely before proceeding with installation, updating or converting.

-

This document will walk you through the basics on installing, updating and converting the forum software.

- -

A basic overview of running phpBB can be found in the accompanying README file. Please ensure you read that document in addition to this! For more detailed information on using, installing, updating and converting phpBB you should read the documentation available online.

+

This document will walk you through the basics on installing, updating and converting the forum software.

+

+ A basic overview of running phpBB can be found in the accompanying README file. + Please ensure you read that document in addition to this! For more detailed information on using, installing, + updating and converting phpBB you should read the documentation + available online. +

+

Install

Once an instance of the class has been created you are free to call the various methods it contains. Please note that should you wish to use the auth_admin methods you will need to instantiate this separately but in the same way.

@@ -114,8 +114,8 @@ $auth = new phpbb\auth\auth();

The acl method is the initialisation routine for all the acl functions. If you intend calling any acl method you must first call this. The method takes as its one and only required parameter an associative array containing user information as stored in the database. This array must contain at least the following information; user_id, user_permissions and user_type. It is called in the following way:

-$auth->acl(userdata);
-	
+$auth->acl(userdata); +

Where userdata is the array containing the aforementioned data.

@@ -124,8 +124,8 @@ $auth->acl(userdata);

This method is the primary way of determining what a user can and cannot do for a given option globally or in a given forum. The method should be called in the following way:

-$result = $auth->acl_get(option[, forum]);
-	
+$result = $auth->acl_get(option[, forum]); +

Where option is a string representing the required option, e.g. 'f_list', 'm_edit', 'a_adduser', etc. By adding a ! in front of the option, e.g. '!f_list' the result of this method will be negated. The optional forum term is the integer forum_id.

@@ -142,8 +142,8 @@ $result = $auth->acl_get(option[, forum]);

The method should be called thus:

-$result = $auth->acl_gets(option1[, option2, ..., optionN, forum]);
-	
+$result = $auth->acl_gets(option1[, option2, ..., optionN, forum]); +

As with the acl_get method the options are strings representing the required permissions to check. The forum again is an integer representing a given forum_id.

@@ -154,16 +154,16 @@ $result = $auth->acl_gets(option1[, option2, ..., <

This method is used to find out in which forums a user is allowed to carry out an operation or to find out in which forums he is not allowed to carry out an operation. The method should be called in the following way:

-$result = $auth->acl_getf(option[, clean]);
-	
+$result = $auth->acl_getf(option[, clean]); +

Just like in the acl_get method the option is a string specifying the permission which has to be checked (negation using ! is allowed). The second parameter is a boolean. If it is set to false this method returns all forums with either zero or a positive integer. If it is set to true only those forums with a positive integer as the result will be returned.

The method returns an associative array of the form:

-array(forum_id1 => array(option => integer), forum_id2 => ...)
-	
+array(forum_id1 => array(option => integer), forum_id2 => ...) +

Where option is the option passed to the method and integer is either zero or a positive integer and the same acl_get(option, forum_id) would return.

@@ -172,8 +172,8 @@ array(forum_id1 => array(option => integer), This method is used to find out whether a user has a permission in at least one forum or globally. This method is similar to checking whether acl_getf(option, true) returned one or more forums but it's faster. It should be called in the following way:

-$result = $auth->acl_getf_global(option)
-	
+$result = $auth->acl_getf_global(option) +

As with the previous methods option is a string specifying the permission which has to be checked.

@@ -247,8 +247,8 @@ $result = $auth->acl_get_list($user_id, $permissions, $forum_id);

To use any methods this class contains it first needs to be instantiated separately from auth. This is achieved in the same way as auth:

-$auth_admin = new auth_admin();
-	
+$auth_admin = new auth_admin(); +

This instance gives you access to both the methods of this specific class and that of auth.

diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index ecbae68fe2..4c5fe73543 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -111,8 +111,8 @@
 {TAB}$mode{TAB}{TAB}= $request->variable('mode', '');
-{TAB}$search_id{TAB}= $request->variable('search_id', '');
-	
+{TAB}$search_id{TAB}= $request->variable('search_id', ''); +

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

@@ -135,8 +135,8 @@ * For full copyright and license information, please see * the docs/CREDITS.txt file. * -*/ -
+*/ +

Please see the File Locations section for the correct package name.

@@ -159,8 +159,8 @@ /** */ -{CODE} -
+{CODE} +

Files containing only functions:

@@ -187,8 +187,8 @@ Small code snipped, mostly one or two defines or an if statement /** * {DOCUMENTATION} */ -class ... -
+class ... +

1.iii. File Locations

@@ -319,8 +319,8 @@ for ($i = 0; $i < $outer_size; $i++) { foo($i, $j); } -} -
+} +

Function Names:

Functions should also be named descriptively. We're not programming in C here, we don't want to write functions called things like "stristr()". Again, all lower-case names with words separated by a single underscore character in PHP, and camel caps in JavaScript. Function names should be prefixed with "phpbb_" and preferably have a verb in them somewhere. Good function names are phpbb_print_login_status(), phpbb_get_user_data(), etc. Constructor functions in JavaScript should begin with a capital letter.

@@ -346,14 +346,14 @@ phpbb/ dir/ class_name.php subdir/ - class_name.php -
+ class_name.php +
 \phpbb\class_name            - phpbb/class_name.php
 \phpbb\dir\class_name        - phpbb/dir/class_name.php
-\phpbb\dir\subdir\class_name - phpbb/dir/subdir/class_name.php
-	
+\phpbb\dir\subdir\class_name - phpbb/dir/subdir/class_name.php +

Summary:

@@ -379,8 +379,8 @@ while (condition) do_stuff(); for ($i = 0; $i < size; $i++) - do_stuff($i); -
+ do_stuff($i); +

// These are all right.

@@ -397,8 +397,8 @@ while (condition)
 for ($i = 0; $i < size; $i++)
 {
 	do_stuff();
-}
-	
+} +

Where to put the braces:

In PHP code, braces always go on their own line. The closing brace should also always be at the same column as the corresponding opening brace, examples:

@@ -429,8 +429,8 @@ while (condition) function do_stuff() { ... -} -
+} +

In JavaScript code, braces always go on the same line:

@@ -453,8 +453,8 @@ while (condition) { function do_stuff() { ... -} -
+} +

Use spaces between tokens:

This is another simple, easy step that helps keep code readable without much effort. Whenever you write an assignment, expression, etc.. Always leave one space between the tokens. Basically, write code as if it was English. Put spaces between variable names and operators. Don't put spaces just after an opening bracket or before a closing bracket. Don't put spaces just before a comma or a semicolon. This is best shown with a few examples, examples:

@@ -478,26 +478,26 @@ for($i=0; $i<$size; $i++) ... for ($i = 0; $i < $size; $i++) ... $i=($j < $size)?0:1; -$i = ($j < $size) ? 0 : 1; -
+$i = ($j < $size) ? 0 : 1; +

Operator precedence:

Do you know the exact precedence of all the operators in PHP? Neither do I. Don't guess. Always make it obvious by using brackets to force the precedence of an equation so you know what it does. Remember to not over-use this, as it may harden the readability. Basically, do not enclose single expressions. Examples:

// what's the result? who knows.

-
-$bool = ($i < 7 && $j > 8 || $k == 4);
-	
+
+
$bool = ($i < 7 && $j > 8 || $k == 4);
+

// now you can be certain what I'm doing here.

-
-$bool = (($i < 7) && (($j < 8) || ($k == 4)));
-	
+
+
$bool = (($i < 7) && (($j < 8) || ($k == 4)));
+

// But this one is even better, because it is easier on the eye but the intention is preserved

-
-$bool = ($i < 7 && ($j < 8 || $k == 4));
-	
+
+
$bool = ($i < 7 && ($j < 8 || $k == 4));
+

Quoting strings:

There are two different ways to quote strings in PHP - either with single quotes or with double quotes. The main difference is that the parser does variable interpolation in double-quoted strings, but not in single quoted strings. Because of this, you should always use single quotes unless you specifically need variable interpolation to be done on that string. This way, we can save the parser the trouble of parsing a bunch of strings where no interpolation needs to be done.

@@ -507,25 +507,25 @@ $bool = ($i < 7 && ($j < 8 || $k == 4));
 $str = "This is a really long string with no variables for the parser to find.";
 
-do_stuff("$str");
-	
+do_stuff("$str"); +

// right

 $str = 'This is a really long string with no variables for the parser to find.';
 
-do_stuff($str);
-	
+do_stuff($str); +

// Sometimes single quotes are just not right

-$post_url = $phpbb_root_path . 'posting.' . $phpEx . '?mode=' . $mode . '&amp;start=' . $start;
-	
+$post_url = $phpbb_root_path . 'posting.' . $phpEx . '?mode=' . $mode . '&amp;start=' . $start; +

// Double quotes are sometimes needed to not overcrowd the line with concatenations.

-$post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&amp;start=$start";
-	
+$post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&amp;start=$start"; +

In SQL statements mixing single and double quotes is partly allowed (following the guidelines listed here about SQL formatting), else one should try to only use one method - mostly single quotes.

@@ -537,40 +537,40 @@ $post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&amp;start=$start"; $foo = array( 'bar' => 42, 'boo' => 23 -); -
+); +

// right

 $foo = array(
 	'bar' => 42,
 	'boo' => 23,
-);
-	
+); +

Associative array keys:

In PHP, it's legal to use a literal string as a key to an associative array without quoting that string. We don't want to do this -- the string should always be quoted to avoid confusion. Note that this is only when we're using a literal, not when we're using a variable, examples:

// wrong

-
-$foo = $assoc_array[blah];
-	
+
+
$foo = $assoc_array[blah];
+

// right

-
-$foo = $assoc_array['blah'];
-	
+
+
$foo = $assoc_array['blah'];
+

// wrong

-
-$foo = $assoc_array["$var"];
-	
+
+
$foo = $assoc_array["$var"];
+

// right

-
-$foo = $assoc_array[$var];
-	
+
+
$foo = $assoc_array[$var];
+

Comments:

Each complex function should be preceded by a comment that tells a programmer everything they need to know to use that function. The meaning of every parameter, the expected input, and the output are required as a minimal comment. The function's behaviour in error conditions (and what those error conditions are) should also be present - but mostly included within the comment about the output.

Especially important to document are any assumptions the code makes, or preconditions for its proper operation. Any one of the developers should be able to look at any part of the application and figure out what's going on in a reasonable amount of time.

Avoid using /* */ comment blocks for one-line comments, // should be used for one/two-liners.

@@ -584,8 +584,8 @@ $foo = $assoc_array[$var];

// wrong

 $array[++$i] = $j;
-$array[$i++] = $k;
-	
+$array[$i++] = $k; +

// right

@@ -593,39 +593,38 @@ $i++;
 $array[$i] = $j;
 
 $array[$i] = $k;
-$i++;
-	
+$i++; +

Inline conditionals:

Inline conditionals should only be used to do very simple things. Preferably, they will only be used to do assignments, and not for function calls or anything complex at all. They can be harmful to readability if used incorrectly, so don't fall in love with saving typing by using them, examples:

// Bad place to use them

-($i < $size && $j > $size) ? do_stuff($foo) : do_stuff($bar);
-	
+($i < $size && $j > $size) ? do_stuff($foo) : do_stuff($bar); +

// OK place to use them

-$min = ($i < $j) ? $i : $j;
-	
+$min = ($i < $j) ? $i : $j; +

Don't use uninitialized variables.

For phpBB3, we intend to use a higher level of run-time error reporting. This will mean that the use of an uninitialized variable will be reported as a warning. These warnings can be avoided by using the built-in isset() function to check whether a variable has been set - but preferably the variable is always existing. For checking if an array has a key set this can come in handy though, examples:

// Wrong

-
-if ($forum) ...
-	
+
+
if ($forum) ...
+

// Right

-
-if (isset($forum)) ...
-	
+
+
if (isset($forum)) ...

// Also possible

-
-if (isset($forum) && $forum == 5)
-	
+
+
if (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).

@@ -642,8 +641,8 @@ switch ($mode) case 'mode2': // I am doing something completely different here break; -} -
+} +

// Good

@@ -660,8 +659,8 @@ switch ($mode)
 	default:
 		// Always assume that a case was not caught
 	break;
-}
-	
+} +

// Also good, if you have more code between the case and the break

@@ -684,8 +683,8 @@ switch ($mode)
 		// Always assume that a case was not caught
 
 	break;
-}
-	
+} +

Even if the break for the default case is not needed, it is sometimes better to include it just for readability and completeness.

@@ -712,8 +711,8 @@ switch ($mode) // Always assume that a case was not caught break; -} -
+} +

Class Members

Use the explicit visibility qualifiers public, private and protected for all properties instead of var. @@ -723,14 +722,14 @@ switch ($mode)

//Wrong

 var $x;
-private static function f()
-	
+private static function f() +

// Right

 public $x;
-static private function f()
-	
+static private function f() +

Constants

Prefer class constants over global constants created with define().

@@ -750,8 +749,8 @@ $sql = 'SELECT * <-one tab->WHERE a = 1 <-two tabs->AND (b = 2 <-three tabs->OR b = 3) -<-one tab->ORDER BY b'; -
+<-one tab->ORDER BY b'; +

Here the example with the tabs applied:

@@ -761,8 +760,8 @@ $sql = 'SELECT * WHERE a = 1 AND (b = 2 OR b = 3) - ORDER BY b'; -
+ ORDER BY b'; +

SQL Quotes:

Use double quotes where applicable. (The variables in these examples are typecasted to integers beforehand.) Examples:

@@ -771,16 +770,16 @@ $sql = 'SELECT *
 "UPDATE " . SOME_TABLE . " SET something = something_else WHERE a = $b";
 
-'UPDATE ' . SOME_TABLE . ' SET something = ' . $user_id . ' WHERE a = ' . $something;
-	
+'UPDATE ' . SOME_TABLE . ' SET something = ' . $user_id . ' WHERE a = ' . $something; +

// These are right.

 'UPDATE ' . SOME_TABLE . " SET something = something_else WHERE a = $b";
 
-'UPDATE ' . SOME_TABLE . " SET something = $user_id WHERE a = $something";
-	
+'UPDATE ' . SOME_TABLE . " SET something = $user_id WHERE a = $something"; +

In other words use single quotes where no variable substitution is required or where the variable involved shouldn't appear within double quotes. Otherwise use double quotes.

@@ -791,15 +790,15 @@ $sql = 'SELECT *
 $sql = 'SELECT *
 	FROM ' . SOME_TABLE . '
-	WHERE a != 2';
-	
+ WHERE a != 2'; +

// This is right.

 $sql = 'SELECT *
 	FROM ' . SOME_TABLE . '
-	WHERE a <> 2';
-	
+ WHERE a <> 2'; +

Common DBAL methods:

@@ -810,8 +809,8 @@ $sql = 'SELECT *
 $sql = 'SELECT *
 	FROM ' . SOME_TABLE . "
-	WHERE username = '" . $db->sql_escape($username) . "'";
-	
+ WHERE username = '" . $db->sql_escape($username) . "'"; +

sql_query_limit():

@@ -832,8 +831,8 @@ $sql_ary = array( 'moredata' => $another_int, ); -$db->sql_query('INSERT INTO ' . SOME_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary)); - +$db->sql_query('INSERT INTO ' . SOME_TABLE . ' ' . $db->sql_build_array('INSERT', $sql_ary)); +

To complete the example, this is how an update statement would look like:

@@ -847,8 +846,8 @@ $sql_ary = array( $sql = 'UPDATE ' . SOME_TABLE . ' SET ' . $db->sql_build_array('UPDATE', $sql_ary) . ' WHERE user_id = ' . (int) $user_id; -$db->sql_query($sql); - +$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), UPDATE (example above) and SELECT (for building WHERE statement [AND logic]).

@@ -871,8 +870,8 @@ $sql_ary[] = array( 'moredata' => $another_int_2, ); -$db->sql_multi_insert(SOME_TABLE, $sql_ary); - +$db->sql_multi_insert(SOME_TABLE, $sql_ary); +

sql_in_set():

@@ -882,22 +881,22 @@ $db->sql_multi_insert(SOME_TABLE, $sql_ary); $sql = 'SELECT * FROM ' . FORUMS_TABLE . ' WHERE ' . $db->sql_in_set('forum_id', $forum_ids); -$db->sql_query($sql); - +$db->sql_query($sql); +

Based on the number of values in $forum_ids, the query can look differently.

// SQL Statement if $forum_ids = array(1, 2, 3);

-SELECT FROM phpbb_forums WHERE forum_id IN (1, 2, 3)
-	
+SELECT FROM phpbb_forums WHERE forum_id IN (1, 2, 3) +

// SQL Statement if $forum_ids = array(1) or $forum_ids = 1

-SELECT FROM phpbb_forums WHERE forum_id = 1
-	
+SELECT FROM phpbb_forums WHERE forum_id = 1 +

Of course the same is possible for doing a negative match against a number of values:

@@ -905,22 +904,22 @@ SELECT FROM phpbb_forums WHERE forum_id = 1 $sql = 'SELECT * FROM ' . FORUMS_TABLE . ' WHERE ' . $db->sql_in_set('forum_id', $forum_ids, true); -$db->sql_query($sql); - +$db->sql_query($sql); +

Based on the number of values in $forum_ids, the query can look differently here too.

// SQL Statement if $forum_ids = array(1, 2, 3);

-SELECT FROM phpbb_forums WHERE forum_id NOT IN (1, 2, 3)
-	
+SELECT FROM phpbb_forums WHERE forum_id NOT IN (1, 2, 3) +

// SQL Statement if $forum_ids = array(1) or $forum_ids = 1

-SELECT FROM phpbb_forums WHERE forum_id <> 1
-	
+SELECT FROM phpbb_forums WHERE forum_id <> 1 +

If the given array is empty, an error will be produced.

@@ -950,8 +949,8 @@ $sql_array = array( 'ORDER_BY' => 'left_id', ); -$sql = $db->sql_build_query('SELECT', $sql_array); - +$sql = $db->sql_build_query('SELECT', $sql_array); +

The possible first parameter for sql_build_query() is SELECT or SELECT_DISTINCT. As you can see, the logic is pretty self-explaining. For the LEFT_JOIN key, just add another array if you want to join on to tables for example. The added benefit of using this construct is that you are able to easily build the query statement based on conditions - for example the above LEFT_JOIN is only necessary if server side topic tracking is enabled; a slight adjustement would be:

@@ -986,8 +985,8 @@ else // Here we read the cookie data } -$sql = $db->sql_build_query('SELECT', $sql_array); - +$sql = $db->sql_build_query('SELECT', $sql_array); +

2.iv. Optimizations

@@ -999,16 +998,16 @@ $sql = $db->sql_build_query('SELECT', $sql_array); for ($i = 0; $i < sizeof($post_data); $i++) { do_something(); -} - +} +

// You are able to assign the (not changing) result within the loop itself

 for ($i = 0, $size = sizeof($post_data); $i < $size; $i++)
 {
 	do_something();
-}
-	
+} +

Use of in_array():

Try to avoid using in_array() on huge arrays, and try to not place them into loops if the array to check consist of more than 20 entries. in_array() can be very time consuming and uses a lot of cpu processing time. For little checks it is not noticeable, but if checked against a huge array within a loop those checks alone can take several seconds. If you need this functionality, try using isset() on the arrays keys instead, actually shifting the values into keys and vice versa. A call to isset($array[$var]) is a lot faster than in_array($var, array_keys($array)) for example.

@@ -1030,29 +1029,29 @@ for ($i = 0, $size = sizeof($post_data); $i < $size; $i++)

// Old method, do not use it

 $start = (isset($HTTP_GET_VARS['start'])) ? intval($HTTP_GET_VARS['start']) : intval($HTTP_POST_VARS['start']);
-$submit = (isset($HTTP_POST_VARS['submit'])) ? true : false;
-	
+$submit = (isset($HTTP_POST_VARS['submit'])) ? true : false; +

// Use request var and define a default variable (use the correct type)

 $start = $request->variable('start', 0);
-$submit = $request->is_set_post('submit');
-	
+$submit = $request->is_set_post('submit'); +

// $start is an int, the following use of $request->variable() therefore is not allowed

-$start = $request->variable('start', '0');
-	
+$start = $request->variable('start', '0'); +

// Getting an array, keys are integers, value defaults to 0

-$mark_array = $request->variable('mark', array(0));
-	
+$mark_array = $request->variable('mark', array(0)); +

// Getting an array, keys are strings, value defaults to 0

-$action_ary = $request->variable('action', array('' => 0));
-	
+$action_ary = $request->variable('action', array('' => 0)); +

Login checks/redirection:

To show a forum login box use login_forum_box($forum_data), else use the login_box() function.

@@ -1075,8 +1074,8 @@ $action_ary = $request->variable('action', array('' => 0)); { trigger_error('FORM_INVALID'); } - } - + } +

The string passed to add_form_key() needs to match the string passed to check_form_key(). Another requirement for this to work correctly is that all forms include the {S_FORM_TOKEN} template variable.

@@ -1087,8 +1086,8 @@ $action_ary = $request->variable('action', array('' => 0));
 $user->session_begin();
 $auth->acl($user->data);
-$user->setup();
-	
+$user->setup(); +

The $user->setup() call can be used to pass on additional language definition and a custom style (used in viewforum).

@@ -1096,16 +1095,16 @@ $user->setup();

All messages/errors should be outputted by calling trigger_error() using the appropriate message type and language string. Example:

-trigger_error('NO_FORUM');
-	
+trigger_error('NO_FORUM'); +
-trigger_error($user->lang['NO_FORUM']);
-	
+trigger_error($user->lang['NO_FORUM']); +
-trigger_error('NO_MODE', E_USER_ERROR);
-	
+trigger_error('NO_MODE', E_USER_ERROR); +

Url formatting

@@ -1114,8 +1113,8 @@ trigger_error('NO_MODE', E_USER_ERROR);

The append_sid() function from 2.0.x is available too, though it does not handle url alterations automatically. Please have a look at the code documentation if you want to get more details on how to use append_sid(). A sample call to append_sid() can look like this:

-append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id'])
-	
+append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;g=' . $row['group_id']) +

General function usage:

@@ -1195,8 +1194,8 @@ phpbb_version = 3.1.0 # Parent style # Set value to empty or to this style's name if this style does not have a parent style -parent = prosilver - +parent = 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 indentation and coding guidelines also apply to templates where possible.

@@ -2358,8 +2357,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) 'PAGE_OF' => 'Page %s of %s', /* Just grabbing the replacements as they come and hope they are in the right order */ - ... - + ... +

… a clearer way to show explicit replacement ordering is to do:

@@ -2368,8 +2367,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) 'PAGE_OF' => 'Page %1$s of %2$s', /* Explicit ordering of the replacements, even if they are the same order as English */ - ... - + ... +

Why bother at all? Because some languages, the string transliterated back to English might read something like:

@@ -2378,8 +2377,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) 'PAGE_OF' => 'Total of %2$s pages, currently on page %1$s', /* Explicit ordering of the replacements, reversed compared to English as the total comes first */ - ... - + ... +

6.iv. Using plurals

@@ -2397,8 +2396,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
 	...
 	$user->lang('NUMBER_OF_ELEPHANTS', $number_of_elephants);
-	...
-	
+ ... +

And the English translation would be:

@@ -2409,8 +2408,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) 1 => 'You have 1 elephant', // Singular 2 => 'You have %d elephants', // Plural ), - ... - + ... +

While the Bosnian translation can have more cases:

@@ -2422,16 +2421,16 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) 2 => 'You have %d slona', // Used for 5, 6, 3 => ... ), - ... - + ... +

NOTE: It is okay to use plurals for an unknown number compared to a single item, when the number is not known and displayed:

 	...
 	'MODERATOR'	=> 'Moderator',  // Your board has 1 moderator
 	'MODERATORS'	=> 'Moderators', // Your board has multiple moderators
-	...
-	
+ ... +

6.v. Writing Style

@@ -2445,8 +2444,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) ... 'CONV_ERROR_NO_AVATAR_PATH' => 'Note to developer: you must specify $convertor['avatar_path'] to use %s.', - ... - + ... +

// Good - Literal straight quotes should be escaped with a backslash, ie: \

@@ -2454,8 +2453,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) ... 'CONV_ERROR_NO_AVATAR_PATH' => 'Note to developer: you must specify $convertor[\'avatar_path\'] to use %s.', - ... - + ... +

However, because phpBB3 now uses UTF-8 as its sole encoding, we can actually use this to our advantage and not have to remember to escape a straight quote when we don't have to:

@@ -2464,24 +2463,24 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
 	...
 'USE_PERMISSIONS'	=>	'Test out user's permissions',
-	...
-	
+ ... +

// Okay - However, non-programmers wouldn't type "user\'s" automatically

 	...
 'USE_PERMISSIONS'	=>	'Test out user\'s permissions',
-	...
-	
+ ... +

// Best - Use the Unicode Right-Single-Quotation-Mark character

 	...
 'USE_PERMISSIONS'	=>	'Test out user’s permissions',
-	...
-	
+ ... +

The " (straight double quote), < (less-than sign) and > (greater-than sign) characters can all be used as displayed glyphs or as part of HTML markup, for example:

@@ -2491,8 +2490,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) ... 'FOO_BAR' => 'PHP version < 5.3.3.<br /> Visit "Downloads" at <a href="http://www.php.net/">www.php.net</a>.', - ... - + ... +

// Okay - No more invalid HTML, but "&quot;" is rather clumsy

@@ -2500,8 +2499,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) ... 'FOO_BAR' => 'PHP version &lt; 5.3.3.<br /> Visit &quot;Downloads&quot; at <a href="http://www.php.net/">www.php.net</a>.', - ... - + ... +

// Best - No more invalid HTML, and usage of correct typographical quotation marks

@@ -2509,8 +2508,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) ... 'FOO_BAR' => 'PHP version &lt; 5.3.3.<br /> Visit “Downloads” at <a href="http://www.php.net/">www.php.net</a>.', - ... - + ... +

Lastly, the & (ampersand) must always be entitised regardless of where it is used:

@@ -2519,16 +2518,16 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
 	...
 'FOO_BAR'	=>	'<a href="http://somedomain.tld/?foo=1&bar=2">Foo & Bar</a>.',
-	...
-	
+ ... +

// Good - Valid HTML, amperands are correctly entitised in all cases

 	...
 'FOO_BAR'	=>	'<a href="http://somedomain.tld/?foo=1&amp;bar=2">Foo &amp; Bar</a>.',
-	...
-	
+ ... +

As for how these charcters are entered depends very much on choice of Operating System, current language locale/keyboard configuration and native abilities of the text editor used to edit phpBB language files. Please see http://en.wikipedia.org/wiki/Unicode#Input_methods for more information.

-- cgit v1.2.1