Create upstream patch for WP Shadowbox plugin
Dom - In https://github.com/castiron/cac/commit/91cd47ba019eca8ed435c2c8dbae37e023d3a437 and https://github.com/castiron/cac/commit/67fa2e021ab73eab5f99f97c4d291c8f5aa4a489 you updated the WP Shadowbox plugin to use a shared copy of the library files, to avoid permissions errors and redundancy on multisite installations like ours. I would like to package a version of these changes into a patch that we can then send along to sivel, the plugin author.
The basic strategy should remain the same: on multisite, look for a shared library location (wp-content/shared_lib is fine with me, though perhaps 'lib' rather than 'shared_lib' would be a bit more predictable). But a few additional things would make the patch even better suited for the distribution plugin:
1) More graceful fallbacks. Instead of requiring that the shared lib be used in multisite, instead you should first try to use the shared_lib (maybe using file_exists()), and then fall back to the default blogs.dir location if it can't be found. Alternatively, because doing this check on every pageload requires some overhead, you might consider an admin setting that appears when multisite is enabled. Not sure what that would look like. Think about it and tell me if you have any brilliant ideas :)
2) Consider abstracting the library location. Right now it's scattered in a couple places through the plugin, but could easily be abstracted to a single method of the main plugin class.
3) Use apply_filters() just before returning the library location, so that admins can have total control over the location (eg, if they have a preferred location for storing shared library files in their MS installation).
To make the patch properly, get an svn checkout of the plugin http://plugins.svn.wordpress.org/shadowbox-js/trunk/ on a clean WP install. Then use svn diff to generate a patch file.
This is low priority. Do it when you have a few minutes downtime :)