Topic on Adventures in Odyssey Wiki:Town Hall2

Jump to navigation Jump to search

Category based galleries

11
Reddo (talkcontribs)

So due to the 1.35 update we lost the category gallery extension, so I wrote all new code that I feel like is way better you can see it in action here User:Reddo/gallerytest, still need to do work for mobile, but it should work pretty much the same as it does on desktop right now

Reddo (talkcontribs)

mobile should be good now too

OdysseyFan (talkcontribs)
Reddo (talkcontribs)

You need to edit the image page to have a caption for it to show up, it just takes the content of the first section of the files page. Unless there's somewhere else I can pull them from

OdysseyFan (talkcontribs)

ah i see thank you.

OdysseyFan (talkcontribs)

trying to run a replace text for

catgallery cat="

to

Category gallery/captions|cat=


etc... but it didn't like it

Aiow (talkcontribs)

when I was thinking of how i would do captions (back in Aug of 2020) I was exploring pulling the captions from the caption parameter of the Album Image (or book image, or cast and crew image) template used on each of images. Seemed that because we already have a caption parameter why not use that for both? My idea was to use dpl to include a sub template that just grabbed that caption parameter.

Reddo (talkcontribs)

I thought of that but for something like the album 69 gallery those 4 images don't all have captions in a different template somewhere else. Maybe instead we could reverse it and pull the caption for the template from the image page. Just a thought I'd have to look at it a bit more. Not as familiar with the templates as I used to be

Aiow (talkcontribs)

We could, but there really is not much difference between the two options. Both store the data on the file page, one is ==Caption== example text here and the other is |caption= example text here I have not looked to see if the wiki is currently using the image description from the template anywhere. I'm guessing we are not.

Either option we use we can get to the same result. Personally I'd prefer to have it in the image template. It just keeps all the data together. A plus for that is it makes it a tiny bit easier to add the metadata (that is what I'm calling all the data we add to the image page, whether through the template or under a caption heading.) users do not need to add the image template and a heading. Especially with the template wizard system, using templates can be super user friendly.

Reddo (talkcontribs)

Oh I was looking at an album page that has a image caption stored there and then nothing on the image page. If there is a caption on the image page already in a template that would be the way to go. But can we get the same caption info from different templates? I know not all images have the same template applied to them

Aiow (talkcontribs)