Topics

User Functions

Events

There are no upcoming events

What's New

Stories

No new stories

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

Welcome to Geeklog Saturday, May 18 2013 @ 09:17 PM EDT


 Forum Index > Support > General Geeklog Support New Topic Post Reply
 [log out ] in the same top space by the side of welcome so and so
   
Anonymous: Mrittika
 12/03/04 07:09AM (Read 2381 times)  



can it be done ? help please

 
 Quote
samstone
 12/03/04 12:35PM  
+++++
Full Member

Status: offline


Registered: 09/29/02
Posts: 820
The following code will put a [login] where you wanted it and changes to [logout] after logged in.
PHP Formatted Code
<?php  if ($_USER['uid'] > 1) {print '<a class="navbar" href="' . $_CONF['site_url'] . '/users.php?mode=logout">Logout</a>';}
       else {print '<a class="navbar" href="' . $_CONF['site_url'] . '/users.php?mode=login"><b>Login</b></a>';}?>

 


I also put the following code to give the visiter a prompt to [Register Now] and turns to [Edit Profile] if the person logged in.

PHP Formatted Code
<?php  if ($_USER['uid'] < 2) {print '<a class="navbar" href="' . $_CONF['site_url'] . '/users.php?mode=new">Register Now</a>';}
       else {print '<a class="navbar" href="' . $_CONF['site_url'] . '/usersettings.php?mode=edit">Edit Profile</a>';}?>

 


Enjoy!

Sam

 
Profile Email
 Quote
Anonymous: Mrittika
 12/03/04 04:24PM  



long live samstone ! thanks a lot!

 
 Quote
Content generated in: 0.91 seconds
New Topic Post Reply

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Able to post 
Filtered HTML Allowed 
Censored Content