Advertisement:

Author Topic: [TIP/TRICK] Feeds-By-Board  (Read 15890 times)

Offline JBlaze

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,152
    • @fragicide on Twitter
[TIP/TRICK] Feeds-By-Board
« 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




Note: I did not test this on the 1.1.x series, although it is still the same principles :)
« Last Edit: July 20, 2009, 03:55:23 PM by JBlaze »

Offline SAFAD

  • Full Member
  • ***
  • Posts: 679
  • Gender: Male
  • away
    • أكاديمية صفد سوفت
Re: [TIP/TRICK] Feeds-By-Board
« Reply #1 on: July 20, 2009, 04:22:22 PM »
Good Work
Thx For The TUT
Best Regards
Sadaoui "SAFAD" Abderrahim - Lead Developer @ Electron Inc.

Offline Liam.

  • SMF Hero
  • ******
  • Posts: 2,240
  • Gender: Male
Re: [TIP/TRICK] Feeds-By-Board
« Reply #2 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!

Offline JBlaze

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,152
    • @fragicide on Twitter
Re: [TIP/TRICK] Feeds-By-Board
« Reply #3 on: July 21, 2009, 11:11:58 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 :)

Offline Liam.

  • SMF Hero
  • ******
  • Posts: 2,240
  • Gender: Male
Re: [TIP/TRICK] Feeds-By-Board
« Reply #4 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 ;)

Offline Reflection

  • Full Member
  • ***
  • Posts: 503
  • Gender: Male
    • Wii Powered
Re: [TIP/TRICK] Feeds-By-Board
« Reply #5 on: July 21, 2009, 05:20:45 PM »
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]

Offline Joshua Dickerson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,775
  • Gender: Male
    • joshuaadickerson on GitHub
    • joshuaadickerson on LinkedIn
Re: [TIP/TRICK] Feeds-By-Board
« Reply #6 on: September 25, 2009, 02:12:00 PM »
Just because it is a small modification doesn't mean it isn't worth being packaged.
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?