1 (edited by Farch 2004-03-23 07:20)

Topic: new BBcode (LRCHR) v 0.1

##
##
##        Mod title:  new BBcode (LRCHR)
##
##      Mod version:  0.1 beta
##   Works on PunBB:  1.0 release; 1.1 ; and everywhere :rotate:
##     Release date:  2003-08-16
##           Author:  Farch
##
##      Description:  some new BBcode:
##                    [l], [r] , [c] , [center] , [s]
##                    
##                    [l]text[/l] align you text by left in post
##                    [r] for right
##                    [c] for center and 
##                    [s] text [/s] makes you text a little smaller ;) unlike
##                    you want to add a comments to you post at the and or say
##                    some OFFTOPIC
##
##   Affected files:  include\parser.php
##
##       Affects DB:  No
##
##            Notes:  idea from forum.ru-board.com
##
##                    Generated with ModGenerator (http://modgen.cactuz.nu/)
##                    on: 2003-08-16 19:33:32
##
##       DISCLAIMER:  Please note that modifications are not officially
##                    supported by PunBB. Installation of this modification
##                    is
##                    done at your own risk. Backup your forum database and
##                    any and all applicable files before proceeding.
##
##


#
#---------[ 1. OPEN ]---------------------------------------------------------
#

include/parser.php


#
#---------[ 2. FIND (line: 187) ]---------------------------------------------
#

"#\[color=([a-zA-Z]*|\#?[0-9a-fA-F]{6})](.*?)\[/color\]#s");


#
#---------[ 3. REPLACE WITH ]-------------------------------------------------
#

"#\[color=([a-zA-Z]*|\#?[0-9a-fA-F]{6})](.*?)\[/color\]#s",
"#\[s\](.*?)\[/s\]#s",
"#\[c\](.*?)\[/c\]#s",
"#\[r\](.*?)\[/r\]#s",
"#\[l\](.*?)\[/l\]#s",
"#\[hr\]#s");


#
#---------[ 4. FIND (line: 201) ]---------------------------------------------
#

'<span style="color: $1">$2</span>');


#
#---------[ 5. REPLACE WITH ]-------------------------------------------------
#

'<span style="color: $1">$2</span>',
'<small>$1</small>',
'<div align="center">$1</div>',
'<div align="right">$1</div>',
'<div align="left">$1</div>',
'<hr>');


#
#---------[ 6. SAVE/UPLOAD ]--------------------------------------------------
#

Re: new BBcode (LRCHR) v 0.1

ah, great! keep the mods coming!

And when you at it, add your mod at http://punres.cactuz.nu/ .

Cheers m8!