[wp-hackers] Plugins and network activations
peter.westwood at ftwr.co.uk
Wed Jun 29 15:05:42 UTC 2011
On 29 Jun 2011, at 15:50, Mike Schinkel wrote:
> On Jun 29, 2011, at 5:58 AM, Peter Westwood wrote:
>> If we for example take the example of a "subscribe to comments" plugin in a multisite install a table per blog is probably wrong for a number of reasons:
>> 1) You can't do anything clever like digesting all emails across all blogs easily
>> 2) You can't provide a single manage my subscriptions UI if the data is sharded across every blog's tables.
>> In a large install some data needs to be sharded and some needs to be global which is exactly what WordPress itself does - some of the tables in a multisite install are global - users, usermeta, ...
> That make perfect sense. Yes, some data should definitely be global.
> But by the same token won't you agree that some should be site-specific, i.e. a post relationships table or a table for taxonomy meta, for example?
If they contain data you don't want to access globally and don't fit the current schema then yes.
I would recommend that any plugin that relies on them is written to do something along the following lines:
1) Create the tables in single site when activated.
2) Create the tables when a new blog is created in multisite
3) Comes with an example script to go back and create the tables for pre-existing multisite blogs.
It just doesn't make sense to try and do the table creation at the point of network activation.
http://blog.ftwr.co.uk | http://westi.wordpress.com
50BF A954 E072 23DB B50A A319 56C3 8FFF 9C72 AB79
More information about the wp-hackers