Howto make a plugin Lyceum friendly
The library is gearing up to have lots of blogs for the
librarians and we've installed lyceum to manage them all. It's a
great system but plugins for the main WP release don't always fit.
Same problem with WordpressMu.
I've learnt a couple of things looking at the SK2 plugin by
Dr Dave.
If the plugin uses the usual options stuff in the admin pages then
lyceum takes care of it and there is no problem.
If you need to know the blog Id at anytime in the plugin, there is
a global variable called '$blog' which is mighty handy.
The problems happen when the plugin does a query like getting all
the comments or getting all the posts. To do this it should use the
wordpress helper functions but in SK2 it wants to join with it's
own sk2_tables so the queries are in the plugin.
To work out which comments belong to the current blog you have to
join with the posts table and then the categories table with a
restriction on categories.blog='$blog'. Simple.
I'll post my modified SK2 plugin sometime when I finish it. Then
I'll be doing the same thing to
Live Spell Checker
- Login to post comments


Loading