First find:
foreach($this->itemtags as $itemtag) {
$temp = $this->my_preg_match("'<$itemtag.*?>(.*?)'si", $rss_item);
if ($temp != '') $result['items'][$i][$itemtag] = $temp; // Set only if not empty
}
After this foreach you need to insert this code:
// enclosure fix
$temp = $this->my_preg_match("'
if ($temp != '') $result['items'][$i]['enclosure'] = $temp; // Set only if not empty
// end enclosure fix
Now you have enclosure elem in item array with URL to image ;)
Have fun
1 komentarz:
Hi,
Like that ?
foreach($this->itemtags as $itemtag) {
$temp = $this->my_preg_match("'<$itemtag.*?>(.*?)'si", $rss_item);
if ($temp != '') $result['items'][$i][$itemtag] = $temp; // Set only if not empty
}
// enclosure fix
$temp = $this->my_preg_match("'<$itemtag.*?>(.*?)'si", $rss_item);
if ($temp != '') $result['items'][$i]['enclosure'] = $temp; // Set only if not empty
// end enclosure fix
Thanks
Prześlij komentarz