 |
 |
 |
 |
 |
| Author |
Message |
zakoon
Joined: 29 Jun 2008 Posts: 1
|
|
RSS-Feed for only one category |
|
Hi all,
I want to use cutenews.ru for two things: News and Podcast-Feed. So I created 2 categories (1=News / 2=Podcast) and on two different .php files, where i want to show the news/podcasts, I did the
 |  |
<?php
$category = "1";
include $cutepath.'/show_news.php';
?>
|
for the news and on the other for the podcasts:
 |  |
<?php
$category = "2";
include $cutepath.'/show_news.php';
?>
|
This works very well! Only the correct category is shown, everything is like i want it to be.
But for the Podcast i also would like to add an RSS-Feed. So i edit the rss.php at the beginning to:
 |  |
<?php
$category = "2";
include_once 'head.php';
add_filter('news-allow-commentform', 'comment_form');
...
|
But now, if i open the rss, nothing is shown in the rss feed. Only the header, but no items are created. If i delete the $category = "2"; the RSS is working well, but it's showing everything, news and podcast-category.
How can I make my rss-feed to only show the podcast-category?
Thanks for your help!
Zak.
Edit: I tried to insert in rss.php: $category = '2'; instead of "2". Now its working a little bit better: the rss is broken and useless, but when i look at the source code, i can see only podcast-entries in it. But the bad part: its not using the feed-template anymore, just the usual default. So instead of something like
 |  |
<item>
<title><![CDATA[Something]]></title>
<link>http://www.google.de</link>
<description><![CDATA[Something else]]</description>
<category><![CDATA[Podcast]]></category>
<pubDate>Mon, 16 Jun 2008 12:12:03 +0200</pubDate>
</item>
|
it shows the entries by my default template:
 |  |
<h2>Something</h2>
<p>Something else</p>
...
|
of course, that's useless in an rss... What am i doing wrong?[/quote]
|
|
| Sun Jun 29, 2008 2:39 am |
|
 |
Guest
|
|
|
Please login to hide the ads.
|
|
|
|
 |
FI-DD
Admin

Joined: 22 Sep 2005 Posts: 2736 Location: Germany |
|
|
|
Find that code in rss.php:
 |  | <?
$template = 'rss';
$number = 12;
include $cutepath.'/show_news.php';
?> |
That's the place where you can add your category.
|
|
| Fri Jul 04, 2008 1:44 pm |
|
 |
scottdallas

Joined: 04 May 2006 Posts: 1843 Location: US |
|
|
|
You can modify where FI-DD modified to make as many unique RSS feeds for your site as you'd like 
_________________ www.scottdizzle.com uses cnr
last update: 07-22-08: 8:30 pm |
|
| Tue Jul 08, 2008 7:30 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|
 |
 |
 |
|