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.

    How to interact with the news module?

    Scheduled Pinned Locked Moved Troubleshooting
    8 Posts 3 Posters 2.4k 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.
    • S Offline
      sdetweil @clhe0423
      last edited by sdetweil

      @clhe0423 it goes before the feeds: [] list as it is not about a specific feed…

      and the this. line doesn’t go in config.js

      and you should practice aligning the {} and [] and indenting the things inside each

      you have 1 too many }

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • clhe0423C Offline
        clhe0423
        last edited by

        oh dear, am a bit lost in this as coding is all new to me
        don’t really understand where to place this ‘ARTICLE_MORE_DETAILS’ part in the code…:(

        {
        module: "newsfeed",
        position: "lower_third",
        			
        config: {
        'ARTICLE_MORE_DETAILS'
        feeds: [
        {
        title: "The Star",
        url: "https://www.thestar.com.my/rss/News"
        },
        {
        title: "Malay Mail",
        url: "https://www.malaymail.com/feed/rss/malaysia"
        },
        ],
        showSourceTitle: true,
        showPublishDate: true,
        broadcastNewsFeeds: true,
        broadcastNewsUpdates: true,
        articleMoreDetails:true,	
        }
        },
        
        S 1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @clhe0423
          last edited by sdetweil

          @clhe0423 said in How to interact with the news module?:

          articleMoreDetails:true,

          u did

          that text above is useless…

          the module layout in confg.js is

          {
              module:"modulename",
              position:"someposition",
              disabled: true or false,
              classes:"somestring if u want more",
              config : {      // everything to configure the module goes inside here
                  // all parms NOT related to a SPECIFIC feed (but all feeds in this case)
                  settingname: settingvalue,
                      ..
                      ..
                  setting_list: [   // like feeds
                      {     // feed 1
                       // all parms related to a specific feed
                         feed_parm1:" feed_parm1_value",
                         feed_parm2:"feed_pamr2_value"
                      },
                      {  // feed 2
                         ...
                      }
                  ]                   
              }
          }
          

          also, EVERY parm is name:value never just a string of text

          and general rules

                 the thing the the left of ';'  does not need quotes
                 the thing to the right of colon is a number (1234, 1234.5) or true/false, does not need quotes
                 otherwise if needs  quotes if it contains letters 1234, some_street, fred, sue, 
                 when u get to the end of a line, ask yourself, is ther MORE to this setting?
                if so, this line should end with a comma  , comma means more to come
          

          if u see an error ‘unexpected token’,
          that USUALLY means missing comma on the line prior to the error line
          the rest of the (usually) is a missing close } or ]

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 Reply Last reply Reply Quote 0
          • T Offline
            thobach @clhe0423
            last edited by

            @clhe0423 You can find here an example how it is used in MMM-Gestures: https://github.com/thobach/MMM-Gestures/blob/master/MMM-Gestures.js#L110 & https://github.com/thobach/MMM-Gestures/blob/master/MMM-Gestures.js#L118

            1 Reply Last reply Reply Quote 0
            • clhe0423C Offline
              clhe0423
              last edited by

              Does the interaction with the news module only work for this MMM-Gesture module?
              As I read through the description, yes I am looking for a module that would allow me to interact with the news module, meaning if I press the “read more” button it would bring me to another page or use the Iframe to show the news.
              I have an IR screen so I can touch the screen using that frame, but the hardware required in this Gesture module requires different sensors?

              1 Reply Last reply Reply Quote 0
              • 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