summaryrefslogtreecommitdiff
path: root/lib/facebookutil.php
diff options
context:
space:
mode:
authorZach Copley <zach@controlyourself.ca>2009-01-19 07:24:12 +0000
committerZach Copley <zach@controlyourself.ca>2009-01-19 07:24:12 +0000
commit739baf0396b2e6796f07616cdb9d52d09cf6ed2f (patch)
tree50312fee736ad33aaf88e1e64c6a67f14ff6a758 /lib/facebookutil.php
parentcd6b9d6c4608cc5bb524031f8de97a3dc5cc3ea9 (diff)
trac750 Add notice input box to FB app and ability to post notices
Diffstat (limited to 'lib/facebookutil.php')
-rw-r--r--lib/facebookutil.php38
1 files changed, 37 insertions, 1 deletions
diff --git a/lib/facebookutil.php b/lib/facebookutil.php
index cc4941bdc..a133ce8ba 100644
--- a/lib/facebookutil.php
+++ b/lib/facebookutil.php
@@ -44,7 +44,7 @@ function get_facebook()
return new Facebook($apikey, $secret);
}
-function start_fbml($indent = true)
+function startFBML($indent = true)
{
global $xw;
$xw = new XMLWriter();
@@ -132,6 +132,42 @@ function getFacebookJS() {
}
+// Does a little before-after block for next/prev page
+
+function facebookPagination($have_before, $have_after, $page, $action, $args=null)
+{
+
+ if ($have_before || $have_after) {
+ common_element_start('div', array('id' => 'pagination'));
+ common_element_start('ul', array('id' => 'nav_pagination'));
+ }
+
+ if ($have_before) {
+ $pargs = array('page' => $page-1);
+ $newargs = ($args) ? array_merge($args,$pargs) : $pargs;
+
+ common_element_start('li', 'before');
+ common_element('a', array('href' => "index.php?page=$newargs[page]", 'rel' => 'prev'),
+ _('« After'));
+ common_element_end('li');
+ }
+
+ if ($have_after) {
+ $pargs = array('page' => $page+1);
+ $newargs = ($args) ? array_merge($args,$pargs) : $pargs;
+ common_element_start('li', 'after');
+ common_element('a', array('href' => "index.php?page=$newargs[page]", 'rel' => 'next'),
+ _('Before »'));
+ common_element_end('li');
+ }
+
+ if ($have_before || $have_after) {
+ common_element_end('ul');
+ common_element_end('div');
+ }
+}
+
+
class FacebookNoticeList extends NoticeList
{
/**