Template:Diff: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Ben
allow diff parm to disappear if not filled in, to let a specific revision be cited without diff if desired.
Ookami (talk | contribs)
m 35 revisions imported
 
(33 intermediate revisions by 17 users not shown)
Line 1: Line 1:
<span class="plainlinks">[{{fullurl:{{{page|{{{1|Main Page}}}}}}|oldid={{{oldid|{{{3|}}}}}}{{#ifeq:{{{diff|{{{2|}}}}}}|||&diff={{{diff|{{{2|cur}}}}}}}}}} <span style="color:#002bb8">{{{label|{{{4|Last revision of '''Main Page'''}}}}}}</span>]</span><noinclude>
<span class="plainlinks">[{{#if:{{{title|{{{page|{{{1|}}}}}}}}}
 
|{{fullurl:{{{title|{{{page|{{{1}}}}}}}}}|{{#if:{{{diff|{{{2|}}}}}}
 
  |diff={{trim|{{{diff|{{{2}}}}}}}}&
 
}}oldid={{trim|{{{oldid|{{{3|}}}}}}}}}}
===Usage===
|{{SERVER}}{{SCRIPTPATH}}/index.php?title={{#if:{{{diff|{{{2|}}}}}}
 
  |&diff={{trim|{{{diff|{{{2}}}}}}}}
'''&#123;&#123;diff&#124;1='''''page'''''&#124;2='''''diff'''''&#124;3='''''oldid'''''&#124;4='''''label'''''&#125;&#125;'''
}}&oldid={{trim|{{{oldid|{{{3|}}}}}}}}
 
}}{{#ifeq:{{{diffonly|}}}|yes|&diffonly=1}} {{{label|{{{4|}}}}}}]</span><noinclude>
;Current default:'''&#123;&#123;&#124;1='''Main Page'''&#124;2=&#124;3=&#124;4='''<nowiki>Last revision of '''Main Page'''</nowiki>'''&#125;&#125;''' &rarr; {{diff|1=Main Page|2=|3=|4=Last revision of '''Main Page'''}}
{{documentation}}
 
;You can also use the named variables "page", "diff", "oldid", and "label".:'''&#123;&#123;diff&#124;page='''Main Page'''&#124;diff='''cur'''&#124;oldid=&#124;label='''<nowiki>Last change to '''Main Page'''</nowiki>'''&#125;&#125;''' &rarr; {{diff|page=Main Page|diff=cur|oldid=|label=Last change to '''Main Page'''}}
 
;As long as the values do not contain equals signs, you can skip the variable names/numbers.:'''&#123;&#123;diff&#124;'''Main Page'''&#124;'''cur'''&#124;&#124;'''<nowiki>Last change to '''Main Page'''</nowiki>'''&#125;&#125;''' &rarr; {{diff|Main Page|cur||Last change to '''Main Page'''}}
 
 
</noinclude>
</noinclude>

Latest revision as of 05:01, 3 September 2020

[1]