Ver Mensaje Individual
  #3 (permalink)  
Antiguo 23/12/2003, 02:03
Volrath
 
Fecha de Ingreso: septiembre-2003
Ubicación: Pirexia
Mensajes: 150
Antigüedad: 20 años, 7 meses
Puntos: 1
Ok, cambie ya el codigo y esta ves si lo ha devuelto, pero lo ha devuelto sin colorear, solo en negro

Código PHP:
<?
$conexion 
mysql_connect("localhost","root","pass");
mysql_select_db("base",$conexion);
//------------------------------------------------

function bbcodes($comment) {

$comment htmlspecialchars($comment);

#######CAMBIO########
$comment ereg_replace('\[code\](.*)\[/code\]',"<table width=95% cellspacing=0 cellpadding=0 border=0 bgcolor=e2e2e2 align=center><tr><td>".highlight_string("\\\\1",true)."</td></tr></table>",$comment);
####################

$comment nl2br($comment);
    
    return 
$comment;
    
// de la function.

//------------------------------------------------
if (isset($go)) {
    
$comentario bbcodes($_POST[comentario]);
    
mysql_query("INSERT INTO comentarios (id_coment, nombre, ip, comentario) values ('1', 'Volrath', '155.155.155.55', '$comentario')");
    
header("Location: comentarios.php");
// del if (go)
?>
si t fijas, esta vez cambie el <? date(); ?> por \\1, para ke se coloree lo ke esta entre [ code ] y [ /code ], supongo ke se hace asi, la verdad es ke no se mucho de expresiones regulares, necesito una mano urgente.
nose porke no lo pinta . ayudenme please
__________________
In a world without walls, who needs Windows?