Adding RSS Links to MediaWiki Site
From Zanecorpwiki
Help people watch the evolution of your wiki.
Subscriptions are good, so this technique puts RSS bagdes in the upper right corner. We use the monobook style, though the approach will work with others and can be modified to put the RSS links in other boxes.
The upper right corner (in monobook) is your 'personal' toolbar. In 'skins/Monobook.php', look for 'p-personal'. This is where the personal toolbar is generated. After the end of the UL element and before th closing DIV, we ad the following:
lt;a class=rssLink href=/wiki/index.php?title=Special:NewPagesfeed=rssNEWimg src=/wiki/skins/monobook/rss.png /gt;lt;/agt; lt;a class=rssLink href=/wiki/index.php?title=Special:RecentChangesfeed=rssCHANGEDimg src=/wiki/skins/monobook/rss.png /gt;lt;/agt;
I tried using relative directories, but it didn't work. Not sure why, but it doesn't matter much. Just realize that if your wiki is deployed to something other than '/wiki' you'll have to adjust the first part of the absolute paths in the links and image links.
To get the RSS image, find a good RSS png on the web (there's lots of free ones) and size the image to the line height. With my styling, that's 14px.
Now you need to make two changes to ~/skins/monobook/main.css:
#p-personal .pBody {
...
text-align: right; /* add this so our rss links align to the right */
}
and
#p-personal .pBody .rssLink { /* get the RSS links to align with the personal tool bars
margin-right: 22px;
}
If you've adjusted the padding in the personal box, you'll need something other than 22px. Use firebug to get your alignments right.


