<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1515" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Book Antiqua"><STRONG>Goal</STRONG>... display something based 
on a login name/password combo. Author name actually.&nbsp; It will be used on 
internal sections of a page and on sections of the main menu.</FONT></DIV>
<DIV><FONT face="Book Antiqua">I think I almost have it... in massively ugly 
form, to be sure (code at page bottom)... but I need help.</FONT></DIV>
<DIV><FONT face="Book Antiqua"></FONT>&nbsp;</DIV>
<DIV><FONT face="Book Antiqua">The loginlogout script seems fine.</FONT></DIV>
<DIV><FONT face="Book Antiqua">UserAuth seems to work fine.</FONT></DIV>
<DIV><FONT face="Book Antiqua">The Author field in the edit window is populated 
from the login</FONT></DIV>
<DIV><FONT face="Book Antiqua">But...</FONT></DIV>
<DIV><FONT face="Book Antiqua"><U>The following conditional only works if I 
enter the author name "guest"&nbsp;from the edit window.&nbsp; If I enter 
"guest" and "member" from the login form... nada.</U></FONT></DIV>
<DIV><FONT face="Book Antiqua">(I have a little {$Author} nearby on the page and 
it is merrily telling me "guest". Lying little devil!)</FONT></DIV>
<DIV><FONT face="Book Antiqua"><BR>(:if author guest:)%red%Guest access 
only....</FONT></DIV>
<DIV><FONT face="Book Antiqua"></FONT>&nbsp;</DIV>
<DIV><FONT face="Book Antiqua">
<HR>
</FONT></DIV>
<DIV><FONT face="Book Antiqua">The following code forces even the admin to enter 
their name.&nbsp; I like what it does, but something is wrong with how Author 
gets filled.... or not filled.</FONT></DIV>
<DIV><FONT face="Book Antiqua"></FONT>&nbsp;</DIV>
<DIV><FONT 
face="Book Antiqua">include_once("$FarmD/cookbook/loginlogout.php");</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face="Book Antiqua">$DefaultPasswords['admin'] = 
'id:admin';<BR>$DefaultPasswords['edit'] = 'id:editor';</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face="Book Antiqua">$EnablePostAuthorRequired = 
1;<BR>##<BR>$AuthUser['admin'] = crypt('adminword');<BR>$AuthUser['editor'] = 
crypt('editorword');<BR>$AuthUser['seamus'] = 
crypt('password');<BR>$AuthUser['guest'] = 
crypt('member');<BR>##<BR>include_once("$FarmD/scripts/authuser.php");<BR>## If 
no $Author is set, set it to the authenticated user name<BR>if ($action == 
'edit' &amp;&amp; <A href="mailto:!@$_COOKIE['author'">!@$_COOKIE['author'</A>]) 
{<BR>&nbsp;&nbsp; @session_start();<BR>&nbsp;&nbsp; if (@$_SESSION['authid']) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp; <A 
href="mailto:$Author=@$_SESSION['authid'">$Author=@$_SESSION['authid'</A>];<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
setcookie('author',$Author,0,'/');<BR>&nbsp;&nbsp; }<BR>}<BR>## set 'author' for 
'if' statements condition<BR>$Conditions['author'] = 
"\$GLOBALS['Author']==\$condparm";<BR></FONT></DIV></BODY></HTML>