- # XXX: RDFa
- common_start_element('div', array('class' => 'notice'));
- # FIXME: add the avatar
- common_start_element('a', array('href' => $profile->profileurl,
- 'class' => 'nickname'),
- $profile->nickname);
- # FIXME: URL, image, video, audio
- common_element('span', array('class' => 'content'),
- $notice->content);
- common_element('span', array('class' => 'date'),
- common_date_string($notice->created));
- common_end_element('div');
+ $user = User::staticGet($profile->id);
+ if (!$user) {
+ return;
+ }
+ if ($user->emailmicroid && $user->email && $notice->uri) {
+ common_element('meta', array('name' => 'microid',
+ 'content' => "mailto+http:sha1:" . sha1(sha1('mailto:' . $user->email) . sha1($notice->uri))));
+ }
+ if ($user->jabbermicroid && $user->jabber && $notice->uri) {
+ common_element('meta', array('name' => 'microid',
+ 'content' => "xmpp+http:sha1:" . sha1(sha1('xmpp:' . $user->jabber) . sha1($notice->uri))));
+ }
+ }
+
+ function show_top($notice) {
+ $user = $notice->getProfile();
+ $cur = common_current_user();
+
+ if ($cur && $cur->id == $user->id) {
+ common_notice_form();
+ }
+ }
+
+ function no_such_notice() {
+ common_user_error(_('No such notice.'));