aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/docs
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/docs')
-rw-r--r--phpBB/docs/AUTHORS69
-rw-r--r--phpBB/docs/COPYING281
-rw-r--r--phpBB/docs/FAQ.html352
-rw-r--r--phpBB/docs/INSTALL.html448
-rw-r--r--phpBB/docs/README.html363
-rw-r--r--phpBB/docs/auth_api.html253
-rw-r--r--phpBB/docs/bg_header.gifbin690 -> 0 bytes
-rw-r--r--phpBB/docs/changes.txt4
-rw-r--r--phpBB/docs/coding-guidelines.html2352
-rw-r--r--phpBB/docs/corners_left.gifbin55 -> 0 bytes
-rw-r--r--phpBB/docs/corners_left.pngbin195 -> 0 bytes
-rw-r--r--phpBB/docs/corners_right.gifbin56 -> 0 bytes
-rw-r--r--phpBB/docs/corners_right.pngbin201 -> 0 bytes
-rw-r--r--phpBB/docs/hook_system.html859
-rw-r--r--phpBB/docs/site_logo.gifbin3430 -> 0 bytes
-rw-r--r--phpBB/docs/stylesheet.css352
16 files changed, 0 insertions, 5333 deletions
diff --git a/phpBB/docs/AUTHORS b/phpBB/docs/AUTHORS
deleted file mode 100644
index 49281e2297..0000000000
--- a/phpBB/docs/AUTHORS
+++ /dev/null
@@ -1,69 +0,0 @@
-/**
-*
-* phpBB3 © Copyright 2000, 2002, 2005, 2007 phpBB Group
-* http://www.phpbb.com
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU General Public License as published by
-* the Free Software Foundation, version 2 of the License.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>.
-*
-*/
-
-Please see: http://www.phpbb.com/about/team/ for a list of all the people currently
-involved in phpBB.
-
-phpBB Lead Developer : Acyd Burn (Meik Sievertsen)
-
-phpBB Developers : APTX (Marek A. R.)
- DavidMJ (David M.)
- dhn (Dominik Dröscher)
- kellanved (Henry Sudhof)
- naderman (Nils Adermann)
- ToonArmy (Chris Smith)
- Vic D'Elfant (Vic D'Elfant)
-
-
--- Previous Contributors --
-
-phpBB Project Manager : theFinn (James Atkinson) [Founder - 04/2007]
- SHS` (Jonathan Stanley)
-
-phpBB Lead Developer : psoTFX (Paul S. Owen) [2001 - 09/2005]
-
-phpBB Developers : Ashe (Ludovic Arnaud) [10/2002 - 11/2003, 06/2006 - 10/2006]
- BartVB (Bart van Bragt) [11/2000 - 03/2006]
- GrahamJE (Graham Eames) [09/2005 - 11/2006]
-
-
--- Copyrights --
-
-Visual Confirmation : Xore (Robert Hetzler)
-
-Original subSilver by subBlue Design, Tom Beddard, (c) 2001 phpBB Group
-prosilver by subBlue Design, Tom Beddard, (c) 2004 phpBB Group
-subsilver2 by subBlue Design, Tom Beddard, (c) 2004 phpBB Group
-
-phpBB3 contains code from the following applications:
-
-LGPL licenced:
-Smarty (c) 2001, 2002 by ispi of Lincoln, Inc, http://smarty.php.net/
-
-GPL licenced:
-phpMyAdmin (c) 2001,2003 phpMyAdmin Devel team, http://www.phpmyadmin.net/
-Jabber Class (c) 2006 Flyspray.org, http://www.flyspray.org/
-Chora (c) 2000-2006, The Horde Project. http://horde.org/chora/
-Horde Project (c) 2000-2006, The Horde Project. http://horde.org/
-
-PHP License, version 3.0:
-Pear (c) 2001-2004 PHP Group, http://pear.php.net
-
-Text_Diff-0.2.1 http://pear.php.net/package/Text_Diff
-
diff --git a/phpBB/docs/COPYING b/phpBB/docs/COPYING
deleted file mode 100644
index ce992b2ce7..0000000000
--- a/phpBB/docs/COPYING
+++ /dev/null
@@ -1,281 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
- 675 Mass Ave, Cambridge, MA 02139, USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
diff --git a/phpBB/docs/FAQ.html b/phpBB/docs/FAQ.html
deleted file mode 100644
index f91d4bc223..0000000000
--- a/phpBB/docs/FAQ.html
+++ /dev/null
@@ -1,352 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
-<head>
-
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<meta http-equiv="content-style-type" content="text/css" />
-<meta http-equiv="content-language" content="en" />
-<meta http-equiv="imagetoolbar" content="no" />
-<meta name="resource-type" content="document" />
-<meta name="distribution" content="global" />
-<meta name="copyright" content="2007 phpBB Group" />
-<meta name="keywords" content="" />
-<meta name="description" content="phpBB 3.0.x frequently asked questions" />
-<title>phpBB3 &bull; FAQ</title>
-
-<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
-
-</head>
-
-<body id="phpbb" class="section-docs">
-
-<div id="wrap">
- <a id="top" name="top" accesskey="t"></a>
- <div id="page-header">
- <div class="headerbar">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div id="doc-description">
- <a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
- <h1>phpBB 3.0.x FAQ</h1>
- <p>phpBB 3.0.x frequently asked questions</p>
- <p style="display: none;"><a href="#start_here">Skip</a></p>
- </div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
- </div>
-
- <a name="start_here"></a>
-
- <div id="page-body">
-
-<!-- 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 phpBB3, the community forums and our IRC channel (see <a href="README.html">README</a> for details).</p>
-
- <h1>FAQ</h1>
-
- <div class="paragraph menu">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<!-- add entry about common UTF8 problems (for example wrong uploading, editing) -->
-<ul>
- <li><a href="#install">I am finding phpBB too difficult to install. Will you do it for me?</a></li>
- <li><a href="#legal">I am having problems with the admin at a certain board, help!</a></li>
- <li><a href="#legal">A board has ripped off my graphics/software/etc., stop them!</a></li>
- <li><a href="#legal">A board is dealing in warez/porn/etc., you need to prevent them doing this!</a></li>
- <li><a href="#legal">I want to sue you because i think you host an illegal board!</a></li>
- <li><a href="#viewonline">According to viewonline a user is doing/reading something they should not be able to!</a></li>
- <li><a href="#mail">I keep getting Mail sending errors when I (or my users) post/send PM's/etc.!</a></li>
- <li><a href="#mail_language">My users are complaining that emails are not in their selected language!</a></li>
- <li><a href="#aol_browser">My AOL based users keep getting logged out!</a></li>
- <li><a href="#avatars">I am unable to upload avatars from my computer, regardless of the settings.</a></li>
- <li><a href="#gallery_avatars">I just cannot get gallery avatars to appear!</a></li>
- <li><a href="#permissions">How do I use/set permissions?</a></li>
- <li><a href="#login_issues">I (or my users) cannot stay logged in to the forum!</a></li>
- <li><a href="#logout_issues">My users are complaining about being logged out too quickly!</a></li>
- <li><a href="#not_answered">My question isn't answered here!</a></li>
- <li><a href="#disclaimer">Copyright and disclaimer</a></li>
-</ul>
-
- </div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
- <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="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<p>Simple answer, no we will not. We are not being difficult when we say this we are actually trying to help you. phpBB has a reputation for being easy to install, that reputation is we believe well deserved. It is a simple process of unarchiving a single file, uploading the resulting directory/files to their intended location and entering some data in a web based form. The sequence of events, what to type where, etc. is covered in detail in the accompanying <a href="INSTALL.html">INSTALL.html</a> documentation. If you cannot install phpBB3 the chances are you will be unable to administer or update it.</p>
-
-<p>There are people, companies (unrelated to your hosting provider), etc. that will install your forum, either for free or for a payment. We do not recommend you make use of these offers. Unless the service is provided by your hosting company you will have to divulge passwords and other sensitive details. If you did not know how to use an ATM would you give a passer-by your bank card and PIN and ask them to show you what to do? No, probably not! The same applies to your hosting account details!</p>
-
-<p>We think a better solution is for you to carefully read the enclosed documentation, read through our knowledge base at <a href="http://www.phpbb.com/">www.phpbb.com</a> and if necessary ask for help on any thing you get stuck on. However, the decision is yours but please note we may not offer support if we believe you have had the board installed by a third party. In such cases you should direct your questions to that company or person/s.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="legal"></a><h2>I am having problems with the admin at a certain board, help!<br />
-A board has ripped off my graphics/software/etc., stop them!<br />
-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>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<p>We provide the software, we have absolutely nothing to do with any board that runs it (beyond phpbb.com of course!) and we also do not host any site. The GPL grants the user an unlimited right of use subject to their adherence of that licence. Therefore we cannot prevent, dictate, control or otherwise limit the use of phpBB software. So please do not contact us for such matters.</p>
-
-<p>If you have a problem with a given board please take it up with them, not us. We are not and cannot be held legally responsible for any third party use of this software (much like Microsoft et al cannot be held responsible for the use of Windows in illegal activities, etc.). Additionally we do <strong>not</strong> track the use of phpBB software in any way. So please do not ask us for details on a &quot;given&quot; board we will not be able to help you. If any law firms or lawyers out there send us writs, cease and desist orders, etc. for third party website use of this software we reserve the right to charge for time wasted dealing with such issues...</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<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="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<p>No, they probably are not. phpBB uses sessions to keep track of users as they move between pages. The session information tells us who this user is. Therefore in order to determine what a user can do on a page we first need the session details. Once this data is available we can check whether the user is permitted to do whatever it is they are trying to do. This can result in it appearing as if a user is reading a topic in a forum they should not be able to access. Or perhaps viewing private messages when they are only guests, etc. In practice the user is not doing these things, they are viewing a &quot;You are not permitted to do this&quot; type message. The session data has simply been updated before we were able to determine what the user could or could not do.</p>
-
-<p>Of course this only applies where permissions have been set correctly!</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<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="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<p>This error will occur if phpBB cannot send mail. phpBB can send email two ways; using the PHP <code>mail()</code> function or directly via SMTP. Some hosting providers limit the <code>mail()</code> function to prevent its use in spamming, others may rename it or limit its functionality. If the <code>mail()</code> function got renamed, you are able to enter the correct name within the administration control panel. In either case you may need to make use of SMTP. This requires that you have access to such a facility, e.g. your hosting provider may provide one (perhaps requiring specific written authorisation), etc. Please see <a href="http://www.phpbb.com/">www.phpbb.com</a> for additional help on this matter.</p>
-
-<p>If you do require SMTP services please do not ask (on our forums or elsewhere) for someone to provide you with one. Open relays are now things of the past thanks to the unthinking spammers out there. Therefore you are unlikely to find someone willing to offer you (free) services.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="mail_language"></a><h2>My users are complaining that emails are not in their selected language!</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<p>You must have deleted a language pack or the language pack is incomplete. phpBB will try to send emails in the users selected language. If it cannot find a suitable email template it will switch to the boards default language.</p>
-
-<!-- additional entry about encoded emails -->
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="aol_browser"></a><h2>My AOL based users keep getting logged out!</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<p>phpBB uses sessions to keep track of users as they browse the board. These sessions use a combination of a unique session id, the users IP and if specified the users browser and/or the users x-forwarded-for header to identify each user. We make use of all of this as an extra safe-guard to help prevent sessions being hijacked (by discovering the unique session id).</p>
-
-<p>Unfortunately this only works when the users IP is constant as they browse the board. For most users this will be the case. However certain providers route their users via a cluster of proxys. In some cases, particularly the AOL browser, this results in different IPs being forwarded as the user moves between pages. We take account of this by not checking the entire IP by default but only the first "three quads" (<samp>A.B.C</samp>). Again in most cases this will be fine. However again AOL uses IPs which can vary so much that checking only the first two quads results in a fairly static IP being available for session validation.</p>
-
-<p>If you are experiencing problems related to this you can set the Session IP validation parameter found in <code>Admin-&gt;General-&gt;Server Configuration-&gt;Security Settings</code> to <samp>A.B</samp>. Please note that reducing the IP validation length does potentially increase the risk of sessions being hijacked (this is something for you to consider, phpBB Group takes no responsibility should anything happen!). We suggest to at least additionally enable the browser validation.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="avatars"></a><h2>I am unable to upload avatars from my computer, regardless of the settings.</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<p>There are two possibilities here, the first is you have not created the directory you specified as the storage location for avatars, ie. as specified in the <code>Admin -&gt; General -&gt; Board Configuration -&gt; Avatar settings</code> section. If the directory does not exist uploadeable avatars are automatically disabled. You should create the required directory (ensuring it has global write access or other appropriate permissions to allow the webserver to write files to it).</p>
-
-<p>The second possibility is that your provider has disabled file_upload support. You should contact your provider and ask them if this is the case. There is not a lot you can do, there are still three other avatar settings left to choose from including uploading via an URL which will work fine.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="gallery_avatars"></a><h2>I just cannot get gallery avatars to appear!</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<p>phpBB categorises gallery avatars and it does this by reading through folders contained in the location you specified as being the gallery path. For example, if you set the gallery path to <samp>images/avatars/gallery</samp> phpBB will expect to find a series of folders within that path, e.g. <samp>images/avatars/gallery/moviestars</samp>, <samp>images/avatars/gallery/cartoons</samp>, <samp>images/avatars/gallery/misc</samp>, etc. Placing images directly in <samp>images/avatars/gallery/</samp> will result in nothing being listed in your gallery.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="permissions"></a><h2>How do I use/set permissions?</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<p>Please read the paragraph about permissions in our extensive <a href="http://www.phpbb.com/support/documentation/3.0/">online documentation</a>.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="login_issues"></a><h2>I (or my users) cannot stay logged in to the forum!</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<p>If you (or your users) are, after attempting a login, being returned to the index (or other page) without appearing to be logged in the most likely problem is incorrect cookie settings. phpBB uses cookies to store a session id and a small amount of user data. For this data to be stored correctly the cookie domain, name, path and secure settings must be correct. You can check this in <code>Admin-&gt;General-&gt;Server Configuration-&gt;Cookie Settings</code>. Typically the cookie domain can be left blank and the cookie path set to <samp>/</samp> (a single forward slash). Do <strong>not</strong> set the cookie as being secure unless your board is running over a secure sockets layer connection, ie. https://</p>
-
-<p>If you still have problems try setting the cookie domain to your full domain name, e.g. <samp>www.mysystem.tld</samp>, <samp>www.something.mydomain.tld</samp>. You <strong>must</strong> ensure the domain name contains at least two dots or browsers will be unlikely to recognise the cookie, e.g. <samp>.mydomain.com</samp>, <samp>mydomain.com</samp>. Do <strong>not</strong> add http:// or anything else to the domain name!</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="logout_issues"></a><h2>My users are complaining about being logged out too quickly!</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<p>You can increase the default length of sessions (ie. how long before a users session is considered 'dead') in <code>Admin-&gt;General-&gt;Server Configuration-&gt;Load Settings</code>. Set it to whatever value your users feel comfortable with, remember that security issues may affect your decision (ie. having too long a session may allow non-users to abuse your board should a user forget to logout or otherwise leave a current session on a public workstation).</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="not_answered"></a><h2>My question isn't answered here!</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<p>Please read our <a href="http://www.phpbb.com/support/documentation/3.0/">extensive user documentation</a> first, it may just explain what you want to know.</p>
-
-<p>Feel free to search our community forum for the information you require. <strong>PLEASE DO NOT</strong> post your question without having first used search, chances are someone has already asked and answered your question. You can find our board here:</p>
-
-<p><a href="http://www.phpbb.com">www.phpbb.com</a></p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="disclaimer"></a><h2>Copyright and disclaimer</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
-<!-- END DOCUMENT -->
-
- <div id="page-footer">
- <div class="version">&nbsp;</div>
- </div>
-</div></div>
-
-<div>
- <a id="bottom" name="bottom" accesskey="z"></a>
-</div>
-
-</body>
-</html>
diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html
deleted file mode 100644
index 7a86f67bff..0000000000
--- a/phpBB/docs/INSTALL.html
+++ /dev/null
@@ -1,448 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
-<head>
-
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<meta http-equiv="content-style-type" content="text/css" />
-<meta http-equiv="content-language" content="en" />
-<meta http-equiv="imagetoolbar" content="no" />
-<meta name="resource-type" content="document" />
-<meta name="distribution" content="global" />
-<meta name="copyright" content="2007 phpBB Group" />
-<meta name="keywords" content="" />
-<meta name="description" content="phpBB 3.0.x Installation, updating and conversion informations" />
-<title>phpBB3 &bull; Install</title>
-
-<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
-
-</head>
-
-<body id="phpbb" class="section-docs">
-
-<div id="wrap">
- <a id="top" name="top" accesskey="t"></a>
- <div id="page-header">
- <div class="headerbar">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div id="doc-description">
- <a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
- <h1>phpBB 3.0.x Install</h1>
- <p>phpBB 3.0.x Installation, updating and conversion informations</p>
- <p style="display: none;"><a href="#start_here">Skip</a></p>
- </div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
- </div>
-
- <a name="start_here"></a>
-
- <div id="page-body">
-
-<!-- BEGIN DOCUMENT -->
-
-<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>A basic overview of running phpBB3 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 phpBB3 you should read <a href="http://www.phpbb.com/support/documentation/3.0/">the documentation</a> available online.</p>
-
-<h1>Install</h1>
-
- <div class="paragraph menu">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<ol>
- <li><a href="#quickinstall">Quick install</a></li>
- <li><a href="#require">Requirements</a></li>
- <li><a href="#install">New installation</a></li>
- <li><a href="#update">Updating from stable releases of phpBB 3.0.x</a>
- <ol style="list-style-type: lower-roman;">
- <li><a href="#update_full">Full package</a></li>
- <li><a href="#update_files">Changed files only</a></li>
- <li><a href="#update_patch">Patch file</a></li>
- <li><a href="#update_auto">Automatic update package</a></li>
- <li><a href="#update_all">All package types</a></li>
- </ol>
- </li>
- <li><a href="#convert">Conversion from phpBB 2.0.x to phpBB 3.0.x</a>
- <ol style="list-style-type: lower-roman;">
- <li><a href="#prereq">Requirements before converting</a></li>
- <li><a href="#conversion">Converting</a></li>
- <li><a href="#postreq">Things to do after conversion</a></li>
- <li><a href="#convprob">Common conversion problems</a></li>
- </ol>
- </li>
- <li><a href="#postinstall">Important (security related) post-Install tasks for all installation methods</a>
- <ol style="list-style-type: lower-roman;">
- <li><a href="#avatars">Uploadable avatars</a></li>
- </ol>
- </li>
- <li><a href="#disclaimer">Disclaimer</a></li>
-</ol>
-
- </div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
- <a name="quickinstall"></a><h2>1. Quick install</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <p>If you have basic knowledge of using FTP and are sure your hosting service or server will run phpBB3 you can use these steps to quickly get started. For a more detailed explanation you should skip this and go to <a href="#require">section 2</a> below.</p>
-
- <ol>
- <li>Decompress the phpBB3 archive to a local directory on your system.</li>
- <li>Upload all the files contained in this archive (retaining the directory structure) to a web accessible directory on your server or hosting account.</li>
- <li>Change the permissions on config.php to be writable by all (666 or -rw-rw-rw- within your FTP Client)</li>
- <li>Change the permissions on the following directories to be writable by all (777 or -rwxrwxrwx within your FTP Client):<br />
- <code>store/</code>, <code>cache/</code>, <code>files/</code> and <code>images/avatars/upload/</code>.</li>
- <li>Using your web browser visit the location you placed phpBB3 with the addition of install/index.php or pointing directly to install/, e.g. http://www.mydomain.com/phpBB3/install/, http://www.mydomain.com/forum/install/ etc.</li>
- <li>Click the <em>INSTALL</em> tab, follow the steps and fill out all the requested information.</li>
- <li>Change the permissions on config.php to be writable only by yourself (644 or -rw-r--r-- within your FTP Client)</li>
- <li>phpBB3 should now be available, please <strong>MAKE SURE</strong> you read at least <a href="#postinstall">Section 6</a> below for important, security related post-installation instructions.</li>
- </ol>
-
- <p>If you experienced problems or do not know how to proceed with any of the steps above please read the rest of this document.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
- <a name="require"></a><h2>2. Requirements</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <p>phpBB3 has a few requirements which must be met before you are able to install and use it.</p>
-
- <ul>
- <li>A webserver or web hosting account running on any major Operating System with support for PHP</li>
- <li>A SQL database system, <strong>one of</strong>:
- <ul>
- <li>MySQL(i): 4.1 or above</li>
- <li>PostgreSQL: 8.2+</li>
- <li>SQLite: 2.8.2+</li>
- <li>Firebird: 2.0+</li>
- <li>MS SQL Server 2000 or above (directly or via ODBC)</li>
- <li>Oracle: 9.2+</li>
- </ul>
- </li>
- <li><strong>PHP 5.2.0+ </strong> with support for the database you intend to use.</li>
- <li>getimagesize() function need to be enabled.</li>
- <li>These optional presence of the following modules within PHP will provide access to additional features, but they are not required.
- <ul>
- <li>zlib Compression support</li>
- <li>Remote FTP support</li>
- <li>XML support</li>
- <li>Imagemagick support</li>
- <li>GD Support</li>
- </ul>
- </li>
- </ul>
-
- <p>If your server or hosting account does not meet the requirements above we are afraid phpBB3 is not for you.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
- <a name="install"></a><h2>3. New installation</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <p>Installation of phpBB3 will vary according to your server and database. If you have <em>shell access</em> to your account (via telnet or ssh for example) you may want to upload the entire phpBB3 archive (in binary mode!) to a directory on your host and unarchive it there.</p>
-
- <p>If you do not have shell access or do not wish to use it you will need to decompress the phpBB3 archive to a local directory on your system using your favourite compression program, e.g. winzip, rar, zip, etc. From there you must FTP <strong>ALL</strong> the files it contains (being sure to retain the directory structure and filenames) to your host. Please ensure that the cases of filenames are retained, do <strong>NOT</strong> force filenames to all lower or upper case doing so will cause errors later.</p>
-
- <p>All .php, .inc, .sql, .cfg, .html and .txt files should be uploaded in <strong>ASCII</strong> mode, while all graphics should be uploaded in <strong>BINARY</strong> mode. If you are unfamiliar with what this means please refer to your FTP client documentation. In most cases this is all handled transparantly by your ftp client but if you encounter problems later you should be sure the files where uploaded correctly as described here.</p>
-
- <p>phpBB3 comes supplied with english as its standard language. However a number of separate packs for different languages are available. If you are not a native english speaker you may wish to install one or more of these packages before continuing. The installation process below will allow you to select a default language from those available (you can of course change this default at a later stage). For more details of language packs, where to obtain them and how to install them please see the <a href="README.html#i18n">README</a>.</p>
-
- <p>Once all the files have been uploaded to your site you should point your browser at this location with the addition of <code>install/</code>. For example if your domain name is <em>www.mydomain.tld</em> and you placed phpBB3 in a directory /phpBB3 off your web root you would enter <em>http://www.mydomain.tld/phpBB3/install/</em> or (alternatively) <em>http://www.mydomain.tld/phpBB3/install/index.php</em> into your browser. When you have done this you should see the phpBB3 Installation screen appear.</p>
-
- <h4>Introduction:</h4>
-
- <p>The installation screen gives you a short introduction into phpBB. It allows you to read the license phpBB3 is released under (General Public License) and provides information about how you can receive support. To start the installation, use the <em>Install</em> button.</p>
-
- <h4>Requirements</h4>
-
- <p>The first page you will see after starting the installation is the Requirements list. phpBB3 checks automatically whether everything that it needs to run properly is installed on your server. You need to have at least the minimum PHP version installed, and at least one database available to continue the installation. Also important, is that all shown folders are available and do have the correct permissions. Please see the description of each section to find out whether they are optional or required for phpBB3 to run. If everything is in order, you can continue the installation with <em>Start Install</em>.</p>
-
- <h4>Database settings</h4>
-
- <p>You now have to decide which database to use. See the <a href="#require">Requirements section</a> for information on which databases are supported. If you do not know your database settings, please contact your host and ask for them. You will not be able to continue without them. You need:</p>
-
- <ul>
- <li>The Database Type - the database you will be using.</li>
- <li>The Database server hostname or DSN - the address of the database server.</li>
- <li>The Database server port - the port of the database server (most of the time this is not needed).</li>
- <li>The Database name - the name of the database on the server.</li>
- <li>The Database username and Database password - the login data to access the database.</li>
- </ul>
-
- <div class="indent">
- <p><strong>Note:</strong> if you are installing using SQLite, you should enter the full path to your database file in the DSN field and leave the username and password fields blank. For security reasons, you should make sure that the database file is not stored in a location accessible from the web.</p>
- </div>
-
- <p>You don't need to change the Prefix for tables in database setting, unless you plan on using multipe phpBB installations on one database. In this case you can use a different prefix for each installation to make it work.</p>
-
- <p>After you entered your details, you can continue with the Proceed to next step button. Now phpBB3 will check whether the data you entered will lead to a successful database connection and whether tables with the same prefix already exist.</p>
-
- <p>A <em>Could not connect to the database</em> error means that you didn't enter the database data correctly and it is not possible for phpBB to connect. Make sure that everything you entered is in order and try again. Again, if you are unsure about your database settings, please contact your host.</p>
-
- <p>If you installed another version of phpBB before on the same database with the same prefix, phpBB will inform you and you just need to enter a different database prefix.</p>
-
- <p>If you see the Successful Connection message, you can continue to the next step.</p>
-
- <h4>Administrator details</h4>
-
- <p>Now you have to create your administration user. This user will have full administration access and he/she will be the first user on your forum. All fields on this page are required. You can also set the default language of your forum on this page. In a vanilla phpBB3 installation we only include English. You can download further languages from <a href="http://www.phpbb.com/">www.phpbb.com</a>, and add them before installing or later.</p>
-
- <h4>Configuration file</h4>
-
- <p>In this step, phpBB will try to write the configuration file automatically. The forum needs the configuration to run properly. It contains all database settings, so without it, phpBB will not be able to access the database.</p>
-
- <p>Usually writing the configuration file automatically works fine. But in some cases it can fail due to wrong file permissions, for instance. In this case, you need to upload the file manually. phpBB asks you to download the config.php file and tells you what to do with it. Please read the instructions carefully. After you have uploaded the file, use <em>Done</em> to get to the last step. If <em>Done</em> returns you to the same page as before, and does not return a success message, you did not upload the file correctly.</p>
-
- <h4>Advanced settings</h4>
-
- <p>The Advanced settings allow you to set some parameters of the board configuration. They are optional, and you can always change them later. So if you are not sure what these settings mean, proceed to the final step and finish the installation.</p>
-
- <p>If the installation was successful, you can now use the Login button to visit the Administration Control Panel. Congratulations, you have installed phpBB3 successfully. But there is still work ahead!</p>
-
- <p>If you are unable to get phpBB3 installed even after reading this guide, please look at the support section to find out where you can ask for further assistance.</p>
-
- <p>At this point if you are converting from phpBB 2.0.x, you should refer to the <a href="#convert">conversion steps</a> for further information. If not, you should remove the install directory from your server as you will only be able to access the Administration Control Panel whilst it is present.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
- <a name="update"></a><h2>4. Updating from stable releases of phpBB 3.0.x</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<p>If you are currently using a stable release of phpBB3 updating to this version is straightforward. You would have downloaded one of four packages and your choice determines what you need to do. <strong>Please Note</strong>: That before updating we heavily recommend you do a <em>full backup of your database and existing phpBB3 files</em>! If you are unsure how to achieve this please ask your hosting provider for advice.</p>
-
-<p><strong>Please make sure you update your phpBB3 source files too, even if you run the <code>database_update.php</code> file.</strong></p>
-
-<a name="update_full"></a><h3>4.i. Full package</h3>
-
- <p>The full package is normally meant for new installations only, but if you want to replace all source files this package comes in handy.</p>
-
- <p>First you should make a copy of your existing <em>config.php</em> file, keep it in a safe place! Next delete all the existing phpBB3 files, you may want to leave your <code>files/</code> and <code>images/</code> directory in place. You can leave alternative styles in-place too. With this complete you can upload the new phpBB3 files (see <a href="#install">New installation</a> for details if necessary). Once complete copy back your saved <em>config.php</em>, replacing the new one. Another method is to just <strong>replace</strong> the existing files with the files from the full package - though make sure you do <strong>not</strong> overwrite your config.php file.</p>
-
- <p>You should now run <code>install/database_update.php</code> which, depending on your previous version, will make a number of database changes. You may receive <em>FAILURES</em> during this procedure, they should not be a cause for concern unless you see an actual <em>ERROR</em>, in which case the script will stop (in this case you should seek help via our forums or bug tracker).</p>
-
- <p>Once the install/database_update.php has completed you may proceed to the Administration Control Panel and check remove the install directory as advised.</p>
-
-<a name="update_files"></a><h3>4.ii. Changed files only</h3>
-
- <p>This package is meant for those wanting to only replace changed files from a previous version to the latest version. This package normally contains the changed files from up to five previous versions.</p>
-
- <p>This package contains a number of archives, each contains the files changed from a given release to the latest version. You should select the appropriate archive for your current version, e.g. if you currently have <samp>3.0.2</samp> you should select the phpBB-3.0.2_to_3.0.3.zip/tar.gz file.</p>
-
- <p>The directory structure has been preserved enabling you (if you wish) to simply upload the contents of the archive to the appropriate location on your server, i.e. simply overwrite the existing files with the new versions. Do not forget that if you have installed any MODs these files will overwrite the originals possibly destroying them in the process. You will need to re-add MODs to any affected file before uploading.</p>
-
- <p>As for the other update procedures you should run <b>install/database_update.php</b> after you have finished updating the files. This will update your database schema and increment the version number.</p>
-
-<a name="update_patch"></a><h3>4.iii. Patch file</h3>
-
- <p>The patch file package is for those wanting to update through the patch application, and being comfortable with it.</p>
-
- <p>The patch file is one solution for those with many Modifications (MODs) or other changes who do not want to re-add them back to all the changed files if they use the method explained above. To use this you will need command line access to a standard UNIX type <strong>patch</strong> application. If you do not have access to such an application but still want to use this update approach, we strongly recommend the <a href="#update_auto">Automatic update package</a> explained below. It is also the preferred update method.</p>
-
- <p>A number of patch files are provided to allow you to update from previous stable releases. Select the correct patch, e.g. if your current version is 3.0.2 you need the phpBB-3.0.2_to_3.0.3.patch file. Place the correct patch in the parent directory containing the phpBB3 core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <strong>patch -cl -d [PHPBB DIRECTORY] -p1 &lt; [PATCH NAME]</strong> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB3, and where PATCH NAME is the relevant filename of the selected patch file). This should complete quickly, hopefully without any HUNK FAILED comments.</p>
-
- <p>If you do get failures you should look at using the <a href="#update_files">Changed files only</a> package to replace the files which failed to patch, please note that you will need to manually re-add any Modifications (MODs) to these particular files. Alternatively if you know how you can examine the .rej files to determine what failed where and make manual adjustments to the relevant source.</p>
-
- <p>You should of course delete the patch file (or files) after use. As for the other update procedures you should run <code>install/database_update.php</code> after you have finished updating the files. This will update your database schema and data (if appropriate) and increment the version number.</p>
-
-<a name="update_auto"></a><h3>4.iv. Automatic update package</h3>
-
- <p>This update method is the preferred method for updating. This package allows detecting changed files automatically and merges changes if needed.</p>
-
- <p>The automatic update package contains - contrary to the others - only the information required to update the previous release version to the latest available version. These packages are meant for use with the automatic update tool.</p>
-
- <p>To perform the update, either follow the instructions from the <code>Administration Control Panel-&gt;System</code> Tab - this should point out that you are running an outdated version and will guide you through the update - or follow the instructions listed below.</p>
-
- <ul>
- <li>Go to the <a href="http://www.phpbb.com/downloads/">downloads page</a> and download the latest update package listed there, matching your current version.</li>
- <li>Upload the archives contents to your phpBB installation - only the install folder is required. Upload the whole install folder, retaining the file structure.</li>
- <li>After the install folder is present, phpBB3 will go offline automatically.</li>
- <li>Point your browser to the install directory, for example <samp>http://www.example.com/phpBB3/install/</samp></li>
- <li>Choose the "Update" Tab and follow the instructions</li>
- </ul>
-
- <p>&nbsp;</p>
-
-<a name="update_all"></a><h3>4.v. All package types</h3>
-
- <p>If you have non-English language packs installed you may want to see if a new version has been made available. A number of missing strings may have been added which, though not essential, may be beneficial to users. Please note that at this time not all language packs have been updated so you should be prepared to periodically check for updates.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
- <a name="convert"></a><h2>5. Conversion from phpBB 2.0.x to phpBB 3.0.x</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<p>This paragraph explains the steps necessary to convert your existing phpBB2 installation to phpBB3.</p>
-
-<a name="prereq"></a><h3>5.i. Requirements before converting</h3>
-
- <p>Before converting we heavily recommend you do a <em>full backup of your database and files</em>! If you are unsure how to achieve this please ask your hosting provider for advice. You basically need to follow the basic instructions given for <a href="#install">New installations</a>. Please <strong>do not</strong> overwrite any old files - install phpBB3 at a different location.</p>
-
- <p>Once you made a backup of everything and also have a brand new phpBB3 installation, you can now begin the conversion.</p>
-
- <p>Note that the conversion requires CREATE and DROP privileges for the phpBB3's database user account.</p>
-
-<a name="conversion"></a><h3>5.ii. Converting</h3>
-
- <p>To begin the conversion visit the install folder of your phpBB3 installation (the same as you have done for installing). Now you will see a new tab <em>Convert</em>. Click this tab.</p>
-
- <p>As with install the conversion is automated. Your previous 2.0.x database tables will not be changed as well as the original 2.0.x files remaining unaltered. The conversion is actually only filling your phpBB3 database tables and copying additional data over to your phpBB3 installation. This has the benefit that if something goes wrong you are able to either re-run the conversion or continue a conversion, while your old board is still accessible. We really recommend you disable your old installation while converting, else you may have inconsistent data after the conversion.</p>
-
- <p>Please note that this conversion process may take quite some time and depending on your hosting provider this may result in it failing (due to web server or other timeout issues). If this is the case you should ask your provider if they are willing to allow the convert script to temporarily exceed their limits (be nice and they will probably be quite helpful).</p>
-
- <p>Once completed your board should be immediately available. If you encountered errors you should report the problems to our bug tracker or seek help via our forums (see <a href="README.html">README</a> for details).</p>
-
-<a name="postreq"></a><h3>5.iii. Things to do after conversion</h3>
-
- <p>After successful conversion there may be a few items you need to do - apart from checking if the installation is accessible and everything displayed correctly.</p>
-
- <p>The first thing you may want to do is going to the administration control panel and checking every configuration item within the general tab. Thereafter you may want to adjust the forum descriptions/names if you entered HTML there. You also may want to access the other administrative sections, e.g. adjusting permissions, smilies, icons, ranks, etc.</p>
-
- <p>Within the conversion the search index has not been created or transferred. This means after conversion you are not able to find any matches if you want to search for something. We recommend you rebuild your search index within <code>Admin -&gt; Maintenance -&gt; Database -&gt; Search Index</code>.</p>
-
- <p>After verifying the settings in the ACP, you can delete the install directory to enable the board. The board will stay disabled until you do so.</p>
-
- <p>Once you are pleased with your new installation you may want to give it the name of your old installation, changing the directory name. With phpBB3 this is possible without any problems - but you may still want to check your cookie settings within the administration panel, if the cookie path need to be adjusted prior to renaming.</p>
-
-<a name="convprob"></a><h3>5.iv. Common conversion problems</h3>
-
- <p><strong>Broken non-latin characters</strong> The conversion script assumes that the database encoding in the source phpBB2 matches the encoding defined in the <code>lang_main.php</code> file of the default language pack of the source installation. Edit that file to match the database's encoding and re-start the conversion procedure.</p>
-
- <p><strong>http 500 / white pages</strong> The conversion is a load-heavy procedure. Restrictions imposed by some server hosting providers can cause problems. The most common causes are: too low values for the php settings <code>memory_limit</code> and <code>max_execution_time</code>. Limits on the allowed CPU time are also a frequent cause for such errors, as are caps on the number of database queries allowed. If you cannot change such settings, then contact your hosting provider or run the conversion procedure on a different computer. The phpBB.com forums are also an excellent location to ask for support.</p>
-
- <p><strong>Password conversion</strong> Due to the utf-8 based handling of passwords in phpBB3, it is not always possible to transfer all passwords. For passwords "lost in translation" the easiest workaround is to use the "forgotten password" function.</p>
-
- <p><strong>Path to your former board</strong> The converter expects the relative path to your old board's files. So, - for instance - if the old board is located at <code>http://www.yourdomain.com/forum</code> and the phpBB3 installation is located at <code>http://www.yourdomain.com/phpBB3</code>, then the correct value would be <code>../forum</code>. Note that the webserver user must be able to access the source installation's files.</p>
-
- <p><strong>Missing images</strong> If your default board language's language pack does not include all images, then some images might be missing in your installation. Always use a complete language pack as default language.</p>
-
- <p><strong>Smilies</strong> During the conversion you might see warnings about image files where the copying failed. That can happen if the old board's smilies have the same file names as those on the new board. Copy those files manually after the conversion, if you want to continue using the old smilies.</p>
-
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
- <a name="postinstall"></a><h2>6. Important (security related) post-Install tasks for all installation methods</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <p>Once you have successfully installed phpBB3 you <strong>MUST</strong> ensure you remove the entire install/ directory. Leaving the install directory in place is a <em>very serious potential security issue</em> which may lead to deletion or alteration of files, etc. Please note that until this directory is removed, phpBB3 will not operate and a warning message will be displayed. Beyond this <strong>essential</strong> deletion, you may also wish to delete the docs/ directories if you wish.</p>
-
- <p>With these directories deleted you should proceed to the administration panel. Depending on how the installation completed you may have been directed there automatically. If not, login as the administrator you specified during install/conversion and click the <strong>Administration Panel</strong> link at the bottom of any page. Ensure that details specified in <code>Admin -&gt; General</code> are correct!</p>
-
-<a name="avatars"></a><h3>6.i. Uploadable avatars</h3>
-
- <p>phpBB3 supports several methods for allowing users to select their own <em>avatar</em> (an avatar is a small image generally unique to a user and displayed just below their username in posts).</p>
-
- <p>Two of these options allow users to upload an avatar from their machine or a remote location (via a URL). If you wish to enable this function you should first ensure the correct paths for uploadeable avatars is set in <code>Admin -&gt; General -&gt; Board Configuration -&gt; Avatar settings</code>. By default this is <em>images/avatars/uploads</em> but you can set it to whatever you like, just ensure the configuration setting is updated. You must also ensure this directory can be written to by the webserver. Usually this means you have to alter its permissions to allow anyone to read and write to. Exactly how you should do this depends on your ftp client or server operating system.</p>
-
- <p>On UNIX systems for example you set the directory to a+rwx (or ugo+rwx or even 777). This can be done from a command line on your server using chmod or via your FTP client (using the Change Permissions, chmod or other Permissions dialoge box, see your FTP clients documentation for help). Most FTP clients list permissions in the form of User (Read, Write, Execute), Group (Read, Write, Execute) and Other (Read, Write, Execute). You need to tick all of these boxes to set correct permissions.</p>
-
- <p>On Windows system you need to ensure the directory is not write-protected and that it has global write permissions (see your servers documentation or contact your hosting provider if you are unsure on how to achieve this).</p>
-
- <p>Please be aware that setting a directories permissions to global write access is a potential security issue. While it is unlikely that anything nasty will occur (such as all the avatars being deleted) there are always people out there to cause trouble. Therefore you should monitor this directory and if possible make regular backups.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="disclaimer"></a><h2>7. Copyright and disclaimer</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
-<!-- END DOCUMENT -->
-
- <div id="page-footer">
- <div class="version">&nbsp;</div>
- </div>
-</div></div>
-
-<div>
- <a id="bottom" name="bottom" accesskey="z"></a>
-</div>
-
-</body>
-</html>
diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html
deleted file mode 100644
index 3510bc448e..0000000000
--- a/phpBB/docs/README.html
+++ /dev/null
@@ -1,363 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
-<head>
-
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<meta http-equiv="content-style-type" content="text/css" />
-<meta http-equiv="content-language" content="en" />
-<meta http-equiv="imagetoolbar" content="no" />
-<meta name="resource-type" content="document" />
-<meta name="distribution" content="global" />
-<meta name="copyright" content="2007 phpBB Group" />
-<meta name="keywords" content="" />
-<meta name="description" content="phpBB 3.0.x Readme" />
-<title>phpBB3 &bull; Readme</title>
-
-<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
-
-</head>
-
-<body id="phpbb" class="section-docs">
-
-<div id="wrap">
- <a id="top" name="top" accesskey="t"></a>
- <div id="page-header">
- <div class="headerbar">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div id="doc-description">
- <a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
- <h1>phpBB 3.0.x Readme</h1>
- <p style="display: none;"><a href="#start_here">Skip</a></p>
- </div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
- </div>
-
- <a name="start_here"></a>
-
- <div id="page-body">
-
-<!-- BEGIN DOCUMENT -->
-
- <p>Thank you for downloading phpBB3. This README will guide through the basics of installation and operation of phpBB3. Please ensure you read this and the accompanying documentation fully <strong>before</strong> proceeding with the installation.</p>
-
- <h1>Readme</h1>
-
- <div class="paragraph menu">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <ol>
- <li><a href="#install">Installing phpBB3</a></li>
- <li><a href="#run">Running phpBB3</a>
- <ol style="list-style-type: lower-roman;">
- <li><a href="#i18n">Internationalisation (i18n)</a></li>
- <li><a href="#styles">Styles</a></li>
- <li><a href="#mods">Modifications</a></li>
- </ol>
- </li>
- <li><a href="#help">Getting help with phpBB3</a>
- <ol style="list-style-type: lower-roman;">
- <li><a href="#docs">Documentation</a></li>
- <li><a href="#website">Community Forums</a></li>
- <li><a href="#irc">Internet Relay Chat</a></li>
- </ol>
- </li>
- <li><a href="#status">Status of this version</a></li>
- <li><a href="#bugs">Reporting Bugs</a>
- <ol style="list-style-type: lower-roman;">
- <li><a href="#securitybugs">Security related bugs</a></li>
- </ol>
- </li>
- <li><a href="#curbugs">Overview of current bug list</a></li>
- <li><a href="#php">PHP compatibility issues</a></li>
- <li><a href="#disclaimer">Disclaimer</a></li>
- </ol>
-
- </div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
- <a name="install"></a><h2>1. Installing phpBB3</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <p>Installation, update and conversion instructions can be found in the <a href="INSTALL.html">INSTALL</a> document contained in this distribution. If you are intending to convert from a previous phpBB 2.0.x installation we highly recommend you backup any existing data before proceeding!</p>
-
- <p>Users of phpBB3 Beta versions cannot directly update.</p>
-
- <p>Please note that we won't support the following installation types:</p>
- <ul>
- <li>Updates from phpBB3 Beta versions to phpBB3 RC1 and higher</li>
- <li>Conversions from phpBB 2.0.x to phpBB3 Beta versions</li>
- <li>phpBB3 Beta installations</li>
- </ul>
-
- <p>We give support for the following installation types:</p>
-
- <ul>
- <li>Updates from phpBB3 RC1 to the latest version</li>
- <li>Conversions from phpBB 2.0.x to the latest version</li>
- <li>New installations of phpBB3 - always only the latest released version</li>
- </ul>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
- <a name="run"></a><h2>2. Running phpBB3</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <p>Once installed phpBB is easily managed by both admin and moderator control panels. If you need help or advice with phpBB please see <a href="#help">Section 3</a> below.</p>
-
- <a name="i18n"></a><h3>2.i. Internationalisation (i18n)</h3>
-
- <p>A number of language packs and style localisations are available. You can find them on our official download page:</p>
-
- <p><a href="http://www.phpbb.com/downloads/">http://www.phpbb.com/downloads/</a></p>
-
- <p>This is the <em>official</em> location for all supported language sets. If you download a package from a 3rd party site you do so with the understanding that we cannot offer support. So please, do not ask for help in these cases!</p>
-
- <p>Installation of these packages is straightforward, simply download the required language pack and unarchive it into the <samp>languages/</samp> folder. Please ensure you retain the directory structure when doing this! Once uploaded go to the <code>Admin-&gt;System-&gt;Language Packs</code> and install the now appeared new language pack. To install the style imageset you should download the imageset for your language and unarchive the file/s into the relevant imageset directory (styles/prosilver/imageset or styles/subsilver2/imageset), again you must retain the directory structure. Once installed the imageset will become immediately available.</p>
-
- <p>If your language is not available please visit our forums where you will find a topic listing translations currently available or in preparation. This topic also gives you information should you wish to volunteer to translate a language not currently listed.</p>
-
- <a name="styles"></a><h3>2.ii. Styles</h3>
-
- <p>Although phpBB Group are rather proud of the included styles we realise that it may not be to everyones tastes. Therefore phpBB3 allows styles to be switched with relative ease. Firstly you need to locate and download a style you like. We maintain such a site at</p>
-
- <p><a href="http://www.phpbb.com/styles/">http://www.phpbb.com/styles/</a></p>
-
- <p><strong>Please note</strong> that 3rd party styles downloaded for versions of phpBB2 will <strong>not</strong> work in phpBB3.</p>
-
- <p>Once you have downloaded a style the usual next step is to unarchive (or upload the unarchived contents of) the package into your <samp>styles/</samp> directory. You then need to visit <code>Administration -&gt; Styles</code>, you should see the new style available, click install and it will become available for all your users.</p>
-
- <p><strong>Please note</strong> that if you create your own style or modify existing ones, please remember to enable the &quot;Recompile stale style components&quot; setting within the <code>Admin-&gt;General-&gt;Load Settings</code> screen. This setting allows the cache to detect changes made to the style and automatically refresh it. If this setting is disabled, you will not see your changes taking effect.</p>
-
- <a name="mods"></a><h3>2.iii. Modifications</h3>
-
- <p>Although not officially supported by phpBB Group, phpBB has a thriving modification scene. These third party modifications to the standard phpBB extend its capabilities still further and can be found at:</p>
-
- <p><a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a></p>
-
- <p><strong>Please remember</strong> that any bugs or other issues that occur after you have added any modification should <strong>NOT</strong> be reported to the bug tracker (see below). First remove the modification and see if the problem is resolved.</p>
-
- <p>Also remember that any modifications which modify the database in any way may render upgrading your forum to future versions more difficult unless we state otherwise. With all this said many users have and continue to utilise many of the mods already available with great success.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="help"></a><h2>3. Getting help with phpBB3</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <p>phpBB3 can seem a little daunting to new users in places, particularly with regard the permission system. The first thing you should do is check the <a href="FAQ.html">FAQ</a> which covers a few basic getting started questions. If you need additional help there are several places you should look.</p>
-
- <a name="docs"></a><h3>3.i. phpBB3 Documentation</h3>
-
- <p>A comprehensive documentation is now available online and can be accessed from the following location:</p>
-
- <p><a href="http://www.phpbb.com/support/documentation/3.0/">http://www.phpbb.com/support/documentation/3.0/</a></p>
-
- <p>This covers everything from installation through setting permissions and managing users.</p>
-
- <a name="website"></a><h3>3.ii. Community Forums</h3>
-
- <p>phpBB Group maintains a thriving community where a number of people have generously decided to donate their time to help support users. This site can be found at:</p>
-
- <p><a href="http://www.phpbb.com/">http://www.phpbb.com/</a></p>
-
- <p>If you do seek help via our forums please be sure to do a Search before posting. This may well save both you and us time and allow the developer, moderator and support groups to spend more time responding to people with unknown issues and problems. Please also remember that phpBB is an entirely volunteer effort, no one receives any compensation for the time they give, this includes moderators as well as developers. So please be respectful and mindful when awaiting responses.</p>
-
- <a name="irc"></a><h3>3.iii Internet Relay Chat</h3>
-
- <p>Another place you may find help is our IRC channel. This operates on the Freenode IRC network, <em>irc.freenode.net</em> and the channel is <em>#phpbb</em> and can be accessed by any good IRC client such as mIRC, XChat, etc. Again, please do not abuse this service and be respectful of other users.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="status"></a><h2>4. Status of this version</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <p>This is the third stable release of phpBB. The 3.0.x line is essentially feature frozen, with only point releases seeing fixes for bugs and security issues, though feature alterations and minor feature additions may be done if deemed absolutely required. Our next major release will be phpBB 3.2 and the planning phase has begun (the unstable development version is 3.1). Please do not post questions asking when 3.2 will be available, no release date has been set.</p>
-
- <p>For those interested in the development of phpBB should keep an eye on the community forums to see how things are progressing:</p>
-
- <p><a href="http://area51.phpbb.com/phpBB/">http://area51.phpbb.com/phpBB/</a></p>
-
- <p>Please note that this forum should <strong>NOT</strong> be used to obtain support for or ask questions about phpBB 2.0.x or phpBB 3.0.x, the main community forums are the place for this. Any such posts will be locked and go unanswered.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="bugs"></a><h2>5. Reporting Bugs</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <p>The phpBB Group uses a bug tracking system to store, list and manage all reported bugs, it can be found at the location listed below. Please <strong>DO NOT</strong> post bug reports to our forums, they will be locked. In addition please <strong>DO NOT</strong> use the bug tracker for support requests. Posting such a request will only see you directed to the support forums (while taking time away from working on real bugs).</p>
-
- <p><a href="http://www.phpbb.com/bugs/">http://www.phpbb.com/bugs/</a></p>
-
- <p>While we very much appreciate receiving bug reports (the more reports the more stable phpBB will be) we ask you carry out a few steps before adding new entries:</p>
-
- <ul>
- <li>Firstly determine if your bug is reproduceable, how to determine this depends on the bug in question. Only if the bug is reproduceable it is likely to be a problem with phpBB3 (or in some way connected). If something cannot be reproduced it may turn out to have been your hosting provider working on something, a user doing something silly, etc. Bug reports for non-reproduceable events can slow down our attempts to fix real, reproduceable issues<br /><br /></li>
- <li>Next please read or search through the existing bug reports to see if <em>your</em> bug (or one very similar to it) is already listed. If it is please add to that existing bug rather than creating a new duplicate entry (all this does is slow us down).<br /><br /></li>
- <li>Check the forums (use search!) to see if people have discussed anything that sounds similar to what you are seeing. However, as noted above please <strong>DO NOT</strong> post your particular bug to the forum unless it's non-reproduceable or you are sure it's related to something you have done rather phpBB3<br /><br /></li>
- <li>If no existing bug exists then please feel free to add it</li>
- </ul>
-
- <p>If you do post a new bug (i.e. one that isn't already listed in the bug tracker) firstly make sure you have logged in (your username and password are the same as for the community forums) then please include the following details:</p>
-
- <ul>
- <li>Your server type/version, e.g. Apache 1.3.28, IIS 4, Sambar, etc.</li>
- <li>PHP version and mode of operation, e.g. PHP 5.1.1 as a module, PHP 4.4.4 running as CGI, etc.</li>
- <li>DB type/version, e.g. MySQL 4.0.1, PostgreSQL 7.3.2, MSSQL Server 2000 SP1, etc.</li>
- </ul>
-
- <p>The relevant database type/version is listed within the administration control panel</p>
-
- <p>Please also be as detailed as you can in your report, if possible list the steps required to duplicate the problem. If you have a fix which you are <strong>VERY SURE</strong> works (and is consistent with our <a href="coding-guidelines.html">coding guidelines</a>) and does not introduce further problems or incompatibilities please let us know. However only include it in the bug report if you really must, if we need it we'll ask you for it.</p>
-
- <p>Once a bug has been submitted you will be emailed any follow up comments added to it. <strong>Please</strong> if you are requested to supply additional information, do so! It is frustrating for us to receive bug reports, ask for additional information but get nothing. In these cases we have a policy of closing the bug, which may leave a very real problem in place. Obviously we would rather not have this situation arise.</p>
-
-<a name="securitybugs"></a><h3>5.i. Security related bugs</h3>
-
- <p>If you find a potential security related vulnerability in phpBB please <strong>DO NOT</strong> post it to the bug tracker, public forums, etc.! Doing so may allow unscrupulous users to take advantage of it before we have time to put a fix in place. All security related bugs should be sent to our security tracker:</p>
-
- <p><a href="http://www.phpbb.com/security/">http://www.phpbb.com/security/</a></p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="curbugs"></a><h2>6. Overview of current bug list</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <p>This list is not complete but does represent those bugs which may effect users on a wider scale. Other bugs listed in the tracker have typically been shown to be limited to certain setups or methods of installation, updating and/or conversions.</p>
-
- <ul>
- <li>Conversions may fail to complete on large boards under some hosts</li>
- <li>Updates may fail to complete on large update sets under some hosts</li>
- <li>Smilies placed directly after bbcode tags will not get parsed. Smilies always need to be separated by spaces.</li>
- </ul>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="php"></a><h2>7. PHP compatibility issues</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <p>phpBB is no longer supported on PHP3 due to several compatibility issues and we recommend that you upgrade to the latest stable release of PHP5 to run phpBB. The minimum version required is PHP 4.3.3.</p>
-
- <p>Please remember that running any application on a developmental version of PHP can lead to strange/unexpected results which may appear to be bugs in the application (which may not be true). Therefore we recommend you upgrade to the newest stable version of PHP before running phpBB3. If you are running a developmental version of PHP please check any bugs you find on a system running a stable release before submitting.</p>
-
- <p>This board has been developed and tested under Linux and Windows (amongst others) running Apache using MySQL 3.23, 4.x, 5.x, MSSQL Server 2000, PostgreSQL 7.x, Oracle 8, SQLite and Firebird. Versions of PHP used range from 4.3.3 to 6.0.0-dev without problem. </p>
-
-<a name="phpsec"></a><h3>7.i. Notice on PHP security issues</h3>
-
-<p>Currently there are no known issues regarding PHP security.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="disclaimer"></a><h2>8. Copyright and disclaimer</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
-<!-- END DOCUMENT -->
-
- <div id="page-footer">
- <div class="version">&nbsp;</div>
- </div>
-</div></div>
-
-<div>
- <a id="bottom" name="bottom" accesskey="z"></a>
-</div>
-
-</body>
-</html>
diff --git a/phpBB/docs/auth_api.html b/phpBB/docs/auth_api.html
deleted file mode 100644
index c83aaadc2d..0000000000
--- a/phpBB/docs/auth_api.html
+++ /dev/null
@@ -1,253 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
-<head>
-
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<meta http-equiv="content-style-type" content="text/css" />
-<meta http-equiv="content-language" content="en" />
-<meta http-equiv="imagetoolbar" content="no" />
-<meta name="resource-type" content="document" />
-<meta name="distribution" content="global" />
-<meta name="copyright" content="2007 phpBB Group" />
-<meta name="keywords" content="" />
-<meta name="description" content="This is an explanation of how to use the phpBB auth/acl API" />
-<title>phpBB3 &bull; Auth API</title>
-
-<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
-
-</head>
-
-<body id="phpbb" class="section-docs">
-
-<div id="wrap">
- <a id="top" name="top" accesskey="t"></a>
- <div id="page-header">
- <div class="headerbar">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div id="doc-description">
- <a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
- <h1>Auth API</h1>
- <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>
- </div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
- </div>
-
- <a name="start_here"></a>
-
- <div id="page-body">
-
-<!-- BEGIN DOCUMENT -->
-
- <p>This is an explanation of how to use the phpBB auth/acl API.</p>
-
- <h1>Auth API</h1>
-
- <div class="paragraph menu">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<ol>
- <li><a href="#intro">Introduction</a></li>
- <li><a href="#methods">Methods</a>
- <ol style="list-style-type: lower-roman;">
- <li><a href="#acl">acl</a></li>
- <li><a href="#acl_get">acl_get</a></li>
- <li><a href="#acl_gets">acl_gets</a></li>
- <li><a href="#acl_getf">acl_getf</a></li>
- <li><a href="#acl_getf_global">acl_getf_global</a></li>
- <li><a href="#acl_cache">acl_cache</a></li>
- </ol>
- </li>
- <li><a href="#admin_related">Admin related functions</a></li>
- <li><a href="#disclaimer">Copyright and disclaimer</a></li>
-</ol>
-
- </div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="intro"></a><h2>1. Introduction</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <h4>What is it?</h4>
-
- <p>The <code>auth</code> class contains methods related to authorisation users to access various board functions, e.g. posting, viewing, replying, logging in (and out), etc. If you need to check whether a user can carry out a task or handle user login/logouts this class is required.</p>
-
- <h4>Initialisation</h4>
-
- <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>
-$auth = new auth();
- </pre></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>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="methods"></a><h2>2. Methods</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <p>Following are the methods you are able to use.</p>
-
- <a name="acl"></a><h3>2.i. acl</h3>
-
- <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>
-$auth-&gt;acl(<code>userdata</code>);
- </pre></div>
-
- <p>Where userdata is the array containing the aforementioned data.</p>
-
- <a name="acl_get"></a><h3>2.ii. acl_get</h3>
-
- <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>
-$result = $auth-&gt;acl_get(<code>option</code>[, <code>forum</code>]);
- </pre></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>The method returns a positive integer when the user is allowed to carry out the option and a zero if denied or the other way around if the option is prefixed with an exclamation mark.</p>
-
- <p>If you specify a forum and there is also a global setting for the specified option then this method will return a positive integer if one of them evaluates to a positive integer. An example would be the m_approve option which can be set per forum but also globally. If a user has the global option he will automatically have m_approve in every forum.</p>
-
- <p>There are some special options or <em>flags</em> which are used as prefixes for other options, e.g. 'f_' or 'm_'. These flags will automatically be set to a positive integer if the user has one or more permissions with the given prefix. A local setting will result in the flag being set only locally (so it will require a forum id to retrieve). If a user has one or more global permissions with the prefix acl_get will return a positive integer regardless of the forum id.</p>
-
- <a name="acl_gets"></a><h3>2.iii. acl_gets</h3>
-
- <p>This method is funtionally similar to <code>acl_get</code> in that it returns information on whether a user can or cannot carry out a given task. The difference here is the ability to test several different options in one go. This may be useful for testing whether a user is a moderator or an admin in one call. Rather than having to call and check <code>acl_get</code> twice.</p>
-
- <p>The method should be called thus:</p>
-
- <div class="codebox"><pre>
-$result = $auth-&gt;acl_gets(<code>option1</code>[, <code>option2</code>, ..., <code>optionN</code>, <code>forum</code>]);
- </pre></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>The method will return a positive integer if <code>acl_get</code> for one of the options evaluates to a positive integer (combines permissions with OR).</p>
-
- <a name="acl_getf"></a><h3>2.iv. acl_getf</h3>
-
- <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>
-$result = $auth-&gt;acl_getf(<code>option</code>[, <code>clean</code>]);
- </pre></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>The method returns an associative array of the form:</p>
-
- <div class="codebox"><pre>
-array(<em>forum_id1</em> =&gt; array(<em>option</em> =&gt; <em>integer</em>), <em>forum_id2</em> =&gt; ...)
- </pre></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>
-
- <a name="acl_getf_global"></a><h3>2.v. acl_getf_global</h3>
-
- <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>
-$result = acl_getf_global(<code>option</code>)
- </pre></div>
-
- <p>As with the previous methods option is a string specifying the permission which has to be checked.</p>
-
- <p>This method returns either zero or a positive integer.</p>
-
- <a name="acl_cache"></a><h3>2.vi. acl_cache</h3>
-
- <p>This should be considered a private method and not be called externally. It handles the generation of the user_permissions data from the basic user and group authorisation data. When necessary this method is called automatically by <code>acl</code>.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="admin_related"></a><h2>3. Admin related functions</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <p>A number of additional methods are available related to <code>auth</code>. These handle more basic functions such as adding user and group permissions, new options and clearing the user cache. These methods are contained within a separate class, <code>auth_admin</code>. This can be found in <code>includes/acp/auth.php</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>
-$auth_admin = new auth_admin();
- </pre></div>
-
- <p>This instance gives you access to both the methods of this specific class and that of <code>auth</code>.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="disclaimer"></a><h2>4. Copyright and disclaimer</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
-<!-- END DOCUMENT -->
-
- <div id="page-footer">
- <div class="version"> $Id$ </div>
- </div>
-</div></div>
-
-<div>
- <a id="bottom" name="bottom" accesskey="z"></a>
-</div>
-
-</body>
-</html>
diff --git a/phpBB/docs/bg_header.gif b/phpBB/docs/bg_header.gif
deleted file mode 100644
index 351de9f46a..0000000000
--- a/phpBB/docs/bg_header.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/docs/changes.txt b/phpBB/docs/changes.txt
deleted file mode 100644
index dea5b40f88..0000000000
--- a/phpBB/docs/changes.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-List of major changes since 3.0.x:
-
-- new stack-based bbcode system
-- Migrate phpBB to PHP versions >= 5.2
diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html
deleted file mode 100644
index 4c67b1defb..0000000000
--- a/phpBB/docs/coding-guidelines.html
+++ /dev/null
@@ -1,2352 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
-<head>
-
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<meta http-equiv="content-style-type" content="text/css" />
-<meta http-equiv="content-language" content="en" />
-<meta http-equiv="imagetoolbar" content="no" />
-<meta name="resource-type" content="document" />
-<meta name="distribution" content="global" />
-<meta name="copyright" content="2007 phpBB Group" />
-<meta name="keywords" content="" />
-<meta name="description" content="Olympus coding guidelines document" />
-<title>phpBB3 &bull; Coding Guidelines</title>
-
-<link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" />
-
-</head>
-
-<body id="phpbb" class="section-docs">
-
-<div id="wrap">
- <a id="top" name="top" accesskey="t"></a>
- <div id="page-header">
- <div class="headerbar">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div id="doc-description">
- <a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
- <h1>Coding Guidelines</h1>
- <p>Olympus coding guidelines document</p>
- <p style="display: none;"><a href="#start_here">Skip</a></p>
- </div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
- </div>
-
- <a name="start_here"></a>
-
- <div id="page-body">
-
-<!-- BEGIN DOCUMENT -->
-
-<p>These are the phpBB Coding Guidelines for Olympus, all attempts should be made to follow them as closely as possible.</p>
-
-<h1>Coding Guidelines</h1>
-
- <div class="paragraph menu">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<ol>
- <li><a href="#defaults">Defaults</a>
- <ol style="list-style-type: lower-roman;">
- <li><a href="#editorsettings">Editor Settings</a></li>
- <li><a href="#fileheader">File Header</a></li>
- <li><a href="#locations">File Locations</a></li>
- </ol>
- </li>
- <li><a href="#code">Code Layout/Guidelines</a>
- <ol style="list-style-type: lower-roman;">
- <li><a href="#namingvars">Variable/Function Naming</a></li>
- <li><a href="#codelayout">Code Layout</a></li>
- <li><a href="#sql">SQL/SQL Layout</a></li>
- <li><a href="#optimizing">Optimizations</a></li>
- <li><a href="#general">General Guidelines</a></li>
- </ol>
- </li>
- <li><a href="#styling">Styling</a></li>
- <li><a href="#templating">Templating</a></li>
- <li><a href="#charsets">Character Sets and Encodings</a></li>
- <li><a href="#translation">Translation (<abbr title="Internationalisation">i18n</abbr>/<abbr title="Localisation">L10n</abbr>) Guidelines</a>
- <ol style="list-style-type: lower-roman;">
- <li><a href="#standardisation">Standardisation</a></li>
- <li><a href="#otherconsiderations">Other considerations</a></li>
- <li><a href="#writingstyle">Writing Style</a></li>
- </ol>
- </li>
- <li><a href="#changes">Guidelines Changelog</a></li>
- <li><a href="#disclaimer">Copyright and disclaimer</a></li>
-</ol>
-
- </div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="defaults"></a><h2>1. Defaults</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<a name="editorsettings"></a><h3>1.i. Editor Settings</h3>
-
- <h4>Tabs vs Spaces:</h4>
- <p>In order to make this as simple as possible, we will be using tabs, not spaces. We enforce 4 (four) spaces for one tab - therefore you need to set your tab width within your editor to 4 spaces. Make sure that when you <strong>save</strong> the file, it's saving tabs and not spaces. This way, we can each have the code be displayed the way we like it, without breaking the layout of the actual files.</p>
- <p>Tabs in front of lines are no problem, but having them within the text can be a problem if you do not set it to the amount of spaces every one of us uses. Here is a short example of how it should look like:</p>
-
- <div class="codebox"><pre>
-{TAB}$mode{TAB}{TAB}= request_var('mode', '');
-{TAB}$search_id{TAB}= request_var('search_id', '');
- </pre></div>
-
- <p>If entered with tabs (replace the {TAB}) both equal signs need to be on the same column.</p>
-
- <h3>Linefeeds:</h3>
- <p>Ensure that your editor is saving files in the UNIX (LF) line ending format. This means that lines are terminated with a newline, not with Windows Line endings (CR/LF combo) as they are on Win32 or Classic Mac (CR) Line endings. Any decent editor should be able to do this, but it might not always be the default setting. Know your editor. If you want advice for an editor for your Operating System, just ask one of the developers. Some of them do their editing on Win32.
-
- <a name="fileheader"></a><h3>1.ii. File Header</h3>
-
- <h4>Standard header for new files:</h4>
- <p>This template of the header must be included at the start of all phpBB files: </p>
-
- <div class="codebox"><pre>
-/**
-*
-* @package {PACKAGENAME}
-* @version &#36;Id: &#36;
-* @copyright (c) 2007 phpBB Group
-* @license http://opensource.org/licenses/gpl-license.php GNU Public License
-*
-*/
- </pre></div>
-
- <p>Please see the <a href="#locations">File Locations section</a> for the correct package name.</p>
-
- <h4>Files containing inline code:</h4>
-
- <p>For those files you have to put an empty comment directly after the header to prevent the documentor assigning the header to the first code element found.</p>
-
- <div class="codebox"><pre>
-/**
-* {HEADER}
-*/
-
-/**
-*/
-{CODE}
- </pre></div>
-
- <h4>Files containing only functions:</h4>
-
- <p>Do not forget to comment the functions (especially the first function following the header). Each function should have at least a comment of what this function does. For more complex functions it is recommended to document the parameters too.</p>
-
- <h4>Files containing only classes:</h4>
-
- <p>Do not forget to comment the class. Classes need a separate @package definition, it is the same as the header package name. Apart from this special case the above statement for files containing only functions needs to be applied to classes and it's methods too.</p>
-
- <h4>Code following the header but only functions/classes file:</h4>
-
- <p>If this case is true, the best method to avoid documentation confusions is adding an ignore command, for example:</p>
-
- <div class="codebox"><pre>
-/**
-* {HEADER}
-*/
-
-/**
-* @ignore
-*/
-Small code snipped, mostly one or two defines or an if statement
-
-/**
-* {DOCUMENTATION}
-*/
-class ...
- </pre></div>
-
- <a name="locations"></a><h3>1.iii. File Locations</h3>
-
- <p>Functions used by more than one page should be placed in functions.php, functions specific to one page should be placed on that page (at the bottom) or within the relevant sections functions file. Some files in <code>/includes</code> are holding functions responsible for special sections, for example uploading files, displaying &quot;things&quot;, user related functions and so forth.</p>
-
- <p>The following packages are defined, and related new features/functions should be placed within the mentioned files/locations, as well as specifying the correct package name. The package names are bold within this list:</p>
-
- <ul>
- <li><strong>phpBB3</strong><br />Core files and all files not assigned to a separate package</li>
- <li><strong>acm</strong><br /><code>/includes/acm</code>, <code>/includes/cache.php</code><br />Cache System</li>
- <li><strong>acp</strong><br /><code>/adm</code>, <code>/includes/acp</code>, <code>/includes/functions_admin.php</code><br />Administration Control Panel</li>
- <li><strong>dbal</strong><br /><code>/includes/db</code><br />Database Abstraction Layer.<br />Base class is <code>dbal</code>
- <ul>
- <li><code>/includes/db/dbal.php</code><br />Base DBAL class, defining the overall framework</li>
- <li><code>/includes/db/firebird.php</code><br />Firebird/Interbase Database Abstraction Layer</li>
- <li><code>/includes/db/msssql.php</code><br />MSSQL Database Abstraction Layer</li>
- <li><code>/includes/db/mssql_odbc.php</code><br />MSSQL ODBC Database Abstraction Layer for MSSQL</li>
- <li><code>/includes/db/mysql.php</code><br />MySQL Database Abstraction Layer for MySQL 3.x/4.0.x/4.1.x/5.x
- <li><code>/includes/db/mysqli.php</code><br />MySQLi Database Abstraction Layer</li>
- <li><code>/includes/db/oracle.php</code><br />Oracle Database Abstraction Layer</li>
- <li><code>/includes/db/postgres.php</code><br />PostgreSQL Database Abstraction Layer</li>
- <li><code>/includes/db/sqlite.php</code><br />Sqlite Database Abstraction Layer</li>
- </ul>
- </li>
- <li><strong>diff</strong><br /><code>/includes/diff</code><br />Diff Engine</li>
- <li><strong>docs</strong><br /><code>/docs</code><br />phpBB Documentation</li>
- <li><strong>images</strong><br /><code>/images</code><br />All global images not connected to styles</li>
- <li><strong>install</strong><br /><code>/install</code><br />Installation System</li>
- <li><strong>language</strong><br /><code>/language</code><br />All language files</li>
- <li><strong>login</strong><br /><code>/includes/auth</code><br />Login Authentication Plugins</li>
- <li><strong>VC</strong><br /><code>/includes/captcha</code><br />CAPTCHA</li>
- <li><strong>mcp</strong><br /><code>mcp.php</code>, <code>/includes/mcp</code>, <code>report.php</code><br />Moderator Control Panel</li>
- <li><strong>ucp</strong><br /><code>ucp.php</code>, <code>/includes/ucp</code><br />User Control Panel</li>
- <li><strong>utf</strong><br /><code>/includes/utf</code><br />UTF8-related functions/classes</li>
- <li><strong>search</strong><br /><code>/includes/search</code>, <code>search.php</code><br />Search System</li>
- <li><strong>styles</strong><br /><code>/styles</code>, <code>style.php</code><br />phpBB Styles/Templates/Themes/Imagesets</li>
- </ul>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="code"></a><h2>2. Code Layout/Guidelines</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <p>Please note that these Guidelines applies to all php, html, javascript and css files.</p>
-
- <a name="namingvars"></a><h3>2.i. Variable/Function Naming</h3>
-
- <p>We will not be using any form of hungarian notation in our naming conventions. Many of us believe that hungarian naming is one of the primary code obfuscation techniques currently in use.</p>
-
- <h4>Variable Names:</h4>
- <p>Variable names should be in all lowercase, with words separated by an underscore, example:</p>
-
- <div class="indent">
- <p><code>$current_user</code> is right, but <code>$currentuser</code> and <code> $currentUser</code> are not.</p>
- </div>
-
- <p>Names should be descriptive, but concise. We don't want huge sentences as our variable names, but typing an extra couple of characters is always better than wondering what exactly a certain variable is for. </p>
-
- <h4>Loop Indices:</h4>
- <p>The <em>only</em> situation where a one-character variable name is allowed is when it's the index for some looping construct. In this case, the index of the outer loop should always be $i. If there's a loop inside that loop, its index should be $j, followed by $k, and so on. If the loop is being indexed by some already-existing variable with a meaningful name, this guideline does not apply, example:</p>
-
- <div class="codebox"><pre>
-for ($i = 0; $i &lt; $outer_size; $i++)
-{
- for ($j = 0; $j &lt; $inner_size; $j++)
- {
- foo($i, $j);
- }
-}
- </pre></div>
-
- <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. Function names should preferably have a verb in them somewhere. Good function names are <code>print_login_status()</code>, <code>get_user_data()</code>, etc. </p>
-
- <h4>Function Arguments:</h4>
- <p>Arguments are subject to the same guidelines as variable names. We don't want a bunch of functions like: <code>do_stuff($a, $b, $c)</code>. In most cases, we'd like to be able to tell how to use a function by just looking at its declaration. </p>
-
- <h4>Summary:</h4>
- <p>The basic philosophy here is to not hurt code clarity for the sake of laziness. This has to be balanced by a little bit of common sense, though; <code>print_login_status_for_a_given_user()</code> goes too far, for example -- that function would be better named <code>print_user_login_status()</code>, or just <code>print_login_status()</code>.</p>
-
- <h4>Special Namings: </h4>
- <p>For all emoticons use the term <code>smiley</code> in singular and <code>smilies</code> in plural.</p>
-
- <a name="codelayout"></a><h3>2.ii. Code Layout</h3>
-
- <h4>Always include the braces:</h4>
- <p>This is another case of being too lazy to type 2 extra characters causing problems with code clarity. Even if the body of some construct is only one line long, do <em>not</em> drop the braces. Just don't, examples:</p>
-
- <p class="bad">// These are all wrong. </p>
-
- <div class="codebox"><pre>
-if (condition) do_stuff();
-
-if (condition)
- do_stuff();
-
-while (condition)
- do_stuff();
-
-for ($i = 0; $i &lt; size; $i++)
- do_stuff($i);
- </pre></div>
-
- <p class="good">// These are all right. </p>
- <div class="codebox"><pre>
-if (condition)
-{
- do_stuff();
-}
-
-while (condition)
-{
- do_stuff();
-}
-
-for ($i = 0; $i &lt; size; $i++)
-{
- do_stuff();
-}
- </pre></div>
-
- <h4>Where to put the braces:</h4>
- <p>This one is a bit of a holy war, but we're going to use a style that can be summed up in one sentence: 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>
-
- <div class="codebox"><pre>
-if (condition)
-{
- while (condition2)
- {
- ...
- }
-}
-else
-{
- ...
-}
-
-for ($i = 0; $i &lt; $size; $i++)
-{
- ...
-}
-
-while (condition)
-{
- ...
-}
-
-function do_stuff()
-{
- ...
-}
- </pre></div>
-
- <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>// Each pair shows the wrong way followed by the right way. </p>
-
- <div class="codebox"><pre>
-$i=0;
-$i = 0;
-
-if($i&lt;7) ...
-if ($i &lt; 7) ...
-
-if ( ($i &lt; 7)&amp;&amp;($j &gt; 8) ) ...
-if ($i &lt; 7 &amp;&amp; $j &gt; 8) ...
-
-do_stuff( $i, 'foo', $b );
-do_stuff($i, 'foo', $b);
-
-for($i=0; $i&lt;$size; $i++) ...
-for ($i = 0; $i &lt; $size; $i++) ...
-
-$i=($j &lt; $size)?0:1;
-$i = ($j &lt; $size) ? 0 : 1;
- </pre></div>
-
- <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 class="bad">// what's the result? who knows. </p>
- <div class="codebox"><pre>
-$bool = ($i &lt; 7 &amp;&amp; $j &gt; 8 || $k == 4);
- </pre></div>
-
- <p class="bad">// now you can be certain what I'm doing here.</p>
- <div class="codebox"><pre>
-$bool = (($i &lt; 7) &amp;&amp; (($j &lt; 8) || ($k == 4)));
- </pre></div>
-
- <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>
-$bool = ($i &lt; 7 &amp;&amp; ($j &lt; 8 || $k == 4));
- </pre></div>
-
- <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>Also, if you are using a string variable as part of a function call, you do not need to enclose that variable in quotes. Again, this will just make unnecessary work for the parser. Note, however, that nearly all of the escape sequences that exist for double-quoted strings will not work with single-quoted strings. Be careful, and feel free to break this guideline if it's making your code easier to read, examples:</p>
-
- <p class="bad">// wrong </p>
- <div class="codebox"><pre>
-$str = "This is a really long string with no variables for the parser to find.";
-
-do_stuff("$str");
- </pre></div>
-
- <p class="good">// right</p>
- <div class="codebox"><pre>
-$str = 'This is a really long string with no variables for the parser to find.';
-
-do_stuff($str);
- </pre></div>
-
- <p class="bad">// Sometimes single quotes are just not right</p>
- <div class="codebox"><pre>
-$some_string = $board_url . 'someurl.php?mode=' . $mode . '&amp;amp;start=' . $start;
- </pre></div>
-
- <p class="good">// Double quotes are sometimes needed to not overcroud the line with concentinations</p>
- <div class="codebox"><pre>
-$some_string = "{$board_url}someurl.php?mode=$mode&amp;amp;start=$start";
- </pre></div>
-
- <p>In SQL Statements mixing single and double quotes is partly allowed (following the guidelines listed here about SQL Formatting), else it should be tryed to only use one method - mostly single quotes.</p>
-
- <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 class="bad">// wrong</p>
- <div class="codebox"><pre>
-$foo = $assoc_array[blah];
- </pre></div>
-
- <p class="good">// right </p>
- <div class="codebox"><pre>
-$foo = $assoc_array['blah'];
- </pre></div>
-
- <p class="bad">// wrong</p>
- <div class="codebox"><pre>
-$foo = $assoc_array["$var"];
- </pre></div>
-
- <p class="good">// right </p>
- <div class="codebox"><pre>
-$foo = $assoc_array[$var];
- </pre></div>
-
- <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>
-
- <h4>Magic numbers:</h4>
- <p>Don't use them. Use named constants for any literal value other than obvious special cases. Basically, it's ok to check if an array has 0 elements by using the literal 0. It's not ok to assign some special meaning to a number and then use it everywhere as a literal. This hurts readability AND maintainability. The constants <code>true</code> and <code>false</code> should be used in place of the literals 1 and 0 -- even though they have the same values (but not type!), it's more obvious what the actual logic is when you use the named constants. Typecast variables where it is needed, do not rely on the correct variable type (PHP is currently very loose on typecasting which can lead to security problems if a developer does not have a very close eye to it).</p>
-
- <h4>Shortcut operators:</h4>
- <p>The only shortcut operators that cause readability problems are the shortcut increment <code>$i++</code> and decrement <code>$j--</code> operators. These operators should not be used as part of an expression. They can, however, be used on their own line. Using them in expressions is just not worth the headaches when debugging, examples:</p>
-
- <p class="bad">// wrong </p>
- <div class="codebox"><pre>
-$array[++$i] = $j;
-$array[$i++] = $k;
- </pre></div>
-
- <p class="good">// right </p>
- <div class="codebox"><pre>
-$i++;
-$array[$i] = $j;
-
-$array[$i] = $k;
-$i++;
- </pre></div>
-
- <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 class="bad">// Bad place to use them</p>
- <div class="codebox"><pre>
-($i &lt; $size &amp;&amp; $j &gt; $size) ? do_stuff($foo) : do_stuff($bar);
- </pre></div>
-
- <p class="good">// OK place to use them </p>
- <div class="codebox"><pre>
-$min = ($i &lt; $j) ? $i : $j;
- </pre></div>
-
- <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 class="bad">// Wrong </p>
- <div class="codebox"><pre>
-if ($forum) ...
- </pre></div>
-
- <p class="good">// Right </p>
- <div class="codebox"><pre>
-if (isset($forum)) ...
- </pre></div>
-
- <p class="good">// Also possible</p>
- <div class="codebox"><pre>
-if (isset($forum) &amp;&amp; $forum == 5)
- </pre></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) &amp;&amp; sizeof($array) &gt; 0</code> - this can be written in a shorter way as <code>!empty($array)</code>.</p>
-
- <h4>Switch statements:</h4>
- <p>Switch/case code blocks can get a bit long sometimes. To have some level of notice and being in-line with the opening/closing brace requirement (where they are on the same line for better readability), this also applies to switch/case code blocks and the breaks. An example:</p>
-
- <p class="bad">// Wrong </p>
- <div class="codebox"><pre>
-switch ($mode)
-{
- case 'mode1':
- // I am doing something here
- break;
- case 'mode2':
- // I am doing something completely different here
- break;
-}
- </pre></div>
-
- <p class="good">// Good </p>
- <div class="codebox"><pre>
-switch ($mode)
-{
- case 'mode1':
- // I am doing something here
- break;
-
- case 'mode2':
- // I am doing something completely different here
- break;
-
- default:
- // Always assume that a case was not caught
- break;
-}
- </pre></div>
-
- <p class="good">// Also good, if you have more code between the case and the break </p>
- <div class="codebox"><pre>
-switch ($mode)
-{
- case 'mode1':
-
- // I am doing something here
-
- break;
-
- case 'mode2':
-
- // I am doing something completely different here
-
- break;
-
- default:
-
- // Always assume that a case was not caught
-
- break;
-}
- </pre></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>If no break is intended, please add a comment instead. An example:</p>
-
- <p class="good">// Example with no break </p>
- <div class="codebox"><pre>
-switch ($mode)
-{
- case 'mode1':
-
- // I am doing something here
-
- // no break here
-
- case 'mode2':
-
- // I am doing something completely different here
-
- break;
-
- default:
-
- // Always assume that a case was not caught
-
- break;
-}
- </pre></div>
-
- <a name="sql"></a><h3>2.iii. SQL/SQL Layout</h3>
-
- <h4>Common SQL Guidelines: </h4>
- <p>All SQL should be cross-DB compatible, if DB specific SQL is used alternatives must be provided which work on all supported DB's (MySQL3/4/5, MSSQL (7.0 and 2000), PostgreSQL (7.0+), Firebird, SQLite, Oracle8, ODBC (generalised if possible)).</p>
- <p>All SQL commands should utilise the DataBase Abstraction Layer (DBAL)</p>
-
- <h4>SQL code layout:</h4>
- <p>SQL Statements are often unreadable without some formatting, since they tend to be big at times. Though the formatting of sql statements adds a lot to the readability of code. SQL statements should be formatted in the following way, basically writing keywords: </p>
-
- <div class="codebox"><pre>
-$sql = 'SELECT *
-&lt;-one tab-&gt;FROM ' . SOME_TABLE . '
-&lt;-one tab-&gt;WHERE a = 1
-&lt;-two tabs-&gt;AND (b = 2
-&lt;-three tabs-&gt;OR b = 3)
-&lt;-one tab-&gt;ORDER BY b';
- </pre></div>
-
- <p>Here the example with the tabs applied:</p>
-
- <div class="codebox"><pre>
-$sql = 'SELECT *
- FROM ' . SOME_TABLE . '
- WHERE a = 1
- AND (b = 2
- OR b = 3)
- ORDER BY b';
- </pre></div>
-
- <h4>SQL Quotes: </h4>
- <p>Double quotes where applicable (The variables in these examples are typecasted to integers before) ... examples: </p>
-
- <p class="bad">// These are wrong.</p>
- <div class="codebox"><pre>
-"UPDATE " . SOME_TABLE . " SET something = something_else WHERE a = $b";
-
-'UPDATE ' . SOME_TABLE . ' SET something = ' . $user_id . ' WHERE a = ' . $something;
- </pre></div>
-
- <p class="good">// These are right. </p>
-
- <div class="codebox"><pre>
-'UPDATE ' . SOME_TABLE . " SET something = something_else WHERE a = $b";
-
-'UPDATE ' . SOME_TABLE . " SET something = $user_id WHERE a = $something";
- </pre></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>
-
- <h4>Avoid DB specific SQL: </h4>
- <p>The &quot;not equals operator&quot;, as defined by the SQL:2003 standard, is &quot;&lt;&gt;&quot;</p>
-
- <p class="bad">// This is wrong.</p>
- <div class="codebox"><pre>
-$sql = 'SELECT *
- FROM ' . SOME_TABLE . '
- WHERE a != 2';
- </pre></div>
-
- <p class="good">// This is right. </p>
- <div class="codebox"><pre>
-$sql = 'SELECT *
- FROM ' . SOME_TABLE . '
- WHERE a &lt;&gt; 2';
- </pre></div>
-
- <h4>Common DBAL methods: </h4>
-
- <h4>sql_escape():</h4>
-
- <p>Always use <code>$db-&gt;sql_escape()</code> if you need to check for a string within an SQL statement (even if you are sure the variable cannot contain single quotes - never trust your input), for example:</p>
-
- <div class="codebox"><pre>
-$sql = 'SELECT *
- FROM ' . SOME_TABLE . "
- WHERE username = '" . $db-&gt;sql_escape($username) . "'";
- </pre></div>
-
- <h4>sql_query_limit():</h4>
-
- <p>We do not add limit statements to the sql query, but instead use <code>$db-&gt;sql_query_limit()</code>. You basically pass the query, the total number of lines to retrieve and the offset.</p>
-
- <p><strong>Note: </strong> Since Oracle handles limits differently and because of how we implemented this handling you need to take special care if you use <code>sql_query_limit</code> with an sql query retrieving data from more than one table.</p>
-
- <p>Make sure when using something like "SELECT x.*, y.jars" that there is not a column named jars in x; make sure that there is no overlap between an implicit column and the explicit columns.</p>
-
- <h4>sql_build_array():</h4>
-
- <p>If you need to UPDATE or INSERT data, make use of the <code>$db-&gt;sql_build_array()</code> function. This function already escapes strings and checks other types, so there is no need to do this here. The data to be inserted should go into an array - <code>$sql_ary</code> - or directly within the statement if one or two variables needs to be inserted/updated. An example of an insert statement would be:</p>
-
- <div class="codebox"><pre>
-$sql_ary = array(
- 'somedata' =&gt; $my_string,
- 'otherdata' =&gt; $an_int,
- 'moredata' =&gt; $another_int
-);
-
-$db-&gt;sql_query('INSERT INTO ' . SOME_TABLE . ' ' . $db-&gt;sql_build_array('INSERT', $sql_ary));
- </pre></div>
-
- <p>To complete the example, this is how an update statement would look like:</p>
-
- <div class="codebox"><pre>
-$sql_ary = array(
- 'somedata' =&gt; $my_string,
- 'otherdata' =&gt; $an_int,
- 'moredata' =&gt; $another_int
-);
-
-$sql = 'UPDATE ' . SOME_TABLE . '
- SET ' . $db-&gt;sql_build_array('UPDATE', $sql_ary) . '
- WHERE user_id = ' . (int) $user_id;
-$db-&gt;sql_query($sql);
- </pre></div>
-
- <p>The <code>$db-&gt;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>
-
- <h4>sql_multi_insert():</h4>
-
- <p>If you want to insert multiple statements at once, please use the separate <code>sql_multi_insert()</code> method. An example:</p>
-
- <div class="codebox"><pre>
-$sql_ary = array();
-
-$sql_ary[] = array(
- 'somedata' =&gt; $my_string_1,
- 'otherdata' =&gt; $an_int_1,
- 'moredata' =&gt; $another_int_1,
-);
-
-$sql_ary[] = array(
- 'somedata' =&gt; $my_string_2,
- 'otherdata' =&gt; $an_int_2,
- 'moredata' =&gt; $another_int_2,
-);
-
-$db->sql_multi_insert(SOME_TABLE, $sql_ary);
- </pre></div>
-
- <h4>sql_in_set():</h4>
-
- <p>The <code>$db-&gt;sql_in_set()</code> function should be used for building <code>IN ()</code> and <code>NOT IN ()</code> constructs. Since (specifically) MySQL tend to be faster if for one value to be compared the <code>=</code> and <code>&lt;&gt;</code> operator is used, we let the DBAL decide what to do. A typical example of doing a positive match against a number of values would be:</p>
-
- <div class="codebox"><pre>
-$sql = 'SELECT *
- FROM ' . FORUMS_TABLE . '
- WHERE ' . $db-&gt;sql_in_set('forum_id', $forum_ids);
-$db-&gt;sql_query($sql);
- </pre></div>
-
- <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>
-
- <div class="codebox"><pre>
-SELECT FROM phpbb_forums WHERE forum_id IN (1, 2, 3)
- </pre></div>
-
- <p class="good">// SQL Statement if $forum_ids = array(1) or $forum_ids = 1</p>
-
- <div class="codebox"><pre>
-SELECT FROM phpbb_forums WHERE forum_id = 1
- </pre></div>
-
- <p>Of course the same is possible for doing a negative match against a number of values:</p>
-
- <div class="codebox"><pre>
-$sql = 'SELECT *
- FROM ' . FORUMS_TABLE . '
- WHERE ' . $db-&gt;sql_in_set('forum_id', $forum_ids, <strong>true</strong>);
-$db-&gt;sql_query($sql);
- </pre></div>
-
- <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>
-
- <div class="codebox"><pre>
-SELECT FROM phpbb_forums WHERE forum_id <strong>NOT</strong> IN (1, 2, 3)
- </pre></div>
-
- <p class="good">// SQL Statement if $forum_ids = array(1) or $forum_ids = 1</p>
-
- <div class="codebox"><pre>
-SELECT FROM phpbb_forums WHERE forum_id <strong>&lt;&gt;</strong> 1
- </pre></div>
-
- <p>If the given array is empty, an error will be produced.</p>
-
- <h4>sql_build_query():</h4>
-
- <p>The <code>$db-&gt;sql_build_query()</code> function is responsible for building sql statements for select and select distinct queries if you need to JOIN on more than one table or retrieving data from more than one table while doing a JOIN. This needs to be used to make sure the resulting statement is working on all supported db's. Instead of explaining every possible combination, i will give a short example:</p>
-
- <div class="codebox"><pre>
-$sql_array = array(
- 'SELECT' =&gt; 'f.*, ft.mark_time',
-
- 'FROM' =&gt; array(
- FORUMS_WATCH_TABLE =&gt; 'fw',
- FORUMS_TABLE =&gt; 'f'
- ),
-
- 'LEFT_JOIN' =&gt; array(
- array(
- 'FROM' =&gt; array(FORUMS_TRACK_TABLE =&gt; 'ft'),
- 'ON' =&gt; 'ft.user_id = ' . $user-&gt;data['user_id'] . ' AND ft.forum_id = f.forum_id'
- )
- ),
-
- 'WHERE' =&gt; 'fw.user_id = ' . $user-&gt;data['user_id'] . '
- AND f.forum_id = fw.forum_id',
-
- 'ORDER_BY' =&gt; 'left_id'
-);
-
-$sql = $db-&gt;sql_build_query('SELECT', $sql_array);
- </pre></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>
-
- <div class="codebox"><pre>
-$sql_array = array(
- 'SELECT' =&gt; 'f.*',
-
- 'FROM' =&gt; array(
- FORUMS_WATCH_TABLE =&gt; 'fw',
- FORUMS_TABLE =&gt; 'f'
- ),
-
- 'WHERE' =&gt; 'fw.user_id = ' . $user-&gt;data['user_id'] . '
- AND f.forum_id = fw.forum_id',
-
- 'ORDER_BY' =&gt; 'left_id'
-);
-
-if (phpbb::$config['load_db_lastread'])
-{
- $sql_array['LEFT_JOIN'] = array(
- array(
- 'FROM' =&gt; array(FORUMS_TRACK_TABLE =&gt; 'ft'),
- 'ON' =&gt; 'ft.user_id = ' . $user-&gt;data['user_id'] . ' AND ft.forum_id = f.forum_id'
- )
- );
-
- $sql_array['SELECT'] .= ', ft.mark_time ';
-}
-else
-{
- // Here we read the cookie data
-}
-
-$sql = $db-&gt;sql_build_query('SELECT', $sql_array);
- </pre></div>
-
- <a name="optimizing"></a><h3>2.iv. Optimizations</h3>
-
- <h4>Operations in loop definition: </h4>
- <p>Always try to optimize your loops if operations are going on at the comparing part, since this part is executed every time the loop is parsed through. For assignments a descriptive name should be chosen. Example:</p>
-
- <p class="bad">// On every iteration the sizeof function is called</p>
- <div class="codebox"><pre>
-for ($i = 0; $i &lt; sizeof($post_data); $i++)
-{
- do_something();
-}
- </pre></div>
-
- <p class="good">// You are able to assign the (not changing) result within the loop itself</p>
- <div class="codebox"><pre>
-for ($i = 0, $size = sizeof($post_data); $i &lt; $size; $i++)
-{
- do_something();
-}
- </pre></div>
-
- <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 noticable, but if checked against a huge array within a loop those checks alone can be a bunch of 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>
-
-
- <a name="general"></a><h3>2.v. General Guidelines</h3>
-
- <h4>General things:</h4>
- <p>Never trust user input (this also applies to server variables as well as cookies).</p>
- <p>Try to sanitize values returned from a function.</p>
- <p>Try to sanitize given function variables within your function.</p>
- <p>The auth class should be used for all authorisation checking.</p>
- <p>No attempt should be made to remove any copyright information (either contained within the source or displayed interactively when the source is run/compiled), neither should the copyright information be altered in any way (it may be added to).</p>
-
- <h4>Variables: </h4>
- <p>Make use of the <code>request_var()</code> function for anything except for submit or single checking params. </p>
- <p>The request_var function determines the type to set from the second parameter (which determines the default value too). If you need to get a scalar variable type, you need to tell this the request_var function explicitly. Examples:</p>
-
- <p class="bad">// Old method, do not use it</p>
- <div class="codebox"><pre>
-$start = (isset($HTTP_GET_VARS['start'])) ? intval($HTTP_GET_VARS['start']) : intval($HTTP_POST_VARS['start']);
-$submit = (isset($HTTP_POST_VARS['submit'])) ? true : false;
- </pre></div>
-
- <p class="good">// Use request var and define a default variable (use the correct type)</p>
- <div class="codebox"><pre>
-$start = request_var('start', 0);
-$submit = phpbb_request::is_set_post('submit');
- </pre></div>
-
- <p class="bad">// $start is an int, the following use of request_var therefore is not allowed</p>
- <div class="codebox"><pre>
-$start = request_var('start', '0');
- </pre></div>
-
- <p class="good">// Getting an array, keys are integers, value defaults to 0</p>
- <div class="codebox"><pre>
-$mark_array = request_var('mark', array(0));
- </pre></div>
-
- <p class="good">// Getting an array, keys are strings, value defaults to 0</p>
- <div class="codebox"><pre>
-$action_ary = request_var('action', array('' =&gt; 0));
- </pre></div>
-
- <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>The <code>login_box()</code> function can have a redirect as the first parameter. As a thumb of rule, specify an empty string if you want to redirect to the users current location, else do not add the <code>$SID</code> to the redirect string (for example within the ucp/login we redirect to the board index because else the user would be redirected to the login screen).</p>
-
- <h4>Sensitive Operations: </h4>
- <p>For sensitive operations always let the user confirm the action. For the confirmation screens, make use of the <code>confirm_box()</code> function.</p>
-
- <h4>Altering Operations: </h4>
- <p>For operations altering the state of the database, for instance posting, always verify the form token, unless you are already using <code>confirm_box()</code>. To do so, make use of the <code>add_form_key()</code> and <code>check_form_key()</code> functions. </p>
- <div class="codebox"><pre>
- add_form_key('my_form');
-
- if ($submit)
- {
- if (!check_form_key('my_form'))
- {
- trigger_error('FORM_INVALID');
- }
- }
- </pre></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>
-
-
- <h4>Sessions: </h4>
- <p>Sessions should be initiated on each page, as near the top as possible using the following code:</p>
-
- <div class="codebox"><pre>
-$user-&gt;session_begin();
-$auth-&gt;acl($user-&gt;data);
-$user-&gt;setup();
- </pre></div>
-
- <p>The <code>$user-&gt;setup()</code> call can be used to pass on additional language definition and a custom style (used in viewforum).</p>
-
- <h4>Errors and messages: </h4>
- <p>All messages/errors should be outputed by calling <code>trigger_error()</code> using the appropriate message type and language string. Example:</p>
-
- <div class="codebox"><pre>
-trigger_error('NO_FORUM');
- </pre></div>
-
- <div class="codebox"><pre>
-trigger_error($user-&gt;lang['NO_FORUM']);
- </pre></div>
-
- <div class="codebox"><pre>
-trigger_error('NO_MODE', E_USER_ERROR);
- </pre></div>
-
- <h4>Url formatting</h4>
-
- <p>All urls pointing to internal files need to be prepended by the <code>PHPBB_ROOT_PATH</code> constant. Within the administration control panel all urls pointing to internal files need to be prepended by the <code>PHPBB_ADMIN_PATH</code> constant. This makes sure the path is always correct and users being able to just rename the admin folder and the acp still working as intended (though some links will fail and the code need to be slightly adjusted).</p>
-
- <p>The <code>append_sid()</code> function from 2.0.x is available too, though 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>
-append_sid(PHPBB_ROOT_PATH . 'memberlist.' . PHP_EXT, 'mode=group&amp;amp;g=' . $row['group_id'])
- </pre></div>
-
- <p>For shorter writing internal urls are allowed to be written in short notation, not providing the root path and the extension. The append_sid() function will prepend the root path and append the extension automatically (and before calling the hook).</p>
-
- <div class="codebox"><pre>
-append_sid('memberlist', 'mode=group&amp;amp;g=' . $row['group_id'])
- </pre></div>
-
- <h4>General function usage: </h4>
-
- <p>Some of these functions are only chosen over others because of personal preference and having no other benefit than to be consistant over the code.</p>
-
- <ul>
- <li>
- <p>Use <code>sizeof</code> instead of <code>count</code></p>
- </li>
- <li>
- <p>Use <code>strpos</code> instead of <code>strstr</code></p>
- </li>
- <li>
- <p>Use <code>else if</code> instead of <code>elseif</code></p>
- </li>
- <li>
- <p>Use <code>false</code> (lowercase) instead of <code>FALSE</code></p>
- </li>
- <li>
- <p>Use <code>true</code> (lowercase) instead of <code>TRUE</code></p>
- </li>
- </ul>
-
- <h4>Exiting</h4>
-
- <p>Your page should either call <code>page_footer()</code> in the end to trigger output through the template engine and terminate the script, or alternatively at least call the <code>exit_handler()</code>. That call is necessary because it provides a method for external applications embedding phpBB to be called at the end of the script.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="styling"></a><h2>3. Styling</h2>
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
- <a name="cfgfiles"></a><h3>3.i. Style Config Files</h3>
- <p>Style cfg files are simple name-value lists with the information necessary for installing a style. Similar cfg files exist for templates, themes and imagesets. These follow the same principle and will not be introduced individually. Styles can use installed components by using the required_theme/required_template/required_imageset entries. The important part of the style configuration file is assigning an unique name.</p>
- <div class="codebox"><pre>
- # General Information about this style
- name = prosilver_duplicate
- copyright = &copy; phpBB Group, 2007
- version = 3.0.3
- required_template = prosilver
- required_theme = prosilver
- required_imageset = prosilver
- </pre></div>
- <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 intendation and coding guidelines also apply to templates where possible.</p>
-
-<p>The outer table class <code>forumline</code> has gone and is replaced with <code>tablebg</code>.</p>
-<p>When writing <code>&lt;table&gt;</code> the order <code>&lt;table class="" cellspacing="" cellpadding="" border="" align=""&gt;</code> creates consistency and allows everyone to easily see which table produces which "look". The same applies to most other tags for which additional parameters can be set, consistency is the major aim here.</p>
-<p>Each block level element should be indented by one tab, same for tabular elements, e.g. <code>&lt;tr&gt;</code> <code>&lt;td&gt;</code> etc., whereby the intendiation of <code>&lt;table&gt;</code> and the following/ending <code>&lt;tr&gt;</code> should be on the same line. This applies not to div elements of course.</p>
-<p>Don't use <code>&lt;span&gt;</code> more than is essential ... the CSS is such that text sizes are dependent on the parent class. So writing <code>&lt;span class="gensmall"&gt;&lt;span class="gensmall"&gt;TEST&lt;/span&gt;&lt;/span&gt;</code> will result in very very small text. Similarly don't use span at all if another element can contain the class definition, e.g.</p>
-
-<div class="codebox"><pre>
-&lt;td&gt;&lt;span class=&quot;gensmall&quot;&gt;TEST&lt;/span&gt;&lt;/td&gt;
-</pre></div>
-
-<p>can just as well become:</p>
-<div class="codebox"><pre>
-&lt;td class=&quot;gensmall&quot;&gt;TEST&lt;/td&gt;
-</pre></div>
-
-<p>Try to match text class types with existing useage, e.g. don't use the nav class where viewtopic uses gensmall for example.</p>
-
-<p>Row colours/classes are now defined by the template, use an <code>IF S_ROW_COUNT</code> switch, see viewtopic or viewforum for an example.</p>
-
-<p>Remember block level ordering is important ... while not all pages validate as XHTML 1.0 Strict compliant it is something we're trying to work too.</p>
-
-<p>Use a standard cellpadding of 2 and cellspacing of 0 on outer tables. Inner tables can vary from 0 to 3 or even 4 depending on the need.</p>
-
-<p><strong>Use div container/css for styling and table for data representation.</strong></p>
-
-<p>The separate catXXXX and thXXX classes are gone. When defining a header cell just use <code>&lt;th&gt;</code> rather than <code>&lt;th class="thHead"&gt;</code> etc. Similarly for cat, don't use <code>&lt;td class="catLeft"&gt;</code> use <code>&lt;td class="cat"&gt;</code> etc.</p>
-
-<p>Try to retain consistency of basic layout and class useage, i.e. _EXPLAIN text should generally be placed below the title it explains, e.g. <code>{L_POST_USERNAME}&lt;br /&gt;&lt;span class="gensmall"&gt;{L_POST_USERNAME_EXPLAIN}&lt;/span&gt;</code> is the typical way of handling this ... there may be exceptions and this isn't a hard and fast rule.</p>
-
-<p>Try to keep template conditional and other statements tabbed in line with the block to which they refer.</p>
-
-<p class="good">this is correct</p>
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- BEGIN test --&gt;</span>
- &lt;tr&gt;
- &lt;td&gt;&#123;test.TEXT&#125;&lt;/td&gt;
- &lt;/tr&gt;
-<span class="comment">&lt;!-- END test --&gt;</span>
-</pre></div>
-
-<p class="good">this is also correct:</p>
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- BEGIN test --&gt;</span>
-&lt;tr&gt;
- &lt;td&gt;&#123;test.TEXT&#125;&lt;/td&gt;
-&lt;/tr&gt;
-<span class="comment">&lt;!-- END test --&gt;</span>
-</pre></div>
-
-<p>it gives immediate feedback on exactly what is looping - decide which way to use based on the readability.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="templating"></a><h2>4. Templating</h2>
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <a name="templates"></a><h3>4.i. General Templating</h3>
-
-<h4>File naming</h4>
-<p>Firstly templates now take the suffix &quot;.html&quot; rather than &quot;.tpl&quot;. This was done simply to make the lifes of some people easier wrt syntax highlighting, etc.</p>
-
-<h4>Variables</h4>
-<p>All template variables should be named appropriately (using underscores for spaces), language entries should be prefixed with L_, system data with S_, urls with U_, javascript urls with UA_, language to be put in javascript statements with LA_, all other variables should be presented 'as is'.</p>
-
-<p>L_* template variables are automatically tried to be mapped to the corresponding language entry if the code does not set (and therefore overwrite) this variable specifically. For example <code>{L_USERNAME}</code> maps to <code>$user-&gt;lang['USERNAME']</code>. The LA_* template variables are handled within the same way, but properly escaped to be put in javascript code. This should reduce the need to assign loads of new lang vars in Modifications.
-</p>
-
-<h4>Blocks/Loops</h4>
-<p>The basic block level loop remains and takes the form:</p>
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- BEGIN loopname --&gt;</span>
- markup, {loopname&#46;X_YYYYY}, etc&#46;
-<span class="comment">&lt;!-- END loopname --&gt;</span>
-</pre></div>
-
-<p>A bit later loops will be explained further. To not irritate you we will explain conditionals as well as other statements first.</p>
-
-<h4>Including files</h4>
-<p>Something that existed in 2.0.x which no longer exists in 3.0.x is the ability to assign a template to a variable. This was used (for example) to output the jumpbox. Instead (perhaps better, perhaps not but certainly more flexible) we now have INCLUDE. This takes the simple form:</p>
-
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- INCLUDE filename --&gt;</span>
-</pre></div>
-
-<p>You will note in the 3.0 templates the major sources start with <code>&lt;!-- INCLUDE overall_header.html --&gt;</code> or <code>&lt;!-- INCLUDE simple_header.html --&gt;</code>, etc. In 2.0.x control of &quot;which&quot; header to use was defined entirely within the code. In 3.0.x the template designer can output what they like. Note that you can introduce new templates (i.e. other than those in the default set) using this system and include them as you wish ... perhaps useful for a common &quot;menu&quot; bar or some such. No need to modify loads of files as with 2.0.x.</p>
-
-<h4>PHP</h4>
-<p>A contentious decision has seen the ability to include PHP within the template introduced. This is achieved by enclosing the PHP within relevant tags:</p>
-
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- PHP --&gt;</span>
- echo &quot;hello!&quot;;
-<span class="comment">&lt;!-- ENDPHP --&gt;</span>
-</pre></div>
-
-<p>You may also include PHP from an external file using:</p>
-
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- INCLUDEPHP somefile&#46;php --&gt;</span>
-</pre></div>
-
-<p>it will be included and executed inline.<br /><br />A note, it is very much encouraged that template designers do not include PHP. The ability to include raw PHP was introduced primarily to allow end users to include banner code, etc. without modifying multiple files (as with 2.0.x). It was not intended for general use ... hence <!-- w --><a href="http://www.phpbb.com">www.phpbb.com</a><!-- w --> will <strong>not</strong> make available template sets which include PHP. And by default templates will have PHP disabled (the admin will need to specifically activate PHP for a template).</p>
-
-<h4>Conditionals/Control structures</h4>
-<p>The most significant addition to 3.0.x are conditions or control structures, &quot;if something then do this else do that&quot;. The system deployed is very similar to Smarty. This may confuse some people at first but it offers great potential and great flexibility with a little imagination. In their most simple form these constructs take the form:</p>
-
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- IF expr --&gt;</span>
- markup
-<span class="comment">&lt;!-- ENDIF --&gt;</span>
-</pre></div>
-
-<p>expr can take many forms, for example:</p>
-
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- IF loop&#46;S_ROW_COUNT is even --&gt;</span>
- markup
-<span class="comment">&lt;!-- ENDIF --&gt;</span>
-</pre></div>
-
-<p>This will output the markup if the S_ROW_COUNT variable in the current iteration of loop is an even value (i.e. the expr is TRUE). You can use various comparison methods (standard as well as equivalent textual versions noted in square brackets) including (<code>not, or, and, eq, neq, is</code> should be used if possible for better readability):</p>
-
-<div class="codebox"><pre>
-== [eq]
-!= [neq, ne]
-&lt;&gt; (same as !=)
-!== (not equivalent in value and type)
-=== (equivalent in value and type)
-&gt; [gt]
-&lt; [lt]
-&gt;= [gte]
-&lt;= [lte]
-&amp;&amp; [and]
-|| [or]
-% [mod]
-! [not]
-+
--
-*
-/
-,
-&lt;&lt; (bitwise shift left)
-&gt;&gt; (bitwise shift right)
-| (bitwise or)
-^ (bitwise xor)
-&amp; (bitwise and)
-~ (bitwise not)
-is (can be used to join comparison operations)
-</pre></div>
-
-<p>Basic parenthesis can also be used to enforce good old BODMAS rules. Additionally some basic comparison types are defined:</p>
-
-<div class="codebox"><pre>
-even
-odd
-div
-</pre></div>
-
-<p>Beyond the simple use of IF you can also do a sequence of comparisons using the following:</p>
-
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- IF expr1 --&gt;</span>
- markup
-<span class="comment">&lt;!-- ELSEIF expr2 --&gt;</span>
- markup
- &#46;
- &#46;
- &#46;
-<span class="comment">&lt;!-- ELSEIF exprN --&gt;</span>
- markup
-<span class="comment">&lt;!-- ELSE --&gt;</span>
- markup
-<span class="comment">&lt;!-- ENDIF --&gt;</span>
-</pre></div>
-
-<p>Each statement will be tested in turn and the relevant output generated when a match (if a match) is found. It is not necessary to always use ELSEIF, ELSE can be used alone to match &quot;everything else&quot;.<br /><br />So what can you do with all this? Well take for example the colouration of rows in viewforum. In 2.0.x row colours were predefined within the source as either row color1, row color2 or row class1, row class2. In 3.0.x this is moved to the template, it may look a little daunting at first but remember control flows from top to bottom and it's not too difficult:</p>
-
-<div class="codebox"><pre>
-&lt;table&gt;
- <span class="comment">&lt;!-- IF loop&#46;S_ROW_COUNT is even --&gt;</span>
- &lt;tr class=&quot;row1&quot;&gt;
- <span class="comment">&lt;!-- ELSE --&gt;</span>
- &lt;tr class=&quot;row2&quot;&gt;
- <span class="comment">&lt;!-- ENDIF --&gt;</span>
- &lt;td&gt;HELLO!&lt;/td&gt;
-&lt;/tr&gt;
-&lt;/table&gt;
-</pre></div>
-
-<p>This will cause the row cell to be output using class row1 when the row count is even, and class row2 otherwise. The S_ROW_COUNT parameter gets assigned to loops by default. Another example would be the following: </p>
-
-<div class="codebox"><pre>
-&lt;table&gt;
- <span class="comment">&lt;!-- IF loop&#46;S_ROW_COUNT &gt; 10 --&gt;</span>
- &lt;tr bgcolor=&quot;#FF0000&quot;&gt;
- <span class="comment">&lt;!-- ELSEIF loop&#46;S_ROW_COUNT &gt; 5 --&gt;</span>
- &lt;tr bgcolor=&quot;#00FF00&quot;&gt;
- <span class="comment">&lt;!-- ELSEIF loop&#46;S_ROW_COUNT &gt; 2 --&gt;</span>
- &lt;tr bgcolor=&quot;#0000FF&quot;&gt;
- <span class="comment">&lt;!-- ELSE --&gt;</span>
- &lt;tr bgcolor=&quot;#FF00FF&quot;&gt;
- <span class="comment">&lt;!-- ENDIF --&gt;</span>
- &lt;td&gt;hello!&lt;/td&gt;
-&lt;/tr&gt;
-&lt;/table&gt;
-</pre></div>
-
-<p>This will output the row cell in purple for the first two rows, blue for rows 2 to 5, green for rows 5 to 10 and red for remainder. So, you could produce a &quot;nice&quot; gradient effect, for example.<br /><br />What else can you do? Well, you could use IF to do common checks on for example the login state of a user:</p>
-
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- IF S_USER_LOGGED_IN --&gt;</span>
- markup
-<span class="comment">&lt;!-- ENDIF --&gt;</span>
-</pre></div>
-
-<p>This replaces the existing (fudged) method in 2.0.x using a zero length array and BEGIN/END.</p>
-
-<h4>Extended syntax for Blocks/Loops</h4>
-
-<p>Back to our loops - they had been extended with the following additions. Firstly you can set the start and end points of the loop. For example:</p>
-
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- BEGIN loopname(2) --&gt;</span>
- markup
-<span class="comment">&lt;!-- END loopname --&gt;</span>
-</pre></div>
-
-<p>Will start the loop on the third entry (note that indexes start at zero). Extensions of this are:
-<br /><br />
-<code>loopname(2)</code>: Will start the loop on the 3rd entry<br />
-<code>loopname(-2)</code>: Will start the loop two entries from the end<br />
-<code>loopname(3,4)</code>: Will start the loop on the fourth entry and end it on the fifth<br />
-<code>loopname(3,-4)</code>: Will start the loop on the fourth entry and end it four from last<br />
-</p>
-
-<p>A further extension to begin is BEGINELSE:</p>
-
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- BEGIN loop --&gt;</span>
- markup
-<span class="comment">&lt;!-- BEGINELSE --&gt;</span>
- markup
-<span class="comment">&lt;!-- END loop --&gt;</span>
-</pre></div>
-
-<p>This will cause the markup between <code>BEGINELSE</code> and <code>END</code> to be output if the loop contains no values. This is useful for forums with no topics (for example) ... in some ways it replaces &quot;bits of&quot; the existing &quot;switch_&quot; type control (the rest being replaced by conditionals).</p>
-
-<p>Another way of checking if a loop contains values is by prefixing the loops name with a dot:</p>
-
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- IF .loop --&gt;</span>
- <span class="comment">&lt;!-- BEGIN loop --&gt;</span>
- markup
- <span class="comment">&lt;!-- END loop --&gt;</span>
-<span class="comment">&lt;!-- ELSE --&gt;</span>
- markup
-<span class="comment">&lt;!-- ENDIF --&gt;</span>
-</pre></div>
-
-<p>You are even able to check the number of items within a loop by comparing it with values within the IF condition:</p>
-
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- IF .loop &gt; 2 --&gt;</span>
- <span class="comment">&lt;!-- BEGIN loop --&gt;</span>
- markup
- <span class="comment">&lt;!-- END loop --&gt;</span>
-<span class="comment">&lt;!-- ELSE --&gt;</span>
- markup
-<span class="comment">&lt;!-- ENDIF --&gt;</span>
-</pre></div>
-
-<p>Nesting loops cause the conditionals needing prefixed with all loops from the outer one to the inner most. An illustration of this:</p>
-
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- BEGIN firstloop --&gt;</span>
- {firstloop.MY_VARIABLE_FROM_FIRSTLOOP}
-
- <span class="comment">&lt;!-- BEGIN secondloop --&gt;</span>
- {firstloop.secondloop.MY_VARIABLE_FROM_SECONDLOOP}
- <span class="comment">&lt;!-- END secondloop --&gt;</span>
-<span class="comment">&lt;!-- END firstloop --&gt;</span>
-</pre></div>
-
-<p>Sometimes it is necessary to break out of nested loops to be able to call another loop within the current iteration. This sounds a little bit confusing and it is not used very often. The following (rather complex) example shows this quite good - it also shows how you test for the first and last row in a loop (i will explain the example in detail further down):</p>
-
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- BEGIN l_block1 --&gt;</span>
- <span class="comment">&lt;!-- IF l_block1.S_SELECTED --&gt;</span>
- &lt;strong&gt;{l_block1.L_TITLE}&lt;/strong&gt;
- <span class="comment">&lt;!-- IF S_PRIVMSGS --&gt;</span>
-
- <span class="comment">&lt;!-- the ! at the beginning of the loop name forces the loop to be not a nested one of l_block1 --&gt;</span>
- <span class="comment">&lt;!-- BEGIN !folder --&gt;</span>
- <span class="comment">&lt;!-- IF folder.S_FIRST_ROW --&gt;</span>
- &lt;ul class=&quot;nav&quot;&gt;
- <span class="comment">&lt;!-- ENDIF --&gt;</span>
-
- &lt;li&gt;&lt;a href=&quot;{folder.U_FOLDER}&quot;&gt;{folder.FOLDER_NAME}&lt;/a&gt;&lt;/li&gt;
-
- <span class="comment">&lt;!-- IF folder.S_LAST_ROW --&gt;</span>
- &lt;/ul&gt;
- <span class="comment">&lt;!-- ENDIF --&gt;</span>
- <span class="comment">&lt;!-- END !folder --&gt;</span>
-
- <span class="comment">&lt;!-- ENDIF --&gt;</span>
-
- &lt;ul class=&quot;nav&quot;&gt;
- <span class="comment">&lt;!-- BEGIN l_block2 --&gt;</span>
- &lt;li&gt;
- <span class="comment">&lt;!-- IF l_block1.l_block2.S_SELECTED --&gt;</span>
- &lt;strong&gt;{l_block1.l_block2.L_TITLE}&lt;/strong&gt;
- <span class="comment">&lt;!-- ELSE --&gt;</span>
- &lt;a href=&quot;{l_block1.l_block2.U_TITLE}&quot;&gt;{l_block1.l_block2.L_TITLE}&lt;/a&gt;
- <span class="comment">&lt;!-- ENDIF --&gt;</span>
- &lt;/li&gt;
- <span class="comment">&lt;!-- END l_block2 --&gt;</span>
- &lt;/ul&gt;
- <span class="comment">&lt;!-- ELSE --&gt;</span>
- &lt;a class=&quot;nav&quot; href=&quot;{l_block1.U_TITLE}&quot;&gt;{l_block1.L_TITLE}&lt;/a&gt;
- <span class="comment">&lt;!-- ENDIF --&gt;</span>
-<span class="comment">&lt;!-- END l_block1 --&gt;</span>
-</pre></div>
-
-<p>Let us first concentrate on this part of the example:</p>
-
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- BEGIN l_block1 --&gt;</span>
- <span class="comment">&lt;!-- IF l_block1.S_SELECTED --&gt;</span>
- markup
- <span class="comment">&lt;!-- ELSE --&gt;</span>
- &lt;a class=&quot;nav&quot; href=&quot;{l_block1.U_TITLE}&quot;&gt;{l_block1.L_TITLE}&lt;/a&gt;
- <span class="comment">&lt;!-- ENDIF --&gt;</span>
-<span class="comment">&lt;!-- END l_block1 --&gt;</span>
-</pre></div>
-
-<p>Here we open the loop l_block1 and doing some things if the value S_SELECTED within the current loop iteration is true, else we write the blocks link and title. Here, you see <code>{l_block1.L_TITLE}</code> referenced - you remember that L_* variables get automatically assigned the corresponding language entry? This is true, but not within loops. The L_TITLE variable within the loop l_block1 is assigned within the code itself.</p>
-
-<p>Let's have a closer look to the markup:</p>
-
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- BEGIN l_block1 --&gt;</span>
-.
-.
- <span class="comment">&lt;!-- IF S_PRIVMSGS --&gt;</span>
-
- <span class="comment">&lt;!-- BEGIN !folder --&gt;</span>
- <span class="comment">&lt;!-- IF folder.S_FIRST_ROW --&gt;</span>
- &lt;ul class=&quot;nav&quot;&gt;
- <span class="comment">&lt;!-- ENDIF --&gt;</span>
-
- &lt;li&gt;&lt;a href=&quot;{folder.U_FOLDER}&quot;&gt;{folder.FOLDER_NAME}&lt;/a&gt;&lt;/li&gt;
-
- <span class="comment">&lt;!-- IF folder.S_LAST_ROW --&gt;</span>
- &lt;/ul&gt;
- <span class="comment">&lt;!-- ENDIF --&gt;</span>
- <span class="comment">&lt;!-- END !folder --&gt;</span>
-
- <span class="comment">&lt;!-- ENDIF --&gt;</span>
-.
-.
-<span class="comment">&lt;!-- END l_block1 --&gt;</span>
-</pre></div>
-
-<p>The <code>&lt;!-- IF S_PRIVMSGS --&gt;</code> statement clearly checks a global variable and not one within the loop, since the loop is not given here. So, if S_PRIVMSGS is true we execute the shown markup. Now, you see the <code>&lt;!-- BEGIN !folder --&gt;</code> statement. The exclamation mark is responsible for instructing the template engine to iterate through the main loop folder. So, we are now within the loop folder - with <code>&lt;!-- BEGIN folder --&gt;</code> we would have been within the loop <code>l_block1.folder</code> automatically as is the case with l_block2:</p>
-
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- BEGIN l_block1 --&gt;</span>
-.
-.
- &lt;ul class=&quot;nav&quot;&gt;
- <span class="comment">&lt;!-- BEGIN l_block2 --&gt;</span>
- &lt;li&gt;
- <span class="comment">&lt;!-- IF l_block1.l_block2.S_SELECTED --&gt;</span>
- &lt;strong&gt;{l_block1.l_block2.L_TITLE}&lt;/strong&gt;
- <span class="comment">&lt;!-- ELSE --&gt;</span>
- &lt;a href=&quot;{l_block1.l_block2.U_TITLE}&quot;&gt;{l_block1.l_block2.L_TITLE}&lt;/a&gt;
- <span class="comment">&lt;!-- ENDIF --&gt;</span>
- &lt;/li&gt;
- <span class="comment">&lt;!-- END l_block2 --&gt;</span>
- &lt;/ul&gt;
-.
-.
-<span class="comment">&lt;!-- END l_block1 --&gt;</span>
-</pre></div>
-
-<p>You see the difference? The loop l_block2 is a member of the loop l_block1 but the loop folder is a main loop.</p>
-
-<p>Now back to our folder loop:</p>
-
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- IF folder.S_FIRST_ROW --&gt;</span>
- &lt;ul class=&quot;nav&quot;&gt;
-<span class="comment">&lt;!-- ENDIF --&gt;</span>
-
-&lt;li&gt;&lt;a href=&quot;{folder.U_FOLDER}&quot;&gt;{folder.FOLDER_NAME}&lt;/a&gt;&lt;/li&gt;
-
-<span class="comment">&lt;!-- IF folder.S_LAST_ROW --&gt;</span>
- &lt;/ul&gt;
-<span class="comment">&lt;!-- ENDIF --&gt;</span>
-</pre></div>
-
-<p>You may have wondered what the comparison to S_FIRST_ROW and S_LAST_ROW is about. If you haven't guessed already - it is checking for the first iteration of the loop with <code>S_FIRST_ROW</code> and the last iteration with <code>S_LAST_ROW</code>. This can come in handy quite often if you want to open or close design elements, like the above list. Let us imagine a folder loop build with three iterations, it would go this way:</p>
-
-<div class="codebox"><pre>
-&lt;ul class=&quot;nav&quot;&gt; <span class="comment">&lt;!-- written on first iteration --&gt;</span>
- &lt;li&gt;first element&lt;/li&gt; <span class="comment">&lt;!-- written on first iteration --&gt;</span>
- &lt;li&gt;second element&lt;/li&gt; <span class="comment">&lt;!-- written on second iteration --&gt;</span>
- &lt;li&gt;third element&lt;/li&gt; <span class="comment">&lt;!-- written on third iteration --&gt;</span>
-&lt;/ul&gt; <span class="comment">&lt;!-- written on third iteration --&gt;</span>
-</pre></div>
-
-<p>As you can see, all three elements are written down as well as the markup for the first iteration and the last one. Sometimes you want to omit writing the general markup - for example:</p>
-
-<div class="codebox"><pre>
-<span class="comment">&lt;!-- IF folder.S_FIRST_ROW --&gt;</span>
- &lt;ul class=&quot;nav&quot;&gt;
-<span class="comment">&lt;!-- ELSEIF folder.S_LAST_ROW --&gt;</span>
- &lt;/ul&gt;
-<span class="comment">&lt;!-- ELSE --&gt;</span>
- &lt;li&gt;&lt;a href=&quot;{folder.U_FOLDER}&quot;&gt;{folder.FOLDER_NAME}&lt;/a&gt;&lt;/li&gt;
-<span class="comment">&lt;!-- ENDIF --&gt;</span>
-</pre></div>
-
-<p>would result in the following markup:</p>
-
-<div class="codebox"><pre>
-&lt;ul class=&quot;nav&quot;&gt; <span class="comment">&lt;!-- written on first iteration --&gt;</span>
- &lt;li&gt;second element&lt;/li&gt; <span class="comment">&lt;!-- written on second iteration --&gt;</span>
-&lt;/ul&gt; <span class="comment">&lt;!-- written on third iteration --&gt;</span>
-</pre></div>
-
-<p>Just always remember that processing is taking place from up to down.</p>
-
- <h4>Forms</h4>
- <p>If a form is used for a non-trivial operation (i.e. more than a jumpbox), then it should include the <code>{S_FORM_TOKEN}</code> template variable.</p>
- <div class="codebox"><pre>
-&lt;form method=&quot;post&quot; id=&quot;mcp&quot; action=&quot;{U_POST_ACTION}&quot;&gt;
-
- &lt;fieldset class="submit-buttons"&gt;
- &lt;input type=&quot;reset&quot; value=&quot;{L_RESET}&quot; name=&quot;reset&quot; class=&quot;button2&quot; /&gt&nbsp;
- &lt;input type=&quot;submit&quot; name=&quot;action[add_warning]&quot; value=&quot;{L_SUBMIT}&quot; class=&quot;button1&quot; /&gt
- {S_FORM_TOKEN}
- &lt;/fieldset&gt
-&lt;/form&gt
- </pre></div><br />
-
- <a name="inheritance"></a><h3>4.ii. Template Inheritance</h3>
- <p>When basing a new template on an existing one, it is not necessary to provide all template files. By declaring the template to be &quot;<strong>inheriting</strong>&quot; in the template configuration file.</p>
-
- <p>The limitation on this is that the base style has to be installed and complete, meaning that it is not itself inheriting.</p>
-
- <p>The effect of doing so is that the template engine will use the files in the new template where they exist, but fall back to files in the base template otherwise. Declaring a style to be inheriting also causes it to use some of the configuration settings of the base style, notably database storage.</p>
-
- <p>We strongly encourage the use of inheritance for styles based on the bundled styles, as it will ease the update procedure.</p>
-
- <div class="codebox"><pre>
- # General Information about this template
- name = inherits
- copyright = &copy; phpBB Group, 2007
- version = 3.0.3
-
- # Defining a different template bitfield
- template_bitfield = lNg=
-
- # Are we inheriting?
- inherit_from = prosilver
- </pre></div>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-
-
-<a name="charsets"></a><h2>5. Character Sets and Encodings</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-
-
-<h4>What are Unicode, UCS and UTF-8?</h4>
-<p>The <a href="http://en.wikipedia.org/wiki/Universal_Character_Set">Universal Character Set (UCS)</a> described in ISO/IEC 10646 consists of a large amount of characters. Each of them has a unique name and a code point which is an integer number. <a href="http://en.wikipedia.org/wiki/Unicode">Unicode</a> - which is an industry standard - complements the Universal Character Set with further information about the characters' properties and alternative character encodings. More information on Unicode can be found on the <a href="http://www.unicode.org/">Unicode Consortium's website</a>. One of the Unicode encodings is the <a href="http://en.wikipedia.org/wiki/UTF-8">8-bit Unicode Transformation Format (UTF-8)</a>. It encodes characters with up to four bytes aiming for maximum compatibility with the <a href="http://en.wikipedia.org/wiki/ASCII">American Standard Code for Information Interchange</a> which is a 7-bit encoding of a relatively small subset of the UCS.</p>
-
-<h4>phpBB's use of Unicode</h4>
-<p>Unfortunately PHP does not faciliate the use of Unicode prior to version 6. Most functions simply treat strings as sequences of bytes assuming that each character takes up exactly one byte. This behaviour still allows for storing UTF-8 encoded text in PHP strings but many operations on strings have unexpected results. To circumvent this problem we have created some alternative functions to PHP's native string operations which use code points instead of bytes. These functions can be found in <code>/includes/utf/utf_tools.php</code>. They are also covered in the <a href="http://area51.phpbb.com/docs/code/">phpBB3 Sourcecode Documentation</a>. A lot of native PHP functions still work with UTF-8 as long as you stick to certain restrictions. For example <code>explode</code> still works as long as the first and the last character of the delimiter string are ASCII characters.</p>
-
-<p>phpBB only uses the ASCII and the UTF-8 character encodings. Still all Strings are UTF-8 encoded because ASCII is a subset of UTF-8. The only exceptions to this rule are code sections which deal with external systems which use other encodings and character sets. Such external data should be converted to UTF-8 using the <code>utf8_recode()</code> function supplied with phpBB. It supports a variety of other character sets and encodings, a full list can be found below.</p>
-
-<p>With <code>request_var()</code> you can either allow all UCS characters in user input or restrict user input to ASCII characters. This feature is controlled by the function's third parameter called <code>$multibyte</code>. You should allow multibyte characters in posts, PMs, topic titles, forum names, etc. but it's not necessary for internal uses like a <code>$mode</code> variable which should only hold a predefined list of ASCII strings anyway.</p>
-
-<div class="codebox"><pre>
-// an input string containing a multibyte character
-$_REQUEST['multibyte_string'] = 'K&#228;se';
-
-// print request variable as a UTF-8 string allowing multibyte characters
-echo request_var('multibyte_string', '', true);
-// print request variable as ASCII string
-echo request_var('multibyte_string', '');
-</pre></div>
-
-<p>This code snippet will generate the following output:</p>
-
-<div class="codebox"><pre>
-K&#228;se
-K??se
-</pre></div>
-
-<h4>Unicode Normalization</h4>
-
-<p>If you retrieve user input with multibyte characters you should additionally normalize the string using <code>utf8_normalize_nfc()</code> before you work with it. This is necessary to make sure that equal characters can only occur in one particular binary representation. For example the character &#197; can be represented either as <code>U+00C5</code> (LATIN CAPITAL LETTER A WITH RING ABOVE) or as <code>U+212B</code> (ANGSTROM SIGN). phpBB uses Normalization Form Canonical Composition (NFC) for all text. So the correct version of the above example would look like this:</p>
-
-<div class="codebox"><pre>
-$_REQUEST['multibyte_string'] = 'K&#228;se';
-
-// normalize multibyte strings
-echo utf8_normalize_nfc(request_var('multibyte_string', '', true));
-// ASCII strings do not need to be normalized
-echo request_var('multibyte_string', '');
-</pre></div>
-
-<h4>Case Folding</h4>
-
-<p>Case insensitive comparison of strings is no longer possible with <code>strtolower</code> or <code>strtoupper</code> as some characters have multiple lower case or multiple upper case forms depending on their position in a word. The <code>utf8_strtolower</code> and the <code>utf8_strtoupper</code> functions suffer from the same problem so they can only be used to display upper/lower case versions of a string but they cannot be used for case insensitive comparisons either. So instead you should use case folding which gives you a case insensitive version of the string which can be used for case insensitive comparisons. An NFC normalized string can be case folded using <code>utf8_case_fold_nfc()</code>.</p>
-
-<p class="bad">// Bad - The strings might be the same even if strtolower differs</p>
-
-<div class="codebox"><pre>
-if (strtolower($string1) == strtolower($string2))
-{
- echo '$string1 and $string2 are equal or differ in case';
-}
-</pre></div>
-
-<p class="good">// Good - Case folding is really case insensitive</p>
-
-<div class="codebox"><pre>
-if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2))
-{
- echo '$string1 and $string2 are equal or differ in case';
-}
-</pre></div>
-
-<h4>Confusables Detection</h4>
-
-<p>phpBB offers a special method <code>utf8_clean_string</code> which can be used to make sure string identifiers are unique. This method uses Normalization Form Compatibility Composition (NFKC) instead of NFC and replaces similarly looking characters with a particular representative of the equivalence class. This method is currently used for usernames and group names to avoid confusion with similarly looking names.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="translation"></a><h2>6. Translation (<abbr title="Internationalisation">i18n</abbr>/<abbr title="Localisation">L10n</abbr>) Guidelines</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <a name="standardisation"></a><h3>6.i. Standardisation</h3>
-
- <h4>Reason:</h4>
-
- <p>phpBB is one of the most translated open-source projects, with the current stable version being available in over 60 localisations. Whilst the ad hoc approach to the naming of language packs has worked, for phpBB3 and beyond we hope to make this process saner which will allow for better interoperation with current and future web browsers.</p>
-
- <h4>Encoding:</h4>
-
- <p>With phpBB3, the output encoding for the forum in now UTF-8, a Universal Character Encoding by the Unicode Consortium that is by design a superset to US-ASCII and ISO-8859-1. By using one character set which simultaenously supports all scripts which previously would have required different encodings (eg: ISO-8859-1 to ISO-8859-15 (Latin, Greek, Cyrillic, Thai, Hebrew, Arabic); GB2312 (Simplified Chinese); Big5 (Traditional Chinese), EUC-JP (Japanese), EUC-KR (Korean), VISCII (Vietnamese); et cetera), this removes the need to convert between encodings and improves the accessibility of multilingual forums.</p>
-
- <p>The impact is that the language files for phpBB must now also be encoded as UTF-8, with a caveat that the files must <strong>not contain</strong> a <acronym title="Byte-Order-Mark">BOM</acronym> for compatibility reasons with non-Unicode aware versions of PHP. For those with forums using the Latin character set (ie: most European languages), this change is transparent since UTF-8 is superset to US-ASCII and ISO-8859-1.</p>
-
- <h4>Language Tag:</h4>
-
- <p>The <abbr title="Internet Engineering Task Force">IETF</abbr> recently published <a href="http://tools.ietf.org/html/rfc4646">RFC 4646</a> for tags used to identify languages, which in combination with <a href="http://tools.ietf.org/html/rfc4647">RFC 4647</a> obseletes the older <a href="http://tools.ietf.org/html/rfc3066">RFC 3006</a> and older-still <a href="http://tools.ietf.org/html/rfc1766">RFC 1766</a>. <a href="http://tools.ietf.org/html/rfc4646">RFC 4646</a> uses <a href="http://www.loc.gov/standards/iso639-2/php/English_list.php">ISO 639-1/ISO 639-2</a>, <a href="http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html">ISO 3166-1 alpha-2</a>, <a href="http://www.unicode.org/iso15924/iso15924-codes.html">ISO 15924</a> and <a href="http://unstats.un.org/unsd/methods/m49/m49.htm">UN M.49</a> to define a language tag. Each complete tag is composed of subtags which are not case sensitive and can also be empty.</p>
-
- <p>Ordering of the subtags in the case that they are all non-empty is: <code>language</code>-<code>script</code>-<code>region</code>-<code>variant</code>-<code>extension</code>-<code>privateuse</code>. Should any subtag be empty, its corresponding hyphen would also be ommited. Thus, the language tag for English will be <code>en</code> <strong>and not</strong> <code>en-----</code>.</p>
-
- <p>Most language tags consist of a two- or three-letter language subtag (from <a href="http://www.loc.gov/standards/iso639-2/php/English_list.php">ISO 639-1/ISO 639-2</a>). Sometimes, this is followed by a two-letter or three-digit region subtag (from <a href="http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html">ISO 3166-1 alpha-2</a> or <a href="http://unstats.un.org/unsd/methods/m49/m49.htm">UN M.49</a>). Some examples are:</p>
-
- <table summary="Examples of various possible language tags as described by RFC 4646 and RFC 4647">
- <caption>Language tag examples</caption>
- <thead>
- <tr>
- <th scope="col">Language tag</th>
- <th scope="col">Description</th>
- <th scope="col">Component subtags</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><code>en</code></td>
- <td>English</td>
- <td><code>language</code></td>
- </tr>
- <tr>
- <td><code>mas</code></td>
- <td>Masai</td>
- <td><code>language</code></td>
- </tr>
- <tr>
- <td><code>fr-CA</code></td>
- <td>French as used in Canada</td>
- <td><code>language</code>+<code>region</code></td>
- </tr>
- <tr>
- <td><code>en-833</code></td>
- <td>English as used in the Isle of Man</td>
- <td><code>language</code>+<code>region</code></td>
- </tr>
- <tr>
- <td><code>zh-Hans</code></td>
- <td>Chinese written with Simplified script</td>
- <td><code>language</code>+<code>script</code></td>
- </tr>
- <tr>
- <td><code>zh-Hant-HK</code></td>
- <td>Chinese written with Traditional script as used in Hong Kong</td>
- <td><code>language</code>+<code>script</code>+<code>region</code></td>
- </tr>
- <tr>
- <td><code>de-AT-1996</code></td>
- <td>German as used in Austria with 1996 orthography</td>
- <td><code>language</code>+<code>region</code>+<code>variant</code></td>
- </tr>
- </tbody>
- </table>
-
- <p>The ultimate aim of a language tag is to convey the needed <strong>useful distingushing information</strong>, whilst keeping it as <strong>short as possible</strong>. So for example, use <code>en</code>, <code>fr</code> and <code>ja</code> as opposed to <code>en-GB</code>, <code>fr-FR</code> and <code>ja-JP</code>, since we know English, French and Japanese are the native language of Great Britain, France and Japan respectively.</p>
-
- <p>Next is the <a href="http://www.unicode.org/iso15924/iso15924-codes.html">ISO 15924</a> language script code and when one should or shouldn't use it. For example, whilst <code>en-Latn</code> is syntaxically correct for describing English written with Latin script, real world English writing is <strong>more-or-less exclusively in the Latin script</strong>. For such languages like English that are written in a single script, the <a href="http://www.iana.org/assignments/language-subtag-registry"><abbr title="Internet Assigned Numbers Authority">IANA</abbr> Language Subtag Registry</a> has a "Suppress-Script" field meaning the script code <strong>should be ommitted</strong> unless a specific language tag requires a specific script code. Some languages are <strong>written in more than one script</strong> and in such cases, the script code <strong>is encouraged</strong> since an end-user may be able to read their language in one script, but not the other. Some examples are:</p>
-
- <table summary="Examples of using a language subtag in combination with a script subtag">
- <caption>Language subtag + script subtag examples</caption>
- <thead>
- <tr>
- <th scope="col">Language tag</th>
- <th scope="col">Description</th>
- <th scope="col">Component subtags</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><code>en-Brai</code></td>
- <td>English written in Braille script</td>
- <td><code>language</code>+<code>script</code></td>
- </tr>
- <tr>
- <td><code>en-Dsrt</code></td>
- <td>English written in Deseret (Mormon) script</td>
- <td><code>language</code>+<code>script</code></td>
- </tr>
- <tr>
- <td><code>sr-Latn</code></td>
- <td>Serbian written in Latin script</td>
- <td><code>language</code>+<code>script</code></td>
- </tr>
- <tr>
- <td><code>sr-Cyrl</code></td>
- <td>Serbian written in Cyrillic script</td>
- <td><code>language</code>+<code>script</code></td>
- </tr>
- <tr>
- <td><code>mn-Mong</code></td>
- <td>Mongolian written in Mongolian script</td>
- <td><code>language</code>+<code>script</code></td>
- </tr>
- <tr>
- <td><code>mn-Cyrl</code></td>
- <td>Mongolian written in Cyrillic script</td>
- <td><code>language</code>+<code>script</code></td>
- </tr>
- <tr>
- <td><code>mn-Phag</code></td>
- <td>Mongolian written in Phags-pa script</td>
- <td><code>language</code>+<code>script</code></td>
- </tr>
- <tr>
- <td><code>az-Cyrl-AZ</code></td>
- <td>Azerbaijani written in Cyrillic script as used in Azerbaijan</td>
- <td><code>language</code>+<code>script</code>+<code>region</code></td>
- </tr>
- <tr>
- <td><code>az-Latn-AZ</code></td>
- <td>Azerbaijani written in Latin script as used in Azerbaijan</td>
- <td><code>language</code>+<code>script</code>+<code>region</code></td>
- </tr>
- <tr>
- <td><code>az-Arab-IR</code></td>
- <td>Azerbaijani written in Arabic script as used in Iran</td>
- <td><code>language</code>+<code>script</code>+<code>region</code></td>
- </tr>
- </tbody>
- </table>
-
- <p>Usage of the three-digit <a href="http://unstats.un.org/unsd/methods/m49/m49.htm">UN M.49</a> code over the two-letter <a href="http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html">ISO 3166-1 alpha-2</a> code should hapen if a macro-geographical entity is required and/or the <a href="http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html">ISO 3166-1 alpha-2</a> is ambiguous.</p>
-
- <p>Examples of English using marco-geographical regions:</p>
-
- <table summary="Examples for English of ISO 3166-1 alpha-2 vs. UN M.49 code">
- <caption>Coding for English using macro-geographical regions</caption>
- <thead>
- <tr>
- <th scope="col">ISO 639-1/ISO 639-2 + ISO 3166-1 alpha-2</th>
- <th scope="col" colspan="2">ISO 639-1/ISO 639-2 + UN M.49 (Example macro regions)</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><dl><dt><code>en-AU</code></dt><dd>English as used in <strong>Australia</strong></dd></dl></td>
- <td rowspan="2"><dl><dt><code>en-053</code></dt><dd>English as used in <strong>Australia &amp; New Zealand</strong></dd></dl></td>
- <td rowspan="3"><dl><dt><code>en-009</code></dt><dd>English as used in <strong>Oceania</strong></dd></dl></td>
- </tr>
- <tr>
- <td><dl><dt><code>en-NZ</code></dt><dd>English as used in <strong>New Zealand</strong></dd></dl></td>
- </tr>
- <tr>
- <td><dl><dt><code>en-FJ</code></dt><dd>English as used in <strong>Fiji</strong></dd></dl></td>
- <td><dl><dt><code>en-054 </code></dt><dd>English as used in <strong>Melanesia</strong></dd></dl></td>
- </tr>
- </tbody>
- </table>
-
- <p>Examples of Spanish using marco-geographical regions:</p>
-
- <table summary="Examples for Spanish of ISO 3166-1 alpha-2 vs. UN M.49 code">
- <caption>Coding for Spanish macro-geographical regions</caption>
- <thead>
- <tr>
- <th scope="col">ISO 639-1/ISO 639-2 + ISO 3166-1 alpha-2</th>
- <th scope="col" colspan="2">ISO 639-1/ISO 639-2 + UN M.49 (Example macro regions)</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><dl><dt><code>es-PR</code></dt><dd>Spanish as used in <strong>Puerto Rico</strong></dd></dl></td>
- <td rowspan="3"><dl><dt><code>es-419</code></dt><dd>Spanish as used in <strong>Latin America &amp; the Caribbean</strong></dd></dl></td>
- <td rowspan="4"><dl><dt><code>es-019</code></dt><dd>Spanish as used in <strong>the Americas</strong></dd></dl></td>
- </tr>
- <tr>
- <td><dl><dt><code>es-HN</code></dt><dd>Spanish as used in <strong>Honduras</strong></dd></dl></td>
- </tr>
- <tr>
- <td><dl><dt><code>es-AR</code></dt><dd>Spanish as used in <strong>Argentina</strong></dd></dl></td>
- </tr>
- <tr>
- <td><dl><dt><code>es-US</code></dt><dd>Spanish as used in <strong>United States of America</strong></dd></dl></td>
- <td><dl><dt><code>es-021</code></dt><dd>Spanish as used in <strong>North America</strong></dd></dl></td>
- </tr>
- </tbody>
- </table>
-
- <p>Example of where the <a href="http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html">ISO 3166-1 alpha-2</a> is ambiguous and why <a href="http://unstats.un.org/unsd/methods/m49/m49.htm">UN M.49</a> might be preferred:</p>
-
- <table summary="Example where the ISO 3166-1 alpha-2 is ambiguous">
- <caption>Coding for ambiguous ISO 3166-1 alpha-2 regions</caption>
- <thead>
- <tr>
- <th scope="col" colspan="2"><code>CS</code> assignment pre-1994</th>
- <th scope="col" colspan="2"><code>CS</code> assignment post-1994</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td colspan="2">
- <dl>
- <dt><code>CS</code></dt><dd><strong>Czechoslovakia</strong> (ISO 3166-1)</dd>
- <dt><code>200</code></dt><dd><strong>Czechoslovakia</strong> (UN M.49)</dd>
- </dl>
- </td>
- <td colspan="2">
- <dl>
- <dt><code>CS</code></dt><dd><strong>Serbian &amp; Montenegro</strong> (ISO 3166-1)</dd>
- <dt><code>891</code></dt><dd><strong>Serbian &amp; Montenegro</strong> (UN M.49)</dd>
- </dl>
- </td>
- </tr>
- <tr>
- <td>
- <dl>
- <dt><code>CZ</code></dt><dd><strong>Czech Republic</strong> (ISO 3166-1)</dd>
- <dt><code>203</code></dt><dd><strong>Czech Republic</strong> (UN M.49)</dd>
- </dl>
- </td>
- <td>
- <dl>
- <dt><code>SK</code></dt><dd><strong>Slovakia</strong> (ISO 3166-1)</dd>
- <dt><code>703</code></dt><dd><strong>Slovakia</strong> (UN M.49)</dd>
- </dl>
- </td>
- <td>
- <dl>
- <dt><code>RS</code></dt><dd><strong>Serbia</strong> (ISO 3166-1)</dd>
- <dt><code>688</code></dt><dd><strong>Serbia</strong> (UN M.49)</dd>
- </dl>
- </td>
- <td>
- <dl>
- <dt><code>ME</code></dt><dd><strong>Montenegro</strong> (ISO 3166-1)</dd>
- <dt><code>499</code></dt><dd><strong>Montenegro</strong> (UN M.49)</dd>
- </dl>
- </td>
- </tr>
- </tbody>
- </table>
-
- <h4>Macro-languages &amp; Topolects:</h4>
-
- <p><a href="http://tools.ietf.org/html/rfc4646">RFC 4646</a> anticipates features which shall be available in (currently draft) <a href="http://www.sil.org/iso639-3/">ISO 639-3</a> which aims to provide as complete enumeration of languages as possible, including living, extinct, ancient and constructed languages, whether majour, minor or unwritten. A new feature of <a href="http://www.sil.org/iso639-3/">ISO 639-3</a> compared to the previous two revisions is the concept of <a href="http://www.sil.org/iso639-3/macrolanguages.asp">macrolanguages</a> where Arabic and Chinese are two such examples. In such cases, their respective codes of <code>ar</code> and <code>zh</code> is very vague as to which dialect/topolect is used or perhaps some terse classical variant which may be difficult for all but very educated users. For such macrolanguages, it is recommended that the sub-language tag is used as a suffix to the macrolanguage tag, eg:</p>
-
- <table summary="Examples of macrolanguages used with sub-language subtags">
- <caption>Macrolanguage subtag + sub-language subtag examples</caption>
- <thead>
- <tr>
- <th scope="col">Language tag</th>
- <th scope="col">Description</th>
- <th scope="col">Component subtags</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><code>zh-cmn</code></td>
- <td>Mandarin (Putonghau/Guoyu) Chinese</td>
- <td><code>macrolanguage</code>+<code>sublanguage</code></td>
- </tr>
- <tr>
- <td><code>zh-yue</code></td>
- <td>Yue (Cantonese) Chinese</td>
- <td><code>macrolanguage</code>+<code>sublanguage</code></td>
- </tr>
- <tr>
- <td><code>zh-cmn-Hans</code></td>
- <td>Mandarin (Putonghau/Guoyu) Chinese written in Simplified script</td>
- <td><code>macrolanguage</code>+<code>sublanguage</code>+<code>script</code></td>
- </tr>
- <tr>
- <td><code>zh-cmn-Hant</code></td>
- <td>Mandarin (Putonghau/Guoyu) Chinese written in Traditional script</td>
- <td><code>macrolanguage</code>+<code>sublanguage</code>+<code>script</code></td>
- </tr>
- <tr>
- <td><code>zh-nan-Latn-TW</code></td>
- <td>Minnan (Hoklo) Chinese written in Latin script (POJ Romanisation) as used in Taiwan</td>
- <td><code>macrolanguage</code>+<code>sublanguage</code>+<code>script</code>+<code>region</code></td>
- </tr>
- </tbody>
- </table>
-
- <a name="otherconsiderations"></a><h3>6.ii. Other considerations</h3>
-
- <h4>Normalisation of language tags for phpBB:</h4>
-
- <p>For phpBB, the language tags are <strong>not</strong> used in their raw form and instead converted to all lower-case and have the hyphen <code>-</code> replaced with an underscore <code>_</code> where appropriate, with some examples below:</p>
-
- <table summary="Normalisation of language tags for usage in phpBB">
- <caption>Language tag normalisation examples</caption>
- <thead>
- <tr>
- <th scope="col">Raw language tag</th>
- <th scope="col">Description</th>
- <th scope="col">Value of <code>USER_LANG</code><br />in <code>./common.php</code></th>
- <th scope="col">Language pack directory<br />name in <code>/language/</code></th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><code>en</code></td>
- <td>British English</td>
- <td><code>en</code></td>
- <td><code>en</code></td>
- </tr>
- <tr>
- <td><code>de-AT</code></td>
- <td>German as used in Austria</td>
- <td><code>de-at</code></td>
- <td><code>de_at</code></td>
- </tr>
- <tr>
- <td><code>es-419</code></td>
- <td>Spanish as used in Latin America &amp; Caribbean</td>
- <td><code>en-419</code></td>
- <td><code>en_419</code></td>
- </tr>
- <tr>
- <td><code>zh-yue-Hant-HK</code></td>
- <td>Cantonese written in Traditional script as used in Hong Kong</td>
- <td><code>zh-yue-hant-hk</code></td>
- <td><code>zh_yue_hant_hk</code></td>
- </tr>
- </tbody>
- </table>
-
- <h4>How to use <code>iso.txt</code>:</h4>
-
- <p>The <code>iso.txt</code> file is a small UTF-8 encoded plain-text file which consists of three lines:</p>
-
- <ol>
- <li><code>Language's English name</code></li>
- <li><code>Language's local name</code></li>
- <li><code>Authors information</code></li>
- </ol>
-
- <p><code>iso.txt</code> is automatically generated by the language pack submission system on phpBB.com. You don't have to create this file yourself if you plan on releasing your language pack on phpBB.com, but do keep in mind that phpBB itself does require this file to be present.</p>
-
- <p>Because language tags themselves are meant to be machine read, they can be rather obtuse to humans and why descriptive strings as provided by <code>iso.txt</code> are needed. Whilst <code>en-US</code> could be fairly easily deduced to be "English as used in the United States", <code>de-CH</code> is more difficult less one happens to know that <code>de</code> is from "<span lang="de">Deutsch</span>", German for "German" and <code>CH</code> is the abbreviation of the official Latin name for Switzerland, "<span lang="la">Confoederatio Helvetica</span>".</p>
-
- <p>For the English language description, the language name is always first and any additional attributes required to describe the subtags within the language code are then listed in order separated with commas and enclosed within parentheses, eg:</p>
-
- <table summary="English language description examples of iso.txt for usage in phpBB">
- <caption>English language description examples for iso.txt</caption>
- <thead>
- <tr>
- <th scope="col">Raw language tag</th>
- <th scope="col">English description within <code>iso.txt</code></th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><code>en</code></td>
- <td>British English</td>
- </tr>
- <tr>
- <td><code>en-US</code></td>
- <td>English (United States)</td>
- </tr>
- <tr>
- <td><code>en-053</code></td>
- <td>English (Australia &amp; New Zealand)</td>
- </tr>
- <tr>
- <td><code>de</code></td>
- <td>German</td>
- </tr>
- <tr>
- <td><code>de-CH-1996</code></td>
- <td>German (Switzerland, 1996 orthography)</td>
- </tr>
- <tr>
- <td><code>gws-1996</code></td>
- <td>Swiss German (1996 orthography)</td>
- </tr>
- <tr>
- <td><code>zh-cmn-Hans-CN</code></td>
- <td>Mandarin Chinese (Simplified, Mainland China)</td>
- </tr>
- <tr>
- <td><code>zh-yue-Hant-HK</code></td>
- <td>Cantonese Chinese (Traditional, Hong Kong)</td>
- </tr>
- </tbody>
- </table>
-
- <p>For the localised language description, just translate the English version though use whatever appropriate punctuation typical for your own locale, assuming the language uses punctuation at all.</p>
-
- <h4>Unicode bi-directional considerations:</h4>
-
- <p>Because phpBB is now UTF-8, all translators must take into account that certain strings may be shown when the directionality of the document is either opposite to normal or is ambiguous.</p>
-
- <p>The various Unicode control characters for bi-directional text and their HTML enquivalents where appropriate are as follows:</p>
-
- <table summary="Table of the various Unicode bidirectional control characters">
- <caption>Unicode bidirectional control characters &amp; HTML elements/entities</caption>
- <thead>
- <tr>
- <th scope="col">Unicode character<br />abbreviation</th>
- <th scope="col">Unicode<br />code-point</th>
- <th scope="col">Unicode character<br />name</th>
- <th scope="col">Equivalent HTML<br />markup/entity</th>
- <th scope="col">Raw character<br />(enclosed between '')</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><code>LRM</code></td>
- <td><code>U+200E</code></td>
- <td>Left-to-Right Mark</td>
- <td><code>&amp;lrm;</code></td>
- <td>'&#x200E;'</td>
- </tr>
- <tr>
- <td><code>RLM</code></td>
- <td><code>U+200F</code></td>
- <td>Right-to-Left Mark</td>
- <td><code>&amp;rlm;</code></td>
- <td>'&#x200F;'</td>
- </tr>
- <tr>
- <td><code>LRE</code></td>
- <td><code>U+202A</code></td>
- <td>Left-to-Right Embedding</td>
- <td><code>dir=&quot;ltr&quot;</code></td>
- <td>'&#x202A;'</td>
- </tr>
- <tr>
- <td><code>RLE</code></td>
- <td><code>U+202B</code></td>
- <td>Right-to-Left Embedding</td>
- <td><code>dir=&quot;rtl&quot;</code></td>
- <td>'&#x202B;'</td>
- </tr>
- <tr>
- <td><code>PDF</code></td>
- <td><code>U+202C</code></td>
- <td>Pop Directional Formatting</td>
- <td><code>&lt;/bdo&gt;</code></td>
- <td>'&#x202C;'</td>
- </tr>
- <tr>
- <td><code>LRO</code></td>
- <td><code>U+202D</code></td>
- <td>Left-to-Right Override</td>
- <td><code>&lt;bdo dir=&quot;ltr&quot;&gt;</code></td>
- <td>'&#x202D;'</td>
- </tr>
- <tr>
- <td><code>RLO</code></td>
- <td><code>U+202E</code></td>
- <td>Right-to-Left Override</td>
- <td><code>&lt;bdo dir=&quot;rtl&quot;&gt;</code></td>
- <td>'&#x202E;'</td>
- </tr>
- </tbody>
- </table>
-
- <p>For <code>iso.txt</code>, the directionality of the text can be explicitly set using special Unicode characters via any of the three methods provided by left-to-right/right-to-left markers/embeds/overrides, as without them, the ordering of characters will be incorrect, eg:</p>
-
- <table summary="Effect of using Unicode bidirectional control characters within iso.txt">
- <caption>Unicode bidirectional control characters iso.txt</caption>
- <thead>
- <tr>
- <th scope="col">Directionality</th>
- <th scope="col">Raw character view</th>
- <th scope="col">Display of localised<br />description in <code>iso.txt</code></th>
- <th scope="col">Ordering</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td><code>dir=&quot;ltr&quot;</code></td>
- <td>English (Australia &amp; New Zealand)</td>
- <td dir="ltr">English (Australia &amp; New Zealand)</td>
- <td class="good">Correct</td>
- </tr>
- <tr>
- <td><code>dir=&quot;rtl&quot;</code></td>
- <td>English (Australia &amp; New Zealand)</td>
- <td dir="rtl">English (Australia &amp; New Zealand)</td>
- <td class="bad">Incorrect</td>
- </tr>
- <tr>
- <td><code>dir=&quot;rtl&quot;</code> with <code>LRM</code></td>
- <td>English (Australia &amp; New Zealand)<code>U+200E</code></td>
- <td dir="rtl">English (Australia &amp; New Zealand)&#x200E;</td>
- <td class="good">Correct</td>
- </tr>
- <tr>
- <td><code>dir=&quot;rtl&quot;</code> with <code>LRE</code> &amp; <code>PDF</code></td>
- <td><code>U+202A</code>English (Australia &amp; New Zealand)<code>U+202C</code></td>
- <td dir="rtl">&#x202A;English (Australia &amp; New Zealand)&#x202C;</td>
- <td class="good">Correct</td>
- </tr>
- <tr>
- <td><code>dir=&quot;rtl&quot;</code> with <code>LRO</code> &amp; <code>PDF</code></td>
- <td><code>U+202D</code>English (Australia &amp; New Zealand)<code>U+202C</code></td>
- <td dir="rtl">&#x202D;English (Australia &amp; New Zealand)&#x202C;</td>
- <td class="good">Correct</td>
- </tr>
- </tbody>
- </table>
-
- <p>In choosing which of the three methods to use, in the majority of cases, the <code>LRM</code> or <code>RLM</code> to put a &quot;strong&quot; character to fully enclose an ambiguous punctuation character and thus make it inherit the correct directionality is sufficient.</p>
- <p>Within some cases, there may be mixed scripts of a left-to-right and right-to-left direction, so using <code>LRE</code> &amp; <code>RLE</code> with <code>PDF</code> may be more appropriate. Lastly, in very rare instances where directionality must be forced, then use <code>LRO</code> &amp; <code>RLO</code> with <code>PDF</code>.</p>
- <p>For further information on authoring techniques of bi-directional text, please see the W3C tutorial on <a href="http://www.w3.org/International/tutorials/bidi-xhtml/">authoring techniques for XHTML pages with bi-directional text</a>.</p>
-
- <h4>Working with placeholders:</h4>
-
- <p>As phpBB is translated into languages with different ordering rules to that of English, it is possible to show specific values in any order deemed appropriate. Take for example the extremely simple &quot;Page <em>X</em> of <em>Y</em>&quot;, whilst in English this could just be coded as:</p>
-
- <div class="codebox"><pre>
- ...
-'PAGE_OF' =&gt; 'Page %s of %s',
- /* Just grabbing the replacements as they
- come and hope they are in the right order */
- ...
- </pre></div>
-
- <p>&hellip; a clearer way to show explicit replacement ordering is to do:</p>
-
- <div class="codebox"><pre>
- ...
-'PAGE_OF' =&gt; 'Page %1$s of %2$s',
- /* Explicit ordering of the replacements,
- even if they are the same order as English */
- ...
- </pre></div>
-
- <p>Why bother at all? Because some languages, the string transliterated back to English might read something like:</p>
-
- <div class="codebox"><pre>
- ...
-'PAGE_OF' =&gt; 'Total of %2$s pages, currently on page %1$s',
- /* Explicit ordering of the replacements,
- reversed compared to English as the total comes first */
- ...
- </pre></div>
-
- <a name="writingstyle"></a><h3>6.iii. Writing Style</h3>
-
- <h4>Miscellaneous tips &amp; hints:</h4>
-
- <p>As the language files are PHP files, where the various strings for phpBB are stored within an array which in turn are used for display within an HTML page, rules of syntax for both must be considered. Potentially problematic characters are: <code>'</code> (straight quote/apostrophe), <code>&quot;</code> (straight double quote), <code>&lt;</code> (less-than sign), <code>&gt;</code> (greater-than sign) and <code>&amp;</code> (ampersand).</p>
-
- <p class="bad">// Bad - The un-escapsed straight-quote/apostrophe will throw a PHP parse error</p>
-
- <div class="codebox"><pre>
- ...
-'CONV_ERROR_NO_AVATAR_PATH'
- =&gt; 'Note to developer: you must specify $convertor['avatar_path'] to use %s.',
- ...
- </pre></div>
-
- <p class="good">// Good - Literal straight quotes should be escaped with a backslash, ie: \</p>
-
- <div class="codebox"><pre>
- ...
-'CONV_ERROR_NO_AVATAR_PATH'
- =&gt; 'Note to developer: you must specify $convertor[\'avatar_path\'] to use %s.',
- ...
- </pre></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 class="bad">// Bad - The un-escapsed straight-quote/apostrophe will throw a PHP parse error</p>
-
- <div class="codebox"><pre>
- ...
-'USE_PERMISSIONS' =&gt; 'Test out user's permissions',
- ...
- </pre></div>
-
- <p class="good">// Okay - However, non-programmers wouldn't type "user\'s" automatically</p>
-
- <div class="codebox"><pre>
- ...
-'USE_PERMISSIONS' =&gt; 'Test out user\'s permissions',
- ...
- </pre></div>
-
- <p class="good">// Best - Use the Unicode Right-Single-Quotation-Mark character</p>
-
- <div class="codebox"><pre>
- ...
-'USE_PERMISSIONS' =&gt; 'Test out user&rsquo;s permissions',
- ...
- </pre></div>
-
- <p>The <code>&quot;</code> (straight double quote), <code>&lt;</code> (less-than sign) and <code>&gt;</code> (greater-than sign) characters can all be used as displayed glyphs or as part of HTML markup, for example:</p>
-
- <p class="bad">// Bad - Invalid HTML, as segments not part of elements are not entitised</p>
-
- <div class="codebox"><pre>
- ...
-'FOO_BAR' =&gt; 'PHP version &lt; 4.3.3.&lt;br /&gt;
- Visit &quot;Downloads&quot; at &lt;a href=&quot;http://www.php.net/&quot;&gt;www.php.net&lt;/a&gt;.',
- ...
- </pre></div>
-
- <p class="good">// Okay - No more invalid HTML, but &quot;&amp;quot;&quot; is rather clumsy</p>
-
- <div class="codebox"><pre>
- ...
-'FOO_BAR' =&gt; 'PHP version &amp;lt; 4.3.3.&lt;br /&gt;
- Visit &amp;quot;Downloads&amp;quot; at &lt;a href=&quot;http://www.php.net/&quot;&gt;www.php.net&lt;/a&gt;.',
- ...
- </pre></div>
-
- <p class="good">// Best - No more invalid HTML, and usage of correct typographical quotation marks</p>
-
- <div class="codebox"><pre>
- ...
-'FOO_BAR' =&gt; 'PHP version &amp;lt; 4.3.3.&lt;br /&gt;
- Visit &ldquo;Downloads&rdquo; at &lt;a href=&quot;http://www.php.net/&quot;&gt;www.php.net&lt;/a&gt;.',
- ...
- </pre></div>
-
- <p>Lastly, the <code>&amp;</code> (ampersand) must always be entitised regardless of where it is used:</p>
-
- <p class="bad">// Bad - Invalid HTML, none of the ampersands are entitised</p>
-
- <div class="codebox"><pre>
- ...
-'FOO_BAR' =&gt; '&lt;a href=&quot;http://somedomain.tld/?foo=1&amp;bar=2&quot;&gt;Foo &amp; Bar&lt;/a&gt;.',
- ...
- </pre></div>
-
- <p class="good">// Good - Valid HTML, amperands are correctly entitised in all cases</p>
-
- <div class="codebox"><pre>
- ...
-'FOO_BAR' =&gt; '&lt;a href=&quot;http://somedomain.tld/?foo=1&amp;amp;bar=2&quot;&gt;Foo &amp;amp; Bar&lt;/a&gt;.',
- ...
- </pre></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>
-
- <h4>Spelling, punctuation, grammar, et cetera:</h4>
-
- <p>The default language pack bundled with phpBB is <strong>British English</strong> using <a href="http://www.cambridge.org/">Cambridge University Press</a> spelling and is assigned the language code <code>en</code>. The style and tone of writing tends towards formal and translations <strong>should</strong> emulate this style, at least for the variant using the most compact language code. Less formal translations or those with colloquialisms <strong>must</strong> be denoted as such via either an <code>extension</code> or <code>privateuse</code> tag within its language code.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="changes"></a><h2>7. Guidelines Changelog</h2>
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<h3>Revision 8596+</h3>
-
-<ul>
- <li>Removed sql_build_array('MULTI_INSERT'... statements.</li>
- <li>Added sql_multi_insert() explanation.</li>
-</ul>
-
-<h3>Revision 1.31</h3>
-
-<ul>
- <li>Added add_form_key and check_form_key. </li>
-</ul>
-
-<h3>Revision 1.24</h3>
-
-<ul>
- <li>Added <a href="#translation">5. Character Sets and Encodings</a> section to explain the recommended treatment of strings in phpBB.</li>
-</ul>
-
-<h3>Revision 1.16</h3>
-
-<ul>
- <li>Added <a href="#translation">6. Translation (<abbr title="Internationalisation">i18n</abbr>/<abbr title="Localisation">L10n</abbr>) Guidelines</a> section to explain expected format and authoring considerations for language packs that are to be created for phpBB.</li>
-</ul>
-
-<h3>Revision 1.11-1.15</h3>
-
-<ul>
- <li>Various document formatting, spelling, punctuation, grammar bugs.</li>
-</ul>
-
-<h3>Revision 1.9-1.10</h3>
-
-<ul>
- <li>Added sql_query_limit to <a href="#sql">2.iii. SQL/SQL Layout</a>.</li>
-</ul>
-
-<h3>Revision 1.8</h3>
-
-<ul>
- <li>Some adjustements to wordings</li>
- <li>Updated paragraph <a href="#locations">1.iii. File Locations</a> to reflect recent changes</li>
- <li>Extended paragraph <a href="#codelayout">2.ii. Code Layout</a>.</li>
- <li>Added sql_in_set and sql_build_query explanation to <a href="#sql">2.iii. SQL/SQL Layout</a>.</li>
- <li>Updated paragraph <a href="#styling">3. Styling</a>.</li>
- <li>Updated paragraph <a href="#templating">4. Templating</a> to explain loop checking, loop breaking and other changes we recently made.</li>
-</ul>
-
-<h3>Revision 1.5</h3>
-
-<ul>
- <li>Changed General function usage paragraph in <a href="#general">2.v. General Guidelines</a></li>
-</ul>
-
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
-<a name="disclaimer"></a><h2>8. Copyright and disclaimer</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
-<!-- END DOCUMENT -->
-
- <div id="page-footer">
- <div class="version"> $Id$ </div>
- </div>
-</div></div>
-
-<div>
- <a id="bottom" name="bottom" accesskey="z"></a>
-</div>
-
-</body>
-</html>
diff --git a/phpBB/docs/corners_left.gif b/phpBB/docs/corners_left.gif
deleted file mode 100644
index 206e50368d..0000000000
--- a/phpBB/docs/corners_left.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/docs/corners_left.png b/phpBB/docs/corners_left.png
deleted file mode 100644
index 256bde3daa..0000000000
--- a/phpBB/docs/corners_left.png
+++ /dev/null
Binary files differ
diff --git a/phpBB/docs/corners_right.gif b/phpBB/docs/corners_right.gif
deleted file mode 100644
index 0ba66d50b2..0000000000
--- a/phpBB/docs/corners_right.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/docs/corners_right.png b/phpBB/docs/corners_right.png
deleted file mode 100644
index df41823b4c..0000000000
--- a/phpBB/docs/corners_right.png
+++ /dev/null
Binary files differ
diff --git a/phpBB/docs/hook_system.html b/phpBB/docs/hook_system.html
deleted file mode 100644
index 78e3014adb..0000000000
--- a/phpBB/docs/hook_system.html
+++ /dev/null
@@ -1,859 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
-<head>
-
-<meta http-equiv="content-type" content="text/html; charset=utf-8" />
-<meta http-equiv="content-style-type" content="text/css" />
-<meta http-equiv="content-language" content="en" />
-<meta http-equiv="imagetoolbar" content="no" />
-<meta name="resource-type" content="document" />
-<meta name="distribution" content="global" />
-<meta name="copyright" content="2007 phpBB Group" />
-<meta name="keywords" content="" />
-<meta name="description" content="Hook System explanation" />
-<title>phpBB3 &bull; Hook System</title>
-
-<style type="text/css">
-/* <![CDATA[ */
-
-/*
- The original "prosilver" theme for phpBB3
- Created by subBlue design :: http://www.subBlue.com
-*/
-
-* { margin: 0; padding: 0; }
-
-html { font-size: 100%; height: 100%; margin-bottom: 1px; }
-
-body {
- font-family: Verdana, Helvetica, Arial, sans-serif;
- color: #828282;
- background-color: #FFFFFF;
- font-size: 12px;
- margin: 0;
- padding: 12px 0;
-}
-
-img { border-width: 0; }
-
-p {
- line-height: 1.3em;
- font-size: 1.1em;
- margin-bottom: 1.5em;
-}
-
-hr {
- border: 0 none #FFFFFF;
- border-top: 1px solid #CCCCCC;
- height: 1px;
- margin: 5px 0;
- display: block;
- clear: both;
-}
-
-html, body {
- color: #536482;
- background-color: #FFFFFF;
-}
-
-#doc-description h1 {
- font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
- margin-right: 200px;
- color: #FFFFFF;
- margin-top: 15px;
- font-weight: bold;
- font-size: 2em;
- color: #fff;
-}
-
-h1 {
- font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
- font-weight: normal;
- color: #000;
- font-size: 2em;
- margin: 0.8em 0 0.2em 0;
-}
-
-h2 {
- font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
- font-weight: normal;
- color: #28313F;
- font-size: 1.5em;
- margin: 0.8em 0 0.2em 0;
-}
-
-h3 {
- font-family: Arial, Helvetica, sans-serif;
- font-weight: bold;
- border-bottom: 1px solid #CCCCCC;
- margin-bottom: 3px;
- padding-bottom: 2px;
- font-size: 1.05em;
- color: #115098;
- margin-top: 20px;
-}
-
-.good { color: green; }
-.bad { color: red; }
-
-.version {
- margin-top: 20px;
- text-align: left;
- font-size: 70%;
- color: #006600;
- border-top: 1px solid #ccc;
-}
-
-code {
- color: #006600;
- font-weight: normal;
- font-family: 'Courier New', monospace;
- border-color: #D1D7DC;
- border-width: 1px;
- border-style: solid;
- background-color: #FAFAFA;
-}
-
-#wrap {
- padding: 0 20px;
- min-width: 650px;
-}
-
-#simple-wrap {
- padding: 6px 10px;
-}
-
-#page-body {
- margin: 4px 0;
- clear: both;
-}
-
-#page-footer {
- clear: both;
-}
-
-#logo {
- float: left;
- width: auto;
- padding: 10px 13px 0 10px;
-}
-
-a#logo:hover {
- text-decoration: none;
-}
-
-#doc-description {
- float: left;
- width: 70%;
-}
-
-#doc-description h1 {
- margin-right: 0;
-}
-
-.headerbar {
- background: #ebebeb none repeat-x 0 0;
- color: #FFFFFF;
- margin-bottom: 4px;
- padding: 0 5px;
-}
-
-span.corners-top, span.corners-bottom, span.corners-top span, span.corners-bottom span {
- font-size: 1px;
- line-height: 1px;
- display: block;
- height: 5px;
- background-repeat: no-repeat;
-}
-
-span.corners-top {
- background-image: none;
- background-position: 0 0;
- margin: 0 -5px;
-}
-
-span.corners-top span {
- background-image: none;
- background-position: 100% 0;
-}
-
-span.corners-bottom {
- background-image: none;
- background-position: 0 100%;
- margin: 0 -5px;
- clear: both;
-}
-
-span.corners-bottom span {
- background-image: none;
- background-position: 100% 100%;
-}
-
-.paragraph {
- padding: 0 10px;
- margin-bottom: 4px;
- background-repeat: no-repeat;
- background-position: 100% 0;
- background-color: #ECF3F7;
-}
-
-.paragraph:target .content {
- color: #000000;
-}
-
-.paragraph:target h3 a {
- color: #000000;
-}
-
-.content {
- color: #333333;
-}
-
-.content h2, .panel h2 {
- color: #115098;
- border-bottom-color: #CCCCCC;
-}
-
-a:link { color: #898989; text-decoration: none; }
-a:visited { color: #898989; text-decoration: none; }
-a:hover { color: #d3d3d3; text-decoration: underline; }
-a:active { color: #d2d2d2; text-decoration: none; }
-
-hr {
- border-color: #FFFFFF;
- border-top-color: #CCCCCC;
-}
-
-.menu {
- background-color: #cadceb;
-}
-
-.headerbar {
- background-color: #12A3EB;
- background-image: url("bg_header.gif");
- color: #FFFFFF;
-}
-
-.panel {
- background-color: #ECF1F3;
- color: #28313F;
-}
-
-
-span.corners-top {
- background-image: url("corners_left.png");
-}
-
-span.corners-top span {
- background-image: url("corners_right.png");
-}
-
-span.corners-bottom {
- background-image: url("corners_left.png");
-}
-
-span.corners-bottom span {
- background-image: url("corners_right.png");
-}
-
-.error {
- color: #BC2A4D;
-}
-
-a:link { color: #105289; }
-a:visited { color: #105289; }
-a:hover { color: #D31141; }
-a:active { color: #368AD2; }
-
-.paragraph span.corners-top, .paragraph span.corners-bottom {
- margin: 0 -10px;
-}
-
-.content {
- padding: 0;
- line-height: 1.48em;
- color: #333333;
-}
-
-.content h2, .panel h2 {
- color: #115098;
- border-bottom-color: #CCCCCC;
-}
-
-.notice {
- border-top-color: #CCCCCC;
-}
-
-.codebox {
- padding: 3px;
- background-color: #FFFFFF;
- border: 1px solid #C9D2D8;
- font-size: 1em;
- margin-bottom: 10px;
- display: block;
- font: 0.9em Monaco, "Andale Mono","Courier New", Courier, mono;
- line-height: 1.3em;
-}
-
-* html hr { margin: 0; }
-* html span.corners-top, * html span.corners-bottom { background-image: url("corners_left.gif"); }
-* html span.corners-top span, * html span.corners-bottom span { background-image: url("corners_right.gif"); }
-
-.back2top {
- clear: both;
- height: 11px;
- text-align: right;
-}
-
-.content ol {
- margin-left: 25px;
-}
-
-/* ]]> */
-</style>
-
-</head>
-
-<body id="phpbb" class="section-docs">
-
-<div id="wrap">
- <a id="top" name="top" accesskey="t"></a>
- <div id="page-header">
- <div class="headerbar">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div id="doc-description">
- <a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a>
- <h1>Hook System</h1>
- <p>This is an explanation of how to use the phpBB3 hook system.</p>
- <p style="display: none;"><a href="#start_here">Skip</a></p>
- </div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
- </div>
-
- <a name="start_here"></a>
-
- <div id="page-body">
-
- <h1>Hook System</h1>
-
- <div class="paragraph menu">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <ol>
- <li><a href="#intro">Introduction</a></li>
- <li><a href="#use">Allow hooks in functions/methods</a></li>
- <li><a href="#register">Registering hooks</a></li>
- <li><a href="#return">Result returning</a></li>
- <li><a href="#embed">Embedding your hook files/classes/methods</a></li>
- <li><a href="#disclaimer">Copyright and disclaimer</a></li>
- </ol>
-
- </div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <hr />
-
- <a name="intro"></a><h2>1. Introduction</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<h3>What is it?</h3>
-
-<p>The hook system allows applicaton and mod developers to hook into phpBB's or their own functions.</p>
-
-<h3>Pre-defined hookable phpBB3 functions</h3>
-
-<p>In phpBB3 there are four functions you are able to hook into with your custom functions:</p>
-
-<p><code>phpbb_user_session_handler();</code> which is called within user::setup after the session and the user object is correctly initialized.<br />
-<code>append_sid($url, $params = false, $is_amp = true, $session_id = false);</code> which is called for building urls (appending the session id)<br />
-<code>$template-&gt;display($handle, $include_once = true);</code> which is called directly before outputting the (not-yet-compiled) template.<br />
-<code>exit_handler();</code> which is called at the very end of phpBB3's execution.</p>
-
-<p>There are also valid external constants you may want to use if you embed phpBB3 into your application:</p>
-
-<div class="codebox"><pre>
-PHPBB_MSG_HANDLER (define own message handler)
-PHPBB_DB_NEW_LINK (overwrite new_link parameter for sql_connect)
-PHPBB_ROOT_PATH (define own PHPBB_ROOT_PATH)
-PHPBB_ADMIN_PATH (define own PHPBB_ADMIN_PATH)
-</pre></div>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <a name="use"></a><h2>2. Allow hooks in functions/methods</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<p>The following examples explain how phpBB3 utilize the in-build hook system. You will be more interested in registering your hooks, but showing you this may help you understand the system better along the way.</p>
-
-<p>First of all, this is how a function need to be layed out if you want to allow it to be hookable...</p>
-
-<div class="codebox"><pre>
-function my_own_function($my_first_parameter, $my_second_parameter)
-{
- global $phpbb_hook;
-
- if ($phpbb_hook-&gt;call_hook(__FUNCTION__, $my_first_parameter, $my_second_parameter))
- {
- if ($phpbb_hook-&gt;hook_return(__FUNCTION__))
- {
- return $phpbb_hook-&gt;hook_return_result(__FUNCTION__);
- }
- }
-
- [YOUR CODE HERE]
-}
-</pre></div>
-
-<p>Above, the call_hook function should always be mapping your function call... in regard to the number of parameters passed.</p>
-
-<p>This is how you could make a method being hookable...</p>
-
-<div class="codebox"><pre>
-class my_hookable_object
-{
- function hook_me($my_first_parameter, $my_second_parameter)
- {
- global $phpbb_hook;
-
- if ($phpbb_hook-&gt;call_hook(array(__CLASS__, __FUNCTION__), $my_first_parameter, $my_second_parameter))
- {
- if ($phpbb_hook-&gt;hook_return(array(__CLASS__, __FUNCTION__)))
- {
- return $phpbb_hook-&gt;hook_return_result(array(__CLASS__, __FUNCTION__));
- }
- }
-
- [YOUR CODE HERE]
- }
-}
-</pre></div>
-
-<p>The only difference about calling it is the way you define the first parameter. For a function it is only <code>__FUNCTION__</code>, for a method it is <code>array(__CLASS__, __FUNCTION__)</code>. In PHP4 __CLASS__ is always returning the class in lowercase.</p>
-
-<p>Now, in phpBB there are some pre-defined hooks available, but how do you make your own hookable function available (and therefore allowing others to hook into it)? For this, there is the add_hook() method:</p>
-
-<div class="codebox"><pre>
-// Adding your own hookable function:
-$phpbb_hook-&gt;add_hook('my_own_function');
-
-// Adding your own hookable method:
-$phpbb_hook-&gt;add_hook(array('my_hookable_object', 'hook_me'));
-</pre></div>
-
-<p>You are also able to remove the possibility of hooking a function/method by calling <code>$phpbb_hook-&gt;remove_hook()</code> with the same parameters as add_hook().<br />
-This comes in handy if you want to force some hooks not to be called - at all.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <a name="register"></a><h2>3. Registering hooks</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <h3>Registering hooks</h3>
-
-<p>Now to actually defining your functions which should be called. For this we take the append_sid() function as an example (this function is able to be hooked by default). We create two classes, one being static and a function:</p>
-
-<div class="codebox"><pre>
-class my_append_sid_class
-{
- // Our functions
- function my_append_sid(&amp;$hook, $url, $params = false, $is_amp = true, $session_id = false)
- {
- // Get possible previous results
- $result = $hook-&gt;previous_hook_result('append_sid');
-
- return $result['result'] . '&lt;br /&gt;And i was the second one.';
- }
-}
-
-// Yet another class :o
-class my_second_append_sid_class
-{
- function my_append_sid(&amp;$hook, $url, $params = false, $is_amp = true, $session_id = false)
- {
- // Get possible previous results
- $result = $hook-&gt;previous_hook_result('append_sid');
-
- echo $result['result'] . '&lt;br /&gt;I was called as the third one.';
- }
-}
-
-// And a normal function
-function my_append_sid(&amp;$hook, $url, $params = false, $is_amp = true, $session_id = false)
-{
- // Get possible previous results
- $result = $hook-&gt;previous_hook_result('append_sid');
-
- return 'I was called as the first one';
-}
-
-// Initializing the second class
-$my_second_append_sid_class = new my_second_append_sid_class();
-</pre></div>
-
-<p>Make sure you add the same parameters to your function as is defined for the hookable function with one exception: The first variable is always <code>&amp;$hook</code>... this is the hook object itself you are able to operate on.</p>
-
-<p>Now we register the hooks one by one with the <code>$phpbb_hook-&gt;register()</code> method:</p>
-
-<div class="codebox"><pre>
-// Now, we register our append_sid &quot;replacements&quot; in a stacked way...
-// Registering the function (this is called first)
-$phpbb_hook-&gt;register('append_sid', 'my_append_sid');
-
-// Registering the first class
-$phpbb_hook-&gt;register('append_sid', array('my_append_sid_class', 'my_append_sid'));
-$phpbb_hook-&gt;register('append_sid', array(&amp;$my_second_append_sid_class, 'my_append_sid'));
-</pre></div>
-
-<p>With this you are even able to make your own functions that are already hooked itself being hooked again...</p>
-
-<div class="codebox"><pre>
-// Registering hook, which will be called
-$phpbb_hook-&gt;register('append_sid', 'my_own_append_sid');
-
-// Add hook to our called hook function
-$phpbb_hook-&gt;add_hook('my_own_append_sid');
-
-// Register added hook
-$phpbb_hook-&gt;register('my_own_append_sid', 'also_my_own_append_sid');
-</pre></div>
-
- <h3>Special treatment/chains</h3>
-
- <p>The <code>register</code> method is able to take a third argument to specify a special 'chain' mode. The valid modes are <code>first</code>, <code>last</code> and <code>standalone</code></p>
-
- <p><code>$phpbb_hook-&gt;register('append_sid', 'my_own_append_sid', 'first')</code> would make sure that the function is called in the beginning of the chain. It is possible that more than one function is called within the first block - here the FIFO principle is used.</p>
-
- <p><code>$phpbb_hook-&gt;register('append_sid', 'my_own_append_sid', 'last')</code> would make sure that the function is called at the very end of the chain. It is possible that more than one function is called within the last block - here the FIFO principle is used.</p>
-
- <p><code>$phpbb_hook-&gt;register('append_sid', 'my_own_append_sid', 'standalone')</code> makes sure only the defined function is called. All other functions are removed from the chain and no other functions are added to it later on. If two applications try to trigger the standalone mode a PHP notice will be printed and the second function being discarded.</p>
-
- <h3>Only allowing hooks for some objects</h3>
-
- <p>Because the hook system is not able to differate between initialized objects and only operate on the class, you need to solve this on the code level.</p>
-
- <p>One possibility would be to use a property:</p>
-
- <div class="codebox"><pre>
-class my_hookable_object
-{
- function blabla()
- {
- }
-}
-
-class my_hookable_object2 extends my_hookable_object
-{
- var $call_hook = true;
-
- function hook_me($my_first_parameter, $my_second_parameter)
- {
- if ($this-&gt;call_hook)
- {
- global $phpbb_hook;
-
- if ($phpbb_hook-&gt;call_hook(array(__CLASS__, __FUNCTION__), $my_first_parameter, $my_second_parameter))
- {
- if ($phpbb_hook-&gt;hook_return(array(__CLASS__, __FUNCTION__)))
- {
- return $phpbb_hook-&gt;hook_return_result(array(__CLASS__, __FUNCTION__));
- }
- }
- }
-
- return 'not hooked';
- }
-}
-
-function hooking(&amp;$hook, $first, $second)
-{
- return 'hooked';
-}
-
-$first_object = new my_hookable_object2();
-$second_object = new my_hookable_object2();
-
-$phpbb_hook-&gt;add_hook(array('my_hookable_object2', 'hook_me'));
-
-$phpbb_hook-&gt;register(array('my_hookable_object2', 'hook_me'), 'hooking');
-
-// Do not call the hook for $first_object
-$first_object-&gt;call_hook = false;
-
-echo $first_object-&gt;hook_me('first', 'second') . '&lt;br /&gt;';
-echo $second_object-&gt;hook_me('first', 'second') . '&lt;br /&gt;';
-</pre></div>
-
-<p>OUTPUT:</p>
-
-<div class="codebox"><pre>
-not hooked
-hooked
-</pre></div>
-
- <p>A different possibility would be using a function variable (which could be left out on passing the function variables to the hook):</p>
-
- <div class="codebox"><pre>
-class my_hookable_object
-{
- function blabla()
- {
- }
-}
-
-class my_hookable_object2 extends my_hookable_object
-{
- function hook_me($my_first_parameter, $my_second_parameter, $hook_me = true)
- {
- if ($hook_me)
- {
- global $phpbb_hook;
-
- if ($phpbb_hook-&gt;call_hook(array(__CLASS__, __FUNCTION__), $my_first_parameter, $my_second_parameter))
- {
- if ($phpbb_hook-&gt;hook_return(array(__CLASS__, __FUNCTION__)))
- {
- return $phpbb_hook-&gt;hook_return_result(array(__CLASS__, __FUNCTION__));
- }
- }
- }
-
- return 'not hooked';
- }
-}
-
-function hooking(&amp;$hook, $first, $second)
-{
- return 'hooked';
-}
-
-$first_object = new my_hookable_object2();
-$second_object = new my_hookable_object2();
-
-$phpbb_hook-&gt;add_hook(array('my_hookable_object2', 'hook_me'));
-
-$phpbb_hook-&gt;register(array('my_hookable_object2', 'hook_me'), 'hooking');
-
-echo $first_object-&gt;hook_me('first', 'second', false) . '&lt;br /&gt;';
-echo $second_object-&gt;hook_me('first', 'second') . '&lt;br /&gt;';
- </pre></div>
-
- <p>OUTPUT:</p>
-
- <div class="codebox"><pre>
-not hooked
-hooked
- </pre></div>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <a name="return"></a><h2>4. Result returning</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<p>Generally, the distinction has to be made if a function returns the result obtained from the called function or continue the execution. Based on the needs of the application this may differ. Therefore, the function returns the results only if the called hook function is returning a result.</p>
-
-<h3>Case 1 - Returning the result</h3>
-
-<p>Imagine the following function supporting hooks:</p>
-
-<div class="codebox"><pre>
-function append_sid($url, $params = false, $is_amp = true, $session_id = false)
-{
- global $_SID, $_EXTRA_URL, $phpbb_hook;
-
- // Developers using the hook function need to globalise the $_SID and $_EXTRA_URL on their own and also handle it appropiatly.
- // They could mimick most of what is within this function
- if ($phpbb_hook-&gt;call_hook(__FUNCTION__, $url, $params, $is_amp, $session_id))
- {
- if ($phpbb_hook-&gt;hook_return(__FUNCTION__))
- {
- return $phpbb_hook-&gt;hook_return_result(__FUNCTION__);
- }
- }
-
- [...]
-}
-</pre></div>
-
-<p>Now, the following function is yours. Since you return a value, the append_sid() function itself is returning it as is:</p>
-
-<div class="codebox"><pre>
-// The function called
-function my_append_sid(&amp;$hook, $url, $params = false, $is_amp = true, $session_id = false)
-{
- // Get possible previous results
- $result = $hook-&gt;previous_hook_result('append_sid');
-
- return 'Since i return something the append_sid() function will return my result.';
-}
-</pre></div>
-
-<p>To be able to get the results returned from functions higher in the change the <code>previous_hook_result()</code> method should always be used, it returns an <code>array('result' => [your result])</code> construct.</p>
-
-<h3>Case 2 - Not Returning any result</h3>
-
-<p>Sometimes applications want to return nothing and therefore force the underlying function to continue it's execution:</p>
-
-<div class="codebox"><pre>
-function append_sid($url, $params = false, $is_amp = true, $session_id = false)
-{
- global $_SID, $_EXTRA_URL, $phpbb_hook;
-
- // Developers using the hook function need to globalise the $_SID and $_EXTRA_URL on their own and also handle it appropiatly.
- // They could mimick most of what is within this function
- if ($phpbb_hook-&gt;call_hook(__FUNCTION__, $url, $params, $is_amp, $session_id))
- {
- if ($phpbb_hook-&gt;hook_return(__FUNCTION__))
- {
- return $phpbb_hook-&gt;hook_return_result(__FUNCTION__);
- }
- }
-
- [...]
-}
-
-// The function called
-function my_append_sid(&amp;$hook, $url, $params = false, $is_amp = true, $session_id = false)
-{
- // Get possible previous results
- $result = $hook-&gt;previous_hook_result('append_sid');
-
- [...]
-
- // I only rewrite some variables, but return nothing. Therefore, the append_sid() function will not return my (non)result.
-}
-</pre></div>
-
-<p>Please Note: The decision to return or not return is solely made of the very last function call within the hook chain. An example:</p>
-
-<div class="codebox"><pre>
-// The function called
-function my_append_sid(&amp;$hook, $url, $params = false, $is_amp = true, $session_id = false)
-{
- // Get possible previous results
- $result = $hook-&gt;previous_hook_result('append_sid');
-
- // $result is not filled
-
- return 'FILLED';
-}
-
-// This function is registered too and gets executed after my_append_sid()
-function my_own_append_sid(&amp;$hook, $url, $params = false, $is_amp = true, $session_id = false)
-{
- $result = $hook->previous_hook_result('append_sid');
-
- // $result is actually filled with $result['result'] = 'FILLED'
- // But i return nothing, therefore append_sid() continues it's execution.
-}
-
-// The way both functions are registered.
-$phpbb_hook->register('append_sid', 'my_append_sid');
-$phpbb_hook->register('append_sid', 'my_own_append_sid');
-</pre></div>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <a name="embed"></a><h2>5. Embedding your hook files/classes/methods</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
-<p>There are basically two methods you are able to choose from:</p>
-
-<p>1) Add a file to includes/hooks/. The file need to be prefixed by <code>hook_</code>. This file is included within common.php, you are able to register your hooks, include other files or functions, etc. It is advised to only include other files if needed (within a function call for example).</p>
-
-<p>Please be aware that you need to purge your cache within the ACP to make your newly placed file available to phpBB3.</p>
-
-<p>2) The second method is meant for those wanting to wrap phpBB3 without placing a custom file to the hooks directory. This is mostly done by including phpBB's files within the application file. To be able to register your hooks you need to create a function within your application:</p>
-
-<div class="codebox"><pre>
-// My function which gets executed within the hooks constuctor
-function phpbb_hook_register(&amp;$hook)
-{
- $hook-&gt;register('append_sid', 'my_append_sid');
-}
-
-[...]
-</pre></div>
-
-<p>You should get the idea. ;)</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <a name="disclaimer"></a><h2>6. Copyright and disclaimer</h2>
-
- <div class="paragraph">
- <div class="inner"><span class="corners-top"><span></span></span>
-
- <div class="content">
-
- <p>This application is opensource software released under the <a href="http://opensource.org/licenses/gpl-license.php">GPL</a>. Please see source code and the docs directory for more details. This package and its contents are Copyright (c) 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>, All Rights Reserved.</p>
-
- </div>
-
- <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div>
-
- <span class="corners-bottom"><span></span></span></div>
- </div>
-
- <div id="page-footer">
- <div class="version">$Id$</div>
- </div>
-</div></div>
-
-<div>
- <a id="bottom" name="bottom" accesskey="z"></a>
-</div>
-
-</body>
-</html>
diff --git a/phpBB/docs/site_logo.gif b/phpBB/docs/site_logo.gif
deleted file mode 100644
index 909114c377..0000000000
--- a/phpBB/docs/site_logo.gif
+++ /dev/null
Binary files differ
diff --git a/phpBB/docs/stylesheet.css b/phpBB/docs/stylesheet.css
deleted file mode 100644
index 6b8f5994c0..0000000000
--- a/phpBB/docs/stylesheet.css
+++ /dev/null
@@ -1,352 +0,0 @@
-/*
- The original "prosilver" theme for phpBB3
- Created by subBlue design :: http://www.subBlue.com
-*/
-
-* { margin: 0; padding: 0; }
-
-html { font-size: 100%; height: 100%; margin-bottom: 1px; }
-
-body {
- font-family: Verdana, Helvetica, Arial, sans-serif;
- color: #828282;
- background-color: #FFFFFF;
- font-size: 12px;
- margin: 0;
- padding: 12px 0;
-}
-
-img { border-width: 0; }
-
-p {
- line-height: 1.3em;
- font-size: 1.1em;
- margin-bottom: 1.5em;
-}
-
-hr {
- border: 0 none #FFFFFF;
- border-top: 1px solid #CCCCCC;
- height: 1px;
- margin: 5px 0;
- display: block;
- clear: both;
-}
-
-html, body {
- color: #536482;
- background-color: #FFFFFF;
-}
-
-#doc-description h1 {
- font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
- margin-right: 200px;
- color: #FFFFFF;
- margin-top: 15px;
- font-weight: bold;
- font-size: 2em;
- color: #fff;
-}
-
-h1 {
- font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
- font-weight: normal;
- color: #000;
- font-size: 2em;
- margin: 0.8em 0 0.2em 0;
-}
-
-h2 {
- font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
- font-weight: normal;
- color: #28313F;
- font-size: 1.5em;
- margin: 0.8em 0 0.2em 0;
-}
-
-h3 {
- font-family: Arial, Helvetica, sans-serif;
- font-weight: bold;
- border-bottom: 1px solid #CCCCCC;
- margin-bottom: 3px;
- padding-bottom: 2px;
- font-size: 1.05em;
- color: #115098;
- margin-top: 20px;
-}
-
-h4 {
- font-family: Arial, Helvetica, sans-serif;
- font-weight: bold;
- margin-bottom: 3px;
- padding-bottom: 2px;
- font-size: 1.05em;
- color: #115098;
- margin-top: 20px;
-}
-
-.good { color: green; }
-.bad { color: red; }
-
-.version {
- margin-top: 20px;
- text-align: left;
- font-size: 70%;
- color: #006600;
- border-top: 1px solid #ccc;
-}
-
-code {
- color: #006600;
- font-weight: normal;
- font-family: 'Courier New', monospace;
- border-color: #D1D7DC;
- border-width: 1px;
- border-style: solid;
- background-color: #FAFAFA;
-}
-
-#wrap {
- padding: 0 20px;
- min-width: 650px;
-}
-
-#simple-wrap {
- padding: 6px 10px;
-}
-
-#page-body {
- margin: 4px 0;
- clear: both;
-}
-
-#page-footer {
- clear: both;
-}
-
-#logo {
- float: left;
- width: auto;
- padding: 10px 13px 0 10px;
-}
-
-a#logo:hover {
- text-decoration: none;
-}
-
-#doc-description {
- float: left;
- width: 70%;
-}
-
-#doc-description h1 {
- margin-right: 0;
-}
-
-.headerbar {
- background: #ebebeb none repeat-x 0 0;
- color: #FFFFFF;
- margin-bottom: 4px;
- padding: 0 5px;
-}
-
-span.corners-top, span.corners-bottom, span.corners-top span, span.corners-bottom span {
- font-size: 1px;
- line-height: 1px;
- display: block;
- height: 5px;
- background-repeat: no-repeat;
-}
-
-span.corners-top {
- background-image: none;
- background-position: 0 0;
- margin: 0 -5px;
-}
-
-span.corners-top span {
- background-image: none;
- background-position: 100% 0;
-}
-
-span.corners-bottom {
- background-image: none;
- background-position: 0 100%;
- margin: 0 -5px;
- clear: both;
-}
-
-span.corners-bottom span {
- background-image: none;
- background-position: 100% 100%;
-}
-
-.paragraph {
- padding: 0 10px;
- margin-bottom: 4px;
- background-repeat: no-repeat;
- background-position: 100% 0;
- background-color: #ECF3F7;
-}
-
-.paragraph:target .content {
- color: #000000;
-}
-
-.paragraph:target h3 a {
- color: #000000;
-}
-
-.content {
- color: #333333;
-}
-
-.content h2, .panel h2 {
- color: #115098;
- border-bottom-color: #CCCCCC;
-}
-
-a:link { color: #898989; text-decoration: none; }
-a:visited { color: #898989; text-decoration: none; }
-a:hover { color: #d3d3d3; text-decoration: underline; }
-a:active { color: #d2d2d2; text-decoration: none; }
-
-hr {
- border-color: #FFFFFF;
- border-top-color: #CCCCCC;
-}
-
-.menu {
- background-color: #cadceb;
-}
-
-.headerbar {
- background-color: #12A3EB;
- background-image: url("bg_header.gif");
- color: #FFFFFF;
-}
-
-.panel {
- background-color: #ECF1F3;
- color: #28313F;
-}
-
-
-span.corners-top {
- background-image: url("corners_left.png");
-}
-
-span.corners-top span {
- background-image: url("corners_right.png");
-}
-
-span.corners-bottom {
- background-image: url("corners_left.png");
-}
-
-span.corners-bottom span {
- background-image: url("corners_right.png");
-}
-
-.error {
- color: #BC2A4D;
-}
-
-a:link { color: #105289; }
-a:visited { color: #105289; }
-a:hover { color: #D31141; }
-a:active { color: #368AD2; }
-
-.paragraph span.corners-top, .paragraph span.corners-bottom {
- margin: 0 -10px;
-}
-
-.content {
- padding: 0;
- line-height: 1.48em;
- color: #333333;
-}
-
-.content h2, .panel h2 {
- color: #115098;
- border-bottom-color: #CCCCCC;
-}
-
-.notice {
- border-top-color: #CCCCCC;
-}
-
-.codebox {
- padding: 3px;
- background-color: #FFFFFF;
- border: 1px solid #C9D2D8;
- font-size: 1em;
- margin-bottom: 10px;
- display: block;
- font: 0.9em Monaco, "Andale Mono","Courier New", Courier, mono;
- line-height: 1.3em;
-}
-
-* html hr { margin: 0; }
-* html span.corners-top, * html span.corners-bottom { background-image: url("corners_left.gif"); }
-* html span.corners-top span, * html span.corners-bottom span { background-image: url("corners_right.gif"); }
-
-.back2top {
- clear: both;
- height: 11px;
- text-align: right;
-}
-
-.content ol, .content ul {
- margin-left: 25px;
- margin-top: 0;
-}
-
-.content ul + p, .content ul + div {
- margin-top: 20px;
-}
-
-.comment {
- color: green;
-}
-
-.indent {
- margin-left: 20px;
-}
-
-.paragraph table {
- font-size: 8pt;
- border-collapse: collapse;
- border: 1px solid #cfcfcf;
- margin-bottom: 20px;
-}
-
-.paragraph table caption {
- display: none;
-}
-
-.paragraph table thead {
- background-color: #cadceb;
- color: #000;
-}
-
-.paragraph table td, .paragraph table th {
- border: 1px solid #006699;
- padding: 0.5em;
- background-color: #e1ebf2;
-}
-
-.paragraph table th {
- background-color: #cadceb;
-}
-
-.paragraph table td dl {
- margin: 0;
- padding: 0;
-}
-
-.paragraph table td dl dt {
- float: left;
- clear: both;
- margin-right: 1em;
-}