omzetten $GLOBALS['phphighlite'] = array("dummy"); $string = preg_replace("_\[code\](.*?)\[/code\]_ise", "phphighlite_replace('\\1')", $string); // html if($html == "1") { $string=htmlentities($string, ENT_QUOTES); } else { $string=htmlspecialchars($string); } if($gescheld == "1") { $string = str_replace("fuck","***",$string); $string = str_replace("shit","***",$string); $string = str_replace("slet","***",$string); $string = str_replace("tering","***",$string); $string = str_replace("fack","***",$string); $string = str_replace("f*ck","***",$string); $string = str_replace("teef","***",$string); $string = str_replace("kut","***",$string); $string = str_replace("joden","***",$string); $string = str_replace("pik","***",$string); $string = str_replace("eikel","***",$string); $string = str_replace("erotiek","***",$string); $string = str_replace("loser","***",$string); $string = str_replace("sukkel","***",$string); $string = str_replace("kut","***",$string); $string = str_replace("lul","***",$string); $string = str_replace("kanker","***",$string); $string = str_replace("whitepower","***",$string); $string = str_replace("dood","***",$string); $string = str_replace("neuk","***",$string); $string = str_replace("klootzak","***",$string); $string = str_replace("WAROFMONEY","***",$string); $string = str_replace("lycos","***",$string); $string = str_replace("LYCOS","***",$string); $string = str_replace("MAFFIAWAR","***",$string); $string = str_replace("maffiawar","***",$string); $string = str_replace("warofmoney","***",$string); $string = str_replace("w a r o f m o n e y","***",$string); $string = str_replace("W A R O F M O N E Y","***",$string); } $string = str_replace(">", ">", $string); $string = str_replace("<", "<", $string); $string = str_replace(""", "\"", $string); $string = str_replace("<", "<", $string); $string = str_replace("&", "&", $string); // smilies if($smilies == "1") { $search = array( ":(", ":)" , ":-)" , ":D", ":d", ";)", ":P", ":p", ":S", ":s", "(b)", ":@", "(8)", "(-)", "(!)", ":|", "(?)", ":$", "(b)", "(c)", "(e)", "(n)", "(v)", "(r)", "(l)", "(k)", "(slot)", "(h)"); $replace = array( "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" ); $string = str_replace($search, $replace, $string); } // bb codes // bb codes $search = array( "#\[center\](.*?)\[\/center\]#si", "#\[s\](.*?)\[\/s\]#si", "#\[u\](.*?)\[\/u\]#si", "#\[i\](.*?)\[\/i\]#si", "#\[b\](.*?)\[\/b\]#si", "#\[c\](.*?)\[\/c\]#si", "#\[quote\](.*?)\[\/quote\]#si", "#\[font color=(.*?)\](.*?)\[/font\]#si", "#\[size=(.*?)\](.*?)\[/size\]#si", "#\[align=(.*?)\](.*?)\[/align]#si", "#\[li\](.*?)\[/li\]#si" ); $replace = array( "
\\1
", "\\1", "\\1", "\\1", "\\1", "
\\1
", "
Quote:
\\1
", "\\1\\2", "\\1", "\\3", "\\2", "\\2", "
\\2
", "
  • \\1
  • " ); $string = preg_replace($search, $replace, $string); $string = str_replace("[img]","",$string); // str bb codes $search = array( "[gesloten]", "[GESLOTEN]", "[quote]", "[/quote]" ); $replace = array( " Topic Gesloten", " Topic Gesloten", "
    Quote:
    ", "
    " ); $string = str_replace($search, $replace, $string); // auto url + email $string = eregi_replace("([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})", "\\1", $string); $string = nl2br($string); // [code] -> weer omzetten $string = preg_replace("_\[code\]([0-9])\[/code\]_ise", "phphighlite('\\1')", $string); // return return $string; } // ###################### Start img_check ####################### function img_check($string) { $string = trim($string); if(preg_match("/^(ht|f)tp:\/\/([a-z0-9-]+(\.[a-z0-9-]+)*\.[a-z0-9]{1,4})(\/[\w%~!*().\'[:space:]-]+)+\.(jpe?g|png|gif|bmp)(\?[=&+\w%@:\/.~!*()\'-]*)?$/ix", $string)) { return ""; } else { return " Error: ongeldige afbeelding source!"; } } ###################### Start phphighlite ####################### function phphighlite_replace($code) { $code = trim(str_replace("\\\"", "\"", $code)); $code = str_replace(">", ">", $code); $code = str_replace("<", "<", $code); $code = str_replace(""", "\"", $code); $code = str_replace("<", "<", $code); $code = str_replace("&", "&", $code); $code = str_replace('$', '\$', $code); $code = str_replace("€ ", "€", $code); if(empty($code)) { return "[code] [/code]"; } else { array_push($GLOBALS['phphighlite'], $code); return "[code]".(count($GLOBALS['phphighlite'])-1)."[/code]"; } } function phphighlite($id, $fixed=1) { $code = $GLOBALS['phphighlite'][$id]; $splitted = explode("\n", $code); $grootte = count($splitted)+1; if(!strpos($code,""; $addedtags=1; } ob_start(); $oldlevel=error_reporting(0); highlight_string($code); error_reporting($oldlevel); $buffer = ob_get_contents(); ob_end_clean(); if(!empty($addedtags)) { $openingpos = strpos($buffer,'<?'); $closingpos = strrpos($buffer, '?'); $buffer = substr($buffer, 0, $openingpos).substr($buffer, $openingpos+5, $closingpos-($openingpos+5)).substr($buffer, $closingpos+5); } $page_popup = ""; // popup if(isset($GLOBALS['phphighlite_tabel']) && isset($GLOBALS['phphighlite_id'])) { GLOBAL $page; if(isset($page)) { $page_popup = "&page=".$page; } $code = $buffer; $extra = " "; } else { $extra = ""; $GLOBALS['phphighlite_id'] = 0; } $return = "".$extra."
     Code
    \n\n\n
    \n\n
    \n"; for($i=1; $i<$grootte; $i++) { echo ""; $return .= $i."
    \n
    "; } $return .= "
    \n".$buffer."\n
    \n
    \n
    "; return $return; } function phphighliteappart($code) { $splitted = explode("\n", $code); $grootte = count($splitted)+1; if(!strpos($code,""; $addedtags=1; } ob_start(); $oldlevel=error_reporting(0); highlight_string($code); error_reporting($oldlevel); $buffer = ob_get_contents(); ob_end_clean(); if(!empty($addedtags)) { $openingpos = strpos($buffer,'<?'); $closingpos = strrpos($buffer, '?'); $buffer = substr($buffer, 0, $openingpos).substr($buffer, $openingpos+5, $closingpos-($openingpos+5)).substr($buffer, $closingpos+5); } $return = "
     Code
    \n\n\n
    \n\n
    \n"; for($i=1; $i<$grootte; $i++) { $return .= $i."
    \n"; } $return .= "
    \n\n
    \n
    \n
    "; return $return; } ?> "; } function smilietoevoegen() { ?> :( :) ;) :s :p (b) :@ (8) :d (-) (!) :| (?) :$ (h) (c) (e) (n) (v) (r) (h) (l)