diff options
Diffstat (limited to 'phpBB/docs')
-rw-r--r-- | phpBB/docs/AUTHORS | 5 | ||||
-rw-r--r-- | phpBB/docs/CHANGELOG.html | 19 | ||||
-rw-r--r-- | phpBB/docs/FAQ.html | 19 | ||||
-rw-r--r-- | phpBB/docs/INSTALL.html | 45 | ||||
-rw-r--r-- | phpBB/docs/README.html | 50 | ||||
-rw-r--r-- | phpBB/docs/auth_api.html | 15 | ||||
-rw-r--r-- | phpBB/docs/coding-guidelines.html | 310 | ||||
-rw-r--r-- | phpBB/docs/events.md | 233 | ||||
-rw-r--r-- | phpBB/docs/hook_system.html | 22 | ||||
-rw-r--r-- | phpBB/docs/lighttpd.sample.conf | 10 | ||||
-rw-r--r-- | phpBB/docs/nginx.sample.conf | 8 | ||||
-rw-r--r-- | phpBB/docs/sphinx.sample.conf | 100 |
12 files changed, 666 insertions, 170 deletions
diff --git a/phpBB/docs/AUTHORS b/phpBB/docs/AUTHORS index 5995bd2ab4..512723b0d4 100644 --- a/phpBB/docs/AUTHORS +++ b/phpBB/docs/AUTHORS @@ -77,9 +77,14 @@ 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/ +jQuery (c) 2011, John Resig. http://jquery.com/ +Sphinx Technologies Inc (c) 2001-2012 Andrew Aksyonoff, http://sphinxsearch.com/ 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 +MIT licenced: +Symfony2 (c) 2004-2011 Fabien Potencier, http://symfony.com/ + diff --git a/phpBB/docs/CHANGELOG.html b/phpBB/docs/CHANGELOG.html index f2d5ddc212..bb42736daf 100644 --- a/phpBB/docs/CHANGELOG.html +++ b/phpBB/docs/CHANGELOG.html @@ -1,16 +1,9 @@ -<!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"> +<!DOCTYPE html> +<html dir="ltr" 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="phpBB Group" /> +<meta charset="utf-8"> <meta name="keywords" content="" /> -<meta name="description" content="phpBB 3.0.x Changelog" /> +<meta name="description" content="phpBB 3.1.x Changelog" /> <title>phpBB3 • Changelog</title> <link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" /> @@ -27,7 +20,7 @@ <div id="doc-description"> <a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a> - <h1>phpBB 3.0.x Changelog</h1> + <h1>phpBB 3.1.x Changelog</h1> <p style="display: none;"><a href="#start_here">Skip</a></p> </div> @@ -41,7 +34,7 @@ <!-- BEGIN DOCUMENT --> -<p>This is a non-exhaustive (but still near complete) changelog for phpBB 3.0.x including release candidate versions. Our thanks to all those people who've contributed bug reports and code fixes.</p> +<p>This is a non-exhaustive (but still near complete) changelog for phpBB 3.1.x including release candidate versions. Our thanks to all those people who've contributed bug reports and code fixes.</p> <h1>Changelog</h1> diff --git a/phpBB/docs/FAQ.html b/phpBB/docs/FAQ.html index 9b6440ab21..a76b6be72a 100644 --- a/phpBB/docs/FAQ.html +++ b/phpBB/docs/FAQ.html @@ -1,16 +1,9 @@ -<!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"> +<!DOCTYPE html> +<html dir="ltr" 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="phpBB Group" /> +<meta charset="utf-8"> <meta name="keywords" content="" /> -<meta name="description" content="phpBB 3.0.x frequently asked questions" /> +<meta name="description" content="phpBB 3.1.x frequently asked questions" /> <title>phpBB3 • FAQ</title> <link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" /> @@ -27,8 +20,8 @@ <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> + <h1>phpBB 3.1.x FAQ</h1> + <p>phpBB 3.1.x frequently asked questions</p> <p style="display: none;"><a href="#start_here">Skip</a></p> </div> diff --git a/phpBB/docs/INSTALL.html b/phpBB/docs/INSTALL.html index 3fa0597fc8..937568cf10 100644 --- a/phpBB/docs/INSTALL.html +++ b/phpBB/docs/INSTALL.html @@ -1,16 +1,9 @@ -<!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"> +<!DOCTYPE html> +<html dir="ltr" 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="phpBB Group" /> +<meta charset="utf-8"> <meta name="keywords" content="" /> -<meta name="description" content="phpBB 3.0.x Installation, updating and conversion informations" /> +<meta name="description" content="phpBB 3.1.x Installation, updating and conversion informations" /> <title>phpBB3 • Install</title> <link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" /> @@ -27,8 +20,8 @@ <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> + <h1>phpBB 3.1.x Install</h1> + <p>phpBB 3.1.x Installation, updating and conversion informations</p> <p style="display: none;"><a href="#start_here">Skip</a></p> </div> @@ -59,7 +52,7 @@ <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> + <li><a href="#update">Updating from stable releases of phpBB 3.1.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</a></li> @@ -68,7 +61,7 @@ <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> + <li><a href="#convert">Conversion from phpBB 2.0.x to phpBB 3.1.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> @@ -132,21 +125,25 @@ <div class="content"> - <p>phpBB 3.0.x has a few requirements which must be met before you are able to install and use it.</p> + <p>phpBB 3.1.x 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>PostgreSQL 8.3+</li> <li>SQLite 2.8.2+ (SQLite 3 is not supported)</li> <li>Firebird 2.1+</li> <li>MS SQL Server 2000 or above (directly or via ODBC or the native adapter)</li> <li>Oracle</li> </ul> </li> - <li><strong>PHP (>=4.3.3, >=4.4.0, >=5.0.0)</strong> with support for the database you intend to use.</li> + <li><strong>PHP 5.3.3+</strong> with support for the database you intend to use.</li> + <li>The following PHP modules are required:</li> + <ul> + <li>json</li> + </ul> <li>getimagesize() function must be enabled.</li> <li>Presence of the following modules within PHP will provide access to additional features, but they are not required: <ul> @@ -159,7 +156,7 @@ </li> </ul> - <p>If your server or hosting account does not meet the requirements above then you will be unable to install phpBB 3.0.x.</p> + <p>If your server or hosting account does not meet the requirements above then you will be unable to install phpBB 3.1.x.</p> </div> @@ -250,7 +247,7 @@ <hr /> - <a name="update"></a><h2>4. Updating from stable releases of phpBB 3.0.x</h2> + <a name="update"></a><h2>4. Updating from stable releases of phpBB 3.1.x</h2> <div class="paragraph"> <div class="inner"><span class="corners-top"><span></span></span> @@ -275,7 +272,7 @@ <p>This package is meant for those wanting to only replace the files that were changed between a previous version and the latest version.</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 <strong>3.0.11</strong> you should select the appropriate <code>phpBB-3.0.12-files.zip/tar.bz2</code> file.</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 <strong>3.1.0</strong> you should select the appropriate <code>phpBB-3.1.1-files.zip/tar.bz2</code> file.</p> <p>The directory structure has been preserved, enabling you (if you wish) to simply upload the uncompressed 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 modifications (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> @@ -287,7 +284,7 @@ <p>The patch file is one solution for those with many Modifications (MODs) or other changes and do not want to re-add them back to all the changed files. 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 <strong>3.0.11</strong>, you need the <code>phpBB-3.0.12-patch.zip/tar.bz2</code> file. Place the correct patch in the parent directory containing the phpBB core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <code>patch -cl -d [PHPBB DIRECTORY] -p1 < [PATCH NAME]</code> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB, 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>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 <strong>3.1.0</strong>, you need the <code>phpBB-3.1.1-patch.zip/tar.bz2</code> file. Place the correct patch in the parent directory containing the phpBB core files (i.e. index.php, viewforum.php, etc.). With this done you should run the following command: <code>patch -cl -d [PHPBB DIRECTORY] -p1 < [PATCH NAME]</code> (where PHPBB DIRECTORY is the directory name your phpBB Installation resides in, for example phpBB, 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</a> package to replace the files which failed to patch. Please note that you will need to manually re-add any 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> @@ -297,7 +294,7 @@ <p>This update method is the recommended method for updating. This package detects changed files automatically and merges in changes if needed.</p> - <p>The automatic update package will update the board from a given version to the latest version. A number of automatic update files are available, and you should choose the one that corresponds to the version of the board that you are currently running. For example, if your current version is <strong>3.0.11</strong>, you need the <code>phpBB-3.0.11_to_3.0.12.zip/tar.bz2</code> file.</p> + <p>The automatic update package will update the board from a given version to the latest version. A number of automatic update files are available, and you should choose the one that corresponds to the version of the board that you are currently running. For example, if your current version is <strong>3.0.10</strong>, you need the <code>phpBB-3.0.10_to_3.0.11.zip/tar.bz2</code> file.</p> <p>To perform the update, either follow the instructions from the <strong>Administration Control Panel->System</strong> 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> @@ -326,7 +323,7 @@ <hr /> - <a name="convert"></a><h2>5. Conversion from phpBB 2.0.x to phpBB 3.0.x</h2> + <a name="convert"></a><h2>5. Conversion from phpBB 2.0.x to phpBB 3.1.x</h2> <div class="paragraph"> <div class="inner"><span class="corners-top"><span></span></span> diff --git a/phpBB/docs/README.html b/phpBB/docs/README.html index 89f573de04..899ca64fb5 100644 --- a/phpBB/docs/README.html +++ b/phpBB/docs/README.html @@ -1,16 +1,9 @@ -<!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"> +<!DOCTYPE html> +<html dir="ltr" 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="phpBB Group" /> +<meta charset="utf-8"> <meta name="keywords" content="" /> -<meta name="description" content="phpBB 3.0.x Readme" /> +<meta name="description" content="phpBB 3.1.x Readme" /> <title>phpBB3 • Readme</title> <link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" /> @@ -27,7 +20,7 @@ <div id="doc-description"> <a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a> - <h1>phpBB 3.0.x Readme</h1> + <h1>phpBB 3.1.x Readme</h1> <p style="display: none;"><a href="#start_here">Skip</a></p> </div> @@ -91,25 +84,26 @@ <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 in this directory. If you are intending on converting from a phpBB 2.0.x or 3.0.x installation we highly recommend that you backup any existing data before proceeding!</p> - <p>Installation, update and conversion instructions can be found in the <a href="INSTALL.html">INSTALL</a> document in this directory. If you are intending on converting from a phpBB 2.0.x installation we highly recommend that you backup any existing data before proceeding!</p> - - <p>Users of phpBB3 Beta versions cannot directly update.</p> + <p>Users of phpBB 3.0 and 3.1 Beta versions cannot directly update.</p> <p>Please note that we don'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> + <li>Updates from phpBB 3.0 Beta versions to phpBB 3.0 RC1 and higher</li> + <li>Updates from phpBB 3.1 Beta versions to phpBB 3.1 RC1 and higher</li> + <li>Conversions from phpBB 2.0.x to phpBB 3.0 or 3.1 Beta versions</li> + <li>phpBB 3.0 or 3.1 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>Updates from phpBB 3.0 RC1 and 3.1 RC1 to the latest version</li> <li>Note: if using the <em>Automatic Update Package</em>, updates are supported from phpBB 3.0.2 onward. To update a pre-3.0.2 installation, first update to 3.0.2 and then update to the current version.</li> <li>Conversions from phpBB 2.0.x to the latest version</li> - <li>New installations of phpBB3 - only the latest released version</li> + <li>New installations of phpBB 3.0.x - only the latest released version</li> + <li>New installations of phpBB 3.1.x - only the latest released version</li> </ul> </div> @@ -226,13 +220,13 @@ <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.1. Please do not post questions asking when 3.1 will be available, no release date has been set.</p> + <p>This is a stable release of phpBB. The 3.1.x line is feature frozen, with point releases principally including fixes for bugs and security issues. Feature alterations and minor feature additions may be done if deemed absolutely required. The next major release will be phpBB 3.2 which is currently under development. Please do not post questions asking when 3.2 will be available, no release date has been set.</p> <p>Those interested in the development of phpBB should keep an eye on the development 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 the development forums should <strong>NOT</strong> be used to seek 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> + <p>Please note that the development forums should <strong>NOT</strong> be used to seek support for phpBB, the main community forums are the place for this.</p> </div> @@ -266,16 +260,16 @@ <p>If you do post a new bug (i.e. one that isn't already listed in the bug tracker) first make sure that 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> + <li>Your server type/version, e.g. Apache 2.2.3, IIS 7, Sambar, etc.</li> + <li>PHP version and mode of operation, e.g. PHP 5.3.3 as a module, PHP 5.4.0 running as CGI, etc.</li> + <li>DB type/version, e.g. MySQL 5.0.77, PostgreSQL 9.0.6, MSSQL Server 2000 SP1, etc.</li> </ul> <p>The relevant database type/version is listed within the administration control panel.</p> <p>Please be as detailed as you can in your report, and if possible, list the steps required to duplicate the problem. If you have a patch that fixes the issue, please attach it to the ticket or submit a pull request to our repository <a href="https://github.com/phpbb/phpbb3">on GitHub</a>.</p> - <p>If you create a patch, it is very much appreciated (but not required) if you follow the phpBB coding guidelines. Please note that the coding guidelines are somewhat different between different versions of phpBB. For phpBB 3.0.x the coding guidelines may be found here: <a href="http://area51.phpbb.com/docs/30x/coding-guidelines.html">http://area51.phpbb.com/docs/30x/coding-guidelines.html</a></p> + <p>If you create a patch, it is very much appreciated (but not required) if you follow the phpBB coding guidelines. Please note that the coding guidelines are somewhat different between different versions of phpBB. For phpBB 3.1.x the coding guidelines may be found here: <a href="http://area51.phpbb.com/docs/31x/coding-guidelines.html">http://area51.phpbb.com/docs/31x/coding-guidelines.html</a></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> @@ -325,11 +319,11 @@ <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. The minimum version that will be required for phpBB 3.1 is PHP 5.3.3.</p> + <p>phpBB 3.1.x takes advantage of new features added in PHP 5.3. We recommend that you upgrade to the latest stable release of PHP5 to run phpBB. The minimum version required is PHP 5.3.3.</p> <p>Please remember that running any application on a development (unstable, e.g. a beta release) version of PHP can lead to strange/unexpected results which may appear to be bugs in the application. Therefore, we recommend you upgrade to the newest stable version of PHP before running phpBB3. If you are running a development 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 2 and Firebird. Versions of PHP used range from 4.3.3 to 5.4.x without problem. </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 8.x, Oracle 8, SQLite 2 and Firebird. Versions of PHP used range from 5.3.x to 5.4.x without problem.</p> <a name="phpsec"></a><h3>7.i. Notice on PHP security issues</h3> diff --git a/phpBB/docs/auth_api.html b/phpBB/docs/auth_api.html index eb168e26a6..f45ea5e5c8 100644 --- a/phpBB/docs/auth_api.html +++ b/phpBB/docs/auth_api.html @@ -1,14 +1,7 @@ -<!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"> +<!DOCTYPE html> +<html dir="ltr" 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="phpBB Group" /> +<meta charset="utf-8"> <meta name="keywords" content="" /> <meta name="description" content="This is an explanation of how to use the phpBB auth/acl API" /> <title>phpBB3 • Auth API</title> @@ -93,7 +86,7 @@ <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(); +$auth = new phpbb_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> diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index f3d161589b..6cd2627f43 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -1,16 +1,9 @@ -<!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"> +<!DOCTYPE html> +<html dir="ltr" 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="phpBB Group" /> +<meta charset="utf-8"> <meta name="keywords" content="" /> -<meta name="description" content="Olympus coding guidelines document" /> +<meta name="description" content="Ascraeus coding guidelines document" /> <title>phpBB3 • Coding Guidelines</title> <link href="stylesheet.css" rel="stylesheet" type="text/css" media="screen, projection" /> @@ -28,7 +21,7 @@ <div id="doc-description"> <a href="../index.php" id="logo"><img src="site_logo.gif" alt="" /></a> <h1>Coding Guidelines</h1> - <p>Olympus coding guidelines document</p> + <p>Ascraeus coding guidelines document</p> <p style="display: none;"><a href="#start_here">Skip</a></p> </div> @@ -42,7 +35,7 @@ <!-- BEGIN DOCUMENT --> -<p>These are the phpBB Coding Guidelines for Olympus, all attempts should be made to follow them as closely as possible.</p> +<p>These are the phpBB Coding Guidelines for Ascraeus, all attempts should be made to follow them as closely as possible.</p> <h1>Coding Guidelines</h1> @@ -62,11 +55,12 @@ </li> <li><a href="#code">Code Layout/Guidelines</a> <ol style="list-style-type: lower-roman;"> - <li><a href="#namingvars">Variable/Function Naming</a></li> + <li><a href="#namingvars">Variable/Function/Class Naming</a></li> <li><a href="#codelayout">Code Layout</a></li> <li><a href="#sql">SQL/SQL Layout</a></li> <li><a href="#optimizing">Optimizations</a></li> <li><a href="#general">General Guidelines</a></li> + <li><a href="#phprestrictions">Restrictions on the Use of PHP</a></li> </ol> </li> <li><a href="#styling">Styling</a> @@ -77,7 +71,8 @@ <li><a href="#templating">Templating</a> <ol style="list-style-type: lower-roman;"> <li><a href="#templates">General Templating</a></li> - <li><a href="#inheritance">Template Inheritance</a></li> + <li><a href="#stylestree">Styles Tree</a></li> + <li><a href="#template-events">Template Events</a></li> </ol></li> <li><a href="#charsets">Character Sets and Encodings</a></li> <li><a href="#translation">Translation (<abbr title="Internationalisation">i18n</abbr>/<abbr title="Localisation">L10n</abbr>) Guidelines</a> @@ -120,7 +115,7 @@ <h3>Linefeeds:</h3> <p>Ensure that your editor is saving files in the UNIX (LF) line ending format. This means that lines are terminated with a newline, not with Windows Line endings (CR/LF combo) as they are on Win32 or Classic Mac (CR) Line endings. Any decent editor should be able to do this, but it might not always be the default setting. Know your editor. If you want advice for an editor for your Operating System, just ask one of the developers. Some of them do their editing on Win32.</p> - <a name="fileheader"></a><h3>1.ii. File Header</h3> + <a name="fileheader"></a><h3>1.ii. File Layout</h3> <h4>Standard header for new files:</h4> <p>This template of the header must be included at the start of all phpBB files: </p> @@ -137,6 +132,14 @@ <p>Please see the <a href="#locations">File Locations section</a> for the correct package name.</p> + <h4>PHP closing tags</h4> + + <p>A file containg only PHP code should not end with the optional PHP closing tag <strong>?></strong> to avoid issues with whitespace following it.</p> + + <h4>Newline at end of file</h4> + + <p>All files should end in a newline so the last line does not appear as modified in diffs, when a line is appended to the file.</p> + <h4>Files containing inline code:</h4> <p>For those files you have to put an empty comment directly after the header to prevent the documentor assigning the header to the first code element found.</p> @@ -187,7 +190,7 @@ class ... <ul> <li><strong>phpBB3</strong><br />Core files and all files not assigned to a separate package</li> - <li><strong>acm</strong><br /><code>/includes/acm</code>, <code>/includes/cache.php</code><br />Cache System</li> + <li><strong>acm</strong><br /><code>/includes/cache</code><br />Cache System</li> <li><strong>acp</strong><br /><code>/adm</code>, <code>/includes/acp</code>, <code>/includes/functions_admin.php</code><br />Administration Control Panel</li> <li><strong>dbal</strong><br /><code>/includes/db</code><br />Database Abstraction Layer.<br />Base class is <code>dbal</code> <ul> @@ -246,13 +249,14 @@ PHPBB_QA (Set board to QA-Mode, which means the updater also c <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/user.php - phpbb_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_ASSETS_PATH} - assets (non-style specific, static resources)</li> <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> @@ -287,16 +291,22 @@ PHPBB_QA (Set board to QA-Mode, which means the updater also c <p>Please note that these guidelines apply to all php, html, javascript and css files.</p> - <a name="namingvars"></a><h3>2.i. Variable/Function Naming</h3> + <a name="namingvars"></a><h3>2.i. Variable/Function/Class Naming</h3> <p>We will not be using any form of hungarian notation in our naming conventions. Many of us believe that hungarian naming is one of the primary code obfuscation techniques currently in use.</p> <h4>Variable Names:</h4> - <p>Variable names should be in all lowercase, with words separated by an underscore, example:</p> + <p>In PHP, variable names should be in all lowercase, with words separated by an underscore, example:</p> <div class="indent"> <p><code>$current_user</code> is right, but <code>$currentuser</code> and <code> $currentUser</code> are not.</p> </div> + + <p>In JavaScript, variable names should use camel case:</p> + + <div class="indent"> + <p><code>currentUser</code> is right, but <code>currentuser</code> and <code>current_user</code> are not.</p> + </div> <p>Names should be descriptive, but concise. We don't want huge sentences as our variable names, but typing an extra couple of characters is always better than wondering what exactly a certain variable is for. </p> @@ -314,16 +324,46 @@ for ($i = 0; $i < $outer_size; $i++) </pre></div> <h4>Function Names:</h4> - <p>Functions should also be named descriptively. We're not programming in C here, we don't want to write functions called things like "stristr()". Again, all lower-case names with words separated by a single underscore character. Function names should preferably have a verb in them somewhere. Good function names are <code>print_login_status()</code>, <code>get_user_data()</code>, etc. </p> + <p>Functions should also be named descriptively. We're not programming in C here, we don't want to write functions called things like "stristr()". Again, all lower-case names with words separated by a single underscore character in PHP, and camel caps in JavaScript. Function names should preferably have a verb in them somewhere. Good function names are <code>print_login_status()</code>, <code>get_user_data()</code>, etc. Constructor functions in JavaScript should begin with a capital letter.</p> <h4>Function Arguments:</h4> <p>Arguments are subject to the same guidelines as variable names. We don't want a bunch of functions like: <code>do_stuff($a, $b, $c)</code>. In most cases, we'd like to be able to tell how to use a function by just looking at its declaration. </p> + <h4>Class Names:</h4> + + <p>Apart from following the rules for function names, all classes should meet the following conditions:</p> + <ul> + <li>Every class must be defined in a separate file.</li> + <li>The classes have to be located in a subdirectory of <code>includes/</code>.</li> + <li>Classnames to be prefixed with <code>phpbb_</code> to avoid name clashes, the filename should not contain the prefix.</li> + <li>Class names have to reflect the location of the file they are defined in. The longest list of prefixes, separated by underscores, which is a valid path must be the directory in which the file is located. So the directory names must not contain any underscores, but the filename may. If the filename would be empty the last directory name is used for the filename as well.</li> + <li>Directories should typically be a singular noun (e.g. <code>dir</code> in the example below, not <code>dirs</code>.</li> + </ul> + + <p>So given the following example directory structure you would result in the below listed lookups</p> + <div class="codebox"><pre> +includes/ + class_name.php + dir/ + class_name.php + dir.php + subdir/ + class_name.php + </pre></div> + + <div class="codebox"><pre> +phpbb_class_name - includes/class_name.php +phpbb_dir_class_name - includes/dir/class_name.php +phpbb_dir - includes/dir/dir.php +phpbb_dir_subdir_class_name - includes/dir/subdir/class_name.php + </pre></div> + + <h4>Summary:</h4> <p>The basic philosophy here is to not hurt code clarity for the sake of laziness. This has to be balanced by a little bit of common sense, though; <code>print_login_status_for_a_given_user()</code> goes too far, for example -- that function would be better named <code>print_user_login_status()</code>, or just <code>print_login_status()</code>.</p> <h4>Special Namings: </h4> - <p>For all emoticons use the term <code>smiley</code> in singular and <code>smilies</code> in plural.</p> + <p>For all emoticons use the term <code>smiley</code> in singular and <code>smilies</code> in plural. For emails we use the term <code>email</code> (without dash between “e” and “m”).</p> <a name="codelayout"></a><h3>2.ii. Code Layout</h3> @@ -364,7 +404,7 @@ for ($i = 0; $i < size; $i++) </pre></div> <h4>Where to put the braces:</h4> - <p>This one is a bit of a holy war, but we're going to use a style that can be summed up in one sentence: Braces always go on their own line. The closing brace should also always be at the same column as the corresponding opening brace, examples:</p> + <p>In PHP code, braces always go on their own line. The closing brace should also always be at the same column as the corresponding opening brace, examples:</p> <div class="codebox"><pre> if (condition) @@ -394,6 +434,30 @@ function do_stuff() ... } </pre></div> + + <p>In JavaScript code, braces always go on the same line:</p> + + <div class="codebox"><pre> +if (condition) { + while (condition2) { + ... + } +} else { + ... +} + +for (var i = 0; i < size; i++) { + ... +} + +while (condition) { + ... +} + +function do_stuff() { + ... +} + </pre></div> <h4>Use spaces between tokens:</h4> <p>This is another simple, easy step that helps keep code readable without much effort. Whenever you write an assignment, expression, etc.. Always leave <em>one</em> space between the tokens. Basically, write code as if it was English. Put spaces between variable names and operators. Don't put spaces just after an opening bracket or before a closing bracket. Don't put spaces just before a comma or a semicolon. This is best shown with a few examples, examples:</p> @@ -468,6 +532,26 @@ $post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&amp;start=$start"; <p>In SQL statements mixing single and double quotes is partly allowed (following the guidelines listed here about SQL formatting), else one should try to only use one method - mostly single quotes.</p> + <h4>Commas after every array element:</h4> + <p>If an array is defined with each element on its own line, you still have to modify the previous line to add a comma when appending a new element. PHP allows for trailing (useless) commas in array definitions. These should always be used so each element including the comma can be appended with a single line. In JavaScript, do not use the trailing comma, as it causes browsers to throw errors.</p> + + <p class="bad">// wrong</p> + <div class="codebox"><pre> +$foo = array( + 'bar' => 42, + 'boo' => 23 +); + </pre></div> + + <p class="good">// right </p> + <div class="codebox"><pre> +$foo = array( + 'bar' => 42, + 'boo' => 23, +); + </pre></div> + + <h4>Associative array keys:</h4> <p>In PHP, it's legal to use a literal string as a key to an associative array without quoting that string. We don't want to do this -- the string should always be quoted to avoid confusion. Note that this is only when we're using a literal, not when we're using a variable, examples:</p> @@ -634,10 +718,30 @@ switch ($mode) } </pre></div> + <h4>Class Members</h4> + <p>Use the explicit visibility qualifiers <code>public</code>, <code>private</code> and <code>protected</code> for all properties instead of <code>var</code>. + + <p>Place the <code>static</code> qualifier before the visibility qualifiers.</p> + + <p class="bad">//Wrong </p> + <div class="codebox"><pre> +var $x; +private static function f() + </pre></div> + + <p class="good">// Right </p> + <div class="codebox"><pre> +public $x; +static private function f() + </pre></div> + + <h4>Constants</h4> + <p>Prefer class constants over global constants created with <code>define()</code>.</p> + <a name="sql"></a><h3>2.iii. SQL/SQL Layout</h3> <h4>Common SQL Guidelines: </h4> - <p>All SQL should be cross-DB compatible, if DB specific SQL is used alternatives must be provided which work on all supported DB's (MySQL3/4/5, MSSQL (7.0 and 2000), PostgreSQL (7.0+), Firebird, SQLite, Oracle8, ODBC (generalised if possible)).</p> + <p>All SQL should be cross-DB compatible, if DB specific SQL is used alternatives must be provided which work on all supported DB's (MySQL3/4/5, MSSQL (7.0 and 2000), PostgreSQL (8.3+), Firebird, SQLite, Oracle8, ODBC (generalised if possible)).</p> <p>All SQL commands should utilise the DataBase Abstraction Layer (DBAL)</p> <h4>SQL code layout:</h4> @@ -1042,6 +1146,22 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp; <p>Your page should either call <code>page_footer()</code> in the end to trigger output through the template engine and terminate the script, or alternatively at least call the <code>exit_handler()</code>. That call is necessary because it provides a method for external applications embedding phpBB to be called at the end of the script.</p> + <a name="phprestrictions"></a><h3>2.vi. Restrictions on the Use of PHP</h3> + + <h4>Dynamic code execution:</h4> + + <p>Never execute dynamic PHP code (generated or in a constant string) using any of the following PHP functions:</p> + + <ul> + <li><strong>eval</strong></li> + <li><strong>create_function</strong></li> + <li><strong>preg_replace</strong> with the <strong>e</strong> modifier in the pattern</li> + </ul> + + <p>If absolutely necessary a file should be created, and a mechanism for creating this file prior to running phpBB should be provided as a setup process.</p> + + <p>The <strong>e</strong> modifier in <strong>preg_replace</strong> can be replaced by <strong>preg_replace_callback</strong> and objects to encapsulate state that is needed in the callback code.</p> + </div> <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div> @@ -1057,15 +1177,19 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp; <div class="content"> <a name="cfgfiles"></a><h3>3.i. Style Config Files</h3> - <p>Style cfg files are simple name-value lists with the information necessary for installing a style. Similar cfg files exist for templates, themes and imagesets. These follow the same principle and will not be introduced individually. Styles can use installed components by using the required_theme/required_template/required_imageset entries. The important part of the style configuration file is assigning an unique name.</p> + <p>Style cfg files are simple name-value lists with the information necessary for installing a style. The important part of the style configuration file is assigning an unique name.</p> <div class="codebox"><pre> - # General Information about this style - name = prosilver_duplicate - copyright = © phpBB Group, 2007 - version = 3.0.3 - required_template = prosilver - required_theme = prosilver - required_imageset = prosilver +# General Information about this style +name = prosilver_duplicate +copyright = © phpBB Group, 2007 +version = 3.1.0 + +# Defining a different template bitfield +# template_bitfield = lNg= + +# Parent style +# Set value to empty or to this style's name if this style does not have a parent style +parent = prosilver </pre></div> <a name="genstyling"></a><h3>3.2. General Styling Rules</h3> <p>Templates should be produced in a consistent manner. Where appropriate they should be based off an existing copy, e.g. index, viewforum or viewtopic (the combination of which implement a range of conditional and variable forms). Please also note that the indentation and coding guidelines also apply to templates where possible.</p> @@ -1088,7 +1212,7 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp; <p>Row colours/classes are now defined by the template, use an <code>IF S_ROW_COUNT</code> switch, see viewtopic or viewforum for an example.</p> -<p>Remember block level ordering is important ... while not all pages validate as XHTML 1.0 Strict compliant it is something we're trying to work on.</p> +<p>Remember block level ordering is important.</p> <p>Use a standard cellpadding of 2 and cellspacing of 0 on outer tables. Inner tables can vary from 0 to 3 or even 4 depending on the need.</p> @@ -1156,13 +1280,13 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp; <p>A bit later loops will be explained further. To not irritate you we will explain conditionals as well as other statements first.</p> <h4>Including files</h4> -<p>Something that existed in 2.0.x which no longer exists in 3.0.x is the ability to assign a template to a variable. This was used (for example) to output the jumpbox. Instead (perhaps better, perhaps not but certainly more flexible) we now have INCLUDE. This takes the simple form:</p> +<p>Something that existed in 2.0.x which no longer exists in 3.x is the ability to assign a template to a variable. This was used (for example) to output the jumpbox. Instead (perhaps better, perhaps not but certainly more flexible) we now have INCLUDE. This takes the simple form:</p> <div class="codebox"><pre> <span class="comment"><!-- INCLUDE filename --></span> </pre></div> -<p>You will note in the 3.0 templates the major sources start with <code><!-- INCLUDE overall_header.html --></code> or <code><!-- INCLUDE simple_header.html --></code>, etc. In 2.0.x control of "which" header to use was defined entirely within the code. In 3.0.x the template designer can output what they like. Note that you can introduce new templates (i.e. other than those in the default set) using this system and include them as you wish ... perhaps useful for a common "menu" bar or some such. No need to modify loads of files as with 2.0.x.</p> +<p>You will note in the 3.x templates the major sources start with <code><!-- INCLUDE overall_header.html --></code> or <code><!-- INCLUDE simple_header.html --></code>, etc. In 2.0.x control of "which" header to use was defined entirely within the code. In 3.x the template designer can output what they like. Note that you can introduce new templates (i.e. other than those in the default set) using this system and include them as you wish ... perhaps useful for a common "menu" bar or some such. No need to modify loads of files as with 2.0.x.</p> <p>Added in <strong>3.0.6</strong> is the ability to include a file using a template variable to specify the file, this functionality only works for root variables (i.e. not block variables).</p> <div class="codebox"><pre> @@ -1194,7 +1318,7 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&amp; <p>it will be included and executed inline.<br /><br />A note, it is very much encouraged that template designers do not include PHP. The ability to include raw PHP was introduced primarily to allow end users to include banner code, etc. without modifying multiple files (as with 2.0.x). It was not intended for general use ... hence <!-- w --><a href="https://www.phpbb.com">www.phpbb.com</a><!-- w --> will <strong>not</strong> make available template sets which include PHP. And by default templates will have PHP disabled (the admin will need to specifically activate PHP for a template).</p> <h4>Conditionals/Control structures</h4> -<p>The most significant addition to 3.0.x are conditions or control structures, "if something then do this else do that". The system deployed is very similar to Smarty. This may confuse some people at first but it offers great potential and great flexibility with a little imagination. In their most simple form these constructs take the form:</p> +<p>The most significant addition to 3.x are conditions or control structures, "if something then do this else do that". The system deployed is very similar to Smarty. This may confuse some people at first but it offers great potential and great flexibility with a little imagination. In their most simple form these constructs take the form:</p> <div class="codebox"><pre> <span class="comment"><!-- IF expr --></span> @@ -1265,7 +1389,7 @@ div <span class="comment"><!-- ENDIF --></span> </pre></div> -<p>Each statement will be tested in turn and the relevant output generated when a match (if a match) is found. It is not necessary to always use ELSEIF, ELSE can be used alone to match "everything else".<br /><br />So what can you do with all this? Well take for example the colouration of rows in viewforum. In 2.0.x row colours were predefined within the source as either row color1, row color2 or row class1, row class2. In 3.0.x this is moved to the template, it may look a little daunting at first but remember control flows from top to bottom and it's not too difficult:</p> +<p>Each statement will be tested in turn and the relevant output generated when a match (if a match) is found. It is not necessary to always use ELSEIF, ELSE can be used alone to match "everything else".<br /><br />So what can you do with all this? Well take for example the colouration of rows in viewforum. In 2.0.x row colours were predefined within the source as either row color1, row color2 or row class1, row class2. In 3.x this is moved to the template, it may look a little daunting at first but remember control flows from top to bottom and it's not too difficult:</p> <div class="codebox"><pre> <table> @@ -1536,26 +1660,78 @@ div </form> </pre></div><br /> - <a name="inheritance"></a><h3>4.ii. Template Inheritance</h3> - <p>When basing a new style on an existing one, it is not necessary to provide all the template files. By declaring the base style name in the <strong>inherit_from</strong> field in the template configuration file, the style can be set to inherit template files from the base style. The limitation on this is that the base style has to be installed and complete, meaning that it is not itself inheriting.</p> + <a name="stylestree"></a><h3>4.ii. Styles Tree</h3> + <p>When basing a new style on an existing one, it is not necessary to provide all the template files. By declaring the base style name in the <strong>parent</strong> field in the style configuration file, the style can be set to reuse template files from the parent style.</p> - <p>The effect of doing so is that the template engine will use the template files in the new style where they exist, but fall back to files in the base style otherwise. Declaring a style to inherit from another also causes it to use some of the configuration settings of the base style, notably database storage.</p> + <p>The effect of doing so is that the template engine will use the template files in the new style where they exist, but fall back to files in the parent style otherwise.</p> - <p>We strongly encourage the use of inheritance for styles based on the bundled styles, as it will ease the update procedure.</p> + <p>We strongly encourage the use of parent styles for styles based on the bundled styles, as it will ease the update procedure.</p> <div class="codebox"><pre> - # General Information about this template - name = inherits - copyright = © phpBB Group, 2007 - version = 3.0.3 +# General Information about this style +name = Custom Style +copyright = &copy; phpBB Group, 2007 +version = 3.1.0 - # Defining a different template bitfield - template_bitfield = lNg= +# Defining a different template bitfield +# template_bitfield = lNg= - # Are we inheriting? - inherit_from = prosilver +# Parent style +# Set value to empty or to this style's name if this style does not have a parent style +parent = prosilver </pre></div> + <a name="template-events"></a><h3>4.iii. Template Events</h3> + <p>Template events must follow this format: <code><!-- EVENT event_name --></code></p> + <p>Using the above example, files named <code>event_name.html</code> located within extensions will be injected into the location of the event.</p> + + <h4>Template event naming guidelines:</h4> + <ul> + <li>An event name must be all lowercase, with each word separated by an underscore.</li> + <li>An event name must briefly describe the location and purpose of the event.</li> + <li>An event name must end with one of the following suffixes:</li> + <ul> + <li><code>_prepend</code> - This event adds an item to the beginning of a block of related items, or adds to the beginning of individual items in a block.</li> + <li><code>_append</code> - This event adds an item to the end of a block of related items, or adds to the end of individual items in a block.</li> + <li><code>_before</code> - This event adds content directly before the specified block</li> + <li><code>_after</code> - This event adds content directly after the specified block</li> + </ul> + </ul> + + <h4>Template event documentation</h4> + <p>Events must be documented in <code>phpBB/docs/events.md</code> in alphabetical order based on the event name. The format is as follows:</p> + + <ul><li>An event found in only one template file: + <div class="codebox"><pre>event_name +=== +* Location: styles/<style_name>/template/filename.html +* Purpose: A brief description of what this event should be used for. +This may span multiple lines. +</pre></div></li> + <li>An event found in multiple template files: + <div class="codebox"><pre>event_name +=== +* Locations: + + first/file/path.html + + second/file/path.html +* Purpose: Same as above. +</pre></div> + <li>An event that is found multiple times in a file should have the number of instances in parenthesis next to the filename. + <div class="codebox"><pre>event_name +=== +* Locations: + + first/file/path.html (2) + + second/file/path.html +* Purpose: Same as above. +</pre></div></li> + <li>An actual example event documentation: + <div class="codebox"><pre>forumlist_body_last_post_title_prepend +==== +* Locations: + + styles/prosilver/template/forumlist_body.html + + styles/subsilver2/template/forumlist_body.html +* Purpose: Add content before the post title of the latest post in a forum on the forum list.</pre></div></ul><br /> + </div> <div class="back2top"><a href="#wrap" class="top">Back to Top</a></div> @@ -1668,7 +1844,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) <p>With phpBB3, the output encoding for the forum in now UTF-8, a Universal Character Encoding by the Unicode Consortium that is by design a superset to US-ASCII and ISO-8859-1. By using one character set which simultaenously supports all scripts which previously would have required different encodings (eg: ISO-8859-1 to ISO-8859-15 (Latin, Greek, Cyrillic, Thai, Hebrew, Arabic); GB2312 (Simplified Chinese); Big5 (Traditional Chinese), EUC-JP (Japanese), EUC-KR (Korean), VISCII (Vietnamese); et cetera), we remove the need to convert between encodings and improves the accessibility of multilingual forums.</p> - <p>The impact is that the language files for phpBB must now also be encoded as UTF-8, with a caveat that the files must <strong>not contain</strong> a <acronym title="Byte-Order-Mark">BOM</acronym> for compatibility reasons with non-Unicode aware versions of PHP. For those with forums using the Latin character set (ie: most European languages), this change is transparent since UTF-8 is superset to US-ASCII and ISO-8859-1.</p> + <p>The impact is that the language files for phpBB must now also be encoded as UTF-8, with a caveat that the files must <strong>not contain</strong> a <abbr title="Byte-Order-Mark">BOM</abbr> for compatibility reasons with non-Unicode aware versions of PHP. For those with forums using the Latin character set (ie: most European languages), this change is transparent since UTF-8 is superset to US-ASCII and ISO-8859-1.</p> <h4>Language Tag:</h4> @@ -1678,8 +1854,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) <p>Most language tags consist of a two- or three-letter language subtag (from <a href="http://www.loc.gov/standards/iso639-2/php/English_list.php">ISO 639-1/ISO 639-2</a>). Sometimes, this is followed by a two-letter or three-digit region subtag (from <a href="http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html">ISO 3166-1 alpha-2</a> or <a href="http://unstats.un.org/unsd/methods/m49/m49.htm">UN M.49</a>). Some examples are:</p> - <table summary="Examples of various possible language tags as described by RFC 4646 and RFC 4647"> - <caption>Language tag examples</caption> + <table> + <caption>Examples of various possible language tags as described by RFC 4646 and RFC 4647</caption> <thead> <tr> <th scope="col">Language tag</th> @@ -1730,8 +1906,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) <p>Next is the <a href="http://www.unicode.org/iso15924/iso15924-codes.html">ISO 15924</a> language script code and when one should or shouldn't use it. For example, whilst <code>en-Latn</code> is syntaxically correct for describing English written with Latin script, real world English writing is <strong>more-or-less exclusively in the Latin script</strong>. For such languages like English that are written in a single script, the <a href="http://www.iana.org/assignments/language-subtag-registry"><abbr title="Internet Assigned Numbers Authority">IANA</abbr> Language Subtag Registry</a> has a "Suppress-Script" field meaning the script code <strong>should be ommitted</strong> unless a specific language tag requires a specific script code. Some languages are <strong>written in more than one script</strong> and in such cases, the script code <strong>is encouraged</strong> since an end-user may be able to read their language in one script, but not the other. Some examples are:</p> - <table summary="Examples of using a language subtag in combination with a script subtag"> - <caption>Language subtag + script subtag examples</caption> + <table> + <caption>Examples of using a language subtag in combination with a script subtag</caption> <thead> <tr> <th scope="col">Language tag</th> @@ -1797,8 +1973,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) <p>Examples of English using marco-geographical regions:</p> - <table summary="Examples for English of ISO 3166-1 alpha-2 vs. UN M.49 code"> - <caption>Coding for English using macro-geographical regions</caption> + <table> + <caption>Coding for English using macro-geographical regions (examples for English of ISO 3166-1 alpha-2 vs. UN M.49 code)</caption> <thead> <tr> <th scope="col">ISO 639-1/ISO 639-2 + ISO 3166-1 alpha-2</th> @@ -1823,8 +1999,8 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) <p>Examples of Spanish using marco-geographical regions:</p> - <table summary="Examples for Spanish of ISO 3166-1 alpha-2 vs. UN M.49 code"> - <caption>Coding for Spanish macro-geographical regions</caption> + <table> + <caption>Coding for Spanish macro-geographical regions (examples for Spanish of ISO 3166-1 alpha-2 vs. UN M.49 code)</caption> <thead> <tr> <th scope="col">ISO 639-1/ISO 639-2 + ISO 3166-1 alpha-2</th> @@ -1852,7 +2028,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) <p>Example of where the <a href="http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html">ISO 3166-1 alpha-2</a> is ambiguous and why <a href="http://unstats.un.org/unsd/methods/m49/m49.htm">UN M.49</a> might be preferred:</p> - <table summary="Example where the ISO 3166-1 alpha-2 is ambiguous"> + <table> <caption>Coding for ambiguous ISO 3166-1 alpha-2 regions</caption> <thead> <tr> @@ -1908,7 +2084,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) <p><a href="http://tools.ietf.org/html/rfc4646">RFC 4646</a> anticipates features which shall be available in (currently draft) <a href="http://www.sil.org/iso639-3/">ISO 639-3</a> which aims to provide as complete enumeration of languages as possible, including living, extinct, ancient and constructed languages, whether majour, minor or unwritten. A new feature of <a href="http://www.sil.org/iso639-3/">ISO 639-3</a> compared to the previous two revisions is the concept of <a href="http://www.sil.org/iso639-3/macrolanguages.asp">macrolanguages</a> where Arabic and Chinese are two such examples. In such cases, their respective codes of <code>ar</code> and <code>zh</code> is very vague as to which dialect/topolect is used or perhaps some terse classical variant which may be difficult for all but very educated users. For such macrolanguages, it is recommended that the sub-language tag is used as a suffix to the macrolanguage tag, eg:</p> - <table summary="Examples of macrolanguages used with sub-language subtags"> + <table> <caption>Macrolanguage subtag + sub-language subtag examples</caption> <thead> <tr> @@ -1952,7 +2128,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) <p>For phpBB, the language tags are <strong>not</strong> used in their raw form and instead converted to all lower-case and have the hyphen <code>-</code> replaced with an underscore <code>_</code> where appropriate, with some examples below:</p> - <table summary="Normalisation of language tags for usage in phpBB"> + <table> <caption>Language tag normalisation examples</caption> <thead> <tr> @@ -2006,7 +2182,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) <p>For the English language description, the language name is always first and any additional attributes required to describe the subtags within the language code are then listed in order separated with commas and enclosed within parentheses, eg:</p> - <table summary="English language description examples of iso.txt for usage in phpBB"> + <table> <caption>English language description examples for iso.txt</caption> <thead> <tr> @@ -2058,7 +2234,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) <p>The various Unicode control characters for bi-directional text and their HTML enquivalents where appropriate are as follows:</p> - <table summary="Table of the various Unicode bidirectional control characters"> + <table> <caption>Unicode bidirectional control characters & HTML elements/entities</caption> <thead> <tr> @@ -2124,7 +2300,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) <p>For <code>iso.txt</code>, the directionality of the text can be explicitly set using special Unicode characters via any of the three methods provided by left-to-right/right-to-left markers/embeds/overrides, as without them, the ordering of characters will be incorrect, eg:</p> - <table summary="Effect of using Unicode bidirectional control characters within iso.txt"> + <table> <caption>Unicode bidirectional control characters iso.txt</caption> <thead> <tr> @@ -2260,7 +2436,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) <div class="codebox"><pre> ... -'FOO_BAR' => 'PHP version < 4.3.3.<br /> +'FOO_BAR' => 'PHP version < 5.3.3.<br /> Visit "Downloads" at <a href="http://www.php.net/">www.php.net</a>.', ... </pre></div> @@ -2269,7 +2445,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) <div class="codebox"><pre> ... -'FOO_BAR' => 'PHP version &lt; 4.3.3.<br /> +'FOO_BAR' => 'PHP version &lt; 5.3.3.<br /> Visit &quot;Downloads&quot; at <a href="http://www.php.net/">www.php.net</a>.', ... </pre></div> @@ -2278,7 +2454,7 @@ if (utf8_case_fold_nfc($string1) == utf8_case_fold_nfc($string2)) <div class="codebox"><pre> ... -'FOO_BAR' => 'PHP version &lt; 4.3.3.<br /> +'FOO_BAR' => 'PHP version &lt; 5.3.3.<br /> Visit “Downloads” at <a href="http://www.php.net/">www.php.net</a>.', ... </pre></div> diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md new file mode 100644 index 0000000000..af6e6bdb1c --- /dev/null +++ b/phpBB/docs/events.md @@ -0,0 +1,233 @@ +acp_forums_normal_settings_append +=== +* Location: adm/style/acp_forums.html +* Purpose: Add settings to forums + +acp_main_actions_append +=== +* Location: adm/style/acp_main.html +* Purpose: Add actions to the ACP main page below the cache purge action + +acp_main_notice_after +=== +* Location: adm/style/acp_main.html +* Purpose: Add notices or other blocks in the ACP below other configuration notices + +acp_overall_footer_after +=== +* Location: adm/style/overall_footer.html +* Purpose: Add content below the footer in the ACP + +acp_overall_header_head_append +=== +* Location: adm/style/overall_header.html +* Add assets within the `<head>` tags in the ACP + +acp_simple_footer_after +=== +* Location: adm/style/simple_footer.html +* Purpose: Add content below the simple footer in the ACP + +acp_simple_header_head_append +=== +* Location: adm/style/overall_header.html +* Add assets within the `<head>` tags in the simple header of the ACP + +acp_users_overview_options_append +=== +* Location: adm/style/acp_users.html +* Purpose: Add options and settings on user overview page + +forumlist_body_last_post_title_prepend +==== +* Locations: + + styles/prosilver/template/forumlist_body.html + + styles/subsilver2/template/forumlist_body.html +* Purpose: Add content before the post title of the latest post in a forum on the forum list. + +index_body_stat_blocks_before +=== +* Locations: + + styles/prosilver/template/index_body.html + + styles/subsilver2/template/index_body.html +* Purpose: Add new statistic blocks above the Who Is Online and Board Statistics blocks + +memberlist_body_username_append +=== +* Locations: + + styles/prosilver/template/memberlist_body.html + + styles/subsilver2/template/memberlist_body.html +* Purpose: Add information after every username in the memberlist. Works in +all display modes (leader, group and normal memberlist). + +memberlist_body_username_prepend +=== +* Locations: + + styles/prosilver/template/memberlist_body.html + + styles/subsilver2/template/memberlist_body.html +* Purpose: Add information before every username in the memberlist. Works in +all display modes (leader, group and normal memberlist). + +memberlist_view_user_statistics_after +=== +* Locations: + + styles/prosilver/template/memberlist_view.html + + styles/subsilver2/template/memberlist_view.html +* Purpose: Add entries after the user statistics part of any user profile + +memberlist_view_user_statistics_before +=== +* Locations: + + styles/prosilver/template/memberlist_view.html + + styles/subsilver2/template/memberlist_view.html +* Purpose: Add entries before the user statistics part of any user profile + +overall_footer_after +=== +* Locations: + + styles/prosilver/template/overall_footer.html + + styles/subsilver2/template/overall_footer.html +* Purpose: Add content at the end of the file, directly prior to the `</body>` tag + +overall_footer_breadcrumb_append +=== +* Location: styles/prosilver/template/overall_footer.html +* Purpose: Add links to the list of breadcrumbs in the footer + +overall_footer_copyright_append +=== +* Locations: + + styles/prosilver/template/overall_footer.html + + styles/subsilver2/template/overall_footer.html +* Purpose: Add content after the copyright line (no new line by default), before the ACP link + +overall_footer_copyright_prepend +=== +* Locations: + + styles/prosilver/template/overall_footer.html + + styles/subsilver2/template/overall_footer.html +* Purpose: Add content before the copyright line + +overall_header_breadcrumb_append +=== +* Locations: + + styles/prosilver/template/overall_header.html + + styles/subsilver2/template/breadcrumbs.html +* Purpose: Add links to the list of breadcrumbs in the header + +overall_header_head_append +=== +* Locations: + + styles/prosilver/template/overall_header.html + + styles/subsilver2/template/overall_header.html +* Purpose: Add asset calls directly before the `</head>` tag + +overall_header_navigation_append +=== +* Location: styles/prosilver/template/overall_header.html +* Purpose: Add links after the navigation links in the header + +overall_header_navigation_prepend +=== +* Location: styles/prosilver/template/overall_header.html +* Purpose: Add links before the navigation links in the header + +posting_editor_options_prepend +=== +* Locations: + + styles/prosilver/template/posting_editor.html + + styles/prosilver/template/posting_body.html +* Purpose: Add posting options on the posting screen + +simple_footer_after +=== +* Location: styles/prosilver/template/simple_footer.html +* Purpose: Add content directly prior to the `</body>` tag of the simple footer + +topiclist_row_prepend +=== +* Locations: + + styles/prosilver/template/search_results.html + + styles/prosilver/template/viewforum_body.html + + styles/subsilver2/template/search_results.html + + styles/subsilver2/template/viewforum_body.html +* Purpose: Add content into topic rows (inside the elements containing topic titles) + +topiclist_row_append +=== +* Locations: + + styles/prosilver/template/search_results.html + + styles/prosilver/template/viewforum_body.html + + styles/subsilver2/template/search_results.html + + styles/subsilver2/template/viewforum_body.html +* Purpose: Add content into topic rows (inside the elements containing topic titles) + +ucp_pm_viewmessage_custom_fields_after +=== +* Location: styles/prosilver/template/ucp_pm_viewmessage.html +* Purpose: Add data after the custom fields on the user profile when viewing +a private message + +ucp_pm_viewmessage_custom_fields_before +=== +* Location: styles/prosilver/template/ucp_pm_viewmessage.html +* Purpose: Add data before the custom fields on the user profile when viewing +a private message + +ucp_pm_viewmessage_print_head_append +=== +* Location: styles/prosilver/template/ucp_pm_viewmessage_print.html +* Purpose: Add asset calls directly before the `</head>` tag of the Print PM screen + +viewtopic_print_head_append +=== +* Location: styles/prosilver/template/viewtopic_print.html +* Purpose: Add asset calls directly before the `</head>` tag of the Print Topic screen + +viewtopic_body_footer_before +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Purpose: Add content to the bottom of the View topic screen below the posts +and quick reply, directly before the jumpbox in Prosilver, breadcrumbs in +Subsilver2. + +viewtopic_body_post_buttons_after +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Purpose: Add post button to posts (next to edit, quote etc), at the end of +the list. + +viewtopic_body_post_buttons_before +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Purpose: Add post button to posts (next to edit, quote etc), at the start of +the list. + +viewtopic_body_postrow_custom_fields_after +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Purpose: Add data after the custom fields on the user profile when viewing +a post + +viewtopic_body_postrow_custom_fields_before +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Purpose: Add data before the custom fields on the user profile when viewing +a post + +viewtopic_topic_title_prepend +=== +* Locations: + + styles/prosilver/template/viewtopic_body.html + + styles/subsilver2/template/viewtopic_body.html +* Purpose: Add content directly before the topic title link on the View topic screen diff --git a/phpBB/docs/hook_system.html b/phpBB/docs/hook_system.html index fbc8baaf75..3f209b8a34 100644 --- a/phpBB/docs/hook_system.html +++ b/phpBB/docs/hook_system.html @@ -1,14 +1,7 @@ -<!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"> +<!DOCTYPE html> +<html dir="ltr" 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="phpBB Group" /> +<meta charset="utf-8"> <meta name="keywords" content="" /> <meta name="description" content="Hook System explanation" /> <title>phpBB3 • Hook System</title> @@ -375,12 +368,12 @@ a:active { color: #368AD2; } <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 /> +<p><code>phpbb_user_session_handler();</code> which is called within phpbb_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->display($handle, $include_once = true);</code> which is called directly before outputting the (not-yet-compiled) template.<br /> +<code>$template->display($handle, $template);</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>Please note: The <code>$template->display</code> hook takes a third <code>$template</code> argument, which is the template instance being used, which should be used instead of the global.</p> +<p>Please note: The <code>$template->display</code> hook takes a <code>$template</code> argument, which is the template instance being used, which should be used instead of the global.</p> <p>There are also valid external constants you may want to use if you embed phpBB3 into your application:</p> @@ -395,13 +388,14 @@ PHPBB_USE_BOARD_URL_PATH (use generate_board_url() for image paths instead of $p <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/user.php - phpbb_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_ASSETS_PATH} - assets</li> <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> diff --git a/phpBB/docs/lighttpd.sample.conf b/phpBB/docs/lighttpd.sample.conf index 5873d1c945..5862cb319d 100644 --- a/phpBB/docs/lighttpd.sample.conf +++ b/phpBB/docs/lighttpd.sample.conf @@ -3,6 +3,15 @@ # from your system's lighttpd.conf. # Tested with lighttpd 1.4.26 +# If you want to use the X-Sendfile feature, +# uncomment the 'allow-x-send-file' for the fastcgi +# server below and add the following to your config.php +# +# define('PHPBB_ENABLE_X_SENDFILE', true); +# +# See http://blog.lighttpd.net/articles/2006/07/02/x-sendfile +# for the details on X-Sendfile. + # Load moules server.modules += ( "mod_access", @@ -54,6 +63,7 @@ $HTTP["host"] == "www.myforums.com" { "bin-copy-environment" => ( "PATH", "SHELL", "USER" ), + #"allow-x-send-file" => "enable", "broken-scriptfilename" => "enable" )) ) diff --git a/phpBB/docs/nginx.sample.conf b/phpBB/docs/nginx.sample.conf index 40b6ee76da..c82f5c8e49 100644 --- a/phpBB/docs/nginx.sample.conf +++ b/phpBB/docs/nginx.sample.conf @@ -3,6 +3,14 @@ # from your system's nginx.conf. # Tested with nginx 0.8.35. +# If you want to use the X-Accel-Redirect feature, +# add the following to your config.php. +# +# define('PHPBB_ENABLE_X_ACCEL_REDIRECT', true); +# +# See http://wiki.nginx.org/XSendfile for the details +# on X-Accel-Redirect. + http { # Compression - requires gzip and gzip static modules. gzip on; diff --git a/phpBB/docs/sphinx.sample.conf b/phpBB/docs/sphinx.sample.conf new file mode 100644 index 0000000000..620ec25761 --- /dev/null +++ b/phpBB/docs/sphinx.sample.conf @@ -0,0 +1,100 @@ +source source_phpbb_{SPHINX_ID}_main +{ + type = mysql # mysql or pgsql + sql_host = localhost # SQL server host sphinx connects to + sql_user = username + sql_pass = password + sql_db = db_name + sql_port = 3306 # optional, default is 3306 for mysql and 5432 for pgsql + sql_query_pre = SET NAMES 'utf8' + sql_query_pre = UPDATE phpbb_sphinx SET max_doc_id = (SELECT MAX(post_id) FROM phpbb_posts) WHERE counter_id = 1 + sql_query_range = SELECT MIN(post_id), MAX(post_id) FROM phpbb_posts + sql_range_step = 5000 + sql_query = SELECT \ + p.post_id AS id, \ + p.forum_id, \ + p.topic_id, \ + p.poster_id, \ + p.post_visibility, \ + CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post, \ + p.post_time, \ + p.post_subject, \ + p.post_subject as title, \ + p.post_text as data, \ + t.topic_last_post_time, \ + 0 as deleted\ + FROM phpbb_posts p, phpbb_topics t \ + WHERE \ + p.topic_id = t.topic_id \ + AND p.post_id >= $start AND p.post_id <= $end + sql_query_post = + sql_query_post_index = UPDATE phpbb_sphinx SET max_doc_id = $maxid WHERE counter_id = 1 + sql_query_info = SELECT * FROM phpbb_posts WHERE post_id = $id + sql_attr_uint = forum_id + sql_attr_uint = topic_id + sql_attr_uint = poster_id + sql_attr_uint = post_visibility + sql_attr_bool = topic_first_post + sql_attr_bool = deleted + sql_attr_timestamp = post_time + sql_attr_timestamp = topic_last_post_time + sql_attr_str2ordinal = post_subject +} +source source_phpbb_{SPHINX_ID}_delta : source_phpbb_{SPHINX_ID}_main +{ + sql_query_pre = + sql_query_range = + sql_range_step = + sql_query = SELECT \ + p.post_id AS id, \ + p.forum_id, \ + p.topic_id, \ + p.poster_id, \ + p.post_visibility, \ + CASE WHEN p.post_id = t.topic_first_post_id THEN 1 ELSE 0 END as topic_first_post, \ + p.post_time, \ + p.post_subject, \ + p.post_subject as title, \ + p.post_text as data, \ + t.topic_last_post_time, \ + 0 as deleted \ + FROM phpbb_posts p, phpbb_topics t \ + WHERE \ + p.topic_id = t.topic_id \ + AND p.post_id >= ( SELECT max_doc_id FROM phpbb_sphinx WHERE counter_id=1 ) + sql_query_pre = +} +index index_phpbb_{SPHINX_ID}_main +{ + path = {DATA_PATH}/index_phpbb_{SPHINX_ID}_main + source = source_phpbb_{SPHINX_ID}_main + docinfo = extern + morphology = none + stopwords = + min_word_len = 2 + charset_type = utf-8 + charset_table = U+FF10..U+FF19->0..9, 0..9, U+FF41..U+FF5A->a..z, U+FF21..U+FF3A->a..z, A..Z->a..z, a..z, U+0149, U+017F, U+0138, U+00DF, U+00FF, U+00C0..U+00D6->U+00E0..U+00F6, U+00E0..U+00F6, U+00D8..U+00DE->U+00F8..U+00FE, U+00F8..U+00FE, U+0100->U+0101, U+0101, U+0102->U+0103, U+0103, U+0104->U+0105, U+0105, U+0106->U+0107, U+0107, U+0108->U+0109, U+0109, U+010A->U+010B, U+010B, U+010C->U+010D, U+010D, U+010E->U+010F, U+010F, U+0110->U+0111, U+0111, U+0112->U+0113, U+0113, U+0114->U+0115, U+0115, U+0116->U+0117, U+0117, U+0118->U+0119, U+0119, U+011A->U+011B, U+011B, U+011C->U+011D, U+011D, U+011E->U+011F, U+011F, U+0130->U+0131, U+0131, U+0132->U+0133, U+0133, U+0134->U+0135, U+0135, U+0136->U+0137, U+0137, U+0139->U+013A, U+013A, U+013B->U+013C, U+013C, U+013D->U+013E, U+013E, U+013F->U+0140, U+0140, U+0141->U+0142, U+0142, U+0143->U+0144, U+0144, U+0145->U+0146, U+0146, U+0147->U+0148, U+0148, U+014A->U+014B, U+014B, U+014C->U+014D, U+014D, U+014E->U+014F, U+014F, U+0150->U+0151, U+0151, U+0152->U+0153, U+0153, U+0154->U+0155, U+0155, U+0156->U+0157, U+0157, U+0158->U+0159, U+0159, U+015A->U+015B, U+015B, U+015C->U+015D, U+015D, U+015E->U+015F, U+015F, U+0160->U+0161, U+0161, U+0162->U+0163, U+0163, U+0164->U+0165, U+0165, U+0166->U+0167, U+0167, U+0168->U+0169, U+0169, U+016A->U+016B, U+016B, U+016C->U+016D, U+016D, U+016E->U+016F, U+016F, U+0170->U+0171, U+0171, U+0172->U+0173, U+0173, U+0174->U+0175, U+0175, U+0176->U+0177, U+0177, U+0178->U+00FF, U+00FF, U+0179->U+017A, U+017A, U+017B->U+017C, U+017C, U+017D->U+017E, U+017E, U+0410..U+042F->U+0430..U+044F, U+0430..U+044F, U+4E00..U+9FFF + min_prefix_len = 0 + min_infix_len = 0 +} +index index_phpbb_{SPHINX_ID}_delta : index_phpbb_{SPHINX_ID}_main +{ + path = {DATA_PATH}/index_phpbb_{SPHINX_ID}_delta + source = source_phpbb_{SPHINX_ID}_delta +} +indexer +{ + mem_limit = 512M +} +searchd +{ + compat_sphinxql_magics = 0 + listen = localhost:9312 + log = {DATA_PATH}/log/searchd.log + query_log = {DATA_PATH}/log/sphinx-query.log + read_timeout = 5 + max_children = 30 + pid_file = {DATA_PATH}/searchd.pid + max_matches = 20000 + binlog_path = {DATA_PATH} +} |