Topic: bbcode [size=xx]

i know this has been asked before, but could someone please just say how to do it, instead of just redirecting to all these other posts, please, thanks smile

Re: bbcode [size=xx]

Why? You can't read the stuff that has been posted before? tongue
http://www.punres.org/files.php?pid=227 | This project looks like it has a BBCode for size
http://www.punres.org/files.php?pid=92 | You can use [style] here for size I guess

Re: bbcode [size=xx]

Smartys wrote:

http://www.punres.org/files.php?pid=92 | You can use [style] here for size I guess

I made changes such as this to add [smaller] and [larger]?

 '#\[smaller\](.*?)\[/smaller\]#s',
 '#\[larger\](.*?)\[/larger\]#s',
'<span style="font-size: smaller">$1</span>',
'<span style="font-size: larger">$1</span>',

You should be able to use something like this in a similar manner.

'#\[size=([0-9]*)\](.*?)\[/size\]#s',
'<span style="font-size: $1em">$2</span>',

Re: bbcode [size=xx]

I wouldn't be doing it in em =/ Change em to px and you're a tad safer.