Jump to content

create a page for members !


Recommended Posts

In your .tpl you can add:

 

{if $loggedin}
  Put your custom code here for your clients to view
{else}
  <p>{$LANG.loginintrotext}</p>


<form action="{$formaction}" method="post" name="frmlogin">

{if $incorrect}<div class="errorbox">{$LANG.loginincorrect}</div><br />{/if}

<table align="center">
<tr><td align="center" >{$LANG.loginemail}:</td><td><input type="text" name="username" size="40" value="{$username}" /></td></tr>
<tr><td align="center" >{$LANG.loginpassword}:</td><td><input type="password" name="password" size="25" value="{$password}" /></td></tr>
</table>

<p style="margin-top:10px;" align="center"><input type="submit" value="{$LANG.loginbutton}" /><br /><br /><input type="checkbox" name="rememberme"{if $rememberme} checked="checked"{/if} /> {$LANG.loginrememberme}</p>

</form>

<p style="margin:10px auto"><strong>{$LANG.loginforgotten}</strong> <a href="passwordreminder.php">{$LANG.loginforgotteninstructions}</a>.</p>

<script language="javascript">
document.frmlogin.username.focus();
</script>

 {/if}

Link to comment
Share on other sites

No! Put the code that you just want your clients to see here:

 

{if $loggedin}
     >>>  Put your custom code here for your clients to view <<<
{else}

 

This part of the code will display if the person that isn't logged (client) will see:

 

  <p>{$LANG.loginintrotext}</p>


<form action="{$formaction}" method="post" name="frmlogin">

{if $incorrect}<div class="errorbox">{$LANG.loginincorrect}</div><br />{/if}

<table align="center">
<tr><td align="center" >{$LANG.loginemail}:</td><td><input type="text" name="username" size="40" value="{$username}" /></td></tr>
<tr><td align="center" >{$LANG.loginpassword}:</td><td><input type="password" name="password" size="25" value="{$password}" /></td></tr>
</table>

<p style="margin-top:10px;" align="center"><input type="submit" value="{$LANG.loginbutton}" /><br /><br /><input type="checkbox" name="rememberme"{if $rememberme} checked="checked"{/if} /> {$LANG.loginrememberme}</p>

</form>

<p style="margin:10px auto"><strong>{$LANG.loginforgotten}</strong> <a href="passwordreminder.php">{$LANG.loginforgotteninstructions}</a>.</p>

<script language="javascript">
document.frmlogin.username.focus();
</script>

 {/if}

 

So together it will show people that are logged in what you want them to see and if they are not they will see a login box, or what ever you want them to see.

Link to comment
Share on other sites

  • 5 weeks later...

All the other pages that is already made with WHMCS does not contain the "{if} and {else}" code... I assume it should be possible somehow to define in a different way what's locked for members and whats not? As i would like to avoid adding the login box to every single page that is supposed to be locked.

Link to comment
Share on other sites

I'd like to have protected pages - but only allow access for users who have purchased a specific product...

 

Any suggestions on how to do that?

 

An addon that worked like the downloads would be great. That way you could assign specific folders or pages to a specific product purchase.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated