tkyone

Anonymous
I'm needing someone to help me with this, as I'm a fairly inexperienced php coder. I have 4 buttons (with two functions - login/logout) I need to implement in the header. The images are: login.gif login_on.gif logout.gif logout_on.gif What I need to do create the functions in libcommon.php that allows the login buttons to appear if the user is NOT logged in...and the logout buttons to appear if the user IS logged in. It would be written simular to this: if (!$user) { echo "<a href="user.php?" inMouseOver="login.src='/images/login_on.gif'" inMouseOut="login.src='/images/login.gif'"><img name="login" src="/images/login.gif" width="80" height="20" border="0" alt="Login"></a>\n"; } else { echo "<a href="user.php?mode=logout" inMouseOver="logout.src='images/logout_on.gif'" inMouseOut="logout.src='/images/logout.gif'"><img name="logout" src="/images/logout.gif" width="80" height="20" border="0" alt="Logout!"></a>\n"; } The above code was written for another script - not Geeklog - and I'm having a terrible time of figuring out what I need to change for it to work in Geeklog. Could someone help me by telling me how to implement this function to Geeklog? I would be most appreciative!

fraggalot

Anonymous
im not to sure, but why not give it a shot if your desperate. as i havent used the newer gl versions im not too sure about this, but earlier there was something in my header for "welcome (if username logged in command print username)" so.. lets say that username logged in status variable is $uname_status, then give a go for
if($uname_status!=NULL) or if($uname_status!='')
or something like that
{ then print the online buttons.}
then offcourse: else{offline buttons}
check your gl header for the uname_status thingie and then u should be able to work it out within short time.. -----
 - Fraggalot