##############################################################
## MOD Title: Center BBcode
## MOD Author: Amezis < N/A > (N/A) http://forum.global-rs.com
## MOD Description: Adds a [center] and [/center] BBCode tag for centering text when posting.
## MOD Version: 0.0.1
##
## Installation Level: Easy
## Installation Time: 1 Minute
## Files To Edit: includes/bbcode.php
# templates/subSilver/posting_body.tpl
## Included Files: n/a
## 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:
##
## Only tested with phpBB 2.0.18, but should work on older versions too.
##
##############################################################
## MOD History:
##
## 2005-11-19 - Version 0.0.1
## - MOD completed
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ 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);
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// BEGIN Center BBCode MOD --------
//
$text = str_replace("[center:$uid]", '<div style="text-align: center;">', $text);
$text = str_replace("[/center:$uid]", '</div>', $text);
//
// END CENTER BBCode MOD --------
//
#
#-----[ FIND ]------------------------------------------
#
// [i] and [/i] for italicizing text.
$text = preg_replace("#\[i\](.*?)\[/i\]#si", "[i:$uid]\\1[/i:$uid]", $text);
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
// BEGIN Center BBCode MOD --------
//
$text = preg_replace("#\[center\](.*?)\[/center\]#si", "[center:$uid]\\1[/center:$uid]", $text);
//
// END CENTER BBCode MOD --------
//
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/posting_body.tpl
#
#-----[ FIND ]---------------------------------
#
# NOTE: the actual line to find is MUCH longer, containing all the bbcode tags
#
bbtags = new Array(
#
#-----[ IN-LINE FIND ]---------------------------------
#
'[url]','[/url]'
#
#-----[ IN-LINE AFTER, ADD ]---------------------------------
#
,'[center]','[/center]'
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 0 misafir