Add an RSS feed block to the sidebar [Deleted]

Paul B

XenForo moderator
Staff member
Brogan submitted a new resource:

Add an RSS feed block to the sidebar (version 1.0) - Feed me!

This guide will explain how to add an RSS feed block to the sidebar as shown below.

View attachment 26111View attachment 26112

The code is fully customisable but this mod consists of 3 stacked feeds in a single block (left image) or a single feed (right image).
The snippet at the top will cycle through each feed in turn and the relevant feed will be underlined when selected. The snippet will also pause on hover (configurable).
Each headline can be hovered over to see the snippet...

Read more about this resource...
 
Is it possible to do same from each Category i guess here we are getting RSS feeds from each forums.
 
You can use any RSS URL(s) you wish.

Just change the relevant code as required:
Code:
title: 'BBC News', /** Title of the feed */
url: 'http://feeds.bbci.co.uk/news/rss.xml' /** URL of the feed */
 
I've added a new css file to the first post which will show the snippet titles on 2 rows.
This is only required for the sidebar due it being so narrow.
The result is as follows:

two_rows.webp
 
I've just tweaked the css again so the selected news item underlines rather than being bold.
This is to avoid issues with IE wrapping the items to 2 rows :rolleyes:

It makes it consistent with the mouseover effect anyway so probably a better approach to take.

underline.webp
 
I wish I saw this earlier! I signed up for rssinclude which costs me 40 bux a year roughly when I could of done this which looks much much better. Ill be trying this out when I get some time Brogan, love your work. One question. I use XenPortal, will there be an easy enough way to integrate it into the XenPortal sidebar also? so its consistent with the whole site, i tried creating a XenPortal module using the xen include template code but it doesnt seem to work in Xenportal, cheers Brogan.
 
I don't have XenPortal installed but I can't see any reason why you can't add it to the sidebar.

Once you've created the templates, or template if you want to do it all in a single template, you can add it to any other template using xen:include.

What was the result when you tried to add it?
 
I don't have XenPortal installed but I can't see any reason why you can't add it to the sidebar.

Once you've created the templates, or template if you want to do it all in a single template, you can add it to any other template using xen:include.

What was the result when you tried to add it?

Just added your fantastic mod, Works fine on all pages. In the portal it also works fine but there is a message at the bottom of the feed "Fetching Feed" I set the cache to 'now' for the xml template so not too sure? Not a huge issue I guess.

Ill leave it up so you can take a look.

http://mmazone.com.au/community/portal/

Just a couple of questions. Is there a way to integrate feeds that have pictures? If you look at my portal I have an RSS feed on the left with pictures, can it be done? Also, just a thought here but what do you think about having the rss in the top of the page of the portal and the rest of the forum? Maybe 3 colums across or something? Ive attached a picture of what I mean, thanks Brogan.

rss.webp
 
The Fetching feeds message is because you have 2 instances of the script running on the same page.
If you remove one it will work.
Or you might be able to edit the code to get multiple instances working, I haven't checked if that's possible.
Either that or there's an error in your template/code.

RSS is designed to be a basic text feed so doesn't support images.
You would need a custom add-on for that.

If you want the feed(s) to display horizontally across 3 columns then you would need multiple feeds as the vertical stack isn't configurable. Again you would have to resolve the issue of multiple instances on 1 page.
 
The Fetching feeds message is because you have 2 instances of the script running on the same page.
If you remove one it will work.
Or you might be able to edit the code to get multiple instances working, I haven't checked if that's possible.
Either that or there's an error in your template/code.

RSS is designed to be a basic text feed so doesn't support images.
You would need a custom add-on for that.

If you want the feed(s) to display horizontally across 3 columns then you would need multiple feeds as the vertical stack isn't configurable. Again you would have to resolve the issue of multiple instances on 1 page.

I disabled the other RSS feed as you suggested but still says fetching feeds. So i removed the other RSS module completley but still the same issues, maybe i need to wait for some sort of google cache refresh?

ahh ok I think i meant... i forgot the name lol is it RSS2 or RSS XML? the one with the pictures anyway, like on the left you would of seen before in my portal, that is an RSS feed with pictures, is that doable via your methods?

What about 3 vertical feeds? would that be easier?

Ive attached the XML i made for the portal, i think i did everything right, all I aded was the xen:include with the template.

Thanks for your time Brogan.
 

Attachments

You're still trying to load the feed block twice in the sidebar.

Sorry, i thought you meant the RSS block that I had from RSSinclude on the left hand side. Do you mean the actual portal news feed coming from the forums ?
 
I don't know how you've got it set up but looking at the code I can see 2 instances of the RSS block.

I have highlighted the second one in the attached screenshot.

feed.webp
 
I don't know how you've got it set up but looking at the code I can see 2 instances of the RSS block.

I have highlighted the second one in the attached screenshot.

View attachment 8024

The portal must retrieve the news via RSS feed also. No biggie, it just says fetching feeds on the portal only but it works fine so i wont worry to much for now. One more question, is there anyway to integrate this kind of RSS(pictures)? example : http://www.w3streams.com/
 
Brogan, noticed IE doesn't respect the overflow hidden parameter (or I think it is).
So when a feed title is too long, it wraps.

Is there anyway to limit the number of characters of a Feed Title or force IE to hide the remanding characters?
 

Attachments

  • rss.webp
    rss.webp
    14.5 KB · Views: 33
I tried for hours to get that to work, in the end I couldn't.

Which is why I was forced to set 2 rows for the snippet title.

It's just another example of why people shouldn't use IE, IMO.
 
Top Bottom