diff --git a/classes/feedenclosure.php b/classes/feedenclosure.php index d610dd7c8..b57100b06 100644 --- a/classes/feedenclosure.php +++ b/classes/feedenclosure.php @@ -3,5 +3,6 @@ class FeedEnclosure { public $link; public $type; public $length; + public $title; } ?> diff --git a/classes/feeditem/atom.php b/classes/feeditem/atom.php index b1251e6d3..b7a228aed 100644 --- a/classes/feeditem/atom.php +++ b/classes/feeditem/atom.php @@ -146,6 +146,9 @@ class FeedItem_Atom extends FeedItem_Common { $enc->link = $enclosure->getAttribute("url"); $enc->length = $enclosure->getAttribute("length"); + $desc = $this->xpath->query("media:description", $enclosure)->item(0); + if ($desc) $enc->title = strip_tags($desc->nodeValue); + array_push($encs, $enc); } diff --git a/classes/feeditem/rss.php b/classes/feeditem/rss.php index 095225a2a..1f59f0612 100644 --- a/classes/feeditem/rss.php +++ b/classes/feeditem/rss.php @@ -121,6 +121,9 @@ class FeedItem_RSS extends FeedItem_Common { $enc->link = $enclosure->getAttribute("url"); $enc->length = $enclosure->getAttribute("length"); + $desc = $this->xpath->query("media:description", $enclosure)->item(0); + if ($desc) $enc->title = strip_tags($desc->nodeValue); + array_push($encs, $enc); } diff --git a/css/tt-rss.css b/css/tt-rss.css index 3392c3c7a..9e500a759 100644 --- a/css/tt-rss.css +++ b/css/tt-rss.css @@ -1177,3 +1177,8 @@ span.highlight { background-color : #ffff00; color : #cc90cc; } + +div.enclosure_title { + +} + diff --git a/include/functions.php b/include/functions.php index 56361472e..6bc52e9d9 100644 --- a/include/functions.php +++ b/include/functions.php @@ -3776,6 +3776,7 @@ $url = $line["content_url"]; $ctype = $line["content_type"]; + $title = $line["title"]; if (!$ctype) $ctype = __("unknown type"); @@ -3798,6 +3799,7 @@ $entry["type"] = $ctype; $entry["filename"] = $filename; $entry["url"] = $url; + $entry["title"] = $title; array_push($entries, $entry); } @@ -3819,7 +3821,10 @@ $rv .= "
" .htmlspecialchars($entry["url"]) . "
"; + } + if ($entry['title']) { + $rv.= "