Log in

View Full Version : Error with custom page


The-Ensemble
09-08-2007, 02:27 PM
I created a custom page and I got a problem when trying to make it looks integrated into the USERCP.

The section its having problems with.
$navbits = array();
// change the line below to contain whatever you want to show in the navbar (title of your custom page)
$navbits[$parent] = 'Custom Page ';


// sets the area discription, feel free to change
$navbits[''] = "Custom Page";
// sets shell template
$shelltemplatename = 'USERCP_SHELL';



$navbits = construct_usercp_nav("$navbits");
eval('$navbar = "' . fetch_template('navbar') . '";');

// change the line below to contain the name of the actual main output template used in your script
eval('print_output("' . fetch_template('customtemp1') . '");');Its says the problem is "construct_usercp_nav("$navbits")" Is this not a correct function or did I do something else wrong with the coding?

Paul M
09-08-2007, 03:18 PM
What is the actual error message ?

The-Ensemble
09-08-2007, 06:45 PM
"Fatal error: Call to undefined function: construct_usercp_nav() in /X/custompagename.php on line 54"

Thanks for the reply Paul ;)

Opserty
09-08-2007, 10:54 PM
You need to include the functions_user.php file from the includes directory in your forum root, as that is where the function is defined ;)

The-Ensemble
09-08-2007, 11:47 PM
You need to include the functions_user.php file from the includes directory in your forum root, as that is where the function is defined ;)

Ok, how would I do this?

ETA moment of complete dumbness there LOL I've done this it has changed nothing, the error message is the same.

Dismounted
09-09-2007, 06:25 AM
require_once(DIR . '/includes/functions_user.php');