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

Home » FUDforum Development » FUDforum 3.0+ » Bug in compiler.inc?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Bug in compiler.inc? [message #6145] Thu, 03 October 2002 18:40 Go to previous message
holstein   Canada
Messages: 9
Registered: August 2002
Location: Montreal
Karma:
Junior Member
I think I've found a bug in the function resolve_refs in the file compiler.inc.

I tried to add a new template to isolate the login procedure (but leave the actual template alone, so that if something go wrong with my code, users will fall out on fud login procedure). I saw that compile_all read files from ['DATA_DIR'].'/thm/default/tmpl', so I put my duplicate template there. But it was not parsed until I changed this :

- - -8<- - -
else if (! is_file($file2) ) {
if ( defined('debug') )
echo "opening $file1 to resolve refs<br>\n";
$str = filetomem($file2);
$GLOBALS['CURFILE'] = $file2;
}

TO ;
else if ( is_file($file2) ) {
<snip>
- - -- 8<- -

Judging by the debug message, I guessed that this is what was in effect intended.

Is that right?

I've come to this because I want to merge the login phase for my site with the login for fudforum. I digged around and I figure that the best way was to duplicate the file .../forum_data/src/login.php.t and have it wrap-up the actual login checking/cookie setting in a function I could call from my code. I came to duplicate the login.tmpl file because I could not make :
{PHP_FILE: input: login.php.t; output: login.php;}
{PHP_FILE: input: my_login.php.t; output: my_login.php;}

to work. Is it because it is not possible to call PHP_FILE twice in template? It still does not work with my modification to resolve_refs. my_login.php is generated only when call from a different .tmpl file.


Is there a simpler way to achieve what I want to do, ie be able to set the fud cookies from my code? I bet that I am not the only one who is interested in this...

Thanks for any help
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Question: Message counter
Next Topic: Member count decreasing
Goto Forum:
  

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

Current Time: Sat Nov 23 23:20:09 GMT 2024

Total time taken to generate the page: 0.04123 seconds