Back to TF Net

From: Daniel O'Leary <Daniel_O'Leary@
To: Kenneth Kump
Subject: Re: SPML #if Cmds Cont
Date:Mon, February 01, 1999 08:55 PM


I have not played with conditional execution of SPML based upon the DIRNAME, but I have noticed something about most SPML performs case sensitive comparisions. When I try some SPML on my unixserver I also notice that it will fail if the spaces are included in the comment as you have here. In your first example, "community" is not the same as "Community" so the comparison should fail. The docs also state that not all options are available with each command. I'll play with this some more and see what happens

On 01/31/1999 8:34 AM, Kenneth Kump wrote:

>another example of the #if.... contains .... #else ..... #endif commands
>not working properly.
>
>--------------
>
><!-- #if DIRNAME CONTAINS "community" -->
> <!-- #set var="returnto" value="/bbs-nu/pf-nu/Community/" -->
> <P>returnto = <!-- #echo returnto --></P>
><!-- #else -->
> <!-- #if DIRNAME CONTAINS "teens" -->
> <!-- #set var="returnto" value="/bbs-nu/pf-nu/teens/" -->
> <P>returnto = <!-- #echo returnto --></P>
> <!-- #else -->
>
> <!-- #if DIRNAME CONTAINS "Grade" -->
> <!-- #set var="returnto" value="/bbs-nu/pf-nu/grade/" -->
> <P>returnto = <!-- #echo returnto --></P>
> <!-- #endif -->
> <!-- #endif -->
><!-- #endif -->
>
>The above returns the same incorrect results as does
>
>
><!-- #if DIRNAME CONTAINS "teens" -->
> <!-- #set var="returnto" value="/bbs-nu/pf-nu/teens/" -->
> <P>returnto = <!-- #echo returnto --></P>
><!-- #endif -->
>
><!-- #if DIRNAME CONTAINS "Grade" -->
> <!-- #set var="returnto" value="/bbs-nu/pf-nu/Grade/" -->
> <P>returnto = <!-- #echo returnto --></P>
><!-- #endif -->
>
><!-- #if DIRNAME CONTAINS "community" -->
> <!-- #set var="returnto" value="/bbs-nu/pf-nu/community/" -->
> <P>returnto = <!-- #echo returnto --></P>
><!-- #endif -->
>
>That is, the var returnto always has the value of community, regardless
>as to whether community is really contained within DIRNAME...
>
>============
>the browser always displays the following when a page with the above
>spml commands:
>
>returnto = community
>
>============
>
>This is incorrect for when DIRNAME actually contains
>"/bbs-nu/pf-nu/teens/"
>
>Again, I suspect that in the '#if DIRNAME contains .... ' spml command,
>that TF Server is treating DIRNAME as being a boolean operator and not
>as a variable and the terms CONTAIN, IS etc. within the spml #if command
>method (procedure, subroutine, or function) within the TF Server code
>are being ignored. Also, it appears as if the spml #else command is
>being ignored during the spml parsing method (procedure, subroutine, or
>function) ....
>
>Or, is it that I am forgetting to set a TF Server flag or switch
>somewhere that will tell TF Server to process files with #if commands
>each and every time that spml file is accessed by the client???????
>
>I help that all of this info is usfull in solving this problem...
>
>Ken.
>
>
>
---
Daniel O'Leary, Admin/WebMaster
KloneZone Mac - A TeleFinder 5.7 Mac/Windows BBS


141


Running TeleFinder Server v5.7.
© Copyright Spider Island Software