Difference between revisions of "OmniMedia"
From Sega Retro
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly>{{#vardefine: | + | <includeonly>{{#vardefine:bookresult|{{#cargo_query: |
tables=relationships,releases | tables=relationships,releases | ||
|fields=relationships.name,releases.date | |fields=relationships.name,releases.date | ||
− | |where=relationships.relatedto="{{{1|}}}" and relationships.relationshiptype=" | + | |where=relationships.relatedto="{{FormatSQL|{{{1|}}}}}" and relationships.relationshiptype="book" |
|join on=relationships.name=releases.name | |join on=relationships.name=releases.name | ||
|group by=releases.name | |group by=releases.name | ||
− | | | + | |order by=releases.date |
|format=template | |format=template | ||
|template=OmniMedia/Cargo | |template=OmniMedia/Cargo | ||
|default= | |default= | ||
− | }}}}{{#vardefine: | + | }}}}{{#vardefine:musicresult|{{#cargo_query: |
tables=relationships,releases | tables=relationships,releases | ||
|fields=relationships.name,releases.date | |fields=relationships.name,releases.date | ||
− | |where=relationships.relatedto="{{{1|}}}" and relationships.relationshiptype=" | + | |where=relationships.relatedto="{{FormatSQL|{{{1|}}}}}" and relationships.relationshiptype="music" |
|join on=relationships.name=releases.name | |join on=relationships.name=releases.name | ||
|group by=releases.name | |group by=releases.name | ||
− | | | + | |order by=releases.date |
|format=template | |format=template | ||
|template=OmniMedia/Cargo | |template=OmniMedia/Cargo | ||
|default= | |default= | ||
− | }}}}{{#vardefine: | + | }}}}{{#vardefine:audiobookresult|{{#cargo_query: |
tables=relationships,releases | tables=relationships,releases | ||
|fields=relationships.name,releases.date | |fields=relationships.name,releases.date | ||
− | |where=relationships.relatedto="{{{1|}}}" and relationships.relationshiptype=" | + | |where=relationships.relatedto="{{FormatSQL|{{{1|}}}}}" and relationships.relationshiptype="audiobook" |
|join on=relationships.name=releases.name | |join on=relationships.name=releases.name | ||
|group by=releases.name | |group by=releases.name | ||
− | | | + | |order by=releases.date |
+ | |format=template | ||
+ | |template=OmniMedia/Cargo | ||
+ | |default= | ||
+ | }}}}{{#vardefine:videoresult|{{#cargo_query: | ||
+ | tables=relationships,releases | ||
+ | |fields=relationships.name,releases.date | ||
+ | |where=relationships.relatedto="{{FormatSQL|{{{1|}}}}}" and relationships.relationshiptype="video" | ||
+ | |join on=relationships.name=releases.name | ||
+ | |group by=releases.name | ||
+ | |order by=releases.date | ||
+ | |format=template | ||
+ | |template=OmniMedia/Cargo | ||
+ | |default= | ||
+ | }}}}{{#vardefine:eventresult|{{#cargo_query: | ||
+ | tables=relationships,events | ||
+ | |fields=relationships.name=eventname,events.startdate | ||
+ | |where=relationships.relatedto="{{FormatSQL|{{{1|}}}}}" and relationships.relationshiptype="event" | ||
+ | |join on=relationships.name=events.name | ||
+ | |group by=events.name | ||
+ | |order by=events.startdate | ||
|format=template | |format=template | ||
|template=OmniMedia/Cargo | |template=OmniMedia/Cargo | ||
|default= | |default= | ||
}}}} | }}}} | ||
− | {{#if:{{#var:musicresult}}|'''Music:''' {{#sub:{{#var:musicresult}}|0|-2}}<br/>|}} | + | {{#if:{{#var:bookresult}}|'''Books:''' {{#sub:{{UnformatSQL|{{#var:bookresult}}}}|0|-2}}<br/>|}}{{ |
− | {{#if:{{#var: | + | #if:{{#var:musicresult}}|'''Music:''' {{#sub:{{UnformatSQL|{{#var:musicresult}}}}|0|-2}}<br/>|}}{{ |
− | {{#if:{{#var: | + | #if:{{#var:audiobookresult}}|'''Audiobooks:''' {{#sub:{{UnformatSQL|{{#var:audiobookresult}}}}|0|-2}}<br/>|}}{{ |
− | {{clearvar|musicresult| | + | #if:{{#var:videoresult}}|'''Videos:''' {{#sub:{{UnformatSQL|{{#var:videoresult}}}}|0|-2}}<br/>|}}{{ |
+ | #if:{{#var:eventresult}}|'''Events:''' {{#sub:{{UnformatSQL|{{#var:eventresult}}}}|0|-2}}<br/>|}}{{clearvar|bookresult|musicresult|audiobookresult|videoresult|prereleaseresult|eventresult}}</includeonly><noinclude>[[Category:Templates]] | ||
Template that generates relevant media for Omni tables, so you don't have to. | Template that generates relevant media for Omni tables, so you don't have to. | ||
Latest revision as of 10:15, 22 February 2023
Template that generates relevant media for Omni tables, so you don't have to.
Examples
{{OmniMedia|Space Channel 5: Part 2}}
Books: Space Channel 5 Part 2 Sugoku Sugoi Guide Book (2002)
Music: Space Channel 5 Part 2 Soundtrack Volume "Chu!!" (2002) | Space Channel 5 Part 2 Soundtrack Volume "Hey!!" (2002) | Space Channel 5 Part 2 Uki Uki ★ Non Stop Mega Mix (2002) | Space Channel 5 Part 2 Moji Moji ★ Can't Stop Remix (2002) | Space Channel 5 Part 2 Uha Uha ★ Readymade Remixes (2002)