We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8927
    • 4 Posts
    What I’m trying to do is create a members only section of my website so I can give things individually for my members to do.. I would like to be able to share some things with only 1 user if its possible. Sort of like how each page in the site manager has its on separate "Content" area, I would like to have something separate for each user like that.. but if I want to share information with ALL the users at once I would change in the "Template" that ALL the pages share.. my best manager analogy so hopefully it helps every1 understand what i mean smiley

    Web Users
    1. How do I send an email verification?


    Member Pages
    2a. I have a page called "Dashboard" (http://siteurl.com/dashboard) that I would like to be accessible to only people that are signed in.. Is there a way to do this?

    2b. I would like to have "Hello *User’s Name*" how do I do this?
    2c. I would like to be able to change information on User1’s page without it affecting the information on User2’s page is this possible?


    Login & Logout Link
    3. near the top of my website I have <a href="[~22~]">Login</a> and it works perfectly, but How do I change "Login" to "Logout" when the user is already logged in?
      • 19370
      • 24 Posts
      Hey, i’m José Moreira from Portugal. This is my first responce to a user smiley


      1º Problem:

      Web Users
      1. How do I send an email verification?
      well, i will search it, but i think the snippet "WebSignup" does that automaticly.



      2º Problem:

      Member Pages
      2a. I have a page called "Dashboard" (http://siteurl.com/dashboard) that I would like to be accessible to only people that are signed in.. Is there a way to do this?

      2b. I would like to have "Hello *User’s Name*" how do I do this?
      2c. I would like to be able to change information on User1’s page without it affecting the information on User2’s page is this possible?
      i have the same problem has you, i want to create a dashboard too, for web users.
      My dashboard is like "example.com/mymicropainel".
      i’m using phx to get the userinfo, but i will create a snippet to users save their settings, with costum fields, etc smiley

      2A-yes, you can create web permissions and groups (they are different, like, the group A can access downloads and images, the group B, only images and dashboard, etc), and on manager, go to document permission, and give access to groups you want.

      2B- you can use phx.
      Hello [+phx:userinfo=`fullname`+], your account is [+phx:userinfo=`username`+].

      2C- Yes, with phx again:
      Hello [+phx:userinfo=`username`+] [+phx:userinfo=`username`:is=`diana`:then=`, oh my god! you are so beautiful! smiley`+]


      3º Problem:

      Login & Logout Link
      3. near the top of my website I have <a href="[~22~]">Login</a> and it works perfectly, but How do I change "Login" to "Logout" when the user is already logged in?

      Ok, you should have a snippet by default called LoggedOrNot.
      on 1,0,2 it has other name, i hadto change the snippet name.


      so, you call should be like this:

      [!LoggedOrNot? &yesChunk=`md.tpl.headerlogged.yes` &noChunk=`md.tpl.headerlogged.no` &ph=`nome`!]


      yesChunk = the chunk to use if the user is logged
      noChunk = the chunk to use if the user isn’t logged
      ph = PlaceHolder to substitute username on your chunks, you should put here "name".

      my chunks:
      {{md.tpl.headerlogged.no}}
      <form action="[~67~]" method="post" id="login-form"><input name="returnto" value="[*id*]" type="hidden">
      <div id="login-info">Bem-vindo, <a href="javascript:$('#login-form').submit();"">Login</a></div></form>


      {{md.tpl.headerlogged.yes}}
      <form action="[~67~]?webloginmode=lo" method="post" id="login-form"><input name="returnto" value="[*id*]" type="hidden">
      <div id="login-info">Olá [+nome+] (<a href="javascript:$('#login-form').submit();">logout</a>), <a href="[~69~]">MyMicroPainel</a></div>
      </form>


      Note: I used post method because i wanted to say to login page the page that user was coming from.

      my Login snippet call:
      [!WebLogin?
      &tpl=`md.tpl.login`
      &loginhomeid=`[+phx:post=`returnto`:int:ifempty=`3`+]`
      &logouthomeid=`[+phx:post=`returnto`:int:ifempty=`3`+]`
      !]


      and my login tpl chunk:
      <!-- #declare:separator <hr> --> 
      <!-- login form section-->
      <div id="form">
      <form method="post" name="loginfrm" action="[+action+]" style="margin: 0px; padding: 0px;">
      <fieldset>
      			<input type="hidden" value="[+phx:post=`returnto`:int:ifempty=`14`+]" name="returnto"><input type="hidden" value="[+rememberme+]" name="rememberme"> 
      			<input type="text" name="username" tabindex="1" onkeypress="return webLoginEnter(document.loginfrm.password);" value="[+username+]" /><label for="nome">Utilizador:<span>Obrigatório</span></label>
      			<input type="password" name="password" tabindex="2" onkeypress="return webLoginEnter(document.loginfrm.cmdweblogin);"/><label for="password">Password:<span>Obrigatório</span></label>
      			<input type="checkbox" id="chkbox" name="chkbox" tabindex="4" size="1" value="" [+checkbox+] onclick="webLoginCheckRemember()" /><label for="chkbox">Lembrar Dados?:<span>Opcional</span></label>
      			<div>
      				<input class="btn" type="submit" value="[+logintext+]" name="cmdweblogin" />
      			</div>
      
      </fieldset>
      </form>
      
      
      <hr>
      <!-- log out hyperlink section -->
      <a href='[+action+]'>[+logouttext+]</a>
      <hr>
      <!-- Password reminder form section -->
      <form name="loginreminder" method="post" action="[+action+]" style="margin: 0px; padding: 0px;">
      <input type="hidden" name="txtpwdrem" value="0" />
      <table border="0">
          <tr>
            <td>Introduza o seu email em baixo <br />para receber a sua nova password:</td>
          </tr>
          <tr>
            <td><input type="text" name="txtwebemail" size="24" /></td>
          </tr>
          <tr>
            <td align="right"><input type="submit" value="Enviar" name="cmdweblogin" />
            <input type="reset" value="Cancelar" name="cmdcancel" onclick="webLoginShowForm(1);" /></td>
          </tr>
        </table>
      </form>
      </div>



      Microdual,
      José Moreira wink