WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
Change Manage Gallery menu link (1 post)

  1. Houfton
    Member
    Posted 1 year ago #

    I am trying to change the Manage Gallery menu link (Admin>Gallery>Manage Gallery) so that it goes straight to a particular gallery rather than to the usual page showing all galleries in a table.

    I have tried to adapt the link to a single gallery found in nextgen-gallery/admin/manage-galleries.php and use it in the fourth argument in the menu link in nextgen-gallery/admin/admin.php:

    normal link to all galleries:
    add_submenu_page( NGGFOLDER , __('Manage Gallery', 'nggallery'), __('Manage Gallery', 'nggallery'), 'NextGEN Manage gallery', 'nggallery-manage-gallery', array (&$this, 'show_menu'));

    custom link to one gallery:
    add_submenu_page( NGGFOLDER , __('Manage Gallery', 'nggallery'), __('Manage Gallery', 'nggallery'), 'NextGEN Manage gallery', wp_nonce_url( 'nggallery-manage-gallery&mode=edit&gid=' . $a_gallery_id, 'ngg_editgallery'), array (&$this, 'show_menu'));

    Sadly, though the URL it generates looks about right (eg .../wp-admin/admin.php?page=nggallery-manage-gallery&mode=edit&gid=2&_wpnonce=3f4a3b0ef4), it gives a "You do not have sufficient permissions to access this page." message. I am guessing that I am not using wp_nonce_url properly. Or is this just not the way to do it?

    http://wordpress.org/extend/plugins/nextgen-gallery/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic