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.

    Default newsfeed - make list?

    Scheduled Pinned Locked Moved Requests
    14 Posts 3 Posters 7.7k 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.
    • D Offline
      doubleT Module Developer
      last edited by

      @Pade2204 said in Default newsfeed - make list?:

      Im not good to see, where you edit those things you have made? Can you make a dummy guide for me? hehe :)

      Sure, but I’d suggest reading – and learning – about the basics of JavaScripts first, or this could get a bit complicated.

      I worked directly in the default newsfeed module, which I’d absolutely not suggest doing. a) This could break the default module and you have to rebuild the code. b) With the next update, the code will be reset to its original state and your changes are lost.

      Having said that, to experiment with this module, I changed the /MagicMirror/modules/default/newsfeed/newsfeed.js that I opened in an editor. You’ll see the functions I mentioned above. Note that I commented where the original code of a function was left untouched. In the getDom: I put some part of the original code with the else { } part of an if statement.

      EDIT: I made a git repository of the changes I made. You can look at my code here: https://github.com/TTigges/newsstack/blob/master/newsfeed.js

      1 Reply Last reply Reply Quote 1
      • P Offline
        Pade2204
        last edited by Pade2204

        I just tried your code, with default setting (copy/paste into newsfeed.js)

        It looks like this when the feed is loading. Then it counts down and show 1 lines less every second? Is that in purpose?

        Feed at startup

        1 Reply Last reply Reply Quote 0
        • D Offline
          doubleT Module Developer
          last edited by

          Yes, but you forgot the custom.css.

          1 Reply Last reply Reply Quote 0
          • P Offline
            Pade2204
            last edited by Pade2204

            I have the custom.css file in modules/default/newsfeed/
            :/

            and tried to name it custom.css and newsfeed.css

            1 Reply Last reply Reply Quote 0
            • D Offline
              doubleT Module Developer
              last edited by

              The lines are ment for MagicMirror/css/custom.css – just add them.
              Alternatively, add this function in the module (probably after start: function():

              getStyles: function() {
              	return [
              		this.file('custom.css')
              	]
              },
              
              P 1 Reply Last reply Reply Quote 0
              • P Offline
                Pade2204 @doubleT
                last edited by

                Thanks. This is great. Now it works with .css file.

                But:

                It does not show the headers title for instance “CNN” - and no timestamps? Is it possible to add short timestamp before the news headline?

                These have no effect:
                showSourceTitle: true,
                showPublishDate: true,

                And 1 last thing - Do you control the speed of the sliding somewhere - Or maybe just slide in new entries when you reach max entries?

                Thanks, man!

                1 Reply Last reply Reply Quote 0
                • D Offline
                  doubleT Module Developer
                  last edited by

                  As I said, this is nowhere near complete, just playing around. Speed is the same as in the config. The rest can be done. I’ll look into it.

                  P 1 Reply Last reply Reply Quote 0
                  • P Offline
                    Pade2204
                    last edited by

                    Thanks man. Its really nice of you.

                    Thnaks!

                    1 Reply Last reply Reply Quote 0
                    • P Offline
                      Pade2204
                      last edited by

                      Had any time to look into this?

                      1 Reply Last reply Reply Quote 0
                      • P Offline
                        Pade2204 @doubleT
                        last edited by

                        @doublet said in Default newsfeed - make list?:

                        As I said, this is nowhere near complete, just playing around. Speed is the same as in the config. The rest can be done. I’ll look into it.

                        doublet, any chance you have time to fix this? Thanks.

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