############################################################## 
## MOD Title: Move Avatar Gallery Outside phpBB Root Path 
## MOD Author: Thoul < tempshad@hotmail.com >
## MOD Description: Store avatars outside the phpBB folder. 
## MOD Version: 1.2.0
## 
## Installation Level: Moderate
## Installation Time: 5-15 Minutes 
## Files To Edit: includes/usercp_register.php, 
##                     includes/usercp_avatar.php,
##                     admin/admin_users.php,
##                     admin/index.php
## Included Files: root_avatars.txt, docroot_test.php
############################################################## 
## Author's Notes: 
## 
## Applying this MOD on subdomain forums is a little tricky. The MOD uses the 
## $DOCUMENT_ROOT variable, which may be different on subdomains. If you want your
## avatar gallery to be found at www.a.com/images/avatars/ and your forums are on a
## subdomain, like phpBB.a.com, then you should follow the instructions in this file 
## before attempting to apply the MOD as described in root_avatars.txt.
## 
## First, upload docroot_test.php to on each of your subdomains and the main domain. 
## Run the file on each these, and if it tells you something different for each one, 
## then make a note of the DOCUMENT_ROOT on the main domain. You'll need to set the
## $root variable mentioned in the rest of the instructions in this file to that, 
## but without a trailing slash. For example, if docroot_test.php tells you:
##		The DOCUMENT_ROOT variable here is set to: /home/place/public_html/ 
## then, in the rest of these instructions, you will need to use 
##		$root= '/home/place/public_html';
## 
## 
## This MOD is released under the GPL License. 
## Intellectual Property is retained by the MOD Author(s) listed above.
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To 
## This MOD 
############################################################## 

#-----[ OPEN ]------------------------------------------ 
# 
includes/usercp_register.php

# 
#-----[ FIND ]------------------------------------------ 
# 

if ( !defined('IN_PHPBB') )
{
	die("Hacking attempt");
	exit;
}

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

$root= '/home/xxx/public_html';

#-----[ OPEN ]------------------------------------------ 
# 
includes/usercp_avatar.php

# 
#-----[ FIND ]------------------------------------------ 
# 

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *
 ***************************************************************************/


# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

$root= '/home/xxx/public_html';


#-----[ OPEN ]------------------------------------------ 
# 
admin/admin_users.php

# 
#-----[ FIND ]------------------------------------------ 
# 

define('IN_PHPBB', 1);

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

$root= '/home/xxx/public_html';


#-----[ OPEN ]------------------------------------------ 
# 
admin/index.php

# 
#-----[ FIND ]------------------------------------------ 
# 

define('IN_PHPBB', 1);


# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 

$root= '/home/xxx/public_html';

############################################################## 
## Authors Notes: 
## Now that you have completed the above changes, you should follow the instructions
## in root_avatars.txt, with the following change. Be sure to make this change to 
## the instructions in root_avatars.txt, or the MOD won't work! Every instance of
## "$DOCUMENT_ROOT" in those instructions needs to be changed to "$root" (without 
## quotes in both cases).
############################################################## 



# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM 