Difference between revisions of "Creditstable"

From Sega Retro

Line 1: Line 1:
 
<includeonly><div style="font-size: 90%">{{{1|}}}</div>{{#if: {{{source|}}} |
 
<includeonly><div style="font-size: 90%">{{{1|}}}</div>{{#if: {{{source|}}} |
: ''Source: {{{source}}}''{{#if: {{{pdf|}}} |{{fileref|{{{pdf}}}|page={{{pdfpage|}}}}}| [[Category:Credits without reference]] }} | [[Category:Credits without source]] }}<div style="display:none;">
+
: ''Source: {{{source}}}''{{#if: {{{pdf|}}} |{{fileref|{{{pdf}}}|page={{{pdfpage|}}}}}| [[Category:Credits without reference]] }} | [[Category:Credits without source]] }}
{{#vardefine:currentLine|NULL}}
+
<div style="display:none;">
{{#vardefine:i|0}}
+
{{#vardefine:currentLine|NULL}}{{#vardefine:i|0}}
 
{{#vardefine:allLines|{{#replace:{{#replace:{{{1|}}}|'''}}|**|*}}}}
 
{{#vardefine:allLines|{{#replace:{{#replace:{{{1|}}}|'''}}|**|*}}}}
 
{{#while:
 
{{#while:
Line 9: Line 9:
 
  {{#if:{{#pos:{{#var:currentLine}}|<}}|{{#vardefine:currentLine2|{{#explode:{{#var:currentLine}}|<|0}}{{#explode:{{#var:currentLine}}|>|-1}}}}|{{#vardefine:currentLine2|{{#var:currentLine}}}}}}
 
  {{#if:{{#pos:{{#var:currentLine}}|<}}|{{#vardefine:currentLine2|{{#explode:{{#var:currentLine}}|<|0}}{{#explode:{{#var:currentLine}}|>|-1}}}}|{{#vardefine:currentLine2|{{#var:currentLine}}}}}}
 
  {{#vardefine:currentRole|{{#explode:{{#var:currentLine2}}|:|0}}}}{{#vardefine:currentNames|{{#explode:{{#var:currentLine2}}|:|1}}}}
 
  {{#vardefine:currentRole|{{#explode:{{#var:currentLine2}}|:|0}}}}{{#vardefine:currentNames|{{#explode:{{#var:currentLine2}}|:|1}}}}
{{#ifexpr:{{#len:{{#var:currentNames}}}} > 0| <!-- {{#var:i}} >>> {{#var:currentRole}} >>> {{#var:currentNames}} <br/> -->
+
{{#ifexpr:{{#len:{{#var:currentNames}}}} > 0|
 
{{StoreCreditsLine|role={{#var:currentRole}}|nameList={{#var:currentNames}}|game={{PAGENAME}}|console={{{console|}}}|date={{{date|}}}|pdf={{{pdf|}}}|pdfpage={{{pdfpage|}}}}}
 
{{StoreCreditsLine|role={{#var:currentRole}}|nameList={{#var:currentNames}}|game={{PAGENAME}}|console={{{console|}}}|date={{{date|}}}|pdf={{{pdf|}}}|pdfpage={{{pdfpage|}}}}}
}}
+
|}}
}}
+
}}</div></includeonly><noinclude>
</div></includeonly><noinclude>
 
 
==Usage==
 
==Usage==
 
===Example===
 
===Example===

Revision as of 14:16, 10 November 2017

Usage

Example

{{creditstable|
{{creditsheader|Header}}
* '''Role 1:''' Name
* '''Role 2:''' Name
|source=In-game credits
|pdf=GamePro US 001.pdf
|pdfpage=10
}}
Header
  • Role 1: Name
  • Role 2: Name
Source: In-game credits