Sunday, April 15, 2007, 10:41:08 PM, Patrick wrote: >> >- I think {(server ...)} really ought to use the actual $_SERVER >> > names instead of introducing its own. Otherwise authors have >> > to learn a different set of names for things that already have names. >> >> Perhaps, but an admin that knew enough php to know all the server vars >> would probably just be doing page variables or setting up their own >> local extensions. My position as usual is to help those who don't >> really know php.
> As Dominique correctly points out, this has nothing to do with PHP. > These are defined by the CGI protocol and come from the apache server > (which is why PHP calls its variable $_SERVER). Is there a need for a {(server ...)} markup expression? Would it not be more fitting to use page variables for things like the user's browser name or the ip address? And then I would use terms like {$Browser} and {$IPAddress}. Just a short while ago Pm gave a definition for use of "browser" in conditional markup. Who would want to use {(server HTTP_USER_AGENT)} as wiki markup? > By suggesting that we use the actual names, I _am_ advocating for > and thinking of the non-programmers, because when a non-programmer > does a Google search for things like "how do I find out the user's > browser?" or "how do I find out the address a user is coming from?", > that non-programmer is going to find references to HTTP_USER_AGENT > and HTTP_REMOTE_ADDR and not 'browser' or 'ip'. So a user who does not read much documentation, or does not memorise it very well, tries to use {(server browser)} and this does not work. so he will have to look up the meaning of {(server..)}, and finds mention of HTTP_USER_AGENT. Then he is supposed to "google" on that term to get more information? To help a non-programming user it would be good to have a page variable {$Browser}, which return a simple browser name, and perhaps also {$BrowserVersion} to return a simple version info, good enough to do any conditional switching. Or are the markup expressions made available a backdoor to introduce pure PHP, and Apache, terminology? A geek's powertool box in other words, only for the initiated? ~Hans _______________________________________________ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users