Difference between revisions of "ScanCategory"

From Sega Retro

Line 3: Line 3:
 
{{#vardefine:type|{{#explode:{{#var:name}}| |{{#expr:{{#var:wordcount}}-1}}}}}}
 
{{#vardefine:type|{{#explode:{{#var:name}}| |{{#expr:{{#var:wordcount}}-1}}}}}}
 
{{#vardefine:region|{{#explode:{{#var:name}}| |{{#expr:{{#var:wordcount}}-2}}}}}}
 
{{#vardefine:region|{{#explode:{{#var:name}}| |{{#expr:{{#var:wordcount}}-2}}}}}}
 +
{{#switch:{{#var:region}}
 +
|console
 +
|accessory
 +
|bootleg={{#vardefine:region|{{#explode:{{#var:name}}| |{{#expr:{{#var:wordcount}}-3}}}}}}
 +
}}
 
{{#vardefine:format|{{#replace:{{#replace:{{#replace:{{#var:name}}|{{#var:region}}|}}|{{#var:type}}}}|scans|}}}}
 
{{#vardefine:format|{{#replace:{{#replace:{{#replace:{{#var:name}}|{{#var:region}}|}}|{{#var:type}}}}|scans|}}}}
 
{{#ifeq:{{#var:format}}|X|{{#vardefine:format|Xbox}}|}}<!--lazy Xbox fix--></div>
 
{{#ifeq:{{#var:format}}|X|{{#vardefine:format|Xbox}}|}}<!--lazy Xbox fix--></div>
Line 10: Line 15:
 
|#default={{float|{{flag|{{#var:region}}|200|border=silver}}}}
 
|#default={{float|{{flag|{{#var:region}}|200|border=silver}}}}
 
}}
 
}}
[[{{#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>
+
Scans of [[{{#var:format}}]] {{#switch:{{#var:type}}|box=boxes|#default={{#var:type}}s}} 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:
 
Template to make region categories consistent. It's mostly automated, working off the category name:
  
Line 31: Line 36:
 
<pre>{{ScanCategory|override=Xbox US box scans}}</pre>
 
<pre>{{ScanCategory|override=Xbox US box scans}}</pre>
 
{{ScanCategory|override=Xbox US box scans}}
 
{{ScanCategory|override=Xbox US box scans}}
 +
 +
 +
<pre>{{ScanCategory|override=Mega Drive US console box scans}}</pre>
 +
{{ScanCategory|override=Mega Drive US console box scans}}
  
 
[[Category:Templates]]
 
[[Category:Templates]]
 
</noinclude>
 
</noinclude>

Revision as of 15:37, 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

Scans of Mega Drive boxes from Brazil.


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



Belgium Netherlands Luxembourg

Scans of 32X boxes from the Benelux region.


{{ScanCategory|override=Xbox US box scans}}



United States of America

Scans of Xbox boxes from the United States.


{{ScanCategory|override=Mega Drive US console box scans}}



United States of America

Scans of Mega Drive console boxes from the United States.