├── .gitignore ├── development ├── _static │ ├── images │ │ ├── sort_asc.png │ │ ├── sort_both.png │ │ └── sort_desc.png │ ├── js │ │ └── main.js │ └── css │ │ └── phpbb.css ├── extensions │ ├── images │ │ └── skeleton-web-ui.png │ ├── index.rst │ ├── tutorial_migrations.rst │ ├── database_types_list.rst │ └── tutorial_parsing_text.rst ├── development │ ├── images │ │ └── Phpbb-git-workflow.png │ └── coding_guidelines.rst ├── files │ ├── index.rst │ ├── filespec.rst │ └── overview.rst ├── language │ └── index.rst ├── _templates │ ├── index.html │ └── versions.html ├── migrations │ ├── tools │ │ ├── index.rst │ │ ├── config_text.rst │ │ └── config.rst │ ├── index.rst │ ├── getting_started.rst │ ├── dependencies.rst │ └── schema_changes.rst ├── cli │ └── index.rst ├── index.rst ├── testing │ ├── index.rst │ ├── ui_testing.rst │ └── functional_testing.rst └── auth │ └── authentication.rst ├── documentation ├── content │ └── en │ │ └── images │ │ ├── admin_guide │ │ ├── captcha.png │ │ ├── acp_index.png │ │ ├── imageset_edit.png │ │ ├── denial_reasons.png │ │ ├── styles_overview.png │ │ ├── subforums_list.png │ │ ├── creating_bbcodes.png │ │ ├── database_restore.png │ │ ├── permission_masks.gif │ │ ├── extensions_overview.png │ │ ├── users_forum_permissions.png │ │ ├── choose_group_permissions.png │ │ ├── manage_forums_icon_legend.png │ │ └── setting_global_group_permissions.png │ │ ├── user_guide │ │ ├── quoted_text.png │ │ ├── smilies │ │ │ ├── cry.gif │ │ │ ├── smile.gif │ │ │ ├── wink.gif │ │ │ └── rolleyes.gif │ │ ├── posting_screen.png │ │ ├── search_topic.png │ │ ├── ucp_overview.png │ │ ├── posting_options.png │ │ ├── memberlist_sorting.png │ │ ├── notifications_menu.png │ │ ├── quoted_text_author.png │ │ ├── search_refinement.png │ │ ├── visual_confirmation.png │ │ ├── private_messsage_fields.png │ │ └── typical_registration_page.png │ │ ├── moderator_guide │ │ └── quick_mod_tools.png │ │ └── quick_start_guide │ │ ├── creating_forums.png │ │ ├── permissions_roles.png │ │ ├── permissions_types.png │ │ ├── settings_features.png │ │ ├── settings_sitename.png │ │ ├── installation_intro.png │ │ ├── permissions_manual.png │ │ ├── permissions_select.png │ │ ├── installation_database.png │ │ └── permissions_moderator.png ├── create_pdf.sh ├── create_pdf.bat ├── xsl │ ├── xhtml │ │ ├── docbookng.xsl │ │ ├── keywords.xsl │ │ ├── onechunk.xsl │ │ ├── profile-onechunk.xsl │ │ ├── chunk.xsl │ │ ├── profile-chunk.xsl │ │ ├── htmltbl.xsl │ │ ├── info.xsl │ │ ├── task.xsl │ │ ├── chunkfast.xsl │ │ ├── maketoc.xsl │ │ ├── html.xsl │ │ ├── changebars.xsl │ │ ├── ChangeLog │ │ ├── autoidx-ng.xsl │ │ ├── admon.xsl │ │ └── manifest.xsl │ ├── pdf │ │ ├── fo │ │ │ ├── annotations.xsl │ │ │ ├── keywords.xsl │ │ │ ├── info.xsl │ │ │ ├── passivetex.xsl │ │ │ ├── task.xsl │ │ │ ├── ptc.xsl │ │ │ ├── axf.xsl │ │ │ ├── fop.xsl │ │ │ ├── fo.xsl │ │ │ ├── math.xsl │ │ │ └── fo-rtf.xsl │ │ ├── common │ │ │ ├── targetdatabase.dtd │ │ │ ├── l10n.dtd │ │ │ ├── autoidx-kimber.xsl │ │ │ ├── l10n.xml │ │ │ ├── insertfile.xsl │ │ │ └── pi.xml │ │ ├── COPYING │ │ └── VERSION │ ├── proteus_pdf.xsl │ ├── common │ │ ├── targetdatabase.dtd │ │ ├── l10n.dtd │ │ ├── l10n.xml │ │ └── autoidx-ng.xsl │ ├── proteus_xhtml.xsl │ ├── lib │ │ └── ChangeLog │ └── VERSION ├── create_docs.sh ├── includes │ └── xinclude.mod ├── proteus_doc.xml └── style.css ├── readme.md ├── .github └── workflows │ ├── tests.yml │ └── merge_3.3.x_to_master.yml └── CONTRIBUTING.md /.gitignore: -------------------------------------------------------------------------------- 1 | Thumbs.db 2 | .DS_Store 3 | .idea/ 4 | /development/_build 5 | /documentation/build 6 | -------------------------------------------------------------------------------- /development/_static/images/sort_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/development/_static/images/sort_asc.png -------------------------------------------------------------------------------- /development/_static/images/sort_both.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/development/_static/images/sort_both.png -------------------------------------------------------------------------------- /development/_static/images/sort_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/development/_static/images/sort_desc.png -------------------------------------------------------------------------------- /development/extensions/images/skeleton-web-ui.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/development/extensions/images/skeleton-web-ui.png -------------------------------------------------------------------------------- /development/development/images/Phpbb-git-workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/development/development/images/Phpbb-git-workflow.png -------------------------------------------------------------------------------- /development/_static/js/main.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | $('table.events-list').DataTable( { 3 | "paging": false, 4 | "info": false 5 | }); 6 | }); 7 | -------------------------------------------------------------------------------- /development/files/index.rst: -------------------------------------------------------------------------------- 1 | File uploads 2 | ============ 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | 7 | overview 8 | filespec 9 | upload 10 | -------------------------------------------------------------------------------- /documentation/content/en/images/admin_guide/captcha.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/admin_guide/captcha.png -------------------------------------------------------------------------------- /documentation/content/en/images/admin_guide/acp_index.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/admin_guide/acp_index.png -------------------------------------------------------------------------------- /documentation/content/en/images/user_guide/quoted_text.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/user_guide/quoted_text.png -------------------------------------------------------------------------------- /documentation/content/en/images/user_guide/smilies/cry.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/user_guide/smilies/cry.gif -------------------------------------------------------------------------------- /documentation/content/en/images/admin_guide/imageset_edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/admin_guide/imageset_edit.png -------------------------------------------------------------------------------- /documentation/content/en/images/user_guide/posting_screen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/user_guide/posting_screen.png -------------------------------------------------------------------------------- /documentation/content/en/images/user_guide/search_topic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/user_guide/search_topic.png -------------------------------------------------------------------------------- /documentation/content/en/images/user_guide/smilies/smile.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/user_guide/smilies/smile.gif -------------------------------------------------------------------------------- /documentation/content/en/images/user_guide/smilies/wink.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/user_guide/smilies/wink.gif -------------------------------------------------------------------------------- /documentation/content/en/images/user_guide/ucp_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/user_guide/ucp_overview.png -------------------------------------------------------------------------------- /documentation/content/en/images/admin_guide/denial_reasons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/admin_guide/denial_reasons.png -------------------------------------------------------------------------------- /documentation/content/en/images/admin_guide/styles_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/admin_guide/styles_overview.png -------------------------------------------------------------------------------- /documentation/content/en/images/admin_guide/subforums_list.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/admin_guide/subforums_list.png -------------------------------------------------------------------------------- /documentation/content/en/images/user_guide/posting_options.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/user_guide/posting_options.png -------------------------------------------------------------------------------- /documentation/content/en/images/user_guide/smilies/rolleyes.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/user_guide/smilies/rolleyes.gif -------------------------------------------------------------------------------- /development/language/index.rst: -------------------------------------------------------------------------------- 1 | Languages and translations 2 | ========================== 3 | 4 | .. toctree:: 5 | :maxdepth: 2 6 | :glob: 7 | 8 | usage 9 | * 10 | -------------------------------------------------------------------------------- /documentation/content/en/images/admin_guide/creating_bbcodes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/admin_guide/creating_bbcodes.png -------------------------------------------------------------------------------- /documentation/content/en/images/admin_guide/database_restore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/admin_guide/database_restore.png -------------------------------------------------------------------------------- /documentation/content/en/images/admin_guide/permission_masks.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/admin_guide/permission_masks.gif -------------------------------------------------------------------------------- /documentation/content/en/images/user_guide/memberlist_sorting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/user_guide/memberlist_sorting.png -------------------------------------------------------------------------------- /documentation/content/en/images/user_guide/notifications_menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/user_guide/notifications_menu.png -------------------------------------------------------------------------------- /documentation/content/en/images/user_guide/quoted_text_author.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/user_guide/quoted_text_author.png -------------------------------------------------------------------------------- /documentation/content/en/images/user_guide/search_refinement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/user_guide/search_refinement.png -------------------------------------------------------------------------------- /documentation/content/en/images/user_guide/visual_confirmation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/user_guide/visual_confirmation.png -------------------------------------------------------------------------------- /documentation/content/en/images/admin_guide/extensions_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/admin_guide/extensions_overview.png -------------------------------------------------------------------------------- /documentation/content/en/images/moderator_guide/quick_mod_tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/moderator_guide/quick_mod_tools.png -------------------------------------------------------------------------------- /documentation/content/en/images/admin_guide/users_forum_permissions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/admin_guide/users_forum_permissions.png -------------------------------------------------------------------------------- /documentation/content/en/images/quick_start_guide/creating_forums.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/quick_start_guide/creating_forums.png -------------------------------------------------------------------------------- /documentation/content/en/images/quick_start_guide/permissions_roles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/quick_start_guide/permissions_roles.png -------------------------------------------------------------------------------- /documentation/content/en/images/quick_start_guide/permissions_types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/quick_start_guide/permissions_types.png -------------------------------------------------------------------------------- /documentation/content/en/images/quick_start_guide/settings_features.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/quick_start_guide/settings_features.png -------------------------------------------------------------------------------- /documentation/content/en/images/quick_start_guide/settings_sitename.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/quick_start_guide/settings_sitename.png -------------------------------------------------------------------------------- /documentation/content/en/images/user_guide/private_messsage_fields.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/user_guide/private_messsage_fields.png -------------------------------------------------------------------------------- /documentation/content/en/images/admin_guide/choose_group_permissions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/admin_guide/choose_group_permissions.png -------------------------------------------------------------------------------- /documentation/content/en/images/admin_guide/manage_forums_icon_legend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/admin_guide/manage_forums_icon_legend.png -------------------------------------------------------------------------------- /documentation/content/en/images/quick_start_guide/installation_intro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/quick_start_guide/installation_intro.png -------------------------------------------------------------------------------- /documentation/content/en/images/quick_start_guide/permissions_manual.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/quick_start_guide/permissions_manual.png -------------------------------------------------------------------------------- /documentation/content/en/images/quick_start_guide/permissions_select.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/quick_start_guide/permissions_select.png -------------------------------------------------------------------------------- /documentation/content/en/images/user_guide/typical_registration_page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/user_guide/typical_registration_page.png -------------------------------------------------------------------------------- /documentation/content/en/images/quick_start_guide/installation_database.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/quick_start_guide/installation_database.png -------------------------------------------------------------------------------- /documentation/content/en/images/quick_start_guide/permissions_moderator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/quick_start_guide/permissions_moderator.png -------------------------------------------------------------------------------- /documentation/content/en/images/admin_guide/setting_global_group_permissions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phpBB/documentation/3.3.x/documentation/content/en/images/admin_guide/setting_global_group_permissions.png -------------------------------------------------------------------------------- /development/_templates/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Redirecting to master branch 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /development/migrations/tools/index.rst: -------------------------------------------------------------------------------- 1 | ===== 2 | Tools 3 | ===== 4 | 5 | Migration Tools help you perform common actions more easily in the data 6 | installer of your Migration. 7 | 8 | .. toctree:: 9 | :maxdepth: 1 10 | :glob: 11 | 12 | * 13 | -------------------------------------------------------------------------------- /documentation/create_pdf.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Removing previous PDF" 4 | if [ -f proteus_doc.pdf ]; then 5 | rm proteus_doc.pdf 6 | fi 7 | 8 | echo "Creating new PDF" 9 | fop -xml proteus_doc.xml -xsl xsl/proteus_pdf.xsl -pdf proteus_doc.pdf 10 | 11 | echo "Done" 12 | -------------------------------------------------------------------------------- /documentation/create_pdf.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | ::Path to FOP 4 | set fop_path=C:\fop 5 | 6 | echo Removing previous PDF 7 | del proteus_doc.pdf 8 | 9 | echo Creating new PDF 10 | %fop_path%\fop -xml proteus_doc.xml -xsl xsl\proteus_pdf.xsl -pdf proteus_doc.pdf 11 | 12 | echo Done 13 | -------------------------------------------------------------------------------- /development/cli/index.rst: -------------------------------------------------------------------------------- 1 | Command Line Interface 2 | ====================== 3 | 4 | phpBB ships with a set of Command Line Interface (CLI) tools that allow for easy control over administrative and development functions via console or terminal application. 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | getting_started 10 | -------------------------------------------------------------------------------- /documentation/xsl/xhtml/docbookng.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /development/index.rst: -------------------------------------------------------------------------------- 1 | phpBB Development Documentation 2 | =============================== 3 | 4 | Contents: 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | development/processes 10 | development/git 11 | development/coding_guidelines 12 | cli/index 13 | auth/authentication 14 | db/dbal 15 | extensions/index 16 | files/index 17 | language/index 18 | migrations/index 19 | request/request 20 | testing/index 21 | development/phpstorm 22 | 23 | Indices and tables 24 | ================== 25 | 26 | * :ref:`genindex` 27 | * :ref:`search` 28 | -------------------------------------------------------------------------------- /development/testing/index.rst: -------------------------------------------------------------------------------- 1 | Testing 2 | ======= 3 | 4 | To ensure code integrity as new features are added and existing features are 5 | altered by patches, phpBB utilizes the PHPUnit test framework. This way, the 6 | development team can keep track of whether or not a change made to the core 7 | will effect other existing features in unforeseen ways. 8 | 9 | There are two main types of tests that can be written and run: unit tests, and 10 | functional tests. 11 | 12 | .. toctree:: 13 | :maxdepth: 2 14 | 15 | unit_testing 16 | functional_testing 17 | ui_testing 18 | -------------------------------------------------------------------------------- /development/extensions/index.rst: -------------------------------------------------------------------------------- 1 | Extensions 2 | ========== 3 | 4 | Welcome to phpBB's extension development tutorial and documentation. 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | :glob: 9 | 10 | tutorial_basics 11 | tutorial_key_concepts 12 | tutorial_events 13 | tutorial_controllers 14 | tutorial_migrations 15 | tutorial_modules 16 | tutorial_notifications 17 | tutorial_permissions 18 | tutorial_authentication 19 | tutorial_parsing_text 20 | tutorial_bbcodes 21 | tutorial_templates 22 | tutorial_advanced 23 | tutorial_testing 24 | modification_to_extension 25 | new_in_rhea 26 | new_in_proteus 27 | skeleton_extension 28 | events_list 29 | database_types_list 30 | -------------------------------------------------------------------------------- /development/_static/css/phpbb.css: -------------------------------------------------------------------------------- 1 | .wy-side-nav-search { 2 | background-color: #009BDF; 3 | } 4 | 5 | .wy-side-nav-search>div.version { 6 | color: rgba(255, 255, 255, 0.7); 7 | } 8 | 9 | .wy-nav-content { 10 | max-width: none; /* use max-width: 800px for button navigation, not content */ 11 | } 12 | 13 | .wy-table-responsive { 14 | clear: both; 15 | } 16 | 17 | .wy-table-responsive table { 18 | width: 100%; 19 | } 20 | 21 | .wy-table-responsive table td, 22 | .wy-table-responsive table th { 23 | white-space: normal; 24 | } 25 | 26 | .rst-footer-buttons { 27 | max-width: 800px; 28 | } 29 | 30 | table.docutils td>p:nth-last-child(n+1) { 31 | margin-top: 0.5rem; 32 | } 33 | 34 | .rst-versions.shift-up { 35 | overflow: auto; 36 | } 37 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # phpBB User Documentation 2 | 3 | Documentation for board visitors, moderators and administrators can be seen online [here](https://www.phpbb.com/support/documentation/3.3/). 4 | 5 | # phpBB Developer Documentation 6 | 7 | Documentation for phpBB development and extension authors can be seen online [here](https://area51.phpbb.com/docs/dev/). 8 | 9 | ## Get Involved 10 | 11 | Do you have an improvement, bug fix or translation for our Docs? Read our [Contributing guidelines](CONTRIBUTING.md) to help improve our Documentation. 12 | 13 | ## License 14 | Documentation © 2021 [phpBB Limited](https://www.phpbb.com/). 15 |
Licensed under the [CC Attribution-NonCommercial-ShareAlike 3.0](https://creativecommons.org/licenses/by-nc-sa/3.0/) license. 16 | -------------------------------------------------------------------------------- /documentation/xsl/pdf/fo/annotations.xsl: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /documentation/create_docs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # set this to the correct path 4 | path=${1:-'/var/www/phpbb.com/htdocs/support/documentation/3.3'} 5 | 6 | echo "Removing build directory" 7 | rm -rf build 8 | 9 | echo "Creating docs" 10 | xsltproc --xinclude xsl/proteus_php.xsl proteus_doc.xml 11 | exit_code=$? # Capture the exit code 12 | 13 | if [ "$exit_code" == "0" ]; then 14 | echo "Successfully created documentation" 15 | echo "Removing $path" 16 | rm -rf $path 17 | echo "Copying documentation to $path" 18 | cp -r build $path 19 | echo "Creating directory $path/images" 20 | mkdir $path/images 21 | echo "Copying images/* to $path/images/" 22 | cp -r content/en/images/* $path/images/ 23 | echo "Making documentation directory group writable" 24 | chmod g+w -R $path 25 | else 26 | echo "Failed creating documentation" 27 | fi 28 | 29 | # Output exit code 30 | exit $exit_code 31 | -------------------------------------------------------------------------------- /development/_templates/versions.html: -------------------------------------------------------------------------------- 1 | {%- if current_version %} 2 |
3 | 4 | Other Versions 5 | v: {{ current_version.name }} 6 | 7 | 8 |
9 | {%- if versions.tags %} 10 |
11 |
Tags
12 | {%- for item in versions.tags %} 13 |
{{ item.name }}
14 | {%- endfor %} 15 |
16 | {%- endif %} 17 | {%- if versions.branches %} 18 |
19 |
Branches
20 | {%- for item in versions.branches %} 21 |
{{ item.name }}
22 | {%- endfor %} 23 |
24 | {%- endif %} 25 |
26 |
27 | {%- endif %} 28 | -------------------------------------------------------------------------------- /documentation/xsl/pdf/fo/keywords.xsl: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /documentation/includes/xinclude.mod: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 22 | 23 | -------------------------------------------------------------------------------- /development/development/coding_guidelines.rst: -------------------------------------------------------------------------------- 1 | Coding Guidelines 2 | ================= 3 | 4 | phpBB's coding guidelines are maintained in its 5 | `source code repository `_. You can find the 6 | latest versions on area51: 7 | 8 | * Rules for `Olympus (3.0.x) code `_ 9 | * Rules for `Ascraeus (3.1.x) code `_ 10 | * Rules for `Rhea (3.2.x) code `_ 11 | * Rules for `Proteus (3.3.x) code `_ 12 | 13 | These documents are automatically updated when changes are made to them. 14 | 15 | JavaScript Linting 16 | ------------------ 17 | 18 | We use JSHint and JSCS for checking the quality of the JavaScript—JSHint for 19 | linting, and JSCS for ensuring consistent code. There is a .jshintrc and a 20 | .jscs file in the root of the project, and your editor probably has a plugin 21 | available which will show you when you violate these standards. 22 | 23 | -------------------------------------------------------------------------------- /documentation/xsl/proteus_pdf.xsl: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /documentation/proteus_doc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | phpBB 3.3 <emphasis>Proteus</emphasis> Documentation 5 | 6 | The detailed documentation for phpBB 3.3 Proteus. 7 | 8 | 9 | 10 | Dominik 11 | Dröscher 12 | 13 | 14 | Graham 15 | Eames 16 | 17 | 18 | 19 | 2005 20 | phpBB Group 21 | 22 | phpBB Group 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /documentation/xsl/common/targetdatabase.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 22 | 23 | 24 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 49 | -------------------------------------------------------------------------------- /documentation/xsl/xhtml/keywords.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | , 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /documentation/xsl/pdf/fo/info.xsl: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 15 | 16 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /documentation/xsl/pdf/common/targetdatabase.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 23 | 24 | 25 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 50 | -------------------------------------------------------------------------------- /documentation/xsl/pdf/fo/passivetex.xsl: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /documentation/xsl/common/l10n.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 27 | 28 | 29 | 34 | 35 | 36 | 41 | 42 | 43 | 46 | 47 | 48 | 54 | 55 | 56 | 59 | 60 | 61 | 64 | -------------------------------------------------------------------------------- /documentation/xsl/pdf/common/l10n.dtd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 27 | 28 | 29 | 34 | 35 | 36 | 41 | 42 | 43 | 46 | 47 | 48 | 54 | 55 | 56 | 59 | 60 | 61 | 64 | -------------------------------------------------------------------------------- /documentation/xsl/xhtml/onechunk.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 1 27 | 28 | 29 | 30 | # 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /documentation/xsl/xhtml/profile-onechunk.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 1 27 | 28 | 29 | 30 | # 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /documentation/xsl/xhtml/chunk.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /development/migrations/tools/config_text.rst: -------------------------------------------------------------------------------- 1 | ================ 2 | Config Text Tool 3 | ================ 4 | 5 | The config_text tool helps adding, updating, and removing config_text 6 | settings. The config_text table is used to store options with an arbitrary 7 | length value in a TEXT column. In contrast to config values, config_text are 8 | not cached or prefetched. 9 | 10 | Add Config_Text Setting 11 | ======================= 12 | 13 | Add a new config_text setting 14 | 15 | .. code-block:: php 16 | 17 | ['config_text.add', [config name, config value]], 18 | 19 | Example 20 | ------- 21 | 22 | .. code-block:: php 23 | 24 | public function update_data() 25 | { 26 | return [ 27 | ['config_text.add', ['foo', 'bar']], // Add Config_Text 'foo' with value 'bar'; 28 | ['config_text.add', ['foo2', 1]], // Add Config_Text 'foo2' with value '1'; 29 | ]; 30 | } 31 | 32 | Update Config_Text Setting 33 | ========================== 34 | 35 | Update a config_text setting 36 | 37 | .. code-block:: php 38 | 39 | ['config_text.update', [config name, new config value]], 40 | 41 | Example 42 | ------- 43 | 44 | .. code-block:: php 45 | 46 | public function update_data() 47 | { 48 | return [ 49 | ['config_text.update', ['foo', 'bar'], // Config_Text 'foo' updated to 'bar'; 50 | ]; 51 | } 52 | 53 | Delete Config_Text Setting 54 | ========================== 55 | 56 | Delete a config_text setting 57 | 58 | .. code-block:: php 59 | 60 | ['config_text.remove', [config name]], 61 | 62 | Example 63 | ------- 64 | 65 | .. code-block:: php 66 | 67 | public function update_data() 68 | { 69 | return [ 70 | ['config_text.remove', ['foo']], // Config_Text 'foo' removed; 71 | ]; 72 | } 73 | -------------------------------------------------------------------------------- /documentation/xsl/xhtml/profile-chunk.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /development/migrations/index.rst: -------------------------------------------------------------------------------- 1 | ========== 2 | Migrations 3 | ========== 4 | 5 | Beginning with phpBB 3.1, database updating is performed using Migrations. 6 | 7 | Migrations was built because of the difficulties of distributed development 8 | and maintaining an updated database setup across all developers. 9 | 10 | RFC Topic if you're interested in the reasons: 11 | ``_ 12 | 13 | .. toctree:: 14 | :maxdepth: 1 15 | :glob: 16 | 17 | getting_started 18 | dependencies 19 | schema_changes 20 | data_changes 21 | tools/index 22 | 23 | What do Migrations mean for me? 24 | =============================== 25 | 26 | As a user 27 | --------- 28 | 29 | Migrations do not affect using phpBB, only writing code for it, so 30 | Administrators do not have to do anything differently. 31 | 32 | Database updates between versions of phpBB and Extension updates will be 33 | safer and, in the unlikely event something happens during database changes, 34 | much easier to debug and correct. 35 | 36 | As an Extension author 37 | ---------------------- 38 | 39 | Functionality (similar to UMIL for phpBB 3.0) built into phpBB for easier 40 | management of database changes between versions and helpful tools to assist 41 | making database changes. 42 | 43 | As a Developer 44 | -------------- 45 | 46 | Easier collaboration with others, less time spent managing database changes 47 | between different branches and pull requests. 48 | 49 | How do I use Migrations? 50 | ======================== 51 | 52 | Getting started with Migrations 53 | ------------------------------- 54 | 55 | How to create a basic Migration file 56 | :doc:`getting_started` 57 | 58 | Migration Helpers 59 | ----------------- 60 | 61 | How to use Migration helpers to perform basic database changes 62 | :doc:`tools/index` 63 | -------------------------------------------------------------------------------- /documentation/xsl/pdf/common/autoidx-kimber.xsl: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | ]> 9 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | ERROR: the 'kimber' index method requires the 30 | Saxon version 6 or 8 XSLT processor. 31 | 32 | 33 | 1 34 | 35 | 36 | 37 | 38 | 39 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /documentation/xsl/xhtml/htmltbl.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /documentation/xsl/proteus_xhtml.xsl: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 35 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /documentation/xsl/xhtml/info.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: Test make documentation 2 | 3 | on: 4 | push: 5 | branches: 6 | - master 7 | - '[34].[0-9]+.x' 8 | pull_request: 9 | branches: 10 | - master 11 | - '[34].[0-9]+.x' 12 | 13 | jobs: 14 | build-dev-docs: 15 | name: 'Build development docs' 16 | runs-on: ubuntu-latest 17 | steps: 18 | - uses: actions/checkout@v4 19 | - name: Set up Python 20 | uses: actions/setup-python@v4 21 | with: 22 | python-version: '3.x' 23 | - name: Install dependencies 24 | run: | 25 | python -m pip install --upgrade pip 26 | pip install sphinx 27 | pip install sphinx_rtd_theme 28 | pip install sphinxcontrib-phpdomain 29 | pip install sphinx-multiversion 30 | pip install git+https://github.com/marc1706/sphinx-php.git 31 | - name: Test make html 32 | run: | 33 | cd development 34 | make html 35 | 36 | build-user-docs-pdf: 37 | name: 'Build user docs PDF' 38 | runs-on: ubuntu-latest 39 | steps: 40 | - uses: actions/checkout@v4 41 | - name: Install fop 42 | run: | 43 | sudo apt-get install -y fop libxerces2-java libxalan2-java libserializer-java 44 | - name: Build pdf documentation 45 | working-directory: ${{ github.workspace }}/documentation 46 | run: | 47 | ./create_pdf.sh 48 | - name: Archive PDF output 49 | uses: actions/upload-artifact@v4 50 | with: 51 | name: Documentation PDF 52 | path: ${{ github.workspace }}/documentation/*.pdf 53 | 54 | build-user-docs-website: 55 | name: 'Build user docs for website' 56 | runs-on: ubuntu-latest 57 | steps: 58 | - uses: actions/checkout@v4 59 | - name: Install xsltproc 60 | run: | 61 | sudo apt-get install -y xsltproc 62 | - name: Build documentation for website 63 | working-directory: ${{ github.workspace }}/documentation 64 | run: | 65 | mkdir build_website 66 | ./create_docs.sh build_website 67 | -------------------------------------------------------------------------------- /development/migrations/tools/config.rst: -------------------------------------------------------------------------------- 1 | =========== 2 | Config Tool 3 | =========== 4 | 5 | The config tool helps adding, updating, and removing config settings. 6 | 7 | Add Config Setting 8 | ================== 9 | 10 | Add a new config setting 11 | 12 | .. code-block:: php 13 | 14 | ['config.add', [config name, config value, is dynamic (default: false) ]], 15 | 16 | Example 17 | ------- 18 | 19 | .. code-block:: php 20 | 21 | public function update_data() 22 | { 23 | return [ 24 | ['config.add', ['foo', 'bar']], // $config['foo'] = 'bar'; 25 | ['config.add', ['foo2', 1, true]], // $config['foo2'] = '1'; Dynamic, do not cache 26 | ]; 27 | } 28 | 29 | Update Config Setting 30 | ===================== 31 | 32 | Update a config setting 33 | 34 | .. code-block:: php 35 | 36 | ['config.update', [config name, new config value]], 37 | 38 | Example 39 | ------- 40 | 41 | .. code-block:: php 42 | 43 | public function update_data() 44 | { 45 | return [ 46 | ['config.update', ['foo', 'bar']], // $config['foo'] = 'bar'; 47 | ]; 48 | } 49 | 50 | Update if current value equals specific value 51 | ============================================= 52 | 53 | Update a config setting if the current config value is equal to a specified 54 | value 55 | 56 | .. code-block:: php 57 | 58 | ['config.update_if_equals', [compare to, config name, new config value]], 59 | 60 | Example 61 | ------- 62 | 63 | .. code-block:: php 64 | 65 | public function update_data() 66 | { 67 | return [ 68 | ['config.update_if_equals', ['bar', 'foo', 'bar2']], // if ($config['foo'] == 'bar') { $config['foo'] = 'bar2'; } 69 | ]; 70 | } 71 | 72 | Delete Config Setting 73 | ===================== 74 | 75 | Delete a config setting 76 | 77 | .. code-block:: php 78 | 79 | ['config.remove', [config name]], 80 | 81 | Example 82 | ------- 83 | 84 | .. code-block:: php 85 | 86 | public function update_data() 87 | { 88 | return [ 89 | ['config.remove', ['foo']], // unset($config['foo']); 90 | ]; 91 | } 92 | -------------------------------------------------------------------------------- /documentation/xsl/pdf/COPYING: -------------------------------------------------------------------------------- 1 | Copyright 2 | --------- 3 | Copyright (C) 1999-2007 Norman Walsh 4 | Copyright (C) 2003 Jiří Kosek 5 | Copyright (C) 2004-2007 Steve Ball 6 | Copyright (C) 2005-2008 The DocBook Project 7 | 8 | Permission is hereby granted, free of charge, to any person 9 | obtaining a copy of this software and associated documentation 10 | files (the ``Software''), to deal in the Software without 11 | restriction, including without limitation the rights to use, 12 | copy, modify, merge, publish, distribute, sublicense, and/or 13 | sell copies of the Software, and to permit persons to whom the 14 | Software is furnished to do so, subject to the following 15 | conditions: 16 | 17 | The above copyright notice and this permission notice shall be 18 | included in all copies or substantial portions of the Software. 19 | 20 | Except as contained in this notice, the names of individuals 21 | credited with contribution to this software shall not be used in 22 | advertising or otherwise to promote the sale, use or other 23 | dealings in this Software without prior written authorization 24 | from the individuals in question. 25 | 26 | Any stylesheet derived from this Software that is publically 27 | distributed will be identified with a different name and the 28 | version strings in any derived Software will be changed so that 29 | no possibility of confusion between the derived package and this 30 | Software will exist. 31 | 32 | Warranty 33 | -------- 34 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 35 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 36 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 37 | NONINFRINGEMENT. IN NO EVENT SHALL NORMAN WALSH OR ANY OTHER 38 | CONTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 39 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 40 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 41 | OTHER DEALINGS IN THE SOFTWARE. 42 | 43 | Contacting the Author 44 | --------------------- 45 | The DocBook XSL stylesheets are maintained by Norman Walsh, 46 | , and members of the DocBook Project, 47 | 48 | -------------------------------------------------------------------------------- /documentation/xsl/common/l10n.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | ]> 50 | 51 | ⁡ 52 | &ar; 53 | &bg; 54 | &bn; 55 | &bs; 56 | &ca; 57 | &cs; 58 | &da; 59 | &de; 60 | ⪙ 61 | &en; 62 | &es; 63 | &et; 64 | &eu; 65 | &fa; 66 | &fi; 67 | &fr; 68 | &he; 69 | &hr; 70 | &hu; 71 | &id; 72 | ⁢ 73 | &ja; 74 | &ko; 75 | &la; 76 | &lit; 77 | &nl; 78 | &nn; 79 | &no; 80 | &pl; 81 | &pt; 82 | &pt_br; 83 | &ro; 84 | &ru; 85 | &sk; 86 | &sl; 87 | &sr; 88 | &sr_Latn; 89 | &sv; 90 | &th; 91 | &tr; 92 | &uk; 93 | &vi; 94 | &xh; 95 | &zh_cn; 96 | &zh_tw; 97 | 98 | -------------------------------------------------------------------------------- /development/files/filespec.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | The filespec class 3 | ================== 4 | 5 | The newly introduced files ``filespec`` class replaces the previously existing ``filespec`` class. 6 | 7 | Passing settings to filespec class 8 | ================================== 9 | 10 | In phpBB versions prior to 3.2, the ``$upload_ary`` and ``$upload_namespace`` were 11 | passed to the ``filespec`` class via the constructor. Since these are now retrieved via the container 12 | infrastructure, this is no longer possible. Instead, the new ``filespec`` class incorporates 2 13 | methods for easily setting the necessary data: 14 | 15 | - ``set_upload_ary($upload_ary)`` 16 | - ``set_upload_namespace($namespace)`` 17 | 18 | Each of these methods returns the current instance of the ``filespec`` class allowing for chained calls: 19 | 20 | .. code-block:: php 21 | 22 | $filespec->set_upload_ary($upload_ary) 23 | ->set_upload_namespace($namespace); 24 | 25 | Retrieving property values 26 | ========================== 27 | 28 | Values of ``filespec`` properties can easily be retrieved with the ``get()`` method. 29 | Simply pass the name of the property to retrieve and it will returns its value. 30 | 31 | .. code-block:: php 32 | 33 | $filename = $filespec->get('filename'); 34 | 35 | .. note:: 36 | 37 | ``get()`` will return false if the specified property does not exist or if the class was not properly initialized. 38 | 39 | Clean file name 40 | =============== 41 | 42 | ``filespec`` supports several ways of cleaning the filename depending on the specified mode with 43 | the ``clean_filename()`` method. 44 | Possible modes are: 45 | 46 | - avatar 47 | Builds name based on specified prefix and ID 48 | - real 49 | Creates a lowercase name and removes some possibly troublesome characters 50 | - unique 51 | Creates unique filename without extension 52 | - unique_ext 53 | Creates unique filename with extension 54 | 55 | Move file to location 56 | ===================== 57 | 58 | It is possible to move the uploaded file to a specified location with the ``move_file()`` method. 59 | 60 | .. code-block:: php 61 | 62 | move_file($destination, $overwrite = false, $skip_image_check = false, $chmod = false) 63 | 64 | ``$destination``: Path to move file to 65 | 66 | ``$overwrite``: Whether existing files should be overwritten 67 | 68 | ``$skip_image_check``: Whether to skip if the image is valid 69 | 70 | ``$chmod``: Permission mask file should be set to with ``chmod()`` 71 | -------------------------------------------------------------------------------- /.github/workflows/merge_3.3.x_to_master.yml: -------------------------------------------------------------------------------- 1 | name: Merge 3.3.x into master 2 | 3 | on: 4 | push: 5 | branches: 6 | - 3.3.x 7 | 8 | jobs: 9 | merge-branch: 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/create-github-app-token@v1 14 | id: app-token 15 | with: 16 | app-id: ${{ vars.MERGE_MASTER_APP_ID }} 17 | private-key: ${{ secrets.MERGE_MASTER_SECRET }} 18 | 19 | - name: Checkout the repository 20 | uses: actions/checkout@v4 21 | with: 22 | fetch-depth: 0 # Fetch full history for proper merging 23 | ref: 3.3.x # Checkout the 3.3.x branch 24 | token: ${{ steps.app-token.outputs.token }} 25 | 26 | - name: Fetch the latest commit information 27 | id: get-commit-info 28 | run: | 29 | # Get the latest commit SHA and its author details 30 | COMMIT_SHA=$(git rev-parse HEAD) 31 | COMMIT_AUTHOR_NAME=$(git log -1 --pretty=format:'%an' $COMMIT_SHA) 32 | COMMIT_AUTHOR_EMAIL=$(git log -1 --pretty=format:'%ae' $COMMIT_SHA) 33 | 34 | # Save them as output for later steps 35 | echo "commit_sha=$COMMIT_SHA" >> $GITHUB_ENV 36 | echo "commit_author_name=$COMMIT_AUTHOR_NAME" >> $GITHUB_ENV 37 | echo "commit_author_email=$COMMIT_AUTHOR_EMAIL" >> $GITHUB_ENV 38 | 39 | - name: Set up Git with the pull request author's info 40 | run: | 41 | git config --global user.name "${{ env.commit_author_name }}" 42 | git config --global user.email "${{ env.commit_author_email }}" 43 | 44 | - name: Fetch all branches 45 | run: git fetch --all 46 | 47 | - name: Merge 3.3.x into master 48 | run: | 49 | git checkout master 50 | if git merge --no-ff 3.3.x; then 51 | echo "merge_failed=false" >> $GITHUB_ENV 52 | else 53 | echo "merge_failed=true" >> $GITHUB_ENV 54 | fi 55 | 56 | - name: Push changes to master if merge was successful 57 | if: env.merge_failed == 'false' 58 | run: git push origin master 59 | env: 60 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 61 | -------------------------------------------------------------------------------- /documentation/xsl/xhtml/task.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | before 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 |
36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |
48 |
49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 |
67 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contribute to phpBB Documentation 2 | 3 | Do you have an improvement, bug fix or translation for our Docs? 4 | 5 | ## Contents: 6 | 1. [Fork and Clone](#fork-and-clone) 7 | 2. [Create a Branch](#create-a-branch) 8 | 3. [Submit a Pull Request](#submit-a-pull-request) 9 | 4. [Build Development Docs](#build-development-docs) 10 | 11 | ## Fork and Clone 12 | 13 | 1. On GitHub, create a fork of `phpbb/documentation` to your GitHub account. 14 | 15 | 2. Create a local clone of your fork: 16 | ```shell 17 | $ git clone git://github.com/YOUR_GITHUB_NAME/documentation.git 18 | ``` 19 | 20 | ## Create a Branch 21 | 22 | 1. Create a new branch in your repository before doing any work. It should be based off the branch you intend to update: 23 | ```shell 24 | $ git checkout -b myNewbranch origin/master 25 | ``` 26 | 27 | 2. Do work on your branch, commit your changes and push it to your repository: 28 | ```shell 29 | $ git commit -a -m "My new feature or bug fixes" 30 | $ git push origin myNewbranch 31 | ``` 32 | 33 | ## Submit a Pull Request 34 | 35 | 1. Go to your repository on GitHub.com. 36 | 37 | 2. Click the Pull Request button. 38 | 39 | 3. Make sure the correct branch is selected in the base branch dropdown menu. 40 | 41 | ## Build Development Docs 42 | 43 | You can build our Development Docs in your local environment to make it easier when writing new or updated 44 | documentation. The following steps may vary slightly depending on your OS, so if you run into any trouble you may 45 | ask for guidance in our [Discord or IRC Channels](https://www.phpbb.com/support/chat/). 46 | 47 | 1. Make sure you have Python3 installed (you can check by running `$ python -V`) 48 | 49 | 2. Make sure your have PIP installed (you can check by running `$ pip -V`) 50 | 51 | 3. Install [Sphinx Docs](https://www.sphinx-doc.org/en/master/usage/installation.html): 52 | ```shell 53 | $ pip install -U sphinx 54 | ``` 55 | 56 | 4. Verify Sphinx installed: 57 | ```shell 58 | $ sphinx-build --version 59 | ``` 60 | > You may need to set a shell $PATH variable to point to wherever your Sphinx binaries were installed in your system 61 | 62 | 5. Install all the dependencies needed for our Docs: 63 | ```shell 64 | $ pip install sphinx_rtd_theme 65 | $ pip install sphinxcontrib-phpdomain 66 | $ pip install sphinx-multiversion 67 | $ sudo pip install git+https://github.com/marc1706/sphinx-php.git 68 | ``` 69 | 70 | 6. Build the Docs 71 | ```shell 72 | $ cd development 73 | $ make html 74 | ``` 75 | 76 | 7. You can now view the Docs by pointing a browser to `development/_build/html/index.html` 77 | -------------------------------------------------------------------------------- /documentation/xsl/lib/ChangeLog: -------------------------------------------------------------------------------- 1 | 2004-12-02 Michael Smith 2 | 3 | * Makefile: New file. 4 | 5 | 2004-09-24 Robert Stayton 6 | 7 | * lib.xweb: Fixed param prototype to remove Saxon8 warning. 8 | 9 | 2004-08-11 Robert Stayton 10 | 11 | * lib.xweb: Fixed problem of PI name suffix being matched instead of whole name. 12 | 13 | 2003-04-05 Adam Di Carlo 14 | 15 | * lib.xweb: a pica is 12 points, rather than a sixth of an inch 16 | 17 | 2003-03-26 Michael Smith 18 | 19 | * Makefile: branches: 1.5.2; 20 | wdocbook.xsl obsoleted by w2docbook.xsl, updated globally 21 | 22 | 2003-03-25 Michael Smith 23 | 24 | * Makefile: reverting wdocbook.xsl -> w2docbook.xsl changes 25 | 26 | 2003-03-05 Michael Smith 27 | 28 | * Makefile: 29 | 30 | Wrong filename was breaking build, fixed. 31 | 32 | Had ../../litprog/wdocbook.xsl but needed ../../litprog/w2docbook.xsl 33 | 34 | 2002-09-15 Norman Walsh 35 | 36 | * lib.xweb: Fix bug where PIs match the suffix of a name instead of the whole name 37 | 38 | 2002-06-09 Norman Walsh 39 | 40 | * lib.xweb: Fix bug #496453: make sure comments don't contain illegal chars 41 | 42 | 2002-05-12 Norman Walsh 43 | 44 | * lib.xweb: Changed default units to px; added length-in-points template 45 | 46 | 2002-03-25 Norman Walsh 47 | 48 | * .cvsignore: Ignore lib.xsl too 49 | 50 | * .cvsignore, Makefile, lib.xsl, lib.xweb: Use Literate XML to generate lib.xsl 51 | 52 | * Makefile: Update documentation build to reflect use of lib.xweb 53 | 54 | 2002-03-18 Norman Walsh 55 | 56 | * lib.xsl: Replace generate.*.toc and generate.*.lot with single generate.toc parameter. 57 | 58 | 2002-03-14 Norman Walsh 59 | 60 | * lib.xsl: Whitespace only: change CR/LF back to LF. Norm was a total moron. 61 | 62 | * lib.xsl: Whitespace changes only: use PC-style CR/LF because Unix clients choke on this far less often than PC clients choke on the reverse. Grrr. 63 | 64 | 2002-01-09 Norman Walsh 65 | 66 | * lib.xsl: Added length-units template to extract units from lengths 67 | 68 | 2001-11-28 Norman Walsh 69 | 70 | * lib.xsl: Added pi-attribute template 71 | 72 | 2001-04-03 Norman Walsh 73 | 74 | * lib.xsl: Documentation fixes 75 | 76 | 2001-04-02 Norman Walsh 77 | 78 | * lib.xsl: New file. 79 | 80 | -------------------------------------------------------------------------------- /development/files/overview.rst: -------------------------------------------------------------------------------- 1 | ================= 2 | The files classes 3 | ================= 4 | 5 | phpBB 3.2 introduces two new classes for uploading files: filespec and upload. 6 | These have been refactored and are based on the previously available filespec 7 | and fileupload classes. In addition to that, there is also a factory class which 8 | can be used for easy access to the files classes. 9 | 10 | .. warning:: 11 | The previously used file ``functions_upload.php`` no longer exists. 12 | Instead, the newly added classes should be passed to your classes, 13 | controllers, etc. using the container infrastructure. 14 | 15 | Overview of available classes 16 | ============================= 17 | 18 | factory 19 | ******* 20 | ``\phpbb\files\factory`` 21 | 22 | Provides easier access to files classes, e.g. inside the files classes 23 | themselves. 24 | 25 | filespec 26 | ******** 27 | ``\phpbb\files\filespec`` 28 | 29 | Responsible for holding all file relevant information, as well as doing 30 | file-specific operations. 31 | 32 | upload 33 | ****** 34 | ``\phpbb\files\upload`` 35 | 36 | Used for actual file uploads. Is also used for checking for valid files and 37 | moving files. 38 | 39 | Using the container to retrieve the classes 40 | =========================================== 41 | 42 | The files classes can easily be retrieved using the container: 43 | 44 | .. code-block:: php 45 | 46 | $factory = $phpbb_container->get('files.factory'); 47 | $upload = $phpbb_container->get('files.upload'); 48 | $filespec = $phpbb_container->get('files.filespec'); 49 | 50 | The filespec and upload classes are defined with the prototype scope. 51 | This results in the container returning a new instance of these classes every time one calls the get() method. 52 | 53 | .. warning:: 54 | If a class outside the prototype scope gets passed an instance of the upload or filespec class, 55 | the class will always use the same instance. As a result of that, it is recommended to use the 56 | factory for retrieving a new instance of the required class(es) during runtime. 57 | 58 | Using the factory to retrieve the classes 59 | ========================================= 60 | 61 | The factory class can be used to retrieve the files classes without the need to use the container itself. 62 | It can be passed as a service to a class: 63 | 64 | .. code-block:: yaml 65 | 66 | myclass: 67 | class: some\namespace\myclass 68 | arguments: 69 | - '@files.factory' 70 | 71 | Of course, the class can also be instantiated manually: 72 | 73 | .. code-block:: php 74 | 75 | $files_factory = new phpbb\files\factory($phpbb_container); 76 | 77 | Once the factory is available, the other class can be retrieved using the ``get()`` method: 78 | 79 | .. code-block:: php 80 | 81 | $filespec = $files_factory->get('files.filespec'); 82 | -------------------------------------------------------------------------------- /documentation/xsl/xhtml/chunkfast.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /documentation/xsl/pdf/common/l10n.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | ]> 67 | 68 | ⁡ 69 | &am; 70 | &ar; 71 | &az; 72 | &bg; 73 | &bn; 74 | &bs; 75 | &ca; 76 | &cs; 77 | &cy; 78 | &da; 79 | &de; 80 | ⪙ 81 | &en; 82 | &eo; 83 | &es; 84 | &et; 85 | &eu; 86 | &fa; 87 | &fi; 88 | &fr; 89 | &ga; 90 | ≷ 91 | &gu; 92 | &he; 93 | &hi; 94 | &hr; 95 | &hu; 96 | &id; 97 | ⁢ 98 | &ja; 99 | &kn; 100 | &ko; 101 | &la; 102 | &lit; 103 | &lv; 104 | &mn; 105 | &nl; 106 | &nn; 107 | &nb; 108 | ∨ 109 | &pa; 110 | &pl; 111 | &pt; 112 | &pt_br; 113 | &ro; 114 | &ru; 115 | &sk; 116 | &sl; 117 | &sq; 118 | &sr; 119 | &sr_Latn; 120 | &sv; 121 | &ta; 122 | &th; 123 | &tl; 124 | &tr; 125 | &uk; 126 | &vi; 127 | &xh; 128 | &zh; 129 | &zh_cn; 130 | &zh_tw; 131 | 132 | -------------------------------------------------------------------------------- /documentation/xsl/pdf/fo/task.xsl: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | before 33 | 34 | 35 | 36 | 37 | 38 | 39 | 42 | 43 | 44 | 45 | 46 | 47 | 49 | 50 | 51 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /documentation/xsl/xhtml/maketoc.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | filename=" 51 | 52 | " 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /development/migrations/getting_started.rst: -------------------------------------------------------------------------------- 1 | =============== 2 | Getting started 3 | =============== 4 | 5 | To get started with Migrations, we need to first create a Migration file that 6 | will hold the list of database changes. 7 | 8 | Before we get started, first you should remember that with Migrations there is 9 | no limit to the number of Migration files. This means that you're free to create 10 | migration files as you need, whether you want to create a single file per 11 | version, per feature, or even for every change you make to the database -- it is 12 | entirely up to you! 13 | 14 | Where do I create the Migration file? 15 | ===================================== 16 | 17 | Extension Author 18 | ---------------- 19 | Create a directory in ``ext/vendor/extension/`` called migrations. All of your 20 | Migration files should be in this directory. 21 | 22 | Developer 23 | --------- 24 | 25 | phpBB Migration files are in ``phpbb/db/migration/data/``. You may make a file 26 | in this directory OR make a subdirectory if you plan on creating multiple 27 | Migration files for a single feature. 28 | 29 | What must go in the Migration file? 30 | =================================== 31 | 32 | The only absolute requirement is creating a new class that extends 33 | ``\phpbb\db\migration\migration``: 34 | 35 | .. code-block:: php 36 | 37 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | DocBook 14 | XSL Stylesheets 15 | 1.68.1 16 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | Minor bugfixes 26 | 27 | 28 | 29 | 30 | http://sourceforge.net/projects/docbook/ 31 | http://prdownloads.sourceforge.net/docbook/docbook-xsl-{VERSION}.tar.gz?download 32 | http://prdownloads.sourceforge.net/docbook/docbook-xsl-{VERSION}.zip?download 33 | http://prdownloads.sourceforge.net/docbook/docbook-xsl-{VERSION}.bz2?download 34 | http://sourceforge.net/project/shownotes.php?release_id={SFRELID} 35 | http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/docbook/xsl/ 36 | http://lists.oasis-open.org/archives/docbook-apps/ 37 | This is a minor bug-fix update to the 1.68.0 release. 38 | 39 | 40 | 41 | 42 | 43 | 44 | You must specify the sf-relid as a parameter. 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | : 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | : 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | : 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /documentation/xsl/xhtml/html.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | # 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | # 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | bullet 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | bullet 68 | 69 | 70 | © 71 | 72 | 73 | ® 74 | (SM) 75 |   76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /documentation/style.css: -------------------------------------------------------------------------------- 1 | /* phpBB 3.3 Documentation Style Sheet 2 | */ 3 | 4 | body { 5 | font-family: Verdana, Helvetica, Arial, sans-serif; 6 | padding: 10px; 7 | background-color: #e4edf0; 8 | font-size: 0.9em; 9 | line-height: 1.3em; 10 | } 11 | div.section, div.chapter, div.titlepage, div.toc { 12 | background-color: #fff; 13 | padding: 0.4em 1em; 14 | margin: 0.5em 0em; 15 | border: solid 1px #a9b8c2; 16 | -moz-border-radius: 10px 10px 10px 10px; 17 | } 18 | div.titlepage { 19 | margin-bottom: 0; 20 | -moz-border-radius: 10px 10px 0px 0px; 21 | border-bottom: none; 22 | } 23 | 24 | div.toc{ 25 | margin-top: 0; 26 | -moz-border-radius: 0px 0px 10px 10px; 27 | border-top: none; 28 | padding-top: 0; 29 | } 30 | div.toc p { 31 | margin-top: 0; 32 | } 33 | 34 | div.section div.titlepage, div.chapter div.toc, div.chapter div.titlepage { 35 | border: none; 36 | padding: 0; 37 | margin: 0; 38 | -moz-border-radius: 0; 39 | } 40 | 41 | div.section div.section { 42 | padding: 0; 43 | border: solid 1px #a9b8c2; 44 | border: none; 45 | } 46 | div.author h3 { 47 | display: none; 48 | } 49 | 50 | div.tip, div.important, div.note { 51 | margin: 0 !important; 52 | font-family: Trebuchet MS; 53 | border: 1px solid #ddd; 54 | padding: 0.5em; 55 | -moz-border-radius: 1em; 56 | clear: both; 57 | } 58 | div.tip { 59 | background-color: #ff9; 60 | } 61 | div.important { 62 | background-color: #f90; 63 | } 64 | div.note { 65 | background-color: #ff9; 66 | } 67 | div.tip h3, div.important h3, div.note h3 { 68 | margin: 0; 69 | padding: 0; 70 | } 71 | 72 | 73 | div.tip p, div.important p, div.note p { 74 | margin: 0; 75 | } 76 | 77 | ul li p, ol li p{ 78 | margin: 0; 79 | } 80 | 81 | hr { 82 | display: none; 83 | } 84 | div.navheader, div.navfooter { 85 | background-color: #ffffff; 86 | padding: 0.4em 0; 87 | color: #333; 88 | border: solid 1px #a9b8c2; 89 | -moz-border-radius: 10px 10px 10px 10px; 90 | } 91 | div.navheader td, div.navfooter td{ 92 | padding: 0em 1em; 93 | } 94 | div.navheader a, div.navfooter a { 95 | font-family: Arial; 96 | 97 | 98 | } 99 | div.navfooter { 100 | -moz-border-radius: 10px 10px 10px 10px; 101 | clear: both; 102 | } 103 | 104 | .figure { 105 | float: left; 106 | margin: 10px 0; 107 | clear: both; 108 | margin-top: 20px; 109 | 110 | 111 | } 112 | .figure .title { 113 | font-family: Arial; 114 | margin: 0; 115 | 116 | margin-left: 10px; 117 | background-color: #e1ebf2; 118 | display: inline; 119 | -moz-border-radius: 10px 10px 0 0; 120 | padding: 10px; 121 | padding-top: 5px; 122 | } 123 | .figure .title b{ 124 | font-weight: normal; 125 | } 126 | .mediaobject img { 127 | display: block; 128 | background-color: #e1ebf2; 129 | padding: 10px; 130 | -moz-border-radius: 10px; 131 | 132 | } 133 | .mediaobject .caption p{ 134 | text-align: center; 135 | font-size: 0.8em; 136 | line-height: 1em; 137 | margin: 0; 138 | padding: 0; 139 | margin-top: 5px; 140 | font-style: italic; 141 | 142 | } 143 | 144 | .guilabel { 145 | text-transform: uppercase; 146 | font-size: 0.8em; 147 | font-family: Arial; 148 | } 149 | p { 150 | clear: both; 151 | } 152 | 153 | h1, h2, h3, h4 { 154 | clear: both; 155 | } 156 | div.copyright { 157 | font-size: 0.6em; 158 | margin-top: 1em; 159 | line-height: 1em; 160 | margin: 1em 50px; 161 | font-family: Arial; 162 | } 163 | 164 | .list-of-figures { 165 | display: none; 166 | } 167 | 168 | .variablelist dt { 169 | font-weight: bold; 170 | margin: 0; 171 | } 172 | .variablelist dd p { 173 | font-style: italic; 174 | margin: 0; 175 | padding: 0; 176 | } 177 | .variablelist dd { 178 | margin-bottom: 1em; 179 | margin-left: 0; 180 | } -------------------------------------------------------------------------------- /documentation/xsl/xhtml/changebars.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 39 | 40 | 41 | 42 | 43 | 44 |
45 | 46 |
47 |
48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | Revisionflag on unexpected element: 60 | 61 | (Assuming block) 62 | 63 |
64 | 65 |
66 |
67 |
68 |
69 | 70 |
71 | -------------------------------------------------------------------------------- /development/migrations/dependencies.rst: -------------------------------------------------------------------------------- 1 | ============ 2 | Dependencies 3 | ============ 4 | 5 | Dependencies tell the Migrator what order Migrations must be installed in. 6 | 7 | Declaring Dependencies 8 | ====================== 9 | 10 | In your Migration file, add a static public function named depends_on(), 11 | returning an array. 12 | 13 | .. code-block:: php 14 | 15 | static public function depends_on() 16 | { 17 | return []; 18 | } 19 | 20 | All that is needed is to add the class name(s) of the Migration(s) that the 21 | current Migration depends on. 22 | 23 | For example, the migration ``phpbb\db\migration\data\v310\dev`` depends on the 24 | extensions, style update, reported posts display, and timezone migrations to 25 | have already been installed. 26 | 27 | .. code-block:: php 28 | 29 | static public function depends_on() 30 | { 31 | return [ 32 | '\phpbb\db\migration\data\v310\extensions', 33 | '\phpbb\db\migration\data\v310\style_update_p2', 34 | '\phpbb\db\migration\data\v310\timezone_p2', 35 | '\phpbb\db\migration\data\v310\reported_posts_display', 36 | '\phpbb\db\migration\data\v310\migrations_table', 37 | ]; 38 | } 39 | 40 | .. note:: 41 | 42 | It is highly recommended to add a dependency for all migrations. If 43 | the migration is the first migration of your extension just depend on the 44 | release migration of the minimum phpBB requirement of your extension, e.g. 45 | 3.1.4: 46 | 47 | .. code-block:: php 48 | 49 | static public function depends_on() 50 | { 51 | return [ 52 | '\phpbb\db\migration\data\v31x\v314', 53 | ]; 54 | } 55 | 56 | depends_on creates a tree 57 | ========================= 58 | 59 | Imagine the following situation: 60 | 61 | .. csv-table:: 62 | :header: "Migration", "Dependencies", "Note" 63 | :delim: | 64 | 65 | ``migration_1`` | ``phpbb\db\migration\data\\v310\\dev`` | Initial release, 1.0.0, requires phpBB 3.1.0 66 | ``migration_2`` | ``migration_1`` | New feature for 1.0.1 (during development) 67 | ``migration_3`` | ``migration_1`` | Another new feature for 1.0.1 (during development) 68 | ``migration_4`` | ``migration_2`` | Modifying the feature in ``migration_2`` 69 | ``migration_5`` | ``migration_3``, ``migration_4`` | Release 1.0.1 70 | 71 | This dependency setup would cause the following Migrations to be additionally 72 | installed when an individual Migration was installed manually. *Assumes* 73 | ``phpbb\db\migration\data\v310\dev`` *is already installed.* 74 | 75 | 76 | .. csv-table:: 77 | :header: "Install", "Migrations that are installed" 78 | :delim: | 79 | 80 | ``migration_1`` | ``migration_1`` 81 | ``migration_2`` | ``migration_1``, ``migration_2`` 82 | ``migration_3`` | ``migration_1``, ``migration_3`` 83 | ``migration_4`` | ``migration_1``, ``migration_2``, ``migration_4`` 84 | ``migration_5`` | ``migration_1``, ``migration_2``, ``migration_4``, ``migration_3``, ``migration_5`` 85 | 86 | What does this mean for me? 87 | =========================== 88 | 89 | You must specify all dependencies that the current Migration has, but not any 90 | that the dependencies list as dependencies for their own installation. 91 | 92 | This means that ``migration_5`` doesn't need to list ``migration_1`` through 93 | ``migration_4`` as a dependency, only ``migration_3`` and ``migration_4`` 94 | because those Migrations already require ``migration_1`` and ``migration_2``. 95 | 96 | This also means that the desired order of operations is preserved. In the above 97 | example, ``migration_4`` modifies the feature in ``migration_2`` and must be 98 | applied after ``migration_2`` is installed. Similarly, in the above example, 99 | ``migration_5`` is the release of 1.0.1, which requires both of the two new 100 | features to be installed before it is 1.0.1. 101 | -------------------------------------------------------------------------------- /documentation/xsl/pdf/fo/ptc.xsl: -------------------------------------------------------------------------------- 1 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | 23 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /documentation/xsl/xhtml/ChangeLog: -------------------------------------------------------------------------------- 1 | 2004-12-02 Michael Smith 2 | 3 | * Makefile: New file. 4 | 5 | 2004-09-07 Norman Walsh 6 | 7 | * .cvsignore: I prefer to explicitly list all the files that should be ignored. Really the ones that shouldn't should probably be moved to another directory... 8 | 9 | 2004-09-06 Michael Smith 10 | 11 | * .cvsignore: Ignore generated .xsl files. 12 | 13 | Without this, cvs update reports all generated .xsl files in this 14 | directory as unknown. It's a big list, and it'd be a lot easier to 15 | read the cvs update output if these files weren't listed every time. 16 | 17 | Note: This does not cause CVS to ignore the html2xhtml.xsl file or 18 | to treat it in any way way differently than it would if the *.xsl 19 | line in this .cvsignore file did not exist. It doesn't seem to at 20 | least. If that's wrong, this change can always be reverted. 21 | 22 | 2003-07-10 Robert Stayton 23 | 24 | * html2xhtml.xsl: Set default values for chunker.output parameters so the 25 | chunk.xsl stylesheet outputs proper doctype declaration 26 | for XHTML output. 27 | 28 | 2003-07-03 Robert Stayton 29 | 30 | * html2xhtml.xsl: Added a xsl:stylesheet template to add the xhtml namespace 31 | as the default namespace for the stylesheet modules. 32 | 33 | 2002-11-14 Norman Walsh 34 | 35 | * html2xhtml.xsl: Make UTF-8 the default for XHTML 36 | 37 | 2002-10-09 Norman Walsh 38 | 39 | * html2xhtml.xsl: Make XHTML chunks 40 | 41 | 2002-06-11 Norman Walsh 42 | 43 | * Makefile: branches: 1.7.2; 44 | Make sure copied files get translated 45 | 46 | 2002-06-03 Jirka Kosek 47 | 48 | * Makefile: Added dependencies for profiling stylesheets 49 | 50 | 2002-05-17 Norman Walsh 51 | 52 | * Makefile: Make the add-new rule actually, uhm, add new files. 53 | 54 | 2002-03-25 Norman Walsh 55 | 56 | * Makefile: Improved rules 57 | 58 | 2002-03-01 Jirka Kosek 59 | 60 | * Makefile: First portion of new profiling code. New stylesheet parameters will come later. 61 | 62 | 2002-03-01 Norman Walsh 63 | 64 | * html2xhtml.xsl: Move stylesheet.result.type out of param and put it explicitly in each stylesheet because it has to be different 65 | 66 | 2002-02-21 Norman Walsh 67 | 68 | * Makefile: Make sure xhtml directory gets built properly 69 | 70 | 2002-02-20 Norman Walsh 71 | 72 | * .cvsignore, xslfiles.gen: Autogenerated 73 | 74 | 2002-02-07 Norman Walsh 75 | 76 | * html2xhtml.xsl: Make sure that uses of the xsl:element element preserve the XHTML namespace 77 | 78 | 2002-01-09 Norman Walsh 79 | 80 | * html2xhtml.xsl: Don't change the html.ext parameter 81 | 82 | 2001-12-30 Norman Walsh 83 | 84 | * .cvsignore, Makefile, chunk.xsl, docbook.xsl, html2xhtml.xsl, xslfiles.gen: 85 | Completely reworked strategy for XHTML 86 | 87 | 2001-12-04 Norman Walsh 88 | 89 | * docbook.xsl: Feature ##469979 add xmlns for xhtml 90 | 91 | 2001-10-16 Norman Walsh 92 | 93 | * xtchunk.xsl: Removed XT support 94 | 95 | 2001-08-01 Norman Walsh 96 | 97 | * docbook.xsl: Bug #441079, use import instead of include so that xsl:output isn't occurring multiple times at the same level 98 | 99 | 2001-06-20 Norman Walsh 100 | 101 | * docbook.xsl: Put public and system identifiers on XHTML documents to that entity references (  etc.) work 102 | 103 | 2001-04-03 Norman Walsh 104 | 105 | * chunk.xsl, docbook.xsl, xtchunk.xsl: Support MathML and chunking properly 106 | 107 | 2001-04-02 Norman Walsh 108 | 109 | * docbook.xsl, xtchunk.xsl: New file. 110 | 111 | -------------------------------------------------------------------------------- /documentation/xsl/xhtml/autoidx-ng.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 |
38 | 39 | 40 | 41 | 42 | 43 | 44 |
45 |
46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 |
60 |

61 | 62 |

63 |
64 | 65 | 66 | 67 | 68 | 69 | 70 |
71 |
72 |
73 |
74 | 75 |
76 | -------------------------------------------------------------------------------- /documentation/xsl/pdf/common/insertfile.xsl: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 81 | 82 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /documentation/xsl/pdf/fo/axf.xsl: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 13 | 15 | 16 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | author 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | keywords 59 | 60 | 61 | 62 | 63 | , 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | subject 73 | 74 | 75 | 76 | 77 | , 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | crop 92 | 94 | 96 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /documentation/xsl/pdf/fo/fop.xsl: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 19 | 20 | 22 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /documentation/xsl/xhtml/admon.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 25 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | note 37 | warning 38 | caution 39 | tip 40 | important 41 | note 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | Note 50 | Warning 51 | Caution 52 | Tip 53 | Important 54 | Note 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 |
65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | : 76 | 77 | 78 | 79 | 80 | 90 | 96 | 97 | 98 | 101 | 102 |
81 | 82 | 83 | 84 | [{$alt}] 85 | 86 | 87 | 88 | 89 | 91 | 92 | 93 | 94 | 95 |
99 | 100 |
103 |
104 |
105 | 106 | 107 |
108 | 109 | 110 | 111 | 112 | 113 | 114 |

115 | 116 | 117 | 118 | 119 |

120 | 121 | 122 |
123 |
124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 |
132 | -------------------------------------------------------------------------------- /documentation/xsl/pdf/VERSION: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | docbook-xsl 17 | 1.75.1 18 | 8444 19 | $Revision: 8499 $ 20 | $URL: https://docbook.svn.sourceforge.net/svnroot/docbook/trunk/xsl/VERSION $ 21 | 22 | 23 | 24 | 25 | DocBook 26 | XSL Stylesheets 27 | 28 | 29 | 1.75.2 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | * Minor bugfixes 40 | 41 | 42 | 43 | 44 | http://sourceforge.net/projects/docbook/ 45 | http://prdownloads.sourceforge.net/docbook/{DISTRONAME-VERSION}.tar.gz?download 46 | http://prdownloads.sourceforge.net/docbook/{DISTRONAME-VERSION}.zip?download 47 | http://prdownloads.sourceforge.net/docbook/{DISTRONAME-VERSION}.bz2?download 48 | http://sourceforge.net/project/shownotes.php?release_id={SFRELID} 49 | http://docbook.svn.sourceforge.net/viewvc/docbook/ 50 | http://lists.oasis-open.org/archives/docbook-apps/ 51 | This is a release with bugfixes. 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | You must specify the sf-relid as a parameter. 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | : 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | : 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | : 111 | 112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /documentation/xsl/pdf/fo/fo.xsl: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 15 | 16 | 18 | 19 | 20 | 21 | 22 | left 23 | left 24 | left 25 | right 26 | top 27 | left 28 | 29 | 30 | 31 | 32 | 33 | right 34 | right 35 | right 36 | left 37 | bottom 38 | right 39 | 40 | 41 | 42 | 43 | 44 | 46 | WARNING: FOP does not support right-to-left writing-mode 47 | lr-tb 48 | 49 | 51 | WARNING: FOP does not support right-to-left writing-mode 52 | lr-tb 53 | 54 | lr-tb 55 | rl-tb 56 | tb-rl 57 | lr-tb 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | bullet 77 | 78 | 79 | o 80 | © 81 | 82 | 83 | ® 84 | (SM) 85 | " 86 | " 87 | ' 88 | ' 89 | 90 | - 91 | o 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | # 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /development/testing/ui_testing.rst: -------------------------------------------------------------------------------- 1 | ========== 2 | UI Testing 3 | ========== 4 | 5 | UI tests extend functional tests by also supporting the execution of JavaScript 6 | and jQuery in addition to HTML only execution. They should be used in cases 7 | where functionality that is only executed with jQuery or JS should be tested. 8 | phpBB allows you to write such tests. This document will tell you how. 9 | 10 | Running UI Tests 11 | ================ 12 | 13 | Information on how to run ui tests is available in the GitHub repository at 14 | ``_. You 15 | can switch the branch to check instructions for a specific version of phpBB. 16 | 17 | Writing UI Tests 18 | ======================== 19 | 20 | Your test case will have to inherit from the ``phpbb_ui_test_case`` 21 | class. You will be able to make requests to a fresh phpBB installation. Also, 22 | be sure to put the file into the ``tests/ui/`` folder and to add the 23 | ``@group ui`` doc block above the class, so the tests are correctly 24 | executed. 25 | 26 | .. code-block:: php 27 | 28 | `_, 58 | which makes HTTP requests and allows us to interact with the page. The remote WebDriver 59 | is available in your tests through ``$this->visit($url)``. Alternatively, you can also 60 | use it directly via ``$this->getDriver()``. 61 | The PHP WebDriver does offer a wiki with several examples on how to use the WebDriver: 62 | `PHP WebDriver Wiki `_ 63 | 64 | Here is an example of using the WebDriver: 65 | 66 | .. code-block:: php 67 | 68 | visit('index.php'); 79 | $this->assertGreaterThan(0, count($this->getDriver()->findElements(WebDriverBy::cssSelector('.topiclist')))); 80 | } 81 | } 82 | 83 | We perform a GET request to ``index.php``, then find elements that fit into the 84 | CSS selector. Then we make sure our query matched something. 85 | 86 | If the board's index page were broken, our test would catch this, allowing us 87 | to detect the issue and fix it. The more things you test, the more breakages 88 | you will catch early. 89 | 90 | Authentication 91 | -------------- 92 | 93 | Many ui tests will require the user to be logged in. To do so, you can 94 | use the ``login()`` and ``admin_login()`` methods inherited from the ``phpbb_ui_test_case`` 95 | class. This method will assign the user's SID to the inherited class property 96 | ``$this->sid``. You will need to append this to the URLs that the logged-in 97 | user will be navigating to in order to hold the session. For usage examples, 98 | view the permission roles test in 99 | `tests/ui/permission_roles_test.php `_. 100 | 101 | Localisation 102 | ------------ 103 | 104 | In tests, as in phpBB itself, do not use hard-coded language unless absolutely 105 | necessary. Instead, use the ``$this->add_lang()`` and ``$this->lang()`` 106 | methods. Both act very similarly to their counterparts in the ``\phpbb\user`` 107 | class. Note that ``language/en/common.php`` is automatically loaded by the test 108 | framework. 109 | 110 | .. code-block:: php 111 | 112 | public function test_example() 113 | { 114 | // include the file at ./phpBB/language/en/ucp.php 115 | $this->add_lang('ucp'); 116 | 117 | // we can also include multiple ones: 118 | $this->add_lang(['memberlist', 'mcp']); 119 | 120 | // Let's use a language key 121 | $this->assertEquals('Login', $this->lang('LOGIN')); 122 | 123 | // And let's use a language key formatted for use with sprintf 124 | $this->assertEquals('Logout [ user ]', $this->lang('LOGOUT_USER', 'user')); 125 | } 126 | 127 | For more usage examples, please view 128 | `tests/ui/permission_roles_test.php `_. 129 | -------------------------------------------------------------------------------- /development/extensions/tutorial_migrations.rst: -------------------------------------------------------------------------------- 1 | ==================== 2 | Tutorial: Migrations 3 | ==================== 4 | 5 | Introduction 6 | ============ 7 | 8 | This tutorial explains: 9 | 10 | * Migrations: Database changes 11 | 12 | Migrations 13 | ========== 14 | 15 | Migrations are a means of facilitating database changes, much in 16 | the same way UMIL was used in phpBB 3.0. Through Migrations, 17 | extension developers are able to easily modify and add new schema 18 | and data to the database as required by an extension. 19 | 20 | Read the Migrations: :doc:`../migrations/getting_started` Developer 21 | Docs for in-depth migration documentation. We will briefly summarise 22 | the key concepts of migrations here. 23 | 24 | .. seealso:: 25 | 26 | The phpBB Customisation Database `Migrations Validation Policy `_. 27 | 28 | Database changes 29 | ---------------- 30 | 31 | Schema changes 32 | ^^^^^^^^^^^^^^ 33 | 34 | The ``update_schema()`` method is for facilitating schema changes, 35 | such as adding new tables, columns, keys and indexes. 36 | 37 | The ``revert_schema()`` method should always be including to undo 38 | any changes introduced by the ``update_schema()`` method. 39 | 40 | We recommend putting schema changes in their own migration. 41 | 42 | Learn more: :doc:`../migrations/schema_changes`. 43 | 44 | Data changes 45 | ^^^^^^^^^^^^ 46 | 47 | The ``update_data()`` method is for inserting, updating and dropping 48 | field data. 49 | 50 | The ``revert_data()`` method is optional and can be used to undo data 51 | changes. Normally, the ``update_data()`` method is automatically reverted 52 | during a purge step, reversing any of the changes introduced by the 53 | migration tools. Using the ``revert_data()`` method is only 54 | needed to perform additional changes during an extension's uninstall, 55 | such as performing a custom functions. 56 | 57 | We recommend putting data changes in their own migration. 58 | 59 | Learn more: :doc:`../migrations/data_changes`. 60 | 61 | Migration tools 62 | --------------- 63 | 64 | :doc:`../migrations/tools/config` 65 | The config tool helps adding, updating, and removing config items. 66 | 67 | :doc:`../migrations/tools/config_text` 68 | The config_text tool helps adding, updating, and removing config_text 69 | items. The config_text table is used to store options with an arbitrary 70 | length value in a TEXT column. In contrast to config values, 71 | config_text are not cached or prefetched. 72 | 73 | :doc:`../migrations/tools/module` 74 | The module tool helps adding and removing ACP, MCP, and UCP modules. 75 | 76 | :doc:`../migrations/tools/permission` 77 | The permission tool helps adding, removing, setting, and unsetting 78 | permissions and adding or removing permission roles. 79 | 80 | Migration dependencies 81 | ---------------------- 82 | 83 | depends_on() 84 | ^^^^^^^^^^^^ 85 | 86 | The ``depends_on()`` method is used to define a migration's dependencies. 87 | Dependencies tell the migrator what order migrations must be installed in. 88 | 89 | Learn more: :doc:`../migrations/dependencies`. 90 | 91 | effectively_installed() 92 | ^^^^^^^^^^^^^^^^^^^^^^^ 93 | 94 | The ``effectively_installed()`` method is used primarily to help transition 95 | from a previous database installer method (such as a MOD that used UMIL) 96 | to migrations. However, we recommend using it all the time to ensure 97 | safer migrations. 98 | 99 | When effectively_installed returns true, the migration is deemed to 100 | already have been installed, meaning the migration will be skipped. 101 | This helps prevent rewriting (or overwriting) existing changes to the 102 | database that may have already been put in place by a previous migration or 103 | MOD installation. 104 | 105 | For example, in the following code the migration would not be applied if 106 | the specified config value already exists in the database: 107 | 108 | .. code-block:: php 109 | 110 | public function effectively_installed() 111 | { 112 | return isset($this->config['acme_demo_goodbye']); 113 | } 114 | 115 | .. warning:: 116 | 117 | As a general rule, migrations should never be changed once they have been 118 | installed. Changing a migration in an extension that has already been 119 | installed could prevent it from reverting database changes or uninstalling 120 | successfully. In order to make subsequent changes to the database, new 121 | migrations should be created to implement the additional changes or updates. 122 | The only exceptions to this rule are to fix SQL and logic errors or bugs, 123 | as long as they do not alter the database changes that have already been 124 | made or the dependencies listed in the migration's ``depends_on()`` method. 125 | 126 | Once you are familiar with how Migrations work, continue on 127 | to the next section to learn how to create and install an ACP 128 | module that will allow us to configure some settings for 129 | the Acme Demo extension. 130 | -------------------------------------------------------------------------------- /documentation/xsl/xhtml/manifest.xsl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /development/extensions/database_types_list.rst: -------------------------------------------------------------------------------- 1 | =================== 2 | Database Types List 3 | =================== 4 | 5 | Introduction 6 | ============ 7 | 8 | The purpose of the Database Type Map is to simplify the process of creating installations for multiple database systems. 9 | Instead of writing specific installation instructions for each individual database system, you can create a single set of 10 | instructions and use the Database Type Map to modify any supported database system with just one command. This makes it 11 | easier and more efficient to work with multiple database systems, as you don't need to write and maintain separate 12 | instructions for each one. 13 | 14 | .. note:: 15 | 16 | With some commands you may enter the `Zerofill `_, 17 | example ``INT:11``, if the field is a numeric one. With some you may enter the length of the field, example ``VARCHAR:255``, 18 | which will make a varchar(255) column in MySQL. In all of the fields supporting this, they will have a colon followed by ``%d`` 19 | meaning any number may fill the space of the ``%d``. 20 | 21 | Numeric 22 | ======= 23 | 24 | .. list-table:: 25 | :widths: 20 20 60 26 | :header-rows: 1 27 | 28 | * - Command 29 | - MySQL Equivalent 30 | - Storage Range (on MySQL) 31 | * - TINT:%d 32 | - tinyint(%d) 33 | - -128 to 127 34 | * - INT:%d 35 | - int(%d) 36 | - -2,147,483,648 to 2,147,483,648 37 | * - BINT 38 | - bigint(20) 39 | - -9,223,372,036,854,775,808 to 9,223,372,036,854,775,808 40 | * - USINT 41 | - smallint(4) UNSIGNED 42 | - 0 to 65,535 43 | * - UINT 44 | - mediumint(8) UNSIGNED 45 | - 0 to 16,777,215 46 | * - UINT:%d 47 | - int(%d) UNSIGNED 48 | - 0 to 4,294,967,295 49 | * - ULINT 50 | - int(10) UNSIGNED 51 | - 0 to 4,294,967,295 52 | 53 | Decimal 54 | ======= 55 | 56 | .. list-table:: 57 | :widths: 20 20 60 58 | :header-rows: 1 59 | 60 | * - Command 61 | - MySQL Equivalent 62 | - Storage Range (on MySQL) 63 | * - DECIMAL 64 | - decimal(5,2) 65 | - -999.99 to 999.99 66 | * - DECIMAL:%d 67 | - decimal(%d, 2) 68 | - -(%d - 2 digits to the left of the decimal).99 to (%d - 2 digits to the left of the decimal).99 69 | * - PDECIMAL 70 | - decimal(6,3) 71 | - -999.999 to 999.999 72 | * - PDECIMAL:%d 73 | - decimal(%d,3) 74 | - -(%d - 3 digits to the left of the decimal).999 to (%d - 3 digits to the left of the decimal).999 75 | 76 | Text 77 | ==== 78 | 79 | These should only be used for ASCII characters. If you plan to use it for something like message text read the Unicode Text section 80 | 81 | .. list-table:: 82 | :widths: 20 20 60 83 | :header-rows: 1 84 | 85 | * - Command 86 | - MySQL Equivalent 87 | - Explain 88 | * - VCHAR 89 | - varchar(255) 90 | - text for storing 255 characters (normal input field with a max of 255 chars) 91 | * - VCHAR:%d 92 | - varchar(%d) 93 | - text for storing %d characters (normal input field with a max of %d chars) 94 | * - CHAR:%d 95 | - char(%d) 96 | - text for storing up to 30 characters (normal input field with a max of 30 chars) 97 | * - XSTEXT 98 | - text 99 | - text for storing 100 characters 100 | * - STEXT 101 | - text 102 | - text for storing 255 characters 103 | * - TEXT 104 | - text 105 | - text for storing 3000 characters 106 | * - MTEXT 107 | - mediumtext 108 | - (post text, large text) 109 | 110 | Unicode Text 111 | ============ 112 | 113 | .. list-table:: 114 | :widths: 20 20 60 115 | :header-rows: 1 116 | 117 | * - Command 118 | - MySQL Equivalent 119 | - Explain 120 | * - VCHAR_UNI 121 | - varchar(255) 122 | - text for storing 255 characters (normal input field with a max of 255 single-byte chars) 123 | * - VCHAR_UNI:%d 124 | - varchar(%d) 125 | - text for storing %d characters (normal input field with a max of %d single-byte chars) 126 | * - XSTEXT_UNI 127 | - varchar(100) 128 | - text for storing 100 characters (topic_title for example) 129 | * - STEXT_UNI 130 | - varchar(255) 131 | - text for storing 255 characters (normal input field with a max of 255 single-byte chars) 132 | * - TEXT_UNI 133 | - text 134 | - text for storing 3000 characters (short text, descriptions, comments, etc.) 135 | * - MTEXT_UNI 136 | - mediumtext 137 | - (post text, large text) 138 | 139 | Miscellaneous 140 | ============= 141 | 142 | .. list-table:: 143 | :widths: 20 20 60 144 | :header-rows: 1 145 | 146 | * - Command 147 | - MySQL Equivalent 148 | - Explain 149 | * - BOOL 150 | - tinyint(1) UNSIGNED 151 | - Storing boolean values (true/false) 152 | * - TIMESTAMP 153 | - int(11) UNSIGNED 154 | - For storing UNIX timestamps 155 | * - VCHAR_CI 156 | - varchar(255) 157 | - varchar_ci for postgresql, others VCHAR 158 | * - VARBINARY 159 | - varbinary(255) 160 | - Binary storage 161 | -------------------------------------------------------------------------------- /development/testing/functional_testing.rst: -------------------------------------------------------------------------------- 1 | ================== 2 | Functional Testing 3 | ================== 4 | 5 | Functional tests test software the way a user would. They simulate a user 6 | browsing the website, but they do these steps in an automated way. phpBB 7 | allows you to write such tests. This document will tell you how. 8 | 9 | Running Functional Tests 10 | ======================== 11 | 12 | Information on how to run tests is available in the GitHub repository at 13 | ``_. You 14 | can switch the branch to check instructions for a specific version of phpBB. 15 | 16 | Writing Functional Tests 17 | ======================== 18 | 19 | Your test case will have to inherit from the ``phpbb_functional_test_case`` 20 | class. You will be able to make requests to a fresh phpBB installation. Also, 21 | be sure to put the file into the ``tests/functional/`` folder and to add the 22 | ``@group functional`` doc block above the class, so the tests are correctly 23 | executed. 24 | 25 | .. code-block:: php 26 | 27 | `_, which makes HTTP requests and 57 | allows us to interact with the page. The Goutte "client" is available in your 58 | tests through ``$this->request($method, $path)``. Alternatively you can also 59 | access it directly through ``$this->client``. 60 | 61 | When calling ``request()``, you will get a crawler, which allows you to fetch 62 | parts of the page using CSS selectors. Here is an example: 63 | 64 | .. code-block:: php 65 | 66 | request('GET', 'index.php'); 77 | $this->assertGreaterThan(0, $crawler->filter('.topiclist')->count()); 78 | } 79 | } 80 | 81 | 82 | We perform a GET request to ``index.php``, then apply a CSS filter, querying 83 | for the .topiclist class. Then we make sure our query matched something. 84 | 85 | If the board's index page were broken, our test would catch this, allowing us 86 | to detect the issue and fix it. The more things you test, the more breakages 87 | you will catch early. 88 | 89 | For more information what you can do with Goutte, check out the 90 | `GitHub project `_, 91 | `Ryan Weaver's Goutte tutorial `_ 92 | and `Symfony's testing documentation `_. 93 | 94 | Authentication 95 | -------------- 96 | 97 | Many functional tests will require the user to be logged in. To do so, you can 98 | use the ``login()`` method inherited from the ``phpbb_functional_test_case`` 99 | class. This method will assign the user's SID to the inherited class property 100 | ``$this->sid``. You will need to append this to the URLs that the logged-in 101 | user will be navigating to in order to hold the session. For usage examples, 102 | view the logout test in 103 | `tests/functional/auth_test.php `_. 104 | 105 | Localisation 106 | ------------ 107 | 108 | In tests, as in phpBB itself, do not use hard-coded language unless absolutely 109 | necessary. Instead, use the ``$this->add_lang()`` and ``$this->lang()`` 110 | methods. Both act very similarly to their counterparts in the ``\phpbb\user`` 111 | class. Note that ``language/en/common.php`` is automatically loaded by the test 112 | framework. 113 | 114 | .. code-block:: php 115 | 116 | public function test_example() 117 | { 118 | // include the file at ./phpBB/language/en/ucp.php 119 | $this->add_lang('ucp'); 120 | 121 | // we can also include multiple ones: 122 | $this->add_lang(['memberlist', 'mcp']); 123 | 124 | // Let's use a language key 125 | $this->assertEquals('Login', $this->lang('LOGIN')); 126 | 127 | // And let's use a language key formatted for use with sprintf 128 | $this->assertEquals('Logout [ user ]', $this->lang('LOGOUT_USER', 'user')); 129 | } 130 | 131 | For more usage examples, please view 132 | `tests/functional/lang_test.php `_. 133 | -------------------------------------------------------------------------------- /documentation/xsl/common/autoidx-ng.xsl: -------------------------------------------------------------------------------- 1 | 2 | 4 | ]> 5 | 13 | 14 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 35 | 36 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | No " 49 | 50 | " localization of index grouping letters exists 51 | 52 | 53 | . 54 | 55 | 56 | ; using "en". 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 0 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 95 | 96 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | No " 109 | 110 | " localization of index grouping letters exists 111 | 112 | 113 | . 114 | 115 | 116 | ; using "en". 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 134 | 135 | 136 | -------------------------------------------------------------------------------- /development/auth/authentication.rst: -------------------------------------------------------------------------------- 1 | Auth API 2 | ======== 3 | 4 | This is an explanation of how to use the phpBB auth/acl API. 5 | 6 | .. contents:: 7 | :local: 8 | :depth: 2 9 | 10 | 1. Introduction 11 | --------------- 12 | 13 | What is it? 14 | ^^^^^^^^^^^ 15 | 16 | The ``auth`` class contains methods related to authorisation of 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. 17 | 18 | Initialisation 19 | ^^^^^^^^^^^^^^ 20 | 21 | To use any methods contained within the ``auth`` class, it first needs to be instantiated. This is best achieved early in the execution of the script in the following manner: 22 | 23 | .. code-block:: php 24 | 25 | $auth = new phpbb\auth\auth(); 26 | 27 | Once an instance of the class has been created you are free to call the various methods it contains. Note: if you wish to use the ``auth_admin`` methods you will need to instantiate this separately in the same way. 28 | 29 | 2. Methods 30 | ---------- 31 | 32 | Following are the methods you are able to use. 33 | 34 | 2.i. acl 35 | ^^^^^^^^ 36 | 37 | The ``acl`` method is the initialisation routine for all the ACL functions. It must be called before any ACL method. It takes one parameter: an associative array containing user information. 38 | 39 | .. code-block:: php 40 | 41 | $auth->acl($userdata); 42 | 43 | Where ``$userdata`` includes at least: ``user_id``, ``user_permissions``, and ``user_type``. 44 | 45 | 2.ii. acl_get 46 | ^^^^^^^^^^^^^ 47 | 48 | This method determines if a user can perform an action either globally or in a specific forum. 49 | 50 | .. code-block:: php 51 | 52 | $result = $auth->acl_get('option'[, forum]); 53 | 54 | - ``option``: e.g., 'f_list', 'm_edit', 'a_adduser', etc. Use ``!option`` to negate. 55 | - ``forum`` (optional): integer ``forum_id``. 56 | 57 | Returns a positive integer if allowed, zero if denied. 58 | 59 | 2.iii. acl_gets 60 | ^^^^^^^^^^^^^^^ 61 | 62 | This method checks multiple permissions at once. 63 | 64 | .. code-block:: php 65 | 66 | $result = $auth->acl_gets('option1'[, 'option2', ..., forum]); 67 | 68 | Returns a positive integer if *any* of the permissions is granted. 69 | 70 | 2.iv. acl_getf 71 | ^^^^^^^^^^^^^^ 72 | 73 | This method checks in which forums a user has a certain permission. 74 | 75 | .. code-block:: php 76 | 77 | $result = $auth->acl_getf('option'[, clean]); 78 | 79 | - ``option``: permission string (negation with ``!`` allowed) 80 | - ``clean``: boolean. If true, only forums where permission is granted are returned. 81 | 82 | Returns an associative array: 83 | 84 | .. code-block:: php 85 | 86 | array(forum_id1 => array(option => integer), forum_id2 => ...) 87 | 88 | 2.v. acl_getf_global 89 | ^^^^^^^^^^^^^^^^^^^^ 90 | 91 | Checks if a user has a permission globally or in at least one forum. 92 | 93 | .. code-block:: php 94 | 95 | $result = $auth->acl_getf_global('option'); 96 | 97 | Returns a positive integer or zero. 98 | 99 | 2.vi. acl_cache 100 | ^^^^^^^^^^^^^^^ 101 | 102 | **Private method.** Automatically called when needed. Generates user_permissions data. 103 | 104 | 2.vii. acl_clear_prefetch 105 | ^^^^^^^^^^^^^^^^^^^^^^^^^ 106 | 107 | Clears the ``user_permissions`` column in the users table. 108 | 109 | .. code-block:: php 110 | 111 | $user_id = 2; 112 | $auth->acl_clear_prefetch($user_id); 113 | 114 | Use ``$user_id = 0`` to clear cache for all users. Returns null. 115 | 116 | 2.viii. acl_get_list 117 | ^^^^^^^^^^^^^^^^^^^^ 118 | 119 | Returns an array describing which users have which permissions in which forums. 120 | 121 | .. code-block:: php 122 | 123 | $user_id = array(2, 53); 124 | $permissions = array('f_list', 'f_read'); 125 | $forum_id = array(1, 2, 3); 126 | $result = $auth->acl_get_list($user_id, $permissions, $forum_id); 127 | 128 | Parameter types: 129 | - ``$user_id``: ``false``, int, or array of int 130 | - ``$permissions``: ``false``, string, or array of string 131 | - ``$forum_id``: ``false``, int, or array of int 132 | 133 | 2.ix. Miscellaneous 134 | ^^^^^^^^^^^^^^^^^^^ 135 | 136 | Additional methods for pulling raw permission data: 137 | 138 | .. code-block:: php 139 | 140 | function acl_group_raw_data($group_id = false, $opts = false, $forum_id = false) 141 | function acl_user_raw_data($user_id = false, $opts = false, $forum_id = false) 142 | function acl_raw_data_single_user($user_id) 143 | function acl_raw_data($user_id = false, $opts = false, $forum_id = false) 144 | function acl_role_data($user_type, $role_type, $ug_id = false, $forum_id = false) 145 | 146 | Use ``acl_raw_data`` for general queries; others are optimized for specific data. 147 | 148 | 3. Admin Related Functions 149 | -------------------------- 150 | 151 | Additional methods are available within the ``auth_admin`` class for managing permissions, options, and user cache. It is found in: 152 | 153 | :: 154 | 155 | includes/acp/auth.php 156 | 157 | Instantiate separately: 158 | 159 | .. code-block:: php 160 | 161 | $auth_admin = new auth_admin(); 162 | 163 | This gives access to both ``auth_admin`` and ``auth`` methods. 164 | -------------------------------------------------------------------------------- /documentation/xsl/pdf/fo/math.xsl: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 82 | 83 | 84 | 85 | 86 | $ 87 | 88 | 89 | 90 | $ 91 | 92 | 93 | 94 | 95 | 96 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | $$ 106 | 107 | 108 | 109 | $$ 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | Your equation is misplaced. It should be in inlineequation, equation or informalequation. 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 0 133 | 0 134 | 1 135 | 136 | 137 | 138 | 139 | 140 | 141 | -------------------------------------------------------------------------------- /development/migrations/schema_changes.rst: -------------------------------------------------------------------------------- 1 | ============== 2 | Schema changes 3 | ============== 4 | 5 | Schema changes are done in Migrations by creating an array that will be parsed 6 | by ``\phpbb\db\tools::perform_schema_changes()``. 7 | 8 | Basics 9 | ====== 10 | When performing schema changes, your Migrations class should contain two 11 | functions, ``update_schema`` and ``revert_schema``. 12 | 13 | update_schema 14 | ------------- 15 | ``update_schema()`` will be called as the **first** step when installing a 16 | migration. This makes any database schema changes you need when installing the 17 | migration. 18 | 19 | .. code-block:: php 20 | 21 | public function update_schema() 22 | { 23 | return []; 24 | } 25 | 26 | revert_schema 27 | ------------- 28 | 29 | ``revert_schema()`` will be called when a Migration must be uninstalled (this 30 | could happen if the user wants/needs to revert changes by the Migration, a 31 | dependency is reverted, or the installation fails and the entire Migration is 32 | removed). 33 | 34 | The instructions in ``revert_schema()`` should effectively do the exact 35 | opposite of what ``update_schema()`` does (e.g. if a table is dropped, revert 36 | should add the table with exactly the same columns/keys as it had before it 37 | was dropped) 38 | 39 | .. code-block:: php 40 | 41 | public function revert_schema() 42 | { 43 | return []; 44 | } 45 | 46 | What to return 47 | ============== 48 | The array returned is passed directly, as is, to 49 | ``\phpbb\db\tools::perform_schema_changes();`` 50 | 51 | Examples 52 | -------- 53 | 54 | **From 3_1_0_dev:** 55 | 56 | .. code-block:: php 57 | 58 | public function update_schema() 59 | { 60 | return [ 61 | 'add_columns' => [ 62 | $this->table_prefix . 'groups' => [ 63 | 'group_teampage' => ['UINT', 0, 'after' => 'group_legend'], 64 | ], 65 | $this->table_prefix . 'styles' => [ 66 | 'style_path' => ['VCHAR:100', ''], 67 | 'bbcode_bitfield' => ['VCHAR:255', 'kNg='], 68 | 'style_parent_id' => ['UINT:4', 0], 69 | 'style_parent_tree' => ['TEXT', ''], 70 | ], 71 | ], 72 | 'change_columns' => [ 73 | $this->table_prefix . 'groups' => [ 74 | 'group_legend' => ['UINT', 0], 75 | ], 76 | ], 77 | ]; 78 | } 79 | 80 | public function revert_schema() 81 | { 82 | return [ 83 | 'drop_columns' => [ 84 | $this->table_prefix . 'groups' => [ 85 | 'group_teampage', 86 | ], 87 | $this->table_prefix . 'styles' => [ 88 | 'style_path', 89 | 'bbcode_bitfield', 90 | 'style_parent_id', 91 | 'style_parent_tree', 92 | ], 93 | ], 94 | ]; 95 | } 96 | 97 | **From style_update_p2:** 98 | 99 | .. code-block:: php 100 | 101 | public function update_schema() 102 | { 103 | return [ 104 | 'drop_columns' => [ 105 | $this->table_prefix . 'styles' => [ 106 | 'imageset_id', 107 | 'template_id', 108 | 'theme_id', 109 | ], 110 | ], 111 | 112 | 'drop_tables' => [ 113 | $this->table_prefix . 'styles_imageset', 114 | $this->table_prefix . 'styles_imageset_data', 115 | ], 116 | ]; 117 | } 118 | 119 | public function revert_schema() 120 | { 121 | return [ 122 | 'add_columns' => [ 123 | $this->table_prefix . 'styles' => [ 124 | 'imageset_id' => ['UINT', 0], 125 | 'template_id' => ['UINT', 0], 126 | 'theme_id' => ['UINT', 0], 127 | ], 128 | ], 129 | 130 | 'add_tables' => [ 131 | $this->table_prefix . 'styles_imageset' => [ 132 | 'COLUMNS' => [ 133 | 'imageset_id' => ['UINT', NULL, 'auto_increment'], 134 | 'imageset_name' => ['VCHAR_UNI:255', ''], 135 | 'imageset_copyright' => ['VCHAR_UNI', ''], 136 | 'imageset_path' => ['VCHAR:100', ''], 137 | ], 138 | 'PRIMARY_KEY' => 'imageset_id', 139 | 'KEYS' => [ 140 | 'imgset_nm' => ['UNIQUE', 'imageset_name'], 141 | ], 142 | ], 143 | $this->table_prefix . 'styles_imageset_data' => [ 144 | 'COLUMNS' => [ 145 | 'image_id' => ['UINT', NULL, 'auto_increment'], 146 | 'image_name' => ['VCHAR:200', ''], 147 | 'image_filename' => ['VCHAR:200', ''], 148 | 'image_lang' => ['VCHAR:30', ''], 149 | 'image_height' => ['USINT', 0], 150 | 'image_width' => ['USINT', 0], 151 | 'imageset_id' => ['UINT', 0], 152 | ], 153 | 'PRIMARY_KEY' => 'image_id', 154 | 'KEYS' => [ 155 | 'i_d' => ['INDEX', 'imageset_id'], 156 | ], 157 | ], 158 | ], 159 | ]; 160 | } 161 | -------------------------------------------------------------------------------- /documentation/xsl/pdf/common/pi.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Common Processing Instruction Reference 4 | 5 | $Id: pi.xsl 8349 2009-03-17 06:53:03Z bobstayton $ 6 | 7 | 8 | 9 | Introduction 10 | 11 | This is generated reference documentation for all 12 | user-specifiable processing instructions (PIs) in the 13 | “common” part of the DocBook XSL stylesheets. 14 | 15 | 16 | You add these PIs at particular points in a document to 17 | cause specific “exceptions” to formatting/output behavior. To 18 | make global changes in formatting/output behavior across an 19 | entire document, it’s better to do it by setting an 20 | appropriate stylesheet parameter (if there is one). 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | dbchoice_choice 30 | Generates a localized choice separator 31 | 32 | 33 | 34 | dbchoice choice="and"|"or"|string" 35 | 36 | 37 | Description 38 | 39 | Use the dbchoice choice PI to 40 | generate an appropriate localized “choice” separator (for 41 | example, and or or) 42 | before the final item in an inline simplelist 43 | 44 | 45 | 46 | This PI is a less-than-ideal hack; support for it may 47 | disappear in the future (particularly if and when a more 48 | appropriate means for marking up "choice" lists becomes 49 | available in DocBook). 50 | 51 | 52 | Parameters 53 | 54 | 55 | choice="and" 56 | 57 | 58 | generates a localized and separator 59 | 60 | 61 | 62 | choice="or" 63 | 64 | 65 | generates a localized or separator 66 | 67 | 68 | 69 | choice="string" 70 | 71 | 72 | generates a literal string separator 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | dbtimestamp 83 | Inserts a date timestamp 84 | 85 | 86 | 87 | dbtimestamp format="formatstring" [padding="0"|"1"] 88 | 89 | 90 | Description 91 | 92 | Use the dbtimestamp PI at any point in a 93 | source document to cause a date timestamp (a formatted 94 | string representing the current date and time) to be 95 | inserted in output of the document. 96 | 97 | Parameters 98 | 99 | 100 | format="formatstring" 101 | 102 | 103 | Specifies format in which the date and time are 104 | output 105 | 106 | 107 | 108 | For details of the content of the format string, 109 | see Date and time. 110 | 111 | 112 | 113 | 114 | padding="0"|"1" 115 | 116 | 117 | Specifies padding behavior; if non-zero, padding is is added 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | dbtex_delims 128 | Generates delimiters around embedded TeX equations 129 | in output 130 | 131 | 132 | 133 | dbtex delims="no"|"yes" 134 | 135 | 136 | Description 137 | 138 | Use the dbtex delims PI as a 139 | child of a textobject containing embedded TeX 140 | markup, to cause that markup to be surrounded by 141 | $ delimiter characters in output. 142 | 143 | Parameters 144 | 145 | 146 | dbtex delims="no"|"yes" 147 | 148 | 149 | Specifies whether delimiters are output 150 | 151 | 152 | 153 | 154 | 155 | Related Global Parameters 156 | 157 | tex.math.delims 158 | 159 | Related Information in <link xlink:href="http://www.sagehill.net/docbookxsl/">DocBook XSL: The Complete Guide</link> 160 | 161 | DBTeXMath 162 | 163 | 164 | 165 | 166 | -------------------------------------------------------------------------------- /documentation/xsl/pdf/fo/fo-rtf.xsl: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 18 | 19 | 23 | 24 | 25 | 26 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /development/extensions/tutorial_parsing_text.rst: -------------------------------------------------------------------------------- 1 | ====================== 2 | Tutorial: Parsing text 3 | ====================== 4 | 5 | Database fields 6 | =============== 7 | phpBB uses the following database fields where BBCode is allowed (forum description, forum rules, post content, ...): 8 | 9 | - **foo** - Text itself 10 | - **foo_bbcode_uid** - a randomly generated unique identifier to mark the BBCodes and used for quicker parsing 11 | - **foo_bbcode_bitfield** - a `bit field `_ containing the information which bbcode is used in the text so only the relevant ones need to be loaded from the database. **NOTE: No longer used in posts generated in phpBB 3.2+** 12 | - **foo_options** - a bit field containing the information whether bbcode, smilies and magic urls are enabled (OPTION_FLAG_BBCODE, OPTION_FLAG_SMILIES and OPTION_FLAG_LINKS). Sometimes you will find this separated into enable_bbcode, enable_smilies and enable_magic_url 13 | 14 | Column names will vary, replace ``foo`` with the respective column name (e.g. ``text``, ``text_bbcode_uid``, ...). 15 | 16 | Parsing text with BBCodes & smilies 17 | =================================== 18 | 19 | Inserting text into DB 20 | ---------------------- 21 | 22 | .. code-block:: php 23 | 24 | $text = $this->request->variable('text', '', true); 25 | $uid = $bitfield = $options = ''; // will be modified by generate_text_for_storage 26 | $allow_bbcode = $allow_urls = $allow_smilies = true; 27 | generate_text_for_storage($text, $uid, $bitfield, $options, $allow_bbcode, $allow_urls, $allow_smilies); 28 | 29 | $sql_ary = array( 30 | 'text' => $text, 31 | 'bbcode_uid' => $uid, 32 | 'bbcode_bitfield' => $bitfield, 33 | 'bbcode_options' => $options, 34 | ); 35 | 36 | $sql = 'INSERT INTO ' . YOUR_TABLE . ' ' . $this->db->sql_build_array('INSERT', $sql_ary); 37 | $this->db->sql_query($sql); 38 | 39 | The above method uses the bbcode options database field which is used in many places instead of enable_smiles, 40 | enable_bbcode and enable_magic_url. Here is how to insert it into the database using the enable_smilies, enable_bbcode 41 | and enable_magic_url tables. 42 | 43 | .. code-block:: php 44 | 45 | $text = $this->request->variable('text', '', true); 46 | $uid = $bitfield = $options = ''; // will be modified by generate_text_for_storage 47 | $allow_bbcode = $allow_urls = $allow_smilies = true; 48 | generate_text_for_storage($text, $uid, $bitfield, $options, $allow_bbcode, $allow_urls, $allow_smilies); 49 | 50 | $sql_ary = array( 51 | 'text' => $text, 52 | 'bbcode_uid' => $uid, 53 | 'bbcode_bitfield' => $bitfield, 54 | 'enable_bbcode' => $allow_bbcode, 55 | 'enable_magic_url' => $allow_urls, 56 | 'enable_smilies' => $allow_smilies, 57 | ); 58 | 59 | $sql = 'INSERT INTO ' . YOUR_TABLE . ' ' . $this->db->sql_build_array('INSERT', $sql_ary); 60 | $this->db->sql_query($sql); 61 | 62 | Displaying text from DB 63 | ----------------------- 64 | 65 | This example uses the bbcode_options field which is used in forums and groups description parsing: 66 | 67 | .. code-block:: php 68 | 69 | $sql = 'SELECT text, bbcode_uid, bbcode_bitfield, bbcode_options 70 | FROM ' . YOUR_TABLE; 71 | $result = $this->db->sql_query($sql); 72 | $row = $this->db->sql_fetchrow($result); 73 | $this->db->sql_freeresult($result); 74 | 75 | $text = generate_text_for_display($row['text'], $row['bbcode_uid'], $row['bbcode_bitfield'], $row['bbcode_options']); 76 | 77 | $this->template->assign_vars([ 78 | 'TEXT' => $text, 79 | ]); 80 | 81 | The next one uses the enable_bbcode, enable_smilies and enable_magic_url flags which can be used instead of the above method and is used in parsing posts: 82 | 83 | .. code-block:: php 84 | 85 | $sql = 'SELECT text, bbcode_uid, bbcode_bitfield, enable_bbcode, enable_smilies, enable_magic_url 86 | FROM ' . YOUR_TABLE; 87 | $result = $this->db->sql_query($sql); 88 | $row = $this->db->sql_fetchrow($result); 89 | $this->db->sql_freeresult($result); 90 | 91 | $row['bbcode_options'] = (($row['enable_bbcode']) ? OPTION_FLAG_BBCODE : 0) + 92 | (($row['enable_smilies']) ? OPTION_FLAG_SMILIES : 0) + 93 | (($row['enable_magic_url']) ? OPTION_FLAG_LINKS : 0); 94 | $text = generate_text_for_display($row['text'], $row['bbcode_uid'], $row['bbcode_bitfield'], $row['bbcode_options']); 95 | 96 | $this->template->assign_vars([ 97 | 'TEXT' => $text, 98 | ]); 99 | 100 | Generating text for editing 101 | --------------------------- 102 | 103 | .. code-block:: php 104 | 105 | $sql = 'SELECT text, bbcode_uid, bbcode_options 106 | FROM ' . YOUR_TABLE; 107 | $result = $this->db->sql_query_limit($sql, 1); 108 | $row = $this->db->sql_fetchrow($result); 109 | $this->db->sql_freeresult($result); 110 | 111 | $post_data = generate_text_for_edit($row['text'], $row['bbcode_uid'], $row['bbcode_options']); 112 | 113 | $this->template->assign_vars([ 114 | 'POST_TEXT' => $post_data['text'], 115 | 'S_ALLOW_BBCODES' => $post_data['allow_bbcode'], 116 | 'S_ALLOW_SMILIES' => $post_data['allow_smilies'], 117 | 'S_ALLOW_URLS' => $post_data['allow_urls'], 118 | ]); 119 | 120 | Database fields for BBCode 121 | -------------------------- 122 | 123 | The following column definitions are expected for BBCodes: 124 | 125 | .. code-block:: 126 | 127 | "text": [ 128 | "MTEXT_UNI", 129 | "" // Default empty string 130 | ], 131 | "bbcode_uid": [ 132 | "VCHAR:8", 133 | "" // Default empty string 134 | ], 135 | "bbcode_bitfield": [ 136 | "VCHAR:255", 137 | "" // Default empty string 138 | ], 139 | "bbcode_options": [ 140 | "UINT:11", 141 | 7 // Default all enabled 142 | ], 143 | --------------------------------------------------------------------------------