We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • Hi, could someone be so kind to help me out?

    I’m completely new to MODx and scripting so please could someone give me a little time to explain how i do this...

    I would like to have a login section shown on any page of my site if the user is NOT signed in and if they are signed in i would like to have the login form hidden... Is this possible? Also how could i let the person who is signed in Know that they are signed in... Thanks.

    Hope someone can help. huh
      Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
      AugmentBLU - MODX Partner

      BLUcart - MODX Revolution E-Commerce & Shopping Cart
      • 2912
      • 315 Posts
      Hi,

      If you want a login form on every page then I would put the code into the template.

      Goto Resources | Manage Resources
      On the Templates tab click the link relevant to your template. This allows you to edit your template.
      Now insert your snippet. For instance:

      [!WebLoginPE !]

      This snippet allows for many things as does the standard login code offered with a default installation. They’ll both do what you need.

      You can check out a standard modx install at http://www.opensourcecms.com/index.php?option=com_content&task=view&id=2101
        BBloke
      • I think i sorted it... it’s working in IE but the buttons aint working in FF. Is there a reason for this? huh
          Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
          AugmentBLU - MODX Partner

          BLUcart - MODX Revolution E-Commerce & Shopping Cart
          • 28033
          • 925 Posts
          Quote from: rossco at Oct 28, 2007, 10:56 PM

          I think i sorted it... it’s working in IE but the buttons aint working in FF. Is there a reason for this? huh

          Check the bug fixes thread. A user found a fix for that issue, IIRC.
            My Snippets
            -> PopUpChunk v1.0
          • Ok thanks for that...

            I have another question regarding the setup.

            I’ve created a custom back ground for my login and every looks fine but when i input the data and click login the info is not being retrieved... what have i done wrong? It may be completely wrong, i’ve read the docs over and over for hours trying all sorts and it’s really not goin well! As i said, i’m very very new to this but i’m learning... please could you give me an idea of what’s wrong here and then i’ll beable to take things from here. Thanks for your help so far.

            This line was put in the main template
            {{RDlogin}}


            This code was put in the chunks area using the name RDlogin as above
            [+wlpe.message+]
            <table id="Table_01" width="644" height="95" border="0" cellpadding="0" cellspacing="0">
            	<tr>
            		<td>
            			<img src="assets/images/news/news_01.png" width="644" height="34" alt=""></td>
            	</tr>
            	<tr>
            		<td background="assets/images/news/news_02.png">	
            	<form id="wlpeLoginForm" action="[~[*id*]~]" method="POST">
            		<fieldset id="wlpeLoginFieldset">
            			<legend id="wlpeLegend">Web User Login Form</legend>
            			<label id="wlpeUsernameLabel" for="wlpeUsername">Username
            				<input id="wlpeUsername" type="text" name="username" />
            			</label>
            			
            			<label id="wlpePasswordLabel" for="wlpePassword">Password
            				<input id="wlpePassword" type="password" name="password" />
            			</label>
            			
            			<label id="wlpeStayLoggedInLabel" for="wlpeStayLoggedIn">Stay Logged In
            				<select id="wlpeStayLoggedIn" name="stayloggedin">
            					<option value="">No</option>
            					<option value="3600">1 Hour</option>
            					<option value="86400">1 Day</option>
            					<option value="604800">1 Week</option>
            					<option value="2678400">1 Month</option>
            					<option value="315569260">Forever</option>
            				</select>
            			</label>
            			
            		</fieldset>
            		<fieldset id="wlpeLoginButtons">
            			<button type="submit" id="wlpeLoginButton" name="service" value="login">Login</button>
            			<button type="submit" id="wlpeReminderButton" name="service" value="forgot">Forgot Password</button>
            			<button type="submit" id="wlpeRegisterButton" name="service" value="registernew">Register</button>
            		</fieldset>
            	</form>
            </div>
            	</tr>
              <tr>
            	  <td>
            		  <img src="assets/images/news/news_03.png" width="644" height="43" alt=""></td>
              </tr>
            </table>
            
            
              Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
              AugmentBLU - MODX Partner

              BLUcart - MODX Revolution E-Commerce & Shopping Cart
            • Quote from: Soshite at Oct 28, 2007, 11:25 PM

              Quote from: rossco at Oct 28, 2007, 10:56 PM

              I think i sorted it... it’s working in IE but the buttons aint working in FF. Is there a reason for this? huh

              Check the bug fixes thread. A user found a fix for that issue, IIRC.

              I got the FF problem sorted out, thanks for pointing that out...

              Could someone take a look at my above post and let me know what i am doing wrong? Thanks. grin
                Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
                AugmentBLU - MODX Partner

                BLUcart - MODX Revolution E-Commerce & Shopping Cart