[pmwiki-users] Minor edit

Hans design5 at softflow.co.uk
Tue Nov 21 05:15:16 CST 2006


Tuesday, November 21, 2006, 10:40:05 AM, Mark wrote:

> I have it set up that the Author field needs to be filled in by the author.
> What I would like is when people go to the edit form the 'author' field
> clears it self so the field is empty and will still require the author to
> fill it in.

> At the moment it automatically places the authors name in the field.


Do you include scripts/authuser.php and scripts/author.php?
Or just scripts/author.php?

I use in config.php:

# set passwords and authuser settings
include_once("$FarmD/scripts/authuser.php");
#if (@$_SESSION['authid']) $Author=$_SESSION['authid'];
if ($AuthId) {
  $Author = $AuthId;
  setcookie('author',$Author,0,'/');
}
include_once("$FarmD/scripts/author.php");

This enables username/password logins,
and the user name will be used as author name (stored in  a session
cookie) for each page edit, regardless what name the user types into
the author field! In fact the author field could be hidden.

If you don't use authuser, just simple password login or none at all,
you can use this instead:

$EnablePostAuthorRequired = 1;
$AuthorRequiredFmt =  "<h3 class='wikimessage'>$[Please sign your name in the author box before saving]</h3>";
include_once("$FarmD/scripts/author.php");

This will make it impossible to post without filling the author field.
To make it even more prominent set a style in pub/css/local.css for
wikimessage, for instance:
   .wikimessage {color:red}

Hope I understood you better and this may help a little!
   
Hans





More information about the pmwiki-users mailing list