[wp-hackers] MU-compatbility with custom plugin tables?

Derek Hogue derek at amphibian.info
Tue Dec 1 14:48:11 UTC 2009


Thanks for the idea guys, that should do me.  Glenn's suggestion seems
the quickest and simplest.

Best,
Derek

On Nov 30, 10:08 pm, Glenn Ansley <gl... at glennansley.com> wrote:
> I would create a flag for each blog (maybe the blog options table)
> each time a blog used your plugin for the first time.
> On first use, use dbdelta to create the table.
>
> Glenn Ansleyhttp://fullthrottledevelopment.comhttp://twitter.com/glennansley
>
>
>
>
>
> On Mon, Nov 30, 2009 at 8:28 PM, Austin Matzko <if.webs... at gmail.com> wrote:
> > On Mon, Nov 30, 2009 at 7:19 PM, Derek Hogue <de... at amphibian.info> wrote:
> >> Thanks for that Austin, that's good to know - though, that's not
> >> exactly what I was looking for.  I do need everyone using their own
> >> tables, as they'll be posting their own list of shows.
>
> >> So, current behavior in terms of inserting data is fine - it's looking
> >> for the tables that I *want* to be there.  But since GigPress is
> >> installed in 'mu-plugins', blog users never activate the plugin, so
> >> their own set of tables never get installed.
>
> >> I suppose I could do a quick 'SHOW tables LIKE' check on admin_init to
> >> see if the tables are there, and if not, install them, but that seems
> >> excessive.
>
> > You might check for MU and disable functionality (with an admin
> > warning message for site admins) until the site admin runs a setup
> > script that creates all tables.  In that case it would be only a check
> > for a single option marking whether installation has completed.
>
> > From that point forward you could trigger table creation whenever
> > someone creates a new blog.
> > _______________________________________________
> > wp-hackers mailing list
> > wp-hack... at lists.automattic.com
> >http://lists.automattic.com/mailman/listinfo/wp-hackers
>
> _______________________________________________
> wp-hackers mailing list
> wp-hack... at lists.automattic.comhttp://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list