News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

[TIP/TRICK] Feeds-By-Board

Started by jblazeofek, July 20, 2009, 03:50:29 PM

Previous topic - Next topic

JBlaze

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





Note: I did not test this on the 1.1.x series, although it is still the same principles :)
Jason Clemons
Former Team Member 2009 - 2012

SAFAD

Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Liam.

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!

JBlaze

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 :)
Jason Clemons
Former Team Member 2009 - 2012

Liam.

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 ;)

Reflection

Good "SMF" Portals
Tiny Portal [SMF 1.1.x only]
Simple Portal [SMF 1.1.x and 2.0]


Good "SMF" Theme Sites
SMF Themes [SMF 1.1.x and 2.0]
Dziner Studio [SMF 1.1.x and 2.0]

Joshua Dickerson

Just because it is a small modification doesn't mean it isn't worth being packaged.
Come work with me at Promenade Group



Need help? See the wiki. Want to help SMF? See the wiki!

Did you know you can help develop SMF? See us on Github.

How have you bettered the world today?

Advertisement: