Difference between revisions of "MusicBob"

From Sega Retro

 
(41 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{#vardefine:type|3}}{|cellpadding="0" cellspacing="0" style="width:auto !important; max-width:320px; padding: 0.1em; float:right; margin-left:15px;" width="210" class="breakout"
+
<div itemscope itemtype='http://schema.org/MusicRelease'>
|style="text-align:center"| [[Image:{{ #if: {{{cover|}}} | {{{cover}}} | Notavailable.svg }}|275x275px]]
+
<meta itemprop="image" content="{{{cover}}}">
|-
+
<meta itemprop="name" content="{{PAGENAME}}">
! '''''{{ #if: {{{title|}}} | <span itemprop="name">{{{title}}}</span> | <span itemprop="name">{{PAGENAME}}</span> }}'''''
+
{{#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}}}}|}}{{
|style="padding: 0.3em; line-height: 1.5em" | {{
+
#if:{{{relatedto2|}}}|{{RelationStore|{{#titleparts:{{PAGENAME}}}}|{{{relatedto2|}}}|{{#ifeq:{{#var:musictype}}|audiobook|audiobook|music}}}}|}}{{#ifeq:{{#var:musictype}}|audiobook|{{#vardefine:type|7}}|{{#vardefine:type|3}}}}{{BobTablePlus|
#if: {{{madeby|}}} | '''Artist:''' <span itemprop="creator">{{{madeby}}}</span><br/> | }}{{
+
{{BobRowPlus
#if: {{{artist|}}} | '''Artist:''' <span itemprop="creator">{{{artist}}}</span><br/> | }}{{
+
| if={{{cover|}}}
#if: {{{composer|}}} | '''Composer:''' {{{composer}}}<br/> | }}{{
+
| align=center
#if: {{{arranger|}}} | '''Arranger:''' {{{arranger}}}<br/> | }}{{
+
| default=[[File:Notavailable.svg]]{{#ifeq:{{NAMESPACE}}|Template||[[Category:No music cover]]}}
#if: {{{label|}}} | '''Record Label:''' <span itemprop="publisher">{{{label}}}</span><br/> | [[Category:Albums with Missing Catalog or Label]] }}{{
+
| content={{#if:{{{cover2|}}}
#if: {{{releases|}}} | {{releasesHeader}}
+
| {{tabs
{{{releases}}}
+
| icon1={{#if:{{{tab1|}}}|{{{tab1|}}}|{{{cover|}}}}}
{{releasesEnd}} | <br/> }}
+
| 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
 +
| if={{{title|}}}
 +
| default=<span itemprop="name">{{PAGENAME}}</span>
 +
| content=<span itemprop="name">{{{title|}}}</span>
 +
| headline=yes
 +
| align=center
 +
| style={{#ifeq:{{{type|}}}|single||font-style:italic}}
 +
}}
 +
{{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|}}}
 +
| title=Record label
 +
| content=<span itemprop="recordLabel">{{#if:{{#pos:{{{label|}}}|<div}}|{{{label}}}|{{company|{{{label|}}}|icons=no|inline=yes}}}}</span>
 +
}}{{#if:{{{publisher|}}}{{{label|}}}||[[Category:Music missing record label]]}}
 +
{{#vardefine:companyrole|Distributor}}{{BobRowPlus
 +
| if={{{distributor|}}}
 +
| title=Distributor
 +
| content=<span itemprop="distributor">{{company|{{{distributor|}}}||icons=no|inline=yes}}</span>
 +
}}
 +
{{BobRowPlus
 +
| if={{{licensor|}}}
 +
| title=Licensor
 +
| content=<span itemprop="byLicensor">{{{licensor|}}}</span>
 +
}}
 +
{{BobRowPlus
 +
| if={{{artist|}}}
 +
| title=Artist
 +
| content=<span itemprop="byArtist">{{{artist|}}}</span>
 +
}}
 +
{{BobRowPlus
 +
| if={{{composer|}}}
 +
| title=Composer
 +
| content={{{composer|}}}[[Category:Old MusicBob field]]
 +
}}
 +
{{BobRowPlus
 +
| if={{{arranger|}}}
 +
| title=Arranger
 +
| content={{{arranger|}}}[[Category:Old MusicBob field]]
 +
}}
 +
{{BobRowPlus
 +
| if={{{releases|}}}
 +
| content={{releasesHeader}}
 +
{{{releases|}}}
 +
{{releasesEnd}}
 +
}}
 +
}}
 +
</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;">
 
{{#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
 
|twitter:image:src={{filepath:{{#if: {{{cover|}}}|{{{cover}}}|Notavailable.svg}}}}
 
 
  }}
 
  }}
 
+
</div><noinclude>
<noinclude>
 
  
 
==Usage==
 
==Usage==
Line 29: Line 102:
  
 
<pre>
 
<pre>
{{Album
+
{{MusicBob
 
| cover=
 
| cover=
 
| title=
 
| title=
| madeby=
+
| type=
 +
| format=
 
| artist=
 
| artist=
| composer=
+
| publisher=
| arranger=
 
 
| label=
 
| label=
| releases={{releases
+
| distributor=
 +
| licensor=
 +
| releases={{releasesMusic
 
...
 
...
 
}}
 
}}
 +
| relatedto= <!--for Omni templates-->
 
}}
 
}}
 
</pre>
 
</pre>
  
===Example===
+
[[Category:Breakout box templates]]
{{Album
 
| cover= Hedgehog.jpg
 
| title= Mr. Hedgehog's Greatest Hits
 
| artist= [[Alex Kidd]]
 
| label= [[Sonic Retro]]
 
| releases={{releases
 
}}
 
}}
 
<pre>
 
{{Album
 
| cover= Hedgehog.jpg
 
| title= Mr. Hedgehog's Greatest Hits
 
| artist= [[Alex Kidd]]
 
| label= [[Sonic Retro]]
 
| releases={{releases
 
}}
 
}}
 
</pre>
 
 
 
[[Category:Breakout box templates|{{PAGENAME}}]]
 
 
</noinclude>
 
</noinclude>

Latest revision as of 06: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-->
}}