Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
By default, the Galleria module returns an error if a Galleria-enabled node has both image and non-image attachments. However, some webmasters will want to add non-image attachments but still have a Galleria generated from any images that are attached.
Here's a patch that changes the module's node-validation to pass if there is at least one image attached, rather than if there are only images attached. When the page is being generated, the module simply skips any non-image attachments.
Comment | File | Size | Author |
---|---|---|---|
#2 | galleria_imagecount_fix.patch | 1.46 KB | eromba |
#1 | galleria-allow_uploads-444974-1.patch | 2.58 KB | Mark Theunissen |
galleria_allow_all_uploads.patch | 1.98 KB | eromba |
Comments
Comment #1
Mark Theunissen CreditAttribution: Mark Theunissen commentedI have made some minor mods (to the function, and using a DEFINE instead of global variable).
Final patch attached. Committed to DRUPAL-6--1. Thanks!
Comment #2
eromba CreditAttribution: eromba commentedIt looks like this patch causes a tiny conflict with the commit for #425840: Unexpected behavior with single-image Gallerias. The file count that determines whether or not to print the previous/next links should not include files that are skipped. The fix for the head branch is attached.
Comment #3
eromba CreditAttribution: eromba commentedComment #4
Mark Theunissen CreditAttribution: Mark Theunissen commentedFixed in dev.