I've installed your mod and I like it very much (I'm using feedreader to get instant notifies when something new is posted on our forum).
Here's a simple (and ugly) hack I made, to allow ALL forums to be RSS-fed if you're logged in as an administrator. This isn't very secure, but I make do with it. I'm sure you can modify it for more security.
After the lines
if ($pun_user['g_read_board'] == '0')
message($lang_common['No view'])
in index.php, viewtopic.php and viewforum.php put:
// hack for allowing the administrators to RSS feed every topic, forum and category
if ($pun_user['group_id']=='1') {
$rssadm='readall=1&';
} else {
$rssadm="";
}
and in every instance of the RSS-tag put like this:
<a href="rss.php?<?=$rssadm?>cid=<?php echo $cur_forum['cid'] ?>">
(you've added <?=$rssadm?>).
in rss.php, find this:
$result = $db->query("
SELECT p.id AS id, p.message AS message, p.posted AS postposted, t.subject AS subject, f.forum_name, c.cat_name
FROM ".$db->prefix."posts p
LEFT JOIN ".$db->prefix."topics t
ON p.topic_id=t.id
INNER JOIN ".$db->prefix."forums AS f
ON f.id=t.forum_id
LEFT JOIN ".$db->prefix."categories AS c
ON f.cat_id = c.id
LEFT JOIN ".$db->prefix."forum_perms AS fp
ON (
fp.forum_id=f.id
AND fp.group_id=3
)
WHERE (
fp.read_forum IS NULL
OR fp.read_forum=1
)
$where
ORDER BY postposted DESC
LIMIT 0,15
") or error('Unable to fetch forum posts', __FILE__, __LINE__, $db->error());;
and replace it with this:
if($readall=="1") {
$result = $db->query("
SELECT p.id AS id, p.message AS message, p.posted AS postposted, t.subject AS subject, f.forum_name, c.cat_name
FROM ".$db->prefix."posts p
LEFT JOIN ".$db->prefix."topics t
ON p.topic_id=t.id
INNER JOIN ".$db->prefix."forums AS f
ON f.id=t.forum_id
LEFT JOIN ".$db->prefix."categories AS c
ON f.cat_id = c.id
LEFT JOIN ".$db->prefix."forum_perms AS fp
ON (
fp.forum_id=f.id
AND fp.group_id=3
)
$where
ORDER BY postposted DESC
LIMIT 0,15
") or error('Unable to fetch forum posts', __FILE__, __LINE__, $db->error());;
} else {
$result = $db->query("
SELECT p.id AS id, p.message AS message, p.posted AS postposted, t.subject AS subject, f.forum_name, c.cat_name
FROM ".$db->prefix."posts p
LEFT JOIN ".$db->prefix."topics t
ON p.topic_id=t.id
INNER JOIN ".$db->prefix."forums AS f
ON f.id=t.forum_id
LEFT JOIN ".$db->prefix."categories AS c
ON f.cat_id = c.id
LEFT JOIN ".$db->prefix."forum_perms AS fp
ON (
fp.forum_id=f.id
AND fp.group_id=3
)
WHERE (
fp.read_forum IS NULL
OR fp.read_forum=1
)
$where
ORDER BY postposted DESC
LIMIT 0,15
") or error('Unable to fetch forum posts', __FILE__, __LINE__, $db->error());;
}
Also, I've commented out the "check for guest access" lines in rss.php.
Like I said, this is ugly and unsecure, but it works for me.
Thanks for the mod!