summaryrefslogtreecommitdiff
path: root/plugins/TwitterBridge/TwitterBridgePlugin.php
diff options
context:
space:
mode:
authorJulien C <chaumond@gmail.com>2009-12-08 22:16:03 +0100
committerZach Copley <zach@status.net>2010-01-26 00:18:11 -0800
commit7fc5588c5dfc0a74cbc1c791bc445e399207c443 (patch)
tree75dcac612bc71977f61112d1ca7acc608362a4b5 /plugins/TwitterBridge/TwitterBridgePlugin.php
parent655573c213113861cfd82a42ef999dde1aeea149 (diff)
Allow logging in using Twitter
Signed-off-by: Julien C <chaumond@gmail.com>
Diffstat (limited to 'plugins/TwitterBridge/TwitterBridgePlugin.php')
-rw-r--r--plugins/TwitterBridge/TwitterBridgePlugin.php26
1 files changed, 26 insertions, 0 deletions
diff --git a/plugins/TwitterBridge/TwitterBridgePlugin.php b/plugins/TwitterBridge/TwitterBridgePlugin.php
index 57b3c1c99..e39ec7be0 100644
--- a/plugins/TwitterBridge/TwitterBridgePlugin.php
+++ b/plugins/TwitterBridge/TwitterBridgePlugin.php
@@ -72,9 +72,34 @@ class TwitterBridgePlugin extends Plugin
$m->connect('twitter/authorization',
array('action' => 'twitterauthorization'));
$m->connect('settings/twitter', array('action' => 'twittersettings'));
+
+ $m->connect('main/twitterlogin', array('action' => 'twitterlogin'));
return true;
}
+
+
+
+ /*
+ * Add a login tab for Twitter Connect
+ *
+ * @param Action &action the current action
+ *
+ * @return void
+ */
+ function onEndLoginGroupNav(&$action)
+ {
+
+ $action_name = $action->trimmed('action');
+
+ $action->menuItem(common_local_url('twitterlogin'),
+ _('Twitter'),
+ _('Login or register using Twitter'),
+ 'twitterlogin' === $action_name);
+
+ return true;
+ }
+
/**
* Add the Twitter Settings page to the Connect Settings menu
@@ -108,6 +133,7 @@ class TwitterBridgePlugin extends Plugin
switch ($cls) {
case 'TwittersettingsAction':
case 'TwitterauthorizationAction':
+ case 'TwitterloginAction':
include_once INSTALLDIR . '/plugins/TwitterBridge/' .
strtolower(mb_substr($cls, 0, -6)) . '.php';
return false;