Difference between revisions of "Creditstable"
From Sega Retro
(cleaned up, added error message) |
|||
(42 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | <includeonly>{{#if: {{{source|}}} | : | + | <includeonly><div style="font-size: 90%">{{{1|}}}</div>{{#if: {{{source|}}} | |
− | </includeonly><noinclude> | + | : ''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}} | ||
+ | | {{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|}}}}} | ||
+ | }}}}{{#if:{{{console|}}}||[[Category:Creditstable with no console field]]}}</includeonly><noinclude> | ||
+ | {{#cargo_declare: | ||
+ | _table=credits | ||
+ | |role=Text | ||
+ | |name=Page | ||
+ | |game=Text | ||
+ | |console=Text | ||
+ | |date=Text | ||
+ | |source=Text | ||
+ | |pdf=File | ||
+ | |pdfpage=Integer | ||
+ | }} | ||
==Usage== | ==Usage== | ||
===Example=== | ===Example=== | ||
Line 9: | Line 26: | ||
* '''Role 2:''' Name | * '''Role 2:''' Name | ||
|source=In-game credits | |source=In-game credits | ||
+ | |console=MD | ||
+ | |pdf=GamePro US 001.pdf | ||
+ | |pdfpage=10 | ||
}} | }} | ||
</pre> | </pre> | ||
Line 17: | Line 37: | ||
* '''Role 2:''' Name | * '''Role 2:''' Name | ||
|source=In-game credits | |source=In-game credits | ||
+ | |console=32X | ||
}} | }} | ||
[[Category:Sega Retro templates]]</noinclude> | [[Category:Sega Retro templates]]</noinclude> |
Revision as of 00:29, 27 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