Transfer Plugin Order and Settings

Our project needs a mechanism for transferring plugin order and settings from one installation to another. I seem to recall seeing a plugin for this somewhere some time ago... but for the life of me cannot recall where. Is there such a plugin out there that someone can point me towards? I'd be happy to upgrade a older plugin from previous versions and make it available if there is interest.

Anyone have thoughts on what this will entail? It's on my todo list to research for this weekend...

  • I've found an older plugin for 1.6 from Milan. Seems like a good starting point. I've also found a reference to a plugin called Transfer by Brett - but have not found it yet... I'll nose around his gitHub repo... Anyone have any experience with either of these?

  • Found Brett's transfer_plugins at gitHub. Looks like he is woring to upgrade it to 1.8...

  • The mechanism for determining plugin order changed in 1.8, so any previous plugin won't work or really be a useful starting point I'm afraid.

  • Matt,

    I am unfamiliar with pre-elgg 1.8 plugins and settings. I cannot find much documentation besides the code to get a handle on the current scheme. Brett's export code is as follows:

    function transfer_plugins_export() {
        // metadata
       $info = array(
           'elgg_version' => get_version(true),
           'elgg_release' => get_version(false),
           'transfer_plugins_format' => TRANSFER_PLUGINS_FORMAT
        );
       $info['plugins'] = array();
       $plugins = elgg_get_plugins('all');
       foreach ($plugins as $plugin) {
           $plugin_info = array(
               'id' => $plugin->getID(),
               'version' => $plugin->getManifest()->getVersion(),
               'active' => (bool) $plugin->isActive(),
               'settings' => $plugin->getAllSettings(),
               'priority' => $plugin->getPriority()
           );
           $plugin_order[$plugin->getPriority() * 10] = $plugin->getID();
           $info['plugins'][] = $plugin_info;
       }
       $info['17_pluginorder'] = serialize($plugin_order);
       return serialize($info);
    }

    All the calls seem compatible with Elgg 1.8 - but I'm not clear on the line "$plugin_order[$plugin->getPriority() * 10] = $plugin->getID();". It looks correct... but it's what I don't know that worries me...

    James
  • That all looks correct, that line is for back compatibility with 1.7, presumably he has an import function that can go from 1.7 => 1.8 or 1.8 => 1.8

    can't hurt to test it out

  • Hi Jimmy,

    I'm working in this plugin: https://github.com/lowfill/elgg_default_plugin_order

    That allows to store the default plugin order via a configuration file. This plugin is in beta but could be used in production.

    I'm planning to add the ability to store plugin configurations too. 

    If you want to help with code and/or ideas fork the project on github.

     

  • @Diego: donde tu escondide hasta ahora ? no veo mucho tiempo ;) desde antes yo tratar aprende poco mas espanol ;-oO   salud y suerte!

  • Diego - Thanks for the info. I'll have a look at it. I'm currently looking at a plugin Brett authored called transfer_plugins. It was initially written for 1.7 but he has recently updated it to 1.8. I have it installed and have exported plugin settings / order / priority. So far it looks good. I will be testing import over the weekend or early next week. I'll post my the results of my tests here sometime next week. I found his code at his gitHub account.

  • You may be interrested in this plugin:

    http://community.elgg.org/plugins/1114351/1/vazco-plugin-manager

    It allows to transfer order but not settings. We also have a plugin that transfers settings and order between Elgg installs with use of our intranet server, although I don't want to post it in public. In case you want a copy to rebuild it and release publicly, please send me a note.