FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » 2.3.6RC4 Template optimize bug
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
2.3.6RC4 Template optimize bug [message #7900] Mon, 23 December 2002 14:24 Go to next message
shad is currently offline  shad   United Kingdom
Messages: 7
Registered: December 2002
Karma: 0
Junior Member
If I optimize my template using the option in theme manager, I recieve the following error when trying to create a poll (when using the pop-up window):

Fatal error: Call to undefined function: reverse_fmt() in /home/shad/www/forum/theme/Shad.tv Theme/poll.php on line 80
If I rebuild the templates, thus making them un-optimized, the problem disappears. I haven't modified poll.tmpl in any way.

Line 80 of the optimized poll.php is as follows:

$fudml = preg_replace('!<a href="mailto:(.+?)" target=(_new|"_blank")>(.+?)</a>!is', '[email=\1]\2[/email]', $fudml);if( preg_match('!<a href="(.+?)" target=(_new|"_blank")>\\1</a>!is', $fudml) )	$fudml = preg_replace('!<a href="(.+?)" target=(_new|"_blank")>\\1</a>!is', '[url]\1[/url]', $fudml);if( preg_match('!<a href=".+?" target=(_new|"_blank")>.+?</a>!is', $fudml) )	$fudml = preg_replace('!<a href="(.+?)" target=(_new|"_blank")>(.+?)</a>!is', '[url=\1]\3[/url]', $fudml);while ( preg_match('!<font color=".+?">.*?</font>!is', $fudml) ) $fudml = preg_replace('!<font color="(.+?)">(.*?)</font>!is', '[color=\1]\2[/color]', $fudml);while ( preg_match('!<font face=".+?">.*?</font>!is', $fudml) ) $fudml = preg_replace('!<font face="(.+?)">(.*?)</font>!is', '[font=\1]\2[/font]', $fudml);while ( preg_match('!<font size=".+?">.*?</font>!is', $fudml) ) $fudml = preg_replace('!<font size="(.+?)">(.*?)</font>!is', '[size=\1]\2[/size]', $fudml);while ( preg_match('!<ul>.*?</ul>!is', $fudml) ) $fudml = preg_replace('!<ul>(.*?)</ul>!is', '[list]\1[/list]', $fudml);while ( preg_match('!<ol type=".+?">.*?</ol>!is', $fudml) ) $fudml = preg_replace('!<ol type="(.+?)">(.*?)</ol>!is', '[list type=\1]\2[/list]', $fudml);while ( preg_match('!<ul type=".+?">.*?</ul>!is', $fudml) ) $fudml = preg_replace('!<ul type="(.+?)">(.*?)</ul>!is', '[list type=\1]\2[/list]', $fudml);while ( preg_match('!<span name="notag">.*?</span>!is', $fudml) ) $fudml = preg_replace('!<span name="notag">(.*?)</span>!is', '[notag]\1[/notag]', $fudml);$fudml = str_replace('<li>', '[*]', $fudml);reverse_FMT($fudml);return $fudml;}function reverse_nl2br(&$data)
Thanks.
Re: 2.3.6RC4 Template optimize bug [message #7901 is a reply to message #7900] Mon, 23 December 2002 16:34 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Don't use the optimizer, it is HIGHLY experimental.

FUDforum Core Developer
Re: 2.3.6RC4 Template optimize bug [message #7903 is a reply to message #7900] Mon, 23 December 2002 17:54 Go to previous messageGo to next message
shad is currently offline  shad   United Kingdom
Messages: 7
Registered: December 2002
Karma: 0
Junior Member
Hehe

It's a good idea in principle, but aren't comments ignored by the server anyway when the file is loaded?
Re: 2.3.6RC4 Template optimize bug [message #7922 is a reply to message #7903] Sat, 28 December 2002 17:25 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Here is the thing, comments & white space if there is a lot of it will cause a small delay when PHP parser is converting the code to opcodes. As far as the execution phase, comments are no longer there.


FUDforum Core Developer
Re: 2.3.6RC4 Template optimize bug [message #8736 is a reply to message #7901] Wed, 19 February 2003 18:46 Go to previous messageGo to next message
gbjbaanb is currently offline  gbjbaanb   United Kingdom
Messages: 41
Registered: February 2003
Location: UK
Karma: 0
Member
I run version 2.3.7 and the optimizer broke my template. NO problem with this, if its experimental, but could you update the docs with a big warning to say that this feature is experimental.
Re: 2.3.6RC4 Template optimize bug [message #8757 is a reply to message #8736] Fri, 21 February 2003 21:40 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
I will probably remove this feature in 2.3.8 completely.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Bug in the Bulgarian translation
Next Topic: can't get cookies to work
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 23:11:28 GMT 2024

Total time taken to generate the page: 0.02830 seconds