+ $app_props = $this->facebook->api_client->Admin_getAppProperties(array('icon_url'));
+ $icon_url = $app_props['icon_url'];
+
+ $style = '<style>
+ .entry-title *,
+ .entry-content * {
+ font-size:14px;
+ font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif;
+ }
+ .entry-title a,
+ .entry-content a {
+ color:#002E6E;
+ }
+
+ .entry-title .vcard .photo {
+ float:left;
+ display:inline;
+ margin-right:11px;
+ margin-bottom:11px
+ }
+ .entry-title {
+ margin-bottom:11px;
+ }
+ .entry-title p.entry-content {
+ display:inline;
+ margin-left:5px;
+ }
+
+ div.entry-content {
+ clear:both;
+ }
+ div.entry-content dl,
+ div.entry-content dt,
+ div.entry-content dd {
+ display:inline;
+ text-transform:lowercase;
+ }
+
+ div.entry-content dd,
+ div.entry-content .device dt {
+ margin-left:0;
+ margin-right:5px;
+ }
+ div.entry-content dl.timestamp dt,
+ div.entry-content dl.response dt {
+ display:none;
+ }
+ div.entry-content dd a {
+ display:inline-block;
+ }
+
+ #facebook_laconica_app {
+ text-indent:-9999px;
+ height:16px;
+ width:16px;
+ display:block;
+ background:url('.$icon_url.') no-repeat 0 0;
+ float:right;
+ }
+ </style>';
+
+ $this->xw->openMemory();
+
+ $item = new FacebookProfileBoxNotice($notice, $this);
+ $item->show();
+
+ $fbml = "<fb:wide>$style " . $this->xw->outputMemory(false) . "</fb:wide>";
+ $fbml .= "<fb:narrow>$style " . $this->xw->outputMemory(false) . "</fb:narrow>";
+
+ $fbml_main = "<fb:narrow>$style " . $this->xw->outputMemory(false) . "</fb:narrow>";
+
+ $this->facebook->api_client->profile_setFBML(null, $this->fbuid, $fbml, null, null, $fbml_main);
+
+ $this->xw->openURI('php://output');
+ }
+
+
+ /**
+ * Generate pagination links
+ *
+ * @param boolean $have_before is there something before?
+ * @param boolean $have_after is there something after?
+ * @param integer $page current page
+ * @param string $action current action
+ * @param array $args rest of query arguments
+ *
+ * @return nothing
+ */
+ function pagination($have_before, $have_after, $page, $action, $args=null)
+ {
+ // Does a little before-after block for next/prev page
+ if ($have_before || $have_after) {
+ $this->elementStart('div', array('class' => 'pagination'));
+ $this->elementStart('dl', null);
+ $this->element('dt', null, _('Pagination'));
+ $this->elementStart('dd', null);
+ $this->elementStart('ul', array('class' => 'nav'));
+ }
+ if ($have_before) {
+ $pargs = array('page' => $page-1);
+ $newargs = $args ? array_merge($args, $pargs) : $pargs;
+ $this->elementStart('li', array('class' => 'nav_prev'));
+ $this->element('a', array('href' => "$this->app_uri/$action?page=$newargs[page]", 'rel' => 'prev'),
+ _('After'));
+ $this->elementEnd('li');
+ }
+ if ($have_after) {
+ $pargs = array('page' => $page+1);
+ $newargs = $args ? array_merge($args, $pargs) : $pargs;
+ $this->elementStart('li', array('class' => 'nav_next'));
+ $this->element('a', array('href' => "$this->app_uri/$action?page=$newargs[page]", 'rel' => 'next'),
+ _('Before'));
+ $this->elementEnd('li');
+ }
+ if ($have_before || $have_after) {
+ $this->elementEnd('ul');
+ $this->elementEnd('dd');
+ $this->elementEnd('dl');
+ $this->elementEnd('div');
+ }
+ }
+
+ function updateFacebookStatus($notice)
+ {
+ $prefix = $this->facebook->api_client->data_getUserPreference(FACEBOOK_NOTICE_PREFIX, $this->fbuid);
+ $content = "$prefix $notice->content";
+
+ if ($this->facebook->api_client->users_hasAppPermission('status_update', $this->fbuid)) {
+ $this->facebook->api_client->users_setStatus($content, $this->fbuid, false, true);