2 posts
|
Hello,
I really need your help.
My feeds don’s show any images from posts. I’ve no idea how solve that problem. Please help.
Here is my feed code:
<?php echo '<?'; ?>xml version="1.0" encoding="UTF-8"<?php echo '?>'; ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>Grid Based Designs</title>
<link><?php echo BASE_URL ?></link>
<atom:link href="<?php echo BASE_URL ?>/rss.xml" rel="self" type="application/rss+xml" />
<language>en-us</language>
<copyright>Copyright <?php echo date('Y'); ?>, brilliancy.eu</copyright>
<pubDate><?php echo strftime('%a, %d %b %Y %H:%M:%S %z'); ?></pubDate>
<lastBuildDate><?php echo strftime('%a, %d %b %Y %H:%M:%S %z'); ?></lastBuildDate>
<category>any</category>
<generator>Frog CMS</generator>
<description>Latest Submissions</description>
<author>mail@brilliancy.eu (www.brilliancy.eu)</author>
<docs>http://www.rssboard.org/rss-specification</docs>
<?php $articles = $this->find('articles'); ?>
<?php foreach ($articles->children(array('limit' => 20, 'order' => 'page.created_on DESC')) as $article): ?>
<item>
<title><?php echo $article->title(); ?></title>
<description><?php if ($article->hasContent('summary')) { echo $article->content('summary'); } else { echo strip_tags($article->content()); } ?></description>
<pubDate><?php echo $article->date('%a, %d %b %Y %H:%M:%S %z'); ?></pubDate>
<link><?php echo $article->url(); ?></link>
<guid><?php echo $article->url(); ?></guid>
</item>
<?php endforeach; ?>
</channel>
</rss>
|
2 posts
|
Any help!? |
58 posts
|
I’m not see any image representive in this code. How you think it is should to show?
If your $article->content(‘summary’) or $article->content() return a correct HTML, all must work fine.
Ah! Remove striptags function from second condition. |