|
@@ 438-462 (lines=25) @@
|
| 435 |
|
|
| 436 |
|
$content_items = array(); |
| 437 |
|
|
| 438 |
|
foreach ($items as $key => $value) |
| 439 |
|
{ |
| 440 |
|
if($key >= $args->list_count) break; |
| 441 |
|
unset($item); |
| 442 |
|
$item = new stdClass(); |
| 443 |
|
|
| 444 |
|
foreach($value as $key2 => $value2) |
| 445 |
|
{ |
| 446 |
|
if(is_array($value2)) $value2 = array_shift($value2); |
| 447 |
|
$item->{$key2} = $this->_getRssBody($value2); |
| 448 |
|
} |
| 449 |
|
|
| 450 |
|
$content_item = new mcontentItem($rss->title); |
| 451 |
|
$content_item->setContentsLink($rss->link); |
| 452 |
|
$content_item->setTitle($item->title); |
| 453 |
|
$content_item->setNickName(max($item->author,$item->{'dc:creator'})); |
| 454 |
|
//$content_item->setCategory($item->category); |
| 455 |
|
$item->description = preg_replace('!<a href=!is','<a target="_blank" rel="noopener" href=', $item->description); |
| 456 |
|
$content_item->setContent($this->_getSummary($item->description, $args->content_cut_size)); |
| 457 |
|
$content_item->setLink($item->link); |
| 458 |
|
$date = date('YmdHis', strtotime(max($item->pubdate,$item->pubDate,$item->{'dc:date'}))); |
| 459 |
|
$content_item->setRegdate($date); |
| 460 |
|
|
| 461 |
|
$content_items[] = $content_item; |
| 462 |
|
} |
| 463 |
|
} |
| 464 |
|
else if($xml_doc->{'rdf:rdf'}) |
| 465 |
|
{ |
|
@@ 477-501 (lines=25) @@
|
| 474 |
|
|
| 475 |
|
$content_items = array(); |
| 476 |
|
|
| 477 |
|
foreach ($items as $key => $value) |
| 478 |
|
{ |
| 479 |
|
if($key >= $args->list_count) break; |
| 480 |
|
unset($item); |
| 481 |
|
$item = new stdClass(); |
| 482 |
|
|
| 483 |
|
foreach($value as $key2 => $value2) |
| 484 |
|
{ |
| 485 |
|
if(is_array($value2)) $value2 = array_shift($value2); |
| 486 |
|
$item->{$key2} = $this->_getRssBody($value2); |
| 487 |
|
} |
| 488 |
|
|
| 489 |
|
$content_item = new mcontentItem($rss->title); |
| 490 |
|
$content_item->setContentsLink($rss->link); |
| 491 |
|
$content_item->setTitle($item->title); |
| 492 |
|
$content_item->setNickName(max($item->author,$item->{'dc:creator'})); |
| 493 |
|
//$content_item->setCategory($item->category); |
| 494 |
|
$item->description = preg_replace('!<a href=!is','<a target="_blank" rel="noopener" href=', $item->description); |
| 495 |
|
$content_item->setContent($this->_getSummary($item->description, $args->content_cut_size)); |
| 496 |
|
$content_item->setLink($item->link); |
| 497 |
|
$date = date('YmdHis', strtotime(max($item->pubdate,$item->pubDate,$item->{'dc:date'}))); |
| 498 |
|
$content_item->setRegdate($date); |
| 499 |
|
|
| 500 |
|
$content_items[] = $content_item; |
| 501 |
|
} |
| 502 |
|
} |
| 503 |
|
else if($xml_doc->feed && $xml_doc->feed->attrs->xmlns == 'http://www.w3.org/2005/Atom') |
| 504 |
|
{ |