1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Copy 3.0.x branch to trunk

git-svn-id: file:///svn/phpbb/trunk@10211 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen
2009-10-04 18:14:59 +00:00
parent bf8ac19eaa
commit 2e17e448de
992 changed files with 245793 additions and 0 deletions

76
phpBB/docs/AUTHORS Normal file
View File

@@ -0,0 +1,76 @@
/**
*
* phpBB3 <20> 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.)
bantu (Andreas Fischer)
DavidMJ (David M.)
dhn (Dominik Dr<44>scher)
kellanved (Henry Sudhof)
naderman (Nils Adermann)
Terrafrost (Jim Wigginton)
ToonArmy (Chris Smith)
Contributions by : leviatan21 (Gabriel Vazquez)
nickvergessen (Joas Schilling)
Raimon (Raimon Meuldijk)
rxu (Ruslan Uzdenov)
Xore (Robert Hetzler)
-- 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]
Vic D'Elfant (Vic D'Elfant) [04/2007 - 04/2009]
-- 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

1126
phpBB/docs/CHANGELOG.html Normal file

File diff suppressed because it is too large Load Diff

281
phpBB/docs/COPYING Normal file
View File

@@ -0,0 +1,281 @@
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

352
phpBB/docs/FAQ.html Normal file
View File

@@ -0,0 +1,352 @@
<!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>

448
phpBB/docs/INSTALL.html Normal file
View File

@@ -0,0 +1,448 @@
<!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 3.23 or above (MySQLi supported)</li>
<li>PostgreSQL 7.3+</li>
<li>SQLite 2.8.2+</li>
<li>Firebird 2.1+</li>
<li>MS SQL Server 2000 or above (directly or via ODBC)</li>
<li>Oracle</li>
</ul>
</li>
<li><strong>PHP 4.3.3+ (>=4.3.3, >4.4.x, >5.x.x, >6.0-dev (compatible))</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.5</samp> you should select the phpBB-3.0.5_to_3.0.6.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 recommended 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.5 you need the phpBB-3.0.5_to_3.0.6.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 recommended 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>

363
phpBB/docs/README.html Normal file
View File

@@ -0,0 +1,363 @@
<!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>

253
phpBB/docs/auth_api.html Normal file
View File

@@ -0,0 +1,253 @@
<!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>

BIN
phpBB/docs/bg_header.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 690 B

File diff suppressed because it is too large Load Diff

BIN
phpBB/docs/corners_left.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 B

BIN
phpBB/docs/corners_left.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

887
phpBB/docs/hook_system.html Normal file
View File

@@ -0,0 +1,887 @@
<!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 (overwrite message handler)
PHPBB_DB_NEW_LINK (overwrite new_link parameter for sql_connect)
PHPBB_ROOT_PATH (overwrite $phpbb_root_path)
PHPBB_ADMIN_PATH (overwrite $phpbb_admin_path)
PHPBB_USE_BOARD_URL_PATH (use generate_board_url() for image paths instead of $phpbb_root_path)
</pre></div>
<p>If the <code>PHPBB_USE_BOARD_URL_PATH</code> constant is set to true, phpBB uses generate_board_url() (this will return the boards url with the script path included) on all instances where web-accessible images are loaded. The exact locations are:</p>
<ul>
<li>/includes/session.php - user::img()</li>
<li>/includes/functions_content.php - smiley_text()</li>
</ul>
<p>Path locations for the following template variables are affected by this too:</p>
<ul>
<li>{T_THEME_PATH} - styles/xxx/theme</li>
<li>{T_TEMPLATE_PATH} - styles/xxx/template</li>
<li>{T_SUPER_TEMPLATE_PATH} - styles/xxx/template</li>
<li>{T_IMAGESET_PATH} - styles/xxx/imageset</li>
<li>{T_IMAGESET_LANG_PATH} - styles/xxx/imageset/yy</li>
<li>{T_IMAGES_PATH} - images/</li>
<li>{T_SMILIES_PATH} - $config['smilies_path']/</li>
<li>{T_AVATAR_PATH} - $config['avatar_path']/</li>
<li>{T_AVATAR_GALLERY_PATH} - $config['avatar_gallery_path']/</li>
<li>{T_ICONS_PATH} - $config['icons_path']/</li>
<li>{T_RANKS_PATH} - $config['ranks_path']/</li>
<li>{T_UPLOAD_PATH} - $config['upload_path']/</li>
<li>{T_STYLESHEET_LINK} - styles/xxx/theme/stylesheet.css (or link to style.php if css is parsed dynamically)</li>
<li>New template variable {BOARD_URL} for the board url + script path.</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>
<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>

BIN
phpBB/docs/site_logo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

352
phpBB/docs/stylesheet.css Normal file
View File

@@ -0,0 +1,352 @@
/*
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;
}