Merge branch 'rel_me_for_indieweb' into 'master'

rel="me" links for the IndieWeb audience

This will make https://indiewebify.me/validate-rel-me/?url=https%3A%2F%2Fquitter.se%2Fhannes2peer recognize rel="me" tags that help IndieWeb sites and services determine who you are based on which other websites you publish (such as blog etc)

See for example: https://indiewebify.me/validate-rel-me/?url=https%3A%2F%2Fsocial.umeahackerspace.se%2Fmmn where my blog links back to my GNU social account and the service recognizes it.

See merge request !22
This commit is contained in:
hannes 2016-02-23 21:54:52 +00:00
commit f977f9ba8a

View File

@ -158,6 +158,17 @@ class QvitterAction extends ApiAction
print ' <link title="FOAF for '.$nickname.'" type="application/rdf+xml" href="'.$instanceurl.$nickname.'/foaf" rel="meta">'."\n"; print ' <link title="FOAF for '.$nickname.'" type="application/rdf+xml" href="'.$instanceurl.$nickname.'/foaf" rel="meta">'."\n";
print ' <link href="'.$instanceurl.$nickname.'/microsummary" rel="microsummary">'."\n"; print ' <link href="'.$instanceurl.$nickname.'/microsummary" rel="microsummary">'."\n";
// rel="me" for the IndieWeb audience
$relMes = array(
['href' => $user->getProfile()->getHomepage(),
'text' => _('Homepage'),
'image' => null],
);
Event::handle('OtherAccountProfiles', array($user->getProfile(), &$relMes));
foreach ($relMes as $relMe) {
print ' <link href="'.htmlspecialchars($relMe['href']).'" title="'.$relMe['text'].'" rel="me" />'."\n";
}
// maybe openid // maybe openid
if (array_key_exists('OpenID', StatusNet::getActivePlugins())) { if (array_key_exists('OpenID', StatusNet::getActivePlugins())) {
print ' <link rel="openid2.provider" href="'.common_local_url('openidserver').'"/>'."\n"; print ' <link rel="openid2.provider" href="'.common_local_url('openidserver').'"/>'."\n";