I'd be inclined to leave that part alone and to edit the simplepie.inc file. Around line #1248 you see:
Code:
function get_description()
{
if (!empty($this->data['content']))
{
return $this->data['content'];
}
else if (!empty($this->data['encoded']))
{
return $this->data['encoded'];
}
else if (!empty($this->data['summary']))
{
return $this->data['summary'];
}
else if (!empty($this->data['description']))
{
return $this->data['description'];
}
else if (!empty($this->data['dc:description']))
{
return $this->data['dc:description'];
}
else if (!empty($this->data['longdesc']))
{
return $this->data['longdesc'];
}
else
{
return false;
}
}
It doesn't take much to see that, if any of the highlighted are available, the full description will not be used. If your thumbnail is in the description, removing or commenting the highlighted will ensure it gets imported.
So, keep a backup of simplepie.inc and edit one for your use:
Code:
<?php
function get_description()
{
/* if (!empty($this->data['content']))
{
return $this->data['content'];
}
else if (!empty($this->data['encoded']))
{
return $this->data['encoded'];
}
else if (!empty($this->data['summary']))
{
return $this->data['summary'];
}
else */ if (!empty($this->data['description']))
{
return $this->data['description'];
}
else if (!empty($this->data['dc:description']))
{
return $this->data['dc:description'];
}
else if (!empty($this->data['longdesc']))
{
return $this->data['longdesc'];
}
else
{
return false;
}
}
?>
If your thumbnail is somewhere else in the xml structure of the feed (other than in the description tag), we need to know where and find a way to retrieve it. If it comes to that, you could give us a link to the feed so we could check it out.
Note: The current simplepie.inc (it's been updated several times since this script came out) allows you to retrieve the full description without needing to be edited. But to switch to it, both outputbody.php and main.php would need to be edited because some of the function names have changed, as has the way that cache times are calculated. And it might be a bit more complicated, as the updated simplepie.inc does a better job at filtering out images, so part of that might have to be dealt with in configuring the feed with it as well.
Bookmarks