Jump to content

Module talk:InfoboxImage: Difference between revisions

From Fifth Empire Wiki
m Archiving 1 discussion(s) to Module talk:InfoboxImage/Archive 1) (bot
Line 9: Line 9:
}}
}}
{{archives|search=yes}}
{{archives|search=yes}}
== Alt text versus title text ==
Hello,
The module currently uses the alt text as title text when no title text is provided; alt text and title text are not the same thing, so this doesn't seem a good idea to me... The [[Wikipedia:Alternative text for images|alt text]] is supposed to provide information that can ''replace'' the image's graphics, whereas the [http://www.w3schools.com/tags/att_global_title.asp title text] is a possibility to ''supplement'' the image's graphics with additional information. Currently, if a visual description of the image is passed as alt text, the module also displays it as a title text, even though it isn't relevant there (see the infobox in {{oldid2|626095637|Space Invaders}} for an example).
Shouldn't this be changed? (Quickly scrolling through this page, I see that this behavior was {{diff2|561052279|defined}} by [[User:WOSlinker|WOSlinker]] following the [[#Error in the code]] discussion above.)
[[User:Cos-fr|Cos-fr]] ([[User talk:Cos-fr|talk]]) 09:47, 19 September 2014 (UTC)
Agreed that this is a bad idea. Agents processing the page source expect the title text to be extra information that can be meaningfully displayed alongside the image; with alt text this tends to have awkward results. To give a specific example, MediaViewer displays title text as the image caption; if there is no title text, it fetches a caption from other sources (such as the image description page). No title text gives much more meaningful results than alt text duplicated as title text. --[[User:Tgr (WMF)|Tgr (WMF)]] ([[User talk:Tgr (WMF)|talk]]) 01:22, 26 November 2014 (UTC)


== Suggestion: landscape ==
== Suggestion: landscape ==

Revision as of 03:59, 9 September 2015

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)