Advertisement:

Author Topic: Disable BBC tags error  (Read 7419 times)

Offline Antero

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
    • Nerokala Forum
Disable BBC tags error
« on: October 14, 2004, 09:15:27 PM »
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:

Code: [Select]
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.

Code: [Select]
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.


Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Disable BBC tags error
« Reply #1 on: October 15, 2004, 02:44:22 AM »
Find, Sources/Subs.php:

Code: [Select]
$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:

Code: [Select]
$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]

Offline Antero

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
    • Nerokala Forum
Re: Disable BBC tags error
« Reply #2 on: October 15, 2004, 07:54:59 AM »
Okay seemed to work, many thanks.