Template:Pagenotice: Difference between revisions
Jump to navigation
Jump to search
(add related TAG category link to displayed message(s)) |
(STUB: Also list pages in Category:Article stubs.) |
||
(24 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<includeonly | <includeonly | ||
>{{#if:{{{1|}}} | >{{#if:{{{1|}}}{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}} | ||
|<div style="margin: 0px 10% 0px 10%; border: 1px solid #aaa; border-left: 10px solid {{#switch:{{{type|}}} | |<div style="margin: 0px 10% 0px 10%; border: 1px solid #aaa; border-left: 10px solid {{#switch:{{{type|}}} | ||
| delete | | delete = #b22222; | ||
| content | | content = #f28500; | ||
| style | | style = #f4c430; | ||
| move | | move = #9932cc; | ||
| protected | | protected = #bba; | ||
| #default | | discontinued = #f0f; | ||
| #default = #f28500; | |||
}} padding: 4px 8px; background:#efefef; min-height: 44px;"> | }} padding: 4px 8px; background:#efefef; min-height: 44px;"> | ||
<div style="position: absolute;">[[File:{{#switch:{{{type|}}} | <div style="position: absolute;">[[File:{{#switch:{{{type|}}} | ||
| delete | | delete = wiki-deletion.png | ||
| content | | content = wiki-content.png | ||
| style | | style = wiki-edit-clear.png | ||
| move | | move = wiki-move.png | ||
| protected | | protected = wiki-protection.png | ||
| #default | | discontinued = wiki-discontinued.png | ||
| #default = wiki-content.png | |||
}}|40px]]</div> | }}|40px]]</div> | ||
<div style="border: none; padding: 2px 2px 2px 62px;"> | <div style="border: none; padding: 2px 2px 2px 62px;"> | ||
<b>Page Notices:</b><br><!-- | <b>[[:Category:Pagenotice|Page Notices]]:</b><br><!-- | ||
Supported messages part: begin. | Supported messages part: begin. | ||
- Number of needed {{{N}}} cases depends on max used/needed input-cases at/per calling pages. | - Number of needed {{{N}}} cases depends on max used/needed input-cases at/per calling pages. | ||
-- ie: Number of available TAGS not directly limited by this. (Number of TAGS per call is) | -- ie: Number of available TAGS is not directly limited by this. (Number of TAGS per call is) | ||
-- nts: splitting this part of to an other template would be nice ... but parm passing seems a potential | -- nts: splitting this part of to an other template would be nice ... but parm passing seems a potential headache. (maybe later) | ||
-->{{#switch:OTHER|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}=*<b>(other)</b>: Lorem ipsum dolor sit amet, consectetur adipiscing elit.}} | -->{{#switch:ISSUE|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}=*<b>[[:Category:Pagenotice/ISSUE|ISSUE]]</b>: {{#if:{{{text|}}}|{{{text}}}{{#set:Pagenotice_remark={{{text|}}}}}|{{error|Missing Issue text}}}}. | ||
{{#switch:FOOD|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}=*<b>[[:Category:Pagenotice | {{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!--nop-->|[[Category:Pagenotice/ISSUE]]}} | ||
{{#switch:SAT|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}=*<b>[[:Category:Pagenotice|SAT]]</b>: World-11 Satiation data may not be accurate yet on this page. (''or might be missing'')[[Category:Pagenotice- | |||
< | }}{{#switch:OTHER|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}=*<b>(other)</b>: Lorem ipsum dolor sit amet, consectetur adipiscing elit. | ||
{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!--nop-->|[[Category:Pagenotice/OTHER]]}} | |||
}}{{#switch:FOOD|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}=*<b>[[:Category:Pagenotice/FOOD|FOOD]]</b>: (''this "FOOD" tag needs its Text adjusted'') | |||
{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!--nop-->|[[Category:Pagenotice/FOOD]]}} | |||
}}{{#switch:SAT|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}=*<b>[[:Category:Pagenotice/SAT|SAT]]</b>: World-11 Satiation data may not be accurate yet on this page. (''or might be missing'') | |||
{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!--nop-->|[[Category:Pagenotice/SAT]]}} | |||
}}{{#switch:OUT|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}=*<b>[[:Category:Pagenotice/OUT|OUT]]</b>: The data on this page is probably/considered outdated. See the page-history for more detail. | |||
{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!--nop-->|[[Category:Pagenotice/OUT]]}} | |||
}}{{#switch:DISC|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}=*<b>[[:Category:Pagenotice/DISC|DISC]]</b>: <b>This page reflects a discontinued Haven & Hearth mechanic that has been removed/disabled.</b><i>{{#if:{{{disctext|}}}|<br>{{{disctext}}}}}</i> | |||
{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!--nop-->|[[Category:Pagenotice/DISC]]}} | |||
}}{{#switch:STUB|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}=*<b>[[:Category:Pagenotice/STUB|STUB]]</b>: Stub article(s) in need of expansion. | |||
{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!--nop-->|[[Category:Pagenotice/STUB]][[Category:Article stubs]]}} | |||
}}{{#switch:ESLOT|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}=*<b>[[:Category:Pagenotice/ESLOT|ESLOT]]</b>: Page-Infobox in need of Equipment-Slot verification. | |||
{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!--nop-->|[[Category:Pagenotice/ESLOT]]}} | |||
}}{{#switch:STUB.LEG|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}|{{{5|}}}=*<b>[[:Category:Pagenotice/STUB.LEG|STUB.LEG]]</b>: Legacy Stub article(s) in need of expansion. | |||
{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!--nop-->|[[Category:Pagenotice/STUB.LEG]]}} | |||
}} | |||
<div style="color:gray; line-height:1.0em; font-size:0.75em; margin-top:1.0em">To disable a particular Tag-message, <i>after checking/fixing the related issue</i>.<br>Remove the related TAG from the 'Pagenotice' call, or remove the whole 'Pagenotice' call.</div>{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!--nop-->|[[Category:Pagenotice]]}} | |||
<!-- | <!-- | ||
OUT | |||
Supported messages part: end. | Supported messages part: end. | ||
Line 37: | Line 64: | ||
Detect and report usage with faulty [[Template:Ambox#Article message box types|"type"]] parameter: | Detect and report usage with faulty [[Template:Ambox#Article message box types|"type"]] parameter: | ||
-->{{#switch:{{{type|}}} | -->{{#switch:{{{type|}}} | ||
| | | = <!--No type fed, is also valid input --> | ||
| delete | | delete = | ||
| content | | content = | ||
| style | | style = | ||
| move | | move = | ||
| protected | | protected = | ||
| notice | | discontinued = | ||
| #default | | notice = | ||
| #default = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:Wrong syntax]] | |||
}} | }} | ||
}}</includeonly | }}</includeonly | ||
Line 54: | Line 82: | ||
- minor issue: single blank ano-parameter also fires Pagenotice box (but a empty one). | - minor issue: single blank ano-parameter also fires Pagenotice box (but a empty one). | ||
-- can't just check if first ano-parm is blank, other might not be. | -- can't just check if first ano-parm is blank, other might not be. | ||
- minor: debug/preview TAG cases also included in Pagenotice | - minor: debug/preview TAG cases also included in Pagenotice/TAG categories. (leaving it as such for the moment) | ||
- odd issue: first tag-case in code, if its the only used tag, triggers an additional blank line before the "disable" text part. (?:later) | - odd issue: first tag-case in code, if its the only used tag, triggers an additional blank line before the "disable" text part. (?:later) | ||
- future/todo: | |||
-- see about possible property usage to set and manage TAG and tag-texts. | |||
--- would potentially allow to generalize the TAG switch parts, and moving TAG setting to separate page. | |||
---- where to potentially locate that TAG setting page ... Template(try not to), Main-ns(no), Ring_of_Brodgar-ns(maybe/probebly), ... . | |||
-- see about warning/error on detecting empty parm case. ie: {{Pagenotice|FOO||BAR}}, "||" being the empty parm case. (nts: potential tricky, as it should not be triggered for trailing empty parms) | |||
-- add warning/error on detecting overflow case. ie: when more than current number of parm is used. (overruled by empty parm warning) | |||
--> | --> | ||
;Pagenotice Talk | |||
}} | :For code related stuff, use the related template talk page. | ||
:For Page-notice usage/TAG ideas/suggestions/etc, use the related Page-notice category talk page. | |||
;Features | |||
:Current maximum number of inputs on Pagenotice template call: 5 | |||
;DEBUG/PREVIEWs<br> | |||
Available cases:1) "<code><nowiki>{{Pagenotice|ESLOT|OUT|SAT|OTHER|ISSUE}}</nowiki></code>"{{ {{PAGENAME}}|ESLOT|OUT|SAT|OTHER|ISSUE}} | |||
Available cases:2) "<code><nowiki>{{Pagenotice|STUB|DISC|STUB.LEG|ISSUE|text=Issue description}}</nowiki></code>"{{ {{PAGENAME}}|STUB|DISC|STUB.LEG|ISSUE|text=Issue description}} | |||
Empty case test "<code><nowiki>Foo {{Pagenotice}} Bar</nowiki></code>" or "<code><nowiki>Foo {{Pagenotice|}} Bar</nowiki></code>" Foo {{ {{PAGENAME}}}} Bar | |||
Misfit case test "<code><nowiki>{{Pagenotice|misfit}}</nowiki></code>"{{ {{PAGENAME}}|misfit}}(''Misfit is a test case TAG'') | |||
</noinclude> | </noinclude> |
Latest revision as of 08:22, 6 June 2023
- Pagenotice Talk
- For code related stuff, use the related template talk page.
- For Page-notice usage/TAG ideas/suggestions/etc, use the related Page-notice category talk page.
- Features
- Current maximum number of inputs on Pagenotice template call: 5
- DEBUG/PREVIEWs
Available cases:1) "{{Pagenotice|ESLOT|OUT|SAT|OTHER|ISSUE}}
"
- ISSUE: Missing Issue text.
- (other): Lorem ipsum dolor sit amet, consectetur adipiscing elit.
- SAT: World-11 Satiation data may not be accurate yet on this page. (or might be missing)
- OUT: The data on this page is probably/considered outdated. See the page-history for more detail.
- ESLOT: Page-Infobox in need of Equipment-Slot verification.
To disable a particular Tag-message, after checking/fixing the related issue.
Remove the related TAG from the 'Pagenotice' call, or remove the whole 'Pagenotice' call.
Remove the related TAG from the 'Pagenotice' call, or remove the whole 'Pagenotice' call.
Available cases:2) "{{Pagenotice|STUB|DISC|STUB.LEG|ISSUE|text=Issue description}}
"
- ISSUE: Issue description.
- DISC: This page reflects a discontinued Haven & Hearth mechanic that has been removed/disabled.
- STUB: Stub article(s) in need of expansion.
- STUB.LEG: Legacy Stub article(s) in need of expansion.
To disable a particular Tag-message, after checking/fixing the related issue.
Remove the related TAG from the 'Pagenotice' call, or remove the whole 'Pagenotice' call.
Remove the related TAG from the 'Pagenotice' call, or remove the whole 'Pagenotice' call.
Empty case test "Foo {{Pagenotice}} Bar
" or "Foo {{Pagenotice|}} Bar
" Foo Bar
Misfit case test "{{Pagenotice|misfit}}
"
To disable a particular Tag-message, after checking/fixing the related issue.
Remove the related TAG from the 'Pagenotice' call, or remove the whole 'Pagenotice' call.
Remove the related TAG from the 'Pagenotice' call, or remove the whole 'Pagenotice' call.
(Misfit is a test case TAG)