Template:IMDb name: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
m (91 revisions imported)
en>GKFX
(Simplify string handling)
Line 1: Line 1:
[https://www.imdb.com/{{#if: {{{1|{{{id|}}}}}}
[https://www.imdb.com/{{#if: {{{1|{{{id|}}}}}}
   | name/{{#ifeq: {{Str left|{{{1|{{{id}}}}}}|2}} | nm
   | name/{{#if:{{#invoke:ustring|match|1={{{1|{{{id}}}}}}|2=^nm}}
     | {{Trim|{{{1|{{{id}}}}}}}}/
     | {{Trim|{{{1|{{{id}}}}}}}}/
     | nm{{#ifexpr: {{Str len|{{{1|{{{id}}}}}}}} < 7
     | nm{{padleft:{{{1|{{{id}}}}}}|7}}/
      | {{Str rightmost|000000{{Trim|{{{1|{{{id}}}}}}}}|7}}/
      | {{Trim|{{{1|{{{id}}}}}}}}/
      }}
     }}
     }}
   | {{#if: {{#property:P345}}
   | {{#if: {{#property:P345}}
Line 16: Line 13:
   | {{{2|{{{name}}}}}}
   | {{{2|{{{name}}}}}}
   | {{PAGENAMEBASE}}
   | {{PAGENAMEBASE}}
   }}] on [[IMDb]]<includeonly>{{#if: {{{1|{{{id|}}}}}}{{#property:P345}}
   }}] at [[IMDb]]<includeonly>{{#if: {{{1|{{{id|}}}}}}{{#property:P345}}
   | {{EditAtWikidata|pid=P345|nbsp=yes|{{{1|{{{id|}}}}}}}}
   | {{EditAtWikidata|pid=P345|nbsp=yes|{{{1|{{{id|}}}}}}}}
   | {{Main other|[[Category:IMDb template with no id set]]}}
   | {{Main other|[[Category:IMDb template with no id set]]}}
  }}{{#ifeq: {{Str left|{{{1|{{{id}}}}}}|2}} | nm
}}{{#switch:{{#invoke:string2|matchAny|^nm.........|^nm.......|nm|.........|source={{{1|{{{id}}}}}}|plain=false}}
  | {{#ifexpr: {{Str len|{{{1|{{{id}}}}}}}} < 9 or {{Str len|{{{1|{{{id}}}}}}}} > 10
  | 1 | 3 =  {{Main other|[[Category:IMDb template with invalid id set]]}}{{preview warning|IMDb ID starting with ''nm'' should be followed by seven or eight digits, such as ''nm0000567'' or ''nm12345678''}}
    | {{Main other|[[Category:IMDb template with invalid id set]]}}{{#invoke:Preview warning|main|IMDb ID starting with ''nm'' should be followed by seven or eight digits, such as ''nm0000567'' or ''nm12345678''}}
   | 4 = {{Main other|[[Category:IMDb template with invalid id set]]}}{{preview warning|IMDb ID should not contain more than eight digits}}
    }}
}}</includeonly><noinclude>
   | {{#ifexpr: {{Str len|{{{1|{{{id}}}}}}}} > 8
    | {{Main other|[[Category:IMDb template with invalid id set]]}}{{#invoke:Preview warning|main|IMDb ID should not contain more than eight digits}}
    }}
  }}</includeonly><noinclude>
{{documentation}}
{{documentation}}
</noinclude>
</noinclude>

Revision as of 08:13, 30 May 2021

IMDb name at IMDb