0

Customize RSS Feed Background Color (revisited)

I am reposting this question because I believe the old thread has been abandoned and the new forum interface prevents topics from bumping to the top when new messages are added.

I would like to modify the script to change the background color of a RSS text feed zone when a certain string of characters comes through the RSS feed on a particular article.  Then I'd like the original background color to return for the next article.  I had all of the tools to do this until I upgraded the firmware to 3.8.19 and BrightAuthor to 2.4.0.17.  The command zone.widget.SetBackgroundColor(&haaff0000) now seems to be obsolete.  Please advise.

5 comments

  • 0
    Avatar
    Lyndon

    It's not the command that's obsolete, but the object....You have to find in the script where the the rss content is pushed into the text widget. So, start by searching for pushstring or getarticle or getnextarticle. That's where the rss is actually getting parsed. Next, look for the command to pushstring, to add the text to the text widget.

    That widget is the object you can use to set the background color.  Ok, this is the section you should be looking for...

     

    if type(tickerItem.rssParser) = "roRssParser" then
    for each article in tickerItem.articles
    m.stateMachine.widget.PushString(article)
    next
    else if type(tickerItem.textStrings) = "roArray" then
    for each textString in tickerItem.textStrings
    m.stateMachine.widget.PushString(textString)
    next
    endif

     

    So, m.stateMachine.widget is what you would attach setbackgroundcolor to. Also, article is the string you would check to see if there's a specific value met. 

  • 0
    Avatar
    Mkeen

    Thank you for the assistance.  I am now able to successfully evaluate "article" to determine if it qualifies as urgent and I can see that that SetBackgroundColor command does work.  However, I'm still stuck.

    I am issuing the SetBackgroundColor with each iteration of the for loop that issues the PushString(article) command.  However, the background color only seems to get changed based on the last article in the RSS feed.

    This doesn't work for me.  I want to be able to change the background color only on urgent news articles and change it back on non-urgent articles.  Any help would be greatly appreciated.

  • 0
    Avatar
    Lyndon

    Can you send me the modified file you're using? Maybe there's an issue with changing the rss color that I'm missing. 

  • 0
    Avatar
    Mkeen

    The requested file is attached.

  • 0
    Avatar
    Mkeen

    bump

Please sign in to leave a comment.