[pmwiki-users] Automatic author name

JASON JARVIS JARVISJ at whl.co.uk
Tue Nov 14 04:12:48 CST 2006


***  Before acting on this email or opening any attachment you are advised to read the disclaimer at the end of this email ***

I am trying to get the author name to autopopulate when my users edit.

I don't want to have a full blown authentication system but would rather have the users enter their name once and this then is saved in a cookie and subsequently used to populate the author field.

I have set this up, saving the name entered into a cookie called $AuthId and alos tried $Author but this is not picked up in the edit page.

Can anyone offer any advice? Thanks.

Here is my cookie script

<?
if(isset($AuthId)) {
/* reset the cookie if there was a cookie previously */
setcookie("AuthId",$AuthId, time() + 365 * 86400);
/* set the old date to the date from the cookie */
if(isset($date)) {
$old_date = $date;
} else {
 }
 $date = date("l, F j Y");
 /* reset the date in the cookie to today */
 setcookie("date", $date, time() + 365 * 86400);
 }
 ?>
<html>
 <head>
  <title>The Cookie Script</title>
 </head>
 <body>
  <?
  if(isset($AuthId)) {
  ?>
   <script language="Javascript" type="text/javascript">
document.location.href='http://lss_server/pmwiki/pmwiki.php'
</script>
  <?
  } else {
  ?>
   <form action="jason.php" method="POST">
    Please enter your name. This is so your changes are attributed to you. You will only need to do this  once.:    <input type="text" name="AuthId">
   <input type="submit" name="submit" value="Submit">
  </form>
 <?
}
 ?>
 </body>
</html>


*** Disclaimer ***
The information contained in this E-Mail and any subsequent correspondence may be subject to the Export Control Act (ECA) 2002. The content is private and is intended solely for the recipient(s). 
For those other than the recipient any disclosure, copying, distribution, or action taken, or omitted to be taken, in reliance on such information is prohibited and may be unlawful.

If received in error please return to sender immediately.

Under the laws of England misuse of information that is subject to the ECA 2002, is a criminal offence.




More information about the pmwiki-users mailing list