Difference between revisions of "Template:Page category check"

From RimWorld Wiki
Jump to navigation Jump to search
(Reduced the expansion depth by putting the Output outside the Documentation template. Added more maintenance templates)
Line 1: Line 1:
<includeonly>{{#if: <!--{{#vardefineecho:categories |--> {{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{{Category}}}
+
<includeonly>{{#if: {{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{{Category}}}
  | Category:Stubs}}<!--Order makes a difference for post-expand include size but exact relationship is unclear-->
+
  | Category:Stubs}}
 
  <!--| Category:Pages that are obsolete}}--><!--Shouldn't be categorized actually-->
 
  <!--| Category:Pages that are obsolete}}--><!--Shouldn't be categorized actually-->
 
  | Category:Pages that need fact checking}}
 
  | Category:Pages that need fact checking}}
 
  | Category:Pages that need images}}
 
  | Category:Pages that need images}}
  <!--| Category:Pages to be merged}}-->
+
  | Category:Pages to be merged}}
  <!--| Category:Pages to be moved}}-->
+
  | Category:Pages to be moved}}
 
  | Category:Pages to be recoded}}
 
  | Category:Pages to be recoded}}
 
  | Category:Pages to be rewritten}}
 
  | Category:Pages to be rewritten}}
  <!--| Category:Pages to be split}}--><!--Checked manually 10.11.2022-->
+
  | Category:Pages to be split}}
 +
| Category:Pages with broken file links}}
 
  | Category:Pages with graphs}}
 
  | Category:Pages with graphs}}
 +
| Category:Pages with syntax highlighting errors}}
 +
| Category:Biotech}}
 +
| Category:Ideology}}
 
  | Category:Royalty}}
 
  | Category:Royalty}}
  | Category:Ideology}}
+
  | Category:Console edition}}
  | Category:Biotech}}
+
  | Category:Impresive}}
 
  | Category:Unverified articles}}
 
  | Category:Unverified articles}}
 
  | Category:Articles verified for Alpha 14C}}
 
  | Category:Articles verified for Alpha 14C}}
Line 33: Line 37:
 
  | Category:Articles verified for 1.3.3387}}
 
  | Category:Articles verified for 1.3.3387}}
 
  | Category:Articles verified for 1.4.3525}}
 
  | Category:Articles verified for 1.4.3525}}
  | ,}}
+
  | ,}} || [[{{{page}}}]],&#32;}}{{#vardefine:date|{{{Date}}} }}</includeonly><noinclude>
<!--}}--> || [[{{{page}}}]]<!-- ({{#var:categories}})-->,&nbsp;}}{{#vardefine:date|{{{Date}}} }}</includeonly><noinclude>
 
 
{{Documentation|content=
 
{{Documentation|content=
 
== Explanation ==
 
== Explanation ==
Line 41: Line 44:
 
The pages are scanned with the following code:
 
The pages are scanned with the following code:
 
<pre>
 
<pre>
{{#ask: [[:+]] [[Modification date::>16 November 2021 15:29:34]]
+
{{#ask: [[:+]] [[Modification date::>28 January 2019 16:25:04]]
 
  | limit = 500 | format = template | template = Page category check | link = none | searchlabel =
 
  | limit = 500 | format = template | template = Page category check | link = none | searchlabel =
 
  | named args = yes
 
  | named args = yes
Line 52: Line 55:
 
</pre>
 
</pre>
 
As the limit of 500 cannot be exceeded, if the template doesn't return any pages, the modification date should be set the last checked date as returned under ''Output'' below. Since issues can only arise after new edits, pages that were last edited a long time ago don't have to be scanned again.
 
As the limit of 500 cannot be exceeded, if the template doesn't return any pages, the modification date should be set the last checked date as returned under ''Output'' below. Since issues can only arise after new edits, pages that were last edited a long time ago don't have to be scanned again.
 +
}}
  
 
== Output ==
 
== Output ==
The following pages only have a maintenance category defined:
+
The following pages (ordered by ''Modification date'') only have a maintenance category defined:
  
{{#ask: [[:+]] [[Modification date::>16 November 2021 15:29:34]]
+
{{#ask: [[:+]] [[Modification date::>28 January 2019 16:25:04]]
 
  | limit = 500 | format = template | template = Page category check | link = none | searchlabel =
 
  | limit = 500 | format = template | template = Page category check | link = none | searchlabel =
 
  | named args = yes
 
  | named args = yes
Line 66: Line 70:
 
}}
 
}}
  
The last checked date was: {{#var:date}}
+
The last checked page has a ''Modification date'' of: {{#var:date}}
  
}}[[Category:Wiki maintenance]]</noinclude>
+
[[Category:Wiki maintenance]]</noinclude>

Revision as of 13:57, 10 December 2022

Documentation icon Template documentation

Explanation

This template checks whether a content page is properly categorized. This is necessary since Special:UncategorizedPages doesn't work if the pages have categories like Category:Biotech, Category:Stubs or Category:Unverified articles defined.

The pages are scanned with the following code:

{{#ask: [[:+]] [[Modification date::>28 January 2019 16:25:04]]
 | limit = 500 | format = template | template = Page category check | link = none | searchlabel =
 | named args = yes
 | ? = page
 | ?Category = Category
 | ?Modification date = Date
 | sort = Modification date | order = ascending
 | offset = 0
}}

As the limit of 500 cannot be exceeded, if the template doesn't return any pages, the modification date should be set the last checked date as returned under Output below. Since issues can only arise after new edits, pages that were last edited a long time ago don't have to be scanned again.

Output

The following pages (ordered by Modification date) only have a maintenance category defined:


The last checked page has a Modification date of: 7 January 2024 15:03:25