We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23491 ☆ A M B ☆
    • 1,056 Posts
    Quote from: waynep16 at Feb 01, 2008, 09:48 AM

    I cant get it to work sad oh dear embarrassed

    im using friendly urls

    i have made the TV

    i have made a page called admin, the url to the page is like thus, mysite.com/admin

    in the content section of this page i am putting [!DocPassword!]

    and in the template variabe i am typing test which will be the password

    when i go to the page mysite.com/admin the url changes to mysite.com/2?unauthid=11 (11 is the id of the admin page) 2 is the default error page

    What am i doing wrong?

    1. Make sure your "default error page" has an alias to prevent the URL from loading as /2

    2. Please read some of the earlier posts (or the README comments in the snippet) that will describe what snippet calls you need on your Admin page, and which you need for your "protected page", especially since you are NOT using the default error page as your "admin" page.
      Mike Reid - www.pixelchutes.com
      MODx Ambassador / Contributor
      [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
      ________________________________
      Where every pixel matters.
      • 13902
      • 5 Posts
      Very nice snippet! Exactly what I was looking for!

      Quote from: pixelchutes at Feb 04, 2008, 02:17 PM

      I should point out that @INHERIT does work (natively via MODx), however the SESSION compare code will need one or more additional checks to check by parent. I will see if I can get an example put together...

      I can confirm that @INHERIT works flawlessly.
      Having to enter the password for each child page bugged me, though. I tried to include the checks by parent myself, but I wasn’t able to. I guess it has to do with checking with getParentIds when setting $authenticated, but I couldn’t wrap my head around it. tongue

        • 15716
        • 57 Posts
        There has to be a way to get all the children to accept the parent’s password authentication (without re-entering it for every child!). How???

        Good stuff though, just want I was looking for.
          • 23491 ☆ A M B ☆
          • 1,056 Posts
          Quote from: Kev at Apr 10, 2008, 02:08 PM

          There has to be a way to get all the children to accept the parent’s password authentication (without re-entering it for every child!). How???

          Good stuff though, just want I was looking for.

          It would not be very hard to add this functionality, it appears this request has come up a few times. I will see if I can update the repository with an updated version that supports @INHERIT natively.

          :D
            Mike Reid - www.pixelchutes.com
            MODx Ambassador / Contributor
            [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
            ________________________________
            Where every pixel matters.
            • 14547
            • 58 Posts
            I can’t get it to work. I have done the following:

            I’ve created the snippet and called it "DocPasswordTV".

            1. I’ve created my "unauthorized page" and defined it in my configuration settings and placed the snippet " [!DocPassword? &redirect=`[*id*]`!]" in my soon to be secured page.

            2. I’ve created the Template Variable "DocPasswordTV" with the following settings:


            I’ve placed "[!DocPassword? &redirect=`[*id*]`!]" within the targeted page/template. In the TV input i’ve defined my password:


            Then I test my page and no loginform appears. Just my page with sensitive information. sad

            Where did I lost track of the installation procedure? Is it in the TV settings?




              ~~||[ Simplicity is everything ]||~~
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              If that’s not a typo, and you did name your snippet "DocPasswordTV", there’s one problem. The name of the snippet must be the same as the snippet’s call [!DocPasswordTV? ... !]
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 36592
                • 970 Posts
                Quote from: johnsim at May 11, 2008, 09:09 PM

                I’ve placed "[!DocPassword? &redirect=`[*id*]`!]" within the targeted page/template.
                As stated in the snippet code, you have to place [!DocPassword!] in your document you wish to protect.
                5. Place DocPassword snippet call on pages you wish to protect: [!DocPassword!]
                
                  • 14547
                  • 58 Posts
                  Thank you all for the useful help!
                  Got it to work. Fixed it as following:

                  I´ve put the following snippet in the content area of my secured page `[!DocPassword? &redirect=`[*id*]`!]`
                  Changed it to ´[!DocPassword!]´ and it worked like a charm!

                  Cheers,

                  John
                    ~~||[ Simplicity is everything ]||~~
                    • 23491 ☆ A M B ☆
                    • 1,056 Posts
                    Quote from: johnsim at May 11, 2008, 09:09 PM

                    I can’t get it to work. I have done the following:

                    I’ve created the snippet and called it "DocPasswordTV".

                    1. I’ve created my "unauthorized page" and defined it in my configuration settings and placed the snippet " [!DocPassword? &redirect=`[*id*]`!]" in my soon to be secured page.

                    2. I’ve created the Template Variable "DocPasswordTV" with the following settings:


                    I’ve placed "[!DocPassword? &redirect=`[*id*]`!]" within the targeted page/template. In the TV input i’ve defined my password:


                    Then I test my page and no loginform appears. Just my page with sensitive information. sad

                    Where did I lost track of the installation procedure? Is it in the TV settings?


                    Glad to hear you got this working! I will be planning to do another release shortly that should work better with Child inheritance of parent passwords. I will see if I can’t clarify the Install instructions during this time.
                      Mike Reid - www.pixelchutes.com
                      MODx Ambassador / Contributor
                      [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                      ________________________________
                      Where every pixel matters.
                      • 25663 MODX Staff
                      • 12,272 Posts
                      Hey Mike ... any progress on that next release. Inheritting passwords would be great for entire sections, particularly if someone has already authenticated.
                        Ryan Thrash, MODX Co-Founder
                        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me