foreach($bbcodes_img as $bbcode => $bbcodehtml)
{ $text = preg_replace($bbcode, $bbcodehtml, $text); }
if ($cfg['parser_vid'])
{
$bbcodes = array(
'\\[youtube\\]([^\\([]*)\\[/youtube\\]' => '<object width="400" height="329"><param name="movie" value="http://www.youtube.com/v/\\1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/\\1" type="application/x-shockwave-flash" wmode="transparent" width="400" height="329"></embed></object>',
'\\[yahoo\\]([^\\([]*)\\[/yahoo\\]' => '
<object width="512" height="323"><param name="movie" value="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.4" /><param name="allowFullScreen" value="true" /><param name="flashVars" value="id=\\1"/>
<embed src="http://d.yimg.com/static.video.yahoo.com/yep/YV_YEP.swf?ver=2.2.4" type="application/x-shockwave-flash" width="512" height="323" allowFullScreen="true" flashVars="id=\\1"></embed></object>',
'\\[google\\]([^\\([]*)\\[/google\\]' => '<object width="400" height="329"><param name="movie" value="http://video.google.com/googleplayer.swf?docId=\1"></param><param name="wmode" value="transparent"></param><embed src="http://video.google.com/googleplayer.swf?docId=\\1" type="application/x-shockwave-flash" wmode="transparent" width="400" height="329"></embed></object>',
'\\[metacafe=([^\\[]*)\\]' => '<embed style="width:425px; height:345px;" src="http://www.metacafe.com/fplayer/\\1" width="400" height="345" wmode="transparent" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>');
foreach($sed_parser[1] as $bbcode => $bbcodehtml)
{ $text = preg_replace($bbcode, $bbcodehtml, $text); }
}
$bbcodes = array(
'\\[colleft\\]([^\\[]*)\\[/colleft\\]' => '<div class="colleft">\\1</div>',
'\\[colright\\]([^\\[]*)\\[/colright\\]' => '<div class="colright">\\1</div>',
'\\[center\\]([^\\[]*)\\[/center\\]' => '<div style="text-align:center;">\\1</div>',
'\\[right\\]([^\\[]*)\\[/right\\]' => '<div style="text-align:right;">\\1</div>',
'\\[left\\]([^\\[]*)\\[/left\\]' => '<div style="text-align:left;">\\1</div>',
'\\[c1\\

[^\\[]*)\\]([^\\[]*)\\[c2\\

[^\\[]*)\\]([^\\[]*)\\[c3\\]' => '<table style="margin:0; vertical-align:top; width:100%;"><tr><td style="padding:8px; vertical-align:top; width:\\1%;">\\2</td><td style="padding:8px; vertical-align:top; width:\\3%;">\\4</td></tr></table>'
);
foreach($sed_parser[1] as $bbcode => $bbcodehtml)
{ $text = preg_replace($bbcode, $bbcodehtml, $text); }
return(substr($text,1));
}