Inetbiz Posted April 25, 2009 Share Posted April 25, 2009 I would like to show a conditional if client not logged on that prompts them to login to client area to submit tickets to restricted support departments AND/OR display all support departments but redirect to login if support department requires authentication of client. 0 Quote Link to comment Share on other sites More sharing options...
Hosteris Posted April 25, 2009 Share Posted April 25, 2009 You can use {if $loggedin}here you can show content only if client is logged in{/if} or {if !$loggedin}here you can show content that not requires login{/if} you can combine it to adapt to your nedds. maybe there is another way to do this... *SFMBE 0 Quote Link to comment Share on other sites More sharing options...
annomander Posted April 26, 2009 Share Posted April 26, 2009 Thats available in the backend already you just check the box that makes it not available to the public and only registered users 0 Quote Link to comment Share on other sites More sharing options...
Inetbiz Posted April 26, 2009 Author Share Posted April 26, 2009 So if I combine the two, with an else condition, then I could say click here to see the full list of support departments? 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted April 26, 2009 Share Posted April 26, 2009 {if $loggedin} here you can show content only if client is logged in {else} <div align="center" class="domain_container"> <div class="WhmcsTableTitles">Client Login</div> <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> </div> {/if} 0 Quote Link to comment Share on other sites More sharing options...
Inetbiz Posted April 26, 2009 Author Share Posted April 26, 2009 (edited) Ok in the {if $loggedin} is not exactly what I had in mind. It probably even goes down to some core template changes. Without logged on, anyone can see the publicly accessible support departments. And, I don't find a supporttickets.tpl which template file is it? supportticketview.tpl or supportticketslist.tpl? I think it's supportticketsubmit-stepone.tpl Would the template only need: <p>You will need to login to see a full list of support departments.</p> <div align="center" class="domain_container"> <div class="WhmcsTableTitles">Client Login</div> <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> </div> Edited April 26, 2009 by Inetbiz 0 Quote Link to comment Share on other sites More sharing options...
Inetbiz Posted April 26, 2009 Author Share Posted April 26, 2009 Ok, I tried your suggestions, BAJI26, but that did not work. I was returned to the same page without being logged on. 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted April 26, 2009 Share Posted April 26, 2009 {if $loggedin} ~ TPL content that you want to show ppls if they are logged in ~ {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...
Inetbiz Posted April 27, 2009 Author Share Posted April 27, 2009 {if $loggedin} ~ TPL content that you want to show ppls if they are logged in ~ {else} <p>{$LANG.loginintrotext}</p> Baji26 I would not know what the logged on content would be for supportticketsubmit-stepone.tpl It should only spit out the support departments they have access to, dynamically. The form post does not work. It keeps comming back to the same thing and the logged on departments are not showing up. 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.