Yeah... because a different snippet of code using that same bbuserinfo field DOES work...
However, it leaves the unparsed code visible in the post, as shown in the attachment.
PHP Code:
if ($bbuserinfo[disablecodes]) {
$disablesql="WHERE candisable=0";
} else {
$disablesql="";
}
THAT code works, and in the end produces the effect shown in the attachment... namely that certain codes aren't pulled from the DB and thus not parsed.
However, this code does nothing
PHP Code:
if ($bbuserinfo[disablecodes]) {
$bbcode = preg_replace("/(\[)(glow)(])(\r\n)*([^\"]*)(\[\/glow\])/siU", "", $bbcode);
}
// #\[(/{0,1})glow(=[^\]]*){0,1}\]#i
// #\[(/?)glow(=[^\]]*)?\]#i
(the 2 comment lines are other regexes that didn't work as well)
The line is inserted into the function just before this:
PHP Code:
$bbcodes=$DB_site->query("SELECT bbcodetag,bbcodereplacement,twoparams FROM bbcode $disablesql");
while($bbregex=$DB_site->fetch_array($bbcodes)) {