Difference between revisions of "StoreCreditsLine"

From Sega Retro

 
(28 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div style="display:none;">{{#vardefine:currentName|NULL}}{{#vardefine:j|0}}
+
<includeonly>{{#vardefine:j|1}}
 
{{#while:
 
{{#while:
| {{#ifexpr:{{#len:{{#var:currentName}}}} > 1|true|}}
+
| {{#vardefine:currentName|{{#explode:{{{nameList|}}}|[<!-- -->[|{{#var:j}}}}}}{{#var:currentName}}
| {{#vardefine:currentName|{{#explode:{{{nameList}}}|, |{{#var:j}}}}}}{{incvar|j}}
+
| {{incvar|j}}
{{#sub:{{#var:currentName}}|0|2}}
+
{{#vardefine:currentName|{{#explode:{{#var:currentName}}|]<!-- -->]|0}}}}
{{#ifeq:{{#sub:{{#var:currentName}}|0|2}}|[[|
+
{{#if:{{#pos:{{#var:currentName}}|{{!}}}}|
{{#cargo_store:_table=credits|role={{{role}}}|name={{#var:currentName}}|game={{#titleparts:{{{game}}}}}|console={{{console|}}}|date={{{date|}}}}}
+
{{#vardefine:splitName|{{#explode:{{#var:currentName}}|{{!}}|1}}}}
|}}
+
{{#vardefine:splitName0|{{#explode:{{#var:currentName}}|{{!}}|0}}}}
}}</div><noinclude>[[Category:Sega Retro templates]]</noinclude>
+
{{#ifeq:{{#var:splitName}}|{{#explode:{{#var:splitName0}}|(|0}}|{{#vardefine:splitName|{{#var:splitName0}}}}}}
 +
{{#if:{{#var:splitName}}|{{#vardefine:currentName|{{#var:splitName}}}}}}
 +
}}
 +
{{#if:{{{track|}}}
 +
|{{#cargo_store:_table=trackcredits|role={{FormatSQL|{{{role|}}}}}|name={{FormatSQL|{{#var:currentName}}}}|game={{FormatSQL|{{#titleparts:{{{game|}}}}}}}|console={{{console|}}}|date={{{date|}}}|source={{{source|}}}|pdf={{{pdf|}}}|pdfpage={{{pdfpage|}}}|track={{FormatSQL|{{{track|}}}}}}}
 +
|{{#cargo_store:_table=credits|role={{FormatSQL|{{{role|}}}}}|name={{FormatSQL|{{#var:currentName}}}}|game={{FormatSQL|{{#titleparts:{{{game|}}}}}}}|console={{{console|}}}|date={{{date|}}}|source={{{source|}}}|pdf={{{pdf|}}}|pdfpage={{{pdfpage|}}}}}
 +
}}
 +
}}</includeonly><noinclude>
 +
[[Category:Templates]]
 +
</noinclude>

Latest revision as of 17:04, 1 January 2022