Module talk:InfoboxImage: Difference between revisions
m Archiving 1 discussion(s) to Module talk:InfoboxImage/Archive 1) (bot |
|||
| Line 9: | Line 9: | ||
}} | }} | ||
{{archives|search=yes}} | {{archives|search=yes}} | ||
== Error when parameter missing == | == Error when parameter missing == | ||
Revision as of 03:59, 13 September 2015
User:MiszaBot/config Template:Archives
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)
Suggestion
Would it be possible to get an option for a maintenance category here? So for example in {{Infobox settlement}} automatically add the page to the hidden maintenance category Settlements with an infobox but no image? The module is awesome and would be really nice to just have an option to supply the name of the maintenance category to put the page in if the image is missing. --Zackmann08 (Talk to me/What I been doing) 00:59, 13 September 2015 (UTC)