Difference between revisions of "MusicBob"

From Sega Retro

 
(31 intermediate revisions by 5 users not shown)
Line 2: Line 2:
 
<meta itemprop="image" content="{{{cover}}}">
 
<meta itemprop="image" content="{{{cover}}}">
 
<meta itemprop="name" content="{{PAGENAME}}">
 
<meta itemprop="name" content="{{PAGENAME}}">
{{#vardefine:type|3}}{{BobTablePlus|
+
{{#switch:{{{type|}}}|album=[[Category:Albums]]{{#vardefine:musictype|album}}|ep=[[Category:EPs]]{{#vardefine:musictype|ep}}|single=[[Category:Singles]]{{#vardefine:musictype|single}}|audiobook=[[Category:Audiobooks]]{{#vardefine:musictype|audiobook}}|[[Category:Update audio releases]]}}{{
 +
#if:{{{relatedto|}}}|{{RelationStore|{{#titleparts:{{PAGENAME}}}}|{{{relatedto|}}}|{{#ifeq:{{#var:musictype}}|audiobook|audiobook|music}}}}|}}{{
 +
#if:{{{relatedto2|}}}|{{RelationStore|{{#titleparts:{{PAGENAME}}}}|{{{relatedto2|}}}|{{#ifeq:{{#var:musictype}}|audiobook|audiobook|music}}}}|}}{{#ifeq:{{#var:musictype}}|audiobook|{{#vardefine:type|7}}|{{#vardefine:type|3}}}}{{BobTablePlus|
 
{{BobRowPlus
 
{{BobRowPlus
 
| if={{{cover|}}}
 
| if={{{cover|}}}
 
| align=center
 
| align=center
| default=[[File:Notavailable.svg]]
+
| default=[[File:Notavailable.svg]]{{#ifeq:{{NAMESPACE}}|Template||[[Category:No music cover]]}}
| content=[[File:{{{cover}}}|320x240px]]
+
| content={{#if:{{{cover2|}}}
 +
| {{tabs
 +
| icon1={{#if:{{{tab1|}}}|{{{tab1|}}}|{{{cover|}}}}}
 +
| icon2={{#if:{{{tab2|}}}|{{{tab2|}}}|{{{cover2|}}}}}
 +
| icon3={{#if:{{{tab3|}}}|{{{tab3|}}}|{{{cover3|}}}}}
 +
| icon4={{#if:{{{tab4|}}}|{{{tab4|}}}|{{{cover4|}}}}}
 +
| icon5={{#if:{{{tab5|}}}|{{{tab5|}}}|{{{cover5|}}}}}
 +
| content1=[[File:{{{cover}}}|320x240px]]
 +
| content2=[[File:{{{cover2}}}|320x240px]]
 +
| content3={{#if:{{{cover3|}}}|[[File:{{{cover3}}}|320x240px]]}}
 +
| content4={{#if:{{{cover4|}}}|[[File:{{{cover4}}}|320x240px]]}}
 +
| content5={{#if:{{{cover5|}}}|[[File:{{{cover5}}}|320x240px]]}}
 +
| orientation=horizontal
 +
| hidetitle=yes
 +
| width=auto
 +
| tabliststyle=margin:2px;
 +
}}
 +
| [[File:{{{cover}}}|320x240px]]}}
 
}}
 
}}
 
{{BobRowPlus
 
{{BobRowPlus
 
| if={{{title|}}}
 
| if={{{title|}}}
| default=''<span itemprop="name">{{PAGENAME}}</span>''
+
| default=<span itemprop="name">{{PAGENAME}}</span>
| content=''<span itemprop="name">{{{title}}}</span>''
+
| content=<span itemprop="name">{{{title|}}}</span>
 
| headline=yes
 
| headline=yes
 
| align=center
 
| align=center
 +
| style={{#ifeq:{{{type|}}}|single||font-style:italic}}
 
}}
 
}}
 
{{BobRowPlus
 
{{BobRowPlus
 +
| if={{{format|}}}
 +
| title=Format(s)
 +
| content={{{format|}}}{{#vardefine:systemfull|{{{format|}}}}}{{#if:{{#pos:{{{format|}}}|,}}|{{#vardefine:multi|yes}}}}
 +
}}
 +
{{#vardefine:companyrole|Publisher}}{{BobRowPlus
 +
| if={{{publisher|}}}
 +
| title=Publisher
 +
| content=<span itemprop="publisher">{{#if:{{#pos:{{{label|}}}|<div}}|{{{publisher}}}|{{company|{{{publisher|}}}|icons=no|inline=yes}}}}</span>
 +
}}
 +
{{#vardefine:companyrole|RecordLabel}}{{BobRowPlus
 
| if={{{label|}}}
 
| if={{{label|}}}
 
| title=Record label
 
| title=Record label
| content=<span itemprop="recordLabel">{{#vardefine:companyrole|RecordLabel}}{{#if:{{#pos:{{{label|}}}|<div}}|{{{label}}}|{{company|{{{label|}}}|system=MUSIC||icons=no|inline=yes}}}}{{#vardefine:companyrole|}}</span>
+
| content=<span itemprop="recordLabel">{{#if:{{#pos:{{{label|}}}|<div}}|{{{label}}}|{{company|{{{label|}}}|icons=no|inline=yes}}}}</span>
}}{{#if:{{{label|}}}||[[Category:Albums with missing catalog or label]]}}
+
}}{{#if:{{{publisher|}}}{{{label|}}}||[[Category:Music missing record label]]}}
{{BobRowPlus
+
{{#vardefine:companyrole|Distributor}}{{BobRowPlus
 
| if={{{distributor|}}}
 
| if={{{distributor|}}}
 
| title=Distributor
 
| title=Distributor
| content=<span itemprop="distributor">{{#vardefine:companyrole|Distributor}}{{company|{{{distributor}}}|system=MUSIC||icons=no|inline=yes}}{{#vardefine:companyrole|}}</span>
+
| content=<span itemprop="distributor">{{company|{{{distributor|}}}||icons=no|inline=yes}}</span>
 +
}}
 +
{{BobRowPlus
 +
| if={{{licensor|}}}
 +
| title=Licensor
 +
| content=<span itemprop="byLicensor">{{{licensor|}}}</span>
 
}}
 
}}
 
{{BobRowPlus
 
{{BobRowPlus
 
| if={{{artist|}}}
 
| if={{{artist|}}}
 
| title=Artist
 
| title=Artist
| content=<span itemprop="byArtist">{{{artist}}}</span>
+
| content=<span itemprop="byArtist">{{{artist|}}}</span>
 
}}
 
}}
 
{{BobRowPlus
 
{{BobRowPlus
 
| if={{{composer|}}}
 
| if={{{composer|}}}
 
| title=Composer
 
| title=Composer
| content={{{composer}}}
+
| content={{{composer|}}}[[Category:Old MusicBob field]]
 
}}
 
}}
 
{{BobRowPlus
 
{{BobRowPlus
 
| if={{{arranger|}}}
 
| if={{{arranger|}}}
 
| title=Arranger
 
| title=Arranger
| content={{{arranger}}}
+
| content={{{arranger|}}}[[Category:Old MusicBob field]]
 
}}
 
}}
 
{{BobRowPlus
 
{{BobRowPlus
 
| if={{{releases|}}}
 
| if={{{releases|}}}
 
| content={{releasesHeader}}
 
| content={{releasesHeader}}
{{{releases}}}
+
{{{releases|}}}
 
{{releasesEnd}}
 
{{releasesEnd}}
 
}}
 
}}
 
}}
 
}}
</div>
+
</div>{{#if:{{{artist|}}}|{{StoreCreditsLine
 +
| role=Artist
 +
| nameList={{{artist|}}}
 +
| game={{PAGENAME}}
 +
| console={{#if:{{#var:cd}}{{#var:cddvd}}{{#var:cdbr}}{{#var:cddvdbr}}|CD|{{#if:{{#var:cassette}}|Cassette|{{#if:{{#var:vinyl}}|Vinyl|Digital}}}}}}
 +
| date=
 +
}}}}
 
<div style="display:none;">
 
<div style="display:none;">
 
{{#seo:
 
{{#seo:
  |og:image={{filepath:{{#if: {{{cover|}}}|{{{cover}}}|Notavailable.svg}}}}
+
  |image={{filepath:{{{cover|}}}}}
  |og:site_name=Sega Retro
+
  |site_name=Sega Retro
  |title={{PAGENAME}}
+
  |locale=en_GB
|twitter:card=summary_large_image
+
  }}
|twitter:site=@segaretro
+
</div><noinclude>
  |twitter:image:src={{filepath:{{#if: {{{cover|}}}|{{{cover}}}|Notavailable.svg}}}}
 
}}</div><noinclude>
 
  
 
==Usage==
 
==Usage==
Line 66: Line 105:
 
| cover=
 
| cover=
 
| title=
 
| title=
 +
| type=
 +
| format=
 
| artist=
 
| artist=
| composer=
+
| publisher=
| arranger=
 
 
| label=
 
| label=
 +
| distributor=
 +
| licensor=
 
| releases={{releasesMusic
 
| releases={{releasesMusic
 
...
 
...
 
}}
 
}}
 +
| relatedto= <!--for Omni templates-->
 
}}
 
}}
 
</pre>
 
</pre>

Latest revision as of 07:19, 8 March 2023

Notavailable.svg
MusicBob

Usage

This template is to be used on articles about albums. Place the following at the top of a page:

{{MusicBob
| cover=
| title=
| type=
| format=
| artist=
| publisher=
| label=
| distributor=
| licensor=
| releases={{releasesMusic
...
}}
| relatedto= <!--for Omni templates-->
}}