Topic: RSS Autodiscovery
To add RSS autodiscovery links (for Firefox livemarks) to my forum, I used the following code:
<?php
// Edits for RSS autodiscovery
echo ("<link rel=\"alternate\" type=\"application/rss+xml\" title=\"New topics feed.\" href=\"extern.php?action=new&type=rss\"/>\n<link rel=\"alternate\" type=\"application/rss+xml\" title=\"Recent activity feed.\" href=\"extern.php?action=active&type=rss\"/>\n");
if ($id) {
$auto_discover_new = '<link rel="alternate" type="application/rss+xml" title="New topics feed for forum #'.$id.'." href="extern.php?action=new&type=rss&fid='.$id.'"/>';
$auto_discover_active = '<link rel="alternate" type="application/rss+xml" title="Recent activity feed for forum #'.$id.'." href="extern.php?action=active&type=rss&fid='.$id.'"/>';
echo ($auto_discover_new . "\n" . $auto_discover_active . "\n");
}
?>
Add it to header.php. I suggest putting in under "</title>" around line 70.
My PHP isn't that great, so revisions are welcome.
If for some reason you want to see this in action (if you would call it "action"), click the link in my sig.
I hope this helps somebody!
EDIT: See below for new code.
EDIT: It appears that keyes has addressed this kind of thing already. You might try using code from both this thread and the other one to have the most effective solution.