These are quick easy hacks to get RSS feeds for each forum on the index.php page and viewforum.php pages.
I covered how to put the main RSS feed on PunBB already.
Open up index.php and after this line
$forum_field = '<h3><a href="viewforum.php?id='.$cur_forum['fid'].'">'.pun_htmlspecialchars($cur_forum['forum_name']).'</a></h3>';
Add this
$forum_field .= '<div class="forum_rss"><a class="rss" href="extern.php?action=active&type=RSS&fid='.$cur_forum['fid'].'"><span>RSS</span></a></div>';/
Now open up viewforum.php and find this line
<h2><span><?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?></span></h2>
and modify it to be
<h2><span><?php echo pun_htmlspecialchars($cur_forum['forum_name']) ?> <a class="rss" href="extern.php?action=active&type=RSS&fid=<?php echo $id /*MODIFIED - RSS*/ ?>"><span>RSS</span></a></span></h2>
And now for the CSS
.forum_rss {float:right;}
a.rss {background:url(../../img/feed.png) no-repeat left; width:16px; height:16px; padding-left:20px;}
a.rss span {display:none;}
Simple and useful, thanks
Dec 11, 2008 at 10:18 pm