The MU forums have moved to WordPress.org

changing the backend menu structure (21 posts)

  1. Ovidiu
    Member
    Posted 15 years ago #

    hello,

    I remember there were quite a few posts asking about how one could change the backend either to simplify it or to hide certain menu items from the end user.

    I found a great plugin which seems to be able to do that, but haven't tested it with wpmu yet.

    still, here is the link:

    http://barunsingh.com/software/custom-admin-menu/

  2. dsader
    Member
    Posted 15 years ago #

    I tried it, for 10 minutes, but it is not for a site admin to hide menus from fellow blog admins. Safari had issues if I recall. I was looking for a site admin versus a blog admin solution, anyway.

  3. Jshwaz44
    Member
    Posted 14 years ago #

    It doesn't look like this plugin works with WPMU. I get a bunch of boxes with code underneath them

  4. dsader
    Member
    Posted 14 years ago #

    Works for me, wpmu version1.2.4. As a regular plugin it activates normally, as advertised, in the wp-admin/plugins. Upload as is after unzipping. Permissions 755.

  5. dsader
    Member
    Posted 14 years ago #

    It is very "wpmu-able" if you replace all *_option with *_site_option. And is_site_admin the menu.

  6. dsader
    Member
    Posted 14 years ago #

    The author left own links in a few places in css search for url and you'll see.

  7. Jshwaz44
    Member
    Posted 14 years ago #

    Sorry,

    Could you be a little more specific as to what I need to change and where to make this plugin work?

  8. Jshwaz44
    Member
    Posted 14 years ago #

    Replacing *_option with *_site_option makes sense.

    What does "And is_site_admin the menu" mean?

    Why did you tell me that "The author left own links in a few places in css search for url and you'll see."

  9. dsader
    Member
    Posted 14 years ago #

    is_site_admin is located in wpmu-functions.php.

    Edit custom_menu_admin.php:
    if ( function_exists('add_options_page') || is_site_admin() )
    This will show/execute the options menu only for the site admin. No one else will.

    In some of the styles, the linked images were still linked to the author's site instead of the images folder that's all. You'll want to make sure the paths to images are your own paths and not hotlinks.

  10. Jshwaz44
    Member
    Posted 14 years ago #

    When I change *_option to *site_option, the plugin no longer displays in the options menu after I activate it. How do I make it show up?

  11. Jshwaz44
    Member
    Posted 14 years ago #

    You meant to replace *_options with *_site_options only in custom_admin_menu.php

    This doesn't solve the problem that the plugin doesn't work in wordpress mu. None of the ajax works correctly. You can't move any of the menu items. Clicking on the eye icon doesn't actually change anything.

  12. Jshwaz44
    Member
    Posted 14 years ago #

    Thanks for your help dsader, but I can't get this to work. Here is what to do with the code if anyone else comes across this issue

    under wp-admin/menu.php

    comment out menu options you don't want to show up with //

    ie. `//$menu[15] = array(__('Comments'), 'edit_posts', 'edit-comments.php');
    //$menu[20] = array(__('Blogroll'), 'manage_links', 'link-manager.php');`

    If you want these options to show up for the site admin but not for your users,

    under if( is_site_admin() ) {
    copy and paste the lines that you commented out. This will make them display only if your logged in as an admin.

  13. dsader
    Member
    Posted 14 years ago #

    Keep trying, I'll review what works for me:
    Unzip plugin to /plugins/
    Work carefully through custom_admin_menu.class.php and replace one at a time the *_options functions with *_site_options. You won't find any get_option or update_function funtions in custom_admin_menu.php

    To explain: a normal blog option has get_option, update_option, I replace those with get_site_option and update_site_option. The plugin works fine whether I edit these or not.

    A few other matches for _option exist so don't "replace all."

    BTW, I have a clean 1.2.4 install an the plugin installs fine out of the box. I apply the edits listed here to a working install and nothing is broke, before, during or after.

  14. demonicume
    Member
    Posted 14 years ago #

    Dsader, you've only added your edits or did you incorporate all of the listed edits here. well, i'm off to play with it. please knock before you enter.

  15. Jshwaz44
    Member
    Posted 14 years ago #

    I got the plugin to behave as your saying as far as appearing on the admin menu options, but I still can't get the plugin to operate correctly. not sure what is going on.

  16. ColourDreamer
    Member
    Posted 14 years ago #

    I don't see any of that in the class file though.

    ??

  17. ColourDreamer
    Member
    Posted 14 years ago #

    Oh there is no actual star.

  18. ColourDreamer
    Member
    Posted 14 years ago #

    Still this is all I see in the file...

    function display_options_page()

  19. ColourDreamer
    Member
    Posted 14 years ago #

    Um.... did you mean without the s?

  20. jalien
    Member
    Posted 14 years ago #

    The plugin works fine if I don't do any of the edits, but if I change all the get_option and update_option to get_site_option and update_site_option respectively in custom_admin_menu.class.php, then I just get a blank screen. What could I possibly be doing wrong? I have tried turning off all other plugins. This is on a 1.2.3 test setup.

    Also has anyone managed to get this to work with Yellowfish' drop down menus plugin. When custom menus is activated, then the drop down menus reverts to standard menus (mostly). Thanks.

  21. dsader
    Member
    Posted 14 years ago #

    I'm going backwards on if this is mu-able, although I was moving forward at times in early testing. A few days ago.

    I need to overcome the following:
    If another user, non site admin, activates a normal plugin, the menus revert to default with a message to fix the issue. Kinda defeats the purpose of conversion to site_options.

    Oh, well it was a start. I'm letting it rest in my TODO pile. Football's back.

    If anyone else takes this further, . . .. post it at wpmudev.org.

About this Topic