function extraHead() { if ($this->profile->bio) { $this->element('meta', array('name' => 'description', 'content' => $this->profile->bio)); } if ($this->user->emailmicroid && $this->user->email && $this->profile->profileurl) { $id = new Microid('mailto:' . $this->user->email, $this->selfUrl()); $this->element('meta', array('name' => 'microid', 'content' => $id->toString())); } // See https://wiki.mozilla.org/Microsummaries $this->element('link', array('rel' => 'microsummary', 'href' => common_local_url('microsummary', array('nickname' => $this->profile->nickname)))); $rsd = common_local_url('rsd', array('nickname' => $this->profile->nickname)); // RSD, http://tales.phrasewise.com/rfc/rsd $this->element('link', array('rel' => 'EditURI', 'type' => 'application/rsd+xml', 'href' => $rsd)); if ($this->page != 1) { $this->element('link', array('rel' => 'canonical', 'href' => $this->profile->profileurl)); } }
function extraHead() { // for remote subscriptions etc. $this->element('meta', array('http-equiv' => 'X-XRDS-Location', 'content' => common_local_url('xrds', array('nickname' => $this->user->nickname)))); if ($this->profile->bio) { $this->element('meta', array('name' => 'description', 'content' => $this->profile->bio)); } if ($this->user->emailmicroid && $this->user->email && $this->profile->profileurl) { $id = new Microid('mailto:' . $this->user->email, $this->selfUrl()); $this->element('meta', array('name' => 'microid', 'content' => $id->toString())); } if ($this->user->jabbermicroid && $this->user->jabber && $this->profile->profileurl) { $id = new Microid('xmpp:' . $this->user->jabber, $this->selfUrl()); $this->element('meta', array('name' => 'microid', 'content' => $id->toString())); } // See https://wiki.mozilla.org/Microsummaries $this->element('link', array('rel' => 'microsummary', 'href' => common_local_url('microsummary', array('nickname' => $this->profile->nickname)))); }
function onEndShowHeadElements($action) { $aname = $action->trimmed('action'); if ($aname == 'shownotice') { $user_im_prefs = new User_im_prefs(); $user_im_prefs->user_id = $action->profile->id; $user_im_prefs->transport = $this->transport; if ($user_im_prefs->find() && $user_im_prefs->fetch() && $user_im_prefs->microid && $action->notice->uri) { $id = new Microid($this->microiduri($user_im_prefs->screenname), $action->notice->uri); $action->element('meta', array('name' => 'microid', 'content' => $id->toString())); } } else { if ($aname == 'showstream') { $user_im_prefs = new User_im_prefs(); $user_im_prefs->user_id = $action->user->id; $user_im_prefs->transport = $this->transport; if ($user_im_prefs->find() && $user_im_prefs->fetch() && $user_im_prefs->microid && $action->profile->profileurl) { $id = new Microid($this->microiduri($user_im_prefs->screenname), $action->selfUrl()); $action->element('meta', array('name' => 'microid', 'content' => $id->toString())); } } } }
/** * Extra <head> content * * We show the microid(s) for the author, if any. * * @return void */ function extraHead() { $user = User::staticGet($this->profile->id); if (!$user) { return; } if ($user->emailmicroid && $user->email && $this->notice->uri) { $id = new Microid('mailto:' . $user->email, $this->notice->uri); $this->element('meta', array('name' => 'microid', 'content' => $id->toString())); } if ($user->jabbermicroid && $user->jabber && $this->notice->uri) { $id = new Microid('xmpp:', $user->jabber, $this->notice->uri); $this->element('meta', array('name' => 'microid', 'content' => $id->toString())); } $this->element('link', array('rel' => 'alternate', 'type' => 'application/json+oembed', 'href' => common_local_url('oembed', array(), array('format' => 'json', 'url' => $this->notice->uri)), 'title' => 'oEmbed'), null); $this->element('link', array('rel' => 'alternate', 'type' => 'text/xml+oembed', 'href' => common_local_url('oembed', array(), array('format' => 'xml', 'url' => $this->notice->uri)), 'title' => 'oEmbed'), null); // Extras to aid in sharing notices to Facebook $avatar = $this->profile->getAvatar(AVATAR_PROFILE_SIZE); $avatarUrl = $avatar ? $avatar->displayUrl() : Avatar::defaultImage(AVATAR_PROFILE_SIZE); $this->element('meta', array('property' => 'og:image', 'content' => $avatarUrl)); $this->element('meta', array('property' => 'og:description', 'content' => $this->notice->content)); }
/** * Extra <head> content * * We show the microid(s) for the author, if any. * * @return void */ function extraHead() { $user = User::staticGet($this->profile->id); if (!$user) { return; } if ($user->emailmicroid && $user->email && $this->notice->uri) { $id = new Microid('mailto:' . $user->email, $this->notice->uri); $this->element('meta', array('name' => 'microid', 'content' => $id->toString())); } if ($user->jabbermicroid && $user->jabber && $this->notice->uri) { $id = new Microid('xmpp:', $user->jabber, $this->notice->uri); $this->element('meta', array('name' => 'microid', 'content' => $id->toString())); } $this->element('link', array('rel' => 'alternate', 'type' => 'application/json+oembed', 'href' => common_local_url('oembed', array(), array('format' => 'json', 'url' => $this->notice->uri)), 'title' => 'oEmbed'), null); $this->element('link', array('rel' => 'alternate', 'type' => 'text/xml+oembed', 'href' => common_local_url('oembed', array(), array('format' => 'xml', 'url' => $this->notice->uri)), 'title' => 'oEmbed'), null); }
/** * Extra <head> content * * We show the microid(s) for the author, if any. * * @return void */ function extraHead() { $user = User::getKV($this->profile->id); if (!$user instanceof User) { return; } if ($user->emailmicroid && $user->email && $this->notice->uri) { $id = new Microid('mailto:' . $user->email, $this->notice->uri); $this->element('meta', array('name' => 'microid', 'content' => $id->toString())); } // Extras to aid in sharing notices to Facebook $avatarUrl = $this->profile->avatarUrl(AVATAR_PROFILE_SIZE); $this->element('meta', array('property' => 'og:image', 'content' => $avatarUrl)); $this->element('meta', array('property' => 'og:description', 'content' => $this->notice->content)); }
/** * Extra <head> content * * We show the microid(s) for the author, if any. * * @return void */ function extraHead() { $user = User::staticGet($this->profile->id); if (!$user) { return; } if ($user->emailmicroid && $user->email && $this->notice->uri) { $id = new Microid('mailto:' . $user->email, $this->notice->uri); $this->element('meta', array('name' => 'microid', 'content' => $id->toString())); } if ($user->jabbermicroid && $user->jabber && $this->notice->uri) { $id = new Microid('xmpp:', $user->jabber, $this->notice->uri); $this->element('meta', array('name' => 'microid', 'content' => $id->toString())); } }