Skip to content

Commit 73a979a

Browse files
committed
Use autosection and get rid of conflicting headers
1 parent 1fa6edb commit 73a979a

File tree

13 files changed

+102
-144
lines changed

13 files changed

+102
-144
lines changed

development/conf.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
'sensio.sphinx.bestpractice',
3636
'sphinxcontrib.phpdomain',
3737
'sphinx_multiversion',
38-
'sphinx_rtd_theme'
38+
'sphinx_rtd_theme',
39+
'sphinx.ext.autosectionlabel'
3940
]
4041

4142
# Add any paths that contain templates here, relative to this directory.
@@ -101,6 +102,8 @@
101102
# If true, keep warnings as "system message" paragraphs in the built documents.
102103
#keep_warnings = False
103104

105+
autosectionlabel_prefix_document = True
106+
104107
# Options for sphinx_multiversion
105108
smv_tag_whitelist = 'None'
106109
smv_branch_whitelist = r'^(3.2.x|3.3.x|master)$'

development/db/dbal.rst

Lines changed: 25 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ Example using :class:`config.php`:
4949
// We do not need this any longer, unset for safety purposes
5050
unset($dbpasswd);
5151
52-
Parameters
53-
^^^^^^^^^^
52+
.. rubric:: Parameters
5453

5554
.. csv-table::
5655
:header: Parameter, Usage
@@ -115,8 +114,8 @@ Example:
115114
// Now run the query...
116115
$result = $db->sql_query($sql);
117116
118-
Parameters
119-
^^^^^^^^^^
117+
.. rubric:: Parameters
118+
120119
.. csv-table::
121120
:header: Parameter, Usage
122121
:delim: #
@@ -155,8 +154,8 @@ Example:
155154
$sql = 'INSERT INTO ' . USERS_TABLE . ' ' . $db->sql_build_array('INSERT', $data);
156155
$db->sql_query($sql);
157156
158-
Parameters
159-
^^^^^^^^^^
157+
.. rubric:: Parameters
158+
160159
.. csv-table::
161160
:header: Parameter, Usage
162161
:delim: #
@@ -179,8 +178,8 @@ Example:
179178
WHERE ' . $db->sql_in_set('user_id', $sql_in);
180179
181180
182-
Parameters
183-
^^^^^^^^^^
181+
.. rubric:: Parameters
182+
184183
.. csv-table::
185184
:header: Parameter, Usage
186185
:delim: |
@@ -204,8 +203,8 @@ Example:
204203
WHERE post_id = ' . (int) $integer . "
205204
AND post_text = '" . $db->sql_escape($string) . "'";
206205
207-
Parameters
208-
^^^^^^^^^^
206+
.. rubric:: Parameters
207+
209208
.. csv-table::
210209
:header: Parameter, Usage
211210
:delim: |
@@ -220,8 +219,8 @@ Defined in the base driver (``_sql_like_expression`` is defined in the specific
220219

221220
The ``sql_not_like_expression`` is identical to ``sql_like_expression`` apart from that it builds a NOT LIKE statement.
222221

223-
Parameters
224-
^^^^^^^^^^
222+
.. rubric:: Parameters
223+
225224
.. csv-table::
226225
:header: Parameter, Usage
227226
:delim: |
@@ -266,8 +265,8 @@ Example:
266265
WHERE ' . $db->sql_lower_text('log_data') . ' ' . $like;
267266
$result = $db->sql_query_limit($sql, 10);
268267
269-
Parameters
270-
^^^^^^^^^^
268+
.. rubric:: Parameters
269+
271270
.. csv-table::
272271
:header: Parameter, Usage
273272
:delim: |
@@ -295,8 +294,8 @@ Example:
295294
$result = $db->sql_query($sql);
296295
297296
298-
Parameters
299-
^^^^^^^^^^
297+
.. rubric:: Parameters
298+
300299
.. csv-table::
301300
:header: Parameter, Usage
302301
:delim: |
@@ -320,8 +319,8 @@ Example:
320319
$result = $db->sql_query_limit($sql, $config['topics_per_page'], $start);
321320
322321
323-
Parameters
324-
^^^^^^^^^^
322+
.. rubric:: Parameters
323+
325324
.. csv-table::
326325
:header: Parameter, Usage
327326
:delim: |
@@ -356,8 +355,8 @@ Example:
356355
$db->sql_multi_insert(USER_GROUP_TABLE, $sql_ary);
357356
358357
359-
Parameters
360-
^^^^^^^^^^
358+
.. rubric:: Parameters
359+
361360
.. csv-table::
362361
:header: Parameter, Usage
363362
:delim: |
@@ -424,8 +423,8 @@ Example:
424423
$total_posts = (int) $db->sql_fetchfield('num_posts');
425424
426425
427-
Parameters
428-
^^^^^^^^^^
426+
.. rubric:: Parameters
427+
429428
.. csv-table::
430429
:header: Parameter, Usage
431430
:delim: #
@@ -438,9 +437,8 @@ sql_fetchrowset
438437
---------------
439438
Returns an array with the result of using the ``sql_fetchrow`` method on every row. Defined in the base driver.
440439

440+
.. rubric:: Parameters
441441

442-
Parameters
443-
^^^^^^^^^^
444442
.. csv-table::
445443
:header: Parameter, Usage
446444
:delim: #
@@ -476,9 +474,8 @@ Example with a while-loop:
476474
$config[$row['config_name']] = $row['config_value'];
477475
}
478476
477+
.. rubric:: Parameters
479478

480-
Parameters
481-
^^^^^^^^^^
482479
.. csv-table::
483480
:header: Parameter, Usage
484481
:delim: #
@@ -489,9 +486,8 @@ sql_rowseek
489486
-----------
490487
Seeks to given row number. The row number is zero-based. Defined in the specific drivers.
491488

489+
.. rubric:: Parameters
492490

493-
Parameters
494-
^^^^^^^^^^
495491
.. csv-table::
496492
:header: Parameter, Usage
497493
:delim: #
@@ -519,9 +515,8 @@ Example:
519515
// We don't need to do anything with our query anymore, so lets set it free
520516
$db->sql_freeresult($result);
521517
518+
.. rubric:: Parameters
522519

523-
Parameters
524-
^^^^^^^^^^
525520
.. csv-table::
526521
:header: Parameter, Usage
527522
:delim: #

development/development/css/css_specificity.rst

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,9 @@ This goes some way to providing our CSS with scope and encapsulation, but does s
169169

170170
Now we have better scoped CSS with minimal specificity—the best of both worlds.
171171

172-
Further Reading
173-
^^^^^^^^^^^^^^^
172+
.. seealso::
174173

175-
- `‘Scope’ in CSS`_
174+
- `‘Scope’ in CSS`_
176175

177176
``!important``
178177
~~~~~~~~~~~~~~
@@ -272,12 +271,11 @@ Here we are selecting based on an attribute rather than an ID, and attribute sel
272271

273272
Do keep in mind that these are hacks, and should not be used unless you have no better alternative.
274273

275-
Further Reading
276-
^^^^^^^^^^^^^^^
274+
.. seealso::
277275

278-
- `Hacks for dealing with specificity`_
276+
- `Hacks for dealing with specificity`_
279277

280-
.. _jsfiddle.net/0yb7rque: https://jsfiddle.net/csswizardry/0yb7rque/
281-
.. _known bug: https://web.archive.org/web/20200512073642/https://twitter.com/codepo8/status/505004085398224896
282-
.. _‘Scope’ in CSS: https://csswizardry.com/2013/05/scope-in-css/
283-
.. _Hacks for dealing with specificity: https://csswizardry.com/2014/07/hacks-for-dealing-with-specificity/
278+
.. _jsfiddle.net/0yb7rque: https://jsfiddle.net/csswizardry/0yb7rque/
279+
.. _known bug: https://web.archive.org/web/20200512073642/https://twitter.com/codepo8/status/505004085398224896
280+
.. _‘Scope’ in CSS: https://csswizardry.com/2013/05/scope-in-css/
281+
.. _Hacks for dealing with specificity: https://csswizardry.com/2014/07/hacks-for-dealing-with-specificity/

development/development/git.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,10 @@ Review `Forking and Cloning`_.
138138

139139
Configuration
140140
-------------
141-
Git
142-
^^^
141+
142+
.. rubric:: Git
143+
:heading-level: 4
144+
143145
Add your Username to Git on your system:
144146

145147
::
@@ -162,8 +164,9 @@ Add the upstream remote (you can change 'upstream' to whatever you like):
162164
The *upstream* remote url **is** the phpBB GitHub repo. Your cloned
163165
fork of the phpBB GitHub repo will, by default, use the *origin* remote url.
164166

165-
Composer
166-
^^^^^^^^
167+
.. rubric:: Composer
168+
:heading-level: 4
169+
167170
To be able to run an installation from the repo (and not from a pre-built package) you
168171
need to run the following shell commands to install phpBB's dependencies.
169172

@@ -179,8 +182,9 @@ Ignore any *abandoned package* warnings.
179182
`Introduction - Composer <https://getcomposer.org/doc/00-intro.md>`_ for
180183
further information.
181184

182-
Hooks
183-
^^^^^
185+
.. rubric:: Hooks
186+
:heading-level: 4
187+
184188
The phpBB repository contains some client-side hooks that can aid development. They are
185189
located in the ``git-tools/hooks`` directory. These hooks do things like preparing and
186190
validating commit messages, checking for PHP syntax errors. There is a script to set

development/extensions/tutorial_authentication.rst

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ Creating an Authentication Provider
2424
Authentication providers in phpBB require a minimum of two files: a PHP class
2525
and a YAML service file.
2626

27-
The class file
28-
^^^^^^^^^^^^^^
27+
.. rubric:: The class file
28+
2929
The provider class must implement the ``\phpbb\auth\provider\provider_interface`` in order to
3030
ensure proper functionality. However, it is recommended to extend
3131
``\phpbb\auth\provider\base`` so as to not implement unneeded methods and to ensure
@@ -104,8 +104,8 @@ authentication provider class is show below:
104104
}
105105
}
106106
107-
The service file
108-
^^^^^^^^^^^^^^^^
107+
.. rubric:: service file
108+
109109
For proper :ref:`dependency injection <dependency-injection>`
110110
the provider must be added to ``services.yml``. The name of the service
111111
must be in the form of ``auth.provider.<service name>`` in order for phpBB to register it.
@@ -123,8 +123,8 @@ for the class to be made available in phpBB.
123123
tags:
124124
- { name: auth.provider }
125125
126-
The template file
127-
^^^^^^^^^^^^^^^^^
126+
.. rubric:: template file
127+
128128
Following the above steps renders the authentication provider visible in the ACP.
129129
However, to allow an admin to configure your plugin the available fields need to
130130
be created in order to reach the configuration from the php-auth-provider plugin.
@@ -168,8 +168,8 @@ The example files below show the minimum needed to enable an OAuth service in
168168
phpBB. They are copies of the bitly service implementation from phpBB's
169169
develop branch.
170170

171-
The Class file
172-
^^^^^^^^^^^^^^
171+
.. rubric:: The Class file
172+
173173
.. code-block:: php
174174
175175
<?php
@@ -267,8 +267,7 @@ The Class file
267267
}
268268
}
269269
270-
The Service File
271-
^^^^^^^^^^^^^^^^
270+
.. rubric:: service file
272271

273272
In the service file, the name of the service must be in the form of
274273
``auth.provider.oauth.service.<service name>`` in order for phpBB to

development/extensions/tutorial_notifications.rst

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,8 +1033,7 @@ This function is very simple to use, and requires only a few basic parameters:
10331033
delete_notifications
10341034
--------------------
10351035

1036-
Parameters
1037-
^^^^^^^^^^
1036+
.. rubric:: Parameters
10381037

10391038
.. csv-table::
10401039
:header: Parameter, Description
@@ -1080,8 +1079,7 @@ The following is a quick summary of the three methods available for marking noti
10801079
mark_notifications
10811080
------------------
10821081

1083-
Parameters
1084-
^^^^^^^^^^
1082+
.. rubric:: Parameters
10851083

10861084
.. csv-table::
10871085
:header: Parameter, Description
@@ -1096,8 +1094,7 @@ Parameters
10961094
mark_notifications_by_parent
10971095
----------------------------
10981096

1099-
Parameters
1100-
^^^^^^^^^^
1097+
.. rubric:: Parameters
11011098

11021099
.. csv-table::
11031100
:header: Parameter, Description
@@ -1117,8 +1114,7 @@ as most of the notification handling is done through the distinct item and/or pa
11171114
However, there can be times where it is more convenient or accurate to work directly with the notification's unique id.
11181115
For example, when the notifications are listed in the :abbr:`UCP (User Control Panel)` and a user can select specific notifications to be marked as read.
11191116

1120-
Parameters
1121-
^^^^^^^^^^
1117+
.. rubric:: Parameters
11221118

11231119
.. csv-table::
11241120
:header: Parameter, Description

development/extensions/tutorial_templates.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,10 @@ To make comments inside the template you can use ``{# #}``:
129129
130130
{# Your comments can go here. #}
131131
132-
Variables
133-
---------
132+
Template variables
133+
------------------
134134

135-
Variables in phpBB take the form of ``{{ X_YYYYY }}``, where the data is assigned from the source. However, most
135+
Template variables in phpBB take the form of ``{{ X_YYYYY }}``, where the data is assigned from the source. However, most
136136
language strings are not assigned from the source. When a language variable is found, denoted as ``{{ lang('YYYYYY') }}``,
137137
phpBB first checks if an assigned variable with that name exists. If it does, it uses that. If not, it checks if an
138138
existing string defined in the language file exists.
@@ -141,8 +141,8 @@ By using the language variable format, phpBB allows for more flexibility in the
141141
This allows for easy modifications of language strings in the language files without having to modify the source code
142142
directly.
143143

144-
Blocks
145-
------
144+
Template blocks
145+
---------------
146146

147147
The basic block level loop takes the form:
148148

0 commit comments

Comments
 (0)