Template talk:Gallery
Changes of the arguments parsing algorithmHey, I'm pinging the major contributors to this Module. I noticed the algorithm for this module was quite rigid, and it making many assumptions of image and caption order. It was counting the number of arguments and making assumptions of how many images the gallery had. I changed it a bit, so it counts the images by a custom isImage(filename) and get the next non-empty argument to be the caption. The tricky thing is to identify the images. If File:, Image: and Media: was previously enforced, it would be a bit easier. So what I did was verifying those prefix and if in case it was not present I verify if it ends in an extension of 3 or 4 characters. As there can also be audio and video in the gallery, we would have to keep up with Commons to know and update the existing file extensions. Checking for ".****" seems okay, but there is the risk a caption would be identified as an image if it had a similar ending, but those endings are unlikely in most languages. An option would be to check the cases without the File:, Image: and Media: prefixes and automatically put them in some category, something like: "Category:Pages using gallery without a media prefix" I appreciate thoughts on this changes. Template:Gallery/testcases#Hunting_for_bugs -- Arthurfragoso (talk) 04:22, 1 February 2025 (UTC)
Caption not accepting external links@Jonesey95 Hmmm, sorry about that erroneous edit to the doc saying captions don't accept external links when it appears they do in my sandbox, but possibley not on talk pages... like on this talk page in the past the source code for the gallery at the section header titled "Proposal: clarify "user-generated" in MOS:CALLIGRAPHY" is: {{Gallery
| title = Examples of a "digital recreation" and of "stylistic elements which are not present in the original":
| align = center
| footer =
| style =
| state =
| height =
| width =
| perrow =
| mode =
| whitebg = no
| noborder = yes
| captionstyle =
| File:Istanbul - Santa Sofia - Medalló (cropped).JPG
| real-world calligraphy of [[Ali]]
| alt1=
| File:Rashidun Caliph Ali ibn Abi Talib - علي بن أبي طالب.svg
| digital recreation of real-world calligraphy of Ali
| alt2=
| File:UsulALFiqh.svg
| calligraphy containing stylistic elements (decorative circle, color, shadow) not present in original calligraphy as used outside WP (external links [https://m.media-amazon.com/images/I/71iObLPx1mL._SL1500_.jpg][https://www.mehbooba.com/the-principles-of-hanafi-usul-al-fiqh][https://madinahcollege.uk/product/usul-al-fiqh-an-introduction-to-islamic-legal-theory])
| alt3=
}}
See the highlighted caption doesn't appear on the page. Is it a talk page only thing? Or is it specifically the code of this caption that is causing it not to output? waddie96 ★ (talk) 20:23, 9 February 2025 (UTC)
Vertical alignmentIs is possible to vertically align images? PhotographyEdits (talk) 11:00, 9 March 2025 (UTC) Align footer leftI feel like it's weird and arbitrary that the footer is aligned right by default. It just makes the footer unsuitable for long text that wraps to the next line. Should there be an option that lets you change the alignment setting of the footer (right, center, left)? Nrco0e (talk • contribs) 06:39, 11 September 2025 (UTC) |