We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17340
    • 70 Posts
    Since we stumbled across MODx -TG- the development of our community-site finally got somewhere !
    forget about all the famous CMS’s and their learning curves, we’re into MODx now !
    love it and have the feeling we’re finally on the right track.

    question concerning log-in’s in general;

    we wish to make part of our site available for part of our members only, without them having to register, log-in etc.

    other then they only need to give the one password which is published in our monthly member-magazine in print and
    which (the password has other general purposes as well) changes every three months.

    obviously for other user-groups we’ll use WebloginPE to allow them access in more private parts of the site, the board, the secretary etc.
    we just need to give the large group of members access to community news etc. without the hassle of registering for them and yet keep that part
    of the site hidden for the public audience.

    can anybody advise a strategy for fixing passwords in MODx to be used for such a set up ?

    many thanks in advance
    lmv

      • 28107
      • 230 Posts
      did you already thought about .htaccess ?

      create an existing folder named exacelty as the ’folder’ in the manager, throw your .htaccess file in that ’real folder’ and voila.
        CONIN Werbeagentur . Köln
        http://www.conin.de
        • 17340
        • 70 Posts
        Thanks for responding spackko!

        but the answer is no;

        1st tried to find solution inside MODx & WebloginPE

        2nd since converted to Mac in 1985 forgot all about ’anything-that-looks-like-messing-with-system-insides’ and scary of things that remind me of DOS... wink

        so I just didn’t think about it as I’m totally unfamiliar with it
        but willing to learn if it’s an easy solution and one we can teach our website-moderators (mostly digibates..) to handle

        thnks again
        lmv

          • 23491 ☆ A M B ☆
          • 1,056 Posts
          Here you go, this should do it!!

          Introducing DocPassword: http://modxcms.com/DocPassword-0.0.1-1790.html

          Support thread: http://modxcms.com/forums/index.php/topic,21331.0.html

          Features:
          - Custom (or Global) unauthorized page and "login form" template per protected document
          - Custom password per protected document (can be unique per document, or global via TV Default Values)
          + @INHERIT support should work, too, for securing child documents in a container
          (As it stands, password would need to be entered per child, which would be an easy fix if needed)
          - Session-based authentication ; Authentication for each protected page is required only once per user’s browsing session

          cool
            Mike Reid - www.pixelchutes.com
            MODx Ambassador / Contributor
            [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
            ________________________________
            Where every pixel matters.
            • 17340
            • 70 Posts
            Thanks Mike !
            and so fast, waauw

            Looks great, one thought though is that the number of pages we wish to keep away from the regular members is significantly larger then the ones we want to allow them to see.
            But I guess we just protect the ’entrance-page’ with DocPassword and the pages below that will not show up in Wayfinder?
            Or do we have to DocPassword all other pages, or am I missing a point?

            the first try-out resulted in:

            Parse error: syntax error, unexpected T_STRING in
            /home/unixadvanced/t/r/xx-xxx/www/xxx/manager/includes/document.parser.class.inc.php(769) : eval()’d code on line 72

            did I overlook something in yr instructions ?

            sorry to bother
            lmv
              • 23491 ☆ A M B ☆
              • 1,056 Posts
              Technically, you will need to use [!DocPassword!] on EACH page you want protected. However, you could easily add the snippet call to your template (in a chunk) to include for you automatically. Remember, the only pages that are protected are the ones you actually define a password for. (You could get creative with the TV Default Values to find a solution that works for you.)

              I’m not sure what kind of hierarchy you are working with, let alone its complexity, but where there’s a will there’s a way smiley

              Essentially, you need to do the following:

              Quote from: "Install

              1. Install the snippet

              2. Install the TV (named DocPasswordTV, assign to needed templates)

              3. Place [!DocPassword!] snippet call on a page you want protected

              3a. Enter a password for the page, then save

              4. Place [!DocPassword? &redirect=`[*id*]`!] snippet call on your site’s unauthorized page (If you don’t have one yet, I suggest you create one and then update your site configuration)

              BTW, what version of MODx and what version of PHP are you running? (sorry, I only tested this on MODx 0.9.6/PHP 5.2.4, so I’d like to rule this out if possible) Also, did you copy and paste from this thread (before I posted the Repository release) or did you get it from the repository download? I have seen issues related to white-space, etc when copying code directly from a browser)
                Mike Reid - www.pixelchutes.com
                MODx Ambassador / Contributor
                [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                ________________________________
                Where every pixel matters.
                • 17340
                • 70 Posts
                Thanks, I did indeed load from the forum-message at first and following your last message downloaded from Repos. and...
                got it working initially !

                So it must have been something like white-space-whatever as you suggested
                and thanks again, now the playing around w/it starts...

                I think as such it’s a very valuable add-on for MODx !


                as far as our project is concerned, we’re not there yet.
                our original scenario provided in a page where the members are informed they must give the password,
                the page has an input-form and a submit button, after which -provided they have the actual password-
                they will be transferred to the subject series of pages.

                so we’ll do some more planning and thinking.
                lmv

                PS it is 0.9.6.2 rev 3281 & the provider is on php 4.4.2
                  • 23491 ☆ A M B ☆
                  • 1,056 Posts
                  Quote from: lmv at Jan 04, 2008, 04:44 PM

                  as far as our project is concerned, we’re not there yet.
                  our original scenario provided in a page where the members are informed they must give the password,
                  the page has an input-form and a submit button, after which -provided they have the actual password-
                  they will be transferred to the subject series of pages.

                  If you link to your "unauthorized page" and pass the following in the query string, you might find what you’re looking for is already there! Simply pass the unauthid parameter in the query string, with a value of the MODx doc_id you want them to be taken to upon entering the correct password:

                  Quote from: "Query

                  /unauthorized_page_alias.html?unauthid=123

                  By sending the user to the above page (where the protected page doc_id you want them to end up at is 123) they would be given a Login form and only redirected to the associated protected content upon a successful "log in". Granted, this would only authenticate the MODx doc_id of 123, so children documents wouldn’t be taken into account yet. I can think of some very easy code updates that would account for child documents by checking for the existence of the current protected document’s parent ID in the docpassword.authenticated session array, etc.

                  Should you need any additional support, please consider the new support thread: http://modxcms.com/forums/index.php/topic,21331.0.html
                    Mike Reid - www.pixelchutes.com
                    MODx Ambassador / Contributor
                    [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                    ________________________________
                    Where every pixel matters.
                    • 17340
                    • 70 Posts
                    thanks Mike!
                    I will follow yr lead, but fear you’re way over my head now..

                    this is too complicated for me, we just need a page with a Login-form on it
                    and where everybody can go to and that brings them to the first page of the
                    directory they are allowed to see after they give the password.
                    lmv
                      • 28042 ☆ A M B ☆
                      • 24,524 Posts
                      You can specify a list of document IDs as a parameter of the snippet. It will go through that list on login and send the user to the first page in the list that they now have permission to access.
                        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