Merge branch '3.1.x'
|
@ -6,7 +6,7 @@
|
||||||
<meta name="description" content="phpBB 3.1.x Changelog" />
|
<meta name="description" content="phpBB 3.1.x Changelog" />
|
||||||
<title>phpBB • Changelog</title>
|
<title>phpBB • Changelog</title>
|
||||||
|
|
||||||
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -16,15 +16,15 @@
|
||||||
<a id="top" name="top" accesskey="t"></a>
|
<a id="top" name="top" accesskey="t"></a>
|
||||||
<div id="page-header">
|
<div id="page-header">
|
||||||
<div class="headerbar">
|
<div class="headerbar">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div id="doc-description">
|
<div id="doc-description">
|
||||||
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
|
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
|
||||||
<h1>phpBB 3.1.x Changelog</h1>
|
<h1>phpBB 3.1.x Changelog</h1>
|
||||||
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -34,12 +34,15 @@
|
||||||
|
|
||||||
<!-- BEGIN DOCUMENT -->
|
<!-- BEGIN DOCUMENT -->
|
||||||
|
|
||||||
<p>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.</p>
|
<p class="paragraph main-description">
|
||||||
|
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.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h1>Changelog</h1>
|
<h1>Changelog</h1>
|
||||||
|
|
||||||
<div class="paragraph menu">
|
<div class="paragraph menu">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -94,7 +97,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -102,7 +105,7 @@
|
||||||
<a name="changelog"></a><h2>1. Changelog</h2>
|
<a name="changelog"></a><h2>1. Changelog</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -4713,7 +4716,7 @@
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -4721,7 +4724,7 @@
|
||||||
<a name="disclaimer"></a><h2>2. Copyright and disclaimer</h2>
|
<a name="disclaimer"></a><h2>2. Copyright and disclaimer</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -4731,7 +4734,7 @@
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- END DOCUMENT -->
|
<!-- END DOCUMENT -->
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<meta name="description" content="phpBB 3.1.x frequently asked questions" />
|
<meta name="description" content="phpBB 3.1.x frequently asked questions" />
|
||||||
<title>phpBB • FAQ</title>
|
<title>phpBB • FAQ</title>
|
||||||
|
|
||||||
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -16,16 +16,16 @@
|
||||||
<a id="top" name="top" accesskey="t"></a>
|
<a id="top" name="top" accesskey="t"></a>
|
||||||
<div id="page-header">
|
<div id="page-header">
|
||||||
<div class="headerbar">
|
<div class="headerbar">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div id="doc-description">
|
<div id="doc-description">
|
||||||
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
|
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
|
||||||
<h1>phpBB 3.1.x FAQ</h1>
|
<h1>phpBB 3.1.x FAQ</h1>
|
||||||
<p>phpBB 3.1.x frequently asked questions</p>
|
<p>phpBB 3.1.x frequently asked questions</p>
|
||||||
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -35,12 +35,17 @@
|
||||||
|
|
||||||
<!-- BEGIN DOCUMENT -->
|
<!-- BEGIN DOCUMENT -->
|
||||||
|
|
||||||
<p>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 <a href="README.html">README</a> for details).</p>
|
<p class="paragraph main-description">
|
||||||
|
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 <a href="README.html">README</a> for details).
|
||||||
|
</p>
|
||||||
|
|
||||||
<h1>FAQ</h1>
|
<h1>FAQ</h1>
|
||||||
|
|
||||||
<div class="paragraph menu">
|
<div class="paragraph menu">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -66,7 +71,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -74,7 +79,7 @@
|
||||||
<a name="install"></a><h2>I am finding phpBB too difficult to install. Will you do it for me?</h2>
|
<a name="install"></a><h2>I am finding phpBB too difficult to install. Will you do it for me?</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -88,7 +93,7 @@
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -99,7 +104,7 @@ A board is dealing in warez/porn/etc., you need to prevent them doing this!<br /
|
||||||
I want to sue you because i think you host an illegal board!</h2>
|
I want to sue you because i think you host an illegal board!</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -111,7 +116,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -119,7 +124,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
<a name="viewonline"></a><h2>According to viewonline a user is doing/reading something they should not be able to!</h2>
|
<a name="viewonline"></a><h2>According to viewonline a user is doing/reading something they should not be able to!</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -131,7 +136,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -139,7 +144,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
<a name="mail"></a><h2>I keep getting Mail sending errors when I (or my users) post/send PM's/etc.!</h2>
|
<a name="mail"></a><h2>I keep getting Mail sending errors when I (or my users) post/send PM's/etc.!</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -151,7 +156,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -159,7 +164,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
<a name="mail_language"></a><h2>My users are complaining that emails are not in their selected language!</h2>
|
<a name="mail_language"></a><h2>My users are complaining that emails are not in their selected language!</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -171,7 +176,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -179,7 +184,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
<a name="aol_browser"></a><h2>My AOL based users keep getting logged out!</h2>
|
<a name="aol_browser"></a><h2>My AOL based users keep getting logged out!</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -193,7 +198,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -201,7 +206,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
<a name="avatars"></a><h2>I am unable to upload avatars from my computer, regardless of the settings.</h2>
|
<a name="avatars"></a><h2>I am unable to upload avatars from my computer, regardless of the settings.</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -213,7 +218,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -221,7 +226,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
<a name="gallery_avatars"></a><h2>I just cannot get gallery avatars to appear!</h2>
|
<a name="gallery_avatars"></a><h2>I just cannot get gallery avatars to appear!</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -231,7 +236,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -239,7 +244,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
<a name="permissions"></a><h2>How do I use/set permissions?</h2>
|
<a name="permissions"></a><h2>How do I use/set permissions?</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -249,7 +254,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -257,7 +262,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
<a name="login_issues"></a><h2>I (or my users) cannot stay logged in to the forum!</h2>
|
<a name="login_issues"></a><h2>I (or my users) cannot stay logged in to the forum!</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -269,7 +274,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -277,7 +282,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
<a name="logout_issues"></a><h2>My users are complaining about being logged out too quickly!</h2>
|
<a name="logout_issues"></a><h2>My users are complaining about being logged out too quickly!</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -287,7 +292,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -295,7 +300,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
<a name="not_answered"></a><h2>My question isn't answered here!</h2>
|
<a name="not_answered"></a><h2>My question isn't answered here!</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -309,7 +314,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -317,7 +322,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
<a name="disclaimer"></a><h2>Copyright and disclaimer</h2>
|
<a name="disclaimer"></a><h2>Copyright and disclaimer</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -327,7 +332,7 @@ I want to sue you because i think you host an illegal board!</h2>
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- END DOCUMENT -->
|
<!-- END DOCUMENT -->
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<meta name="description" content="phpBB 3.1.x Installation, updating and conversion informations" />
|
<meta name="description" content="phpBB 3.1.x Installation, updating and conversion informations" />
|
||||||
<title>phpBB • Install</title>
|
<title>phpBB • Install</title>
|
||||||
|
|
||||||
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -16,16 +16,16 @@
|
||||||
<a id="top" name="top" accesskey="t"></a>
|
<a id="top" name="top" accesskey="t"></a>
|
||||||
<div id="page-header">
|
<div id="page-header">
|
||||||
<div class="headerbar">
|
<div class="headerbar">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div id="doc-description">
|
<div id="doc-description">
|
||||||
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
|
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
|
||||||
<h1>phpBB 3.1.x Install</h1>
|
<h1>phpBB 3.1.x Install</h1>
|
||||||
<p>phpBB 3.1.x Installation, updating and conversion informations</p>
|
<p>phpBB 3.1.x Installation, updating and conversion informations</p>
|
||||||
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -35,16 +35,22 @@
|
||||||
|
|
||||||
<!-- BEGIN DOCUMENT -->
|
<!-- BEGIN DOCUMENT -->
|
||||||
|
|
||||||
<p><strong>Please read this document completely before proceeding with installation, updating or converting.</strong></p>
|
<div class="paragraph">
|
||||||
|
<p><strong>Please read this document completely before proceeding with installation, updating or converting.</strong></p>
|
||||||
|
|
||||||
<p>This document will walk you through the basics on installing, updating and converting the forum software.</p>
|
<p>This document will walk you through the basics on installing, updating and converting the forum software.</p>
|
||||||
|
|
||||||
<p>A basic overview of running phpBB can be found in the accompanying <a href="README.html">README</a> 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 <a href="https://www.phpbb.com/support/docs/en/3.1/ug/">the documentation</a> available online.</p>
|
|
||||||
|
|
||||||
|
<p>
|
||||||
|
A basic overview of running phpBB can be found in the accompanying <a href="README.html">README</a> 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 <a href="https://www.phpbb.com/support/docs/en/3.1/ug/">the documentation</a>
|
||||||
|
available online.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
<h1>Install</h1>
|
<h1>Install</h1>
|
||||||
|
|
||||||
<div class="paragraph menu">
|
<div class="paragraph menu">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -82,7 +88,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -90,7 +96,7 @@
|
||||||
<a name="quickinstall"></a><h2>1. Quick install</h2>
|
<a name="quickinstall"></a><h2>1. Quick install</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -114,7 +120,7 @@
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -122,7 +128,7 @@
|
||||||
<a name="require"></a><h2>2. Requirements</h2>
|
<a name="require"></a><h2>2. Requirements</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -165,7 +171,7 @@
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -173,7 +179,7 @@
|
||||||
<a name="install"></a><h2>3. New installation</h2>
|
<a name="install"></a><h2>3. New installation</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -245,7 +251,7 @@
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -253,7 +259,7 @@
|
||||||
<a name="update"></a><h2>4. Updating from stable releases of phpBB 3.1.x</h2>
|
<a name="update"></a><h2>4. Updating from stable releases of phpBB 3.1.x</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -321,7 +327,7 @@
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -363,7 +369,7 @@
|
||||||
<a name="convert"></a><h2>6. Conversion from phpBB 2.0.x to phpBB 3.1.x</h2>
|
<a name="convert"></a><h2>6. Conversion from phpBB 2.0.x to phpBB 3.1.x</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -418,7 +424,7 @@
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -426,7 +432,7 @@
|
||||||
<a name="postinstall"></a><h2>7. Important (security related) post-Install tasks for all installation methods</h2>
|
<a name="postinstall"></a><h2>7. Important (security related) post-Install tasks for all installation methods</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -456,7 +462,7 @@
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -464,7 +470,7 @@
|
||||||
<a name="anti_spam"></a><h2>8. Anti-Spam Measures</h2>
|
<a name="anti_spam"></a><h2>8. Anti-Spam Measures</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p>Like any online site that allows user input, your board could be subject to unwanted posts; often referred to as <a href="http://en.wikipedia.org/wiki/Forum_spam">forum spam</a>. The vast majority of these attacks will be from automated computer programs known as <a href="http://en.wikipedia.org/wiki/Spambot">spambots</a>. 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 <a href="https://www.phpbb.com/support/spam/">Preventing Spam in phpBB</a> as soon as possible after completing the installation of your board.</p>
|
<p>Like any online site that allows user input, your board could be subject to unwanted posts; often referred to as <a href="http://en.wikipedia.org/wiki/Forum_spam">forum spam</a>. The vast majority of these attacks will be from automated computer programs known as <a href="http://en.wikipedia.org/wiki/Spambot">spambots</a>. 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 <a href="https://www.phpbb.com/support/spam/">Preventing Spam in phpBB</a> as soon as possible after completing the installation of your board.</p>
|
||||||
|
@ -472,7 +478,7 @@
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -480,7 +486,7 @@
|
||||||
<a name="disclaimer"></a><h2>9. Copyright and disclaimer</h2>
|
<a name="disclaimer"></a><h2>9. Copyright and disclaimer</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -490,7 +496,7 @@
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- END DOCUMENT -->
|
<!-- END DOCUMENT -->
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<meta name="description" content="phpBB 3.1.x Readme" />
|
<meta name="description" content="phpBB 3.1.x Readme" />
|
||||||
<title>phpBB • Readme</title>
|
<title>phpBB • Readme</title>
|
||||||
|
|
||||||
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -16,15 +16,15 @@
|
||||||
<a id="top" name="top" accesskey="t"></a>
|
<a id="top" name="top" accesskey="t"></a>
|
||||||
<div id="page-header">
|
<div id="page-header">
|
||||||
<div class="headerbar">
|
<div class="headerbar">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div id="doc-description">
|
<div id="doc-description">
|
||||||
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
|
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
|
||||||
<h1>phpBB 3.1.x Readme</h1>
|
<h1>phpBB 3.1.x Readme</h1>
|
||||||
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -34,12 +34,16 @@
|
||||||
|
|
||||||
<!-- BEGIN DOCUMENT -->
|
<!-- BEGIN DOCUMENT -->
|
||||||
|
|
||||||
<p>Thank you for downloading phpBB. This README will guide you through the basics of installation and operation of phpBB. Please ensure you read this and the accompanying documentation fully <strong>before</strong> proceeding with the installation.</p>
|
<p class="paragraph main-description">
|
||||||
|
Thank you for downloading phpBB. This README will guide you through the basics of installation
|
||||||
|
and operation of phpBB. Please ensure you read this and the accompanying documentation fully
|
||||||
|
<strong>before</strong> proceeding with the installation.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h1>Readme</h1>
|
<h1>Readme</h1>
|
||||||
|
|
||||||
<div class="paragraph menu">
|
<div class="paragraph menu">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -73,7 +77,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -81,7 +85,7 @@
|
||||||
<a name="install"></a><h2>1. Installing phpBB</h2>
|
<a name="install"></a><h2>1. Installing phpBB</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p>Installation, update and conversion instructions can be found in the <a href="INSTALL.html">INSTALL</a> 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!</p>
|
<p>Installation, update and conversion instructions can be found in the <a href="INSTALL.html">INSTALL</a> 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!</p>
|
||||||
|
@ -110,7 +114,7 @@
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -118,7 +122,7 @@
|
||||||
<a name="run"></a><h2>2. Running phpBB</h2>
|
<a name="run"></a><h2>2. Running phpBB</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -162,7 +166,7 @@
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -170,7 +174,7 @@
|
||||||
<a name="help"></a><h2>3. Getting help with phpBB</h2>
|
<a name="help"></a><h2>3. Getting help with phpBB</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -208,7 +212,7 @@
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -216,7 +220,7 @@
|
||||||
<a name="status"></a><h2>4. Status of this version</h2>
|
<a name="status"></a><h2>4. Status of this version</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -232,7 +236,7 @@
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -240,7 +244,7 @@
|
||||||
<a name="bugs"></a><h2>5. Reporting Bugs</h2>
|
<a name="bugs"></a><h2>5. Reporting Bugs</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -283,7 +287,7 @@
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -291,7 +295,7 @@
|
||||||
<a name="curbugs"></a><h2>6. Overview of current bug list</h2>
|
<a name="curbugs"></a><h2>6. Overview of current bug list</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -307,7 +311,7 @@
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -315,7 +319,7 @@
|
||||||
<a name="php"></a><h2>7. PHP compatibility issues</h2>
|
<a name="php"></a><h2>7. PHP compatibility issues</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -333,7 +337,7 @@
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -341,7 +345,7 @@
|
||||||
<a name="disclaimer"></a><h2>8. Copyright and disclaimer</h2>
|
<a name="disclaimer"></a><h2>8. Copyright and disclaimer</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -351,7 +355,7 @@
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- END DOCUMENT -->
|
<!-- END DOCUMENT -->
|
||||||
|
|
|
@ -11,13 +11,21 @@ body {
|
||||||
font-family: Verdana, Helvetica, Arial, sans-serif;
|
font-family: Verdana, Helvetica, Arial, sans-serif;
|
||||||
color: #828282;
|
color: #828282;
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
font-size: 12px;
|
font-size: 10px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 12px 0;
|
padding: 12px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
img { border-width: 0; }
|
img { border-width: 0; }
|
||||||
|
|
||||||
|
ul, ol {
|
||||||
|
font-size: 1.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul ul, ol ol {
|
||||||
|
font-size: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
line-height: 1.3em;
|
line-height: 1.3em;
|
||||||
font-size: 1.1em;
|
font-size: 1.1em;
|
||||||
|
@ -70,7 +78,7 @@ h3 {
|
||||||
border-bottom: 1px solid #CCCCCC;
|
border-bottom: 1px solid #CCCCCC;
|
||||||
margin-bottom: 3px;
|
margin-bottom: 3px;
|
||||||
padding-bottom: 2px;
|
padding-bottom: 2px;
|
||||||
font-size: 1.05em;
|
font-size: 1.1em;
|
||||||
color: #115098;
|
color: #115098;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
@ -80,7 +88,7 @@ h4 {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-bottom: 3px;
|
margin-bottom: 3px;
|
||||||
padding-bottom: 2px;
|
padding-bottom: 2px;
|
||||||
font-size: 1.05em;
|
font-size: 1.1em;
|
||||||
color: #115098;
|
color: #115098;
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
@ -104,6 +112,7 @@ code {
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
border-style: solid;
|
border-style: solid;
|
||||||
background-color: #FAFAFA;
|
background-color: #FAFAFA;
|
||||||
|
padding: 0 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#wrap {
|
#wrap {
|
||||||
|
@ -145,44 +154,16 @@ a#logo:hover {
|
||||||
|
|
||||||
.headerbar {
|
.headerbar {
|
||||||
background: #ebebeb none repeat-x 0 0;
|
background: #ebebeb none repeat-x 0 0;
|
||||||
|
border-radius: 7px;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
padding: 0 5px;
|
padding: 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%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.paragraph {
|
.paragraph {
|
||||||
padding: 0 10px;
|
border-radius: 7px;
|
||||||
|
font-size: 1.1em;
|
||||||
|
padding: 5px 10px;
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: 100% 0;
|
background-position: 100% 0;
|
||||||
|
@ -197,6 +178,10 @@ span.corners-bottom span {
|
||||||
color: #000000;
|
color: #000000;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.main-description {
|
||||||
|
font-size: 1.15em;
|
||||||
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
color: #333333;
|
color: #333333;
|
||||||
}
|
}
|
||||||
|
@ -222,7 +207,7 @@ hr {
|
||||||
|
|
||||||
.headerbar {
|
.headerbar {
|
||||||
background-color: #12A3EB;
|
background-color: #12A3EB;
|
||||||
background-image: url("bg_header.gif");
|
background-image: url("../images/bg_header.gif");
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -231,23 +216,6 @@ hr {
|
||||||
color: #28313F;
|
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 {
|
.error {
|
||||||
color: #BC2A4D;
|
color: #BC2A4D;
|
||||||
}
|
}
|
||||||
|
@ -257,10 +225,6 @@ a:visited { color: #105289; }
|
||||||
a:hover { color: #D31141; }
|
a:hover { color: #D31141; }
|
||||||
a:active { color: #368AD2; }
|
a:active { color: #368AD2; }
|
||||||
|
|
||||||
.paragraph span.corners-top, .paragraph span.corners-bottom {
|
|
||||||
margin: 0 -10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
line-height: 1.48em;
|
line-height: 1.48em;
|
||||||
|
@ -288,13 +252,17 @@ a:active { color: #368AD2; }
|
||||||
}
|
}
|
||||||
|
|
||||||
* html hr { margin: 0; }
|
* 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 {
|
.top {
|
||||||
clear: both;
|
background: url("../images/icon_back_top.gif") no-repeat top left;
|
||||||
|
text-decoration: none;
|
||||||
|
width: 11px;
|
||||||
height: 11px;
|
height: 11px;
|
||||||
text-align: right;
|
display: block;
|
||||||
|
float: right;
|
||||||
|
overflow: hidden;
|
||||||
|
letter-spacing: 1000px;
|
||||||
|
text-indent: 11px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content ol, .content ul {
|
.content ol, .content ul {
|
||||||
|
@ -350,3 +318,9 @@ a:active { color: #368AD2; }
|
||||||
clear: both;
|
clear: both;
|
||||||
margin-right: 1em;
|
margin-right: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.inner:after {
|
||||||
|
clear: both;
|
||||||
|
content: '';
|
||||||
|
display: block;
|
||||||
|
}
|
Before Width: | Height: | Size: 690 B After Width: | Height: | Size: 690 B |
BIN
phpBB/docs/assets/images/icon_back_top.gif
Normal file
After Width: | Height: | Size: 204 B |
BIN
phpBB/docs/assets/images/site_logo.gif
Normal file
After Width: | Height: | Size: 5 KiB |
|
@ -6,7 +6,7 @@
|
||||||
<meta name="description" content="This is an explanation of how to use the phpBB auth/acl API" />
|
<meta name="description" content="This is an explanation of how to use the phpBB auth/acl API" />
|
||||||
<title>phpBB3 • Auth API</title>
|
<title>phpBB3 • Auth API</title>
|
||||||
|
|
||||||
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -16,16 +16,16 @@
|
||||||
<a id="top" name="top" accesskey="t"></a>
|
<a id="top" name="top" accesskey="t"></a>
|
||||||
<div id="page-header">
|
<div id="page-header">
|
||||||
<div class="headerbar">
|
<div class="headerbar">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div id="doc-description">
|
<div id="doc-description">
|
||||||
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
|
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
|
||||||
<h1>Auth API</h1>
|
<h1>Auth API</h1>
|
||||||
<p>This is an explanation of how to use the phpBB auth/acl API</p>
|
<p>This is an explanation of how to use the phpBB auth/acl API</p>
|
||||||
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -35,12 +35,12 @@
|
||||||
|
|
||||||
<!-- BEGIN DOCUMENT -->
|
<!-- BEGIN DOCUMENT -->
|
||||||
|
|
||||||
<p>This is an explanation of how to use the phpBB auth/acl API.</p>
|
<p class="paragraph main-description">This is an explanation of how to use the phpBB auth/acl API.</p>
|
||||||
|
|
||||||
<h1>Auth API</h1>
|
<h1>Auth API</h1>
|
||||||
|
|
||||||
<div class="paragraph menu">
|
<div class="paragraph menu">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
<a name="intro"></a><h2>1. Introduction</h2>
|
<a name="intro"></a><h2>1. Introduction</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -86,8 +86,8 @@
|
||||||
<p>To use any methods contained with the <code>auth</code> class it first needs to be instantiated. This is best achieved early in the execution of the script in the following manner:</p>
|
<p>To use any methods contained with the <code>auth</code> class it first needs to be instantiated. This is best achieved early in the execution of the script in the following manner:</p>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$auth = new phpbb\auth\auth();
|
$auth = new phpbb\auth\auth();</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>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 <code>auth_admin</code> methods you will need to instantiate this separately but in the same way.</p>
|
<p>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 <code>auth_admin</code> methods you will need to instantiate this separately but in the same way.</p>
|
||||||
|
|
||||||
|
@ -95,7 +95,7 @@ $auth = new phpbb\auth\auth();
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -103,7 +103,7 @@ $auth = new phpbb\auth\auth();
|
||||||
<a name="methods"></a><h2>2. Methods</h2>
|
<a name="methods"></a><h2>2. Methods</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -114,8 +114,8 @@ $auth = new phpbb\auth\auth();
|
||||||
<p>The <code>acl</code> 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:</p>
|
<p>The <code>acl</code> 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:</p>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$auth->acl(<code>userdata</code>);
|
$auth->acl(<code>userdata</code>);</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>Where userdata is the array containing the aforementioned data.</p>
|
<p>Where userdata is the array containing the aforementioned data.</p>
|
||||||
|
|
||||||
|
@ -124,8 +124,8 @@ $auth->acl(<code>userdata</code>);
|
||||||
<p>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:</p>
|
<p>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:</p>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$result = $auth->acl_get(<code>option</code>[, <code>forum</code>]);
|
$result = $auth->acl_get(<code>option</code>[, <code>forum</code>]);</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>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.</p>
|
<p>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.</p>
|
||||||
|
|
||||||
|
@ -142,8 +142,8 @@ $result = $auth->acl_get(<code>option</code>[, <code>forum</code>]);
|
||||||
<p>The method should be called thus:</p>
|
<p>The method should be called thus:</p>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$result = $auth->acl_gets(<code>option1</code>[, <code>option2</code>, ..., <code>optionN</code>, <code>forum</code>]);
|
$result = $auth->acl_gets(<code>option1</code>[, <code>option2</code>, ..., <code>optionN</code>, <code>forum</code>]);</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>As with the <code>acl_get</code> method the options are strings representing the required permissions to check. The forum again is an integer representing a given forum_id.</p>
|
<p>As with the <code>acl_get</code> method the options are strings representing the required permissions to check. The forum again is an integer representing a given forum_id.</p>
|
||||||
|
|
||||||
|
@ -154,16 +154,16 @@ $result = $auth->acl_gets(<code>option1</code>[, <code>option2</code>, ..., <
|
||||||
<p>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:</p>
|
<p>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:</p>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$result = $auth->acl_getf(<code>option</code>[, <code>clean</code>]);
|
$result = $auth->acl_getf(<code>option</code>[, <code>clean</code>]);</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>Just like in the <code>acl_get</code> 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.</p>
|
<p>Just like in the <code>acl_get</code> 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.</p>
|
||||||
|
|
||||||
<p>The method returns an associative array of the form:</p>
|
<p>The method returns an associative array of the form:</p>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
array(<em>forum_id1</em> => array(<em>option</em> => <em>integer</em>), <em>forum_id2</em> => ...)
|
array(<em>forum_id1</em> => array(<em>option</em> => <em>integer</em>), <em>forum_id2</em> => ...)</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>Where option is the option passed to the method and integer is either zero or a positive integer and the same <code>acl_get(option, forum_id)</code> would return.</p>
|
<p>Where option is the option passed to the method and integer is either zero or a positive integer and the same <code>acl_get(option, forum_id)</code> would return.</p>
|
||||||
|
|
||||||
|
@ -172,8 +172,8 @@ array(<em>forum_id1</em> => array(<em>option</em> => <em>integer</em>), <e
|
||||||
<p>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 <code>acl_getf(option, true)</code> returned one or more forums but it's faster. It should be called in the following way:</p>
|
<p>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 <code>acl_getf(option, true)</code> returned one or more forums but it's faster. It should be called in the following way:</p>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$result = $auth->acl_getf_global(<code>option</code>)
|
$result = $auth->acl_getf_global(<code>option</code>)</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>As with the previous methods option is a string specifying the permission which has to be checked.</p>
|
<p>As with the previous methods option is a string specifying the permission which has to be checked.</p>
|
||||||
|
|
||||||
|
@ -230,7 +230,7 @@ $result = $auth->acl_get_list($user_id, $permissions, $forum_id);
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -238,7 +238,7 @@ $result = $auth->acl_get_list($user_id, $permissions, $forum_id);
|
||||||
<a name="admin_related"></a><h2>3. Admin related functions</h2>
|
<a name="admin_related"></a><h2>3. Admin related functions</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -247,8 +247,8 @@ $result = $auth->acl_get_list($user_id, $permissions, $forum_id);
|
||||||
<p>To use any methods this class contains it first needs to be instantiated separately from <code>auth</code>. This is achieved in the same way as <code>auth</code>:</p>
|
<p>To use any methods this class contains it first needs to be instantiated separately from <code>auth</code>. This is achieved in the same way as <code>auth</code>:</p>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$auth_admin = new auth_admin();
|
$auth_admin = new auth_admin();</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>This instance gives you access to both the methods of this specific class and that of <code>auth</code>.</p>
|
<p>This instance gives you access to both the methods of this specific class and that of <code>auth</code>.</p>
|
||||||
|
|
||||||
|
@ -256,7 +256,7 @@ $auth_admin = new auth_admin();
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -264,7 +264,7 @@ $auth_admin = new auth_admin();
|
||||||
<a name="disclaimer"></a><h2>4. Copyright and disclaimer</h2>
|
<a name="disclaimer"></a><h2>4. Copyright and disclaimer</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -274,7 +274,7 @@ $auth_admin = new auth_admin();
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- END DOCUMENT -->
|
<!-- END DOCUMENT -->
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<meta name="description" content="Ascraeus coding guidelines document" />
|
<meta name="description" content="Ascraeus coding guidelines document" />
|
||||||
<title>phpBB3 • Coding Guidelines</title>
|
<title>phpBB3 • Coding Guidelines</title>
|
||||||
|
|
||||||
<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
<link href="assets/css/stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
@ -16,16 +16,16 @@
|
||||||
<a id="top" name="top" accesskey="t"></a>
|
<a id="top" name="top" accesskey="t"></a>
|
||||||
<div id="page-header">
|
<div id="page-header">
|
||||||
<div class="headerbar">
|
<div class="headerbar">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div id="doc-description">
|
<div id="doc-description">
|
||||||
<a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
|
<a href="../index.php" id="logo"><img src="assets/images/site_logo.gif" alt="" /></a>
|
||||||
<h1>Coding Guidelines</h1>
|
<h1>Coding Guidelines</h1>
|
||||||
<p>Ascraeus coding guidelines document</p>
|
<p>Ascraeus coding guidelines document</p>
|
||||||
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
<p style="display: none;"><a href="#start_here">Skip</a></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -35,12 +35,14 @@
|
||||||
|
|
||||||
<!-- BEGIN DOCUMENT -->
|
<!-- BEGIN DOCUMENT -->
|
||||||
|
|
||||||
<p>These are the phpBB Coding Guidelines for Ascraeus, all attempts should be made to follow them as closely as possible.</p>
|
<p class="paragraph main-description">
|
||||||
|
These are the phpBB Coding Guidelines for Ascraeus, all attempts should be made to follow them as closely as possible.
|
||||||
|
</p>
|
||||||
|
|
||||||
<h1>Coding Guidelines</h1>
|
<h1>Coding Guidelines</h1>
|
||||||
|
|
||||||
<div class="paragraph menu">
|
<div class="paragraph menu">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -89,7 +91,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -97,7 +99,7 @@
|
||||||
<a name="defaults"></a><h2>1. Defaults</h2>
|
<a name="defaults"></a><h2>1. Defaults</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -109,8 +111,8 @@
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
{TAB}$mode{TAB}{TAB}= $request->variable('mode', '');
|
{TAB}$mode{TAB}{TAB}= $request->variable('mode', '');
|
||||||
{TAB}$search_id{TAB}= $request->variable('search_id', '');
|
{TAB}$search_id{TAB}= $request->variable('search_id', '');</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>If entered with tabs (replace the {TAB}) both equal signs need to be on the same column.</p>
|
<p>If entered with tabs (replace the {TAB}) both equal signs need to be on the same column.</p>
|
||||||
|
|
||||||
|
@ -133,8 +135,8 @@
|
||||||
* For full copyright and license information, please see
|
* For full copyright and license information, please see
|
||||||
* the docs/CREDITS.txt file.
|
* the docs/CREDITS.txt file.
|
||||||
*
|
*
|
||||||
*/
|
*/</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>Please see the <a href="#locations">File Locations section</a> for the correct package name.</p>
|
<p>Please see the <a href="#locations">File Locations section</a> for the correct package name.</p>
|
||||||
|
|
||||||
|
@ -157,8 +159,8 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
{CODE}
|
{CODE}</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<h4>Files containing only functions:</h4>
|
<h4>Files containing only functions:</h4>
|
||||||
|
|
||||||
|
@ -185,8 +187,8 @@ Small code snipped, mostly one or two defines or an if statement
|
||||||
/**
|
/**
|
||||||
* {DOCUMENTATION}
|
* {DOCUMENTATION}
|
||||||
*/
|
*/
|
||||||
class ...
|
class ...</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<a name="locations"></a><h3>1.iii. File Locations</h3>
|
<a name="locations"></a><h3>1.iii. File Locations</h3>
|
||||||
|
|
||||||
|
@ -274,7 +276,7 @@ PHPBB_QA (Set board to QA-Mode, which means the updater also c
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -282,7 +284,7 @@ PHPBB_QA (Set board to QA-Mode, which means the updater also c
|
||||||
<a name="code"></a><h2>2. Code Layout/Guidelines</h2>
|
<a name="code"></a><h2>2. Code Layout/Guidelines</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -317,8 +319,8 @@ for ($i = 0; $i < $outer_size; $i++)
|
||||||
{
|
{
|
||||||
foo($i, $j);
|
foo($i, $j);
|
||||||
}
|
}
|
||||||
}
|
}</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<h4>Function Names:</h4>
|
<h4>Function Names:</h4>
|
||||||
<p>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 <code>phpbb_print_login_status()</code>, <code>phpbb_get_user_data()</code>, etc. Constructor functions in JavaScript should begin with a capital letter.</p>
|
<p>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 <code>phpbb_print_login_status()</code>, <code>phpbb_get_user_data()</code>, etc. Constructor functions in JavaScript should begin with a capital letter.</p>
|
||||||
|
@ -344,14 +346,14 @@ phpbb/
|
||||||
dir/
|
dir/
|
||||||
class_name.php
|
class_name.php
|
||||||
subdir/
|
subdir/
|
||||||
class_name.php
|
class_name.php</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
\phpbb\class_name - phpbb/class_name.php
|
\phpbb\class_name - phpbb/class_name.php
|
||||||
\phpbb\dir\class_name - phpbb/dir/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</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<h4>Summary:</h4>
|
<h4>Summary:</h4>
|
||||||
|
@ -377,8 +379,8 @@ while (condition)
|
||||||
do_stuff();
|
do_stuff();
|
||||||
|
|
||||||
for ($i = 0; $i < size; $i++)
|
for ($i = 0; $i < size; $i++)
|
||||||
do_stuff($i);
|
do_stuff($i);</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// These are all right. </p>
|
<p class="good">// These are all right. </p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
|
@ -395,8 +397,8 @@ while (condition)
|
||||||
for ($i = 0; $i < size; $i++)
|
for ($i = 0; $i < size; $i++)
|
||||||
{
|
{
|
||||||
do_stuff();
|
do_stuff();
|
||||||
}
|
}</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<h4>Where to put the braces:</h4>
|
<h4>Where to put the braces:</h4>
|
||||||
<p>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:</p>
|
<p>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:</p>
|
||||||
|
@ -427,8 +429,8 @@ while (condition)
|
||||||
function do_stuff()
|
function do_stuff()
|
||||||
{
|
{
|
||||||
...
|
...
|
||||||
}
|
}</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>In JavaScript code, braces always go on the same line:</p>
|
<p>In JavaScript code, braces always go on the same line:</p>
|
||||||
|
|
||||||
|
@ -451,8 +453,8 @@ while (condition) {
|
||||||
|
|
||||||
function do_stuff() {
|
function do_stuff() {
|
||||||
...
|
...
|
||||||
}
|
}</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<h4>Use spaces between tokens:</h4>
|
<h4>Use spaces between tokens:</h4>
|
||||||
<p>This is another simple, easy step that helps keep code readable without much effort. Whenever you write an assignment, expression, etc.. Always leave <em>one</em> 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:</p>
|
<p>This is another simple, easy step that helps keep code readable without much effort. Whenever you write an assignment, expression, etc.. Always leave <em>one</em> 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:</p>
|
||||||
|
@ -476,26 +478,26 @@ for($i=0; $i<$size; $i++) ...
|
||||||
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;
|
$i = ($j < $size) ? 0 : 1;</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<h4>Operator precedence:</h4>
|
<h4>Operator precedence:</h4>
|
||||||
<p>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:</p>
|
<p>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:</p>
|
||||||
|
|
||||||
<p class="bad">// what's the result? who knows. </p>
|
<p class="bad">// what's the result? who knows. </p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox">
|
||||||
$bool = ($i < 7 && $j > 8 || $k == 4);
|
<pre>$bool = ($i < 7 && $j > 8 || $k == 4);</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="bad">// now you can be certain what I'm doing here.</p>
|
<p class="bad">// now you can be certain what I'm doing here.</p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox">
|
||||||
$bool = (($i < 7) && (($j < 8) || ($k == 4)));
|
<pre>$bool = (($i < 7) && (($j < 8) || ($k == 4)));</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// But this one is even better, because it is easier on the eye but the intention is preserved</p>
|
<p class="good">// But this one is even better, because it is easier on the eye but the intention is preserved</p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox">
|
||||||
$bool = ($i < 7 && ($j < 8 || $k == 4));
|
<pre>$bool = ($i < 7 && ($j < 8 || $k == 4));</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<h4>Quoting strings:</h4>
|
<h4>Quoting strings:</h4>
|
||||||
<p>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 <em>always</em> use single quotes <em>unless</em> 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.</p>
|
<p>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 <em>always</em> use single quotes <em>unless</em> 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.</p>
|
||||||
|
@ -505,25 +507,25 @@ $bool = ($i < 7 && ($j < 8 || $k == 4));
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$str = "This is a really long string with no variables for the parser to find.";
|
$str = "This is a really long string with no variables for the parser to find.";
|
||||||
|
|
||||||
do_stuff("$str");
|
do_stuff("$str");</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// right</p>
|
<p class="good">// right</p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$str = 'This is a really long string with no variables for the parser to find.';
|
$str = 'This is a really long string with no variables for the parser to find.';
|
||||||
|
|
||||||
do_stuff($str);
|
do_stuff($str);</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="bad">// Sometimes single quotes are just not right</p>
|
<p class="bad">// Sometimes single quotes are just not right</p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$post_url = $phpbb_root_path . 'posting.' . $phpEx . '?mode=' . $mode . '&amp;start=' . $start;
|
$post_url = $phpbb_root_path . 'posting.' . $phpEx . '?mode=' . $mode . '&amp;start=' . $start;</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// Double quotes are sometimes needed to not overcrowd the line with concatenations.</p>
|
<p class="good">// Double quotes are sometimes needed to not overcrowd the line with concatenations.</p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&amp;start=$start";
|
$post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&amp;start=$start";</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>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.</p>
|
<p>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.</p>
|
||||||
|
|
||||||
|
@ -535,40 +537,40 @@ $post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&amp;start=$start";
|
||||||
$foo = array(
|
$foo = array(
|
||||||
'bar' => 42,
|
'bar' => 42,
|
||||||
'boo' => 23
|
'boo' => 23
|
||||||
);
|
);</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// right </p>
|
<p class="good">// right </p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$foo = array(
|
$foo = array(
|
||||||
'bar' => 42,
|
'bar' => 42,
|
||||||
'boo' => 23,
|
'boo' => 23,
|
||||||
);
|
);</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<h4>Associative array keys:</h4>
|
<h4>Associative array keys:</h4>
|
||||||
<p>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:</p>
|
<p>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:</p>
|
||||||
|
|
||||||
<p class="bad">// wrong</p>
|
<p class="bad">// wrong</p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox">
|
||||||
$foo = $assoc_array[blah];
|
<pre>$foo = $assoc_array[blah];</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// right </p>
|
<p class="good">// right </p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox">
|
||||||
$foo = $assoc_array['blah'];
|
<pre>$foo = $assoc_array['blah'];</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="bad">// wrong</p>
|
<p class="bad">// wrong</p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox">
|
||||||
$foo = $assoc_array["$var"];
|
<pre>$foo = $assoc_array["$var"];</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// right </p>
|
<p class="good">// right </p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox">
|
||||||
$foo = $assoc_array[$var];
|
<pre>$foo = $assoc_array[$var];</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<h4>Comments:</h4>
|
<h4>Comments:</h4>
|
||||||
<p>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.<br /><br />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.<br /><br />Avoid using <code>/* */</code> comment blocks for one-line comments, <code>//</code> should be used for one/two-liners.</p>
|
<p>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.<br /><br />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.<br /><br />Avoid using <code>/* */</code> comment blocks for one-line comments, <code>//</code> should be used for one/two-liners.</p>
|
||||||
|
@ -582,8 +584,8 @@ $foo = $assoc_array[$var];
|
||||||
<p class="bad">// wrong </p>
|
<p class="bad">// wrong </p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$array[++$i] = $j;
|
$array[++$i] = $j;
|
||||||
$array[$i++] = $k;
|
$array[$i++] = $k;</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// right </p>
|
<p class="good">// right </p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
|
@ -591,39 +593,38 @@ $i++;
|
||||||
$array[$i] = $j;
|
$array[$i] = $j;
|
||||||
|
|
||||||
$array[$i] = $k;
|
$array[$i] = $k;
|
||||||
$i++;
|
$i++;</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<h4>Inline conditionals:</h4>
|
<h4>Inline conditionals:</h4>
|
||||||
<p>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:</p>
|
<p>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:</p>
|
||||||
|
|
||||||
<p class="bad">// Bad place to use them</p>
|
<p class="bad">// Bad place to use them</p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
($i < $size && $j > $size) ? do_stuff($foo) : do_stuff($bar);
|
($i < $size && $j > $size) ? do_stuff($foo) : do_stuff($bar);</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// OK place to use them </p>
|
<p class="good">// OK place to use them </p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$min = ($i < $j) ? $i : $j;
|
$min = ($i < $j) ? $i : $j;</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<h4>Don't use uninitialized variables.</h4>
|
<h4>Don't use uninitialized variables.</h4>
|
||||||
<p>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:</p>
|
<p>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:</p>
|
||||||
|
|
||||||
<p class="bad">// Wrong </p>
|
<p class="bad">// Wrong </p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox">
|
||||||
if ($forum) ...
|
<pre>if ($forum) ...</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// Right </p>
|
<p class="good">// Right </p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox">
|
||||||
if (isset($forum)) ...
|
<pre>if (isset($forum)) ...</pre></div>
|
||||||
</pre></div>
|
|
||||||
|
|
||||||
<p class="good">// Also possible</p>
|
<p class="good">// Also possible</p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox">
|
||||||
if (isset($forum) && $forum == 5)
|
<pre>if (isset($forum) && $forum == 5)</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>The <code>empty()</code> 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 <code>isset($array) && sizeof($array) > 0</code> - this can be written in a shorter way as <code>!empty($array)</code>.</p>
|
<p>The <code>empty()</code> 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 <code>isset($array) && sizeof($array) > 0</code> - this can be written in a shorter way as <code>!empty($array)</code>.</p>
|
||||||
|
|
||||||
|
@ -640,8 +641,8 @@ switch ($mode)
|
||||||
case 'mode2':
|
case 'mode2':
|
||||||
// I am doing something completely different here
|
// I am doing something completely different here
|
||||||
break;
|
break;
|
||||||
}
|
}</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// Good </p>
|
<p class="good">// Good </p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
|
@ -658,8 +659,8 @@ switch ($mode)
|
||||||
default:
|
default:
|
||||||
// Always assume that a case was not caught
|
// Always assume that a case was not caught
|
||||||
break;
|
break;
|
||||||
}
|
}</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// Also good, if you have more code between the case and the break </p>
|
<p class="good">// Also good, if you have more code between the case and the break </p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
|
@ -682,8 +683,8 @@ switch ($mode)
|
||||||
// Always assume that a case was not caught
|
// Always assume that a case was not caught
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>Even if the break for the default case is not needed, it is sometimes better to include it just for readability and completeness.</p>
|
<p>Even if the break for the default case is not needed, it is sometimes better to include it just for readability and completeness.</p>
|
||||||
|
|
||||||
|
@ -710,8 +711,8 @@ switch ($mode)
|
||||||
// Always assume that a case was not caught
|
// Always assume that a case was not caught
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<h4>Class Members</h4>
|
<h4>Class Members</h4>
|
||||||
<p>Use the explicit visibility qualifiers <code>public</code>, <code>private</code> and <code>protected</code> for all properties instead of <code>var</code>.
|
<p>Use the explicit visibility qualifiers <code>public</code>, <code>private</code> and <code>protected</code> for all properties instead of <code>var</code>.
|
||||||
|
@ -721,14 +722,14 @@ switch ($mode)
|
||||||
<p class="bad">//Wrong </p>
|
<p class="bad">//Wrong </p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
var $x;
|
var $x;
|
||||||
private static function f()
|
private static function f()</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// Right </p>
|
<p class="good">// Right </p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
public $x;
|
public $x;
|
||||||
static private function f()
|
static private function f()</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<h4>Constants</h4>
|
<h4>Constants</h4>
|
||||||
<p>Prefer class constants over global constants created with <code>define()</code>.</p>
|
<p>Prefer class constants over global constants created with <code>define()</code>.</p>
|
||||||
|
@ -748,8 +749,8 @@ $sql = 'SELECT *
|
||||||
<-one tab->WHERE a = 1
|
<-one tab->WHERE a = 1
|
||||||
<-two tabs->AND (b = 2
|
<-two tabs->AND (b = 2
|
||||||
<-three tabs->OR b = 3)
|
<-three tabs->OR b = 3)
|
||||||
<-one tab->ORDER BY b';
|
<-one tab->ORDER BY b';</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>Here the example with the tabs applied:</p>
|
<p>Here the example with the tabs applied:</p>
|
||||||
|
|
||||||
|
@ -759,8 +760,8 @@ $sql = 'SELECT *
|
||||||
WHERE a = 1
|
WHERE a = 1
|
||||||
AND (b = 2
|
AND (b = 2
|
||||||
OR b = 3)
|
OR b = 3)
|
||||||
ORDER BY b';
|
ORDER BY b';</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<h4>SQL Quotes: </h4>
|
<h4>SQL Quotes: </h4>
|
||||||
<p>Use double quotes where applicable. (The variables in these examples are typecasted to integers beforehand.) Examples: </p>
|
<p>Use double quotes where applicable. (The variables in these examples are typecasted to integers beforehand.) Examples: </p>
|
||||||
|
@ -769,16 +770,16 @@ $sql = 'SELECT *
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
"UPDATE " . SOME_TABLE . " SET something = something_else WHERE a = $b";
|
"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;</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// These are right. </p>
|
<p class="good">// These are right. </p>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
'UPDATE ' . SOME_TABLE . " SET something = something_else WHERE a = $b";
|
'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";</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>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.</p>
|
<p>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.</p>
|
||||||
|
|
||||||
|
@ -789,15 +790,15 @@ $sql = 'SELECT *
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . SOME_TABLE . '
|
FROM ' . SOME_TABLE . '
|
||||||
WHERE a != 2';
|
WHERE a != 2';</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// This is right. </p>
|
<p class="good">// This is right. </p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . SOME_TABLE . '
|
FROM ' . SOME_TABLE . '
|
||||||
WHERE a <> 2';
|
WHERE a <> 2';</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<h4>Common DBAL methods: </h4>
|
<h4>Common DBAL methods: </h4>
|
||||||
|
|
||||||
|
@ -808,8 +809,8 @@ $sql = 'SELECT *
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . SOME_TABLE . "
|
FROM ' . SOME_TABLE . "
|
||||||
WHERE username = '" . $db->sql_escape($username) . "'";
|
WHERE username = '" . $db->sql_escape($username) . "'";</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<h4>sql_query_limit():</h4>
|
<h4>sql_query_limit():</h4>
|
||||||
|
|
||||||
|
@ -830,8 +831,8 @@ $sql_ary = array(
|
||||||
'moredata' => $another_int,
|
'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));</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>To complete the example, this is how an update statement would look like:</p>
|
<p>To complete the example, this is how an update statement would look like:</p>
|
||||||
|
|
||||||
|
@ -845,8 +846,8 @@ $sql_ary = array(
|
||||||
$sql = 'UPDATE ' . SOME_TABLE . '
|
$sql = 'UPDATE ' . SOME_TABLE . '
|
||||||
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
SET ' . $db->sql_build_array('UPDATE', $sql_ary) . '
|
||||||
WHERE user_id = ' . (int) $user_id;
|
WHERE user_id = ' . (int) $user_id;
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>The <code>$db->sql_build_array()</code> function supports the following modes: <code>INSERT</code> (example above), <code>INSERT_SELECT</code> (building query for <code>INSERT INTO table (...) SELECT value, column ...</code> statements), <code>UPDATE</code> (example above) and <code>SELECT</code> (for building WHERE statement [AND logic]).</p>
|
<p>The <code>$db->sql_build_array()</code> function supports the following modes: <code>INSERT</code> (example above), <code>INSERT_SELECT</code> (building query for <code>INSERT INTO table (...) SELECT value, column ...</code> statements), <code>UPDATE</code> (example above) and <code>SELECT</code> (for building WHERE statement [AND logic]).</p>
|
||||||
|
|
||||||
|
@ -869,8 +870,8 @@ $sql_ary[] = array(
|
||||||
'moredata' => $another_int_2,
|
'moredata' => $another_int_2,
|
||||||
);
|
);
|
||||||
|
|
||||||
$db->sql_multi_insert(SOME_TABLE, $sql_ary);
|
$db->sql_multi_insert(SOME_TABLE, $sql_ary);</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<h4>sql_in_set():</h4>
|
<h4>sql_in_set():</h4>
|
||||||
|
|
||||||
|
@ -880,22 +881,22 @@ $db->sql_multi_insert(SOME_TABLE, $sql_ary);
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . FORUMS_TABLE . '
|
FROM ' . FORUMS_TABLE . '
|
||||||
WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
|
WHERE ' . $db->sql_in_set('forum_id', $forum_ids);
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>Based on the number of values in $forum_ids, the query can look differently.</p>
|
<p>Based on the number of values in $forum_ids, the query can look differently.</p>
|
||||||
|
|
||||||
<p class="good">// SQL Statement if $forum_ids = array(1, 2, 3);</p>
|
<p class="good">// SQL Statement if $forum_ids = array(1, 2, 3);</p>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
SELECT FROM phpbb_forums WHERE forum_id IN (1, 2, 3)
|
SELECT FROM phpbb_forums WHERE forum_id IN (1, 2, 3)</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// SQL Statement if $forum_ids = array(1) or $forum_ids = 1</p>
|
<p class="good">// SQL Statement if $forum_ids = array(1) or $forum_ids = 1</p>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
SELECT FROM phpbb_forums WHERE forum_id = 1
|
SELECT FROM phpbb_forums WHERE forum_id = 1</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>Of course the same is possible for doing a negative match against a number of values:</p>
|
<p>Of course the same is possible for doing a negative match against a number of values:</p>
|
||||||
|
|
||||||
|
@ -903,22 +904,22 @@ SELECT FROM phpbb_forums WHERE forum_id = 1
|
||||||
$sql = 'SELECT *
|
$sql = 'SELECT *
|
||||||
FROM ' . FORUMS_TABLE . '
|
FROM ' . FORUMS_TABLE . '
|
||||||
WHERE ' . $db->sql_in_set('forum_id', $forum_ids, <strong>true</strong>);
|
WHERE ' . $db->sql_in_set('forum_id', $forum_ids, <strong>true</strong>);
|
||||||
$db->sql_query($sql);
|
$db->sql_query($sql);</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>Based on the number of values in $forum_ids, the query can look differently here too.</p>
|
<p>Based on the number of values in $forum_ids, the query can look differently here too.</p>
|
||||||
|
|
||||||
<p class="good">// SQL Statement if $forum_ids = array(1, 2, 3);</p>
|
<p class="good">// SQL Statement if $forum_ids = array(1, 2, 3);</p>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
SELECT FROM phpbb_forums WHERE forum_id <strong>NOT</strong> IN (1, 2, 3)
|
SELECT FROM phpbb_forums WHERE forum_id <strong>NOT</strong> IN (1, 2, 3)</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// SQL Statement if $forum_ids = array(1) or $forum_ids = 1</p>
|
<p class="good">// SQL Statement if $forum_ids = array(1) or $forum_ids = 1</p>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
SELECT FROM phpbb_forums WHERE forum_id <strong><></strong> 1
|
SELECT FROM phpbb_forums WHERE forum_id <strong><></strong> 1</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>If the given array is empty, an error will be produced.</p>
|
<p>If the given array is empty, an error will be produced.</p>
|
||||||
|
|
||||||
|
@ -948,8 +949,8 @@ $sql_array = array(
|
||||||
'ORDER_BY' => 'left_id',
|
'ORDER_BY' => 'left_id',
|
||||||
);
|
);
|
||||||
|
|
||||||
$sql = $db->sql_build_query('SELECT', $sql_array);
|
$sql = $db->sql_build_query('SELECT', $sql_array);</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>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:</p>
|
<p>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:</p>
|
||||||
|
|
||||||
|
@ -984,8 +985,8 @@ else
|
||||||
// Here we read the cookie data
|
// Here we read the cookie data
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql = $db->sql_build_query('SELECT', $sql_array);
|
$sql = $db->sql_build_query('SELECT', $sql_array);</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<a name="optimizing"></a><h3>2.iv. Optimizations</h3>
|
<a name="optimizing"></a><h3>2.iv. Optimizations</h3>
|
||||||
|
|
||||||
|
@ -997,16 +998,16 @@ $sql = $db->sql_build_query('SELECT', $sql_array);
|
||||||
for ($i = 0; $i < sizeof($post_data); $i++)
|
for ($i = 0; $i < sizeof($post_data); $i++)
|
||||||
{
|
{
|
||||||
do_something();
|
do_something();
|
||||||
}
|
}</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// You are able to assign the (not changing) result within the loop itself</p>
|
<p class="good">// You are able to assign the (not changing) result within the loop itself</p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
for ($i = 0, $size = sizeof($post_data); $i < $size; $i++)
|
for ($i = 0, $size = sizeof($post_data); $i < $size; $i++)
|
||||||
{
|
{
|
||||||
do_something();
|
do_something();
|
||||||
}
|
}</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<h4>Use of in_array(): </h4>
|
<h4>Use of in_array(): </h4>
|
||||||
<p>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 <code>isset($array[$var])</code> is a lot faster than <code>in_array($var, array_keys($array))</code> for example.</p>
|
<p>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 <code>isset($array[$var])</code> is a lot faster than <code>in_array($var, array_keys($array))</code> for example.</p>
|
||||||
|
@ -1028,29 +1029,29 @@ for ($i = 0, $size = sizeof($post_data); $i < $size; $i++)
|
||||||
<p class="bad">// Old method, do not use it</p>
|
<p class="bad">// Old method, do not use it</p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$start = (isset($HTTP_GET_VARS['start'])) ? intval($HTTP_GET_VARS['start']) : intval($HTTP_POST_VARS['start']);
|
$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;</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// Use request var and define a default variable (use the correct type)</p>
|
<p class="good">// Use request var and define a default variable (use the correct type)</p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$start = $request->variable('start', 0);
|
$start = $request->variable('start', 0);
|
||||||
$submit = $request->is_set_post('submit');
|
$submit = $request->is_set_post('submit');</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="bad">// $start is an int, the following use of $request->variable() therefore is not allowed</p>
|
<p class="bad">// $start is an int, the following use of $request->variable() therefore is not allowed</p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$start = $request->variable('start', '0');
|
$start = $request->variable('start', '0');</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// Getting an array, keys are integers, value defaults to 0</p>
|
<p class="good">// Getting an array, keys are integers, value defaults to 0</p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$mark_array = $request->variable('mark', array(0));
|
$mark_array = $request->variable('mark', array(0));</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// Getting an array, keys are strings, value defaults to 0</p>
|
<p class="good">// Getting an array, keys are strings, value defaults to 0</p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$action_ary = $request->variable('action', array('' => 0));
|
$action_ary = $request->variable('action', array('' => 0));</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<h4>Login checks/redirection: </h4>
|
<h4>Login checks/redirection: </h4>
|
||||||
<p>To show a forum login box use <code>login_forum_box($forum_data)</code>, else use the <code>login_box()</code> function.</p>
|
<p>To show a forum login box use <code>login_forum_box($forum_data)</code>, else use the <code>login_box()</code> function.</p>
|
||||||
|
@ -1073,8 +1074,8 @@ $action_ary = $request->variable('action', array('' => 0));
|
||||||
{
|
{
|
||||||
trigger_error('FORM_INVALID');
|
trigger_error('FORM_INVALID');
|
||||||
}
|
}
|
||||||
}
|
}</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>The string passed to <code>add_form_key()</code> needs to match the string passed to <code>check_form_key()</code>. Another requirement for this to work correctly is that all forms include the <code>{S_FORM_TOKEN}</code> template variable.</p>
|
<p>The string passed to <code>add_form_key()</code> needs to match the string passed to <code>check_form_key()</code>. Another requirement for this to work correctly is that all forms include the <code>{S_FORM_TOKEN}</code> template variable.</p>
|
||||||
|
|
||||||
|
@ -1085,8 +1086,8 @@ $action_ary = $request->variable('action', array('' => 0));
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
$user->session_begin();
|
$user->session_begin();
|
||||||
$auth->acl($user->data);
|
$auth->acl($user->data);
|
||||||
$user->setup();
|
$user->setup();</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>The <code>$user->setup()</code> call can be used to pass on additional language definition and a custom style (used in viewforum).</p>
|
<p>The <code>$user->setup()</code> call can be used to pass on additional language definition and a custom style (used in viewforum).</p>
|
||||||
|
|
||||||
|
@ -1094,16 +1095,16 @@ $user->setup();
|
||||||
<p>All messages/errors should be outputted by calling <code>trigger_error()</code> using the appropriate message type and language string. Example:</p>
|
<p>All messages/errors should be outputted by calling <code>trigger_error()</code> using the appropriate message type and language string. Example:</p>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
trigger_error('NO_FORUM');
|
trigger_error('NO_FORUM');</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
trigger_error($user->lang['NO_FORUM']);
|
trigger_error($user->lang['NO_FORUM']);</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
trigger_error('NO_MODE', E_USER_ERROR);
|
trigger_error('NO_MODE', E_USER_ERROR);</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<h4>Url formatting</h4>
|
<h4>Url formatting</h4>
|
||||||
|
|
||||||
|
@ -1112,8 +1113,8 @@ trigger_error('NO_MODE', E_USER_ERROR);
|
||||||
<p>The <code>append_sid()</code> 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:</p>
|
<p>The <code>append_sid()</code> 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:</p>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
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'])</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<h4>General function usage: </h4>
|
<h4>General function usage: </h4>
|
||||||
|
|
||||||
|
@ -1169,14 +1170,14 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp;
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<a name="styling"></a><h2>3. Styling</h2>
|
<a name="styling"></a><h2>3. Styling</h2>
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<a name="cfgfiles"></a><h3>3.i. Style Config Files</h3>
|
<a name="cfgfiles"></a><h3>3.i. Style Config Files</h3>
|
||||||
|
@ -1193,8 +1194,8 @@ phpbb_version = 3.1.0
|
||||||
|
|
||||||
# Parent style
|
# Parent style
|
||||||
# Set value to empty or to this style's name if this style does not have a 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</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
<a name="genstyling"></a><h3>3.2. General Styling Rules</h3>
|
<a name="genstyling"></a><h3>3.2. General Styling Rules</h3>
|
||||||
<p>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.</p>
|
<p>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.</p>
|
||||||
|
|
||||||
|
@ -1252,14 +1253,14 @@ parent = prosilver
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<a name="templating"></a><h2>4. Templating</h2>
|
<a name="templating"></a><h2>4. Templating</h2>
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<a name="templates"></a><h3>4.i. General Templating</h3>
|
<a name="templates"></a><h3>4.i. General Templating</h3>
|
||||||
|
@ -1748,7 +1749,7 @@ This may span multiple lines.
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -1758,7 +1759,7 @@ This may span multiple lines.
|
||||||
<a name="charsets"></a><h2>5. Character Sets and Encodings</h2>
|
<a name="charsets"></a><h2>5. Character Sets and Encodings</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -1821,7 +1822,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -1829,7 +1830,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||||
<a name="translation"></a><h2>6. Translation (<abbr title="Internationalisation">i18n</abbr>/<abbr title="Localisation">L10n</abbr>) Guidelines</h2>
|
<a name="translation"></a><h2>6. Translation (<abbr title="Internationalisation">i18n</abbr>/<abbr title="Localisation">L10n</abbr>) Guidelines</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -2356,8 +2357,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||||
'PAGE_OF' => 'Page %s of %s',
|
'PAGE_OF' => 'Page %s of %s',
|
||||||
/* Just grabbing the replacements as they
|
/* Just grabbing the replacements as they
|
||||||
come and hope they are in the right order */
|
come and hope they are in the right order */
|
||||||
...
|
...</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>… a clearer way to show explicit replacement ordering is to do:</p>
|
<p>… a clearer way to show explicit replacement ordering is to do:</p>
|
||||||
|
|
||||||
|
@ -2366,8 +2367,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||||
'PAGE_OF' => 'Page %1$s of %2$s',
|
'PAGE_OF' => 'Page %1$s of %2$s',
|
||||||
/* Explicit ordering of the replacements,
|
/* Explicit ordering of the replacements,
|
||||||
even if they are the same order as English */
|
even if they are the same order as English */
|
||||||
...
|
...</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>Why bother at all? Because some languages, the string transliterated back to English might read something like:</p>
|
<p>Why bother at all? Because some languages, the string transliterated back to English might read something like:</p>
|
||||||
|
|
||||||
|
@ -2376,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',
|
'PAGE_OF' => 'Total of %2$s pages, currently on page %1$s',
|
||||||
/* Explicit ordering of the replacements,
|
/* Explicit ordering of the replacements,
|
||||||
reversed compared to English as the total comes first */
|
reversed compared to English as the total comes first */
|
||||||
...
|
...</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<a name="usingplurals"></a><h3>6.iv. Using plurals</h3>
|
<a name="usingplurals"></a><h3>6.iv. Using plurals</h3>
|
||||||
|
|
||||||
|
@ -2395,8 +2396,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
...
|
...
|
||||||
$user->lang('NUMBER_OF_ELEPHANTS', $number_of_elephants);
|
$user->lang('NUMBER_OF_ELEPHANTS', $number_of_elephants);
|
||||||
...
|
...</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>And the English translation would be:</p>
|
<p>And the English translation would be:</p>
|
||||||
|
|
||||||
|
@ -2407,8 +2408,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||||
1 => 'You have 1 elephant', // Singular
|
1 => 'You have 1 elephant', // Singular
|
||||||
2 => 'You have %d elephants', // Plural
|
2 => 'You have %d elephants', // Plural
|
||||||
),
|
),
|
||||||
...
|
...</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>While the Bosnian translation can have more cases:</p>
|
<p>While the Bosnian translation can have more cases:</p>
|
||||||
|
|
||||||
|
@ -2420,16 +2421,16 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||||
2 => 'You have %d slona', // Used for 5, 6,
|
2 => 'You have %d slona', // Used for 5, 6,
|
||||||
3 => ...
|
3 => ...
|
||||||
),
|
),
|
||||||
...
|
...</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p><strong>NOTE:</strong> It is okay to use plurals for an unknown number compared to a single item, when the number is not known and displayed:</p>
|
<p><strong>NOTE:</strong> It is okay to use plurals for an unknown number compared to a single item, when the number is not known and displayed:</p>
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
...
|
...
|
||||||
'MODERATOR' => 'Moderator', // Your board has 1 moderator
|
'MODERATOR' => 'Moderator', // Your board has 1 moderator
|
||||||
'MODERATORS' => 'Moderators', // Your board has multiple moderators
|
'MODERATORS' => 'Moderators', // Your board has multiple moderators
|
||||||
...
|
...</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<a name="writingstyle"></a><h3>6.v. Writing Style</h3>
|
<a name="writingstyle"></a><h3>6.v. Writing Style</h3>
|
||||||
|
|
||||||
|
@ -2443,8 +2444,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||||
...
|
...
|
||||||
'CONV_ERROR_NO_AVATAR_PATH'
|
'CONV_ERROR_NO_AVATAR_PATH'
|
||||||
=> 'Note to developer: you must specify $convertor['avatar_path'] to use %s.',
|
=> 'Note to developer: you must specify $convertor['avatar_path'] to use %s.',
|
||||||
...
|
...</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// Good - Literal straight quotes should be escaped with a backslash, ie: \</p>
|
<p class="good">// Good - Literal straight quotes should be escaped with a backslash, ie: \</p>
|
||||||
|
|
||||||
|
@ -2452,8 +2453,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||||
...
|
...
|
||||||
'CONV_ERROR_NO_AVATAR_PATH'
|
'CONV_ERROR_NO_AVATAR_PATH'
|
||||||
=> 'Note to developer: you must specify $convertor[\'avatar_path\'] to use %s.',
|
=> 'Note to developer: you must specify $convertor[\'avatar_path\'] to use %s.',
|
||||||
...
|
...</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>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:</p>
|
<p>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:</p>
|
||||||
|
|
||||||
|
@ -2462,24 +2463,24 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
...
|
...
|
||||||
'USE_PERMISSIONS' => 'Test out user's permissions',
|
'USE_PERMISSIONS' => 'Test out user's permissions',
|
||||||
...
|
...</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// Okay - However, non-programmers wouldn't type "user\'s" automatically</p>
|
<p class="good">// Okay - However, non-programmers wouldn't type "user\'s" automatically</p>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
...
|
...
|
||||||
'USE_PERMISSIONS' => 'Test out user\'s permissions',
|
'USE_PERMISSIONS' => 'Test out user\'s permissions',
|
||||||
...
|
...</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// Best - Use the Unicode Right-Single-Quotation-Mark character</p>
|
<p class="good">// Best - Use the Unicode Right-Single-Quotation-Mark character</p>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
...
|
...
|
||||||
'USE_PERMISSIONS' => 'Test out user’s permissions',
|
'USE_PERMISSIONS' => 'Test out user’s permissions',
|
||||||
...
|
...</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>The <code>"</code> (straight double quote), <code><</code> (less-than sign) and <code>></code> (greater-than sign) characters can all be used as displayed glyphs or as part of HTML markup, for example:</p>
|
<p>The <code>"</code> (straight double quote), <code><</code> (less-than sign) and <code>></code> (greater-than sign) characters can all be used as displayed glyphs or as part of HTML markup, for example:</p>
|
||||||
|
|
||||||
|
@ -2489,8 +2490,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||||
...
|
...
|
||||||
'FOO_BAR' => 'PHP version < 5.3.3.<br />
|
'FOO_BAR' => 'PHP version < 5.3.3.<br />
|
||||||
Visit "Downloads" at <a href="http://www.php.net/">www.php.net</a>.',
|
Visit "Downloads" at <a href="http://www.php.net/">www.php.net</a>.',
|
||||||
...
|
...</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// Okay - No more invalid HTML, but "&quot;" is rather clumsy</p>
|
<p class="good">// Okay - No more invalid HTML, but "&quot;" is rather clumsy</p>
|
||||||
|
|
||||||
|
@ -2498,8 +2499,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||||
...
|
...
|
||||||
'FOO_BAR' => 'PHP version &lt; 5.3.3.<br />
|
'FOO_BAR' => 'PHP version &lt; 5.3.3.<br />
|
||||||
Visit &quot;Downloads&quot; at <a href="http://www.php.net/">www.php.net</a>.',
|
Visit &quot;Downloads&quot; at <a href="http://www.php.net/">www.php.net</a>.',
|
||||||
...
|
...</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// Best - No more invalid HTML, and usage of correct typographical quotation marks</p>
|
<p class="good">// Best - No more invalid HTML, and usage of correct typographical quotation marks</p>
|
||||||
|
|
||||||
|
@ -2507,8 +2508,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||||
...
|
...
|
||||||
'FOO_BAR' => 'PHP version &lt; 5.3.3.<br />
|
'FOO_BAR' => 'PHP version &lt; 5.3.3.<br />
|
||||||
Visit “Downloads” at <a href="http://www.php.net/">www.php.net</a>.',
|
Visit “Downloads” at <a href="http://www.php.net/">www.php.net</a>.',
|
||||||
...
|
...</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>Lastly, the <code>&</code> (ampersand) must always be entitised regardless of where it is used:</p>
|
<p>Lastly, the <code>&</code> (ampersand) must always be entitised regardless of where it is used:</p>
|
||||||
|
|
||||||
|
@ -2517,16 +2518,16 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
...
|
...
|
||||||
'FOO_BAR' => '<a href="http://somedomain.tld/?foo=1&bar=2">Foo & Bar</a>.',
|
'FOO_BAR' => '<a href="http://somedomain.tld/?foo=1&bar=2">Foo & Bar</a>.',
|
||||||
...
|
...</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p class="good">// Good - Valid HTML, amperands are correctly entitised in all cases</p>
|
<p class="good">// Good - Valid HTML, amperands are correctly entitised in all cases</p>
|
||||||
|
|
||||||
<div class="codebox"><pre>
|
<div class="codebox"><pre>
|
||||||
...
|
...
|
||||||
'FOO_BAR' => '<a href="http://somedomain.tld/?foo=1&amp;bar=2">Foo &amp; Bar</a>.',
|
'FOO_BAR' => '<a href="http://somedomain.tld/?foo=1&amp;bar=2">Foo &amp; Bar</a>.',
|
||||||
...
|
...</pre>
|
||||||
</pre></div>
|
</div>
|
||||||
|
|
||||||
<p>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 <a href="http://en.wikipedia.org/wiki/Unicode#Input_methods">http://en.wikipedia.org/wiki/Unicode#Input_methods</a> for more information.</p>
|
<p>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 <a href="http://en.wikipedia.org/wiki/Unicode#Input_methods">http://en.wikipedia.org/wiki/Unicode#Input_methods</a> for more information.</p>
|
||||||
|
|
||||||
|
@ -2538,7 +2539,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
|
@ -2546,7 +2547,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||||
<a name="disclaimer"></a><h2>7. Copyright and disclaimer</h2>
|
<a name="disclaimer"></a><h2>7. Copyright and disclaimer</h2>
|
||||||
|
|
||||||
<div class="paragraph">
|
<div class="paragraph">
|
||||||
<div class="inner"><span class="corners-top"><span></span></span>
|
<div class="inner">
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
|
|
||||||
|
@ -2556,7 +2557,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
|
||||||
|
|
||||||
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
<div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
|
||||||
|
|
||||||
<span class="corners-bottom"><span></span></span></div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- END DOCUMENT -->
|
<!-- END DOCUMENT -->
|
||||||
|
|
Before Width: | Height: | Size: 55 B |
Before Width: | Height: | Size: 195 B |
Before Width: | Height: | Size: 56 B |
Before Width: | Height: | Size: 201 B |
Before Width: | Height: | Size: 3.3 KiB |