Read the statement by Michael Teeuw here.
how to pull new element added to an array?
-
What is the possibility of using and array of sorts?
place the logos in a pics folder, call them according to the newsItem[activeItem].title, Ive seen some examples, and tried it a few different ways, but not sure if I am missing something as I can’t get it to work.
recent example tried:
feeds…{ title: "New York Times: ", url: "http://www.nytimes.com/services/xml/rss/nyt/HomePage.xml" }, { title: "Wall St. Journal: ", url: "http://www.wsj.com/xml/rss/3_7085.xml" }, { title: "USA Today: ", url: "http://rssfeeds.usatoday.com/UsatodaycomNation-TopStories" }, { title: "BBC World News: ", url: "http://feeds.bbci.co.uk/news/world/rss.xml#" }
Array…
iconArray: { "USAToday": "USA Today: ", "NewYorkTimes": "New York Times: ", "WallStJournal": "Wall St. Journal: ", "BBCWorldNews": "BBC World News: " }
Added this to start function…
this.logo = {};
sample code…
var logo = this.logo; if (this.config.showDescription) { var description = document.createElement("div"); //description.setAttribute("style", "padding-top: 25px"); description.className = "bright xlarge bold" + (!this.config.wrapDescription ? " no-wrap" : ""); var txtDesc = this.newsItems[this.activeItem].description; description.innerHTML = "<img class = image src=./modules/default/newsfeed/pics/" + logo.icon + ".png height=150px valign=middle>" + "<marquee scrollamount=20 scrolldelay=0 left=500px>" + "<font color=yellow>" + moment(new Date(this.newsItems[this.activeItem].pubdate)).fromNow() + " : " + "</font>" + this.newsItems[this.activeItem].title + " || " + txtDesc + "</marquee>"; wrapper.appendChild(description); }
Any chance this could work easier if I had it coded correctly?
Seems Like I should be declaring the
newsItem[activeItem].title
to equal the icon/logo in some fashion…
-
@justjim1220 no, not really…
-
ok, just a thought, seen it with a few other modules. Thanks!
-
@justjim1220 any idea why the newsticker doesn’t work at all?
u don’t have a package.json, so the install instructions for npm install is not needed…
-
No, no idea, one of the reasons I uploaded it as a repository, to let you and whoever else wants to gander at it and see what the issues are or could be.
Not sure when you downloaded it, but I made some minor changes to it a few hours ago. just some syntax errors and such.
Nonetheless, still can’t get it to work.
-
@justjim1220 yeh, I just want to get default behavior working… I have added my code, it should work, just want to test…
-
kind of an example of what I am looking to accomplish…
Only, instead of the title on the left side, I am wanting to show the logo associated with the newsfeed.
Like this:
-
@justjim1220 understood…
i just can’t get the module to do ANYTHING…
it loads, and registers, and that is it… no functions are called…
-
I’m not understanding it myself, I’ll keep plugging away at it.
Feel free to collaborate on it any time you feel like it.
Thanks for all your help thus far! :winking_face:
-
@justjim1220 I added all the defined functions and none are called…