The MU forums have moved to WordPress.org

Plugin Commander 1.1.0 (29 posts)

  1. omry
    Member
    Posted 15 years ago #

    WPMU Plugin-Commander (http://firestats.cc/wiki/WPMUPluginCommander) is a plugin management plugin for WPMU, released under GPL.
    It allow you to do the following things:

    * Mark any plugin in the plugins directory to be automatically activated for new blogs.
    * Mass activate or deactivate a plugin for all existing blogs
    * Choose which plugins users can activate and deactivate through Manage->Plugins, for this to make sense you need to disable the built-in plugins menu (through Site Admin->Options->Menus)

    New in 1.1.0:
    * Now less ugly!
    * Internationalization ready
    * Russian translation
    All changes contributed by Anna Ozeritskaya (Thanks!).

  2. demonicume
    Member
    Posted 15 years ago #

    yay, i can't wait to try it out

  3. andrea_r
    Moderator
    Posted 15 years ago #

    "New in 1.1.0:
    * Now less ugly!"

    Awesome! :D

  4. Ovidiu
    Member
    Posted 15 years ago #

    :-) nice, works as expected, and indeed: less ugly

  5. demonicume
    Member
    Posted 15 years ago #

    much cleaner bro.very awesome.

  6. awarner20
    Member
    Posted 15 years ago #

    Very cool! Is it safe to just overwrite my existing plugin commander file?

  7. DailyTestimony
    Member
    Posted 15 years ago #

    you forgot something new, or well either that or before this I didn't for whatever reason have a current version.

    But before when I went to a users Manage->Plugins I could only control the plugins the user could control, now I can control them now. Which actually negates the need for a couple of plugins I write in the last few days but oh well they were simple work-arounds.

    I do like the new one, it looks alot nicer.

    I myself think it could be better if it looked more like the normal plugins menu, and if it replaced the built-in plugins menu with a top-level tab, preferably over to the right on the new admin panel like the built in one if possible. So the users wouldn't even be able to tell it's not the normal plugins menu. At the verry least move it from a sub tab or manage, as it is now users who move from their own WP install or another WPMU that dosn't use plugn commander would be looking elsewhere to manage their plugins.

  8. boonika
    Member
    Posted 15 years ago #

    How to upgrade?

  9. Farms
    Member
    Posted 15 years ago #

    Very nice, we're big Plugin Commander fans over at Edublogs Campus :)

    Thanks for the update!

  10. MrBrian
    Member
    Posted 15 years ago #

    If you'd like plugin commander's menu to be where the built-in plugin's menu usually is, here is how you can modify it:

    On line 27, change edit.php to plugins.php

    Paste this code right after line 31
    global $menu;
    $menu[35][2] = PC_PLUGINS_CMD_BASE;

    Presto, the plugins menu at the top right links to plugin commander's list. Make sure you have the plugins menu turned on in Site Admin->Options.

  11. omry
    Member
    Posted 15 years ago #

    DailyTestimony, That was added in version 1.0.3, check the changelog at the wiki page I linked to.

    boonika : just extract the archive straight into mu-plugins.

    Mr Brain: Cool, I`ll try that soon.

    Finally, everyone : I created a post about WPMU Plugin commander at the plugins competition, please rate Plugin commander at the post:
    http://weblogtoolscollection.com/pluginblog/2008/06/22/wpmu-plugin-commander/

    Thanks.

  12. DailyTestimony
    Member
    Posted 15 years ago #

    nice hack MrBrian.

  13. MrBrian
    Member
    Posted 15 years ago #

    5 stars from me.

  14. andrea_r
    Moderator
    Posted 15 years ago #

    I thought the plugin competition was for brand new plugins, not updates to pre-exisiting ones.

  15. lunabyte
    Member
    Posted 15 years ago #

    That was my understanding, to produce new plugin development and ideas.

  16. Farms
    Member
    Posted 15 years ago #

    I reckon anything that hasn't previously been entered should be cool though (not that anyone except WTC makes up the rules) - I thought it was also to reward plugin makers?

  17. DailyTestimony
    Member
    Posted 15 years ago #

    MrBrian the only problem(s) I see in testing that hack is:

    1) The plugins are managed at wp-admin/plugins.php?page=Plugins not the end of the world and a verry small issue but it seems it might be because of this that the plugins tab does not appear as "active" when you are there.

    2) This is the real problem, user just have to removed the ?page=Plugins from the url to goto wp-admin/plugins.php and get control of all plugins

    I would prefer myself a plugins menu there for this but not if these issues exist, mainly issue 2 I am annoyed by 1 slightly but I could learn to get over it.

  18. dsader
    Member
    Posted 15 years ago #

    DailyTestimony, I changed the home from plugins.php to admin.php and added a redirect for the plugins.php . . .

    define('PC_PLUGINS_HOME','admin.php');
    function ds_plugins_closed () {
    if(!is_site_admin() && strpos($_SERVER['REQUEST_URI'], 'plugins.php'))
    {
    header('Location: ' . get_settings('siteurl') . '/wp-admin/'.PC_PLUGINS_CMD_BASE);
    }
    }
    add_action('admin_head', 'ds_plugins_closed');
  19. MrBrian
    Member
    Posted 15 years ago #

    Thank DailyTestimony, i didn't notice either of those and i feel the same way. Took me awhile to work this out, but using dsaders redirect and some tinkering, i solved both the issues. These are the revised instructions, so remove whatever changes you've made:

    On line 27, change edit.php to admin.php.

    Paste this code right after line 31
    global $parent_file;
    $parent_file = 'plugins.php';

    And paste dsader's code right after line 28

    function ds_plugins_closed () {
    if(!is_site_admin() && strpos($_SERVER['REQUEST_URI'], 'plugins.php'))
    {
    header('Location: ' . get_settings('siteurl') . '/wp-admin/'.PC_PLUGINS_CMD_BASE);
    }
    }
    add_action('admin_head', 'ds_plugins_closed');

  20. DailyTestimony
    Member
    Posted 15 years ago #

    nice, at first I thought I did something wrong then I noticed dsader's code was setup to have admins view the usual plugins page.

    I'm glad you found those annoying too, after I posted I thought I was probably getting a bit too picky about the plugins tab not being "active".

    I think since you worked so hard on that, I can do the work to make the PC menu look more like the regular plugin menu visually. I won't be as quick as you were with this by any means but I'll get it done and share the modification if anyone else wants to make PC look more like the regular plugins menu.

  21. jamescollins
    Member
    Posted 15 years ago #

    Thanks omry!

    I've upgraded our WPMu installation from 1.0.1 to 1.1.0, and everything seems to be working fine.

    It looks a lot better too.

    Thanks.

  22. dsader
    Member
    Posted 15 years ago #

    DailyTestimony,

    Here's the full PC code I've mashed, it has a few design changes, most based on(copy/pasted) from the default plugins.php.

    http://pastebin.com/m73c3c22d

  23. DailyTestimony
    Member
    Posted 15 years ago #

    Dang dsader, beat me to it, and it didn't take me long once I started. Of course I cheated, I hacked Plugins.php to only display plugins that are set for user control unless you're a site admin. It only took 3 lines.

    I also added another 3 lines that added "(admin)" to the end of the title for plugins that only admin can manage to set them apart.

    To prevent plugin from showing to users unless they are set to user control:

    Find

    foreach($plugins as $plugin_file => $plugin_data) {
    		$action_links = array();

    Add Before
    $user_control = explode(',',get_site_option('pc_user_control_list'));

    Add After

    $user_controls = in_array($plugin_file, $user_control);
                    if (!is_site_admin() && !$user_controls) continue;

    To add the "(admin)" to plugins only the site admin can control:

    Find
    $author = ( empty($plugin_data['Author']) ) ? '' : ' <cite>' . sprintf( __('By %s'), $plugin_data['Author'] ) . '.</cite>';

    Add After

    if(!$user_controls) {
                            $plugin_data['Title'] = $plugin_data['Title'] . " (admin)";
                    }
  24. MrBrian
    Member
    Posted 15 years ago #

    I spent a few hours putting together my own mashup :). It's now a lot more like the original plugins page with the recently activated plugins and matching color scheme and text. I also changed the under user control indication from the grey background to a red star in front of the name instead. It also includes the mods that make it use the original Plugin menu spot. It's based on the latest version of PC and I think it's an overall improvement.

    http://pastebin.com/m65528fa6

  25. DailyTestimony
    Member
    Posted 15 years ago #

    Nice mod MrBrian, I myself will stick with my core hack even though I'll have to redo it every update, I have more complicated core hacks I have to redo, that customize the inital blogroll and first comment.

    Altough I like the red star idea, I think I might change my indicator.

  26. MrBrian
    Member
    Posted 15 years ago #

    You know, i have plugin code that will change the blogroll for new blogs :P. and changing the first comment could be added with 1 query to it. I used to have lots of hacks in my core, but it became a lot to deal with each upgrade, especially since i love trac. Being hack free will save you tons of time.

  27. DailyTestimony
    Member
    Posted 15 years ago #

    yeah let it do it's thing then do an update query...I'm just lazy I guess.

  28. DailyTestimony
    Member
    Posted 15 years ago #

    Side effect of your code MrBrian, when I view a page added by another plugin, the Plugins tab is "active", ex goto Site Admin->Plugin Commander and the plugins tab will be "active" and not site admin.

    The fix is to change

    global $parent_file;
    $parent_file = 'plugins.php';

    to

    if ($_GET['page'] == 'Plugins'){
    global $parent_file;
    $parent_file = 'plugins.php';
    }
  29. MrBrian
    Member
    Posted 15 years ago #

    Good spot, thanks!

About this Topic