Forums

Slideshow Gallery
Change user roles for Slideshow Gallery plugin (4 posts)

  1. papergecko
    Member
    Posted 1 year ago #

    Hi

    I'm using Slideshow Gallery, but the way the plugin is set up means that only administrators can add new images or edit the gallery.

    I'd really like to be able to allow Editors and Authors to be able to do this too.

    Can anyone let me know how to achieve this? I'm guessing it would require adding a function or editing the plugin itself?

    Many thanks

  2. Samuel B
    moderator
    Posted 1 year ago #

  3. papergecko
    Member
    Posted 1 year ago #

    Thanks Samuel.

    I've installed Role Scoper but can't see how I can use it to change the roles for Slideshow Gallery - the Gallery plugin doesn't use Categories.

    Is there something I'm missing?

    I'm happy to hack the plugin itself if that's easier too.

    Thanks

  4. papergecko
    Member
    Posted 1 year ago #

    I figured it out:

    to do this change lines 50 & 51 in the plugin file 'slideshow-gallery.php' to this:

    add_menu_page(__('Slideshow', $this -> plugin_name), __('Slideshow', $this -> plugin_name), 7, "gallery", array($this, 'admin_slides'), $this -> url() . '/images/icon.png');
    		$this -> menus['gallery'] = add_submenu_page("gallery", __('Manage Slides', $this -> plugin_name), __('Manage Slides', $this -> plugin_name), 7, "gallery", array($this, 'admin_slides'));

    The number (', 7, "gallery", ') denotes the level of user who sees the admin menu. It was set at 10, which is admin only.

    I'd imagine it's very obvious to plugin writers - but it wasn't to me! Now I just have to remember to edit it when I update the plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic