Difference between revisions of "Scanbox"

From Sega Retro

(I'll work this out when I'm not hungry)
(big revamp, let me know if it breaks anything)
Line 1: Line 1:
<includeonly><div align="center" style="display:inline-block; padding-right:8px; padding-bottom:8px; vertical-align:top; text-align:center; ">{{#ifeq: {{{square}}} | yes | {{#vardefine:coverheight|80}} | {{#vardefine:coverheight|120}} }}
+
<includeonly><div align="center" style="display:inline-block; padding-right:8px; padding-bottom:8px; vertical-align:top; text-align:center; ">{{#ifeq: {{{square}}} | yes | {{#vardefine:coverheight|80}} | {{#vardefine:coverheight|120}} }}{{#vardefine:coverwidth|{{#if:{{{cover|}}}|{{h2w|{{{cover}}}|{{#var:coverheight}}}}|0}}}}{{#vardefine:frontwidth|{{#if:{{{front|}}}|{{h2w|{{{front}}}|{{#var:coverheight}}}}|0}}}}{{#vardefine:backwidth|{{#if:{{{back|}}}|{{h2w|{{{back}}}|{{#var:coverheight}}}}|0}}}}{{#vardefine:spinewidth|{{#if:{{{spine|}}}|{{h2w|{{{spine}}}|{{#var:coverheight}}}}|0}}}}{{#vardefine:spine2width|{{#if:{{{spine2|}}}|{{h2w|{{{spine2}}}|{{#var:coverheight}}}}|0}}}}{{#vardefine:nospinewidth|{{#if:{{{spinemissing|}}}|{{#if:{{{square|}}}|{{#mediawidth:Nospine-small.png}}|{{#mediawidth:Nospine.png}}}}|0}}}}
{| class="breakout" style="text-align:center; max-width:200px; height:240px;">
+
{| class="breakout" style="text-align:center; max-width:320px"
!style="border: 0px;"| {{#if: {{{title|}}} | '''{{{title}}}''' | {{#if: {{{console|}}} | '''{{{console}}}, ''' | }} {{#if: {{{region|}}} | '''{{{region}}}''' | }}}}
+
! style="border: 0px;" | {{#if: {{{title|}}} | '''{{{title}}}''' | {{#if: {{{console|}}} | '''{{{console}}}, ''' | }} {{#if: {{{region|}}} | '''{{{region}}}''' | }}}}
 
|-
 
|-
|align="center" style="border: 0px; text-align:center; {{#ifeq: {{{covershared}}} | yes | opacity:0.5; | }}"|{{#if: {{{cover|}}} | [[File:{{{cover}}}{{!}}320x{{#var:coverheight}}px]] | {{#if: {{{top|}}} | <span style="margin-left:{{{topmarginleft}}}px; line-height:0px;">[[File:{{{top}}}{{!}}{{{topbottomwidth}}}px]]</span><br/> | }}{{#if: {{{back|}}} | [[File:{{{back}}}{{!}}x{{#var:coverheight}}px]] | }}{{#if: {{{spine|}}} | [[File:{{{spine}}}{{!}}x{{#var:coverheight}}px]] | }}{{#ifeq: {{{spinemissing}}} | yes | {{#ifeq: {{{square}}} | yes | [[File:Nospine-small.png]] | [[File:Nospine.png]] }} | }}{{#if: {{{front|}}} | [[File:{{{front}}}{{!}}320x{{#var:coverheight}}px]] | }}{{#if: {{{spine2|}}} | [[File:{{{spine2}}}{{!}}x{{#var:coverheight}}px]] | }}{{#if: {{{bottom|}}} | <br/><span style="margin-left:{{{bottommarginleft}}}px; line-height:0px;">[[File:{{{bottom}}}{{!}}{{{topbottomwidth}}}px]]</span><br/>  | }} | }}
+
| align="center" style="text-align:center; | <div style="margin:auto; max-width:{{#expr:{{#var:coverwidth}}+{{#var:frontwidth}}+{{#var:backwidth}}+{{#var:spinewidth}}+{{#var:spine2width}}+{{#var:nospinewidth}}}}px">{{#if: {{{top|}}} | <div style="text-align:right; line-height:0px; padding-right:{{#var:spine2width}}px">[[File:{{{top}}}|{{#var:frontwidth}}px]]</div> | }}
{{#if: {{{cover|}}} | <span align="center">Cover</span> | {{#if: {{{front|}}} | <span align="center">Cover</span> | {{#if: {{{back|}}} | <br><span align="center">Cover</span> | }} | }} | }}
+
{{#if: {{{cover|}}} | [[File:{{{cover}}}|320x{{#var:coverheight}}px]] | }}{{#if: {{{back|}}} | [[File:{{{back}}}|320x{{#var:coverheight}}px]] | }}{{#if: {{{spine|}}} | [[File:{{{spine}}}|320x{{#var:coverheight}}px]] | }}{{#if: {{{spinemissing|}}} | {{#if: {{{square|}}} | [[File:Nospine-small.png]] | [[File:Nospine.png]] }} | }}{{#if: {{{front|}}} | [[File:{{{front}}}|320x{{#var:coverheight}}px]] | }}{{#if: {{{spine2|}}} | [[File:{{{spine2}}}|320x{{#var:coverheight}}px]] | }}{{#if: {{{bottom|}}} | <div style="text-align:right; line-height:0px; padding-right:{{#var:spine2width}}px">[[File:{{{bottom}}}|{{#var:frontwidth}}px]]</div> | }}{{#if: {{{cover|}}}{{{front|}}} | <div style="text-align:center">Cover</div> | }}
 +
</div>
 
|-
 
|-
|align="center" style="border: 0px; text-align:center;"| {{#if: {{{spinecard|}}} | <div style="display:inline-block; vertical-align:top; text-align:center; padding:4px">[[File:{{{spinecard}}}{{!}}50x50px]]<br>Spinecard</div> | }}{{
+
| align="center" style="text-align:center" | {{ScanboxItem|{{{spinecard|no}}}|Spinecard}}{{ScanboxItem|{{{cart|no}}}|Cart|top={{{carttop|}}}|back={{{cartback|}}}}}{{ScanboxItem|{{{card|no}}}|Card|back={{{cardback|}}}}}{{ScanboxItem|{{{disc|no}}}|Disc|back={{{discback|}}}}}{{ScanboxItem|{{{disk|no}}}|Disk|back={{{diskback|}}}}}{{ScanboxItem|{{{manual|no}}}|Manual}}{{ScanboxItem|{{{booklet|no}}}|Booklet}}{{#if:{{{jewelcasefront|}}}{{{jewelcaseback|}}}|{{ScanboxItem|{{{jewelcasefront|no}}}|Jewel Case|back={{{jewelcaseback|}}}}}|}}{{ScanboxItem|{{{inlay|no}}}|Inlay|back={{{inlayfront|}}}}}{{ScanboxItem|{{{regcard|no}}}|Reg Card}}{{ScanboxItem|{{{item1|no}}}|{{{item1name|?}}}}}{{ScanboxItem|{{{item2|no}}}|{{{item2name|?}}}}}{{ScanboxItem|{{{item3|no}}}|{{{item3name|?}}}}}{{ScanboxItem|{{{item4|no}}}|{{{item4name|?}}}}}{{ScanboxItem|{{{item5|no}}}|{{{item5name|?}}}}}{{ScanboxItem|{{{item6|no}}}|{{{item6name|?}}}}}{{ScanboxItem|{{{item7|no}}}|{{{item7name|?}}}}}{{ScanboxItem|{{{item8|no}}}|{{{item8name|?}}}}}
#if: {{{cart|}}}{{{carttop|}}} | <div style="display:inline-block; vertical-align:top; text-align:center; padding:4px; {{#ifeq: {{{cartshared}}} | yes | opacity:0.5; | }}">{{#if: {{{carttop|}}} | [[File:{{{carttop}}}{{!}}50px]]<br> | }}[[File:{{{cart}}}{{!}}50x50px]]<br>Cart</div> | }}{{
+
|}{{#if: {{{item1|}}}{{{item2|}}} | [[Category:Games with extra scans]] | }}
#if: {{{cartback|}}} | <div style="display:inline-block; vertical-align:top; text-align:center; padding:4px">[[File:{{{cartback}}}{{!}}50x50px]]<br>Cart</div> | }}{{
 
#if: {{{disc|}}} | <div style="display:inline-block; vertical-align:top; text-align:center; padding:4px; {{#ifeq: {{{discshared}}} | yes | opacity:0.5; | }}">[[File:{{{disc}}}{{!}}50x50px]]<br>Disc</div> | }}{{
 
#if: {{{disk|}}} | <div style="display:inline-block; vertical-align:top; text-align:center; padding:4px; {{#ifeq: {{{diskshared}}} | yes | opacity:0.5; | }}">[[File:{{{disk}}}{{!}}50x50px]]<br>Disk</div> | }}{{
 
#if: {{{manual|}}} | <div style="display:inline-block; vertical-align:top; text-align:center; padding:4px; {{#ifeq: {{{manualshared}}} | yes | opacity:0.5; | }}">[[File:{{{manual}}}{{!}}50x50px]]<br>Manual</div> | }}{{
 
#if: {{{item1|}}} | <div style="display:inline-block; vertical-align:top; text-align:center; padding:4px">[[File:{{{item1}}}{{!}}50x50px]]<br>{{{item1name}}}</div> | }}{{
 
#if: {{{item2|}}} | <div style="display:inline-block; vertical-align:top; text-align:center; padding:4px">[[File:{{{item2}}}{{!}}50x50px]]<br>{{{item2name}}}</div> | }}{{
 
#if: {{{item3|}}} | <div style="display:inline-block; vertical-align:top; text-align:center; padding:4px">[[File:{{{item3}}}{{!}}50x50px]]<br>{{{item3name}}}</div> | }}{{
 
#if: {{{item4|}}} | <div style="display:inline-block; vertical-align:top; text-align:center; padding:4px">[[File:{{{item4}}}{{!}}50x50px]]<br>{{{item4name}}}</div> | }}{{
 
#if: {{{item5|}}} | <div style="display:inline-block; vertical-align:top; text-align:center; padding:4px">[[File:{{{item5}}}{{!}}50x50px]]<br>{{{item5name}}}</div> | }}{{
 
#if: {{{item6|}}} | <div style="display:inline-block; vertical-align:top; text-align:center; padding:4px">[[File:{{{item6}}}{{!}}50x50px]]<br>{{{item6name}}}</div> | }}{{
 
#if: {{{item7|}}} | <div style="display:inline-block; vertical-align:top; text-align:center; padding:4px">[[File:{{{item7}}}{{!}}50x50px]]<br>{{{item7name}}}</div> | }}{{
 
#if: {{{item8|}}} | <div style="display:inline-block; vertical-align:top; text-align:center; padding:4px">[[File:{{{item8}}}{{!}}50x50px]]<br>{{{item8name}}}</div> | }}{{
 
#ifeq: {{{jewelcase}}} | yes | <div style="display:inline-block; vertical-align:top; text-align:center; padding:4px">{{#if: {{{jewelcaseback|}}} | [[File:{{{jewelcaseback}}}{{!}}x50px]] | }}{{#ifeq: {{{jewelcasespinemissing}}} | yes | [[File:Nospine-small.png{{!}}x50px]]}}{{#if: {{{jewelcasefront|}}} | [[File:{{{jewelcasefront}}}{{!}}x50px]] | }}
 
<br>Jewel Case</div> | }}{{
 
#if: {{{rom|}}} | <div style="font-size:8px">'''SHA-1:''' {{{rom}}}</div> | }}
 
|}
 
 
</div></includeonly><noinclude>
 
</div></includeonly><noinclude>
 
:'''Attention''': This template is now automatically feeding data into the MySQL database via [http://www.kwi.dk/projects/mediawiki/KwikiData/ KwikiData]. Please contact an administrator if you need to add/remove/rename/change any parameters. Changes to the appearance or documentation of the template should still be fine.
 
:'''Attention''': This template is now automatically feeding data into the MySQL database via [http://www.kwi.dk/projects/mediawiki/KwikiData/ KwikiData]. Please contact an administrator if you need to add/remove/rename/change any parameters. Changes to the appearance or documentation of the template should still be fine.
Line 39: Line 24:
 
| square=
 
| square=
 
| spinecard=
 
| spinecard=
 +
| inlay=
 
| cart=
 
| cart=
 
| disc=
 
| disc=

Revision as of 00:25, 23 February 2015

Attention: This template is now automatically feeding data into the MySQL database via KwikiData. Please contact an administrator if you need to add/remove/rename/change any parameters. Changes to the appearance or documentation of the template should still be fine.

Usage

{{Scanbox
| console=
| region=
| cover= (if the cover is one piece, like DVD and Mega Drive cases)
| front= (otherwise)
| back=
| spine=
| spinemissing=
| square=
| spinecard=
| inlay=
| cart=
| disc=
| manual=
}}

Use square=yes for games with square-shaped boxes, such as Dreamcast, Game Boy Advance or Nintendo DS games.

For additional items, use:

| item1=
| item1name=
| item2=
| item2name=
| item3=
| item3name=
| item4=
| item4name=

Example

Mega Drive, US
Columns md us cover.jpg
Cover
Columns md us cart.jpg
Cart
Game Gear, US
TLDC GG US Box Back.jpgNospine.pngTLDC GG US Box Front.jpg
Cover
TLDC GG EU Cart.jpg
Cart
TLDC GG EU Cart.jpg
Cart
Xbox, US
PanzerDragoonOrta Xbox US Box.jpg
Cover
PanzerDragoonOrta Xbox US Disc.jpg
Disc
Dreamcast, US
EtDDotF DC US Box Back.jpgEtDDotF DC US Box Front.jpg
Cover
EtDDotF DC US disc.jpg
Disc