diff --git a/widgets/content/content.class.php b/widgets/content/content.class.php
index b8d009bd5..e257e7207 100644
--- a/widgets/content/content.class.php
+++ b/widgets/content/content.class.php
@@ -443,6 +443,7 @@
//$content_item->setCategory($item->category);
$item->description = preg_replace('!pubdate,$item->pubDate,$item->{'dc:date'})));
$content_item->setRegdate($date);
@@ -477,6 +478,7 @@
//$content_item->setCategory($item->category);
$item->description = preg_replace('!pubdate,$item->pubDate,$item->{'dc:date'})));
$content_item->setRegdate($date);
@@ -544,6 +546,7 @@
}
}
$content_item->setContent($this->_getSummary($item->description, $args->content_cut_size));
+ $content_item->setThumbnail($this->_getRssThumbnail($item->description));
$content_item->setLink($item->link);
$date = date('YmdHis', strtotime(max($item->published,$item->updated,$item->{'dc:date'})));
$content_item->setRegdate($date);
@@ -554,6 +557,13 @@
return $content_items;
}
+ function _getRssThumbnail($content)
+ {
+ @preg_match('@
]+src *= *(?:"(.+)"|\'(.+)\'|([^ ]+))@', $content, $matches);
+
+ return $matches[1];
+ }
+
function _getTrackbackItems($args){
// Get categories
$output = executeQueryArray('widgets.content.getCategories',$obj);