Jump to content

Module talk:InfoboxImage

From Fifth Empire Wiki
Revision as of 03:59, 9 September 2015 by wikipedia>Lowercase sigmabot III (Archiving 1 discussion(s) to Module talk:InfoboxImage/Archive 1) (bot)

User:MiszaBot/config Template:Archives

Suggestion: landscape

Template:Ping some infoboxes, like Template:Infobox church, uses |landscape=yes. Maybe it could be imported in this module somehow? --Edgars2007 (talk/contribs) 10:32, 27 February 2015 (UTC)

I'm not sure if it could be included in the module directly as the code appears to be specific to that infobox. However, I have updated Template:Infobox church/sandbox to use InfoboxImage and including the landscape option. This could be copied over to the live template if you are happy with it. -- WOSlinker (talk) 13:07, 27 February 2015 (UTC)
Template:Ping I think there could be some three params in the template code |landscape={{{landscape|yes}}}, |landscape x=250, |landscape y=300, or something like that. The rest of the code should be the same for all templates, I think. About the sandbox version - thanks, but I haven't used it, that was just an example :) --Edgars2007 (talk/contribs) 13:55, 27 February 2015 (UTC)

Error when parameter missing

This edit, applying this module, seems to be the cause of the error showing on this page. Template:Diff fixed it, but the error needs a permanent solution. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 09:44, 24 June 2015 (UTC)

There's no way to catch the error here; it needs to be fixed in Module:Wikidata. Alakzi (talk) 10:53, 24 June 2015 (UTC)

Using upright without a value

This module is currently capable of adding "|upright=value":

  • {{#invoke:InfoboxImage|InfoboxImage|image={{{image}}}.jpg|alt=Alt text|border=yes|upright=1.2}}
  • Output: [[File:{{{image}}}.jpg|frameless|alt=Alt text|border|upright=1.2]]

I would like to be able to add "|upright" without a value, similar to the way "|center" or "|border" is added. Below is a working example using updated code at Module:InfoboxImage/sandbox:

  • {{#invoke:InfoboxImage/sandbox|InfoboxImage|image={{{image}}}.jpg|alt=Alt text|border=yes|upright=yes}}
  • Output: Script error: No such module "InfoboxImage/sandbox".

What prompted this was finding an infobox invoking this module with "title=upright". While that works, it is not the intended use and it overrides this module's placement of "alt" text when "title" is not defined:

  • {{#invoke:InfoboxImage|InfoboxImage|image={{{image}}}.jpg|alt=Alt text|border=yes|title=upright}}
  • Output: [[File:{{{image}}}.jpg|frameless|alt=Alt text|border|upright]]

I know there are workarounds such as "upright=0.75" or even "upright=0" that produce the same results (see examples at User:Zyxw/upright), but since the image syntax allows "upright" without a value (see WP:Extended image syntax § Size), this template should have a way to implement that. The two line addition (sandbox diff) is tested and working (test cases), just wanted to post this for comment before making the change. -- Zyxw (talk) 02:16, 9 September 2015 (UTC)