###############################################################################
## 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.10 to 1.0.11
##
## MOD Version: 1.0.11
##
## Installation Level: Easy
## Installation Time: ~30 Minutes
##
## Files To Edit:
## 	adm/style/overall_header.html
## 	includes/bbcode.php
## 	includes/functions_display.php
## 	includes/message_parser.php
## 	styles/prosilver/template/overall_header.html
##	styles/prosilver/template/attachment.html
## 	styles/subsilver2/template/overall_header.html
##	styles/subsilver2/template/attachment.html
##	styles/subsilver2/template/viewtopic_body.html
##
## Included Files:
## 	root/install_abbc3/*.*,
## 	root/adm/style/*.*,
## 	root/files/*.*,
## 	root/images/*.*,
## 	root/includes/*.*,
## 	root/language/en/mods/*.*,
## 	root/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.2 but works also for v3.0.1 and v3.0.0
##
##	---------------------------------------------------------------------------
##	IMPORTANT !
##
##	Before made any changes, makes sure your template is stored into "filesystem"
##	    ACP -> STYLES -> STYLE COMPONENTS -> Templates : subsilver2 -> Details
##
##	If you do not want to change from "Database" to "Filesystem",
##	you must do next changes within your ACP :
##	    ACP -> STYLES -> STYLE COMPONENTS -> Templates : subsilver2 -> Edit
##
###############################################################################
## MOD History:
##
##	2008-10-20 - Version 1.0.11
##		 1. Fixed bbodes group permissions.
##		 2. Fixed the install script.
##		 3. Fixed a button to add more divisions or line break in ACP.
##		 4. Fixed severals issues reported by MOD Team.
##		 5. Deleted html bbcode suggested by MOD Team.
##		 6. Added 3 search options for search bbcode :
##			* altavista, wikipedia, lycos
##		 7. Added 10 new Web video to bbvideo bbcode :
##			* filefront.com , gamepro.com, g4tv.com, machinima.com ,revver.com, sapo.pt, scribd.com, slideshare.net, wegame.com, xfire.com, 
##		 8. Added all patches from previous versions.
##		 9. Added a button to reorder bbcodes in ACP.
##		10. Small fixes and changes in some bbcode.
##		11. Safety Check for allow_url_fopen() in rapidshare bbcode.
##		12. Image resizer : Re-write the entirely main function, Should work in every style and or portal, and can use with signatures or not
##		13. BBcode styles : nfo, ed2k, moderator, offtopic, spoiler : change with the styles based off.
##		14. BBcode table : check against CSS XSS vulnerabilities 
##
###############################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
###############################################################################

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

copy root/abbcode_functions.php to abbcode_functions.php
copy root/install_abbc3/*.*     to install_abbc3/*.*
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/overall_header.html
#
#-----[ FIND ]-----------------------------------------------------------------
#
<!-- // MOD : MSSTI ABBC3 (V1.0.10) - Start -->

<!-- IF S_ABBC3_MOD and ( S_BBCODE_ALLOWED or S_NEW_MESSAGE or S_EDIT_POST or S_VIEWTOPIC or S_DISPLAY_PREVIEW or S_POST_REVIEW or S_DISPLAY_REVIEW ) or ( U_MCP and ( U_MCP_POST or U_MCP_TOPIC or U_MCP_FORUM) ) or ( S_PRIVMSGS and S_VIEW_MESSAGE ) -->
<script type="text/javascript" src="{S_ABBC3_PATH}/abbcode.js" charset="{S_CONTENT_ENCODING}"></script>
<link rel="stylesheet" type="text/css" media="all" href="{S_ABBC3_PATH}/abbcode.css" />

<!-- IF S_ABBC3_RESIZE or S_ABBC3_ADVANCEDBOX -->
<script type="text/javascript" src="{S_ABBC3_PATH}/advancedbox.js"></script>
<script type="text/javascript">
// <![CDATA[
	var ImageResizerAdvancedbox			= '{S_ABBC3_ADVANCEDBOX}';
	var ImageResizerThumbnails			= '{S_ABBC3_MAX_THUM_WIDTH}';
	var ImageResizerThumbnailsPhpbb		= '{S_PHPBB_MAX_THUM_WIDTH}';
	var ImageResizerZoomAlt				= '{L_ABBC3_RESIZE_ZOOM_IN}';
	var ImageResizerCloseAlt			= '{L_ABBC3_RESIZE_ZOOM_OUT}';
	var ImageResizerMode				= '{S_ABBC3_RESIZE_METHOD}'; // 'advancedbox' 'enlarge' 'samewindow' 'newwindow'
	var ImageResizerWarningImage		= '{S_ABBC3_PATH}/images/errormt0.gif';
	var ImageResizerMaxWidth			= '{S_ABBC3_MAX_IMG_WIDTH}' ;
	var ImageResizerMaxHeight			= '{S_ABBC3_MAX_IMG_HEIGHT}' ;
	var ImageResizerWarningSmall		= '{L_ABBC3_RESIZE_SMALL}';
	var ImageResizerWarningFullsize		= '{L_ABBC3_RESIZE_FULLSIZE}';
	var ImageResizerWarningFilesize		= '{L_ABBC3_RESIZE_FILESIZE}';
	var ImageResizerWarningNoFilesize	= '{L_ABBC3_RESIZE_NOFILESIZE}';
// ]]>
</script>
<!-- ENDIF -->
<!-- ENDIF -->

<!-- // MOD : MSSTI ABBC3 (V1.0.10) - End -->
#
#-----[ REPLACE WITH ]---------------------------------------------------------
#
<!-- // MOD : MSSTI ABBC3 (V1.0.11) - Start -->

<!-- IF S_ABBC3_MOD and ( S_BBCODE_ALLOWED or S_NEW_MESSAGE or S_EDIT_POST or S_VIEWTOPIC or S_DISPLAY_PREVIEW or S_POST_REVIEW or S_DISPLAY_REVIEW ) or ( U_MCP and ( U_MCP_POST or U_MCP_TOPIC or U_MCP_FORUM) ) or ( S_PRIVMSGS and S_VIEW_MESSAGE ) -->
<script type="text/javascript" src="{S_ABBC3_PATH}/abbcode.js" charset="{S_CONTENT_ENCODING}"></script>
<link rel="stylesheet" type="text/css" media="all" href="{S_ABBC3_PATH}/abbcode.css" />

<!-- IF S_ABBC3_RESIZE -->
<script type="text/javascript" src="{S_ABBC3_PATH}/AdvancedBox.js"></script>
<script type="text/javascript">
// <![CDATA[
/** Image Resizer JS and AdvancedBox JS - Start **/
	var ImageResizerNumberOf			= '{L_ABBC3_RESIZE_NUMBER}';
	var ImageResizerNextAlt				= '{L_NEXT}';
	var ImageResizerPrevtAlt			= '{L_PREVIOUS}';
	var ImageResizerPlayAlt				= '{L_ABBC3_RESIZE_PLAY}';
	var ImageResizerPauseAlt			= '{L_ABBC3_RESIZE_PAUSE}';
	var ImageResizerZoomInAlt			= '{L_ABBC3_RESIZE_ZOOM_IN}';
	var ImageResizerZoomOutAlt			= '{L_ABBC3_RESIZE_ZOOM_OUT}';
	var ImageResizerCloseAlt			= '{L_ABBC3_RESIZE_CLOSE}';
	var ImageResizerBlankImage			= '{S_ABBC3_PATH}/advancedbox_blank.gif';
	var ImageResizerSignature			= '{S_ABBC3_RESIZE_SIGNATURE}';
	var ImageResizerMode				= '{S_ABBC3_RESIZE_METHOD}'; // 'AdvancedBox' 'pop-up' 'enlarge' 'samewindow' 'newwindow'
	var ImageResizerWarningImage		= '{S_ABBC3_PATH}/warning.gif';
	var ImageResizerMaxWidth			= '{S_ABBC3_MAX_IMG_WIDTH}' ;
	var ImageResizerMaxHeight			= '{S_ABBC3_MAX_IMG_HEIGHT}' ;
	var ImageResizerWarningSmall		= '{L_ABBC3_RESIZE_SMALL}';
	var ImageResizerWarningFullsize		= '{L_ABBC3_RESIZE_FULLSIZE}';
	var ImageResizerWarningFilesize		= '{L_ABBC3_RESIZE_FILESIZE}';
	var ImageResizerWarningNoFilesize	= '{L_ABBC3_RESIZE_NOFILESIZE}';
/** Image Resizer JS and AdvancedBox JS - End **/
// ]]>
</script>
<!-- ENDIF -->
<!-- ENDIF -->

<!-- // MOD : MSSTI ABBC3 (V1.0.11) - End -->
#
#-----[ OPEN ]-----------------------------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]-----------------------------------------------------------------
#
# NOTE : FOR PHPBB VERSION 3.0.2 
#
			if (!@file_exists($this->template_filename))
			{
				trigger_error('The file ' . $this->template_filename . ' is missing.', E_USER_ERROR);
			}
#
#-----[ AFTER, ADD ]-----------------------------------------------------------
#
// MOD : MSSTI ABBC3 (V1.0.11) - Start
			$this->template_filename2 = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template/abbcode.html';
			if (!@file_exists($this->template_filename2))
			{
				trigger_error('The file ' . $this->template_filename2 . ' is missing.', E_USER_ERROR);
			}
// MOD : MSSTI ABBC3 (V1.0.11) - End
#
#-----[ FIND ]-----------------------------------------------------------------
#
# NOTE : FOR PHPBB VERSION 3.0.3 
#
				else
				{
					trigger_error('The file ' . $this->template_filename . ' is missing.', E_USER_ERROR);
				}
			}
#
#-----[ AFTER, ADD ]-----------------------------------------------------------
#
// MOD : MSSTI ABBC3 (V1.0.11) - Start
			$this->template_filename2 = $phpbb_root_path . 'styles/' . $user->theme['template_path'] . '/template/abbcode.html';
			
			if (!@file_exists($this->template_filename2))
			{
				if (isset($user->theme['template_inherits_id']) && $user->theme['template_inherits_id'])
				{
					$this->template_filename2 = $phpbb_root_path . 'styles/' . $user->theme['template_inherit_path'] . '/template/abbcode.html';
					if (!@file_exists($this->template_filename2))
					{
						trigger_error('The file ' . $this->template_filename2 . ' is missing.', E_USER_ERROR);
					}
				}
				else
				{
					trigger_error('The file ' . $this->template_filename2 . ' is missing.', E_USER_ERROR);
				}
			}
// MOD : MSSTI ABBC3 (V1.0.11) - End
#
#-----[ FIND ]-----------------------------------------------------------------
#
				'img'		=> '<img src="$1" alt="' . $user->lang['IMAGE'] . '" />',
#
#-----[ IN-LINE, FIND ]--------------------------------------------------------
#
 />',
#
#-----[ IN-LINE, BEFORE ADD ]--------------------------------------------------
#
 class="resize_me"
#
#-----[ FIND ]-----------------------------------------------------------------
#
			if (($tpl = file_get_contents($this->template_filename)) === false)
			{
				trigger_error('Could not load bbcode template', E_USER_ERROR);
			}
#
#-----[ AFTER, ADD ]-----------------------------------------------------------
#
// MOD : MSSTI ABBC3 (V1.0.11) - Start
			if (($tpl2 = file_get_contents($this->template_filename2)) === false)
			{
				trigger_error('Could not load abbcode template', E_USER_ERROR);
			}
			else
			{
				$tpl .= $tpl2;
			}
// MOD : MSSTI ABBC3 (V1.0.11) - End
#
#-----[ OPEN ]-----------------------------------------------------------------
#
includes/functions_display.php
#
#-----[ FIND ]-----------------------------------------------------------------
#
// MOD : MSSTI ABBC3 (V1.0.10) - 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 : MSSTI ABBC3 (V1.0.10) - End
#
#-----[ REPLACE WITH ]---------------------------------------------------------
#
// MOD : MSSTI ABBC3 (V1.0.11) - 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 : MSSTI ABBC3 (V1.0.11) - End
#
#-----[ OPEN ]-----------------------------------------------------------------
#
includes/message_parser.php
#
#-----[ FIND ]-----------------------------------------------------------------
# Note : may be, you changed this with FIX 1.0.10 #004
#
// MOD : MSSTI ABBC3 (V1.0.10) - Start
         $sql = 'SELECT *
            FROM ' . BBCODES_TABLE . '
            WHERE bbcode_id > 0';
//         $sql = 'SELECT *
//            FROM ' . BBCODES_TABLE;
// MOD : MSSTI ABBC3 (V1.0.10) - End
#
#-----[ REPLACE WITH ]---------------------------------------------------------
#
// MOD : MSSTI ABBC3 (V1.0.11) - Start
		$sql = 'SELECT *
			FROM ' . BBCODES_TABLE . '
			WHERE bbcode_match <> "." ';
//		$sql = 'SELECT *
//		FROM ' . BBCODES_TABLE;
// MOD : MSSTI ABBC3 (V1.0.11) - End
#
#-----[ FIND ]-----------------------------------------------------------------
#
// MOD : MSSTI ABBC3 (V1.0.10) - Start
		// Check for groups memberships and permission
		foreach ($this->bbcodes as $bbcode_name => $bbcode_data)
		{
			if ( isset($bbcode_data['bbcode_group']) && $bbcode_data['bbcode_group'] != 0 && !in_array( $user->data['group_id'], explode(',', $bbcode_data['bbcode_group']) ))
			{
				$this->bbcodes[$bbcode_name]['disabled'] = true;
			}
		}
// MOD : MSSTI ABBC3 (V1.0.10) - End
#
#-----[ REPLACE WITH ]---------------------------------------------------------
#
// MOD : MSSTI ABBC3 (V1.0.11) - Start
		// Check ABBC3 groups permission
		foreach ($this->bbcodes as $bbcode_name => $bbcode_data)
		{
			if ( isset($bbcode_data['bbcode_group']) && $bbcode_data['bbcode_group'] != 0 && !$this->abbode_phpbb_auth( $bbcode_data['bbcode_group'] ) )
			{
				$this->bbcodes[$bbcode_name]['disabled'] = true;
			}
		}
// MOD : MSSTI ABBC3 (V1.0.11) - 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 : MSSTI ABBC3 (V1.0.10) - Start -->

<!-- IF S_ABBC3_MOD and ( S_BBCODE_ALLOWED or S_NEW_MESSAGE or S_EDIT_POST or S_VIEWTOPIC or S_DISPLAY_PREVIEW or S_POST_REVIEW or S_DISPLAY_REVIEW ) or ( U_MCP and ( U_MCP_POST or U_MCP_TOPIC or U_MCP_FORUM) ) or ( S_PRIVMSGS and S_VIEW_MESSAGE ) -->
<script type="text/javascript" src="{S_ABBC3_PATH}/abbcode.js" charset="{S_CONTENT_ENCODING}"></script>
<link rel="stylesheet" type="text/css" media="all" href="{S_ABBC3_PATH}/abbcode.css" />

<!-- IF S_ABBC3_RESIZE or S_ABBC3_ADVANCEDBOX -->
<script type="text/javascript" src="{S_ABBC3_PATH}/AdvancedBox.js"></script>
<script type="text/javascript">
// <![CDATA[
/** Image Resizer JS and AdvancedBox JS - Start **/
	var ImageResizerAdvancedbox			= '{S_ABBC3_ADVANCEDBOX}';
	var ImageResizerNumberOf			= '{L_ABBC3_RESIZE_NUMBER}';
	var ImageResizerPlayAlt				= '{L_ABBC3_RESIZE_PLAY}';
	var ImageResizerPauseAlt			= '{L_ABBC3_RESIZE_PAUSE}';
	var ImageResizerZoomInAlt			= '{L_ABBC3_RESIZE_ZOOM_IN}';
	var ImageResizerZoomOutAlt			= '{L_ABBC3_RESIZE_ZOOM_OUT}';
	var ImageResizerCloseAlt			= '{L_ABBC3_RESIZE_CLOSE}';
	var ImageResizerBlankImage			= '{S_ABBC3_PATH}/advancedbox_blank.gif';
	var ImageResizerThumbnails			= '{S_ABBC3_MAX_THUM_WIDTH}';
	var ImageResizerThumbnailsPhpbb		= '{S_PHPBB_MAX_THUM_WIDTH}';
	var ImageResizerMode				= '{S_ABBC3_RESIZE_METHOD}'; // 'advancedbox' 'enlarge' 'samewindow' 'newwindow'
	var ImageResizerWarningImage		= '{S_ABBC3_PATH}/images/errormt0.gif';
	var ImageResizerMaxWidth			= '{S_ABBC3_MAX_IMG_WIDTH}' ;
	var ImageResizerMaxHeight			= '{S_ABBC3_MAX_IMG_HEIGHT}' ;
	var ImageResizerWarningSmall		= '{L_ABBC3_RESIZE_SMALL}';
	var ImageResizerWarningFullsize		= '{L_ABBC3_RESIZE_FULLSIZE}';
	var ImageResizerWarningFilesize		= '{L_ABBC3_RESIZE_FILESIZE}';
	var ImageResizerWarningNoFilesize	= '{L_ABBC3_RESIZE_NOFILESIZE}';
/** Image Resizer JS and AdvancedBox JS - End **/
// ]]>
</script>
<!-- ENDIF -->
<!-- ENDIF -->

<!-- // MOD : MSSTI ABBC3 (V1.0.10) - End -->
#
#-----[ REPLACE WITH ]---------------------------------------------------------
#
<!-- // MOD : MSSTI ABBC3 (V1.0.11) - Start -->

<!-- IF S_ABBC3_MOD and ( S_BBCODE_ALLOWED or S_NEW_MESSAGE or S_EDIT_POST or S_VIEWTOPIC or S_DISPLAY_PREVIEW or S_POST_REVIEW or S_DISPLAY_REVIEW ) or ( U_MCP and ( U_MCP_POST or U_MCP_TOPIC or U_MCP_FORUM) ) or ( S_PRIVMSGS and S_VIEW_MESSAGE ) -->
<script type="text/javascript" src="{S_ABBC3_PATH}/abbcode.js" charset="{S_CONTENT_ENCODING}"></script>
<link rel="stylesheet" type="text/css" media="all" href="{S_ABBC3_PATH}/abbcode.css" />

<!-- IF S_ABBC3_RESIZE -->
<script type="text/javascript" src="{S_ABBC3_PATH}/AdvancedBox.js"></script>
<script type="text/javascript">
// <![CDATA[
/** Image Resizer JS and AdvancedBox JS - Start **/
	var ImageResizerNumberOf			= '{L_ABBC3_RESIZE_NUMBER}';
	var ImageResizerNextAlt				= '{L_NEXT}';
	var ImageResizerPrevtAlt			= '{L_PREVIOUS}';
	var ImageResizerPlayAlt				= '{L_ABBC3_RESIZE_PLAY}';
	var ImageResizerPauseAlt			= '{L_ABBC3_RESIZE_PAUSE}';
	var ImageResizerZoomInAlt			= '{L_ABBC3_RESIZE_ZOOM_IN}';
	var ImageResizerZoomOutAlt			= '{L_ABBC3_RESIZE_ZOOM_OUT}';
	var ImageResizerCloseAlt			= '{L_ABBC3_RESIZE_CLOSE}';
	var ImageResizerBlankImage			= '{S_ABBC3_PATH}/advancedbox_blank.gif';
	var ImageResizerSignature			= '{S_ABBC3_RESIZE_SIGNATURE}';
	var ImageResizerMode				= '{S_ABBC3_RESIZE_METHOD}'; // 'AdvancedBox' 'pop-up' 'enlarge' 'samewindow' 'newwindow'
	var ImageResizerWarningImage		= '{S_ABBC3_PATH}/warning.gif';
	var ImageResizerMaxWidth			= '{S_ABBC3_MAX_IMG_WIDTH}' ;
	var ImageResizerMaxHeight			= '{S_ABBC3_MAX_IMG_HEIGHT}' ;
	var ImageResizerWarningSmall		= '{L_ABBC3_RESIZE_SMALL}';
	var ImageResizerWarningFullsize		= '{L_ABBC3_RESIZE_FULLSIZE}';
	var ImageResizerWarningFilesize		= '{L_ABBC3_RESIZE_FILESIZE}';
	var ImageResizerWarningNoFilesize	= '{L_ABBC3_RESIZE_NOFILESIZE}';
/** Image Resizer JS and AdvancedBox JS - End **/
// ]]>
</script>
<!-- ENDIF -->
<!-- ENDIF -->

<!-- // MOD : MSSTI ABBC3 (V1.0.11) - 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/attachment.html
#
#-----[ FIND ]-----------------------------------------------------------------
#
# TIP: This may be a partial find and not the whole line.
#
{_file.L_DOWNLOAD_COUNT}" /></a></dt>
#
#-----[ IN-LINE, FIND ]--------------------------------------------------------
#
 /></a></dt>
#
#-----[ IN-LINE, BEFORE ADD ]---------------------------------------------------
#
 class="attach_parent" 
#
#-----[ FIND ]-----------------------------------------------------------------
#
# TIP: This may be a partial find and not the whole line.
#
onclick="viewableArea(this);" /></dt>
#
#-----[ IN-LINE, FIND ]--------------------------------------------------------
#
 /></dt>
#
#-----[ IN-LINE, BEFORE ADD ]---------------------------------------------------
#
 class="attach_me" 
#
#-----[ 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 : MSSTI ABBC3 (V1.0.10) - Start -->

<!-- IF S_ABBC3_MOD and ( S_BBCODE_ALLOWED or S_NEW_MESSAGE or S_EDIT_POST or S_VIEWTOPIC or S_DISPLAY_PREVIEW or S_POST_REVIEW or S_DISPLAY_REVIEW ) or ( U_MCP and ( U_MCP_POST or U_MCP_TOPIC or U_MCP_FORUM) ) or ( S_PRIVMSGS and S_VIEW_MESSAGE ) -->
<script type="text/javascript" src="{S_ABBC3_PATH}/abbcode.js" charset="{S_CONTENT_ENCODING}"></script>
<link rel="stylesheet" type="text/css" media="all" href="{S_ABBC3_PATH}/abbcode.css" />

<!-- IF S_ABBC3_RESIZE or S_ABBC3_ADVANCEDBOX -->
<script type="text/javascript" src="{S_ABBC3_PATH}/AdvancedBox.js"></script>
<script type="text/javascript">
// <![CDATA[
/** Image Resizer JS and AdvancedBox JS - Start **/
	var ImageResizerAdvancedbox			= '{S_ABBC3_ADVANCEDBOX}';
	var ImageResizerNumberOf			= '{L_ABBC3_RESIZE_NUMBER}';
	var ImageResizerPlayAlt				= '{L_ABBC3_RESIZE_PLAY}';
	var ImageResizerPauseAlt			= '{L_ABBC3_RESIZE_PAUSE}';
	var ImageResizerZoomInAlt			= '{L_ABBC3_RESIZE_ZOOM_IN}';
	var ImageResizerZoomOutAlt			= '{L_ABBC3_RESIZE_ZOOM_OUT}';
	var ImageResizerCloseAlt			= '{L_ABBC3_RESIZE_CLOSE}';
	var ImageResizerBlankImage			= '{S_ABBC3_PATH}/advancedbox_blank.gif';
	var ImageResizerThumbnails			= '{S_ABBC3_MAX_THUM_WIDTH}';
	var ImageResizerThumbnailsPhpbb		= '{S_PHPBB_MAX_THUM_WIDTH}';
	var ImageResizerMode				= '{S_ABBC3_RESIZE_METHOD}'; // 'advancedbox' 'enlarge' 'samewindow' 'newwindow'
	var ImageResizerWarningImage		= '{S_ABBC3_PATH}/images/errormt0.gif';
	var ImageResizerMaxWidth			= '{S_ABBC3_MAX_IMG_WIDTH}' ;
	var ImageResizerMaxHeight			= '{S_ABBC3_MAX_IMG_HEIGHT}' ;
	var ImageResizerWarningSmall		= '{L_ABBC3_RESIZE_SMALL}';
	var ImageResizerWarningFullsize		= '{L_ABBC3_RESIZE_FULLSIZE}';
	var ImageResizerWarningFilesize		= '{L_ABBC3_RESIZE_FILESIZE}';
	var ImageResizerWarningNoFilesize	= '{L_ABBC3_RESIZE_NOFILESIZE}';
/** Image Resizer JS and AdvancedBox JS - End **/
// ]]>
</script>
<!-- ENDIF -->
<!-- ENDIF -->

<!-- // MOD : MSSTI ABBC3 (V1.0.10) - End -->
#
#-----[ REPLACE WITH ]---------------------------------------------------------
#
<!-- // MOD : MSSTI ABBC3 (V1.0.11) - Start -->

<!-- IF S_ABBC3_MOD and ( S_BBCODE_ALLOWED or S_NEW_MESSAGE or S_EDIT_POST or S_VIEWTOPIC or S_DISPLAY_PREVIEW or S_POST_REVIEW or S_DISPLAY_REVIEW ) or ( U_MCP and ( U_MCP_POST or U_MCP_TOPIC or U_MCP_FORUM) ) or ( S_PRIVMSGS and S_VIEW_MESSAGE ) -->
<script type="text/javascript" src="{S_ABBC3_PATH}/abbcode.js" charset="{S_CONTENT_ENCODING}"></script>
<link rel="stylesheet" type="text/css" media="all" href="{S_ABBC3_PATH}/abbcode.css" />

<!-- IF S_ABBC3_RESIZE -->
<script type="text/javascript" src="{S_ABBC3_PATH}/AdvancedBox.js"></script>
<script type="text/javascript">
// <![CDATA[
/** Image Resizer JS and AdvancedBox JS - Start **/
	var ImageResizerNumberOf			= '{L_ABBC3_RESIZE_NUMBER}';
	var ImageResizerNextAlt				= '{L_NEXT}';
	var ImageResizerPrevtAlt			= '{L_PREVIOUS}';
	var ImageResizerPlayAlt				= '{L_ABBC3_RESIZE_PLAY}';
	var ImageResizerPauseAlt			= '{L_ABBC3_RESIZE_PAUSE}';
	var ImageResizerZoomInAlt			= '{L_ABBC3_RESIZE_ZOOM_IN}';
	var ImageResizerZoomOutAlt			= '{L_ABBC3_RESIZE_ZOOM_OUT}';
	var ImageResizerCloseAlt			= '{L_ABBC3_RESIZE_CLOSE}';
	var ImageResizerBlankImage			= '{S_ABBC3_PATH}/advancedbox_blank.gif';
	var ImageResizerSignature			= '{S_ABBC3_RESIZE_SIGNATURE}';
	var ImageResizerMode				= '{S_ABBC3_RESIZE_METHOD}'; // 'AdvancedBox' 'pop-up' 'enlarge' 'samewindow' 'newwindow'
	var ImageResizerWarningImage		= '{S_ABBC3_PATH}/warning.gif';
	var ImageResizerMaxWidth			= '{S_ABBC3_MAX_IMG_WIDTH}' ;
	var ImageResizerMaxHeight			= '{S_ABBC3_MAX_IMG_HEIGHT}' ;
	var ImageResizerWarningSmall		= '{L_ABBC3_RESIZE_SMALL}';
	var ImageResizerWarningFullsize		= '{L_ABBC3_RESIZE_FULLSIZE}';
	var ImageResizerWarningFilesize		= '{L_ABBC3_RESIZE_FILESIZE}';
	var ImageResizerWarningNoFilesize	= '{L_ABBC3_RESIZE_NOFILESIZE}';
/** Image Resizer JS and AdvancedBox JS - End **/
// ]]>
</script>
<!-- ENDIF -->
<!-- ENDIF -->

<!-- // MOD : MSSTI ABBC3 (V1.0.11) - 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/attachment.html
#
#-----[ FIND ]-----------------------------------------------------------------
#
# TIP: This may be a partial find and not the whole line.
#
alt="{_file.DOWNLOAD_NAME}" /></a><br />
#
#-----[ IN-LINE, FIND ]--------------------------------------------------------
#
 /></a><br />
#
#-----[ IN-LINE, BEFORE ADD ]---------------------------------------------------
#
 class="attach_parent" 
#
#-----[ FIND ]-----------------------------------------------------------------
#
# TIP: This may be a partial find and not the whole line.
#
alt="{_file.DOWNLOAD_NAME}" /><br />
#
#-----[ IN-LINE, FIND ]--------------------------------------------------------
#
 /><br />
#
#-----[ IN-LINE, BEFORE ADD ]---------------------------------------------------
#
 class="attach_me" 
#
#-----[ 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/viewtopic_body.html
#
#-----[ FIND ]-----------------------------------------------------------------
#
# TIP: This may be a partial find and not the whole line.
#
<span class="postbody"><br />
#
#-----[ IN-LINE, FIND ]--------------------------------------------------------
#
 class="postbody"
#
#-----[ IN-LINE, BEFORE ADD ]---------------------------------------------------
#
 id="sig{postrow.POST_ID}"

#
#-----[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/install.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/install.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/rename the install folder (root/install_abbc3) 
	from your server.

###############################################################################
C) Purge the templates :

	C.1) Navigate to "Styles" Tab.
	C.2) Under "Style components " click on "Templates".
	C.3) Under "Actions" click on "Refresh".
	C.4) in the next screen, click on "Yes" ( Repeat last 2 steps to each instaled style ).
	C.5) Under "Style components " click on "Themes".
	C.6) Under "Actions" click on "Refresh".
	C.7) in the next screen, click on "Yes" ( Repeat last 2 steps to each instaled style ).

###############################################################################
D) Purge the cache :

	D.1) Navigate to General Tab
	D.2) look at Purge the cache
	D.3) Click on "Run Now" button at right
	D.4) in the next screen, click on "Yes"

###############################################################################
E) Enable your board :

	E.1) Navigate to General Tab -> Board settings 
	E.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." 
	E.3) Change to "NO"
	E.4) Submit to save setting.

###############################################################################
F) Change the value that best suits your needs

	F.1) Navigate to Posting Tab
	F.2) At the left menu you will find a new category "Advanced BBcodes Box 3"
	F.3) ABBC3 settings : Here you can determine the basic operation of ABBC3, 
	enable or disable, and among other settings adjust the default values for the background.
	F.4) ABBC3 BBCodes : From this page you can alter the order of tags on posting page or edit the icons,

###############################################################################
H) Enjoy it !. 

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