aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-02-02 17:32:25 -0800
committerFriendika <info@friendika.com>2011-02-02 17:32:25 -0800
commit1a18f4bcdee4084ef132b652188ae283cc187535 (patch)
tree8020c4bb3e3e36b8f9e1c265f81ad861561a2436 /mod
parent46c37fc7796ea80a3613d927e471cf8ebba0f2ba (diff)
downloadvolse-hubzilla-1a18f4bcdee4084ef132b652188ae283cc187535.tar.gz
volse-hubzilla-1a18f4bcdee4084ef132b652188ae283cc187535.tar.bz2
volse-hubzilla-1a18f4bcdee4084ef132b652188ae283cc187535.zip
get media-rss thumbnail if available and nothing else was found (e.g. github).
Diffstat (limited to 'mod')
-rw-r--r--mod/follow.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/mod/follow.php b/mod/follow.php
index c5f6d9e3f..8c1dc348f 100644
--- a/mod/follow.php
+++ b/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;
}