summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2008-12-07 18:59:25 -0500
committerZach Copley <zach@controlyourself.ca>2008-12-07 18:59:25 -0500
commitbdb27cfce8337e96ccafc52721e3d41de9b02e0e (patch)
treeb2b9701d5420c159f1818df2071814eac9a2fb30 /lib
parentdccf8374cf7e4673cbc83f695e1665031bdf6539 (diff)
trac750 - linked in CSS file and added CSS for profile box
- added button for adding a box to the profile on settings darcs-hash:20081207235925-7b5ce-224fd2482f66c2c9ac9da9ce72c1c0da0243bd83.gz
Diffstat (limited to 'lib')
-rw-r--r--lib/facebookaction.php46
1 files changed, 45 insertions, 1 deletions
diff --git a/lib/facebookaction.php b/lib/facebookaction.php
index 5505a12c3..8872934aa 100644
--- a/lib/facebookaction.php
+++ b/lib/facebookaction.php
@@ -38,7 +38,7 @@ class FacebookAction extends Action {
function show_header($selected ='Home') {
- # $header = '<link rel="stylesheet" type="text/css" href="" />';
+ $header = '<link rel="stylesheet" type="text/css" href="'. theme_path('facebookapp.css') . '" />';
# $header .='<script src="" ></script>';
$header .= '<fb:dashboard/>';
@@ -180,6 +180,50 @@ 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">';
+ }
+
+ if ($have_before) {
+ $pargs = array('page' => $page-1);
+ $newargs = ($args) ? array_merge($args,$pargs) : $pargs;
+ $html .= '<li class="before">';
+ $html .'<a href="' . $this->pagination_url($fbaction, $newargs) . '">' . _('« After') . '</a>';
+ $html .'</li>';
+ }
+
+ if ($have_after) {
+ $pargs = array('page' => $page+1);
+ $newargs = ($args) ? array_merge($args,$pargs) : $pargs;
+ $html .= '<li class="after">';
+ $html .'<a href="' . $this->pagination_url($fbaction, $newargs) . '">' . _('Before »') . '</a>';
+ $html .'</li>';
+ }
+
+ if ($have_before || $have_after) {
+ $html .= '<ul>';
+ $html .'<div>';
+ }
+ }
+
+ function pagination_url($fbaction, $args=NULL) {
+ global $config;
+
+ $extra = '';
+
+ if ($args) {
+ foreach ($args as $key => $value) {
+ $extra .= "&${key}=${value}";
+ }
+ }
+
+ return "$fbaction?${extra}";
+ }
+
}