Jump to content

Deleting gallery images?


Xae

Recommended Posts

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.

Link to comment
Share on other sites

  • 2 weeks later...

How do you give the option to remove their gallery images of the group ? Only for gallery, not for forums

Thanks

​See post above by Jim M. The setting is global only; you can't restrict it per content type.

Link to comment
Share on other sites

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();
  }
}

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...