Mira esta funcion la hizo 
pato12 en 
este aporte
espero que te sirva    
Código PHP:
Ver originalfunction parsearTags($mensaje)
{
    $mensaje = str_replace("[citar]", "<blockquote><hr width='100%' size='2'>", $mensaje);     $mensaje = str_replace("[/citar]", "<hr width='100%' size='2'></blockquote>", $mensaje);     
    
 
    $mensaje = str_replace("[php]", '<TABLE width="460" height="58" border="1" cellpadding="2" cellspacing="2" bordercolor="#CCCCCC" bgcolor="#000000">  <TBODY>    <TR>      <TD width="448" height="25" align="right" bgcolor="#FFFFFF"><font color="#000000"><strong>PHP</strong></font></TD>    </TR>    <TR>      <TD height="25" valign="top" bgcolor="#F0F0F0"><font color="#910000">', $mensaje);     $mensaje = str_replace("[ / p h p]", "</font></TD>  </TR>  </TBODY></TABLE>", $mensaje);  
 
    return $mensaje;
}
  
Saludos.