Module talk:InfoboxImage: Difference between revisions
| Line 51: | Line 51: | ||
::::::How about with the cat added back but still changing thumb to frameless ? -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 22:00, 19 July 2016 (UTC) | ::::::How about with the cat added back but still changing thumb to frameless ? -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 22:00, 19 July 2016 (UTC) | ||
:::::::That would be better than the current sandbox code. However, I'd still prefer the current live code, adding the category but leaving the file specification untouched. Another confusing scenario: the caption is visible in a draft article or user subpage, but it disappears when the page is moved to mainspace. -- [[User:John of Reading|John of Reading]] ([[User talk:John of Reading|talk]]) 04:59, 20 July 2016 (UTC) | :::::::That would be better than the current sandbox code. However, I'd still prefer the current live code, adding the category but leaving the file specification untouched. Another confusing scenario: the caption is visible in a draft article or user subpage, but it disappears when the page is moved to mainspace. -- [[User:John of Reading|John of Reading]] ([[User talk:John of Reading|talk]]) 04:59, 20 July 2016 (UTC) | ||
{{deindent|7}} | |||
What about just throwing an error? Force the user to fix it themselves? I'm thinking something similar to what happens if you pass in an invalid unit to {{tl|convert}}: {{convert|12|foooo}} --[[User:Zackmann08|<span style="color:DarkTurquoise;">Zackmann08</span>]] (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange;">What I been doing</span>]]</sub>) 05:30, 20 July 2016 (UTC) | |||
Revision as of 05:30, 20 July 2016
User:MiszaBot/config Template:Archives
Imagemap support
This module needs to be updated to support "imagemap", per the example at The Doctor (Doctor Who) to remove any extraneous markup. There is only one image used (File:Versions of the Doctor.jpg), but multiple different links over the one image. A template or module should reflect all possible usages of it; even though this is only one such case, there may be other cases of this on Wikipedia. I'd do it myself in the sandbox, but I'm not entirely familiar with this module. Alex|The|Whovian? 23:59, 13 March 2016 (UTC)
- This still needs fixing. Alex|The|Whovian? 13:22, 4 April 2016 (UTC)
"title=" parameter: relevance?
How relevant is it to support the |title= parameter, especially next to the |alt= parameter? (i.e., the css-tiles a.k.a. mousehover-text; |alt=-value is used when missing).
I get the 'css-title' angle, but not in WP:EIS and not in WP:FILE we have an option for that. So when adding a plain file to an article (outside of infobox), the option 'css-title' is not available. My question starts from {{Chembox}}, which has 400+ parameters. I'd like to simplify this list, eg by removing this title parameter (pushing the alt parameter). -DePiep (talk) 19:58, 25 May 2016 (UTC)
- There is an archived posting at Module talk:InfoboxImage/Archive 1#Alt text versus title text which discusses the differences. Also, the text assigned to the
|title=parameter is placed into the normal image syntax (referred to as Caption at WP:EIS), so: {{#invoke:InfoboxImage|InfoboxImage|image=Example.png|alt=Alt text|title=Title text}}- will output the following (which could be placed into an article, inside or outside an infobox):
[[File:Example.png|frameless|alt=Alt text|Title text]].- An example of using both fields (with "thumb" instead of "frameless") can be found at WP:FILE#Using files. -- Zyxw (talk) 04:03, 14 July 2016 (UTC)
- Template:U thanks, my question solved. So in my case, parameter title is redundant to parameter caption. (btw, mistake in my OP: 'title' in InfoboxImage is not the same as css-title in a tag like
<span title="css-title example">. Glad it did not distract you). -DePiep (talk) 05:32, 14 July 2016 (UTC)
- Template:U thanks, my question solved. So in my case, parameter title is redundant to parameter caption. (btw, mistake in my OP: 'title' in InfoboxImage is not the same as css-title in a tag like
- Glad that helped. I assume that "Caption" was used in WP:EIS because it is displayed as a caption when using "thumb". However, "title" more accurately describes it when using "frameless", because if you look at the generated HTML it is used as a title attribute in the anchor tag that surrounds the image tag:
<a href="/wiki/File:Example.png" class="image" title="Title text"><img alt="Alt text" src= ...-- Zyxw (talk) 06:28, 14 July 2016 (UTC)
- Glad that helped. I assume that "Caption" was used in WP:EIS because it is displayed as a caption when using "thumb". However, "title" more accurately describes it when using "frameless", because if you look at the generated HTML it is used as a title attribute in the anchor tag that surrounds the image tag:
- Sorry, this is getting into a headache.
- First of all, WP:EIS shows the horror of interacting parameters, thereby changing their semantics. Like this: "If the type is 'frameless', the caption value moves & changes into title (mousehover) text" (I conclude after studying the doc). No end editor should be loaded with this illogic. No software encoder should allow such change of meaning & usage.
- Next, this Module:InfoboxImage adds to these parameter mixups by suggesting
|title=replaces [[File:|...|Caption text]] (see this /doc section, first paragraph saying[[File:..|{{{TitleText}}}]]-- the position where WP:EIS says Caption text is expected). There is no gain in confusing those two concepts in this module either. - To support my point, I quote from your 2014 link by Template:U: "To give a specific example, MediaViewer displays title text as the image caption; ..." (ie, another mixup variant, this time by MediaViewer). Also, you (Zyxw) wrote above: "Also, the text assigned to the |title= parameter is placed into the normal image syntax (referred to as Caption at WP:EIS)". This 'title' is named 'Caption' in WP:EIS?
- Now there is no use in explaining the 'logic' behind this once more. I'd prever we don't change parameter semantics. And this module should not deviate from [[File:...]] documentation (itself to be improved).
- As for understanding this module, I can say: Module:InfoboxImage does not have the concept or option of a Caption (meaning: text below an image). Such text is to be entered in the {{Infobox}} template using separate
|caption=Caption text, next to (not inside)|image={{#invoke:InfoboxImage|...}}. - On the other hand, if one enters
|image=directly by [[File:..]], the caption option is available in the File:-settings. - -DePiep (talk) 09:32, 14 July 2016 (UTC)
Category:Pages using infoboxes with thumbnail images
Hoping to get some help. I am trying to clean out Category:Pages using infoboxes with thumbnail images. Obviously this is a very tedious project but it is made all the more frustrating by the fact that new pages keep getting added to the category. I'm wondering, is there some way to add something to this module that will display an error in preview mode when people try to add new thumbnails? Any thoughts? --Zackmann08 (Talk to me/What I been doing) 03:15, 16 July 2016 (UTC)
- Template:Ping Any thoughts? --Zackmann08 (Talk to me/What I been doing) 00:13, 17 July 2016 (UTC)
- Probably using the REVISIONID feature similar to Module:Check_for_unknown_parameters it can be done. I'll have to see what I can do. -- WOSlinker (talk) 08:04, 17 July 2016 (UTC)
- Template:Ping fantastic! I've not done any work with modules before, and don't have the necessary permissions to edit this page, but if I can be useful in anyway, please let me know. I do have a background in computer programming and would be happy to pair with you on making this happen. Thanks for taking some time to look into this! As a side note, as I continue to willow down this category, it would be great for it to ultimately throw an error on the actual page. Right now that doesn't make sense as there are over 3,000 pages in the category... But thought for the future. --Zackmann08 (Talk to me/What I been doing) 22:15, 17 July 2016 (UTC)
- Template:Ping I'd like to amend my request. The category is now just over 1,500. My goal is to have the category at 0 by the end of the week. What would be great is to just disallow the use of thumbs in infoboxes entirely. Either have it throw an {{error}} or just remove 'thumb' and force the image to appear inline. Template:Ping you've been active on this project as well. Thoughts? --Zackmann08 (Talk to me/What I been doing) 19:19, 19 July 2016 (UTC)
- Would probably be better to replace thumb and thumbnail with frameless rather than just removing it. I've updated the code in Module:InfoboxImage/sandbox. -- WOSlinker (talk) 20:26, 19 July 2016 (UTC)
- Template:Re I'm not convinced by the sandbox change. If the
[[File:...|thumb|...]]includes a caption, changing from "thumb" to "frameless" makes the caption disappear, which would be confusing. It would still need a tracking category so that someone can move the caption into the proper "caption" parameter. -- John of Reading (talk) 21:21, 19 July 2016 (UTC)- How about with the cat added back but still changing thumb to frameless ? -- WOSlinker (talk) 22:00, 19 July 2016 (UTC)
- That would be better than the current sandbox code. However, I'd still prefer the current live code, adding the category but leaving the file specification untouched. Another confusing scenario: the caption is visible in a draft article or user subpage, but it disappears when the page is moved to mainspace. -- John of Reading (talk) 04:59, 20 July 2016 (UTC)
- How about with the cat added back but still changing thumb to frameless ? -- WOSlinker (talk) 22:00, 19 July 2016 (UTC)
- Template:Re I'm not convinced by the sandbox change. If the
- Would probably be better to replace thumb and thumbnail with frameless rather than just removing it. I've updated the code in Module:InfoboxImage/sandbox. -- WOSlinker (talk) 20:26, 19 July 2016 (UTC)
- Probably using the REVISIONID feature similar to Module:Check_for_unknown_parameters it can be done. I'll have to see what I can do. -- WOSlinker (talk) 08:04, 17 July 2016 (UTC)
Template:Deindent What about just throwing an error? Force the user to fix it themselves? I'm thinking something similar to what happens if you pass in an invalid unit to {{convert}}: 12 foooo[convert: unknown unit] --Zackmann08 (Talk to me/What I been doing) 05:30, 20 July 2016 (UTC)