Difference between revisions of "ScanCategory"

From Sega Retro

Line 1: Line 1:
<div style="display:none;">{{#vardefine:name|{{#if:{{{override|}}}|{{{override}}}|{{PAGENAME}}}}}}
+
<includeonly><div style="display:none;">{{#vardefine:name|{{#if:{{{override|}}}|{{{override}}}|{{PAGENAME}}}}}}
 
{{#vardefine:wordcount|{{#count:{{#var:name}}| }}}}
 
{{#vardefine:wordcount|{{#count:{{#var:name}}| }}}}
 
{{#vardefine:type|{{#explode:{{#var:name}}| |{{#expr:{{#var:wordcount}}-1}}}}}}
 
{{#vardefine:type|{{#explode:{{#var:name}}| |{{#expr:{{#var:wordcount}}-1}}}}}}
Line 5: Line 5:
 
{{#vardefine:format|{{#replace:{{#replace:{{#replace:{{#var:name}}|{{#var:region}}|}}|{{#var:type}}}}|scans|}}}}</div>
 
{{#vardefine:format|{{#replace:{{#replace:{{#replace:{{#var:name}}|{{#var:region}}|}}|{{#var:type}}}}|scans|}}}}</div>
 
{{#switch:{{lc:{{#var:region}}}}
 
{{#switch:{{lc:{{#var:region}}}}
|as|bx|ex=
+
|as|ex=
 +
|bx={{float|{{flag|BE|100}}  {{flag|NL|100}}  {{flag|LU|100}}}}
 
|#default={{float|{{flag|{{#var:region}}|200}}}}
 
|#default={{float|{{flag|{{#var:region}}|200}}}}
 
}}
 
}}
[[{{#var:format}}]] {{#var:type}} scans from {{CountrySentence|{{CountryCode2Country|{{#var:region}}}}}}.{{#ifeq:{{NAMESPACE}}|Category|[[Category:{{#var:format}} {{#var:type}} scans]][[Category:All {{#var:region}} scans]]}}
+
[[{{#var:format}}]] {{#var:type}} scans from {{CountrySentence|{{CountryCode2Country|{{#var:region}}}}}}.{{#ifeq:{{NAMESPACE}}|Category|[[Category:{{#var:format}} {{#var:type}} scans]][[Category:All {{#var:region}} scans]]}}</includeonly><noinclude>
 +
Template to make region categories consistent. It's mostly automated, working off the category name:
 +
 
 +
<pre>{{ScanCategory}}</pre>
 +
 
 +
You can override it with "override=". You shouldn't need to though - it's more of a testing thing
 +
 
 +
{{hr}}
 +
 
 +
<pre>{{ScanCategory|override=Mega Drive BR box scans}}</pre>
 +
{{ScanCategory|override=Mega Drive BR box scans}}
 +
 
 +
{{hr}}
 +
 
 +
<pre>{{ScanCategory|override=32X BX box scans}}</pre>
 +
{{ScanCategory|override=32X BX box scans}}
 +
 
 +
[[Category:Templates]]
 +
</noinclude>

Revision as of 11:26, 30 September 2024

Template to make region categories consistent. It's mostly automated, working off the category name:

{{ScanCategory}}

You can override it with "override=". You shouldn't need to though - it's more of a testing thing


{{ScanCategory|override=Mega Drive BR box scans}}


Brazil

Mega Drive box scans from Brazil.


{{ScanCategory|override=32X BX box scans}}


Belgium Netherlands Luxembourg

32X box scans from the Benelux region.