Module talk:Random slideshow: Difference between revisions

Content deleted Content added
m Fix archive subpage
m Archiving 5 discussion(s) to Module talk:Random slideshow/Archive 1) (bot
Line 16:
| minthreadsleft = 5
}}
 
== Portraits and panoramas ==
{{moved discussion from|Template talk:Transclude files as random slideshow|2=<u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 05:34, 23 August 2018 (UTC)}}
 
Hi, would it be possible to add a height parameter in addition to width, so that you can limit the size of portrait-format images? And, ideally, would it be also possible to add a functionality similar to [[:Template:Wide image|Wide image]] to better display panoramic pictures? — [[User:Kpalion|Kpalion]]<sup>[[User talk:Kpalion|(talk)]]</sup> 16:00, 19 July 2018 (UTC)
:Ideally some way of limiting the image size to fit into the screen. &middot; &middot; &middot; [[User:Pbsouthwood|Peter (Southwood)]] [[User talk:Pbsouthwood|<sup>(talk)</sup>]]: 17:26, 28 July 2018 (UTC)
 
== Non-free images being included in slideshows ==
{{moved discussion from|Template talk:Transclude files as random slideshow|2=<u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 05:34, 23 August 2018 (UTC)}}
 
Is there a way to tweak this templates syntax so that it doesn't call up any non-free images when it's used on pages like [[:Portal:Anti-nuclear movement]]? Non-free files are only allowed to be used in the article namespace per [[:WP:NFCC#9]] which means they shouldn't be displayed on portal pages. -- [[User:Marchjuly|Marchjuly]] ([[User talk:Marchjuly|talk]]) 04:15, 23 August 2018 (UTC)
:{{ping|Marchjuly}} This should already be done... [[Module:Excerpt]] is used to parse page content, which tests images and excludes those which are non-free. Which specific image or images are slipping through? - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 04:50, 23 August 2018 (UTC)
::[[:File:Nuclear hand.png]] is getting flagged as being used on "Portal:Anti-nuclear movement". -- [[User:Marchjuly|Marchjuly]] ([[User talk:Marchjuly|talk]]) 04:55, 23 August 2018 (UTC)
:::So its a non-free file within a gallery, which probably should<ins>n't</ins> be there in the first case per [[Wikipedia:Non-free_content#Multimedia]]. But in any case, I'm modifying the code to also check gallery files (which are processed separately to other files) for non-free content. - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 05:12, 23 August 2018 (UTC)
::::{{done}} - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 05:17, 23 August 2018 (UTC)
::::::Thanks {{u|Evad37}}. -- [[User:Marchjuly|Marchjuly]] ([[User talk:Marchjuly|talk]]) 05:25, 23 August 2018 (UTC)
::::::{{ping|Evad37}} Would you mind taking a look at [[:Portal:Tron]]. The same thing that happened above seems to be happening in that portal regarding [[:File:Tron2lightcycle.jpg]] and [[:File:Tron Lightcycles.jpg]]. -- [[User:Marchjuly|Marchjuly]] ([[User talk:Marchjuly|talk]]) 05:36, 27 August 2018 (UTC)
:::::::{{ping|Marchjuly}} {{Fixed}}. They were specified on the portal itself, so just needs to be removed there [https://en.wikipedia.org/w/index.php?title=Portal%3ATron&type=revision&diff=856731602&oldid=856653596] - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 05:55, 27 August 2018 (UTC)
::::::::Thank you. -- [[User:Marchjuly|Marchjuly]] ([[User talk:Marchjuly|talk]]) 06:10, 27 August 2018 (UTC)
 
== HTML code appearing in the captions of some images ==
 
Several images use templates in their captions, such as for keys in maps (see [[Territories of the United States]]) and it would be a good idea to either:
* Remove the result of the templates (so remove HTML code from captions)
* Allow the template to show its content/results (so allow parsing of HTML code in the image captions)
 
See [[Portal:United States Territories]] for an example of this happening, but I have seen it in other portals. [[User:Dreamy Jazz|Dreamy <i style="color:#d01e1e">'''Jazz'''</i>]] 🎷 <sup>''[[User_talk:Dreamy Jazz|talk to me]]'' &#124; ''[[Special:Contributions/Dreamy Jazz|my contributions]]''</sup> 17:07, 11 September 2018 (UTC)
:{{Fixed}}, just needed to make sure linebreaks were removed from expanded templates - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 02:29, 12 September 2018 (UTC)
 
== Image dimensions displayed as captions ==
 
As used at [[Portal:Greek alphabet]], the code <source lang=moin>{{Transclude files as random slideshow
| Greek alphabet
|
|
}}</source> produces captions like {{tq|x12px}} for many of the images. To me, these are image dimensions, not intended to be shown to the non-editing reader. --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] &#x1f339; ([[User talk:Redrose64|talk]]) 23:16, 27 February 2019 (UTC)
:{{Ping|Redrose64}} {{Fixed}}. The module was previously sometimes confusing the size for the caption; now it will either display the real caption, or leave off the caption if there isn't one. - <u>'''[[User:Evad37|Evad]]''37'''''</u>&nbsp;<span style="font-size:95%;">&#91;[[d:w:User talk:Evad37|talk]]]</span> 00:24, 28 February 2019 (UTC)
::{{ty}} --[[User:Redrose64|<span style="color:#a80000; background:#ffeeee; text-decoration:inherit">Red</span>rose64]] &#x1f339; ([[User talk:Redrose64|talk]]) 10:54, 28 February 2019 (UTC)
 
== Nifty use of this template for a sidebar slideshow, maybe we should support this correctly? ==
 
{{Sidebar
| pretitle = Some effects of climate change
| pretitlestyle = font-weight:bold;
| cellspacing = 0
| cellpadding = 0
| width =
| style = border:1px solid #c8ccd1;
| content1style = margin:-5px -5px -2.2em -5px; display: inline-block;
| content1 = {{Transclude files as random slideshow
| Global warming | section1= Nature and wildlife
| Global warming | section2= Humans
}}
| content2style = height:0px; margin:0 -0.4em; padding:0; display:inline-block; visibility:hidden;
| content2 = [[File:Sea_level_history_and_projections.svg|frameless|border|upright=1.35]]
}}
I used the "Transclude files as random slideshow" template to create a sidebar slideshow. You can see the effect on the right hand side here. While the markup is pretty minimal, there are several semi-hacks I had to do to get it to work:
# I wrapped the "Transclude files as random slideshow" template in the "sidebar" template
# The edge spacing on the gallery is too much for fitting in the side bar, so to zoom it in I used negative margins with inline-block display
# You can't size the gallery according to a thumbnail, so to get the sizing right I include a hidden image in the sidebar and then size the gallery to that
# The trouble then is that if you click another image in the page and then use the right / left directional arrows to go through all images, you'll see the hidden image. To work around THAT, I stuffed in a fallback image in the hidden ___location.
# Tweaked the border color to match thumbnail pics
 
The images only appear on desktop for some reason; on mobile all images are hidden, even though the template documentation says that 4 images should be shown on mobile. Also, during page load the images are laid out in a stacked column before collapsing, but I think that's just how the template works (it's not unique to the sidebar use).
 
It's a pretty nifty way to elevate some content in an article to the intro. Thoughts on supporting this as a real thing, like maybe a new template or having a setting on this template so people could discover this usage? [[User:Efbrazil|Efbrazil]] ([[User talk:Efbrazil|talk]]) 20:49, 9 May 2020 (UTC)
 
== Portals with many images ==