๐Ÿ–ผ๏ธ Topic Gallery Plugin

Hey there! :blob-wave-reverse:

Having only minimal programming knowledge, Iโ€™ve been experimenting with AI coding to compensate and created a plugin that generates image galleries from topics.

Open your eyes wide and witness the alliance between the autonomous machine and the diet soda-powered great ape! :robot: :right_facing_fist: :collision: :left_facing_fist: :monkey_face:

You can see it live and try it here. This is primarily a test instance so the availability is not guaranteed.

Features

  • Infinite loading
  • User filter
  • Date filter
  • Uses the Photoswipe viewer
  • Group-specific access
  • Smartphone-compatible

There are several buttons to go from a topic to a Gallery :slight_smile:

  • From the timeline
  • At the end of a topic
  • On each post

If we open the gallery from a post, the gallery is filtered and only shows images starting from this post. You can cancel this filter with a click.

Security & image queries

Galleries are only available for topics that a user has access to.
They donโ€™t display images from soft-deleted posts, hidden flagged posts, whispers (if the users donโ€™t have access to them), and ignored users.

If a picture is displayed multiple times, only the first occurrence appears in the gallery.
It doesnโ€™t show non-regular uploads (avatars, custom emojis, etc).

It doesnโ€™t work with hotlinked images.

The gallery displays images in the same order as in posts, and regardless of their upload date and author (in this regard, it works differently from my other project draft).

Bugs and weaknesses

The buttons mostly appear in containers that are not displayed for visitors. So the code duplicates those buttons and shows either of them depending on whether itโ€™s a visitor or a registered user browsing the forum.

No meta tags on gallery links

No emphasis on accessibility features

I probably forget or miss many things here.

Where can I find it, and why didnโ€™t you publish that on Plugin?

First, a friendly lilโ€™ warning!

:warning: Itโ€™s mostly AI-generated, and the technical knowledge involved in this project exceeds my own. Thus, I canโ€™t guarantee itโ€™s reliable or safe. Donโ€™t install it if you canโ€™t review the code yourself.

Now, Iโ€™d be happy if a real developer is enthusiastic enough to look at the code โ€“ which is not very complex from what Iโ€™ve seen. If that can be done, then the topic can surely be moved to Plugin. In the meantime, please consider this project as a mere experiment and not a production-ready plugin.

You can find the code here: https://github.com/Canapin/discourse-topic-gallery

:information_source: By default, the plugin is disabled, and gallery availables for admins only. Visit settings first.


Related Feature topics I created about similar features:

5 ืœื™ื™ืงื™ื