think tank forum

ttf development » Including RSS the /modern/ way

qubodup's avatar
14 years ago
r2, link
qubodup
Iwan Gabovitch
Add <link rel="alternate" type="application/rss+xml" href="rss.php" /> to include_header.php.

You'll love it!

Source: http://en.wikipedia.org/wiki/RSS#Including_in_XHTML
dannyp's avatar
14 years ago
link
dannyp
dʎuuɐp
:D
lucas's avatar
14 years ago
link
lucas
i ❤ demo
yeah, i'll do that. i was hoping to make specific rss feeds for different pages, though.

like an rss feed for each thread, each forum, the whole site, etc.
qubodup's avatar
14 years ago
r1, link
qubodup
Iwan Gabovitch
I agree that individual pages would be nice.

<link rel="alternate" type="application/rss+xml" href="rss.php?forum_id=$forum_id&amp;thread_id=$thread_id"" />

should be good then. rss.php can be made to interpret these later.
lucas's avatar
14 years ago
link
lucas
i ❤ demo
that makes the uris messy (one variable is null). i want more than just those two types, as well.
qubodup's avatar
14 years ago
r1, link
qubodup
Iwan Gabovitch
I don't see a problem with variables being null. edit: on the other hand I guess I do. :)

How about this then? (Note that I'm no php programmer and my code is likely to contain errors)

if ($forum_id) {
$feed_param = '?forum_id='.$forum_id
} elseif ($thread_id) {
$feed_param = '?thread_id='.$thread_id
};

<link rel="alternate" type="application/rss+xml" href="rss.php$feed_param" />
lucas's avatar
14 years ago
link
lucas
i ❤ demo
yeah, something to that end would be fine.

i do anticipate rewriting the uris, though, which is why i'm hesitant to implement anything like that right now.

also, i wanted to wait to link in the current rss feed until it is more usable.

i do appreciate the input, though, and i'll make sure it gets linked when the feed has matured.
dannyp's avatar
14 years ago
link
dannyp
dʎuuɐp
can't wait for the future of ttf rss
bsdlite's avatar
14 years ago
link
bsdlite
thinks darkness is his ally
> can't wait for the future of ttf rss

/signed