Template:IMDb name: Difference between revisions
From Zoophilia Wiki
Jump to navigationJump to search
meta>WOSlinker trim text |
meta>Zyxw Add fix for empty name parameter, where {{IMDb name|0001109|}} displays "[1] on IMDb", see /testcases for examples. Remove {{Trim}} where {{#if:}} does same. Use whitespace with {{#if:}} to make template easier to understand and maintain. All tested first with /sandbox. |
||
| Line 1: | Line 1: | ||
[https://www.imdb.com/{{#if:{{{1|{{{id|}}}}}}|name/{{#ifeq:{{Str left|{{{1|{{{id}}}}}}|2}}|nm | [https://www.imdb.com/{{#if: {{{1|{{{id|}}}}}} | ||
|award|awards=awards Awards for | | name/{{#ifeq: {{Str left|{{{1|{{{id}}}}}}|2}} | nm | ||
|biography|bio=bio Biography for | | {{{1|{{{id}}}}}} | ||
}} {{ | | nm{{#if: {{Str len|{{{1|{{{id}}}}}}}} < 7 | ||
| {{Str rightmost|000000{{Trim|{{{1|{{{id}}}}}}}}|7}} | |||
}} | |||
}} | |||
| {{#if: {{#property:P345}} | |||
| name/{{#property:P345}} | |||
| Name?{{urlencode:{{PAGENAME}}}} | |||
}} | |||
}}/{{#switch: {{lc:{{{section|}}}}} | |||
| award | awards = awards Awards for | biography | bio = bio Biography for | |||
}} {{#if: {{{2|{{{name|}}}}}} | |||
| {{{2|{{{name}}}}}} | |||
| {{PAGENAMEBASE}} | |||
}}] on [[IMDb]]<includeonly>{{EditAtWikidata|pid=P345|{{{1|{{{id|}}}}}}}}{{#if: {{{1|{{{id|}}}}}}{{#property:P345}} | |||
| | |||
| {{Main other|[[Category:IMDb template with no id set]]}} | |||
}}{{#ifeq: {{Str left|{{{1|{{{id}}}}}}|2}} | nm | |||
| {{#ifeq: {{Str len|{{{1|{{{id}}}}}}}} | 9 | |||
| | |||
| {{Main other|[[Category:IMDb template with invalid id set]]}} | |||
}} | |||
}}</includeonly><noinclude> | |||
{{documentation}} | {{documentation}} | ||
</noinclude> | </noinclude> | ||