хык =) честно говоря нормальный шаблон тобой был сильно из коверкан...
вот это ближе к нормальному шаблону...
Код: Выделить всё
##########################################################################################
## MOD Title: BBcode [align=xxx]..[/align]
## MOD Author: Exploder < exploder@land.ru > (Roman) http://www.scienceinfo.de/
## MOD Description: Adds new set BBcode for various alignment of the text.
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Installation Time: ~10 Minutes
##
## Files to edit:
## posting.php
## privmsg.php
## includes/bbcode.php
## languages/lang_russian/lang_main.php
## templates/xxx/bbcode.tpl
## templates/xxx/posting_body.tpl
##
## Included Files:
## N/A
## License: http://opensource.org/licenses/gpl-license.php GNU 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/
##########################################################################################
## MOD History:
##
## 2005-07-23 - Version 1.0.0 RC1 { MMP }
## - Initial Release...
##
##########################################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##########################################################################################
#
#-----[ OPEN ]---------------------------------------------
#
posting.php
#
#-----[ FIND ]---------------------------------------------
#
'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],
#
#-----[ ADD, AFTER ]----------------------------------------
#
'L_BBCODE_AL_HELP' => $lang['bbcode_al_help'],
#
#-----[ FIND ]---------------------------------------------
#
'L_FONT_HUGE' => $lang['font_huge'],
#
#-----[ ADD, AFTER ]----------------------------------------
#
'L_ALIGN' => $lang['Align'],
'L_ALIGN_DEFAULT' => $lang['ALIGN_DEFAULT'],
'L_WIDTH' => $lang['Width'],
'L_LEFT' => $lang['left'],
'L_CENTER' => $lang['center'],
'L_RIGHT' => $lang['right'],
#
#-----[ OPEN ]---------------------------------------------
#
privmsg.php
#
#-----[ FIND ]---------------------------------------------
#
'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],
#
#-----[ ADD, AFTER ]----------------------------------------
#
'L_BBCODE_AL_HELP' => $lang['bbcode_al_help'],
#
#-----[ FIND ]---------------------------------------------
#
'L_FONT_HUGE' => $lang['font_huge'],
#
#-----[ ADD, AFTER ]----------------------------------------
#
'L_ALIGN' => $lang['Align'],
'L_ALIGN_DEFAULT' => $lang['ALIGN_DEFAULT'],
'L_WIDTH' => $lang['Width'],
'L_LEFT' => $lang['left'],
'L_CENTER' => $lang['center'],
'L_RIGHT' => $lang['right'],
#
#-----[ OPEN ]---------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]---------------------------------------------
#
// [i] and [/i] for italicizing text.
$text = str_replace("[i:$uid]", $bbcode_tpl['i_open'], $text);
$text = str_replace("[/i:$uid]", $bbcode_tpl['i_close'], $text);
#
#-----[ ADD, AFTER ]----------------------------------------
#
// [width] and [/width] Alignment on width.
$text = str_replace("[align=width:$uid]", $bbcode_tpl['width_open'], $text);
$text = str_replace("[/align:$uid]", $bbcode_tpl['width_close'], $text);
// [center] and [/center] for centered text.
$text = str_replace("[align=center:$uid]", $bbcode_tpl['center_open'], $text);
$text = str_replace("[/align:$uid]", $bbcode_tpl['center_close'], $text);
// [left] and [/left] For the text with it is left.
$text = str_replace("[align=left:$uid]", $bbcode_tpl['left_open'], $text);
$text = str_replace("[/align:$uid]", $bbcode_tpl['left_close'], $text);
// [right] and [/right] For the text with it is right.
$text = str_replace("[align=right:$uid]", $bbcode_tpl['right_open'], $text);
$text = str_replace("[/align:$uid]", $bbcode_tpl['right_close'], $text);
#
#-----[ FIND ]---------------------------------------------
#
// [i] and [/i] for italicizing text.
$text = preg_replace("#\[i\](.*?)\[/i\]#si", "[i:$uid]\\1[/i:$uid]", $text);
#
#-----[ ADD, AFTER ]----------------------------------------
#
// [center] and [/center] for centered text.
$text = preg_replace("#\[align=center\](.*?)\[/align\]#si", "[align=center:$uid]\\1[/align:$uid]", $text);
// [left] and [/left] For the text with it is left
$text = preg_replace("#\[align=left\](.*?)\[/align\]#si", "[align=left:$uid]\\1[/align:$uid]", $text);
// [right] and [/right] For the text with it is right
$text = preg_replace("#\[align=right\](.*?)\[/align\]#si", "[align=right:$uid]\\1[/align:$uid]", $text);
// [width] and [/width] Alignment on width
$text = preg_replace("#\[align=width\](.*?)\[/align\]#si", "[align=width:$uid]\\1[/align:$uid]", $text);
#
#-----[ OPEN ]---------------------------------------------
#
languages/lang_russian/lang_main.php
#
#-----[ FIND ]---------------------------------------------
#
$lang['bbcode_f_help'] = 'Размер шрифта: [size=x-small]маленький тест[/size]';
#
#-----[ ADD, AFTER ]----------------------------------------
#
$lang['bbcode_al_help'] = 'Выравнивание текста: [align=xxx]текст[/align] xxx - width, left, center, right';
#
#-----[ FIND ]---------------------------------------------
#
$lang['font_huge'] = 'Огромный';
#
#-----[ ADD, AFTER ]----------------------------------------
#
$lang['Align'] = 'Выравнивание текста';
$lang['ALIGN_DEFAULT'] = 'По умолчанию';
$lang['Width'] = 'По ширине';
$lang['left'] = 'Слева';
$lang['center'] = 'По центру';
$lang['right'] = 'Справа';
#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/bbcode.tpl
#
#-----[ FIND ]---------------------------------------------
#
<!-- BEGIN i_open --><span style="font-style: italic"><!-- END i_open -->
<!-- BEGIN i_close --></span><!-- END i_close -->
#
#-----[ ADD, AFTER ]----------------------------------------
#
<!-- BEGIN width_open --><div align="justify"><!-- END width_open -->
<!-- BEGIN width_close --></div><!-- END width_close -->
<!-- BEGIN center_open --><div align="center"><!-- END center_open -->
<!-- BEGIN center_close --></div><!-- END center_close -->
<!-- BEGIN left_open --><div align="left"><!-- END left_open -->
<!-- BEGIN left_close --></div><!-- END left_close -->
<!-- BEGIN right_open --><div align="right"><!-- END right_open -->
<!-- BEGIN right_close --></div><!-- END right_close -->
#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/posting_body.tpl
#
#-----[ FIND ]---------------------------------------------
#
f_help = "{L_BBCODE_F_HELP}";
#
#-----[ ADD, AFTER ]----------------------------------------
#
al_help = "{L_BBCODE_AL_HELP}";
#
#-----[ FIND ]---------------------------------------------
#
<option value="24">{L_FONT_HUGE}</option>
#
#-----[ ADD, AFTER ]----------------------------------------
#
#
</select> {L_ALIGN}:<select name="addbbcode22" onChange="bbfontstyle('[align=' + this.form.addbbcode22.options[this.form.addbbcode22.selectedIndex].value + ']', '[/align]')" onMouseOver="helpline('al')">
<option value="">{L_ALIGN_DEFAULT}</option>
<option value="width">{L_WIDTH}</option>
<option value="left">{L_LEFT}</option>
<option value="center">{L_CENTER}</option>
<option value="right">{L_RIGHT}</option>
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM