News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Disable BBC tags error

Started by Antero, October 14, 2004, 09:15:27 PM

Previous topic - Next topic

Antero

I have quite a bunch of BBC tags disabled on my board (like half of them). Since this "disable BBC tags" feature came in RC1 (if I remember right) and my board is over an year old and so some of the old posts might contain some BBC tags that I now days have disabled. Recently when I upgraded to RC2 I noticed this problem, if a post contained a disabled BBC tag then the board just gives this error:

Parse error: parse error, unexpected ';' in /home/nerokala/public_html/forum/Sources/Subs.php(991) : regexp code on line 1

Fatal error: Failed evaluating code: strtr('niin se vaan on että 9 lk rlz ;D', array('\"' => '"') in /home/nerokala/public_html/forum/Sources/Subs.php on line 991


It's always the same. Random text there is the line where BBC tag is I suppose.

Parse error: parse error, unexpected ';' in /home/nerokala/public_html/forum/Sources/Subs.php(991) : regexp code on line 1

Fatal error: Failed evaluating code: strtr('Mun nimi on Techno ja mun ikä on **.**.**** :P', array('\"' => '"') in /home/nerokala/public_html/forum/Sources/Subs.php on line 991


To fix this I had to enable all the BBC tags. I always manually also remove BBC tags that I don't use from my own default themes post.template, but that of course doesn't make them disabled. And this isn't a theme error since it gave exactly the same error in SMF default theme too.


[Unknown]

Find, Sources/Subs.php:

$codetocache[] = isset($disabled['shadow']) ? 'strtr(\'$3\', array(\'\\"\' => \'"\')' : '\'<table border="0" cellpadding="0" cellspacing="0" style="display: inline; vertical-align: middle; font: inherit;"><tr><td style="filter: Shadow(color=$1, direction=\' . (isset($shadow_directions[\'$2\']) ? $shadow_directions[\'$2\'] : (int) \'$2\') . \'); font: inherit;">\' . strtr(\'$3\', array(\'\\"\' => \'"\')) . \'</td></tr></table> \'';

Replace:

$codetocache[] = isset($disabled['shadow']) ? 'strtr(\'$3\', array(\'\\"\' => \'"\'))' : '\'<table border="0" cellpadding="0" cellspacing="0" style="display: inline; vertical-align: middle; font: inherit;"><tr><td style="filter: Shadow(color=$1, direction=\' . (isset($shadow_directions[\'$2\']) ? $shadow_directions[\'$2\'] : (int) \'$2\') . \'); font: inherit;">\' . strtr(\'$3\', array(\'\\"\' => \'"\')) . \'</td></tr></table> \'';

-[Unknown]

Antero

Okay seemed to work, many thanks.

Advertisement: