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.

    Changing compliments

    Scheduled Pinned Locked Moved Troubleshooting
    49 Posts 9 Posters 39.3k Views 9 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.
    • Mykle1M Offline
      Mykle1 Project Sponsor Module Developer @AliAS
      last edited by

      @AliAS said in Changing compliments:

      Does that sound right?

      Sure, but another idea would be to rename the non-functioning config (so you don’t lose what’s in it) and THEN make a new copy of the config.js.sample and rename it to config.js. :-)

      Create a working config
      How to add modules

      S 1 Reply Last reply Reply Quote 2
      • S Offline
        Stacy @Mykle1
        last edited by

        @Mykle1 Okay. We finally figured it out. We made an external join file for new compliments and that worked. Thank you all SOuch for your help.

        1 Reply Last reply Reply Quote 1
        • Mykle1M Offline
          Mykle1 Project Sponsor Module Developer
          last edited by

          Well done! :-)

          Create a working config
          How to add modules

          1 Reply Last reply Reply Quote 0
          • A Offline
            AliAS
            last edited by

            External join file? Lol, thats way outta my league.

            1 Reply Last reply Reply Quote 0
            • A Offline
              AliAS
              last edited by

              Does anybody know how to use a line break within a compliment? I’ve tried about a dozen different ways to no avail.

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

                @AliAS
                Compliments are included via document.createTextNode(complimentText); which doesn’t allow HTML inside.

                But you can change the line within getDom: function() {} that includes the compliment from
                wrapper.appendChild(compliment);
                to
                wrapper.innerHTML = complimentText;

                and then just add a <br /> to the compliment.

                A 1 Reply Last reply Reply Quote 3
                • A Offline
                  AliAS
                  last edited by

                  I see. I’ll give it a try. Thank you very much.

                  1 Reply Last reply Reply Quote 0
                  • A Offline
                    AliAS @doubleT
                    last edited by

                    @doubleT That worked perfect. Thanks again!

                    1 Reply Last reply Reply Quote 0
                    • K Offline
                      KC5RIL
                      last edited by

                      Oh, great! Another noob needs help configuring the Compliments module. I’ve sussed through this for two days trying to get this up and running to earn ‘cool dad points.’ I’ve followed along and made changes to the config.js file as described. When I run ‘npm start’ I get the following: ```
                      code_text

                      
                      > magicmirror@2.12.0 start /home/pi/MagicMirror
                      > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
                      
                      [2020-08-19 20:06:47.257] [LOG]    Starting MagicMirror: v2.12.0
                      [2020-08-19 20:06:47.264] [LOG]    Loading config ...
                      [2020-08-19 20:06:47.268] [ERROR]  WARNING! Could not validate config file. Starting with default configuration. Please correct syntax errors at or above this line: /home/pi/MagicMirror/config/config.js:68
                      			config: {
                      			^^^^^^
                      
                      SyntaxError: Unexpected identifier
                          at Module._compile (internal/modules/cjs/loader.js:722:23)
                          at Object.Module._extensions..js (internal/modules/cjs/loader.js:798:10)
                          at Module.load (internal/modules/cjs/loader.js:645:32)
                          at Function.Module._load (internal/modules/cjs/loader.js:560:12)
                          at Module.require (internal/modules/cjs/loader.js:685:19)
                          at require (internal/modules/cjs/helpers.js:16:16)
                          at loadConfig (/home/pi/MagicMirror/js/app.js:67:12)
                          at App.start (/home/pi/MagicMirror/js/app.js:202:3)
                          at Object.<anonymous> (/home/pi/MagicMirror/js/electron.js:126:7)
                          at Module._compile (internal/modules/cjs/loader.js:786:30)
                      [2020-08-19 20:06:47.269] [LOG]    Loading module helpers ...
                      [2020-08-19 20:06:47.317] [LOG]    Initializing new module helper ...
                      [2020-08-19 20:06:47.318] [LOG]    Module helper loaded: updatenotification
                      [2020-08-19 20:06:47.321] [LOG]    No helper found for module: helloworld.
                      [2020-08-19 20:06:47.322] [LOG]    All module helpers loaded.
                      [2020-08-19 20:06:47.445] [LOG]    Starting server on port 8080 ... 
                      [2020-08-19 20:06:47.458] [LOG]    Server started ...
                      [2020-08-19 20:06:47.459] [LOG]    Connecting socket for: updatenotification
                      [2020-08-19 20:06:47.460] [LOG]    Sockets connected & modules started ...
                      [2020-08-19 20:06:47.556] [LOG]    Launching application.
                      
                      

                      What am I looking at? And how can I correct? Bear with a middle aged noob. You might have to explain this in crayon. Thanks for the help.

                      Mykle1M S 2 Replies Last reply Reply Quote 0
                      • Mykle1M Offline
                        Mykle1 Project Sponsor Module Developer @KC5RIL
                        last edited by

                        @KC5RIL

                        Post your config entry for compliments in a code block

                        Create a working config
                        How to add modules

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