require_once INSTALLDIR.'/lib/noticelist.php';
define("FACEBOOK_SERVICE", 2); // Facebook is foreign_service ID 2
+define("FACEBOOK_NOTICE_PREFIX", 1);
+define("FACEBOOK_PROMPTED_UPDATE_PREF", 2);
// Gets all the notices from users with a Facebook link since a given ID
function get_facebook_notices($since)
}
function getFacebookCSS()
-{
+{
# Add a timestamp to the CSS file so Facebook cache wont ignore our changes
$ts = filemtime(theme_file('facebookapp.css'));
- $cssurl = theme_path('facebookapp.css') . "?ts=$ts";
+ $cssurl = theme_path('facebookapp.css') . "?ts=$ts";
return $cssurl;
}
function getFacebookJS() {
-
+
# Add a timestamp to the FBJS file so Facebook cache wont ignore our changes
$ts = filemtime(INSTALLDIR.'/js/facebookapp.js');
- $jsurl = common_path('js/facebookapp.js') . "?ts=$ts";
+ $jsurl = common_path('js/facebookapp.js') . "?ts=$ts";
return $jsurl;
}
return $cnt;
}
-
+
/**
* returns a new list item for the current notice
*
{
return new FacebookNoticeListItem($notice);
}
-
+
}
class FacebookNoticeListItem extends NoticeListItem
function show()
{
$this->showStart();
-
+
common_element_start('div', 'entry-title');
$this->showAuthor();
$this->showContent();
$this->showNoticeSource();
$this->showReplyTo();
common_element_end('div');
-
+
$this->showEnd();
}
-
+
function showStart()
{
// XXX: RDFa
preg_match('/^http/', $this->notice->uri)) {
$noticeurl = $this->notice->uri;
}
-
+
common_element_start('dl', 'timestamp');
- common_element('dt', null, _('Published'));
+ common_element('dt', null, _('Published'));
common_element_start('dd', null);
common_element_start('a', array('rel' => 'bookmark',
'href' => $noticeurl));
common_element_end('dl');
}
-}
+}