From d07c9d87504c3909466e2c99a1265af15aba3c3d Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Wed, 21 Oct 2009 01:07:03 +0000 Subject: Gather all the Facebook stuff together in one place --- plugins/Facebook/FBConnectLogin.php | 67 +++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 plugins/Facebook/FBConnectLogin.php (limited to 'plugins/Facebook/FBConnectLogin.php') diff --git a/plugins/Facebook/FBConnectLogin.php b/plugins/Facebook/FBConnectLogin.php new file mode 100644 index 000000000..5696d8848 --- /dev/null +++ b/plugins/Facebook/FBConnectLogin.php @@ -0,0 +1,67 @@ +. + */ + +if (!defined('STATUSNET') && !defined('LACONICA')) { + exit(1); +} + +require_once INSTALLDIR . '/plugins/FBConnect/FBConnectPlugin.php'; + +class FBConnectLoginAction extends Action +{ + function handle($args) + { + parent::handle($args); + + if (common_is_real_login()) { + $this->clientError(_('Already logged in.')); + } + + $this->showPage(); + } + + function getInstructions() + { + return _('Login with your Facebook Account'); + } + + function showPageNotice() + { + $instr = $this->getInstructions(); + $output = common_markup_to_html($instr); + $this->elementStart('div', 'instructions'); + $this->raw($output); + $this->elementEnd('div'); + } + + function title() + { + return _('Facebook Login'); + } + + function showContent() { + + $this->elementStart('fieldset'); + $this->element('fb:login-button', array('onlogin' => 'goto_login()', + 'length' => 'long')); + + $this->elementEnd('fieldset'); + } + +} -- cgit v1.2.3-54-g00ecf