Misplaced Pages

Template:Auto images: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editNext edit →Content deleted Content addedVisualWikitext
Revision as of 23:01, 21 February 2012 editPeter coxhead (talk | contribs)Autopatrolled, Extended confirmed users, Page movers, Pending changes reviewers, Rollbackers, Template editors203,838 edits adding new parameter← Previous edit Revision as of 09:30, 22 February 2012 edit undoPeter coxhead (talk | contribs)Autopatrolled, Extended confirmed users, Page movers, Pending changes reviewers, Rollbackers, Template editors203,838 edits revised to allow for padding around each imageNext edit →
Line 3: Line 3:
|align={{{align|}}} |align={{{align|}}}
|cont={{{cont|}}} |cont={{{cont|}}}
<!--Calculate ht, the common height of the images which makes the total width correct--> <!--Calculate ht, the common height of the images which makes the total width correct.
Subtract 4 from the total width for each image to allow for padding of 2px all
|ht={{#expr: {{{total_width|600}}} / {{#expr: {{#ifeq: {{{height1|0}}} | 0| 0 | {{#expr: {{{width1|0}}} / {{{height1|1}}} }} }}+{{#ifeq: {{{height2|0}}} | 0| 0 | {{#expr: {{{width2|0}}} / {{{height2|1}}} }} }}+{{#ifeq: {{{height3|0}}} | 0| 0 | {{#expr: {{{width3|0}}} / {{{height3|1}}} }} }}+{{#ifeq: {{{height4|0}}} | 0| 0 | {{#expr: {{{width4|0}}} / {{{height4|1}}} }} }}+{{#ifeq: {{{height5|0}}} | 0| 0 | {{#expr: {{{width5|0}}} / {{{height5|1}}} }} }}+{{#ifeq: {{{height6|0}}} | 0| 0 | {{#expr: {{{width6|0}}} / {{{height6|1}}} }} }} }} }}
round each image.-->
|ht={{#expr:({{{total_width|600}}} - {{#if:{{{width1|}}}|4|0}} - {{#if:{{{width2|}}}|4|0}} - {{#if:{{{width3|}}}|4|0}} - {{#if:{{{width4|}}}|4|0}} - {{#if:{{{width5|}}}|4|0}} -
{{#if:{{{width6|}}}|4|0}}) /
{{#expr:{{#ifeq:{{{height1|0}}}|0|0|{{#expr:{{{width1|0}}}/{{{height1|1}}} }} }} +
{{#ifeq:{{{height2|0}}}|0|0|{{#expr:{{{width2|0}}}/{{{height2|1}}} }} }} +
{{#ifeq:{{{height3|0}}}|0|0|{{#expr:{{{width3|0}}}/{{{height3|1}}} }} }} +
{{#ifeq:{{{height4|0}}}|0|0|{{#expr:{{{width4|0}}}/{{{height4|1}}} }} }} +
{{#ifeq:{{{height5|0}}}|0|0|{{#expr:{{{width5|0}}}/{{{height5|1}}} }} }} +
{{#ifeq:{{{height6|0}}}|0|0|{{#expr:{{{width6|0}}}/{{{height6|1}}} }} }} }} }}
|width1={{{width1|}}}|image1={{{image1|}}}|caption1={{{caption1|}}}|alt1={{{alt1|}}} |width1={{{width1|}}}|image1={{{image1|}}}|caption1={{{caption1|}}}|alt1={{{alt1|}}}
|ar1={{#expr:{{#ifeq:{{{height1|0}}}|0|1|{{#expr:{{{width1|0}}}/{{{height1|1}}}}}}}}} |ar1={{#expr:{{#ifeq:{{{height1|0}}}|0|1|{{#expr:{{{width1|0}}}/{{{height1|1}}}}}}}}}

Revision as of 09:30, 22 February 2012

Template:Auto images/aux

Template documentation[create] [purge] Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages.
Add categories to the /doc subpage. Subpages of this template.