[Pmwiki-users] robots

Patrick R. Michaud pmichaud
Thu Jan 8 18:44:35 CST 2004


On Fri, Jan 09, 2004 at 02:15:29AM +0100, Christian Ridderstr?m wrote:
> > If not, I'd like to see the code added to PmWiki itself.
> 
> Another solution is to use meta tags
> [...]
> where I wrote '$DisableAutoRobots' rather than '$EnableAutoRobots' since I 
> think you'd like this function enabled by default.

>From a style + consistency perspective I've chosen to always
name switches with $EnableXXX, even for functions that are enabled by default.
To disable a function, one would do $EnableXXX=0;

In PmWiki modules, a function that is enabled by default is wrapped with

    if (!isset($EnableXXX) || $EnableXXX) {
      ...
    }

and a function that is disabled by default is wrapped with

    if (@$EnableXXX) {
      ...
    }

Take a look at scripts/stdconfig.php for some examples.

I'll definitely add the robots-exclusion code to PmWiki (in the 0.5.x
series, rather than waiting for 0.6 to be released).

Pm




More information about the pmwiki-users mailing list