MagicMirror² v2.13.0 is available! For more information about this release, check out this topic.

BBC News feed



  • I cant seem to find an up to date BBC news feed
    Min is showing news from 3 years ago !!!
    Can anyone help ?


  • Project Sponsor Module Developer

    @TamP

    There are a bunch on this page. I tested the first one and it fired right up.
    https://blog.feedspot.com/bbc_rss_feeds/

    Copy the RSS Feed url of your choice and add it to your config…

    0_1554322025566_Screenshot from 2019-04-03 16-06-05.png
    0_1554322037245_Screenshot from 2019-04-03 16-06-24.png



  • Thanks for that, I have it displayed now, except the title is not showing. This is what I have in the config

    // Newsfeed BBC
    		{
    			module: "newsfeed",
    			position: "bottom_bar",
    config: {
    				feeds: [
    					{
    						title: "BBC UK",
    					 	url: "http://feeds.bbci.co.uk/news/uk/rss.xml"
    					},
    
    					{
    						title: "BBC World",
    					    url: "http://feeds.bbci.co.uk/news/world/rss.xml",
    					},
    
    				],
    				showSourceTitle: true,
    				showPublishDate: false,
    				showDescription: true
    			}
    		},
    	]
    
    };
    

  • Project Sponsor Module Developer

    @TamP said in BBC News feed:

    the title is not showing.

    That’s odd. I can’t make the title go away. Even with all three of these set to false:

    showSourceTitle: false,
    showPublishDate: false,
    showDescription: false
    


  • Yes isnt it. I try this and it didnt seem to do anything
    Its not a big deal but I just wonder if I had done something wrong


  • Module Developer

    there is an omission in the newsfeed.js file, that is causing this problem…

    this secton:

    if(!this.config.showFullArticle){
            var title = document.createElement("div");
    	title.className = "bright medium light" + (!this.config.wrapTitle ? " no-wrap" : "");
    	title.innerHTML = this.newsItems[this.activeItem].title;
    	wrapper.appendChild(title);
    }
    

    states if(!this.config.showFullArticle){

    But there isn’t a showFullArticle: false; in 'defaults

    So, basically it is ignoring the showSourceTitle: true, because this section cannot be executed

    I think it would make more sense to have the above code snippet be worded like this:

    if(this.config.showSourceTitle){
            var title = document.createElement("div");
    	title.className = "bright medium light" + (!this.config.wrapTitle ? " no-wrap" : "");
    	title.innerHTML = this.newsItems[this.activeItem].title;
    	wrapper.appendChild(title);
    }
    

    then maybe add:

    showSourceTitle = false;
    

    to this section of code:

    if (this.config.showFullArticle) {
    	var fullArticle = document.createElement("iframe");
    	fullArticle.className = "";
    	fullArticle.style.width = "100vw";
    	// very large height value to allow scrolling
    	fullArticle.height = "3000";
    	fullArticle.style.height = "3000";
    	fullArticle.style.top = "0";
    	fullArticle.style.left = "0";
    	fullArticle.style.border = "none";
    	fullArticle.src = this.getActiveItemURL()
    	fullArticle.style.zIndex = 1;
    	wrapper.appendChild(fullArticle);
    }
    

    if you don’t want the title to display while the article is being displayed.



  • @justjim1220 I tried altering the code as you suggest but unfortunately I am still not seeing the BBC title



  • This post is deleted!

  • Module Developer

    @TamP

    you might try deleting the module then reinstalling it

    I just tried exactly what you have configured and it works just fine…

    Since newsfeed is a part of the initial MM2 installation, go here: https://github.com/MichMich/MagicMirror/tree/master/modules/default/newsfeed
    and get the newsfeed files themselves. You probably only need the actual js files: fetcher.js & newsfeed.js
    right click on the file and click Save Link As… then save to your newsfeed directory within MM2



  • @justjim1220 Yes that is what I did and all is OK
    Thanks again


Log in to reply