Doctor Who Cuttings Archive

Difference between revisions of "Template:InvertName"

From The Doctor Who Cuttings Archive
Jump to navigationJump to search
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#vardefine:temp | {{{author}}} }}
+
{{#vardefine:temp | {{{1}}} }}
Var temp = {{#var:temp}}
+
{{#vardefine:pos | {{#rpos:{{#var:temp}} | }} }}
{{#vardefine:pos | {{#rpos:{{#var:temp}} | " " }} }}
 
 
{{#if: {{#expr: {{#var:pos}} > 0}}  
 
{{#if: {{#expr: {{#var:pos}} > 0}}  
 
     | {{#vardefine:lastName  | {{#sub: {{#var:temp}} | {{#expr: {{#var:pos}} + 1 }} }} }}
 
     | {{#vardefine:lastName  | {{#sub: {{#var:temp}} | {{#expr: {{#var:pos}} + 1 }} }} }}
       {{#vardefine:firstName | {{#sub: {{#var:temp}} | 0 | {{#expr: {{#var:pos}} - 1 }} }} }}
+
       {{#vardefine:firstName | {{#sub: {{#var:temp}} | 0 | {{#var:pos}} }} }}
       {{#var:lastName}}, {{#var:firstName}}
+
       {{#var:lastName}}, {{#var:firstName}}
 
     | {{{author}}}
 
     | {{{author}}}
 
}}
 
}}

Latest revision as of 23:27, 2 July 2014


{{{1}}}, {{{1}}