Hi, On Fri, 12 Mar 2004, Brian Pane wrote:
> That definitely sounds useful. I think you can get the same effect, > though, by using the existing 2.0/2.1 mod_include hook to add new > directives... something like this: > <!--#set_random var="blah" min="$min" max="$max" --> > > That's not quite as syntactically elegant, but it has the advantage > of not requiring any new parsing code. What do you think? Yes that was one of my other ideas as well :) The reason I asked for the below first was that it makes it a little more easier for the html author and that other modules which might use ap_ssi_parse_string won't get the benefit of functions. In addition I was thinking about a function "eval" feeding the content of a variable into ap_ssi_parse_string again. The last minor thought was that I wouldn't have to replicate most of the #set code again. The third idea (which we use atm.) is: <!--#set var="blah" function="random" value="$min" value="$max"> . I really don't like that one as it means that I have to modify #set without getting a benefit. What speaks for your idea is that here wouldn't be any code changes to existing code needed and that it prevent dump users even getting near recursions. Let me know what you think if I should go for the more flexible (imho) or the safer way. Happy weekend, Andre' > Brian > > On Mar 11, 2004, at 6:46 AM, Andre Breiler wrote: > > > Hi, > > > > I wonder what your opinion is on having functions in addition to > > variables > > in SSIs. > > An example would be <--#set var="blah" value="random($min,$max)" --> . > > > > My idea is to make ap_ssi_parse_string aware of functions and call a > > function which does the SSI function parsing/calling. > > In addition I'd export a function so that other modules can register > > SSI functions as well. > > > > Andre > > -- > > Andre' Breiler | Tel: +44 (0) 1628 407777 > > BBC Internet Services | URL: http://support.bbc.co.uk > > Maiden House, Vanwell Road | > > Maidenhead, SL6 4UB | Mail me if possible. And use a Subject > > line. > > > -- Andre' Breiler | Tel: +44 (0) 1628 407777 BBC Internet Services | URL: http://support.bbc.co.uk Maiden House, Vanwell Road | Maidenhead, SL6 4UB | Mail me if possible. And use a Subject line.