mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
issue 2192, Get thumbnail when rss/atom
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.1@10958 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
f240a210b6
commit
3f8aed1b8b
1 changed files with 10 additions and 0 deletions
|
|
@ -443,6 +443,7 @@
|
|||
//$content_item->setCategory($item->category);
|
||||
$item->description = preg_replace('!<a href=!is','<a onclick="window.open(this.href);return false" href=', $item->description);
|
||||
$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->pubdate,$item->pubDate,$item->{'dc:date'})));
|
||||
$content_item->setRegdate($date);
|
||||
|
|
@ -477,6 +478,7 @@
|
|||
//$content_item->setCategory($item->category);
|
||||
$item->description = preg_replace('!<a href=!is','<a onclick="window.open(this.href);return false" href=', $item->description);
|
||||
$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->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('@<img[^>]+src *= *(?:"(.+)"|\'(.+)\'|([^ ]+))@', $content, $matches);
|
||||
|
||||
return $matches[1];
|
||||
}
|
||||
|
||||
function _getTrackbackItems($args){
|
||||
// Get categories
|
||||
$output = executeQueryArray('widgets.content.getCategories',$obj);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue