#####################################################################
## MOD Title: Advanced BBCode Box 3 ( aka ABBC3 )
##
## MOD Author: leviatan21 < info@mssti.com > (Gabriel) http://www.mssti.com/phpbb2/
## MOD Author: Disturbed One < anthony@anthonycoy.com > (Anthony Coy) http://www.hvmdesign.com
## MOD Author: AL Tnen < al_tnen@hotmail.com > (N/A) http://www.tnen.zzn.com
## MOD Author: freddie < freddie@tactic.be > (Stefaan Van Damme) http://www.tactic.be
##
## MOD Description: How to upgrade ABBC3 from 1.0.6 to 1.0.6b
##
## MOD Version: 1.0.6b
##
## Installation Level: Easy
## Installation Time: ~2 Minutes
##
## Files To Edit:
##	common.php
##	posting.php
##	viewtopic.php
##	includes/functions.php
##	includes/session.php
##	includes/functions_content.php
##	styles/prosilver/posting_abbcodes_buttons.html
##	styles/subsilver2/posting_abbcodes_buttons.html
##
## Included Files:
##	includes/abbcode.php
##
## 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 ]-------------------------------------------------------
#
copy root/includes/abbcode.php to includes/abbcode.php

#
#-----[ OPEN ]-------------------------------------------------------
#
common.php

#
#-----[ FIND ]-------------------------------------------------------
#
// Set PHP error handler to ours

#
#-----[ BEFORE, ADD ]------------------------------------------------
# NOTE: Add these lines on a new blank line before the preceding line(s) to find.
#
// MOD : ABBC3 (V1.0.6b) - START
require($phpbb_root_path . 'includes/abbcode.' . $phpEx);
// MOD : ABBC3 (V1.0.6b) - END

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

#
#-----[ FIND ]-------------------------------------------------------
#
// MOD : Advanced BBCode Box 3 (V1.0.6) - START
display_abbc3();
// MOD : Advanced BBCode Box 3 (V1.0.6) - END

// Output page ...
page_header($page_title);

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

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

#
#-----[ FIND ]-------------------------------------------------------
#
// MOD : Advanced BBCode Box 3 (V1.0.6) - START
display_abbc3();
// MOD : Advanced BBCode Box 3 (V1.0.6) - END


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

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

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

#
#-----[ FIND ]-------------------------------------------------------
#
	// The following assigns all _common_ variables that may be used at any point in a template.

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

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

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

		// 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
#
#-----[ REPLACE WITH ]-----------------------------------------------
#
		$this->add_lang($lang_set);
		unset($lang_set);

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

#
#-----[ FIND ]-------------------------------------------------------
#
	$text = str_replace(array("\n", "\r"), array('<br />', "\n"), $text);

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

#
#-----[ REPLACE WITH ]-----------------------------------------------
#
	$text = str_replace(array("\n", "\r"), array('<br />', "\n"), $text);

#
#-----[ FIND ]-------------------------------------------------------
#
function smiley_text($text, $force_option = false)
{
	global $config, $user, $phpbb_root_path;

#
#-----[ AFTER, ADD ]-------------------------------------------------
# NOTE: Add these lines on a new blank line after the preceding line(s) to find.
#
	// MOD : ABBC3 (V1.0.6b) - START
	$text = process_abbc3($text);
	// MOD : ABBC3 (V1.0.6b) - END

#
#-----[ OPEN ]-------------------------------------------------------
#
styles/prosilver/posting_abbcodes_buttons.html

#
#-----[ FIND ]-------------------------------------------------------
#
class="button2" value="ok"

#
#-----[ IN-LINE FIND ]-----------------------------------------------
#
ok

#
#-----[ IN-LINE REPLACE, WITH ]--------------------------------------
#
{L_SUBMIT}

#
#-----[ FIND ]-------------------------------------------------------
#
class="button2" value="cancel"

#
#-----[ IN-LINE FIND ]-----------------------------------------------
#
cancel

#
#-----[ IN-LINE REPLACE, WITH ]--------------------------------------
#
{L_CANCEL}

#
#-----[ FIND ]-------------------------------------------------------
#
<!-- IF S_BBCODE_ALLOWED and .custom_tags -->

#
#-----[ REPLACE WITH ]-----------------------------------------------
#
<!-- IF S_BBCODE_ALLOWED and custom_tags -->

#
#-----[ OPEN ]-------------------------------------------------------
#
styles/subsilver2/posting_abbcodes_buttons.html

#
#-----[ FIND ]-------------------------------------------------------
#
class="button2" value="ok"

#
#-----[ IN-LINE FIND ]-----------------------------------------------
#
ok

#
#-----[ IN-LINE REPLACE, WITH ]--------------------------------------
#
{L_SUBMIT}

#
#-----[ FIND ]-------------------------------------------------------
#
class="button2" value="cancel"

#
#-----[ IN-LINE FIND ]-----------------------------------------------
#
cancel

#
#-----[ IN-LINE REPLACE, WITH ]--------------------------------------
#
{L_CANCEL}

#
#-----[ FIND ]-------------------------------------------------------
#
<!-- IF S_BBCODE_ALLOWED and .custom_tags -->

#
#-----[ REPLACE WITH ]-----------------------------------------------
#
<!-- IF S_BBCODE_ALLOWED and custom_tags -->

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

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