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

Home » FUDforum » How To » Adding new template but it's not compiled
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Adding new template but it's not compiled [message #29225 is a reply to message #29128] Mon, 05 December 2005 04:35 Go to previous messageGo to previous message
MadJack is currently offline  MadJack   Canada
Messages: 19
Registered: November 2005
Location: Qc
Karma:
Junior Member
Hey Ilia,

I had some time yesterday to look at the code in a debugger and found two (minor) bugs and I think the culprit which was making my theme not compiling every .tmpl files.

On line 593 of compiler.inc there's a missing "/" before il8n/ here:
<?php
$file1 
$GLOBALS['DATA_DIR'].'thm/'.$tset.'i18n/'.$lang.'/charset';
# should be
$file1 $GLOBALS['DATA_DIR'].'thm/'.$tset.'/i18n/'.$lang.'/charset';
?>


Also, on line 615, there's a "/" before thm/ and there shouldn't have one. Since the DATA_DIR is already ending with a slash, the one before thm is wrong. Shown here:
<?php
$prim_msg_file 
$GLOBALS['DATA_DIR'].'/thm/'.$cmpl['tset'].'/i18n/'.$cmpl['lang'].'/msg';
# should be
$prim_msg_file $GLOBALS['DATA_DIR'].'thm/'.$cmpl['tset'].'/i18n/'.$cmpl['lang'].'/msg';
?>


Finally, the line 629 should be:
<?php
foreach (glob($GLOBALS['DATA_DIR'].'thm/'.$cmpl['tset'].'/tmpl/*.tmpl') as $fe)

# and not:

foreach (glob($GLOBALS['DATA_DIR'].'thm/default/tmpl/*.tmpl') as $fe)
?>


Now that last one I'm not too sure if it would break something else but after reading through the code and rebuilding both the default and my theme there didn't seem to be anything wrong... The way it is fixed will compile ALL files ending with .tmpl that they are REF'ed or not. Anyway, as I said it worked fine here.

Could anyone reproduce it if possible? If you want me to still send the .tmpl and .php.t files I can do so Ilia. Just let me know.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: database server ip address
Next Topic: Avatar Admin Delete Feature
Goto Forum:
  

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

Current Time: Sun Sep 29 17:26:12 GMT 2024

Total time taken to generate the page: 0.03875 seconds