diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Facebook/FacebookPlugin.php | 2 | ||||
-rw-r--r-- | plugins/GeonamesPlugin.php | 24 | ||||
-rw-r--r-- | plugins/OpenID/OpenIDPlugin.php | 2 | ||||
-rw-r--r-- | plugins/TemplatePlugin.php | 2 | ||||
-rw-r--r-- | plugins/TwitterBridge/README | 3 | ||||
-rw-r--r-- | plugins/TwitterBridge/TwitterBridgePlugin.php | 4 |
6 files changed, 30 insertions, 7 deletions
diff --git a/plugins/Facebook/FacebookPlugin.php b/plugins/Facebook/FacebookPlugin.php index fc3adcfad..b68534b24 100644 --- a/plugins/Facebook/FacebookPlugin.php +++ b/plugins/Facebook/FacebookPlugin.php @@ -58,7 +58,7 @@ class FacebookPlugin extends Plugin * @return boolean hook return */ - function onRouterInitialized(&$m) + function onRouterInitialized($m) { // Facebook App stuff diff --git a/plugins/GeonamesPlugin.php b/plugins/GeonamesPlugin.php index 745cd4126..80ef44cc9 100644 --- a/plugins/GeonamesPlugin.php +++ b/plugins/GeonamesPlugin.php @@ -278,4 +278,28 @@ class GeonamesPlugin extends Plugin return true; } + + /** + * Human-readable name for a location + * + * Given a location, we try to retrieve a geonames.org URL. + * + * @param Location $location Location to get the url for + * @param string &$url Place to put the url + * + * @return boolean whether to continue + */ + + function onLocationUrl($location, &$url) + { + if ($location->location_ns != self::NAMESPACE) { + // It's not one of our IDs... keep processing + return true; + } + + $url = 'http://www.geonames.org/' . $location->location_id; + + // it's been filled, so don't process further. + return false; + } } diff --git a/plugins/OpenID/OpenIDPlugin.php b/plugins/OpenID/OpenIDPlugin.php index 560da71e7..81e3ed9c4 100644 --- a/plugins/OpenID/OpenIDPlugin.php +++ b/plugins/OpenID/OpenIDPlugin.php @@ -62,7 +62,7 @@ class OpenIDPlugin extends Plugin * @return boolean hook return */ - function onRouterInitialized(&$m) + function onRouterInitialized($m) { $m->connect('main/openid', array('action' => 'openidlogin')); $m->connect('settings/openid', array('action' => 'openidsettings')); diff --git a/plugins/TemplatePlugin.php b/plugins/TemplatePlugin.php index cfa051162..5f3ad81f5 100644 --- a/plugins/TemplatePlugin.php +++ b/plugins/TemplatePlugin.php @@ -32,7 +32,7 @@ class TemplatePlugin extends Plugin { // capture the RouterInitialized event // and connect a new API method // for updating the template - function onRouterInitialized( &$m ) { + function onRouterInitialized( $m ) { $m->connect( 'template/update', array( 'action' => 'template', )); diff --git a/plugins/TwitterBridge/README b/plugins/TwitterBridge/README index 09352188e..d3bcda598 100644 --- a/plugins/TwitterBridge/README +++ b/plugins/TwitterBridge/README @@ -11,8 +11,7 @@ Installation To enable the plugin, add the following to your config.php: - require_once(INSTALLDIR . '/plugins/TwitterBridge/TwitterBridgePlugin.php'); - $tb = new TwitterBridgePlugin(); + addPlugin("TwitterBridge"); OAuth is used to to access protected resources on Twitter (as opposed to HTTP Basic Auth)*. To use Twitter bridging you will need to register diff --git a/plugins/TwitterBridge/TwitterBridgePlugin.php b/plugins/TwitterBridge/TwitterBridgePlugin.php index e69567fc7..ad3c2e551 100644 --- a/plugins/TwitterBridge/TwitterBridgePlugin.php +++ b/plugins/TwitterBridge/TwitterBridgePlugin.php @@ -60,12 +60,12 @@ class TwitterBridgePlugin extends Plugin * * Hook for RouterInitialized event. * - * @param Net_URL_Mapper &$m path-to-action mapper + * @param Net_URL_Mapper $m path-to-action mapper * * @return boolean hook return */ - function onRouterInitialized(&$m) + function onRouterInitialized($m) { $m->connect('twitter/authorization', array('action' => 'twitterauthorization')); |