Categories and their RSS-feeds

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Davy
Regular
Posts: 109
Joined: Fri Oct 13, 2006 2:06 pm
Location: The Netherlands

Categories and their RSS-feeds

Post by Davy »

Hi!

I use the Startpage Category-plugin to only show one categorie on the frontpage (category 'Frontpage'). I also use the Properties/Templates Per Category-plugin to specify the template per category. All works fine, fast, good!

But if I try to open the RSS-feed for a category (e.g.: /feeds/2-Blog.rss) I always get the feed for category '1-Frontpage'. :( I use the latest version of the Startpage Category-plugin (v1.5)...

Does someone know what the problem is?
Thanks!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Categories and their RSS-feeds

Post by garvinhicking »

Hi!

This might be related to the serendipity version you're using. Which one is it? If possible, upgrade to latest 1.0.1 or an 1.1 nightly?

Best regards
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Davy
Regular
Posts: 109
Joined: Fri Oct 13, 2006 2:06 pm
Location: The Netherlands

Re: Categories and their RSS-feeds

Post by Davy »

Hi!

Well, I use v1.0.1, but it doesn't work... At another blog of mine - without Startpage Category-plugin - all works fine.
And if I delete the plugin and try again, all the category-RSS-feeds are totally away! :( Strange...
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Categories and their RSS-feeds

Post by garvinhicking »

Hi!

Hm, installing and reinstalling the plugin should not affect the RSS feeds at all. Maybe you did something else?

Anyways, I'm sure we can fix your bug easily.

Could you please edit your index.php file - there search for "PAT_PERMALINK_FEEDCATEGORIES". There you can see PHP code which will detect the category that the RSS feed should show info for.

Inside that larger if-block, there you will see two new if-blocks. After that you will see this:

Code: Select all

    ob_start();
    include(S9Y_INCLUDE_PATH . 'rss.php');
    $data = ob_get_contents();
    ob_end_clean();
please change that to:

Code: Select all

    die('CATEGORY: ' . $serendipity['GET']['category'] . '/' . $_GET['category']);
    ob_start();
    include(S9Y_INCLUDE_PATH . 'rss.php');
    $data = ob_get_contents();
    ob_end_clean();
Then open the URL of your RSS feed again, and you should see only a line "CATEGORY: ...". What does that read? When opening the feed of "2-Blog.rss" you should see:

Code: Select all

CATEGORY: 1/2
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply