StatusNet URL shortening plugin updated

I’ve pulled in some fixes from one of my old experimental branches which gets StatusNet‘s URL shortener plugin working again.

Some while ago, changed to requiring an API key for all shortening requests, which broke our old BitlyUrlPlugin.

The updated version now in master & 0.9.x branches allows setting sitewide credentials, either through the addPlugin() parameters or in the admin panels on the site:

If no credentials are set up, then isn’t offered as a shortening service to end-users; if they are set up then the global keys are used for all requests. Settings in the admin panel will override those in the addPlugin() parameters; this allows setting a default for a big hosted site farm like *, while individual sites can customize their settings to make use of the statistic tracking features or custom domains that pro accounts offer.

It would be nice to further add a per-user override, but a little refactoring on the ‘other settings’ panel is needed to keep everything together in one place.

This isn’t available on hosted sites just yet, but it should be coming soon!