Module talk:InfoboxImage: Difference between revisions
Forgot about |page? |
Actually, I attempted a fix in the sandbox. See if it looks sane? |
||
| Line 38: | Line 38: | ||
Provided I have understood how this works correctly, so long as that image shows as Google's boilerplate the module is ignoring the given page. The correct image (page) is an 18th-century engraved fronticpiece of a woman starting pensively at a globe. --[[User:Xover|Xover]] ([[User talk:Xover|talk]]) 07:01, 14 October 2015 (UTC) | Provided I have understood how this works correctly, so long as that image shows as Google's boilerplate the module is ignoring the given page. The correct image (page) is an 18th-century engraved fronticpiece of a woman starting pensively at a globe. --[[User:Xover|Xover]] ([[User talk:Xover|talk]]) 07:01, 14 October 2015 (UTC) | ||
:I went ahead and attempted to fix it myself in the sandbox, and spectacularly dumb mistakes in the first attempt aside, I think it worked.{{br}}Sandbox test case: {{#invoke:InfoboxImage/sandbox|InfoboxImage|image=The Universal Magazine, Vol. XCV (July 1794).djvu|alt=Alt text|border=yes|upright=yes|page=8}}{{br}}I'll go ahead and update docs and testcases so it's complete whenever someone has time to review the proposed changes. --[[User:Xover|Xover]] ([[User talk:Xover|talk]]) 10:26, 14 October 2015 (UTC) | |||
Revision as of 10:27, 14 October 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)
Missing |page param (DjVu)
I'm trying to use a specific page from a DjVu file as an image in an infobox ({{Infobox magazine}}) but am only getting the first page (which is Google's scanning boilerplate). Scanning the source for this module I also see no reference to to a |page parameter (the infobox in question does have it, as |image_page, though). Was this forgotten for the Lua module, or am I missing something?
Test case: Alt text
Provided I have understood how this works correctly, so long as that image shows as Google's boilerplate the module is ignoring the given page. The correct image (page) is an 18th-century engraved fronticpiece of a woman starting pensively at a globe. --Xover (talk) 07:01, 14 October 2015 (UTC)
- I went ahead and attempted to fix it myself in the sandbox, and spectacularly dumb mistakes in the first attempt aside, I think it worked.Template:BrSandbox test case: Script error: No such module "InfoboxImage/sandbox".Template:BrI'll go ahead and update docs and testcases so it's complete whenever someone has time to review the proposed changes. --Xover (talk) 10:26, 14 October 2015 (UTC)