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
    This is an auto-generated support/comment thread for DocPassword.

    Use this forum to post any comments about this addition or any questions you have regarding its use.

    Brief Description:
    DocPassword - Protect MODx documents with a unique password (Member accounts are not necessary!) See full description for list of features! [ed. note: pixelchutes last edited this post 14 years, 6 months ago.]
      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
      For clarification Mike, this is functionally like an .htaccess directory protection method, no?
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 23491 ☆ A M B ☆
        • 1,056 Posts
        Quote from: rthrash at Jan 07, 2008, 02:30 PM

        For clarification Mike, this is functionally like an .htaccess directory protection method, no?

        For the most part, I believe they are similar. Essentially, it provides a way (via MODx GUI) to manually define a "password" for any document on your site. DocPassword can also protect directories (containers) recursively. I believe it may even be used to protect Weblinks.

        I created it per lmv’s request to see how it might be accomplished via MODx. It is intended for sites that might want to password protect content in a document (or, say a Download URL), but not require user registration in order to do so.

        On a related note: Do you know whether .htaccess protection can be applied for Friendly URLs using the "alias_path" feature of MODx? (As these are not physical directories on the file system...)
          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
          My understanding is that .htaccess requires physical files/directories on the server and won’t work with MODx. Which is what makes this contribution quite cool. smiley
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 6726
            • 7,075 Posts
            Indeed that’s great !

            The fact it supports @INHERIT is really even cooler, it can make up for the limitations of the current permission system lipsrsealed
            And session-based authentication is really sugar on the cake grin

            Thanks Mike !
              .: COO - Commerce Guys - Community Driven Innovation :.


              MODx est l'outil id
              • 8471
              • 333 Posts
              Great snippet, thanks!
              Is possible to protect a folder and automatically all her sons? I mean, without put [!DocPassword!] and set a password for all documents
                Sorry for my bad English grin
                • 25663 MODX Staff
                • 12,272 Posts
                You could do that edipo by putting the snippet call in a TV set for @INHERIT as the default value.
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
                  • 8471
                  • 333 Posts
                  Thanks for the answer... I’have made a TV with this default value: @INHERIT [!DocPassword!]
                  but it doesn’t work  undecided
                  When I insert [*DocPassword*] in my template I have two forms in the my "unauthorized page"
                    Sorry for my bad English grin
                    • 32017
                    • 151 Posts
                    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?
                      London web design - MODx specialists
                      • 23491 ☆ A M B ☆
                      • 1,056 Posts
                      Quote from: rthrash at Jan 14, 2008, 09:59 AM

                      You could do that edipo by putting the snippet call in a TV set for @INHERIT as the default value.

                      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...
                        Mike Reid - www.pixelchutes.com
                        MODx Ambassador / Contributor
                        [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                        ________________________________
                        Where every pixel matters.