Is there a way to RSS individual blog entries?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
musicphotog1
Posts: 2
Joined: Fri May 13, 2011 3:25 pm

Is there a way to RSS individual blog entries?

Post by musicphotog1 »

I want to select specific blog posts and RSS them into another project I am working on.
I am able to RSS the whole feed, bit I want to be able to RSS a specific entry.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Is there a way to RSS individual blog entries?

Post by garvinhicking »

Hi!

Can't you filter that on the target site?

The only current way would be to put the entry into its own category, and then fetch the RSS of that specific category. Or install the freetag plugin, add a tag to your entry, and then get the RSS feed of that specific tag with the single entry.

Another way would be to create a plugin that hooks into the RSS feed creation...

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/
musicphotog1
Posts: 2
Joined: Fri May 13, 2011 3:25 pm

Re: Is there a way to RSS individual blog entries?

Post by musicphotog1 »

Sadly my little bits of hacking mask my lack of development skills.

Yes I can possibly filter it but it and the plugins are probably beyond my skill set. I was hoping there was an easy way.

I am trying to get my blog posts to do dual duty and provide the backend for 2 sites, the primary which is the serendipity blog and another fed by RSS.

In the end it might prove easier just to find a way to point both domains at the serendipity site
and call different headers depending on the domain called
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Is there a way to RSS individual blog entries?

Post by garvinhicking »

Hi!

That definitely possible. You can easily create a config.inc.php file in your template directory and assign a variable depending on the hostname:

Code: Select all

<?php
if ($_SERVER['HTTP_HOST'] == 'www.domain1.com') {
  $header = 'A';
} else {
  $header = 'B';
}
$serendipity['smarty']->assign('customheader', $header);
And then in your index.tpl you can place {$customheader} wherever you might want it. You can enter any HTML you want in the variable of course.

Also remember to enable "Auto-detect HTTP Hostname: Yes" in the serendipity configuration, so that the hostname stays the same depending on what the user entered to get to the site.

HTH,
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