We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9888
    • 6 Posts
    Hello.

    I am building a community and would like to use MODx if it’s possible.
    I don’t really know how to solve this problem I have encountered.
    To become a member the visitor should register using a web form.
    Every member will then have a personal page with the right to edit content.
    How can that be solved?

    The only way I have figured is to in some way let the form register new back-end users. Assign them to a role with the permission to edit pages. Create a new user group (just for them) and a new document group containing their personal page.
    And then finally link the document group to the user group.

    No need to spell out that this way is not an option.
    There got to be a more clever way.
    The registration has to be automated and the members should only be able to edit their own pages.
    And I don’t want to end up with hundreds of users groups containing only one member each.

    Can web users edit content at all?

    I’ll summarize my question.
    Is it possible to let users register and then have a personal page. If so ... how?
      • 10487 MODX Staff
      • 1,535 Posts
      Hi flying_c, web users can’t edit content.

      One possible solution is to look at customising something like the NewsPublisher snippet and tailor it so a web user can edit the content of a specific page. It would require a bit of work (as NewsPublisher currently only creates pages) but you would have freedom to specify exactly what they can edit etc.

      Like I say, it’s by no means a quick ’n easy solution to implement but, with a bit of thought, would do the trick.

      Hope that helps,
      Garry
        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 22815
        • 1,097 Posts
        Allowing webusers (or anonymous web users) to post content and edit content is easy with NewsPublisher or custom solutions involving DocAPI etc.

        As flying_c identifies, the issue is making sure that a user can only edit their own page.
        Garry doesn’t actually spell out how this could be done in any automated fashion.

        As it happens, I need this for something and looking at this again I have come up with a quick and dirty solution! (Woo!)

        Basically, fix it so that they can only create/edit a page if it contains their username, and some extra prefix to stop people registering up as "index".

        So as the user paulgregory, I’d only be able to edit user-paulgregory.html !
        This will need extra smarts on the username front so that Bob Smith can edit user-bob-smith.html, and to stop Bob-Smith from signing up.. but the basic idea is there.

        As this solves a major requirement, I will be writing this sometime next week, and will release the new elements to the community:

        Snippet: CreateSafeUsername
        Snippet: UsernamePageEdit
          No, I don't know what OpenGeek's saying half the time either.
          MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
          Forum: Where to post threads about add-ons | Forum Rules
          Like MODx? donate (and/or share your resources)
          Like me? See my Amazon wishlist
          MODx "Most Promising CMS" - so appropriate!
          • 25663 MODX Staff
          • 12,272 Posts
          Very clever Paul, very clever indeed.

          Myspace here you come!
            Ryan Thrash, MODX Co-Founder
            Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
            • 4041
            • 788 Posts
            Paul,
            I started porting over some of the mods I made for another project and have a snippet which currently allows front end users to add content (only to a specific folder which is named as their web username), alter their profile and upload an image to use as an avatar.

            I’m sure some code could be streamlined but it works fine as is but is not readily portable for public usage, perhaps some parts would be useful, if you would like I’ll zip it up and send you a copy.
              xforum
              http://frsbuilders.net (under construction) forum for evolution
              • 22815
              • 1,097 Posts
              Quote from: rthrash at Aug 24, 2006, 01:22 PM

              Very clever Paul, very clever indeed.

              Myspace here you come!

              I was actually tempted to call the mod MicePace or some similar feeble pun on MySpace. But alas the idea is not as ground-breaking as it might at first seem:

              Quote from: breezer at Aug 24, 2006, 03:34 PM

              I ... have a snippet which currently allows front end users to add content (only to a specific folder which is named as their web username) ... If you would like I’ll zip it up and send you a copy.
              Well done on beating me to the whole "username authentication" thing. A folder, eh? Hmmn. That sounds like a great help, actually. If I can streamline it and make it a bit more public-ready, I will do. I’m PMing you my email address.
                No, I don't know what OpenGeek's saying half the time either.
                MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
                Forum: Where to post threads about add-ons | Forum Rules
                Like MODx? donate (and/or share your resources)
                Like me? See my Amazon wishlist
                MODx "Most Promising CMS" - so appropriate!
                • 4041
                • 788 Posts
                A folder titled as the webusername was the only way I could see to 1. - avoid having to give them manager access and 2. - if they don’t have a folder they can’t post anything.

                The next step I was going to take was have the folder automatically created when they signed up for an account but this has been on the back burner for a while now...

                There are also a few image manipulation functions included to handle the users avatar (upload, thumbnail, resize)

                I’ll get the files together here in a bit and send them off shortly...
                  xforum
                  http://frsbuilders.net (under construction) forum for evolution
                  • 6726
                  • 7,075 Posts
                  I remember having seen a synchronisation tool between web users and manager users (wait... looking for it...OK, got it, it’s the web2manager snippet from Raymond, which synchronizes a web user account with a manager user account), so the shortcut way I would try to go about it is use this and a manager account with no (or limited) manager access, which I would synchronize with web users accounts to allow QuickEdit use...

                  I don’t know if that would work, just a thought here...
                    .: COO - Commerce Guys - Community Driven Innovation :.


                    MODx est l'outil id
                    • 22815
                    • 1,097 Posts
                    I love QuickEdit but it is inappropriate in this instance.

                    Breezer - my PM is a little terse but has now been sent. Thanks in advance! Can you tell us what site you’re using this on?
                      No, I don't know what OpenGeek's saying half the time either.
                      MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
                      Forum: Where to post threads about add-ons | Forum Rules
                      Like MODx? donate (and/or share your resources)
                      Like me? See my Amazon wishlist
                      MODx "Most Promising CMS" - so appropriate!
                      • 9888
                      • 6 Posts
                      Nice that so many of you are coming up with possible solutions.
                      I really need this bit to work, otherwise I’m forced to use some
                      other cms against my will.

                      Looking forward to a solution.