Jump to content

dologin.php?goto=custom does not work


eccen

Recommended Posts

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

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

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

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