Template talk:Item infobox gallery
It's very easy to miss the gallery image (if it exists) on item pages, since it's minimized by default and you need to click the little show button. Would it be a major disruption if the expandable class was removed so the screenshot is displayed be default. I know that the primary reason that I (and probably many other people) go to an item's page is to see a screenshot of it. Siliron
Rewrite[edit]
Changed the gallery to use arraymaps for arbitrary number of images. Sets two semantic properties for the first image on the list. If there is a default image, that will be used.--Relyk ~ talk > 03:57, 15 May 2013 (UTC)
- Obviously what you did just broke every infobox that was using the gallery# parameters, but besides that... If you want a second image now, you are now required to specify the PAGENAME.jpg image in addition to the second image. That's a rollback of functionality, in my opinion - PAGENAME.jpg should always be included by default if present, and you should never have to specify it.
- Oh, and the syntax is very non-intuitive. Lists of lists are difficult to handle in any case. —Dr Ishmael 04:23, 15 May 2013 (UTC)
- That was a functionality I didn't like, if you specify gallery1, it overrides the default image. People had to skip to gallery2 if they wanted to avoid that. Or worse don't avoid it and overwrite the default image with itself or a different image. I'd suggest having the default image is fixed to be the first image if it exists. The first image is the one used to set the properties as well. The logic would be inside that #var:appearance logic block for setting the properties or something.
- As far as syntax, its the same as gallery tag with different symbols so *shrug*. It's easier to use if not intuitive, or I'm just crazy thinking so.--Relyk ~ talk > 05:01, 15 May 2013 (UTC)
{{Item infobox gallery| File:Example.jpg, This is an example File:Example.jpg, This is an example File:Example.jpg, This is an example }}
^could copy the gallery altogether. We can also have a parameter to provide the same override as the original template, since that's really what you want...--Relyk ~ talk > 07:31, 15 May 2013 (UTC)
- Could you please either fix this to accept the old format, or revert your changes until you have found a way? This is breaking pages, and I don’t agree with the syntax either. Also this is likely to break if the image text is a sentence and contains a comma. poke | talk 09:59, 15 May 2013 (UTC)
- Agree with poke, keep backwards compatibility while we work out the new system.
- Your sample usage above looks better - it was the '+' that I really didn't like. @#arraymap can split on newlines just fine:
{{#arraymap:test test|\n|@@@|@@@|XXX}}
- testXXXtest
- But poke makes a good point about commas within the caption, too. Heck, file names can contain commas (I know that's not a weapon). That's probably why the real <gallery> format uses a pipe character; unfortunately we can't use pipe here, and any other delimiter we use is going to be non-intuitive. —Dr Ishmael 12:53, 15 May 2013 (UTC)
- Okay, I reintroduced a legacy mode now, and {{Item infobox}} falls back to it when any of the galleryX parameters is explicitely set. I also cleaned up the code a bit, and changed the way the default image (BASEPAGENAME.jpg) is display. Usually you don’t want to ignore all other images just when that one exists, right? ;)
- Relyk: Did you actually bother to check any page when you made those changes? You can’t just make major changes to templates just because you think it is easier to use them like that, when the whole wiki breaks that way. You might want to discuss some of your changes before actually implementing them in the future. poke | talk 16:45, 15 May 2013 (UTC)
- I have the template in the sandbox working correctly if that's what you want; unfortunately it wasn't breaking on the sample page. It can be fixed or reverted by someone else, the changes are only in a couple places. The changes are to a relatively minor template that doesn't actually break the wiki. I can't code perfectly to make sure nothing breaks nor patient enough to spend a week or a month on a talk page before changes are made, I apologize for that.--Relyk ~ talk > 18:57, 15 May 2013 (UTC)
- This minor template is used on a few thousand articles though. poke | talk 19:23, 15 May 2013 (UTC)
- The template is transcluded on the infobox but only used for a fraction of the pages using the infobox, and then only noticeable on the fraction of those pages that use additional parameters. As long as I check the changes don't visually break the infobox or the template itself, that should be acceptable until something is worked out or we simply decide to stay with the original implementation. It's much easier and quicker to work on templates implemented on thousands of pages by making the changes live instead of working with a sandbox with one or two samples. What would be unacceptable is not having a closing tag on your short and having it completely break the infobox, in which case you would be perfectly justified in tearing your hair out and call the person who coded it retarded for not testing the code enough (This totally did not happen).--Relyk ~ talk > 20:26, 15 May 2013 (UTC)
- This minor template is used on a few thousand articles though. poke | talk 19:23, 15 May 2013 (UTC)
- I have the template in the sandbox working correctly if that's what you want; unfortunately it wasn't breaking on the sample page. It can be fixed or reverted by someone else, the changes are only in a couple places. The changes are to a relatively minor template that doesn't actually break the wiki. I can't code perfectly to make sure nothing breaks nor patient enough to spend a week or a month on a talk page before changes are made, I apologize for that.--Relyk ~ talk > 18:57, 15 May 2013 (UTC)
Reverting[edit]
The captions make the formatting awkward and it looks complicated in the infobox template. It's easier for people to enumerate the parameters, nobody likes having three images on one line, especially including captions. It was a bad idea.--Relyk ~ talk < 21:59, 14 July 2013 (UTC)
- you gonna go fix all the pages I converted to use the arraymap format? :p leave it there it does no harm. -Chieftain Alex 23:55, 14 July 2013 (UTC)
Bug[edit]
[[PvP Dwayna's Short Bow]] - caption not set. No image of the name "File:PvP Dwayna's Short Bow", and its asked to display "File:The Lover.jpg" but it doesn't caption the first image to show. Also occurs for Seraph Shortbow. (can be resolved by using legacy mode) -Chieftain Alex 12:11, 27 May 2013 (UTC)
- And looking at it now, I see that thats what happens if you don't specify a caption.. setting it to default to pagename then. -Chieftain Alex 12:19, 27 May 2013 (UTC)
Image doesn't show if...[edit]
Would anybody object to tweaking the template so if pages that are in the Category:Unimplemented content do not display pictures if one is not already listed? For example: Large Guild Banner was identified as a test object and will never have a gallery picture. - Doodleplex 22:33, 28 November 2016 (UTC)
- I've made a change to {{Item infobox}} instead to ignore the gallery if "gallery = no" is added. From what I can find, this issue only happens with unimplemented decorations because everything else can be previewed in some way. J.Tesla (talk) 23:55, 29 November 2016 (UTC)