eccen Posted June 15, 2009 Share Posted June 15, 2009 (edited) I am having trouble redirecting to a custom page after client login. I created a custom page based on the documentation (http://wiki.whmcs.com/Creating_Pages) and it loads up fine. However, dologin.php?goto=custom does not work, and it loads to clientarea instead of the custom page I created. I added $_LANG["customtitle"] = "custom"; to my language file as well. What am I doing wrong? I have the latest version of whmcs Edited June 15, 2009 by eccen 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted June 15, 2009 Share Posted June 15, 2009 (edited) dologin.php?goto=[color=red]custom[/color] where 'custom' is the name of the template. Make sure there are't any spaces between $_LANG["[color=red]newtitle[/color]"] = "New Title"; . Edited June 15, 2009 by BAJI26 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted June 15, 2009 Share Posted June 15, 2009 dologin.php?goto=[color=red]custom[/color] where 'custom' is the name of the template. Make sure there are't any spaces between $_LANG["[color=red]newtitle[/color]"] = "New Title"; . Where "custom" is the name of the custom php file... not the template or the page title. 0 Quote Link to comment Share on other sites More sharing options...
BAJI26 Posted June 15, 2009 Share Posted June 15, 2009 My bad! Thanks Sparky! 0 Quote Link to comment Share on other sites More sharing options...
eccen Posted June 15, 2009 Author Share Posted June 15, 2009 Hmm... I still can't get it work. What am I doing wrong? Thanks! Here is my code: login form <form method="post" action="/account/dologin.php?goto=pw_create"> <input type="hidden" name="token" value="---tokencode---" /> Email Address: <input type="text" name="username" size="50"><br> Password: <input type="password" name="password" size="20"><br> <input type="submit" value="Login"> </form> (whmcs root)/pw_create.php <?php define("CLIENTAREA",true); require("dbconnect.php"); require("includes/functions.php"); require("includes/clientareafunctions.php"); $pagetitle = $_LANG['pw_createtitle']; $pageicon = "images/support/clientarea.gif"; $breadcrumbnav = '<a href="index.php">'.$_LANG['globalsystemname'].'</a>'; $breadcrumbnav .= ' > <a href="pw_create.php">pw_create</a>'; initialiseClientArea($pagetitle,$pageicon,$breadcrumbnav); if ($_SESSION['uid']) { # User is Logged In - put any code you like here } # To assign variables in Smarty use the following syntax. # This can then be used as {$variablename} in the template # Define the template filename to be used without the .tpl extension $templatefile = "pw_create"; outputClientArea($templatefile); ?> and added $_LANG["pw_createtitle"] = "pw_create"; to (whmcs root)/lang/English.txt 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted June 15, 2009 Share Posted June 15, 2009 remove the underscore from all instances of "pw_create" eg.. make it "pwcreate" 0 Quote Link to comment Share on other sites More sharing options...
eccen Posted June 15, 2009 Author Share Posted June 15, 2009 remove the underscore from all instances of "pw_create"eg.. make it "pwcreate" Ah problem solved! Thanks a lot! why does the underscore cause the problem? I guess it thinks the underscore is a space? 0 Quote Link to comment Share on other sites More sharing options...
sparky Posted June 15, 2009 Share Posted June 15, 2009 I believe only numbers "0-9", letters "a-z" (upper or lower case), and from some tests "-" is the only characters allowed in the file name. 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.