On 02/01/2010 01:33 PM, Brion Vibber wrote:
Multiple instantiations of a single plugin seem to be very confusing
for people. Most of the time it'll be by accident, such as when when
sticking an 'addPlugin' into config.php when the plugin's already in
the defaults array.
Things like OpenID will double up links, tabs, and explanatory text
when loaded twice; others might process things twice or otherwise act
very... unexpectedly.
Unfortunately we currently use multiple instantiations for things like
the URL shorteners, where LilUrlPlugin needs to be set up several
times in a row to support multiple services.
As an experiment, I've whipped up a refactor of the URL shorteners so
all our defaults can be handled within one plugin, instantiated once:
http://www.gitorious.org/~brion/statusnet/brion-fixes/commit/70ac96ed26af1e062fc36e865e12c35c99831ba3
Additional shorteners that work the same way can be added to the single
instance of the UrlShortenerPlugin, or can be done as one-off subclasses
which also do fancier things; I set up the BitlyPlugin to support
bit.ly's current API which requires an API key, as a server-side
configuration which can be passed into addPlugin().
If this seems reasonably sane we can go ahead and commit that and as
time permits whip up an admin panel UI to disable/enable individual
shorteners.
-- brion
_______________________________________________
StatusNet-dev mailing list
[email protected]
http://lists.status.net/mailman/listinfo/statusnet-dev