I have been creating custom pages using the following code.... and it works great..... if I place it in the mybb root directory of my forum.
However I am now needing to move the php page to a sub folder. and When I move it to a sub folder I get an error finding the .global.php file.
I have tried changing path, but I can't get it to work.
So lets say my mybb root directory is MYBBSUPPORT
and my new subfolder is MYBBSUPPORT/Book7
Can can someone help me fix my code so it will work?
PHP Code:
<?php
$templatelist = 'BookDB7';
define('IN_MYBB', 1); require "./global.php";
add_breadcrumb("BookDB7", "BookDB7.php");
eval("\$html = \"".$templates->get("BookDB7")."\";");
if(in_array($mybb->user['usergroup'], array('1','89','120','157')))
{
error("Access denied");
}
output_page($html);
?>
However I am now needing to move the php page to a sub folder. and When I move it to a sub folder I get an error finding the .global.php file.
I have tried changing path, but I can't get it to work.
So lets say my mybb root directory is MYBBSUPPORT
and my new subfolder is MYBBSUPPORT/Book7
Can can someone help me fix my code so it will work?