trac750 Add notice input box to FB app and ability to post notices

This commit is contained in:
Zach Copley
2009-01-19 07:24:12 +00:00
parent cd6b9d6c46
commit 739baf0396
7 changed files with 205 additions and 69 deletions

View File

@@ -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
{
/**