Multi Forums Pro Host Install Guide

------------------------
Step 1 of 2 - Setting up
------------------------

1. Create a new database
2. Open up conf_global/multiforums.config.inc.php in a text editor and change the Database Connection Details
3. Upload the Invision Power Board uploads folder with your edited files (see step 2 and 3), do not upload sm_install.php, conf_global.php, css.php, show.php also don't upload the cache folder
4. If you have uploaded the files above in 2. delete them
5. Make a folder called conf_global and chmod that folder to 777, upload the index.php, multiforums.config.inc.php and settings.sql file and chmod to 777
6. Upload new_forum.php, directory.php, multiforums_default_db.sql and conf_global_default.php in the root dir
7. Goto to: http://www.your-web-site.com/forums/conf_global
8. Fill out the options
9. Test it: http://www.your-web-site.com/forums/new_forum.php
10. Admin control panel can be access from: http://www.your-web-site.com/forums/conf_global
11. Board Directory can be access from: http://www.your-web-site.com/forums/directory.php

------------------------
Step 2 of 2 - File editing (editing 8 files)
------------------------
File 1 of 8:
uploads/index.php
----------------
Find:

require ROOT_PATH."conf_global.php";
--------
Replace with:

include "conf_global/multiforums.config.inc.php";
if ($master_offline == true) {
header("Location: $offline_error_url");
exit;
}

if ($mforum==true) {
setcookie ("ForumSetCookie", $mforum, time()+31536000);
}
else
{
$mforum = $ForumSetCookie;
}

if ($mforum==false) {
header("Location: $noforum_error_url");
exit;
}
else
{
if(is_file("conf_global/".$mforum.".php")) {

$resultlink = mysql_query("SELECT * FROM `multiforums_forums` WHERE 1 AND `access_name` LIKE '$mforum' LIMIT 0 , 1");
if ($forum = mysql_fetch_array($resultlink)) {
if ($forum[online] == false) {
header("Location: $offline_error_url");
exit;
}
}

require ROOT_PATH."conf_global/$mforum.php";
}
else
{
include "conf_global/multiforums.config.inc.php";
header("Location: $exist_error_url");
exit;
}
}
----------------
Find:

if ($ibforums->session_type == 'cookie' )
{
$ibforums->session_id = "";
$ibforums->base_url = $ibforums->vars['board_url'].'/index.'.$ibforums->vars['php_ext'].'?';
}
else
{
$ibforums->base_url = $ibforums->vars['board_url'].'/index.'.$ibforums->vars['php_ext'].'?s='.$ibforums->session_id.'&amp;';
}

$ibforums->js_base_url = $ibforums->vars['board_url'].'/index.'.$ibforums->vars['php_ext'].'?s='.$ibforums->session_id.'&';
----------------
Replace with:

if ( $ibforums->session_type == 'cookie' )
{
$ibforums->session_id = "";
$ibforums->base_url = $ibforums->vars['board_url'].'/index.'.$ibforums->vars['php_ext']."?mforum=$mforum&";
}
else
{
$ibforums->base_url = $ibforums->vars['board_url'].'/index.'.$ibforums->vars['php_ext']."?mforum=$mforum&s=".$ibforums->session_id.'&amp;';
}

$ibforums->js_base_url = $ibforums->vars['board_url'].'/index.'.$ibforums->vars['php_ext']."?mforum=$mforum&s=".$ibforums->session_id.'&';
----------------
File 2/3 of 8:
uploads/admin.php, and uploads/ipchat.php (if you want them to be able to use ipchat)
----------------
Find:

require ROOT_PATH."conf_global.php";
--------
Replace with:

include "conf_global/multiforums.config.inc.php";
if ($master_offline == true) {
header("Location: $offline_error_url");
exit;
}

if ($ForumSetCookie==true) {
if(is_file("conf_global/".$ForumSetCookie.".php")) {
$resultlink = mysql_query("SELECT * FROM `multiforums_forums` WHERE 1 AND `access_name` LIKE '$ForumSetCookie' LIMIT 0 , 1");
if ($forum = mysql_fetch_array($resultlink)) {
if ($forum[online] == false) {
header("Location: $offline_error_url");
exit;
}
}
require ROOT_PATH."conf_global/$ForumSetCookie.php";
}
else
{
include "conf_global/multiforums.config.inc.php";
setcookie ("ForumSetCookie");
header("Location: $exist_error_url");
exit;
}
}
else
{
include "conf_global/multiforums.config.inc.php";
header("Location: $noforum_error_url");
exit;
}

----------------
File 4 of 8:
upload/sources/functions.php
----------------
Find:

$DB->query("SELECT s.*, t.template, c.css_text
FROM ibf_skins s
LEFT JOIN ibf_templates t ON (t.tmid=s.tmpl_id)
LEFT JOIN ibf_css c ON (c.cssid=s.css_id)
WHERE s.sid=$id".$extra);
--------
Replace with:

$DB->query("SELECT s.*, t.template, c.css_text
FROM ibf_skins s
LEFT JOIN multiforums_templates t ON (t.tmid=s.tmpl_id)
LEFT JOIN ibf_css c ON (c.cssid=s.css_id)
WHERE s.sid=$id".$extra);
----------------
Find: (please note this code is found 3 times in the script and all of them must be found and replaced)

$DB->query("SELECT s.*, t.template, c.css_text
FROM ibf_skins s
LEFT JOIN ibf_templates t ON (t.tmid=s.tmpl_id)
LEFT JOIN ibf_css c ON (s.css_id=c.cssid)
WHERE s.default_set=1");
--------
Replace with:

$DB->query("SELECT s.*, t.template, c.css_text
FROM ibf_skins s
LEFT JOIN multiforums_templates t ON (t.tmid=s.tmpl_id)
LEFT JOIN ibf_css c ON (s.css_id=c.cssid)
WHERE s.default_set=1");
----------------
Find:

$DB->query("SELECT s.*, t.template, c.css_text
FROM ibf_skins s
LEFT JOIN ibf_templates t ON (t.tmid=s.tmpl_id)
LEFT JOIN ibf_css c ON (s.css_id=c.cssid)
WHERE s.default_set=1");
--------
Replace with:

$DB->query("SELECT s.*, t.template, c.css_text
FROM ibf_skins s
LEFT JOIN multiforums_templates t ON (t.tmid=s.tmpl_id)
LEFT JOIN multiforums_templates c ON (s.css_id=c.cssid)
WHERE s.default_set=1");

----------------
File 5 of 8:
upload/sources/Admin/admin_functions.php
----------------

Find:

function rebuild_config( $new = "" )
{
global $IN, $std, $ADMIN, $root_path
--------
Change to:

function rebuild_config( $new = "" )
{
global $IN, $std, $ADMIN, $root_path, $ForumSetCookie;

--------
Find:

require ROOT_PATH.'conf_global.php';
--------
Replace with:

require ROOT_PATH."conf_global/".$ForumSetCookie.".php";
--------
Find:

@rename( ROOT_PATH.'conf_global.php', ROOT_PATH.'conf_global-bak.php' );
@chmod( ROOT_PATH.'conf_global-bak.php', 0777);
--------
Replace with:

@rename( ROOT_PATH."conf_global/$ForumSetCookie.php", ROOT_PATH."conf_global/$ForumSetCookie-bak.php" );
@chmod( ROOT_PATH."conf_global/$ForumSetCookie-bak.php", 0777);
--------
Find:

if ( $fh = fopen( ROOT_PATH.'conf_global.php', 'w' ) )
--------
Replace with:

if ( $fh = fopen( ROOT_PATH."conf_global/$ForumSetCookie.php", 'w' ) )

----------------
File 6 of 8:
upload/sources/Admin/ad_settings.php
----------------
Find:

phpinfo();
--------
Replace with:

$ADMIN->error("For security reasons phpinfo has been disabled");
----------------
Find:

$this->save_config( array ( 'number_format', 'html_dir','safe_mode_skins', 'board_name','board_url','home_name','home_url', 'disable_gzip',
'html_url','upload_url', 'upload_dir', 'print_headers', 'header_redirect', 'debug_level', 'sql_debug' ) );
--------
Replace with:

$this->save_config( array ( 'number_format', 'safe_mode_skins', 'board_name', 'home_name', 'home_url', 'disable_gzip',
'html_url', 'print_headers', 'header_redirect', 'debug_level', 'sql_debug' ) );

----------------
File 7 of 8:
upload/sources/Admin/ad_wrappers.php
----------------
Find:

function ad_settings() {
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP;
--------
Under that add this:

$ADMIN->error("Board Wrappers have been disabled, please use HTML Templates, Style Sheets and Macros to change the layout and colours");

----------------
File 8 of 8:
upload/sources/Admin/ad_mysql.php
----------------
Find:

function ad_mysql() {
global $IN, $INFO, $DB, $SKIN, $ADMIN, $std, $MEMBER, $GROUP, $HTTP_POST_VARS, $HTTP_GET_VARS;
--------
Under that add this:

$ADMIN->error("For security reasons SQL Management has been disabled, if you need a backup of your database please contact the host")

----------------
And your done! :) Just re-read Step 1 and make sure everything is ok