Agreed. The way that WordPress does this is:
-- Auto Discovery -- Auto-discovery of extensions based on comments at the top of the php file. I think using a standard file name is a better idea. Basically you just FTP the directory into the plugins folder and it's found.
-- Install -- WP provides a simple roster that allows you to "activate" or deactivate" an extension. Each of those fires an action hook so that developers can do things like create DB tables and populate config values. Once a plugin has been activated, it's name is added to a global config array and on startup WP then knows which extensions to load.
-- Extension configuration - This happens via special admin pages that the developer can create and link into the navigation system. Configuration values can be stored in Wordpress's config table or your own (that's what we do)
To get going i think al that is needed is auto discovery and the Install GUI with associated hooks. Lets let developers worry about there own configuration storage at this point.
-P-
On Jun 22, 2007, at 7:34 AM, Brion Vibber wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Peter Adams wrote:
I'm wrapping up my next version of Open Web Analytics for MediaWiki (http://www.openwebanalytics.com) and wanted to inquire about plans for creating an extension management special page where admins could activate and deactivate extensions without modifying localSettings.php.
Something like this would greatly reduce the technical skill required to add extensions into the mix but more importantly would provide extension developers with a very handy "install" action hook that could be used to do things like create dependent database tables, etc. Right now one needs to run an extension install script to create the necessary db tables and then link into localsettings.php.
I would recommend this, but haven't got round to working on it at the moment.
What I'd like to see is a few things on a few levels:
- Hooks for the updaters (as run via update.php, etc) for enabled
extensions to do their thang.
- A friendlier post-install configuration / updater script to
supplement (or replace) config/index.php
- Autodiscovery information for extensions, so dropped-in extension
directories can be automatically listed and selected by such a configuration utility.
This could be little XML files or little comments in the php file or whatever. It may be worth examining WordPress for comparison.
What I would _not_ like to see is a tool that tries to download or physically install extensions from a remote location. IMHO that's too unreliable, especially given the vast array of configurations which can make it absurdly hard to a) download or b) install files via a PHP web script.
Having some extension configuration more 'built in' to the wiki interface might also be useful or interesting, but may be a separate issue.
- -- brion vibber (brion @ wikimedia.org)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGe93wwRnhpk1wk44RAqtXAKCxMl/ML6lTGne72a1mig7Q+rU6wgCg001x cyz5Do6Vs2cNLUPx2U4eFFI= =w04q -----END PGP SIGNATURE-----
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/wikitech-l