magga Posted November 14, 2007 Share Posted November 14, 2007 If you want your Login To Plesk button to automatically log the client into plesk rather than just load the plesk login screen, follow the instructions below: In the client area > hosting accounts > view details (clientarea.php?action=productdetails) there is a "Login To Plesk" button if you are using Plesk or Pleskreseller. For normal Plesk Module: In the clientareproductdetails.tpl file: Find: {$serverdetails} and replace this with: <form method="post" action="https://{$server.name}:8443/login_up.php3" target="_blank" > <input type="hidden" name="login_name" id="login_name" value="{$username}"/> <input type="hidden" name="passwd" id="fid-passwd" value="{$password}"/> <input type="submit" class="button" value="{$LANG.clientareaplesklink}" /> </form> Then in your /lang/English.txt file, add the line: $_LANG["clientareaplesklink"] = "Login to Plesk"; For Plesk Reseller Module: In the clientareproductdetails.tpl file: Find: {$serverdetails} and replace this with: <form method="post" action="https://{$server.name}:8443/login_up.php3" target="_blank" > <input type="hidden" name="login_name" id="login_name" value="{$domain}"/> <input type="hidden" name="passwd" id="fid-passwd" value="{$password}"/> <input type="submit" class="button" value="{$LANG.clientareaplesklink}" /> </form> Then in your /lang/English.txt file, add the line: $_LANG["clientareaplesklink"] = "Login to Plesk"; This will automatically log the client into Plesk using the password stored in WHMCS. If you use this in conjunction with my "Script to automatically update Plesk passwords in WHMCS" then the client will always have the correct password listed in product details and always be able to use the automatic login link. This has been tested with Plesk 8.2.1 but should work with most Plesk versions. 0 Quote Link to comment Share on other sites More sharing options...
Rob K Posted November 23, 2007 Share Posted November 23, 2007 Sounds good, but I don't have the login to Plesk button in the first place, how is that setup? 0 Quote Link to comment Share on other sites More sharing options...
magga Posted November 27, 2007 Author Share Posted November 27, 2007 Assuming you are using the latest template I would have thought you should have. If you go into view hosting packages > view details do you see username and password for the server ? The Login to Plesk button should be next to this. If not, you can still use the code I provided as this will put the button there for you. 0 Quote Link to comment Share on other sites More sharing options...
Rob K Posted November 27, 2007 Share Posted November 27, 2007 Yes I am using the latest templates. I am assuming I do your suggestion on the client login rather than the admin login. There are no login details or Plesk button. Any idea why?? 0 Quote Link to comment Share on other sites More sharing options...
magga Posted November 27, 2007 Author Share Posted November 27, 2007 Yes Rob this is for the Client login not admin. I'm not entirely sure why you don't have it .. are you using the normal Plesk module or Pleskreseller module ? 0 Quote Link to comment Share on other sites More sharing options...
Rob K Posted November 27, 2007 Share Posted November 27, 2007 Normal Plesk module 0 Quote Link to comment Share on other sites More sharing options...
magga Posted November 27, 2007 Author Share Posted November 27, 2007 I'm not 100% sure then. I am using the reseller module and it appears with that. Maybe check it out with Matt (support) to see why it may not be there. 0 Quote Link to comment Share on other sites More sharing options...
othellotech Posted November 28, 2007 Share Posted November 28, 2007 In our In the clientareproductdetails.tpl file we dont have a {$serverdetails} section, but we do have a {$serverclientarea} magga have you submitted your "mod" to WHMCS for possible inclusion as a standard, the feature to login to cpanel from WHMCS for the client is already there, so ... 0 Quote Link to comment Share on other sites More sharing options...
magga Posted November 29, 2007 Author Share Posted November 29, 2007 Maybe it is different if you are using the plesk module rather than reseller ? In any case... using that code will put the login button on that page, it doesn't matter exactly where you put it, it will still work. I have sent it to Matt yes, does that count as officially "submitting" it ? Cheers 0 Quote Link to comment Share on other sites More sharing options...
nolageek Posted March 16, 2008 Share Posted March 16, 2008 I see this no longer works. Where is the plesk login code now? I don't see it in clientareaproductdetails.tpl anymore. Really need to sway $username for $domain! 0 Quote Link to comment Share on other sites More sharing options...
magga Posted March 17, 2008 Author Share Posted March 17, 2008 The Plesk login code is not there by default, you need to add it yourself (from the code at the start of this thread). 0 Quote Link to comment Share on other sites More sharing options...
nolageek Posted March 17, 2008 Share Posted March 17, 2008 But the part it says to 'find' isn't in the file. Find: {$serverdetails} Plus, since we have not made any modifications and the client side already says "Log into Plesk" I imagine it has to be there somewhere. 0 Quote Link to comment Share on other sites More sharing options...
magga Posted March 17, 2008 Author Share Posted March 17, 2008 Maybe the default file has changed recently but you simply need to remove whatever code brings up the "Log into Plesk" and in it's place put the code I provided. It used to be the {$serverdetails} variable that displayed this information but it may be something else now. In any case, it will still work whether you replace existing code or not, it just might mean you have 2 login to Plesk buttons (one of which you need to remove). 0 Quote Link to comment Share on other sites More sharing options...
nolageek Posted March 18, 2008 Share Posted March 18, 2008 I was mistaken, it says "login to cpanel" <form method="post" action="https://{$server.name}:8443/login.php3" target="_blank" > <input type="hidden" name="login_name" id="login_name" value="{$username}"/> <input type="hidden" name="passwd" id="fid-passwd" value="{$password}"/> <input type="submit" class="button" value="{$LANG.clientareaplesklink}" /> </form> I tried using the above code and {$server.name} is placing the current server (where WHMCS is installed) not the server that the client account is on. Also, can I test to see what server this account is on to determine which button to display? Say {if $server.name = Plesk} or something? (Just as an example.) 0 Quote Link to comment Share on other sites More sharing options...
magga Posted March 19, 2008 Author Share Posted March 19, 2008 I assume you have different servers with different control panels on.. i.e. cPanel and Plesk ? I'm not really sure if there is a variable you can use instead of {$server.name} which will give you the server that the client as actually on. I would imagine there probably is and once you find this out, you can then do some if statements to work out whether it is a Plesk or cPanel server and display the correct button accordingly. 0 Quote Link to comment Share on other sites More sharing options...
nolageek Posted March 21, 2008 Share Posted March 21, 2008 That's what I ended up doing: In clientareaproductdetails.tpl, I replaced... {$serverclientarea} with... {if $groupname == "Plesk Hosting Plans"} <form method="post" action="https://**IP ADDRESS**:8443/login.php3" target="_blank" > <input type="hidden" name="login_name" id="login_name" value="{$domain}"/> <input type="hidden" name="passwd" id="fid-passwd" value="{$password}"/> <input type="submit" class="button" value="Login to Plesk" /> </form> {else} {$serverclientarea} {/if} We have our Plesk servers in one group (Plesk Hosting Plans) and cPanel in another (cPanel Hosting Plans,) so I just used a if statement to determine which was being being viewed and it shows the proper login button. Works fine. Now I just need to get WHMCS to be able to change passwords on plesk through the client/admin side. 0 Quote Link to comment Share on other sites More sharing options...
magga Posted March 24, 2008 Author Share Posted March 24, 2008 I have made a script that does this - It's posted somewhere in this forum but will only work for domain administrator passwords, not client passwords. 0 Quote Link to comment Share on other sites More sharing options...
nolageek Posted March 25, 2008 Share Posted March 25, 2008 megga, what about FTP passwords? (we usually set it to the same thing.) 0 Quote Link to comment Share on other sites More sharing options...
magga Posted March 25, 2008 Author Share Posted March 25, 2008 where are you going to display FTP passwords in WHMCS though ? There is only space for one password. Do you mean to display the FTP password here instead of the domain administrator password? If so, it should be fairly easy to do this assuming the password is stored in the psa database. 0 Quote Link to comment Share on other sites More sharing options...
nolageek Posted March 25, 2008 Share Posted March 25, 2008 I see what you mean. Nevermind. I had a blond moment there. 0 Quote Link to comment Share on other sites More sharing options...
dutchnet Posted July 3, 2008 Share Posted July 3, 2008 I changed the code from nolageek a bit to be more flexible and to work with Plesk 8.4.0 on Linux {if $groupname == "Plesk Hosting"} <form method="post" action="https://{$domain}:8443/login_up.php3" target="_blank" > <input type="hidden" name="login_name" id="login_name" value="{$domain}"/> <input type="hidden" name="passwd" id="fid-passwd" value="{$password}"/> <input type="submit" class="button" value="Login bij Plesk" /> </form> {else} {$serverclientarea} {/if} 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.