get media-rss thumbnail if available and nothing else was found (e.g. github).

pull/1/head
Friendika 12 years ago
parent 46c37fc779
commit 1a18f4bcde
  1. 6
      mod/follow.php

@ -113,10 +113,16 @@ function follow_post(&$a) {
$vcard['nick'] = trim(substr($vcard['nick'],0,strpos($vcard['nick'],' ')));
$email = $author->get_email();
}
if(! $vcard['photo']) {
$rawmedia = $item->get_item_tags('http://search.yahoo.com/mrss/','thumbnail');
if($rawmedia && $rawmedia[0]['attribs']['']['url'])
$vcard['photo'] = $rawmedia[0]['attribs']['']['url'];
}
}
}
if((! $vcard['photo']) && strlen($email))
$vcard['photo'] = gravatar_img($email);
$network = 'feed';
$priority = 2;
}

Loading…
Cancel
Save