We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 17058
    • 80 Posts
    ...or in the other way - show specific content (e.g. a link) for logged in webusers.
    Did I miss a thing? Is there a snippet out there? After a search, the only Snippet i found is Filedownload.
    But the nice snippet renderss a table of all files linked to a special folder. Thats not what i’m looking for.

    I’m allready set a Webuser (’Downloaduser’) and set a cocument-group (promomusic). Linked both togehter.
    Furthermore I build up a webuserlogin. But whats next?

    thanks. le block
      le_block is Member of FUTY | Medienagentur aus Leipzig mit Schwerpunkt Marketing, Branding, Print und Webdesign
      • 25663 MODX Staff
      • 12,272 Posts
      [[MemberCheck]] should do what you’re asking I think.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 17058
        • 80 Posts
        thanks, rthrash. But your snippet shows a chunk.
        in my case i’ve got a bunch of documents(pages) containing information of ds’s.
        Every Dj got it’s own promofile(s). So I can’t use a single specific chunk.

        it’s more like this way: [[MemberCheck? &groups=`promomusic` &showlink=`www.mydomain.com/promo/musicfile1.mp3`]]



        le block
          le_block is Member of FUTY | Medienagentur aus Leipzig mit Schwerpunkt Marketing, Branding, Print und Webdesign
          • 26435
          • 1,193 Posts
          It’s easy.  I have sections of http://www.scottydelicious.com that are for registered users only.  The way I hide the pages from unregistered and/or un-logged-in users is this:

          In the Manager under "Web Permissions", create a Document group called "members". 
          Then, under User/Document group links, add the Document group "members" to the User Group "Registered Users"

          Now, in the pages that you only want "members" to have access to, when editing a document in the manager, at the bottom of the document there is a section called "Access permissions".  uncheck "All Document Groups (Public)" and check "members".

          Now this page will ONLY be visible to users who have access to the "members" document group, which in this case is "Registered Users". this page will not show up to those not in the "Registered Users" group or to Registered users who are not logged in.

          -sD-
            Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
            All of the above... in no specific order.


            I send pointless little messages
            • 727
            • 502 Posts
            Suggestion:

            Create a chunk called ’link’:

            <a href="[+url+]">[+name+]</a>
            


            then modify MemberCheck to accept the URL and name. In the snippet after getting the chunk replace the placeholders with the parameters passed (see MODx API for function to use). Then you can call it with:

            [[MemberCheck?groups=`promomusic` &chunk=`link` &url=`www.mydomain.com/promo/musicfile1.mp3`&name=`Download Music FIle 1`]]
            


            Andy
              • 727
              • 502 Posts
              Quote from: Scotty at Nov 03, 2006, 01:07 PM

              It’s easy. I have sections of http://www.scottydelicious.com that are for registered users only. The way I hide the pages from unregistered and/or un-logged-in users is this:

              In the Manager under "Web Permissions", create a Document group called "members".
              Then, under User/Document group links, add the Document group "members" to the User Group "Registered Users"

              Now, in the pages that you only want "members" to have access to, when editing a document in the manager, at the bottom of the document there is a section called "Access permissions". uncheck "All Document Groups (Public)" and check "members".

              -sD-

              I could be wrong but I think the problem is that there might be too many files to link to to create a document or chunk for each one. Therefore they want to pass the URL to the snippet. Could be wrong though...

              Andy
                • 17058
                • 80 Posts
                @Scotty Delicious: That’s the normal way, to hide(or provide) a whole page. The goal is to provide a ’contentpart’ and not the content.

                @ajayre: Your approach sounds good. I’ll give a try at monday. I’m not quite familiar with the MODX-API ? Can you gimme a little fingertip?

                thanks again.
                le block

                  le_block is Member of FUTY | Medienagentur aus Leipzig mit Schwerpunkt Marketing, Branding, Print und Webdesign
                  • 727
                  • 502 Posts
                  The best place to look for the API functions is in manager\includes\document.parser.class.inc.php.

                  Andy
                    • 17058
                    • 80 Posts
                    Thanks, ajayre.
                    I’ll have a look at this topic. I think its definitely necessary for a ’deeper’ programming of the CMS.
                    BTW: i think i’ve read the upcoming version of MODXCMS got different content-parts.

                    The Solution soves itself. The content will duplicated (and modified). So its a simple thing. pages only for looged users.
                    scottyD mentioned above.

                    le block
                      le_block is Member of FUTY | Medienagentur aus Leipzig mit Schwerpunkt Marketing, Branding, Print und Webdesign