Ver Mensaje Individual
  #1 (permalink)  
Antiguo 14/07/2005, 20:15
Avatar de ZydRick
ZydRick
 
Fecha de Ingreso: febrero-2005
Ubicación: Lima
Mensajes: 750
Antigüedad: 19 años, 2 meses
Puntos: 4
duda con BBcode

bueno tengo esta funcion de bbcode ke kiero usar en un sistema de noticias:

Código PHP:
<?
function bbcode ($texto) { 
$texto str_replace("\n\r","<br>",$texto); 
$texto str_replace("\r\n","<br>",$texto); 
$texto str_replace("\n","<br>",$texto); 
$texto eregi_replace("\\[web=([^\\[]*)\\]([^\\[]*)\\[/web\\]""<a target=\"_blank\" href=\"\\1\">\\2</a>"$texto); 
$texto eregi_replace("\\[web\\]([^\\[]*)\\[/web\\]","<a target=\"_blank\" href=\"\\1\">\\1</a>",$texto);
$i=0;
while(
$i 3) { 
$texto eregi_replace("\\[u\\]([^\\[]*)\\[/u\\]","<u>\\1</u>"$texto); 
$texto eregi_replace("\\[i\\]([^\\[]*)\\[/i\\]","<em>\\1</em>"$texto); 
$texto eregi_replace("\\[b\\]([^\\[]*)\\[/b\\]","<strong>\\1</strong>"$texto); 
$i++; 

return 
$texto;


?>
pero el problema es ke no se en ke parte ponerlo en el codigo de mi sistema, alguien sabe de esto ke me pueda poner un ejemplo?

Un saludo :)