Ver Mensaje Individual
  #1 (permalink)  
Antiguo 11/06/2004, 02:18
oecarlitoz
Invitado
 
Mensajes: n/a
Puntos:
:: como tener el php code asi como bbcode

Hola a todos he visto este sript y dicen que es para hacer el bbCode, me gustaria saber comolo puedo aplicar, ademas quisiera saber como puedo aplicarlo para colocar el php code, por favor si me pueden ayudar en la utilizacion un saludo.

Código PHP:
<?php 

function doBoxCode($text) { 
$text htmlspecialchars($text); 
$html = array(); 
$html[] = array("""<b>"); 
$html[] = array("""</b>"); 
$html[] = array("[i]""<i>"); 
$html[] = array("[/i]""</i>"); 
$html[] = array("[u]""<u>"); 
$html[] = array("[/u]""</u>"); 
$html[] = array("[move]""<marquee>"); 
$html[] = array("[/move]""</marquee>"); 
$html[] = array("[nl]""<br>"); 
foreach (
$html as $html) { 
$text str_replace($html[0],$html[1],$text); 

$text eregi_replace("\\[email\\]([^\\[]*)\\[/email\\]""<a href=\"mailto:\\1\">\\1</a>"$text); 
$text eregi_replace("\\[email=([^\\[]*)\\]([^\\[]*)\\[/email\\]""<a target='_blank' href=\"mailto:\\1\">\\2</a>"$text); 
$text eregi_replace("\\[url\\]([^\\[]*)\\[/url\\]""<a target='_blank' href=\"\\1\">\\1</a>"$text); 
$text eregi_replace("\\[url=([^\\[]*)\\]([^\\[]*)\\[/url\\]""<a target='_blank' href=\"\\1\">\\2</a>"$text); 
return 
$text

?>
Un saludo por favor comp puedo utilizarlo