Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: JBlaze on July 20, 2009, 03:50:29 PM

Title: [TIP/TRICK] Feeds-By-Board
Post by: JBlaze on July 20, 2009, 03:50:29 PM
OK, so this tip will place a RSS Feed icon next to each board, and will give the feed for that board only.

It is very simple.

Now, open up /Themes/{your_theme}/BoardIndex.template.php
Code (find) Select
<h4><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
Code (replace with) Select
<h4><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a> <a href="', $scripturl, '?board=', $board['id'], ';action=.xml;type=rss"><img src="', $settings['images_url'], '/feed.png" alt="RSS Feed" /></a>';

Now, you can either use the default SMF RSS Feed icon (/Themes/default/images/rss.gif), or take the attached rss feed icon and place it in /Themes/default/images

If you decide to use the default SMF icon, simply do the following:
Code (find) Select
', $settings['images_url'], '/feed.png
Code (replace) Select
', $settings['images_url'], '/rss.gif

And that's it!



Screenshot

(https://www.simplemachines.org/community/index.php?action=dlattach;topic=325507.0;attach=107562;image)



Note: I did not test this on the 1.1.x series, although it is still the same principles :)
Title: Re: [TIP/TRICK] Feeds-By-Board
Post by: SAFAD on July 20, 2009, 04:22:22 PM
Good Work
Thx For The TUT
Title: Re: [TIP/TRICK] Feeds-By-Board
Post by: Liam. on July 21, 2009, 10:48:05 AM
Thats really pretty good! Do you mind if I package this as a mod? I've been waiting for an RSS Trick for a while now for my site, good job!
Title: Re: [TIP/TRICK] Feeds-By-Board
Post by: JBlaze on July 21, 2009, 11:11:58 AM
Quote from: iKorp on July 21, 2009, 10:48:05 AM
Thats really pretty good! Do you mind if I package this as a mod? I've been waiting for an RSS Trick for a while now for my site, good job!

You can try. I doubt it will get approved as it is such a small modification. That's why I posted it here :)
Title: Re: [TIP/TRICK] Feeds-By-Board
Post by: Liam. on July 21, 2009, 05:10:57 PM
M'eh, they accept weird little mods in the Customization site. I could probably submit a package that adds a random file to a directory that won't be used, and they'd probably accept it xD Thanks though ;)
Title: Re: [TIP/TRICK] Feeds-By-Board
Post by: Reflection on July 21, 2009, 05:20:45 PM
vbgamer has done this already.

http://custom.simplemachines.org/mods/index.php?mod=376
Title: Re: [TIP/TRICK] Feeds-By-Board
Post by: Joshua Dickerson on September 25, 2009, 02:12:00 PM
Just because it is a small modification doesn't mean it isn't worth being packaged.