digitalmahdi Posted April 12, 2009 Share Posted April 12, 2009 hi i had created my custom page with this learn : http://wiki.whmcs.com/Creating_Pages i need to make this page for members ! for example if anybody want to see this page he/she must login on his/her client area please help me thank you 0 Quote Link to comment Share on other sites More sharing options...
rodeoXtreme Posted April 12, 2009 Share Posted April 12, 2009 Hello, You can add the page for your members as a link (I believe it is in the header.tpl). include the url between [login] and [/login] I believe. 0 Quote Link to comment Share on other sites More sharing options...
digitalmahdi Posted April 12, 2009 Author Share Posted April 12, 2009 please exmplain more . i am amateur thanks, 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted April 12, 2009 Share Posted April 12, 2009 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} 0 Quote Link to comment Share on other sites More sharing options...
digitalmahdi Posted April 13, 2009 Author Share Posted April 13, 2009 thank you friend ! a question , is it important where i must put it on my tpl file ? thanks . 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted April 13, 2009 Share Posted April 13, 2009 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. 0 Quote Link to comment Share on other sites More sharing options...
vT16 Posted May 12, 2009 Share Posted May 12, 2009 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. 0 Quote Link to comment Share on other sites More sharing options...
mysmallbizu Posted May 12, 2009 Share Posted May 12, 2009 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. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.