ok, been trying to figure this out in an easier way, but got div bbcodes... One has preset bg n text color, n the other one you can choose your bg n text color...
Hope this helps somebody, as you see I coded it for lava a while back, but never had a chance to use it...
First One Works Like: [div]Text Goes Here[/div]
Second One Works Like: [divbg=background_color]text_color::Your Text n Stuff Here[/divbg]
Replace background_color for your desired bgcolor, n text_color for your desired text color in the second one...
Please note: There are two:'s between the text color and text... like: :: If you leave them out this bbcode won't work...
Ok, for a demo, check out ThumbType...
I added this bbcode there n removed the full html support thing...
Hope this helps somebody, as you see I coded it for lava a while back, but never had a chance to use it...
PHP Code:
$text = preg_replace("/\[div\](.*?)\[\/div\]/is","<div style='border:1px solid black; background:white; color:black;'>$1</div>",$text);
$text = preg_replace("/\[divbg\=(.*?)\](.*?)::(.*?)\[\/divbg\]/is","<div style='border:1px solid black; background:$1; color:$2'>$3</div>",$text);
Second One Works Like: [divbg=background_color]text_color::Your Text n Stuff Here[/divbg]
Replace background_color for your desired bgcolor, n text_color for your desired text color in the second one...
Please note: There are two:'s between the text color and text... like: :: If you leave them out this bbcode won't work...
Ok, for a demo, check out ThumbType...
I added this bbcode there n removed the full html support thing...
Comment