• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Loading compliments from external file

Scheduled Pinned Locked Moved Solved Requests
4 Posts 3 Posters 2.8k 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.
  • B Offline
    bhepler Module Developer
    last edited by Oct 27, 2016, 2:31 AM

    Greetings!

    My mirror project is destined to be a gift for a friend and as part of the configuration for it, my wife and her friends are writing a metric buttload (100+) of compliments. I’m going to have to load those compliments into the compliment module. Which is fine, but I am concerned that if I screw up even one of those compliments, the config.js file will not be a valid file and the MagicMirror interface will not display properly.

    My solution, thanks in no small part to @strawberry-3-141 expert assistance, is to put the compliment arrays into a separate JSON file and load that file as an optional parameter fileName. I have the code ready and it has passed my alpha testing. The fileName parameter is optional and this is an extension of the existing core modules.

    I’d like to add this feature to the core MagicMirror project. Is this a valuable feature? How do I go about contributing a minor change to the core?

    1 Reply Last reply Reply Quote 0
    • K Offline
      KirAsh4 Moderator
      last edited by Oct 27, 2016, 6:11 AM

      Submit a PR request on the Github page. Do it against the ‘develop’ branch please.

      A Life? Cool! Where can I download one of those from?

      1 Reply Last reply Reply Quote 3
      • B Offline
        bhepler Module Developer
        last edited by Oct 27, 2016, 11:53 AM

        Done. Thanks.

        1 Reply Last reply Reply Quote 1
        • T Offline
          tajno
          last edited by tajno Oct 31, 2016, 1:08 AM Oct 31, 2016, 1:06 AM

          Nice, I was looking for that feature - thanks for your work bhelper. Good idea! Actually I try to change the color as well, but I wasn’t successfull so far.

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