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.

    How to post code on the forum - For absolute beginners

    Scheduled Pinned Locked Moved Troubleshooting
    26 Posts 10 Posters 25.0k 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.
    • swvalentiS Offline
      swvalenti Project Sponsor
      last edited by

      Awesome

      Thank you!
      
      1 Reply Last reply Reply Quote 0
      • evroomE Offline
        evroom
        last edited by

        Still having trouble with < and >, actually < x m l _ l I n e > (without spaces).

        <xml_line>
        

        Or:

        </xml_line>
        

        I did:

        < x m l _ l I n e >

        and

        < / x m l _ l I n e >

        Remove the spaces to get my result.
        I was given a workaround for this, but of course forgot it.

        MagicMirror version: 2.35.0
        Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
        Raspbian GNU/Linux 12 (bookworm)

        Test environment:
        MagicMirror version: 2.36.0-develop
        Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
        Raspbian GNU/Linux 12 (bookworm)

        S 1 Reply Last reply Reply Quote 0
        • S Do not disturb
          sdetweil @evroom
          last edited by

          @evroom the workaround is to add a space after <

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          evroomE 1 Reply Last reply Reply Quote 0
          • evroomE Offline
            evroom @sdetweil
            last edited by

            @sdetweil
            Can’t be it. He said hopefully.
            So when I have numerous lines of xml, I need to add a space after every < ?

            And when doing so I actually get:
            < xml_line>

            MagicMirror version: 2.35.0
            Raspberry Pi 4 Model B Rev 1.5 (8 GB RAM)
            Raspbian GNU/Linux 12 (bookworm)

            Test environment:
            MagicMirror version: 2.36.0-develop
            Raspberry Pi 3 Model B Plus Rev 1.3 (1 GB RAM)
            Raspbian GNU/Linux 12 (bookworm)

            S 1 Reply Last reply Reply Quote 0
            • S Do not disturb
              sdetweil @evroom
              last edited by

              @evroom yes… the space will show, uuuuuuuugly…

              you would think that the three backquotes would turn off text interpretation…
              but sadly not…

              Sam

              How to add modules

              learning how to use browser developers window for css changes

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

                I’m posting to this topic in the hope that it will be read by users that are not aware of the protocol for posting.

                Your code posts should look like this:

                {
                            disabled: false,
                            module: "MMM-EARTH",
                            position: "bottom right",
                            config: {
                                mode: "Natural",
                                rotateInterval: 15000,
                                animationSpeed: 0,
                                MaxWidth: "45%",
                                MaxHeight: "45%",
                            }
                        },
                

                NOT like this:

                {
                disabled: false,
                module: “MMM-EARTH”,
                position: “bottom right”,
                config: {
                mode: “Natural”,
                rotateInterval: 15000,
                animationSpeed: 0,
                MaxWidth: “45%”,
                MaxHeight: “45%”,
                }
                },

                Peace!

                Create a working config
                How to add modules

                S 1 Reply Last reply Reply Quote 0
                • J Offline
                  JediJah
                  last edited by

                  Thanks for this post. I am about to put it to good use.

                  1 Reply Last reply Reply Quote 0
                  • S Do not disturb
                    sdetweil @Mykle1
                    last edited by

                    @Mykle1 how did you do that? (the two steps!)

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

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

                      @sdetweil said in How to post code on the forum - For absolute beginners:

                      @Mykle1 how did you do that? (the two steps!)

                      ?

                      I’m lost.

                      Create a working config
                      How to add modules

                      S 1 Reply Last reply Reply Quote 0
                      • S Do not disturb
                        sdetweil @Mykle1
                        last edited by

                        @Mykle1 you said

                        Your code posts should look like this:

                        so, how do they do that?

                        1. mark the text of the ‘code’
                        2. hit the button above the editor that looks like </>

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

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

                          @sdetweil

                          Hit the button above the editor first.

                          That gives you the two sets of backticks, In between them, already highlighted, are the words, “Post code here”.

                          and you get this
                          

                          Create a working config
                          How to add modules

                          S 1 Reply Last reply Reply Quote 0
                          • S Do not disturb
                            sdetweil @Mykle1
                            last edited by

                            @Mykle1 i like to write the text, add the code in between the words, then mark the code sections…

                            Sam

                            How to add modules

                            learning how to use browser developers window for css changes

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

                              @sdetweil

                              I never use the button. Learned backticks early on. Was so happy about it that I wrote the tutorial Jun 28, 2017, 7:40 PM

                              Create a working config
                              How to add modules

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