summaryrefslogtreecommitdiff
path: root/plugins/FBConnect/FBConnectPlugin.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-08-24 16:55:49 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-08-24 16:55:49 -0400
commitff87732053bae38879988ba7d002a294998ccb4e (patch)
treeccccfe7fc8976baf1f0cd4438a57bf817dc4052c /plugins/FBConnect/FBConnectPlugin.php
parent27aeba01dd366f15f7847267b7518fb873987ddb (diff)
parentf3cdc7f272e409d391979d3e6c58dd63573530c0 (diff)
Merge branch '0.8.x' into testing
Conflicts: actions/twitterauthorization.php lib/oauthclient.php lib/twitter.php lib/twitterapi.php lib/twitteroauthclient.php scripts/twitterstatusfetcher.php
Diffstat (limited to 'plugins/FBConnect/FBConnectPlugin.php')
-rw-r--r--plugins/FBConnect/FBConnectPlugin.php31
1 files changed, 12 insertions, 19 deletions
diff --git a/plugins/FBConnect/FBConnectPlugin.php b/plugins/FBConnect/FBConnectPlugin.php
index 6788793b2..c1bd1c094 100644
--- a/plugins/FBConnect/FBConnectPlugin.php
+++ b/plugins/FBConnect/FBConnectPlugin.php
@@ -82,9 +82,7 @@ class FBConnectPlugin extends Plugin
$action->extraHeaders();
- $action->startXML('html',
- '-//W3C//DTD XHTML 1.0 Strict//EN',
- 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd');
+ $action->startXML('html');
$language = $action->getLanguage();
@@ -118,13 +116,13 @@ class FBConnectPlugin extends Plugin
// but we actually do, for IE and Safari. Gar.
$html = sprintf('<script type="text/javascript">
- window.onload = function () {
+ $(document).ready(function () {
FB_RequireFeatures(
["XFBML"],
function() {
FB.init("%s", "../xd_receiver.html");
}
- ); }
+ ); });
function goto_login() {
window.location = "%s";
@@ -146,11 +144,7 @@ class FBConnectPlugin extends Plugin
function onEndShowFooter($action)
{
if ($this->reqFbScripts($action)) {
-
- $action->element('script',
- array('type' => 'text/javascript',
- 'src' => 'http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php'),
- '');
+ $action->script('http://static.ak.connect.facebook.com/js/api_lib/v0.4/FeatureLoader.js.php');
}
}
@@ -158,10 +152,7 @@ class FBConnectPlugin extends Plugin
{
if ($this->reqFbScripts($action)) {
-
- $action->element('link', array('rel' => 'stylesheet',
- 'type' => 'text/css',
- 'href' => common_path('plugins/FBConnect/FBConnectPlugin.css')));
+ $action->cssLink('plugins/FBConnect/FBConnectPlugin.css');
}
}
@@ -223,7 +214,7 @@ class FBConnectPlugin extends Plugin
$fbuid = $facebook->get_loggedin_user();
} catch (Exception $e) {
- common_log(LOG_WARNING,
+ common_log(LOG_WARNING, 'Facebook Connect Plugin - ' .
'Problem getting Facebook user: ' .
$e->getMessage());
}
@@ -351,7 +342,7 @@ class FBConnectPlugin extends Plugin
}
function onStartLogout($action)
- {
+{
$action->logout();
$fbuid = $this->loggedIn();
@@ -360,8 +351,9 @@ class FBConnectPlugin extends Plugin
$facebook = getFacebook();
$facebook->expire_session();
} catch (Exception $e) {
- common_log(LOG_WARNING, 'Could\'t logout of Facebook: ' .
- $e->getMessage());
+ common_log(LOG_WARNING, 'Facebook Connect Plugin - ' .
+ 'Could\'t logout of Facebook: ' .
+ $e->getMessage());
}
}
@@ -385,7 +377,8 @@ class FBConnectPlugin extends Plugin
}
} catch (Exception $e) {
- common_log(LOG_WARNING, "Facebook client failure requesting profile pic!");
+ common_log(LOG_WARNING, 'Facebook Connect Plugin - ' .
+ "Facebook client failure requesting profile pic!");
}
return $url;