]> git.mxchange.org Git - friendica.git/commitdiff
get media-rss thumbnail if available and nothing else was found (e.g. github).
authorFriendika <info@friendika.com>
Thu, 3 Feb 2011 01:32:25 +0000 (17:32 -0800)
committerFriendika <info@friendika.com>
Thu, 3 Feb 2011 01:32:25 +0000 (17:32 -0800)
mod/follow.php

index c5f6d9e3fce8847bff80fc2c57e80b0bb82637ef..8c1dc348fa7d4addd416a48135a5e837fef758ef 100644 (file)
@@ -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;
                }