MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    BBC News feed

    Scheduled Pinned Locked Moved Utilities
    10 Posts 3 Posters 6.9k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Mykle1M Offline
      Mykle1 Project Sponsor Module Developer @TamP
      last edited by

      @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

      Create a working config
      How to add modules

      1 Reply Last reply Reply Quote 0
      • T Offline
        TamP
        last edited by yawns

        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
        			}
        		},
        	]
        
        };
        
        Mykle1M 1 Reply Last reply Reply Quote 0
        • Mykle1M Offline
          Mykle1 Project Sponsor Module Developer @TamP
          last edited by

          @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
          

          Create a working config
          How to add modules

          1 Reply Last reply Reply Quote 0
          • T Offline
            TamP
            last edited by

            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

            1 Reply Last reply Reply Quote 0
            • justjim1220J Offline
              justjim1220 Module Developer
              last edited by

              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.

              "Life's Too Short To Dance With Ugly People"
              Jim Hallock - 1995

              T 1 Reply Last reply Reply Quote 1
              • T Offline
                TamP @justjim1220
                last edited by

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

                justjim1220J 1 Reply Last reply Reply Quote 0
                • T Offline
                  TamP
                  last edited by

                  This post is deleted!
                  1 Reply Last reply Reply Quote 0
                  • justjim1220J Offline
                    justjim1220 Module Developer @TamP
                    last edited by

                    @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

                    "Life's Too Short To Dance With Ugly People"
                    Jim Hallock - 1995

                    T 1 Reply Last reply Reply Quote 1
                    • T Offline
                      TamP @justjim1220
                      last edited by

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

                      1 Reply Last reply Reply Quote 1
                      • 1 / 1
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy