Xae Posted May 6, 2015 Posted May 6, 2015 This seems like a silly question but how do you delete gallery images or remove them from albums? Can't seem to find the button, short of the one part of moderation.
Jim M Posted May 6, 2015 Posted May 6, 2015 When viewing the image, click "manage image" button and a drop down menu will appear "Delete". Member group though has to have permission to delete own files
Xae Posted May 6, 2015 Author Posted May 6, 2015 When viewing the image, click "manage image" button and a drop down menu will appear "Delete". Member group though has to have permission to delete own files Are you referring to the "Can delete own content?" group setting? If so, I'm assuming it has be global for all content types, which I am a bit hesitant to enable.
Jim M Posted May 6, 2015 Posted May 6, 2015 Are you referring to the "Can delete own content?" group setting? If so, I'm assuming it has be global for all content types, which I am a bit hesitant to enable.Correct.
pkoipas78 Posted May 18, 2015 Posted May 18, 2015 How do you give the option to remove their gallery images of the group ? Only for gallery, not for forumsThanks
Xae Posted May 18, 2015 Author Posted May 18, 2015 How do you give the option to remove their gallery images of the group ? Only for gallery, not for forumsThanksSee post above by Jim M. The setting is global only; you can't restrict it per content type.
pkoipas78 Posted May 18, 2015 Posted May 18, 2015 I know, should be given the opportunity to choose, there is no plugin for this?
Xae Posted May 18, 2015 Author Posted May 18, 2015 I know, should be given the opportunity to choose, there is no plugin for this?If what you want is to allow everybody to delete their own photos, that's easily accomplished with a code hook (IPS\Gallery\Image). Toggling it per group would be a bit more work.//<?php class myapp_hook_galleryImage extends _HOOK_CLASS_ { /** * Return true for current member if they own the image, overriding their group's lack * of the global content deletion permission. * * @return (boolean) */ public function canDelete() { if ( $this->member_id == \IPS\Member::loggedIn()->member_id ) { return TRUE; } return parent::canDelete(); } }
pkoipas78 Posted May 18, 2015 Posted May 18, 2015 Good thank you, i want is to allow everybody to delete their own photos...Your code I put it in a xml file and upload in plugins ?
Xae Posted May 18, 2015 Author Posted May 18, 2015 Good thank you, i want is to allow everybody to delete their own photos...Your code I put it in a xml file and upload in plugins ?Here's the hook turned into a plugin.IPS4DeleteOwnGalleryImagesPlugin.xml
Xae Posted May 18, 2015 Author Posted May 18, 2015 Really great, thank you No problem. Shoot me a note if there are any issues with it.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.