MACscr Posted December 31, 2006 Share Posted December 31, 2006 I already posted this in another thread, but i figured i would seperate it so it wouldnt get lost in the other conversations going on there and people can comment or ask for support on it here as well. ################################### Well, I told you i would come up with a simple non branded admin login screen, so here it is. Add this to your whmcs install root directory htaccess file or create a new one if you dont already have one: Options FollowSymLinks RewriteEngine On RewriteRule ^admin/adminlogin.php$ templates/admin/login.tpl [L,NC,NS] RedirectPermanent admin/login.php [url]https://yourdomain.com/admin/adminlogin.php[/url] Make sure you customize that RedirectPermanent url to whatever you want. If you have ssl available, i recommend you use it. Then create a folder in your whmcs templates folder called admin, then create a blank file called login.tpl add this html. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>YOUR TITLE HERE</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript"> function sf(){document.frmlogin.username.focus();} </script> </head> <body onload="sf();"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" summary="layout table"> <tr> <td colspan="2" valign="top" style="padding-top:13px;padding-bottom:13px;"> <table width="100%" border="0" cellpadding="0" cellspacing="0" summary="layout table"> <tr> <td valign="top"> <center> <form method="post" action="../../admin/dologin.php" name="frmlogin"> Username: <input type="text" name="username" size="30" /> Password: <input type="password" name="password" size="30" /> <input type="submit" value="Login" class="button" /> [url="../../admin/login.php?action=remind"]Forgotten your password? Click Here[/url] </form> </center> </td> </tr> </table> </td> </tr> </table> </body> </html> Like i said, its nothing fancy, but its functional and will let you hide the the fact that its whmcs to anyone that stumbles upon your whmcs admin folder. As soon as you login, your back to the normal look of whmcs and will of course see the powered by and whm logo, etc. Hope others fine this useful as I really had no need for it. =P NOTE: the password reminder part is going to work with this method. I cant think of a quick fix off the top of my head and since i really have no need for this, im not going to spend any more time on it. 15 mins is enough. =P Feel free to share the solution here if you figure it out and i will update this thread. 0 Quote Link to comment Share on other sites More sharing options...
bedot Posted December 31, 2006 Share Posted December 31, 2006 nice should add that to the knowledge base with the client login, always useful to have an admin login on the front page for remote workers. Maybe a bit clearer for people belowe <form method="post" action="http://www.yourdomain.com/whmcs/admin/dologin.php?"> Email Address: <input type="text" name="username" size="50"> Password: <input type="password" name="password" size="20"> <input type="submit" value="Login"> </form> Forgotten your password? Click Here 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted December 31, 2006 Author Share Posted December 31, 2006 why did you add ?goto=clientarea to the dologin? your html code wouldnt work if someone used the wrong username or password either. It would kick them back to login.php and they again would see whmcs info, which would defeat the purpose of my hack. My hack isnt for having a remote login form. 0 Quote Link to comment Share on other sites More sharing options...
bedot Posted January 1, 2007 Share Posted January 1, 2007 ?goto=clientarea was a typo forgot to remove it when I used the client template from the knowledge base and I was getting ready to go out for new year party. Ill edit that bit in a sec.. Ah yes, I was purely looking at it as a remote login form prospective rather than the concept of replacing the WHMCS page altogether.. I understand your reasoning for it, as per the discussion re: unbranding the admin area. But people may find it useful to have the code avaliable todo remote admin logins... 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.