Module talk:InfoboxImage: Difference between revisions
No edit summary |
|||
| Line 25: | Line 25: | ||
::Yes, would be possible to remove thumb, but would need replacing with frameless rather than just a straight removal. Think that would be ok. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 19:57, 18 November 2018 (UTC) | ::Yes, would be possible to remove thumb, but would need replacing with frameless rather than just a straight removal. Think that would be ok. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 19:57, 18 November 2018 (UTC) | ||
:::{{ping|WOSlinker}} do you think that would be a good approach? --'''[[User:Zackmann08|<span style="color:#00ced1">Zack</span><span style="color:#007F94">mann</span>]]''' (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange;">What I been doing</span>]]</sub>) 20:00, 18 November 2018 (UTC) | :::{{ping|WOSlinker}} do you think that would be a good approach? --'''[[User:Zackmann08|<span style="color:#00ced1">Zack</span><span style="color:#007F94">mann</span>]]''' (<sup>[[User_talk:Zackmann08|Talk to me]]</sup>/<sub>[[Special:Contributions/Zackmann08|<span style="color:orange;">What I been doing</span>]]</sub>) 20:00, 18 November 2018 (UTC) | ||
:::: | ::::[[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 20:03, 18 November 2018 (UTC) | ||
::::: the other option would be to use css (e.g., via templatestyles) to modify all thumb images inside an infobox, but I don't know if there are any legit uses. [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 14:06, 19 November 2018 (UTC) | ::::: the other option would be to use css (e.g., via templatestyles) to modify all thumb images inside an infobox, but I don't know if there are any legit uses. [[User:Frietjes|Frietjes]] ([[User talk:Frietjes|talk]]) 14:06, 19 November 2018 (UTC) | ||
| Line 33: | Line 33: | ||
* Run <code><nowiki>{{Infobox power station/sandbox}}</nowiki></code> in edit preview of [[Kajaki Dam]]. Note the "300px" instead of an image. | * Run <code><nowiki>{{Infobox power station/sandbox}}</nowiki></code> in edit preview of [[Kajaki Dam]]. Note the "300px" instead of an image. | ||
Is there a way to fetch a maximum of only one value (i.e. one image), like the <code>maxvals</code> parameter of [[Module:WikidataIB]]? [[User:Rehman|<span style="font-variant:small-caps; font-weight:bold; color:darkblue">Reh</span>]][[User talk:Rehman|<span style="color:green">man</span>]] 07:05, 30 March 2019 (UTC) | Is there a way to fetch a maximum of only one value (i.e. one image), like the <code>maxvals</code> parameter of [[Module:WikidataIB]]? [[User:Rehman|<span style="font-variant:small-caps; font-weight:bold; color:darkblue">Reh</span>]][[User talk:Rehman|<span style="color:green">man</span>]] 07:05, 30 March 2019 (UTC) | ||
:Fixed it with [https://en.wikipedia.org/w/index.php?title=Template:Infobox_power_station/sandbox&diff=prev&oldid=890125420 this edit]. The maxvals param was in the wrong location. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 07:56, 30 March 2019 (UTC) | :Fixed it with [https://en.wikipedia.org/w/index.php?title=Template:Infobox_power_station/sandbox&diff=prev&oldid=890125420 this edit]. The maxvals param was in the wrong location. -- [[User:WOSlinker|WOSlinker]] ([[User talk:WOSlinker|talk]]) 07:56, 30 March 2019 (UTC)talk-esünkre | ||
::Oops, thanks for fixing my silly error, [[User:WOSlinker|WOSlinker]]. [[User:Rehman|<span style="font-variant:small-caps; font-weight:bold; color:darkblue">Reh</span>]][[User talk:Rehman|<span style="color:green">man</span>]] 13:06, 30 March 2019 (UTC) | ::Oops, thanks for fixing my silly error, [[User:WOSlinker|WOSlinker]]. [[User:Rehman|<span style="font-variant:small-caps; font-weight:bold; color:darkblue">Reh</span>]][[User talk:Rehman|<span style="color:green">man</span>]] 13:06, 30 March 2019 (UTC) | ||
== Dealing with tall images == | == Dealing with tall images == | ||
Seems like the easiest way would be to add a height constraint by changing:<pre>size = size .. "px";</pre> to <pre>size = size.."x"..size.."px";</pre>Then the actual size shown would be the largest that fits inside a <code>size * size</code> square (or [https://phabricator.wikimedia.org/T26763 at least, roughly so]). ―[[special:contributions/cobaltcigs|cobaltcigs]] 11:44, 8 November 2019 (UTC) | Seems like the easiest way would be to add a height constraint by changing:<pre>size = size .. "px";</pre> to <pre>size = size.."x"..size.."px";</pre>Then the actual size shown would be the largest that fits inside a <code>size * size</code> square (or [https://phabricator.wikimedia.org/T26763 at least, roughly so]). ―[[special:contributions/cobaltcigs|cobaltcigs]] 11:44, 8 November 2019 (UTC) | ||
Revision as of 03:36, 25 May 2020
Template:Talk header User:MiszaBot/config Template:Archives
Doc Problem and Placing images side by side
According to the category Category:Pages using deprecated image syntax, it was told that the syntax |image=[[File:Example.jpg]] should not be used and it needs to be replaced by Example.jpg. If that is right, then shouldn't it be corrected in the document page of this module?
Secondly, I have recently asked following question in the talk page Category talk:Pages using deprecated image syntax, but I couldn't find a complete correct answer. So I am asking it here. The question is, how can I place 2 images side by side without being separated according to the new format of including files ie. according to the latest version of this module? For example, please consider the images present in the article 3rd Pennsylvania Cavalry. Adithyak1997 (talk) 14:43, 30 August 2018 (UTC)
Thumbnails
After months of cleaning out Category:Pages using infoboxes with thumbnail images every other day or two, I'm wondering whether there isn't a better solution? Based on my experience, 99% of the time when a page is dumped into that category, it is a brand new user creating a page for the first time. They upload an image and then copy and paste the pre-generated thumbnail text from the upload wizard. So I see 2 possible solutions...
- Instead of displaying the image and putting the page in a category, why not just render a {{error}} message saying "Yea... Don't effing do this!" I kid on the language of course... But we could render an error saying something like "Thumbnails should not be rendered in an infobox, please provide an image name only. See WP:INFOBOXIMAGE for more information."
- Since we are already performing a check for
thumbin the Module, why don't we just remove thethumbparameter if it is found? That way an image never renders as a thumb?
Any thoughts? --Zackmann (Talk to me/What I been doing) 20:58, 15 November 2018 (UTC)
- Template:Ping do either of you have any thoughts? --Zackmann (Talk to me/What I been doing) 19:53, 18 November 2018 (UTC)
- Yes, would be possible to remove thumb, but would need replacing with frameless rather than just a straight removal. Think that would be ok. -- WOSlinker (talk) 19:57, 18 November 2018 (UTC)
- Template:Ping do you think that would be a good approach? --Zackmann (Talk to me/What I been doing) 20:00, 18 November 2018 (UTC)
- Yes, would be possible to remove thumb, but would need replacing with frameless rather than just a straight removal. Think that would be ok. -- WOSlinker (talk) 19:57, 18 November 2018 (UTC)
Multiple images listed on Wikidata
Hello. For Wikidata items which has more than one image listed, it generates an error when rendered locally. For example:
- Run
{{Infobox power station/sandbox}}in edit preview of Kajaki Dam. Note the "300px" instead of an image.
Is there a way to fetch a maximum of only one value (i.e. one image), like the maxvals parameter of Module:WikidataIB? Rehman 07:05, 30 March 2019 (UTC)
- Fixed it with this edit. The maxvals param was in the wrong location. -- WOSlinker (talk) 07:56, 30 March 2019 (UTC)talk-esünkre
Dealing with tall images
Seems like the easiest way would be to add a height constraint by changing:
size = size .. "px";
to
size = size.."x"..size.."px";
Then the actual size shown would be the largest that fits inside a size * size square (or at least, roughly so). ―cobaltcigs 11:44, 8 November 2019 (UTC)