Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Tripp★ Posted October 13, 2018 Posted October 13, 2018 How do I go about disabling GIF Uploads to my gallery from members on my forums? I'm guessing it'll have to be a file modification which is absolutely fine with me. I once saw this question asked somewhere on the forums but no one answered it and some were even asking "Why would you want to?" I can't find the topic anymore, so I have no idea if this was even answered. I'm only looking for an answer. Thanks in advance.
Jim M Posted October 13, 2018 Posted October 13, 2018 You can specify which file extensions you want to allow by going to ACP > System > Posting.
Tripp★ Posted October 14, 2018 Author Posted October 14, 2018 15 hours ago, Jim M said: You can specify which file extensions you want to allow by going to ACP > System > Posting. Thanks, but I think there has been some kind of confusion. I'm not asking about post attachments, I'm asking specifically about the gallery. No one can upload and attach things to posts like that, only upload to the gallery and then use the insert media button. When I edited the settings; it still allows me to upload GIFs to the gallery, but I don't know if that's because I'm an administrator or not, in fairness.
bfarber Posted October 15, 2018 Posted October 15, 2018 Do you want gifs to be available elsewhere images are expected? If not, then you can create a plugin to override \IPS\Image and adjust this class property: public static $imageExtensions = array( 'gif', 'jpeg', 'jpe', 'jpg', 'png' ); (This would be an extremely simple but effective plugin) If you want gifs to be allowed elsewhere but not in Gallery uploads, it becomes a bit trickier. You would need a plugin to override the chooseImagesForm() method in \IPS\gallery\modules\front\gallery\submit. Specifically, it would need to set 'image' in the $options array to NULL and explicitly define which extensions are allowed (as we do when movies are allowed with these lines) $options['image'] = NULL; $options['allowedFileTypes'] = array_merge( \IPS\Image::$imageExtensions, array( 'flv', 'f4v', 'wmv', 'mpg', 'mpeg', 'mp4', 'mkv', 'm4a', 'm4v', '3gp', 'mov', 'avi', 'webm', 'ogg', 'ogv' ) );
InsideEdge Posted January 30, 2019 Posted January 30, 2019 Is there a way to stop animated gifs used for Avatars?
Recommended Posts
Archived
This topic is now archived and is closed to further replies.