Here is the code with comments for filed in address
http://www.yoursite.com/dir1/dir2/ and forum called this way :
http://www.yoursite.com/forum/
PHP Code:
<?php
// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);
define('GET_EDIT_TEMPLATES', true);
//specialtemplates are called in another file as this one is called in require_once
//ie : 'smiliecache' and 'bbcodecache',
// ######################### REQUIRE BACK-END ############################
//file in root/dir1/dir2/ and forum files in root/forum/
chdir('./../../');
require_once('./dir.php'); //contains path information
if (forum) {
chdir(forum);
}
require_once('./global.php');
require_once('./includes/functions_newpost.php');
require_once('./includes/functions_editor.php');
$textareacols = fetch_textarea_width();
construct_edit_toolbar($newpage['message'], 0, 0, 0);
$subject = $newpage['title'];
//replace js call
$messagearea=eregi_replace("href=\"clientscript","href=\"" . $vboptions['bburl'] . "/clientscript",$messagearea);
//replace pictures call
$messagearea=eregi_replace("src=\"([^(http)])([^>]*)","src=\"" . $vboptions['bburl'] . "/\\1\\2",$messagearea);
eval('print_output("' . fetch_template('template') . '");');
}
?>