################################################################################### 
## MOD Title:    BBcode [center]..[/center]
## MOD Version:  1.0.2 (phpBB 2.0.x)
## MOD Author:	 Acid
## MOD Description:  A new BBcode, so you can center your text with the bbcode buttons.
##
## Files to edit:       6
##			includes/bbcode.php
##			posting.php
##			privmsg.php
##		    language/lang_english/lang_main.php 
##			templates/subSilver/bbcode.tpl
##			templates/subSilver/posting_body.tpl 
##
## Support:	  http://www.phpbbhacks.com/forums/
##
################################################################################### 
## 
## Note: 
## First always make a back-up from the files that you're going to edit. 
## 
## If you have additional bbcodes installed you will need to increase the
## addbbcodeXX (part in posting_body.tpl) accordingly and be sure that you dont use
## same letters and digits for two different bbcode hacks.
## The colspan value in posting_body.tpl (3x after bbcodes) should be changed too 
## (it depends on how many bbcodes you have installed).
################################################################################### 
##
## Versions:
##
## 1.0.2   - colspan (posting_body.tpl)
## 1.0.1   - fixed a typo
## 1.0     - Release
##
##################################################################################### 
# 
#-----[ OPEN ]------------------------------------------ 
#
includes/bbcode.php
# 
#-----[ FIND ]------------------------------------------ 
#
$EMBB_widths = array(
# 
#-----[ IN-LINE FIND ]------------------------------------------ 
#
) ;
# 
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------ 
#
,'55'
# 
#-----[ FIND ]------------------------------------------ 
#
$EMBB_values = array(
# 
#-----[ IN-LINE FIND ]------------------------------------------ 
#
) ;
# 
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------ 
#
,'Center'
# 
#-----[ FIND ]------------------------------------------ 
#
$bbcode_tpl['i_close'],
# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
	// [center] and [/center] for centered text. 
	$text = str_replace("[center:$uid]", $bbcode_tpl['center_open'], $text);
	$text = str_replace("[/center:$uid]", $bbcode_tpl['center_close'], $text);
# 
#-----[ FIND ]------------------------------------------ 
#
[i:$uid]\\1[/i:$uid]
# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
	// [center] and [/center] for centered text.
	$text = preg_replace("#\[center\](.*?)\[/center\]#si", "[center:$uid]\\1[/center:$uid]", $text);
# 
#-----[ OPEN ]------------------------------------------ 
#
posting.php
# 
#-----[ FIND ]------------------------------------------ 
#
'L_BBCODE_F_HELP' =>
# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
	'L_BBCODE_Y_HELP' => $lang['bbcode_y_help'], 
# 
#-----[ OPEN ]------------------------------------------ 
#
privmsg.php
# 
#-----[ FIND ]------------------------------------------ 
#
'L_BBCODE_F_HELP' =>
# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
	'L_BBCODE_Y_HELP' => $lang['bbcode_y_help'], 
# 
#-----[ OPEN ]------------------------------------------ 
#
language/lang_english/lang_main.php
# 
#-----[ FIND ]------------------------------------------ 
#
$lang['bbcode_f_help'] =
# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
$lang['bbcode_y_help'] = 'Font Center: [center]text[/center] (alt+y)';
# 
#-----[ OPEN ]------------------------------------------ 
#
templates/subSilver/bbcode.tpl
# 
#-----[ FIND ]------------------------------------------ 
#
<!-- BEGIN i_close -->
# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
	<!-- BEGIN center_open --><div align="center"><!-- END center_open -->
	<!-- BEGIN center_close --></div><!-- END center_close -->
# 
#-----[ OPEN ]------------------------------------------ 
#
templates/subSilver/posting_body.tpl
# 
#-----[ FIND ]------------------------------------------ 
#
f_help = "{L_BBCODE_F_HELP}";
# 
#-----[ AFTER, ADD ]------------------------------------------ 
#
y_help = "{L_BBCODE_Y_HELP}";
# 
#-----[ FIND ]------------------------------------------ 
#
bbtags = new Array(
# 
#-----[ IN-LINE FIND ]------------------------------------------ 
#
);
# 
#-----[ IN-LINE BEFORE, ADD ]------------------------------------------ 
#
,'[center]','[/center]'
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------
#
# EoM