+ $o .= "\t<name>$name</name>\r\n";
+ $o .= "\t<uri>$uri</uri>\r\n";
+ $o .= "\t".'<link rel="photo" type="image/jpeg" media:width="' . $w . '" media:height="' . $h . '" href="' . $photo . '" />' . "\r\n";
+ $o .= "\t".'<link rel="avatar" type="image/jpeg" media:width="' . $w . '" media:height="' . $h . '" href="' . $photo . '" />' . "\r\n";
+
+ if ($tag == "author") {
+
+ if($geo)
+ $o .= '<georss:point>'.xmlify($geo).'</georss:point>'."\r\n";
+
+ $r = q("SELECT `profile`.`locality`, `profile`.`region`, `profile`.`country-name`,
+ `profile`.`name`, `profile`.`pub_keywords`, `profile`.`about`,
+ `profile`.`homepage`,`contact`.`nick` FROM `profile`
+ INNER JOIN `contact` ON `contact`.`uid` = `profile`.`uid`
+ INNER JOIN `user` ON `user`.`uid` = `profile`.`uid`
+ WHERE `profile`.`is-default` AND `contact`.`self` AND
+ NOT `user`.`hidewall` AND `contact`.`nurl`='%s'",
+ dbesc(normalise_link($uri)));
+ if ($r) {
+ $location = '';
+ if($r[0]['locality'])
+ $location .= $r[0]['locality'];
+ if($r[0]['region']) {
+ if($location)
+ $location .= ', ';
+ $location .= $r[0]['region'];
+ }
+ if($r[0]['country-name']) {
+ if($location)
+ $location .= ', ';
+ $location .= $r[0]['country-name'];
+ }
+
+ $o .= "\t<poco:preferredUsername>".xmlify($r[0]["nick"])."</poco:preferredUsername>\r\n";
+ $o .= "\t<poco:displayName>".xmlify($r[0]["name"])."</poco:displayName>\r\n";
+ $o .= "\t<poco:note>".xmlify(bbcode($r[0]["about"]))."</poco:note>\r\n";
+ $o .= "\t<poco:address>\r\n";
+ $o .= "\t\t<poco:formatted>".xmlify($location)."</poco:formatted>\r\n";
+ $o .= "\t</poco:address>\r\n";
+ $o .= "\t<poco:urls>\r\n";
+ $o .= "\t<poco:type>homepage</poco:type>\r\n";
+ $o .= "\t\t<poco:value>".xmlify($r[0]["homepage"])."</poco:value>\r\n";
+ $o .= "\t\t<poco:primary>true</poco:primary>\r\n";
+ $o .= "\t</poco:urls>\r\n";
+ }
+ }