Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Thema gestartet von: JBlaze in Juli 20, 2009, 03:50:29 NACHMITTAGS

Titel: [TIP/TRICK] Feeds-By-Board
Beitrag von: JBlaze in Juli 20, 2009, 03:50:29 NACHMITTAGS
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) Auswählen
<h4><a href="', $board['href'], '" name="b', $board['id'], '">', $board['name'], '</a>';
Code (replace with) Auswählen
<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) Auswählen
', $settings['images_url'], '/feed.png
Code (replace) Auswählen
', $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 :)
Titel: Re: [TIP/TRICK] Feeds-By-Board
Beitrag von: SAFAD in Juli 20, 2009, 04:22:22 NACHMITTAGS
Good Work
Thx For The TUT
Titel: Re: [TIP/TRICK] Feeds-By-Board
Beitrag von: Liam. in Juli 21, 2009, 10:48:05 VORMITTAG
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!
Titel: Re: [TIP/TRICK] Feeds-By-Board
Beitrag von: JBlaze in Juli 21, 2009, 11:11:58 VORMITTAG
Zitat von: iKorp in Juli 21, 2009, 10:48:05 VORMITTAG
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 :)
Titel: Re: [TIP/TRICK] Feeds-By-Board
Beitrag von: Liam. in Juli 21, 2009, 05:10:57 NACHMITTAGS
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 ;)
Titel: Re: [TIP/TRICK] Feeds-By-Board
Beitrag von: Reflection in Juli 21, 2009, 05:20:45 NACHMITTAGS
vbgamer has done this already.

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