WP Hive » Troubleshooting and How-To

New question - shared plugins

(4 posts)

Tags:


  1. wwday3
    Member

    This is similar - but a little different - than the question regarding "personal" templates.

    Is there a way for all "hived" domains to share a single instance of a plugin? The specific plugin in question is the Article Templates plugin. It only makes sense for all of the sites to share in something that for all intents should be setup just once.

    At first glance, it seems like it should be fairly simple. Let's say your initial install is using the prefix 'AA' in the database. To share the plugin, the all sub-sites should use the 'AA' version of the file (of which there should be only one). I could edit the plugin and "force" it to use the 'AA' version, but that seems dicey to me. Is there an easier way?

    Now, let's say I do have to edit the plugin and hard-code the access to the tables involved. Can I somehow rename the plugin to something like "My Article Templates"? How does one go about doing something like that in WP? (I can think of many more plugins like this...)

    Posted 2 years ago #
  2. tacitus
    Member

    The problem with modding the plugin yourself is that you don't always know where the plugin is getting its settings from. My plugin (AZIndex) uses its own table, but also stores some information in the main options table. This could get messy very fast if you don't find all the places a plugin stores its information.

    I think the only way you can really do something like is for WP-Hive to provide plugin writers with a way to make plugins "WP-Hive aware" -- provide them with a some of functions they can use to set up the sharing of settings. Could be difficult to do, though.

    Posted 2 years ago #
  3. ikailo
    Developer

    I agree with tacitus. It's not going to be easy to make this work.

    WordPress advocates and strongly suggests that developers use the $wpdb->prefix notation when creating and accessing tables, effectivley preventing any sharing accross sites. Changing this is not really a viable option at this point.

    Alternatively, we might get around it if there were way to decipher which options in the wp-options table are core, and which are from plugins. Again, very dicey in the implementation.

    On a positive note, the next version of WP Hive will have a pretty robust API that should help with allowing other plugins to better support WP Hive. Will be interesting to see if it catches on..

    Posted 2 years ago #
  4. ikailo
    Developer

    FYI, if you want to change the properties on the plugin, do so in the header of the main plugin file.

    You can change the name (you might also need to change the filename and folder name). Or, if you want to prevent it from auto-updating, you could just set the current version property to something astronomical like 10000.

    Posted 2 years ago #

RSS feed for this topic

Reply

You must log in to post.