<!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. 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> </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" from the edit window. 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> </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. 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> </DIV>
<DIV><FONT
face="Book Antiqua">include_once("$FarmD/cookbook/loginlogout.php");</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face="Book Antiqua">$DefaultPasswords['admin'] =
'id:admin';<BR>$DefaultPasswords['edit'] = 'id:editor';</FONT></DIV>
<DIV> </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' && <A href="mailto:!@$_COOKIE['author'">!@$_COOKIE['author'</A>])
{<BR> @session_start();<BR> if (@$_SESSION['authid'])
{<BR> <A
href="mailto:$Author=@$_SESSION['authid'">$Author=@$_SESSION['authid'</A>];<BR>
setcookie('author',$Author,0,'/');<BR> }<BR>}<BR>## set 'author' for
'if' statements condition<BR>$Conditions['author'] =
"\$GLOBALS['Author']==\$condparm";<BR></FONT></DIV></BODY></HTML>