We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Hey folks, I need some help/advice on how to do the following.

    Is there a way to create a checkbox that would be able to change a setting in the database? I would like this checkbox to be able to change a document from being public to private. I would like the web user to be able to choose whether or not their profile or personal page is available to the public or to specific user groups. I have 2 user groups as it is now.

    I have a small social network based idea that I am still working on and would like to implement an option to give the user the option of private or public pages, just like how BEBO or Myspace do.

    Many thanks, Ross
      Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
      AugmentBLU - MODX Partner

      BLUcart - MODX Revolution E-Commerce & Shopping Cart
    • You could use WebloginPE to create a private field. You’d then need to make two snippets:

      [*] one to selectively show/hide the link to the profile page (you could base this on membercheck)
      [*] one to redirect people away from the profile page if the URL was manually entered (you could base this on the bounce snippet)

      Something along those lines would work, but there’s also probably a better way to do it too.
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
      • I have created a radio in the user profile that is a YES or NO option and I know how to get it to remember the option selected.

        The part I am now stuck at is the redirect if the visitor is not in a particular user group.

        in the profileTpl I have <div style="float:left;margin-left:20px;">[+form.profile+]</div>

        in the actual call I have &inputHandler=`Profile:ProfileStatus:profile:radio:yes(yes),no(no)` &customFields=`profile`

        How would I go about making the [!redirect!] snippet appear when the YES hide my profile option is selected? I was thinking of a TV in the template that has the value of [!redirect!] but how to activate this TV checkbox from the radio in WebloginPE? Hope that makes sense!
          Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
          AugmentBLU - MODX Partner

          BLUcart - MODX Revolution E-Commerce & Shopping Cart