• 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.

Touch input examples for MM Module

Scheduled Pinned Locked Moved Development
18 Posts 5 Posters 3.4k 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.
  • S Away
    sdetweil @jcleary05
    last edited by Jan 28, 2020, 1:59 PM

    @jcleary05 mysql, yes , see the node library https://www.npmjs.com/package/mysql, which gives you node methods to call to connect and access the database

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    1 Reply Last reply Reply Quote 1
    • J Offline
      jcleary05
      last edited by Feb 4, 2020, 8:14 PM

      @sdetweil
      Thanks again for getting back to me!

      Do you believe it will be possible for me to submit an entry to a database using the nodehelper.js file?

      I am currently trying to find an example but I am unsure of any which are available?

      S 1 Reply Last reply Feb 4, 2020, 8:20 PM Reply Quote 0
      • S Away
        sdetweil @jcleary05
        last edited by sdetweil Feb 4, 2020, 8:28 PM Feb 4, 2020, 8:20 PM

        @jcleary05 sure… I use mongodb, and connect to it via the node helper

        here is a web page that describes all the operations (connect, search/get/select,
        update,

        https://www.w3schools.com/nodejs/nodejs_mysql.asp

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 1
        • J Offline
          jcleary05 @lavolp3
          last edited by Feb 4, 2020, 8:27 PM

          @lavolp3 Sorry man just seeing your message now,
          Thank you! this will be extremely helpful!

          S 2 Replies Last reply Feb 4, 2020, 8:29 PM Reply Quote 0
          • S Away
            sdetweil @jcleary05
            last edited by sdetweil Feb 4, 2020, 8:43 PM Feb 4, 2020, 8:29 PM

            @jcleary05 sorry, forgot to paste in the url

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            1 Reply Last reply Reply Quote 1
            • J Offline
              jcleary05 @lavolp3
              last edited by Feb 4, 2020, 8:41 PM

              @lavolp3

              Just reviewing your modules, they look great! in particular I may have a use case for the keyboard, do you have an estimation when it will be ready to use?

              1 Reply Last reply Reply Quote 0
              • S Away
                sdetweil @jcleary05
                last edited by Feb 4, 2020, 8:55 PM

                @jcleary05 also see https://forum.magicmirror.builders/topic/8734/mmm-mysqlquery-module-just-released

                for connection and query…

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • J Offline
                  jcleary05
                  last edited by sdetweil Feb 4, 2020, 9:14 PM Feb 4, 2020, 9:08 PM

                  Also guys, when creating the initial content of the module, will it have to be built using the document objet model or will I be able to bring in a HTML page and edit it using the DOM? Unsure of where to kick of from

                  you can use the element.innerHTML value to inject a raw html text block into that element

                  S 1 Reply Last reply Feb 4, 2020, 9:12 PM Reply Quote 0
                  • S Away
                    sdetweil @jcleary05
                    last edited by Feb 4, 2020, 9:12 PM

                    @jcleary05 the module is contributing a small section of html, ONLY its content… the overall page is managed by MM…

                    the getDom() method returns the small dom tree to inject into the page… in the position element of the page…

                    see my sample module https://github.com/sdetweil/SampleModule

                    if u look at ~/MagicMirror/index.html, you will see the page layout

                    each module is placed into one of those regions.

                    if you use the developers window (ctrl-shift-i) and select the elements tab. you can see the modules output in place

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 1
                    • D Offline
                      delrein
                      last edited by Feb 10, 2020, 4:37 PM

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 1 / 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