[pmwiki-users] EnablePostAuthorRequired in combination with author.php

Petko Yotov 5ko at 5ko.fr
Tue Dec 22 02:16:39 CST 2009


On Monday 21 December 2009 20:01:45 Holger Kremb wrote:
> Petko Yotov wrote:
> >>> Hello. Just define $EnablePostAuthorRequired = 1; before the
> >>> include_once line.
> >>
> >> It's already defined before the include_once line. :-|
> >
> > Then some other script or recipe may include the author.php file earlier.
> > I'd place the $EnablePostAuthorRequired = 1; before any other
> > include_once() or include() lines.
> I am sure that the following script at the end of the page is the reason
> for my problem (see alternative approach from Hagan).

It looks good, I see no obvious problems here.

> It works if I remove this section. Other scripts do not insert author.php
> (except stdconfig.php). I have checked this.
>
> I unfortunately need this section for the author tracking.

If another script does not include author.php, and does not set 
$EnablePostAuthorRequired to 0, and doesn't remove the 'RequireAuthor' entry 
from the $EditFunctions array, I don't know. 

You can try to manually enable the RequireAuthor function by adding near the 
end of config.php the following :

  array_unshift($EditFunctions,'RequireAuthor');

Petko



More information about the pmwiki-users mailing list