Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
RSS-Feed for only one category

 
Reply to topic    Forum Index » Help View previous topic
View next topic
RSS-Feed for only one category
Author Message
zakoon



Joined: 29 Jun 2008
Posts: 1

Post RSS-Feed for only one category Reply with quote
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
Code:
   
<?php
   $category = "1";
   include $cutepath.'/show_news.php';
?>


for the news and on the other for the podcasts:

Code:
   
<?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:
Code:

<?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
Code:

<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:
Code:

<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 View user's profile Send private message
Guest








Please login to hide the ads.

FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2736
Location: Germany

Post Reply with quote
Find that code in rss.php:
Code:
<?
$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 View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
You can modify where FI-DD modified to make as many unique RSS feeds for your site as you'd like Smile

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Tue Jul 08, 2008 7:30 pm View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:    
Reply to topic    Forum Index » Help All times are GMT + 1 Hour
Page 1 of 1

 
Jump to: 
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



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.