if ($value != "") {
$author["author-about"] = $value;
}
+ $avatar = $xpath->evaluate("atom:author/atom:link[@rel='avatar']")->item(0)->attributes;
+ if (is_object($avatar)) {
+ foreach ($avatar AS $attributes) {
+ if ($attributes->name == "href") {
+ $author["author-avatar"] = $attributes->textContent;
+ }
+ }
+ }
}
$author["edited"] = $author["created"] = $xpath->query('/atom:feed/atom:updated/text()')->item(0)->nodeValue;
$width = $attributes->textContent;
}
}
- if (($width > 0) && ($href != "")) {
+ if ($href != "") {
$avatarlist[$width] = $href;
}
}
if (!$feed_data) {
return false;
}
+
if ($feed_data["header"]["author-name"] != "") {
$data["name"] = $feed_data["header"]["author-name"];
}
if ($feed_data["header"]["author-link"] != "") {
$data["url"] = $feed_data["header"]["author-link"];
}
+
+ if (($data['poll'] == $data['url']) && ($data["alias"] != '')) {
+ $data['url'] = $data["alias"];
+ $data["alias"] = '';
+ }
+
/// @todo Fetch location and "about" from the feed as well
return $data;
}