[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mediawiki-l
Subject:    [MediaWiki-l] Images in Lua infobox
From:       Brenton Horne <brentonhorne77 () gmail ! com>
Date:       2015-03-19 3:47:47
Message-ID: 550A46E3.9080005 () gmail ! com
[Download RAW message or body]

Hi,

I have an infobox (created using XML exporting Wikipedia's Lua-based 
infobox [template 
<https://en.wikipedia.org/wiki/Template:Infobox?action=raw>, module 
<https://en.wikipedia.org/wiki/Module:Infobox?action=raw>]) with the 
following image-related field contents:

> image1      ={{#ifeq:{{FULLPAGENAME}}|Template:Drugbox 
(Lua)||[[File:{{{image|{{{Image1|{{{image1|{{{Drug|{{{drug|}}}}}}}}}}}}}}}{{#if:{{{for \
mat|{{{Format|}}}}}}|{{{format|{{{Format|}}}}}}|.svg}}|{{{size|{{{size1|400}}}}}}px]]}}
 |caption1    ={{{caption|{{{Caption|{{{caption1|{{{Caption1|}}}}}}}}}}}}

> image2     
  ={{#if:{{{image2|{{{Image2|}}}}}}|[[File:{{{image2|{{{Image2|}}}}}}|center|{{{size2| \
{{{Size2|200}}}}}}px]]}}{{#if:{{{image2L|{{{Image2L|}}}}}}|[[File:{{{image2L|{{{Image2 \
L|}}}}}}|left|{{{size2L|200}}}px||{{{caption2L|{{{Caption2L|}}}}}}]]}}{{#if:{{{image2R \
|{{{Image2R|}}}}}}|[[File:{{{image2R|{{{Image2R|}}}}}}|right|{{{size2R|200}}}px||{{{caption2R|{{{Caption2R|}}}}}}]]}}
 |caption2    ={{{caption2|{{{Caption2|}}}}}}

The second image field is designed to allow a single image (specified by 
image2) or (in the Boolean logic meaning of the word) two images 
(specified by image2L, image2R) side-by-side to appear if provided. The 
problem I am having is that the caption fields, caption2L and caption2R, 
do not appear in the output as captions for image2L and image2R. Now, if 
you are thinking, "Oh you're missing the 'thumb' field for these two 
side-by-side images." My reply is that I don't want thumbnails in my 
infobox, as they come with a border around them that I do _not_ want. 
The reason for the two || after the size specification in these image 
fields is that I had already tried a single | and it failed to do what I 
wanted, so I decided to add it in the hope that it was due to the 
position of the caption fields in the [[...]] that the captions were 
being ignored.

If you need further details please ask.

Thanks for your time,
Brenton
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic