function fetch_censored_text($text){global $vboptions;static $censorwords;if ($forumid == 1) {print $text;}elseif ($vboptions['enablecensor'] AND !empty($vboptions['censorwords'])){if (empty($censorwords)){$vboptions['censorwords'] = preg_quote($vboptions['censorwords'], '#');$censorwords = preg_split('#\s+#', $vboptions['censorwords'], -1, PREG_SPLIT_NO_EMPTY);}foreach ($censorwords AS $censorword){if (substr($censorword, 0, 2) == '\\{'){$censorword = substr($censorword, 2, -2);$text = preg_replace('#(?<=[^A-Za-z]|^)' . $censorword . '(?=[^A-Za-z]|$)#si', str_repeat($vboptions['censorchar'], strlen($censorword)), $text);}else{$text = preg_replace("#$censorword#si", str_repeat($vboptions['censorchar'], strlen($censorword)), $text);}}}// strip any admin-specified blank ascii chars$text = strip_blank_ascii($text, $vboptions['censorchar']);return $text;}
if ($forumid == 1) {print $text;}elseif