#####################################################################
## MOD Title: Advanced BBCode Box 3 ( aka ABBC3 )
##
## MOD Author: leviatan21 < info@mssti.com > (Gabriel) http://www.mssti.com/phpbb3/
##
## MOD Description: How to upgrade ABBC3 from 1.0.8 to 1.0.9 with ACP
##
## MOD Version: 1.0.8
##
## Installation Level: Easy
## Installation Time: ~30 Minutes
##
## Files To Edit:
##	adm/style/acp_users_signature.html
##	adm/style/overall_header.html
##	adm/style/simple_header.html
##
##	includes/bbcode.php
##	includes/functions.php
##	includes/functions_display.php
##	includes/functions_posting.php
##	includes/message_parser.php
##	includes/acp/acp_bbcodes.php
##	language/en/acp/common.php
##	
##	styles/prosilver/template/overall_header.html
##	styles/prosilver/template/simple_header.html
##	styles/subsilver2/template/overall_header.html
##	styles/subsilver2/template/simple_header.html
##	styles/subsilver2/template/posting_body.html
##	styles/subsilver2/template/ucp_profile_signature.html
##
## Included Files:
##	install_abbc3.php
##	adm/style/*.*
##	files/*.*
##	images/*.*
##	includes/*.*
##	language/en/mods/*.*
##	styles/*.*
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 
#####################################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
#####################################################################
## Author Notes:
##
##	This install is fixed for PHPBB v3.0.1 but works also for PHPBB v3.0.0
##
#####################################################################
## MOD History:
##
##	2008-05-01 - Version 1.0.9
##	- New installation method.
##	- Change ABBC3 files, folder and var names.
##	- Added ABBC3 bbodes to phpbb3 custom bbcodes table :
##		Now phpbb3 takes care about parsing all bbcodes.
##		This improve speed and security.
##	- Renew ACP module for customize and setting ABBC3.
##	- Fixed insert bbcodes with wizards on IE ( Thanks phptr )
##
#######################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#####################################################################

#
#-----[ COPY ]-------------------------------------------------------
#

copy root/install_abbc3.php    to install_abbc3.php
copy root/adm/style/*.*        to adm/style/*.*
copy root/files/*.*            to files/*.*
copy root/images/*.*           to images/*.*
copy root/includes/*.*         to includes/*.*
copy root/language/en/mods/*.* to language/en/mods/*.*
copy root/styles/*.*           to styles/*.*

#
#-----[ OPEN ]-------------------------------------------------------
#
adm/style/acp_users_signature.html
#
#-----[ FIND ]-------------------------------------------------------
#
		<div id="format-buttons">
#
#-----[ AFTER, ADD ]-------------------------------------------------
# NOTE: Add these lines on a new blank line after the preceding line(s) to find.
#

		<!-- // MOD : ABBC3 (V1.0.9) - Start -->
		<!-- IF S_ABBC3_MOD -->
			<!-- INCLUDE posting_abbcode_buttons.html -->
		</div>
		<!-- ELSE -->

#
#-----[ FIND ]-------------------------------------------------------
#
				<p><input type="text" class="text full" style="border: 0; background: none;" name="helpbox" value="{L_STYLES_TIP}" /></p>
#
#-----[ AFTER, ADD ]-------------------------------------------------
# NOTE: Add these lines on a new blank line after the preceding line(s) to find.
#

		<!-- ENDIF -->
		<!-- // MOD : ABBC3 (V1.0.9) - End -->

#
#-----[ FIND ]-------------------------------------------------------
#
			<dt style="width: 90px;">
#
#-----[ BEFORE, ADD ]------------------------------------------------
# NOTE: Add these lines on a new blank line before the preceding line(s) to find.
#

		<!-- // MOD : ABBC3 (V1.0.9) - Start -->
			<!-- IF not S_ABBC3_COLOR -->

#
#-----[ FIND ]-------------------------------------------------------
#
				// ]]>
				</script>
			</dt>
#
#-----[ AFTER, ADD ]-------------------------------------------------
# NOTE: Add these lines on a new blank line after the preceding line(s) to find.
#

			<!-- ENDIF -->
		<!-- // MOD : ABBC3 (V1.0.9) - End -->

#
#-----[ FIND ]-------------------------------------------------------
# NOTE : This may be a partial find and not the whole line.
#
			<dd style="margin-left: 90px;"><textarea name="signature" 
#
#-----[ IN-LINE FIND ]-----------------------------------------------
#
 name="signature" 

#
#-----[ IN-LINE BEFORE, ADD ]----------------------------------------
#
 id="signature" 
#
#-----[ OPEN ]-------------------------------------------------------
#
adm/style/overall_header.html
#
#-----[ FIND ]-------------------------------------------------------
#
</head>
#
#-----[ BEFORE, ADD ]------------------------------------------------
# NOTE: Add these lines on a new blank line before the preceding line(s) to find.
#

<!-- // MOD : ABBC3 (V1.0.9) - Start -->
<!-- IF S_ABBC3_MOD -->

<script type="text/javascript" src="{S_ABBC3_PATH}/abbcode.js" charset="{S_CONTENT_ENCODING}"></script>

<script type="text/javascript">
// <![CDATA[
	var GB_ROOT_DIR                       = "{S_ABBC3_PATH}/greybox/";
<!-- IF S_ABBC3_RESIZE -->	
	NcodeImageResizer.MODE                = '{S_ABBC3_RESIZE_METHOD}'; // 'greybox' 'enlarge' 'samewindow' 'newwindow'
	NcodeImageResizer.IMAGE               = '{S_ABBC3_PATH}/images/errormt0.gif';
	NcodeImageResizer.MAXWIDTH            = '{S_ABBC3_MAX_IMG_WIDTH}' ;
	NcodeImageResizer.MAXHEIGHT           = '{S_ABBC3_MAX_IMG_HEIGHT}' ;
	NcodeImageResizer.warning_small       = '{L_ABBC3_RESIZE_SMALL}';
	NcodeImageResizer.warning_filesize    = '{L_ABBC3_RESIZE_FILESIZE}';
	NcodeImageResizer.warning_no_filesize = '{L_ABBC3_RESIZE_NOFILESIZE}';
	NcodeImageResizer.warning_fullsize    = '{L_ABBC3_RESIZE_FULLSIZE}';
<!-- ENDIF -->
// ]]>
</script>
<!-- IF (S_ABBC3_GREYBOX or S_BBCODE_ALLOWED) -->
<script type="text/javascript" src="{S_ABBC3_PATH}/greybox/AJS.js"></script>
<script type="text/javascript" src="{S_ABBC3_PATH}/greybox/AJS_fx.js"></script>
<script type="text/javascript" src="{S_ABBC3_PATH}/greybox/gb_scripts.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="{S_ABBC3_PATH}/greybox/gb_styles.css" />
<!-- ENDIF -->
<link rel="stylesheet" type="text/css" media="all" href="{S_ABBC3_PATH}/abbcode.css" />
<!-- ENDIF -->
<!-- // MOD : ABBC3 (V1.0.9) - End -->

#
#-----[ OPEN ]-------------------------------------------------------
#
adm/style/simple_header.html
#
#-----[ FIND ]-------------------------------------------------------
#
</head>
#
#-----[ BEFORE, ADD ]------------------------------------------------
# NOTE: Add these lines on a new blank line before the preceding line(s) to find.
#

<!-- // MOD : ABBC3 (V1.0.9) - Start -->
<link rel="stylesheet" type="text/css" media="all" href="{S_ABBC3_PATH}/abbcode.css" />
<!-- // MOD : ABBC3 (V1.0.9) - End -->

#
#-----[ OPEN ]-------------------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]-------------------------------------------------------
#
/**
* BBCode class
* @package phpBB3
*/
class bbcode
#
#-----[ REPLACE WITH ]-----------------------------------------------
#

// MOD : ABBC3 (V1.0.9) - Start
if (!class_exists('abbcode'))
{
	include($phpbb_root_path . 'includes/abbcode.' . $phpEx);
}
/**
* BBCode class
* @package phpBB3
*/
class bbcode extends abbcode
// MOD : ABBC3 (V1.0.9) - end

#
#-----[ FIND ]-------------------------------------------------------
#
// MOD : ABBC3 (V1.0.8) - START
//	function bbcode_second_pass(&$message, $bbcode_uid = '', $bbcode_bitfield = false)
	function bbcode_second_pass(&$message, $bbcode_uid = '', $bbcode_bitfield = false, $abbc3 = true)
// MOD : ABBC3 (V1.0.8) - end
#
#-----[ REPLACE WITH ]-----------------------------------------------
#
	function bbcode_second_pass(&$message, $bbcode_uid = '', $bbcode_bitfield = false)
#
#-----[ FIND ]-------------------------------------------------------
#
		// MOD : ABBC3 (V1.0.8) - START
		if ( $abbc3 )
		{
			if (!class_exists('abbcode'))
			{
				global $phpbb_root_path, $phpEx;
				include($phpbb_root_path . 'includes/abbcode.' . $phpEx);
			}
			$abbcode3 = new abbcode();
			$abbcode3->abbcode_init();
			$message = $abbcode3->abbcode_process( $message );
		}
		// MOD : ABBC3 (V1.0.8) - END
		
		if (!$this->bbcode_bitfield)
#
#-----[ REPLACE WITH ]-----------------------------------------------
#
		if (!$this->bbcode_bitfield)
#
#-----[ FIND ]-------------------------------------------------------
#
			$sql = 'SELECT *
				FROM ' . BBCODES_TABLE . '
				WHERE ' . $db->sql_in_set('bbcode_id', $sql);
#
#-----[ REPLACE WITH ]-----------------------------------------------
#

// MOD : ABBC3 (V1.0.9) - Start
			$sql = 'SELECT *
				FROM ' . BBCODES_TABLE . '
				WHERE ' . $db->sql_in_set('bbcode_id', $sql) . '
				AND bbcode_match <> "." ';
//			$sql = 'SELECT *
//				FROM ' . BBCODES_TABLE . '
//				WHERE ' . $db->sql_in_set('bbcode_id', $sql);
// MOD : ABBC3 (V1.0.9) - End

#
#-----[ FIND ]-------------------------------------------------------
#
							'#\[url:$uid\]((.*?))\[/url:$uid\]#s'			=> $this->bbcode_tpl('url', $bbcode_id),
#
#-----[ BEFORE, ADD ]------------------------------------------------
# NOTE: Add these lines on a new blank line before the preceding line(s) to find.
#

// MOD : ABBC3 (V1.0.9) - Start
							'#\[url:$uid\](ed2k://\|(file|server|serverlist|friend)(|\|[^\\/\|:<>\*\?\"]+?)\|(.*?)\|/?)\[/url:$uid\]#sie'		=> "\$this->ed2k_pass( \$bbcode_id, '\$1', '' )",
							'#\[url=(ed2k://\|(file|server|serverlist|friend)(|\|[^\\/\|:<>\*\?\"]+?)\|(.*?)\|/?):$uid\](.*?)\[/url:$uid\]#sie'	=> "\$this->ed2k_pass( \$bbcode_id, '\$1', '\$5' )",
// MOD : ABBC3 (V1.0.9) - End

#
#-----[ FIND ]-------------------------------------------------------
#
			// MOD : ABBC3 (V1.0.8) - START
			if (!class_exists('abbcode'))
			{
				global $phpbb_root_path, $phpEx;
				include($phpbb_root_path . 'includes/abbcode.' . $phpEx);
			}
			$abbcode3 = new abbcode();
			$abbcode3->abbcode_init( 'config' );
			// MOD : ABBC3 (V1.0.8) - END
#
#-----[ REPLACE WITH ]-----------------------------------------------
#
// MOD : ABBC3 (V1.0.9) - Start
			global $config;
// MOD : ABBC3 (V1.0.9) - End
#
#-----[ FIND ]-------------------------------------------------------
#
			// MOD : ABBC3 (V1.0.8) - START
			//	'img'		=> '<img src="$1" alt="' . $user->lang['IMAGE'] . '" />',
				'img'		=> '<img src="$1" alt="' . $user->lang['IMAGE'] . '"' . ( ( $abbcode3->abbcode_config['ABBC3_RESIZE'] ) ? ' onload="NcodeImageResizer.createOn(this);"' : '') . ' />',
			// MOD : ABBC3 (V1.0.8) - END
#
#-----[ REPLACE WITH ]-----------------------------------------------
#
// MOD : ABBC3 (V1.0.9) - Start
				'img'		=> '<img src="$1" alt="' . $user->lang['IMAGE'] . '"' . ( ( $config['ABBC3_RESIZE'] ) ? ' onload="NcodeImageResizer.createOn(this);"' : '') . ' />',
//				'img'		=> '<img src="$1" alt="' . $user->lang['IMAGE'] . '" />',
// MOD : ABBC3 (V1.0.9) - End
#
#-----[ OPEN ]-------------------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]-------------------------------------------------------
#
	// MOD : ABBC3 (V1.0.8) - START
	if (!class_exists('abbcode'))
	{
		include($phpbb_root_path . 'includes/abbcode.' . $phpEx);
	}
	$abbcode = new abbcode();
	$abbcode->abbcode_init( 'config' );
	$abbcode->abbcode_display( 'config' );
	// MOD : ABBC3 (V1.0.8) - END
#
#-----[ REPLACE WITH ]-----------------------------------------------
#
// MOD : ABBC3 (V1.0.9) - Start
	if ( @$config['ABBC3_MOD'] )
	{
		if (!class_exists('abbcode'))
		{
			include($phpbb_root_path . 'includes/abbcode.' . $phpEx);
		}
		$abbcode = new abbcode();
		$abbcode->abbcode_init();
	}
// MOD : ABBC3 (V1.0.9) - End
#
#-----[ OPEN ]-------------------------------------------------------
#
includes/functions_display.php
#
#-----[ FIND ]-------------------------------------------------------
#
	$sql = 'SELECT bbcode_id, bbcode_tag, bbcode_helpline
		FROM ' . BBCODES_TABLE . '
		WHERE display_on_posting = 1
		ORDER BY bbcode_tag';
#
#-----[ REPLACE WITH ]-----------------------------------------------
#

// MOD : ABBC3 (V1.0.9) - Start
	global $phpbb_root_path, $phpEx, $config, $mode;

	if ( $config['ABBC3_MOD'] )
	{
		if (!class_exists('abbcode'))
		{
			include($phpbb_root_path . 'includes/abbcode.' . $phpEx);
		}
		$abbcode = new abbcode();
		$abbcode->abbcode_init();
		$abbcode->abbcode_display( $mode );

		$sql = 'SELECT bbcode_id, bbcode_tag, bbcode_helpline
			FROM ' . BBCODES_TABLE . '
			WHERE display_on_posting = 1 AND abbcode = 0 AND bbcode_image = " " 
			ORDER BY bbcode_tag';
	}
	else
	{
		$sql = 'SELECT bbcode_id, bbcode_tag, bbcode_helpline
			FROM ' . BBCODES_TABLE . '
			WHERE display_on_posting = 1 AND abbcode = 0 
			ORDER BY bbcode_tag';		
	}
//	$sql = 'SELECT bbcode_id, bbcode_tag, bbcode_helpline
//		FROM ' . BBCODES_TABLE . '
//		WHERE display_on_posting = 1
//		ORDER BY bbcode_tag';
// MOD : ABBC3 (V1.0.9) - End

#
#-----[ FIND ]-------------------------------------------------------
#
	$db->sql_freeresult($result);

	// MOD : ABBC3 (V1.0.8) - START
	if (!class_exists('abbcode'))
	{
		global $phpbb_root_path, $phpEx;
		include($phpbb_root_path . 'includes/abbcode.' . $phpEx);
	}
	$abbcode = new abbcode();
	$abbcode->abbcode_init();
	$abbcode->abbcode_display();
	// MOD : ABBC3 (V1.0.8) - END
#
#-----[ REPLACE WITH ]-----------------------------------------------
#	
	$db->sql_freeresult($result);
#
#-----[ OPEN ]-------------------------------------------------------
#
includes/functions_posting.php
#
#-----[ FIND ]-------------------------------------------------------
#
	// MOD : ABBC3 (V1.0.8) - START
	if (!class_exists('abbcode'))
	{
		include($phpbb_root_path . 'includes/abbcode.' . $phpEx);
	}
	$abbcode = new abbcode();
	$abbcode->abbcode_init( 'config' );
	$data['bbcode_bitfield'] = ($data['enable_bbcode']) ? ( $data['bbcode_bitfield'] ) ? $data['bbcode_bitfield'] : $abbcode->abbcode_config['ABBC3_BITFIELD'] : $data['bbcode_bitfield'] ;
	// MOD : ABBC3 (V1.0.8) - END

	$current_time = time();
#
#-----[ REPLACE WITH ]-----------------------------------------------
#	
	$current_time = time();

#
#-----[ OPEN ]-------------------------------------------------------
#
includes/message_parser.php
#
#-----[ FIND ]-------------------------------------------------------
#
			$sql = 'SELECT *
				FROM ' . BBCODES_TABLE;
#
#-----[ REPLACE WITH ]-----------------------------------------------
#

// MOD : ABBC3 (V1.0.9) - Start
			$sql = 'SELECT *
				FROM ' . BBCODES_TABLE . '
				WHERE bbcode_id > 0';
//			$sql = 'SELECT *
//				FROM ' . BBCODES_TABLE;
// MOD : ABBC3 (V1.0.9) - End

#
#-----[ OPEN ]-------------------------------------------------------
#
includes/acp/acp_bbcodes.php
#
#-----[ FIND ]-------------------------------------------------------
#
			case 'edit':
				$sql = 'SELECT bbcode_match, bbcode_tpl, display_on_posting, bbcode_helpline
					FROM ' . BBCODES_TABLE . '
					WHERE bbcode_id = ' . $bbcode_id;
#
#-----[ REPLACE WITH ]-----------------------------------------------
#

			case 'edit':
// MOD : ABBC3 (V1.0.9) - Start
				$sql = 'SELECT bbcode_match, bbcode_tpl, display_on_posting, bbcode_helpline, abbcode
					FROM ' . BBCODES_TABLE . '
					WHERE bbcode_id = ' . $bbcode_id . ' and abbcode = 0';
//				$sql = 'SELECT bbcode_match, bbcode_tpl, display_on_posting, bbcode_helpline
//					FROM ' . BBCODES_TABLE . '
//					WHERE bbcode_id = ' . $bbcode_id;
// MOD : ABBC3 (V1.0.9) - End

#
#-----[ FIND ]-------------------------------------------------------
#
			case 'modify':
				$sql = 'SELECT bbcode_id, bbcode_tag
					FROM ' . BBCODES_TABLE . '
					WHERE bbcode_id = ' . $bbcode_id;
#
#-----[ REPLACE WITH ]-----------------------------------------------
#

			case 'modify':
// MOD : ABBC3 (V1.0.9) - Start
				$sql = 'SELECT bbcode_id, bbcode_tag, abbcode
					FROM ' . BBCODES_TABLE . '
					WHERE bbcode_id = ' . $bbcode_id . ' and abbcode = 0';
//				$sql = 'SELECT bbcode_id, bbcode_tag
//					FROM ' . BBCODES_TABLE . '
//					WHERE bbcode_id = ' . $bbcode_id;
// MOD : ABBC3 (V1.0.9) - End

#
#-----[ FIND ]-------------------------------------------------------
#
					$sql_ary['bbcode_id'] = (int) $bbcode_id;
#
#-----[ AFTER, ADD ]------------------------------------------------
# NOTE: Add these lines on a new blank line after the preceding line(s) to find.
#

// MOD : ABBC3 (V1.0.9) - Start
					$sql = 'SELECT MAX(bbcode_order) as max_bbcode_order
						FROM ' . BBCODES_TABLE;
					$result = $db->sql_query($sql);
					$row = $db->sql_fetchrow($result);
					$db->sql_freeresult($result);
					$bbcode_order = $row['max_bbcode_order'] + 1;
					$sql_ary['bbcode_order'] = (int) $bbcode_order;
// MOD : ABBC3 (V1.0.9) - End

#
#-----[ FIND ]-------------------------------------------------------
#
			case 'delete':

				$sql = 'SELECT bbcode_tag
					FROM ' . BBCODES_TABLE . "
					WHERE bbcode_id = $bbcode_id";
#
#-----[ REPLACE WITH ]-----------------------------------------------
#

			case 'delete':
			
// MOD : ABBC3 (V1.0.9) - Start
				$sql = 'SELECT bbcode_tag, abbcode
					FROM ' . BBCODES_TABLE . "
					WHERE bbcode_id = $bbcode_id" . ' and abbcode = 0' ;
//				$sql = 'SELECT bbcode_tag
//					FROM ' . BBCODES_TABLE . "
//					WHERE bbcode_id = $bbcode_id";
// MOD : ABBC3 (V1.0.9) - End

#
#-----[ FIND ]-------------------------------------------------------
#
		$sql = 'SELECT *
			FROM ' . BBCODES_TABLE . '
			ORDER BY bbcode_tag';
#
#-----[ REPLACE WITH ]-----------------------------------------------
#

// MOD : ABBC3 (V1.0.9) - Start	
		$sql = 'SELECT *
			FROM ' . BBCODES_TABLE . '
			WHERE abbcode = 0  
			ORDER BY bbcode_tag';
//		$sql = 'SELECT *
//			FROM ' . BBCODES_TABLE . '
//			ORDER BY bbcode_tag';
// MOD : ABBC3 (V1.0.9) - End

#
#-----[ OPEN ]-------------------------------------------------------
#
language/en/acp/common.php
#
#-----[ FIND ]-------------------------------------------------------
#
// MOD : ABBC3 (V1.0.8) - START
$lang = array_merge($lang, array(
	'ACP_CAT_ABBCODES'			=> 'Advanced BBcodes Box 3',
	'LOG_CONFIG_ABBCODES'		=> '<strong>Altered ABBC3 settings</strong>',
	'LOG_CONFIG_ABBCODES_ERROR'	=> '<strong>Error while save ABBC3 settings</strong>',
	'LOG_RESET_ABBCODES'		=> '<strong>Reset ABBC3 settings</strong>',
	'LOG_RESET_ABBCODES_ERROR'	=> '<strong>Error while reset ABBC3 settings</strong>',
	'RESET_ABBCODES_EXPLAIN'	=> 'Are you sure you wish to reset <em>all bbcodes</em> to default settings?',
	'RESET_CONFIG_EXPLAIN'		=> 'Are you sure you wish to reset <strong>ABBC3</strong> to default settings?',
	'ACP_ABBC3_SETTINGS'		=> 'ABBC3 settings',
	'ACP_ABBC3_COMPONENTS'		=> 'ABBC3 components',
));
// MOD : ABBC3 (V1.0.8) - END
#
#-----[ REPLACE WITH ]-----------------------------------------------
# NOTE: See contrib/language folder for availables transtations
#
// MOD : ABBC3 (V1.0.9) - Start
$lang = array_merge($lang, array(
	'ACP_ABBCODES'				=> 'Advanced BBcodes Box 3',
	'LOG_CONFIG_ABBCODES'		=> '<strong>Altered ABBC3 settings</strong>',
	'LOG_CONFIG_ABBCODES_ERROR'	=> '<strong>Error while save ABBC3 settings</strong>',
	'LOG_RESET_ABBCODES'		=> '<strong>Reset ABBC3 settings</strong>',
	'LOG_RESET_ABBCODES_ERROR'	=> '<strong>Error while reset ABBC3 settings</strong>',
	'RESET_ABBCODES_EXPLAIN'	=> 'Are you sure you wish to reset <em>all bbcodes</em> to default settings?',
	'RESET_CONFIG_EXPLAIN'		=> 'Are you sure you wish to reset <strong>ABBC3</strong> to default settings?',
	'ACP_ABBC3_SETTINGS'		=> 'ABBC3 Settings',
	'ACP_ABBC3_BBCODES'			=> 'ABBC3 BBCodes',
));
// MOD : ABBC3 (V1.0.9) - End
#
#-----[ OPEN ]-------------------------------------------------------
# NOTE: You will have to make this change to ALL themes you have installed, based on prosilver. I use "prosilver" as an example.
#
styles/prosilver/template/overall_header.html
#
#-----[ FIND ]-------------------------------------------------------
#
<!-- // MOD : ABBC3 (V1.0.8) - START -->

<!-- IF S_ABBC3_MOD and (S_NEW_MESSAGE or S_EDIT_POST or S_VIEWTOPIC or S_DISPLAY_PREVIEW or S_PRIVMSGS or S_POST_REVIEW or S_DISPLAY_REVIEW or S_BBCODE_ALLOWED or mcp) -->

<script type="text/javascript" src="{T_IMAGESET_PATH}/abbcode/abbcode.js" charset="{S_CONTENT_ENCODING}"></script>

<!-- IF (S_ABBC3_GREYBOX or S_BBCODE_ALLOWED or S_ABBC3_RESIZE) -->
<script type="text/javascript">
// <![CDATA[
	var GB_ROOT_DIR                       = "{T_IMAGESET_PATH}/abbcode/greybox/";
<!-- IF S_ABBC3_RESIZE -->
	NcodeImageResizer.MODE                = '{S_ABBC3_RESIZE_METHOD}'; // 'greybox' 'enlarge' 'samewindow' 'newwindow'
	NcodeImageResizer.IMAGE               = '{T_IMAGESET_PATH}/abbcode/images/errormt0.gif';
	NcodeImageResizer.MAXWIDTH            = '{S_ABBC3_MAX_IMG_WIDTH}' ;
	NcodeImageResizer.MAXHEIGHT           = '{S_ABBC3_MAX_IMG_HEIGHT}' ;
	NcodeImageResizer.warning_small       = '{L_ABBC3_RESIZE_SMALL}';
	NcodeImageResizer.warning_filesize    = '{L_ABBC3_RESIZE_FILESIZE}';
	NcodeImageResizer.warning_no_filesize = '{L_ABBC3_RESIZE_NOFILESIZE}';
	NcodeImageResizer.warning_fullsize    = '{L_ABBC3_RESIZE_FULLSIZE}';
<!-- ENDIF -->

// ]]>
</script>

<script type="text/javascript" src="{T_IMAGESET_PATH}/abbcode/greybox/AJS.js"></script>
<script type="text/javascript" src="{T_IMAGESET_PATH}/abbcode/greybox/AJS_fx.js"></script>
<script type="text/javascript" src="{T_IMAGESET_PATH}/abbcode/greybox/gb_scripts.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="{T_IMAGESET_PATH}/abbcode/greybox/gb_styles.css" />
<!-- ENDIF -->

<link rel="stylesheet" type="text/css" media="all" href="{T_IMAGESET_PATH}/abbcode/abbcode.css" />
<!-- ENDIF -->
<!-- // MOD : ABBC3 (V1.0.8) - END -->
#
#-----[ REPLACE WITH ]-----------------------------------------------
#
<!-- // MOD : ABBC3 (V1.0.9) - Start -->
<!-- IF S_ABBC3_MOD and (S_NEW_MESSAGE or S_EDIT_POST or S_VIEWTOPIC or S_DISPLAY_PREVIEW or S_PRIVMSGS or S_POST_REVIEW or S_DISPLAY_REVIEW or S_BBCODE_ALLOWED or mcp) -->
<script type="text/javascript" src="{S_ABBC3_PATH}/abbcode.js" charset="{S_CONTENT_ENCODING}"></script>

<script type="text/javascript">
// <![CDATA[
	var GB_ROOT_DIR                       = "{S_ABBC3_PATH}/greybox/";
<!-- IF S_ABBC3_RESIZE -->	
	NcodeImageResizer.MODE                = '{S_ABBC3_RESIZE_METHOD}'; // 'greybox' 'enlarge' 'samewindow' 'newwindow'
	NcodeImageResizer.IMAGE               = '{S_ABBC3_PATH}/images/errormt0.gif';
	NcodeImageResizer.MAXWIDTH            = '{S_ABBC3_MAX_IMG_WIDTH}' ;
	NcodeImageResizer.MAXHEIGHT           = '{S_ABBC3_MAX_IMG_HEIGHT}' ;
	NcodeImageResizer.warning_small       = '{L_ABBC3_RESIZE_SMALL}';
	NcodeImageResizer.warning_filesize    = '{L_ABBC3_RESIZE_FILESIZE}';
	NcodeImageResizer.warning_no_filesize = '{L_ABBC3_RESIZE_NOFILESIZE}';
	NcodeImageResizer.warning_fullsize    = '{L_ABBC3_RESIZE_FULLSIZE}';
<!-- ENDIF -->
// ]]>
</script>
<!-- IF (S_ABBC3_GREYBOX or S_BBCODE_ALLOWED) -->
<script type="text/javascript" src="{S_ABBC3_PATH}/greybox/AJS.js"></script>
<script type="text/javascript" src="{S_ABBC3_PATH}/greybox/AJS_fx.js"></script>
<script type="text/javascript" src="{S_ABBC3_PATH}/greybox/gb_scripts.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="{S_ABBC3_PATH}/greybox/gb_styles.css" />
<!-- ENDIF -->
<link rel="stylesheet" type="text/css" media="all" href="{S_ABBC3_PATH}/abbcode.css" />
<!-- ENDIF -->
<!-- // MOD : ABBC3 (V1.0.9) - End -->
#
#-----[ OPEN ]-------------------------------------------------------
# NOTE: You will have to make this change to ALL themes you have installed, based on prosilver. I use "prosilver" as an example.
#
styles/prosilver/template/simple_header.html
#
#-----[ FIND ]-------------------------------------------------------
#
<!-- // MOD : ABBC3 (V1.0.8) - START -->
<link rel="stylesheet" type="text/css" media="all" href="{T_IMAGESET_PATH}/abbcode/abbcode.css" />
<!-- // MOD : ABBC3 (V1.0.8) - END -->
#
#-----[ REPLACE WITH ]-----------------------------------------------
#
<!-- // MOD : ABBC3 (V1.0.9) - Start -->
<link rel="stylesheet" type="text/css" media="all" href="{S_ABBC3_PATH}/abbcode.css" />
<!-- // MOD : ABBC3 (V1.0.9) - End -->
#
#-----[ OPEN ]-------------------------------------------------------
# NOTE: You will have to make this change to ALL themes you have installed, based on subsilver2. I use "subsilver2" as an example.
#
styles/subsilver2/template/overall_header.html
#
#-----[ FIND ]-------------------------------------------------------
#
<!-- // MOD : ABBC3 (V1.0.8) - START -->

<!-- IF S_ABBC3_MOD and (S_NEW_MESSAGE or S_EDIT_POST or S_VIEWTOPIC or S_DISPLAY_PREVIEW or S_PRIVMSGS or S_POST_REVIEW or S_DISPLAY_REVIEW or S_BBCODE_ALLOWED or mcp) -->

<script type="text/javascript" src="{T_IMAGESET_PATH}/abbcode/abbcode.js" charset="{S_CONTENT_ENCODING}"></script>

<!-- IF (S_ABBC3_GREYBOX or S_BBCODE_ALLOWED or S_ABBC3_RESIZE) -->
<script type="text/javascript">
// <![CDATA[
	var GB_ROOT_DIR                       = "{T_IMAGESET_PATH}/abbcode/greybox/";
<!-- IF S_ABBC3_RESIZE -->
	NcodeImageResizer.MODE                = '{S_ABBC3_RESIZE_METHOD}'; // 'greybox' 'enlarge' 'samewindow' 'newwindow'
	NcodeImageResizer.IMAGE               = '{T_IMAGESET_PATH}/abbcode/images/errormt0.gif';
	NcodeImageResizer.MAXWIDTH            = '{S_ABBC3_MAX_IMG_WIDTH}' ;
	NcodeImageResizer.MAXHEIGHT           = '{S_ABBC3_MAX_IMG_HEIGHT}' ;
	NcodeImageResizer.warning_small       = '{L_ABBC3_RESIZE_SMALL}';
	NcodeImageResizer.warning_filesize    = '{L_ABBC3_RESIZE_FILESIZE}';
	NcodeImageResizer.warning_no_filesize = '{L_ABBC3_RESIZE_NOFILESIZE}';
	NcodeImageResizer.warning_fullsize    = '{L_ABBC3_RESIZE_FULLSIZE}';
<!-- ENDIF -->

// ]]>
</script>

<script type="text/javascript" src="{T_IMAGESET_PATH}/abbcode/greybox/AJS.js"></script>
<script type="text/javascript" src="{T_IMAGESET_PATH}/abbcode/greybox/AJS_fx.js"></script>
<script type="text/javascript" src="{T_IMAGESET_PATH}/abbcode/greybox/gb_scripts.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="{T_IMAGESET_PATH}/abbcode/greybox/gb_styles.css" />
<!-- ENDIF -->

<link rel="stylesheet" type="text/css" media="all" href="{T_IMAGESET_PATH}/abbcode/abbcode.css" />
<!-- ENDIF -->
<!-- // MOD : ABBC3 (V1.0.8) - END -->
#
#-----[ REPLACE WITH ]-----------------------------------------------
#
<!-- // MOD : ABBC3 (V1.0.8) - START -->

<!-- IF S_ABBC3_MOD and (S_NEW_MESSAGE or S_EDIT_POST or S_VIEWTOPIC or S_DISPLAY_PREVIEW or S_PRIVMSGS or S_POST_REVIEW or S_DISPLAY_REVIEW or S_BBCODE_ALLOWED or mcp) -->

<script type="text/javascript" src="{T_IMAGESET_PATH}/abbcode/abbcode.js" charset="{S_CONTENT_ENCODING}"></script>

<!-- IF (S_ABBC3_GREYBOX or S_BBCODE_ALLOWED or S_ABBC3_RESIZE) -->
<script type="text/javascript">
// <![CDATA[
	var GB_ROOT_DIR                       = "{T_IMAGESET_PATH}/abbcode/greybox/";
<!-- IF S_ABBC3_RESIZE -->
	NcodeImageResizer.MODE                = '{S_ABBC3_RESIZE_METHOD}'; // 'greybox' 'enlarge' 'samewindow' 'newwindow'
	NcodeImageResizer.IMAGE               = '{T_IMAGESET_PATH}/abbcode/images/errormt0.gif';
	NcodeImageResizer.MAXWIDTH            = '{S_ABBC3_MAX_IMG_WIDTH}' ;
	NcodeImageResizer.MAXHEIGHT           = '{S_ABBC3_MAX_IMG_HEIGHT}' ;
	NcodeImageResizer.warning_small       = '{L_ABBC3_RESIZE_SMALL}';
	NcodeImageResizer.warning_filesize    = '{L_ABBC3_RESIZE_FILESIZE}';
	NcodeImageResizer.warning_no_filesize = '{L_ABBC3_RESIZE_NOFILESIZE}';
	NcodeImageResizer.warning_fullsize    = '{L_ABBC3_RESIZE_FULLSIZE}';
<!-- ENDIF -->

// ]]>
</script>

<script type="text/javascript" src="{T_IMAGESET_PATH}/abbcode/greybox/AJS.js"></script>
<script type="text/javascript" src="{T_IMAGESET_PATH}/abbcode/greybox/AJS_fx.js"></script>
<script type="text/javascript" src="{T_IMAGESET_PATH}/abbcode/greybox/gb_scripts.js"></script>
<link rel="stylesheet" type="text/css" media="all" href="{T_IMAGESET_PATH}/abbcode/greybox/gb_styles.css" />
<!-- ENDIF -->

<link rel="stylesheet" type="text/css" media="all" href="{T_IMAGESET_PATH}/abbcode/abbcode.css" />
<!-- ENDIF -->
<!-- // MOD : ABBC3 (V1.0.8) - END -->

#
#-----[ OPEN ]-------------------------------------------------------
# NOTE: You will have to make this change to ALL themes you have installed, based on prosilver. I use "prosilver" as an example.
#
styles/subsilver2/template/simple_header.html
#
#-----[ FIND ]-------------------------------------------------------
#
<!-- // MOD : ABBC3 (V1.0.8) - START -->
<link rel="stylesheet" type="text/css" media="all" href="{T_IMAGESET_PATH}/abbcode/abbcode.css" />
<!-- // MOD : ABBC3 (V1.0.8) - END -->
#
#-----[ REPLACE WITH ]-----------------------------------------------
#
<!-- // MOD : ABBC3 (V1.0.9) - Start -->
<link rel="stylesheet" type="text/css" media="all" href="{S_ABBC3_PATH}/abbcode.css" />
<!-- // MOD : ABBC3 (V1.0.9) - End -->
#
#-----[ OPEN ]-------------------------------------------------------
# NOTE: You will have to make this change to ALL themes you have installed, based on subsilver2. I use "subsilver2" as an example.
#
styles/subsilver2/template/posting_body.html
#
#-----[ FIND ]-------------------------------------------------------
#
		<!-- // MOD : ABBC3 (V1.0.8) - START -->
		<!-- IF S_ABBC3_MOD and S_ABBC3_FONTCOLOR -->
			<td valign="top" colspan="2"><textarea id="message" name="message" rows="15" cols="76" tabindex="3" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" style="width: 99%;">{MESSAGE}</textarea></td>		
		<!-- ELSE -->
#
#-----[ REPLACE WITH ]-----------------------------------------------
#
		<!-- // MOD : ABBC3 (V1.0.9) - Start -->
		<!-- IF S_ABBC3_MOD -->
			<td valign="top" style="width: 100%;"><textarea id="message" name="message" rows="15" cols="76" tabindex="3" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);" style="width: 99%;">{MESSAGE}</textarea></td>		
			<!-- IF S_BBCODE_ALLOWED and not S_ABBC3_COLOR -->
			<td width="80" align="center" valign="top">
				<script type="text/javascript">
				// <![CDATA[
					colorPalette('v', 7, 6)
				// ]]>
				</script>
			</td>
			<!-- ENDIF -->
		<!-- ELSE -->
#
#-----[ OPEN ]-------------------------------------------------------
# NOTE: You will have to make this change to ALL themes you have installed, based on subsilver2. I use "subsilver2" as an example.
#
styles/subsilver2/template/ucp_profile_signature.html
#
#-----[ FIND ]-------------------------------------------------------
#
		<!-- // MOD : ABBC3 (V1.0.8) - START -->
		<!-- IF S_ABBC3_MOD and S_ABBC3_FONTCOLOR -->
			<td colspan="2"><textarea class="post" id="signature" name="signature" rows="10" cols="76" style="width: 99%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{SIGNATURE}</textarea></td>
		</tr>
		<!-- ELSE -->
#
#-----[ REPLACE WITH ]-----------------------------------------------
#
		<!-- // MOD : ABBC3 (V1.0.9) - Start -->
		<!-- IF S_ABBC3_MOD -->
			<td colspan="2"><textarea class="post" id="signature" name="signature" rows="10" cols="76" style="width: 99%;" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);">{SIGNATURE}</textarea></td>
		</tr>
		<!-- ELSE -->
#
#-----[ FIND ]-------------------------------------------------------
#
		<!-- ENDIF -->

		<!-- ENDIF -->
		<!-- // MOD : ABBC3 (V1.0.8) - END -->
#
#-----[ REPLACE WITH ]-----------------------------------------------
#
		<!-- ENDIF -->
#
#-----[ FIND ]-------------------------------------------------------
#
		<!-- IF S_BBCODE_ALLOWED -->
#
#-----[ REPLACE WITH ]-----------------------------------------------
#
		<!-- ENDIF -->
		<!-- IF S_BBCODE_ALLOWED and not S_ABBC3_COLOR -->
		<!-- // MOD : ABBC3 (V1.0.9) - End -->
#
#-----[DIY]----------------------------------------------------------
#
IMPORTANT !
	
Log on to Administration Control Panel

#####################################################################
A) Disable your board :

	A.1) Navigate to General Tab -> Board settings 
	A.2) look at "Disable board: This will make the board unavailable to users. You can also enter a short (255 character) message to display if you wish." 
	A.3) Change to "yes"
	A.4) Submit to save setting.

#####################################################################
B) Database update :
	
	B.1) Once all the files have been modified and uploaded to your site you should point your browser at this location with the addition of install_abbc3.php
	For example if your domain name is www.mydomain.tld and you placed phpBB3 in a directory /phpBB3 off your web root you would enter http://www.mydomain.tld/phpBB3/install_abbc3.php into your browser.

	B.2) When you have done this you should see the phpBB3 ABBC3 Installation screen appear, follow the instructions.
		 If the installation was successful, you can now use your forum.
		 Congratulations, you have installed phpBB3 ABBC3 successfully. But there is still work ahead!
	
	B.3) You should remove the install file (install_abbc3.php) from your server.

#####################################################################
C) Add Giant font size :

	C.1) Navigate to General Tab -> Board configuration -> Post settings 
	C.2) look at "Maximum font size per post: Maximum font size allowed in a post. Set to 0 for unlimited font size." 
	C.3) change "200" value with "300"

#####################################################################
D) Add ABBC3 module :

	C.1) Navigate to "System" tab
	C.2) Under "Module management" click on "Administration Control Panel" and "Posting" ( or If you prefer you can do it in ".mod" )
	C.3) Under "Create new module", enter : ACP_ABBCODES and click "Create new module"
	C.4) in the next screen, click on "Module enabled:", and Sumbit
	C.5) afert refresh screen click on "Advanced BBcodes Box 3"
	C.6) in "add module" select "ABBC3 settings" and click on "add module", them click on "yes"
	C.7) afert refresh screen click "enable" "Advanced BBcodes Box 3"
	C.8) in "add module" select "ABBC3 BBcodes" and click on "add module", them click on "yes"
	C.9) afert refresh screen click "enable" "Advanced BBcodes Box 3"
	C.10) Them navigate to "Posting" tab and under "Advanced BBcodes Box 3" you will see "ABBC3 Settings" and "ABBC3 BBCodes"

#####################################################################
E) Purge the cache :

	E.1) Navigate to General Tab
	E.2) look at Purge the cache
	E.3) Click on "Run Now" button at right
	E.4) in the next screen, click on "Yes"
	
#####################################################################
F) Enable your board :
	
	F.1) Navigate to General Tab -> Board settings 
	F.2) look at "Disable board: This will make the board unavailable to users. You can also enter a short (255 character) message to display if you wish." 
	F.3) Change to "NO"
	F.4) Submit to save setting.

#####################################################################
G) Enjoy it !.

#####################################################################
You can safety remove :

	* Old ACP module :
		ACP_CAT_ABBCODES

	* Old ABBC files from :
		root/styles/prosilver/imageset/abbcode
		root/styles/subsilver2/imageset/abbcode

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