On 2005.04.15, Bas Scheffers <[EMAIL PROTECTED]> wrote:
> Does AOLserver have some hidden support for SSI?
Here's my ghetto implementation of SSI:
ns_log Notice "ssi: registering SSI ADP tags"
proc ssi_include_tag {params} {
set param_count [ns_set size $params]
for {set i 0} {$i < $param_count} {incr i} {
set ssi_var_[ns_set key $params $i] [ns_set value $params
$i]
}
if [info exists ssi_var_file] {
if {[ns_adp_argc] > 1} {
set basedir [lindex [ns_adp_argv] 1]
} else {
set basedir [ns_adp_dir]
}
if [regexp {^/} $ssi_var_file] {
set filename $ssi_var_file
} else {
set filename $basedir/$ssi_var_file
}
return [ns_adp_parse -file $filename $basedir]
}
}
ns_register_adptag {!--#include} ssi_include_tag
ns_log Notice "ssi: registering SSI ADP tags done"
It only supports includes, no virtual or exec. Also, I wrote it LONG
ago -- looking at the code, it definitely could have been done
better/smarter given what I know now:
-rw-r--r-- 1 root www 651 2001-06-29 22:21 ssi.tcl
But, perhaps, it'll serve as an adequate starting point for folks.
-- Dossy
--
Dossy Shiobara mail: [EMAIL PROTECTED]
Panoptic Computer Network web: http://www.panoptic.com/
"He realized the fastest way to change is to laugh at your own
folly -- then you can let go and quickly move on." (p. 70)
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to <[EMAIL PROTECTED]>
with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject:
field of your email blank.