Jump to content

Supporttickets.tpl


Inetbiz

Recommended Posts

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites


{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}

Link to comment
Share on other sites

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 by Inetbiz
Link to comment
Share on other sites

{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}

Link to comment
Share on other sites

{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.

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