FANDOM


  • I would like to make a gallery with ALL the files of a wiki (including: JPG, GIF, PNG and video files). I have been investigating and I have not found anything.

    I know there is a way to show recent images, and it is as follows:

    But I want a gallery, not a slideshow. And I want to show random files, similar to what Special:Random/File does, like this:

      Loading editor
    • You could probably use DPL to generate a random list of files to pass to the gallery tags. However, you would have to be careful about non-image files.

        Loading editor
    • Andrewds1021 wrote:

      You could probably use DPL to generate a random list of files to pass to the gallery tags. However, you would have to be careful about non-image files.

      I'm skeptical about this. Since Gallery is a Fandom feature, their integration with other functionality is historically not great.

        Loading editor
    • I am not sure what you mean by that. My understanding was that a lot of extensions were modified by Wikia anyways. At the very least, it is based on this extension.

        Loading editor
    • Thinking more about it, since captions in Gallery have pretty good wikitext support it may work.

        Loading editor
    • I was thinking you might be able to get away with it if you use #tag. In fact, I think you would have to since you want the DPL to be evaluated before the gallery tags.

        Loading editor
    • Unfortunately, it is still subject to page caching. However, you can see an example of what I have been able to do here.


      Edit:

      So, ICO and PDF files won't display so I removed them from the list of extensions. I don't know whether or not ODG and ODI files will display. There aren't any on this wiki for me to test with. Also, if you have any additional formats enabled on your wiki, you would need to add their extensions to the list.

        Loading editor
    • TEST:

      25 More Random Images

        Loading editor
    • TEST:

      5 More Random Images

        Loading editor
    • Why it doesn't work?

        Loading editor
    • maybe because of forum. in article it must be fine.

        Loading editor
    • Very nice!

        Loading editor
    • Fngplg wrote: maybe because of forum. in article it must be fine.

      I think that is it. I had the same issue in some other thread. For whatever reason, DPL appears to not work in Forums. Although... I seem to recall that it used to.

        Loading editor
    • A FANDOM user
        Loading editor
Give Kudos to this message
You've given this message Kudos!
See who gave Kudos to this message