#####################################################################
## MOD Title: Advanced BBCode Box 3
##
## MOD Author: leviatan21 < info@mssti.com > (Gabriel) http://www.mssti.com/phpbb2/
##
## MOD Description: How to upgrade Advanced BBCode Box 3 from 1.0.4 to 1.0.5
##
## MOD Version: 1.0.6
##
## Installation Level: Easy
## Installation Time: ~10 Minutes
##
## Files To Edit:
##	ucp.php
##	posting.php
##	viewtopic.php
##	includes/session.php
##	includes/functions_content.php
##	styles/prosilver/template/overall_header.html
##	styles/prosilver/template/posting_buttons.html
##	styles/subsilver2/template/overall_header.html
##	styles/subsilver2/template/posting_buttons.html
##
## Included Files:
##	includes/abbcode.php
##	language/en/mods/abbcode.php
##	styles/prosilver/*.*
##	styles/subsilver2/*.*
##
## 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/
#####################################################################
##
#####################################################################
##
#####################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#####################################################################

#
#-----[ COPY / OVERWRITTE ]-------------------------------------------------------
#
copy root/includes/abbcode.php         to includes/abbcode.php
copy root/language/en/mods/abbcode.php to language/en/mods/abbcode.php
copy root/styles/prosilver/*.*         to styles/prosilver/*.*
copy root/styles/subsilver2/*.*        to styles/subsilver2/*.*

#
#-----[ OPEN ]-------------------------------------------------------
#
ucp.php

#
#-----[ FIND ]-------------------------------------------------------
#
// MOD : Advanced BBCode Box 3 (V1.0.5) - START
$user->add_lang('mods/abbcode');
// MOD : Advanced BBCode Box 3 (V1.0.5) - END

// Setting a variable to let the style designer know where he is...

#
#-----[ REPLACE WITH ]-----------------------------------------------
#
// Setting a variable to let the style designer know where he is...

#
#-----[ OPEN ]-------------------------------------------------------
#
posting.php

#
#-----[ FIND ]-------------------------------------------------------
#
// MOD : Advanced BBCode Box 3 (V1.0.5) - START
$user->add_lang('mods/abbcode');
// MOD : Advanced BBCode Box 3 (V1.0.5) - END

// Always check if the submitted attachment data is valid and belongs to the user.

#
#-----[ REPLACE WITH ]-----------------------------------------------
#
// Always check if the submitted attachment data is valid and belongs to the user.

#
#-----[ FIND ]-------------------------------------------------------
#
// Output page ...
page_header($page_title);

#
#-----[ BEFORE, ADD ]------------------------------------------------
# NOTE: Add these lines on a new blank line before the preceding line(s) to find.
#
// MOD : Advanced BBCode Box 3 (V1.0.6) - START
display_abbc3();
// MOD : Advanced BBCode Box 3 (V1.0.6) - END

#
#-----[ OPEN ]-------------------------------------------------------
#
viewtopic.php

#
#-----[ FIND ]-------------------------------------------------------
#
// Output the page
page_header($user->lang['VIEW_TOPIC'] .' - ' . $topic_data['topic_title']);

#
#-----[ BEFORE, ADD ]------------------------------------------------
# NOTE: Add these lines on a new blank line before the preceding line(s) to find.
#
// MOD : Advanced BBCode Box 3 (V1.0.6) - START
display_abbc3();
// MOD : Advanced BBCode Box 3 (V1.0.6) - END

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

#
#-----[ FIND ]-------------------------------------------------------
#
		$this->add_lang($lang_set);
		unset($lang_set);

#
#-----[ AFTER, ADD ]------------------------------------------------
# NOTE: Add these lines on a new blank line AFTER the preceding line(s) to find.
#
		// MOD : Advanced BBCode Box 3 (V1.0.6) - START
		$this->add_lang('mods/abbcode');
		if ((@include $phpbb_root_path . 'includes/abbcode.' . $phpEx) === false)
		{
			die('Advanced BBcode Box 3 file ' . $phpbb_root_path . 'includes/abbcode.' . $phpEx . ' couldn\'t be opened.');
		}
		// MOD : Advanced BBCode Box 3 (V1.0.6) - END

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

#
#-----[ FIND ]-------------------------------------------------------
#
	// MOD : Advanced BBCode Box 3 (V1.0.5) - START
	global $phpEx, $phpbb_root_path;
	include_once($phpbb_root_path . 'includes/abbcode.' . $phpEx);
	$text = process_abbcode_box($text);
	// MOD : Advanced BBCode Box 3 (V1.0.5) - END

#
#-----[ REPLACE WITH ]-----------------------------------------------
#
	// MOD : Advanced BBCode Box 3 (V1.0.6) - START
	$text = process_abbcode_box($text);
	// MOD : Advanced BBCode Box 3 (V1.0.6) - END

#
#-----[ OPEN ]-------------------------------------------------------
# NOTE: You will have to make this change to ALL themes you have installed. I use "prosilver" as an example.
#
styles/prosilver/template/overall_header.html

#
#-----[ FIND ]-------------------------------------------------------
#
<!-- // MOD : Advanced BBCode Box 3 (V1.0.5) - START -->
<script type="text/javascript" src="{T_IMAGESET_PATH}/bbcode_box/bbcode_box.js" charset="{S_CONTENT_ENCODING}"></script>
<style type="text/css" media="all">
@import "{T_IMAGESET_PATH}/bbcode_box/stylesheet.css";
</style>
<!-- // MOD : Advanced BBCode Box 3 (V1.0.5) - END -->

#
#-----[ REPLACE WITH ]-----------------------------------------------
#
<!-- // MOD : Advanced BBCode Box 3 (V1.0.6) - START -->
<script type="text/javascript" src="{T_IMAGESET_PATH}/bbcode_box/bbcode_box.js" charset="{S_CONTENT_ENCODING}"></script>
<!-- IF S_ABBC3_LITEBOX -->
<script type="text/javascript" src="{T_IMAGESET_PATH}/bbcode_box/lightbox/prototype.lite.js"></script>
<script type="text/javascript" src="{T_IMAGESET_PATH}/bbcode_box/lightbox/moo.fx.js"></script>
<script type="text/javascript" src="{T_IMAGESET_PATH}/bbcode_box/lightbox/litebox-1.0.js"></script>
<script type="text/javascript">
// <![CDATA[
	var fileLoadingImage = "{T_IMAGESET_PATH}/bbcode_box/lightbox/loading.gif";
	var fileBottomNavCloseImage = "{T_IMAGESET_PATH}/bbcode_box/lightbox/closelabel.gif";
// ]]>
</script>
<!-- ENDIF -->

<style type="text/css" media="all">
@import "{T_IMAGESET_PATH}/bbcode_box/stylesheet.css";
@import "{T_IMAGESET_PATH}/bbcode_box/lightbox/lightbox.css";
</style>
<!-- // MOD : Advanced BBCode Box 3 (V1.0.6) - END -->

#
#-----[ FIND ]-------------------------------------------------------
#
<body id="phpbb" class="section-{SCRIPT_NAME} {S_CONTENT_DIRECTION}">

#
#-----[ IN-LINE FIND ]------------------------------------------
#
>

#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
<!-- IF S_ABBC3_LITEBOX --> onload="initLightbox()" <!-- ENDIF -->

#
#-----[ OPEN ]-------------------------------------------------------
# NOTE: You will have to make this change to ALL themes you have installed. I use "prosilver" as an example.
#
styles/prosilver/template/posting_buttons.html

#
#-----[ FIND ]-------------------------------------------------------
#
<div id="format-buttons">
<!-- // MOD : Advanced BBCode Box 3 (V1.0.5) - START -->
<!--

#
#-----[ REPLACE WITH ]-----------------------------------------------
#
<div id="format-buttons">
<!-- // MOD : Advanced BBCode Box 3 (V1.0.6) - START -->
<!-- IF S_ABBC3_MOD -->
	<!-- INCLUDE posting_abbcodes_buttons.html -->
<!-- ELSE -->
<!-- // MOD : Advanced BBCode Box 3 (V1.0.6) - END -->


#
#-----[ FIND ]-------------------------------------------------------
#
-->
<!-- INCLUDE posting_abbcodes_buttons.html -->
<!-- // MOD : Advanced BBCode Box 3 (V1.0.5) - END -->
</div>
<!-- ENDIF -->

#
#-----[ REPLACE WITH ]-----------------------------------------------
#
<!-- // MOD : Advanced BBCode Box 3 (V1.0.6) - START -->
<!-- ENDIF -->
<!-- // MOD : Advanced BBCode Box 3 (V1.0.6) - END -->
</div>
<!-- ENDIF -->

#-----[ OPEN ]-------------------------------------------------------
# NOTE: You will have to make this change to ALL themes you have installed. I use "subsilver2" as an example.
#
styles/subsilver2/template/overall_header.html

#
#-----[ FIND ]-------------------------------------------------------
#
<!-- // MOD : Advanced BBCode Box 3 (V1.0.5) - START -->
<script type="text/javascript" src="{T_IMAGESET_PATH}/bbcode_box/bbcode_box.js" charset="{S_CONTENT_ENCODING}"></script>
<style type="text/css" media="all">
@import "{T_IMAGESET_PATH}/bbcode_box/stylesheet.css";
</style>
<!-- // MOD : Advanced BBCode Box 3 (V1.0.5) - END -->

#
#-----[ REPLACE WITH ]-----------------------------------------------
#
<!-- // MOD : Advanced BBCode Box 3 (V1.0.6) - START -->
<script type="text/javascript" src="{T_IMAGESET_PATH}/bbcode_box/bbcode_box.js" charset="{S_CONTENT_ENCODING}"></script>
<!-- IF S_ABBC3_LITEBOX -->
<script type="text/javascript" src="{T_IMAGESET_PATH}/bbcode_box/lightbox/prototype.lite.js"></script>
<script type="text/javascript" src="{T_IMAGESET_PATH}/bbcode_box/lightbox/moo.fx.js"></script>
<script type="text/javascript" src="{T_IMAGESET_PATH}/bbcode_box/lightbox/litebox-1.0.js"></script>
<script type="text/javascript">
// <![CDATA[
	var fileLoadingImage = "{T_IMAGESET_PATH}/bbcode_box/lightbox/loading.gif";
	var fileBottomNavCloseImage = "{T_IMAGESET_PATH}/bbcode_box/lightbox/closelabel.gif";
// ]]>
</script>
<!-- ENDIF -->

<style type="text/css" media="all">
@import "{T_IMAGESET_PATH}/bbcode_box/stylesheet.css";
@import "{T_IMAGESET_PATH}/bbcode_box/lightbox/lightbox.css";
</style>
<!-- // MOD : Advanced BBCode Box 3 (V1.0.6) - END -->

#
#-----[ FIND ]-------------------------------------------------------
#
<body class="{S_CONTENT_DIRECTION}">

#
#-----[ IN-LINE FIND ]------------------------------------------
#
>

#
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------
#
<!-- IF S_ABBC3_LITEBOX --> onload="initLightbox()" <!-- ENDIF -->

#
#-----[ OPEN ]-------------------------------------------------------
# NOTE: You will have to make this change to ALL themes you have installed. I use "subsilver2" as an example.
#
styles/subsilver2/template/posting_buttons.html

#
#-----[ FIND ]-------------------------------------------------------
#
<!-- IF S_BBCODE_ALLOWED -->
<!-- // MOD : Advanced BBCode Box 3 (V1.0.5) - START -->
<!--

#
#-----[ REPLACE WITH ]-----------------------------------------------
#
<!-- IF S_BBCODE_ALLOWED -->
<!-- // MOD : Advanced BBCode Box 3 (V1.0.6) - START -->
<!-- IF S_ABBC3_MOD -->
	<!-- INCLUDE posting_abbcodes_buttons.html -->
<!-- ELSE -->
<!-- // MOD : Advanced BBCode Box 3 (V1.0.6) - END -->

#
#-----[ FIND ]-------------------------------------------------------
#
-->
<!-- INCLUDE posting_abbcodes_buttons.html -->
<!-- // MOD : Advanced BBCode Box 3 (V1.0.5) - END -->
<!-- ENDIF -->
	</td>
</tr>
#
#-----[ REPLACE WITH ]-----------------------------------------------
#
<!-- // MOD : Advanced BBCode Box 3 (V1.0.6) - START -->
<!-- ENDIF -->
<!-- // MOD : Advanced BBCode Box 3 (V1.0.6) - END-->
<!-- ENDIF -->
	</td>
</tr>

#
#-----[ FIND ]-------------------------------------------------------
#
<!-- // MOD : Advanced BBCode Box 3 (V1.0.5) - START -->
<!--
<!-- IF S_BBCODE_ALLOWED and .custom_tags -->

#
#-----[ REPLACE WITH ]-----------------------------------------------
#
<!-- // MOD : Advanced BBCode Box 3 (V1.0.6) - START -->
<!-- IF S_ABBC3_MOD -->
	<!-- nothing happend -->
<!-- ELSE -->
<!-- // MOD : Advanced BBCode Box 3 (V1.0.6) - END-->
<!-- IF S_BBCODE_ALLOWED and .custom_tags -->

#
#-----[ FIND ]-------------------------------------------------------
#
	</tr>
<!-- ENDIF -->
-->
<!-- // MOD : Advanced BBCode Box 3 (V1.0.5) - END -->
<!-- IF S_BBCODE_ALLOWED -->
<tr>

#
#-----[ REPLACE WITH ]-----------------------------------------------
#
	</tr>
<!-- ENDIF -->
<!-- // MOD : Advanced BBCode Box 3 (V1.0.6) - START -->
<!-- ENDIF -->
<!-- // MOD : Advanced BBCode Box 3 (V1.0.6) - END -->
<!-- IF S_BBCODE_ALLOWED -->
<tr>

#
#-----[DIY]----------------------------------------------------------
#
After installation, make sure you purge the cache and refresh all the styles through the ACP to get everything to show up correctly.

Added Giant font size (you must go ACP -> General Tab -> Board configuration -> Post settings
	look at "Maximum font size per post: Maximum font size allowed in a post. Set to 0 for unlimited font size." 
	and change "200" value with "300"

New config, you can enable/disable each one tags, regardless. 
	By default all are enables please open includes/abbcode.php and look at $abbcode_config = array()

Added wizard examples, 
	Please open language/en/mods/abbcode.php and look at all 'ABBCODE_?????_NOTE'		=> and add/change to your own examples ;)

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