[Pmwiki-users] robots
Christian Ridderström
chr
Sat Jan 10 16:17:27 CST 2004
On Thu, 8 Jan 2004, Patrick R. Michaud wrote:
> 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 knew that, but there was a reason I used $Disable... can't remember why
right now though. Maybe something about the variable not having to
actually have been defined in order to have it activated as default,
although that's a pretty weak reason.
>
> 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).
Good (I think I'm already using the above code AFAIK)
/Christian
--
Dr. Christian Ridderstr?m, +46-8-768 39 44 http://www.md.kth.se/~chr
More information about the pmwiki-users
mailing list