Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Ready-made templates for the [phpBB Modders wiki extension](https://github.com/phpbbmodders/phpbb-ext-wiki), adapted from Wikipedia's and other Wikimedia wikis' for what the wiki can do, so a board can start with a useful set instead of writing every template from nothing.

So far [`templates/`](templates/) holds the hatnotes `{{Main}}`, `{{See also}}`, `{{Further}}`, `{{About}}`, `{{Distinguish}}`, `{{For}}`, `{{Other uses}}` and `{{Redirect}}`; the message boxes `{{Ambox}}`, `{{Update}}`, `{{Unreferenced}}`, `{{More citations needed}}`, `{{Primary sources}}`, `{{Cleanup}}`, `{{Confusing}}`, `{{Technical}}`, `{{Expand section}}` and `{{Under construction}}`; the stub boxes `{{Asbox}}` and `{{Stub}}`; the inline helpers `{{Nowrap}}`, `{{Small}}`, `{{Large}}` and `{{Center}}`; and `{{Blockquote}}` (phpBB's quote box) and `{{Template link}}`, which shows a template's name in braces as a link. The plan for this repository is in the wiki extension's [`docs/TODO/todo-wiki-templates-repo.md`](https://github.com/phpbbmodders/phpbb-ext-wiki/blob/main/docs/TODO/todo-wiki-templates-repo.md).
So far [`templates/`](templates/) holds the hatnotes `{{Main}}`, `{{See also}}`, `{{Further}}`, `{{About}}`, `{{Distinguish}}`, `{{For}}`, `{{Other uses}}` and `{{Redirect}}`; the message boxes `{{Ambox}}`, `{{Update}}`, `{{Unreferenced}}`, `{{More citations needed}}`, `{{Primary sources}}`, `{{Cleanup}}`, `{{Confusing}}`, `{{Technical}}`, `{{Expand section}}` and `{{Under construction}}`; the stub boxes `{{Asbox}}` and `{{Stub}}`; the inline helpers `{{Nowrap}}`, `{{Small}}`, `{{Large}}` and `{{Center}}`; `{{Blockquote}}` (phpBB's quote box) and `{{Template link}}`, which shows a template's name in braces as a link; and `{{Infobox}}`, a table of labelled facts that other infoboxes can be built on. The plan for this repository is in the wiki extension's [`docs/TODO/todo-wiki-templates-repo.md`](https://github.com/phpbbmodders/phpbb-ext-wiki/blob/main/docs/TODO/todo-wiki-templates-repo.md).

## Why a separate repository

Expand Down
7 changes: 7 additions & 0 deletions data/templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
"status": "adapted",
"title": "Template:Center"
},
"enwiki:891845": {
"name": "Infobox",
"reason": "",
"revid": 855069164,
"status": "adapted",
"title": "Template:Infobox"
},
"enwiki:994397": {
"name": "Blockquote",
"reason": "",
Expand Down
11 changes: 11 additions & 0 deletions templates/Infobox.wiki
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<noinclude>
Source: https://en.wikipedia.org/wiki/Template:Infobox
History: https://en.wikipedia.org/w/index.php?title=Template:Infobox&action=history
Revision: https://en.wikipedia.org/w/index.php?title=Template:Infobox&oldid=855069164 (08/15/2018 6:33 PM UTC)
Adapted by phpBB Modders.
Changes: rewritten in plain wiki text without Lua (Module:Infobox) as a table of the parameters Wikipedia's infobox takes: title, above, subheader, image with its caption (shown only with an image), below, and 20 numbered rows, each a header, a label with its data, or data alone (a label without data is left out, as on Wikipedia); no subheader2 or image2 and up, no child infoboxes, class, style, bodystyle or autoheaders options, and no float to the right, since the wiki lets no class or style through; removed the source's documentation and tracking categories.
Example: {{Infobox|title=Wiki|above=phpBB extension|label1=Version|data1=1.1.0|label2=Licence|data2=GPL-2.0|below=phpBB Modders}}
Example: {{Infobox|title=Board|header1=Software|label2=Name|data2=phpBB|label3=Empty|data4=A row with no label|header5=Hosting|label6=Host|data6=Self-hosted}}
Example: {{Infobox|title=Template|subheader=Just a test|caption=No image here|label20=Last row|data20=Twenty}}
Licence: CC BY-SA 4.0, https://creativecommons.org/licenses/by-sa/4.0/
</noinclude><table>{{#if:{{{title|}}}|<caption>{{{title}}}</caption>}}{{#if:{{{above|}}}|<tr><th colspan="2">{{{above}}}</th></tr>}}{{#if:{{{subheader|}}}|<tr><td colspan="2">{{{subheader}}}</td></tr>}}{{#if:{{{image|}}}|<tr><td colspan="2">{{{image}}}</td></tr>{{#if:{{{caption|}}}|<tr><td colspan="2">{{{caption}}}</td></tr>}}}}{{#if:{{{header1|}}}|<tr><th colspan="2">{{{header1}}}</th></tr>|{{#if:{{{data1|}}}|<tr>{{#if:{{{label1|}}}|<th>{{{label1}}}</th><td>{{{data1}}}</td>|<td colspan="2">{{{data1}}}</td>}}</tr>}}}}{{#if:{{{header2|}}}|<tr><th colspan="2">{{{header2}}}</th></tr>|{{#if:{{{data2|}}}|<tr>{{#if:{{{label2|}}}|<th>{{{label2}}}</th><td>{{{data2}}}</td>|<td colspan="2">{{{data2}}}</td>}}</tr>}}}}{{#if:{{{header3|}}}|<tr><th colspan="2">{{{header3}}}</th></tr>|{{#if:{{{data3|}}}|<tr>{{#if:{{{label3|}}}|<th>{{{label3}}}</th><td>{{{data3}}}</td>|<td colspan="2">{{{data3}}}</td>}}</tr>}}}}{{#if:{{{header4|}}}|<tr><th colspan="2">{{{header4}}}</th></tr>|{{#if:{{{data4|}}}|<tr>{{#if:{{{label4|}}}|<th>{{{label4}}}</th><td>{{{data4}}}</td>|<td colspan="2">{{{data4}}}</td>}}</tr>}}}}{{#if:{{{header5|}}}|<tr><th colspan="2">{{{header5}}}</th></tr>|{{#if:{{{data5|}}}|<tr>{{#if:{{{label5|}}}|<th>{{{label5}}}</th><td>{{{data5}}}</td>|<td colspan="2">{{{data5}}}</td>}}</tr>}}}}{{#if:{{{header6|}}}|<tr><th colspan="2">{{{header6}}}</th></tr>|{{#if:{{{data6|}}}|<tr>{{#if:{{{label6|}}}|<th>{{{label6}}}</th><td>{{{data6}}}</td>|<td colspan="2">{{{data6}}}</td>}}</tr>}}}}{{#if:{{{header7|}}}|<tr><th colspan="2">{{{header7}}}</th></tr>|{{#if:{{{data7|}}}|<tr>{{#if:{{{label7|}}}|<th>{{{label7}}}</th><td>{{{data7}}}</td>|<td colspan="2">{{{data7}}}</td>}}</tr>}}}}{{#if:{{{header8|}}}|<tr><th colspan="2">{{{header8}}}</th></tr>|{{#if:{{{data8|}}}|<tr>{{#if:{{{label8|}}}|<th>{{{label8}}}</th><td>{{{data8}}}</td>|<td colspan="2">{{{data8}}}</td>}}</tr>}}}}{{#if:{{{header9|}}}|<tr><th colspan="2">{{{header9}}}</th></tr>|{{#if:{{{data9|}}}|<tr>{{#if:{{{label9|}}}|<th>{{{label9}}}</th><td>{{{data9}}}</td>|<td colspan="2">{{{data9}}}</td>}}</tr>}}}}{{#if:{{{header10|}}}|<tr><th colspan="2">{{{header10}}}</th></tr>|{{#if:{{{data10|}}}|<tr>{{#if:{{{label10|}}}|<th>{{{label10}}}</th><td>{{{data10}}}</td>|<td colspan="2">{{{data10}}}</td>}}</tr>}}}}{{#if:{{{header11|}}}|<tr><th colspan="2">{{{header11}}}</th></tr>|{{#if:{{{data11|}}}|<tr>{{#if:{{{label11|}}}|<th>{{{label11}}}</th><td>{{{data11}}}</td>|<td colspan="2">{{{data11}}}</td>}}</tr>}}}}{{#if:{{{header12|}}}|<tr><th colspan="2">{{{header12}}}</th></tr>|{{#if:{{{data12|}}}|<tr>{{#if:{{{label12|}}}|<th>{{{label12}}}</th><td>{{{data12}}}</td>|<td colspan="2">{{{data12}}}</td>}}</tr>}}}}{{#if:{{{header13|}}}|<tr><th colspan="2">{{{header13}}}</th></tr>|{{#if:{{{data13|}}}|<tr>{{#if:{{{label13|}}}|<th>{{{label13}}}</th><td>{{{data13}}}</td>|<td colspan="2">{{{data13}}}</td>}}</tr>}}}}{{#if:{{{header14|}}}|<tr><th colspan="2">{{{header14}}}</th></tr>|{{#if:{{{data14|}}}|<tr>{{#if:{{{label14|}}}|<th>{{{label14}}}</th><td>{{{data14}}}</td>|<td colspan="2">{{{data14}}}</td>}}</tr>}}}}{{#if:{{{header15|}}}|<tr><th colspan="2">{{{header15}}}</th></tr>|{{#if:{{{data15|}}}|<tr>{{#if:{{{label15|}}}|<th>{{{label15}}}</th><td>{{{data15}}}</td>|<td colspan="2">{{{data15}}}</td>}}</tr>}}}}{{#if:{{{header16|}}}|<tr><th colspan="2">{{{header16}}}</th></tr>|{{#if:{{{data16|}}}|<tr>{{#if:{{{label16|}}}|<th>{{{label16}}}</th><td>{{{data16}}}</td>|<td colspan="2">{{{data16}}}</td>}}</tr>}}}}{{#if:{{{header17|}}}|<tr><th colspan="2">{{{header17}}}</th></tr>|{{#if:{{{data17|}}}|<tr>{{#if:{{{label17|}}}|<th>{{{label17}}}</th><td>{{{data17}}}</td>|<td colspan="2">{{{data17}}}</td>}}</tr>}}}}{{#if:{{{header18|}}}|<tr><th colspan="2">{{{header18}}}</th></tr>|{{#if:{{{data18|}}}|<tr>{{#if:{{{label18|}}}|<th>{{{label18}}}</th><td>{{{data18}}}</td>|<td colspan="2">{{{data18}}}</td>}}</tr>}}}}{{#if:{{{header19|}}}|<tr><th colspan="2">{{{header19}}}</th></tr>|{{#if:{{{data19|}}}|<tr>{{#if:{{{label19|}}}|<th>{{{label19}}}</th><td>{{{data19}}}</td>|<td colspan="2">{{{data19}}}</td>}}</tr>}}}}{{#if:{{{header20|}}}|<tr><th colspan="2">{{{header20}}}</th></tr>|{{#if:{{{data20|}}}|<tr>{{#if:{{{label20|}}}|<th>{{{label20}}}</th><td>{{{data20}}}</td>|<td colspan="2">{{{data20}}}</td>}}</tr>}}}}{{#if:{{{below|}}}|<tr><td colspan="2">{{{below}}}</td></tr>}}</table>
Loading