Difference between revisions of "Creditstable"
From Sega Retro
(cleaned up, added error message) |
|||
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]] }} | : ''Source: {{{source}}}''{{#if: {{{pdf|}}} |{{fileref|{{{pdf}}}|page={{{pdfpage|}}}}}| [[Category:Credits without reference]] }} | [[Category:Credits without source]] }} | ||
− | + | {{#vardefine:allLines|{{#replace:{{#replace:{{{1|}}}|'''}}|**|*}}}}{{#vardefine:i|1}}{{#iferror:{{#var:allLines}}|{{#var:allLines}}| | |
− | + | {{#while:|{{#vardefine:currentLine|{{#explode:{{#var:allLines}}|*|{{#var:i}}}}}}{{#var:currentLine}} | |
− | {{#vardefine:allLines|{{#replace:{{#replace:{{{1|}}}|'''}}|**|*}}}} | + | | {{incvar|i}}{{#vardefine:currentLine2|{{striphtml|1={{#var:currentLine}}|removediv=yes}}}}{{clearvar|currentRole|currentNames}} |
− | {{# | + | {{#if:{{#pos:{{#var:currentLine2}}|:}}|{{#vardefine:currentRole|{{#explode:{{#var:currentLine2}}|:|0}}}}{{#vardefine:currentNames|{{#explode:{{#var:currentLine2}}|:|1}}}} |
− | | {{# | + | |{{#vardefine:currentNames|{{#var:currentLine2}}}}}}{{StoreCreditsLine|role={{#var:currentRole}}|nameList={{#var:currentNames}}|game={{PAGENAME}}|console={{{console|}}}|date={{{date|}}}|source={{{source|}}}|pdf={{{pdf|}}}|pdfpage={{{pdfpage|}}}}} |
− | | {{#vardefine:currentLine|{{#explode:{{#var:allLines}}|*|{{#var:i}}}}}} | + | }}}}{{#if:{{{console|}}}||[[Category:Creditstable with no console field]]}}</includeonly><noinclude> |
− | |||
− | |||
− | |||
− | {{#if:{{#pos:{{#var:currentLine2}}|:}}|{{ | ||
− | #vardefine:currentRole|{{#explode:{{#var:currentLine2}}|:|0}}}}{{ | ||
− | #vardefine:currentNames|{{#explode:{{#var:currentLine2}}|:|1}}}} | ||
− | |{{ | ||
− | |||
− | #vardefine:currentNames|{{#var:currentLine2}}}} | ||
− | }} | ||
− | |||
− | |||
− | {{StoreCreditsLine|role={{#var:currentRole}}|nameList={{#var:currentNames}}|game={{PAGENAME}}|console={{{console|}}}|date={{{date|}}}|source={{{source|}}}|pdf={{{pdf|}}}|pdfpage={{{pdfpage|}}}}} | ||
− | |||
− | }}{{#if:{{{console|}}}||[[Category:Creditstable with no console field]]}} | ||
{{#cargo_declare: | {{#cargo_declare: | ||
_table=credits | _table=credits |
Revision as of 23:29, 26 January 2020
This template defines the table "credits". View table.
Usage
Example
{{creditstable| {{creditsheader|Header}} * '''Role 1:''' Name * '''Role 2:''' Name |source=In-game credits |console=MD |pdf=GamePro US 001.pdf |pdfpage=10 }}
Header
- Role 1: Name
- Role 2: Name
- Source: In-game credits