Help implementation bbcode
Posted: Wed Jun 21, 2006 7:45 pm
Hi.
It's me again....i know it sounds boring but i'm always trying to improve my CMS.
It's me again....i know it sounds boring but i'm always trying to improve my CMS.
Code: Select all
function bbcode($string){
$patterns = array(
'[size=([1-9]+)](.+?)[/size]is'
);
$replaces = array(
'<font style="font-size:11pt">2</font>'
);
$string = preg_replace($patterns, $replaces , $string);
return $string;
}
[code]
this is a portion of the code i use.
I'm using a template system and i would like to add the transformation to a variable....example.
if i use....[color=#006060][b]52[/b][/color] i would like to save the result in the following.
$output->size = ???;
$output->text = ???;
I don't know how to introduce this code inside the function and make it work.
¿Any idea?
Thanks.
Eduardo
[color=#888888][size=85]Archived topic from Iceteks, old topic ID:4393, old post ID:35382[/size][/color]