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.

    MMM-WOTD

    Scheduled Pinned Locked Moved Fun & Games
    7 Posts 5 Posters 2.7k Views 5 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.
    • cowboysdudeC Offline
      cowboysdude Module Developer
      last edited by cowboysdude

      Word of the day Module for your mirror!

      1.png

      See README for instructions

      Download:

      Download Here

      Version 1.0.0

      1 Reply Last reply Reply Quote 3
      • L Offline
        lxne Project Sponsor
        last edited by

        Hi, I have updated my MagicMirror to 2.15.0 and then installed MMM-WOTD but I do not get any output. My MM runs with quite a view modules but MMM-WOTD won’t show up.

        According to my telegram-bot these modules are installed (MMM-WOTD is not among those):

        alert
        MMM-pages
        MMM-UpdateNotification
        MMM-TelegramBot
        MMM-Volume
        MMM-Tools
        MMM-GoogleAssistant
        MMM-Assistant2Display
        clock
        MMM-DWD-WarnWeather
        calendar
        MMM-MplayerRadio
        MMM-MusicOnDemand
        MMM-Weather
        MMM-DarkSkyForecast
        newsfeed
        MMM-NewsFeed
        MMM-GroveGestures

        In the log I can only find one line regarding MMM-WOTD and it says: [02.04.2021 21:28.53.261] [LOG] No helper found for module: MMM-WOTD.

        Any idea what might be the problem?

        Best wishes.

        bugsounetB 1 Reply Last reply Reply Quote 0
        • bugsounetB Offline
          bugsounet Banned @lxne
          last edited by

          @cowboysdude : you have set an error when you have created the repository …
          why WWW-WOTD ?
          in your module, you have Set MMM-WOTD

          So that why @lxne have an issue (nodule not found)

          And an error on the getDom function

              getDom: function() {
                var wrapper = document.createElement("div");
          
                if(this.loaded == true){
                  var wotd = this.wotd[0]; 
                  var wordTable = document.createElement('div');
                  
                  if (this.config.style == 'narrow') {
                      wordTable.classList.add('narrow');
                  } else {
                      wordTable.classList.add('wide');
                  }
                  
                  var wordTR = document.createElement('tr');
                  
                  var word = document.createElement('td');
                  word.classList.add('bright', 'small');
                  word.setAttribute('style', 'background:' + this.config.wbackground);
                  word.innerHTML = "Word  ";
                  wordTR.appendChild(word);
                  
                  
                  var word2 = document.createElement('td');
                  word2.classList.add('small');
                  word2.setAttribute("style", "color:" + this.config.word + "; background-color: " + this.config.dbackground + ";"); 
                  word2.innerHTML = wotd.word;
                  wordTR.appendChild(word2);
                  
                  wordTable.appendChild(wordTR);
                  
                  var wordTR2 = document.createElement('tr');
                  
                  var wordd = document.createElement('td');
                  wordd.classList.add('bright', 'small');
                  wordd.setAttribute('style', 'background:' + this.config.wbackground);
                  wordd.innerHTML = "Meaning  ";
                  wordTR2.appendChild(wordd);
                  
                  
                  var wordd2 = document.createElement('td');
                  wordd2.classList.add('small');
                  wordd2.setAttribute('style', 'color:' + this.config.definition + '; background-color: ' + this.config.dbackground + ';');
                  wordd2.innerHTML = wotd.definition;
                  wordTR2.appendChild(wordd2);
                  
                  wordTable.appendChild(wordTR2);
                  
                  var wordTR3 = document.createElement('tr');
                  
                  var wordf = document.createElement('td');
                  wordf.classList.add('bright', 'small');
                  wordf.setAttribute('style', 'background:' + this.config.wbackground);
                  wordf.innerHTML = "Say  ";
                  wordTR3.appendChild(wordf);
                  
                  
                  var wordf2 = document.createElement('td');
                  wordf2.setAttribute('style', 'color:' + this.config.say + '; background-color: ' + this.config.dbackground + ';');
                  wordf2.classList.add('small');
                  wordf2.innerHTML = wotd.pronunciation;
                  wordTR3.appendChild(wordf2);
                  
                  wordTable.appendChild(wordTR3);
                  wrapper.appendChild(wordTable);
                }
                return wrapper;
              },
          
          • wow … tr/td tag like win95 ???, i think, you can do better !
          • I have corrected your error… you have not created the Dom on first request
          • package.json missing ! (if an user do npm install … it will install MagicMirror !)

          @lxne: for a temp resolve, just rename WWW-WOTD in modules directory to MMM-WOTD

          cowboysdudeC 1 Reply Last reply Reply Quote 1
          • cowboysdudeC Offline
            cowboysdude Module Developer @bugsounet
            last edited by

            V2 is out!

            Changes have been done to conform with the non use of request :)
            It uses Axios now.

            All updates files including new package.json file are there.

            https://github.com/cowboysdude/WWW-WOTD

            WOTD.png

            J 1 Reply Last reply Reply Quote 0
            • J Offline
              JohnGalt @cowboysdude
              last edited by

              @cowboysdude Did you intend to call this module “WWW-WOTD” instead of the standard “MMM-…” ??

              I downloaded it, it installed itself as “WWW-WOTD” and it does not run. I did not delve into the code, but suspect the non-standard name may be spread through the code.

              Any thoughts?

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @JohnGalt
                last edited by

                @JohnGalt the repo name is right …

                maybe the git repo inside is wrong

                do this

                git clone https://github.com/cowboysdude/MMM-WOTD MMM-WOTD

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                J 1 Reply Last reply Reply Quote 0
                • J Offline
                  JohnGalt @sdetweil
                  last edited by

                  @sdetweil Sam-thanks. It does load now. I’ll have to go back and [re-]learn some css to get it to fit in with the other modules, as it is way too tall, but this is progress. Thanks again

                  1 Reply Last reply Reply Quote 0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • 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