diff --git a/README.md b/README.md index 1e83b86..617c269 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/data/templates.json b/data/templates.json index 6fe92ab..b869412 100644 --- a/data/templates.json +++ b/data/templates.json @@ -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": "", diff --git a/templates/Infobox.wiki b/templates/Infobox.wiki new file mode 100644 index 0000000..b295826 --- /dev/null +++ b/templates/Infobox.wiki @@ -0,0 +1,11 @@ + +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/ +{{#if:{{{title|}}}|}}{{#if:{{{above|}}}|}}{{#if:{{{subheader|}}}|}}{{#if:{{{image|}}}|{{#if:{{{caption|}}}|}}}}{{#if:{{{header1|}}}||{{#if:{{{data1|}}}|{{#if:{{{label1|}}}||}}}}}}{{#if:{{{header2|}}}||{{#if:{{{data2|}}}|{{#if:{{{label2|}}}||}}}}}}{{#if:{{{header3|}}}||{{#if:{{{data3|}}}|{{#if:{{{label3|}}}||}}}}}}{{#if:{{{header4|}}}||{{#if:{{{data4|}}}|{{#if:{{{label4|}}}||}}}}}}{{#if:{{{header5|}}}||{{#if:{{{data5|}}}|{{#if:{{{label5|}}}||}}}}}}{{#if:{{{header6|}}}||{{#if:{{{data6|}}}|{{#if:{{{label6|}}}||}}}}}}{{#if:{{{header7|}}}||{{#if:{{{data7|}}}|{{#if:{{{label7|}}}||}}}}}}{{#if:{{{header8|}}}||{{#if:{{{data8|}}}|{{#if:{{{label8|}}}||}}}}}}{{#if:{{{header9|}}}||{{#if:{{{data9|}}}|{{#if:{{{label9|}}}||}}}}}}{{#if:{{{header10|}}}||{{#if:{{{data10|}}}|{{#if:{{{label10|}}}||}}}}}}{{#if:{{{header11|}}}||{{#if:{{{data11|}}}|{{#if:{{{label11|}}}||}}}}}}{{#if:{{{header12|}}}||{{#if:{{{data12|}}}|{{#if:{{{label12|}}}||}}}}}}{{#if:{{{header13|}}}||{{#if:{{{data13|}}}|{{#if:{{{label13|}}}||}}}}}}{{#if:{{{header14|}}}||{{#if:{{{data14|}}}|{{#if:{{{label14|}}}||}}}}}}{{#if:{{{header15|}}}||{{#if:{{{data15|}}}|{{#if:{{{label15|}}}||}}}}}}{{#if:{{{header16|}}}||{{#if:{{{data16|}}}|{{#if:{{{label16|}}}||}}}}}}{{#if:{{{header17|}}}||{{#if:{{{data17|}}}|{{#if:{{{label17|}}}||}}}}}}{{#if:{{{header18|}}}||{{#if:{{{data18|}}}|{{#if:{{{label18|}}}||}}}}}}{{#if:{{{header19|}}}||{{#if:{{{data19|}}}|{{#if:{{{label19|}}}||}}}}}}{{#if:{{{header20|}}}||{{#if:{{{data20|}}}|{{#if:{{{label20|}}}||}}}}}}{{#if:{{{below|}}}|}}
{{{title}}}
{{{above}}}
{{{subheader}}}
{{{image}}}
{{{caption}}}
{{{header1}}}
{{{label1}}}{{{data1}}}{{{data1}}}
{{{header2}}}
{{{label2}}}{{{data2}}}{{{data2}}}
{{{header3}}}
{{{label3}}}{{{data3}}}{{{data3}}}
{{{header4}}}
{{{label4}}}{{{data4}}}{{{data4}}}
{{{header5}}}
{{{label5}}}{{{data5}}}{{{data5}}}
{{{header6}}}
{{{label6}}}{{{data6}}}{{{data6}}}
{{{header7}}}
{{{label7}}}{{{data7}}}{{{data7}}}
{{{header8}}}
{{{label8}}}{{{data8}}}{{{data8}}}
{{{header9}}}
{{{label9}}}{{{data9}}}{{{data9}}}
{{{header10}}}
{{{label10}}}{{{data10}}}{{{data10}}}
{{{header11}}}
{{{label11}}}{{{data11}}}{{{data11}}}
{{{header12}}}
{{{label12}}}{{{data12}}}{{{data12}}}
{{{header13}}}
{{{label13}}}{{{data13}}}{{{data13}}}
{{{header14}}}
{{{label14}}}{{{data14}}}{{{data14}}}
{{{header15}}}
{{{label15}}}{{{data15}}}{{{data15}}}
{{{header16}}}
{{{label16}}}{{{data16}}}{{{data16}}}
{{{header17}}}
{{{label17}}}{{{data17}}}{{{data17}}}
{{{header18}}}
{{{label18}}}{{{data18}}}{{{data18}}}
{{{header19}}}
{{{label19}}}{{{data19}}}{{{data19}}}
{{{header20}}}
{{{label20}}}{{{data20}}}{{{data20}}}
{{{below}}}
\ No newline at end of file