summaryrefslogtreecommitdiff
path: root/lib/facebookaction.php
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2008-12-07 20:54:12 -0500
committerZach Copley <zach@controlyourself.ca>2008-12-07 20:54:12 -0500
commit1a8869424b9640a1d6a689e7882f04c757f78b38 (patch)
treecd64701edf5d2431556a20ba2ab3a205b9beb4eb /lib/facebookaction.php
parente35f40528b8d3ed4c2239a558e9f6f42b8f19271 (diff)
trac750 Use Facebook dialogs for success and error messages during initial setup / login
darcs-hash:20081208015412-7b5ce-c899a3b743621f7d003b93f383b78a2c8ba9fb52.gz
Diffstat (limited to 'lib/facebookaction.php')
-rw-r--r--lib/facebookaction.php56
1 files changed, 53 insertions, 3 deletions
diff --git a/lib/facebookaction.php b/lib/facebookaction.php
index 8872934aa..d5f0adbb8 100644
--- a/lib/facebookaction.php
+++ b/lib/facebookaction.php
@@ -33,6 +33,56 @@ class FacebookAction extends Action {
return new Facebook($apikey, $secret);
}
+ function update_profile_box($facebook, $fbuid, $user) {
+
+ $notice = $user->getCurrentNotice();
+
+ # Need to include inline CSS for styling the Profile box
+
+ $style = '<style>
+ #notices {
+ clear: both;
+ margin: 0 auto;
+ padding: 0;
+ list-style-type: none;
+ width: 600px;
+ border-top: 1px solid #dec5b5;
+ }
+ #notices a:hover {
+ text-decoration: underline;
+ }
+ .notice_single {
+ clear: both;
+ display: block;
+ margin: 0;
+ padding: 5px 5px 5px 0;
+ min-height: 48px;
+ font-family: Georgia, "Times New Roman", Times, serif;
+ font-size: 13px;
+ line-height: 16px;
+ border-bottom: 1px solid #dec5b5;
+ background-color:#FCFFF5;
+ opacity:1;
+ }
+ .notice_single:hover {
+ background-color: #f7ebcc;
+ }
+ .notice_single p {
+ display: inline;
+ margin: 0;
+ padding: 0;
+ }
+ </style>';
+
+ $html = $this->render_notice($notice);
+
+ $fbml = "<fb:wide>$content $html</fb:wide>";
+ $fbml .= "<fb:narrow>$content $html</fb:narrow>";
+
+ $fbml_main = "<fb:narrow>$content $html</fb:narrow>";
+
+ $facebook->api_client->profile_setFBML(NULL, $fbuid, $fbml, NULL, NULL, $fbml_main);
+ }
# Display methods
@@ -180,14 +230,14 @@ class FacebookAction extends Action {
return $html;
}
-
+
function pagination($have_before, $have_after, $page, $fbaction, $args=NULL) {
$html = '';
if ($have_before || $have_after) {
$html = '<div id="pagination">';
- $html .'<ul id="nav_pagination">';
+ $html .'<ul id="nav_pagination">';
}
if ($have_before) {
@@ -225,5 +275,5 @@ class FacebookAction extends Action {
return "$fbaction?${extra}";
}
-
+
}