Anders Posted December 3, 2013 Share Posted December 3, 2013 Hi guys, I can see when an order have been made the customer get automatic logged in to clientarea what is good now on that page complete.tpl is it possible to add the "Login to CPanel" button? this code: {if $producttype=="hostingaccount"} <form action="http{if $serversecure}s{/if}://{if $serverhostname}{$serverhostname}{else}{$serverip}{/if}:{if $serversecure}2083{else}2082{/if}/login/" method="post" target="_blank"> <input type="hidden" name="user" value="{$username}" /> <input type="hidden" name="pass" value="{$password|htmlentities}" /> <input type="submit" value="{$LANG.cpanellogin}" class="modulebutton" /> <input type="button" value="{$LANG.cpanelwebmaillogin}" onClick="window.open('http{if $serversecure}s{/if}://{if $serverhostname}{$serverhostname}{else}{$serverip}{/if}:{if $serversecure}2096{else}2095{/if}/')" class="modulebutton" /> </form> {elseif $producttype=="reselleraccount"} <form action="http{if $serversecure}s{/if}://{if $serverhostname}{$serverhostname}{else}{$serverip}{/if}:{if $serversecure}2087{else}2086{/if}/login/" method="post" target="_blank"> <input type="hidden" name="user" value="{$username}" /> <input type="hidden" name="pass" value="{$password|htmlentities}" /> <input type="submit" value="{$LANG.cpanelwhmlogin}" class="modulebutton" /> </form> {/if} I have tried but seem not work. any ideas why? warm regards B 0 Quote Link to comment Share on other sites More sharing options...
JoshDargie Posted December 4, 2013 Share Posted December 4, 2013 Hi guys, I can see when an order have been made the customer get automatic logged in to clientarea what is good now on that page complete.tpl is it possible to add the "Login to CPanel" button? this code: {if $producttype=="hostingaccount"} <form action="http{if $serversecure}s{/if}://{if $serverhostname}{$serverhostname}{else}{$serverip}{/if}:{if $serversecure}2083{else}2082{/if}/login/" method="post" target="_blank"> <input type="hidden" name="user" value="{$username}" /> <input type="hidden" name="pass" value="{$password|htmlentities}" /> <input type="submit" value="{$LANG.cpanellogin}" class="modulebutton" /> <input type="button" value="{$LANG.cpanelwebmaillogin}" onClick="window.open('http{if $serversecure}s{/if}://{if $serverhostname}{$serverhostname}{else}{$serverip}{/if}:{if $serversecure}2096{else}2095{/if}/')" class="modulebutton" /> </form> {elseif $producttype=="reselleraccount"} <form action="http{if $serversecure}s{/if}://{if $serverhostname}{$serverhostname}{else}{$serverip}{/if}:{if $serversecure}2087{else}2086{/if}/login/" method="post" target="_blank"> <input type="hidden" name="user" value="{$username}" /> <input type="hidden" name="pass" value="{$password|htmlentities}" /> <input type="submit" value="{$LANG.cpanelwhmlogin}" class="modulebutton" /> </form> {/if} I have tried but seem not work. any ideas why? warm regards B I don't believe you can copy the code and have it work, as some of the variables would not be loaded. You can however create your own login buttons by doing a query of the database and building the login form manually. I've done that for a few of my customers on various areas of their account manager. 0 Quote Link to comment Share on other sites More sharing options...
Anders Posted December 4, 2013 Author Share Posted December 4, 2013 I don't believe you can copy the code and have it work, as some of the variables would not be loaded. You can however create your own login buttons by doing a query of the database and building the login form manually. I've done that for a few of my customers on various areas of their account manager. Hi Josh, That sounds fanastic do you want to share an example of the html code, and have you done it with the cpanel login button also? Warm regards Anders 0 Quote Link to comment Share on other sites More sharing options...
onliner Posted December 4, 2013 Share Posted December 4, 2013 I've done that for a few of my customers on various areas of their account manager. Fantastic! I'm also interested in this. Is it possible to ask you for a custom job? On PM? 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.