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:
