Nieuw lid |
|
wat is er fout aan de regel met "////mogelijk een fout"
let op je moet naar rechts scrollen om de regel te vinden
dit is de foutmelding: Parse error: syntax error, unexpected T_VARIABLE in /home/wilcoweg/domains/wilcoweggeman.nl/public_html/ubb.php on line 37
<?php
function replace($text){
$text = htmlspecialchars($text);
$text = nl2br($text);
$sqles = mysql_query("SELECT * FROM `forbidden`");
while($for = mysql_fetch_object($sqles)){
$text = str_replace($for->word, $for->replacement, $text);
}
//simpel makeup
$text = preg_replace("#\[b\](.*?)\[/b\]#si","<b>\\1</b>", $text);
$text = preg_replace("#\[u\](.*?)\[/u\]#si","<u>\\1</u>", $text);
$text = preg_replace("#\[i\](.*?)\[/i\]#si","<i>\\1</i>", $text);
//link
$text = preg_replace("#\[url\](.*?)\[/url\]#si","<a href=\\1 target=_blank>\\1</a>", $text);
$text = preg_replace("#\[url=(.*?)\](.*?)\[/url\]#si","<a href=\\1 target=_blank>\\2</a>", $text);
//img
$text = preg_replace("#\[img\](.*?)\[/img\]#si","<img src=\\1>", $text);
//color
$text = preg_replace("#\[color=(.*?)\](.*?)\[/color\]#si","<font color=\\1>\\2</font>", $text);
//scroll
$text = preg_replace("#\[scroll\](.*?)\[/scroll\]#si","<marquee>\\1</marquee>", $text);
//edit
$text = preg_replace("#\[edit\](.*?)\[/edit\]#si","<font color=orange><b>Edit</b></font>: \\1", $text);
//center
$text = preg_replace("#\[center\](.*?)\[/center\]#si","<center>\\1</center>", $text);
//list
$text = preg_replace("#\[list\](.*?)\[/list\]#si","<UL>\\1</UL>",$text)
$text = preg_replace("#\[*](.*?)#si","<LI>\\1</LI>",$text) //// mogelijk een fout
return $text;
}
?>
<?php function replace($text){ $text = str_replace($for->word, $for->replacement, $text); } //simpel makeup $text = preg_replace("#\[b\](.*?)\[/b\]#si","<b>\\1</b>", $text); $text = preg_replace("#\[u\](.*?)\[/u\]#si","<u>\\1</u>", $text); $text = preg_replace("#\[i\](.*?)\[/i\]#si","<i>\\1</i>", $text); //link $text = preg_replace("#\[url\](.*?)\[/url\]#si","<a href=\\1 target=_blank>\\1</a>", $text); $text = preg_replace("#\[url=(.*?)\](.*?)\[/url\]#si","<a href=\\1 target=_blank>\\2</a>", $text); //img $text = preg_replace("#\[img\](.*?)\[/img\]#si","<img src=\\1>", $text); //color $text = preg_replace("#\[color=(.*?)\](.*?)\[/color\]#si","<font color=\\1>\\2</font>", $text); //scroll $text = preg_replace("#\[scroll\](.*?)\[/scroll\]#si","<marquee>\\1</marquee>", $text); //edit $text = preg_replace("#\[edit\](.*?)\[/edit\]#si","<font color=orange><b>Edit</b></font>: \\1", $text); //center $text = preg_replace("#\[center\](.*?)\[/center\]#si","<center>\\1</center>", $text); //list $text = preg_replace("#\[list\](.*?)\[/list\]#si","<UL>\\1</UL>",$text) $text = preg_replace("#\[*](.*?)#si","<LI>\\1</LI>",$text) //// mogelijk een fout return $text; } ?>
reageer
|