Template:Pagenotice: Difference between revisions

From Ring of Brodgar
Jump to navigation Jump to search
(+Pagenotice Talk note, +used code preview.)
(STUB: Also list pages in Category:Article stubs.)
 
(17 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     =#b22222;
     | delete       = #b22222;
     | content   =#f28500;
     | content     = #f28500;
     | style     =#f4c430;
     | style       = #f4c430;
     | move       =#9932cc;
     | move         = #9932cc;
     | protected =#bba;
     | protected   = #bba;
     | #default   =#f28500;
    | 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     =wiki-deletion.png
     | delete       = wiki-deletion.png
     | content   =wiki-content.png
     | content     = wiki-content.png
     | style     =wiki-edit-clear.png
     | style       = wiki-edit-clear.png
     | move       =wiki-move.png
     | move         = wiki-move.png
     | protected =wiki-protection.png
     | protected   = wiki-protection.png
     | #default   =wiki-content.png
    | 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;">
Line 23: Line 25:
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 headage. (maybe later)
-- 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}}}}.
{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!--nop-->|[[Category:Pagenotice-OTHER]]}}
{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!--nop-->|[[Category:Pagenotice/ISSUE]]}}


}}{{#switch:FOOD|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}=*<b>[[:Category:Pagenotice-FOOD|FOOD]]</b>: (''this "FOOD" tag needs its Text adjusted'')
}}{{#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-FOOD]]}}
{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!--nop-->|[[Category:Pagenotice/OTHER]]}}


}}{{#switch:SAT|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}=*<b>[[:Category:Pagenotice-SAT|SAT]]</b>: World-11 Satiation data may not be accurate yet on this page. (''or might be missing'')
}}{{#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-SAT]]}}
{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!--nop-->|[[Category:Pagenotice/FOOD]]}}


}}{{#switch:OUT|{{{1|}}}|{{{2|}}}|{{{3|}}}|{{{4|}}}=*<b>[[:Category:Pagenotice-OUT|OUT]]</b>: The data on this page is probably/considered outdated.
}}{{#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-OUT]]}}
{{#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]]}}


}}
}}
<span style="color:gray">To disable a particular Tag-message, <i>after checking/fixing the related issue</i>, remove its TAG from the "Pagenotice" call.</span>{{#ifeq:{{NAMESPACE}}|{{ns:Template}}|<!--nop-->|[[Category:Pagenotice]]}}
<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
OUT
Line 47: 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 -->  
   |             = <!--No type fed, is also valid input -->  
   | delete     =
   | delete       =
   | content   =  
   | content     =  
   | style     =
   | style       =
   | move       =
   | move         =
   | protected =
   | protected   =
   | notice     =
  | discontinued =
   | #default   = <div style="text-align: center;">This message box is using an invalid "type={{{type|}}}" parameter and needs fixing.</div>[[Category:Wrong syntax]]
   | 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 64: 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-TAG categories. (leaving it as such for the moment)
- 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)


Line 71: Line 89:
--- would potentially allow to generalize the TAG switch parts, and moving TAG setting to separate page.
--- 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), ... .
---- 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)
-->
-->


Line 76: Line 96:
:For code related stuff, use the related template talk page.
: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.
: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>
;DEBUG/PREVIEWs<br>


Empty case ("<code><nowiki>Foo {{ {{PAGENAME}}}} Bar</nowiki></code>"): Foo {{ {{PAGENAME}}}} Bar
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


None-empty case ("<code><nowiki>Foo {{ {{PAGENAME}}|OUT|misfit|SAT|OTHER}} Bar</nowiki></code>"): Foo {{ {{PAGENAME}}|OUT|misfit|SAT|OTHER}} Bar


Misfit case test "<code><nowiki>{{Pagenotice|misfit}}</nowiki></code>"{{ {{PAGENAME}}|misfit}}(''Misfit is a test case TAG'')


Misfit only case ("<code><nowiki>Foo {{ {{PAGENAME}}|misfit}} Bar</nowiki></code>"): Foo {{ {{PAGENAME}}|misfit}} Bar (''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}}"

Wiki-content.png

Page Notices:

  • 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.


Available cases:2) "{{Pagenotice|STUB|DISC|STUB.LEG|ISSUE|text=Issue description}}"

Wiki-content.png

Page Notices:

  • 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.


Empty case test "Foo {{Pagenotice}} Bar" or "Foo {{Pagenotice|}} Bar" Foo Bar


Misfit case test "{{Pagenotice|misfit}}"

Wiki-content.png

Page Notices:

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.

(Misfit is a test case TAG)