Hey there! ![]()
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!
![]()
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 ![]()
- 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!
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
By default, the plugin is disabled, and gallery availables for admins only. Visit settings first.
Related Feature topics I created about similar features:
