Read the statement by Michael Teeuw here.
BBC News feed
-
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 } }, ] };
-
@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 -
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 'defaultsSo, basically it is ignoring the
showSourceTitle: true,
because this section cannot be executedI 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! -
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