function showAtomTimeline($notice, $title, $id, $link, $subtitle = null, $suplink = null, $selfuri = null, $logo = null) { $this->initDocument('atom'); $this->element('title', null, $title); $this->element('id', null, $id); $this->element('link', array('href' => $link, 'rel' => 'alternate', 'type' => 'text/html'), null); if (!is_null($logo)) { $this->element('logo', null, $logo); } if (!is_null($suplink)) { // For FriendFeed's SUP protocol $this->element('link', array('rel' => 'http://api.friendfeed.com/2008/03#sup', 'href' => $suplink, 'type' => 'application/json')); } if (!is_null($selfuri)) { $this->element('link', array('href' => $selfuri, 'rel' => 'self', 'type' => 'application/atom+xml'), null); } $this->element('updated', null, common_date_iso8601('now')); $this->element('subtitle', null, $subtitle); if (is_array($notice)) { $notice = new ArrayWrapper($notice); } while ($notice->fetch()) { try { $this->raw($notice->asAtomEntry()); } catch (Exception $e) { common_log(LOG_ERR, $e->getMessage()); continue; } } $this->endDocument('atom'); }