MyBB Community Forums

Full Version: $forumdir always invalid !
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Since I'm not getting any views or help in my support thread I'll try it here.

 * Website:
 * EzIRC originally for vBulletin by Billy Ewing (toonySNN) 
 * EzIRC name used with permission.
 * You are free to modify this file, but please do not remove this copyright notice.
 * This chat.php script uses code from this thread;
 * Without the Open Source MyBB community, this mod would probably not be here.
$forumdir = "/"; // change this if you want the script to work outside your forums..

//end editing

define("IN_MYBB", 1);

if(substr($_SERVER['SCRIPT_NAME'],0,1) == "/")
    define('THIS_SCRIPT', substr($_SERVER['SCRIPT_NAME'],1));
$current_dir = getcwd();

//change working directory to allow board includes to work
$forumdirslash = $forumdir."/";
$change_dir = "./";

if([email protected]($forumdir) && !empty($forumdir))
        $change_dir = $forumdir;
        die("\$forumdir is invalid!");

//include board files
require_once $change_dir."/global.php";
require_once MYBB_ROOT."inc/functions.php";
require_once MYBB_ROOT."inc/functions_post.php";
require_once MYBB_ROOT."inc/functions_user.php";
require_once MYBB_ROOT."inc/class_parser.php";
// output the page.
eval("\$chat = \"".$templates->get("ezirc_chat")."\";");
$error = "Sorry, you need to be logged in to access EzIRC.";
eval("\$chat = \"".$templates->get("error")."\";");
//change directory back to current where script is

I have MyBB installed under <domain>/forum/
But no matter what I do it always says $forumdir invalid

I tried:
$forumdir = "/forum/";
$forumdir = "/forum";
$forumdir = "";
$forumdir = "/users/dutchharbor/public_html/forum/";

But none of them work !
I'm really missing something vital here,