Back to TF Net

From: Kenneth Kump <Kenneth_Kump@spid
To: Rusty
Subject: SPML #if Cmds Cont
Date:Sun, January 31, 1999 12:13 PM


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.






140


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