moving the logout button onto the main home page??

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   moving the logout button onto the main home page??
Milne
CZ Active Member
Milne has been a member for over 20 year's 20 Year Member
uk.gif
Occupation: Civil Servant/Online Business Owner
Age: 39
Gender: Male
Fav. Sports Team: Manchester United
Website:
Status: Offline
Joined: Oct 24, 2003
0.02 posts per day
Posts: 157
Points: 5,515
 Yahoo Messenger MSN Messenger 
As on this site, when the user logs into their account, their name appears in the left hand corner, with logout next to their name.

I want to move my logout button, from the users accounts and transfer it, so when they log into the site, the logout button appears next to their name.

Can anyone tell me how this can be done?

Milne icon_cool.gif




Back to top Reply with quote
#2   
mjhufford
CZ Active Member
 Codezwiz Site Donator
mjhufford has been a member for over 19 year's 19 Year Member
usa.gif arkansas.gif
Occupation: IT Industry
Age: 46
Gender: Male
Fav. Sports Team: Da Bears.
Website:
Status: Offline
Joined: Jul 01, 2004
0.04 posts per day
Posts: 288
Points: 15,094
  MSN Messenger 
It can be done in your header file (probably in your theme). Let me see what I can come up with for you.




_________________
"The pursuit of easy things makes men weak."
-David O. McKay
Back to top Reply with quote
#3   re: moving the logout button onto the main home page??
mjhufford
CZ Active Member
 Codezwiz Site Donator
mjhufford has been a member for over 19 year's 19 Year Member
usa.gif arkansas.gif
Occupation: IT Industry
Age: 46
Gender: Male
Fav. Sports Team: Da Bears.
Website:
Status: Offline
Joined: Jul 01, 2004
0.04 posts per day
Posts: 288
Points: 15,094
  MSN Messenger 
Go to you theme folder and open theme.php. Look for this in the code:

    if ($username == "Anonymous") {
   $theuser = "&nbsp;&nbsp;<a href=\"modules.php?name=Your_Account&op=new_user\">Create an account";
    } else {
   $theuser = "&nbsp;&nbsp;Welcome $username!";
    }


Change it to something like this:

    if ($username == "Anonymous") {
   $theuser = "&nbsp;&nbsp;<a href=\"modules.php?name=Your_Account&op=new_user\">Create an account";
    } else {
   $theuser = "&nbsp;&nbsp;Welcome $username! [<a href='http://www.your-site.com/modules.php?name=Your_Account&op=logout'>Logout</a>]";
    }


Make special not that you'll need to change the part of the code that says "www.your-site.com" to your URL.

Then make sure $theuser variable is in your header.html file somewhere (which is also in your theme directory).

That should pretty much do it. Let me know if that helps!

MJ



_________________
"The pursuit of easy things makes men weak."
-David O. McKay
Back to top Reply with quote
#4   re: moving the logout button onto the main home page??
Milne
CZ Active Member
Milne has been a member for over 20 year's 20 Year Member
uk.gif
Occupation: Civil Servant/Online Business Owner
Age: 39
Gender: Male
Fav. Sports Team: Manchester United
Website:
Status: Offline
Joined: Oct 24, 2003
0.02 posts per day
Posts: 157
Points: 5,515
 Yahoo Messenger MSN Messenger 
Nice one, its works great, two Thumbs up for that one.

Thanks a million

Another question, at the top of my site I have a row of links >> [ Register or login to view links on this board. ] << have a look and you'll see wot I mean.

How do I get rid of the Your Account link?

Milne icon_cool.gif




Back to top Reply with quote
#5   
mjhufford
CZ Active Member
 Codezwiz Site Donator
mjhufford has been a member for over 19 year's 19 Year Member
usa.gif arkansas.gif
Occupation: IT Industry
Age: 46
Gender: Male
Fav. Sports Team: Da Bears.
Website:
Status: Offline
Joined: Jul 01, 2004
0.04 posts per day
Posts: 288
Points: 15,094
  MSN Messenger 
That's also done in the header.HTML file in your themes folder. Open it with Frontpage if you have it and you'll see it in design mode. If you don't have FP, look for something like this:

<a href="modules.php?name=Your_Account">Your Account</a>


Then delete it and any other formatting HTML that might be associated with it.



_________________
"The pursuit of easy things makes men weak."
-David O. McKay
Back to top Reply with quote
#6   re: moving the logout button onto the main home page??
Milne
CZ Active Member
Milne has been a member for over 20 year's 20 Year Member
uk.gif
Occupation: Civil Servant/Online Business Owner
Age: 39
Gender: Male
Fav. Sports Team: Manchester United
Website:
Status: Offline
Joined: Oct 24, 2003
0.02 posts per day
Posts: 157
Points: 5,515
 Yahoo Messenger MSN Messenger 
Spot on, yet another problem you have helped me out with.

Thanks.

Milne icon_cool.gif




Back to top Reply with quote
#7   
mjhufford
CZ Active Member
 Codezwiz Site Donator
mjhufford has been a member for over 19 year's 19 Year Member
usa.gif arkansas.gif
Occupation: IT Industry
Age: 46
Gender: Male
Fav. Sports Team: Da Bears.
Website:
Status: Offline
Joined: Jul 01, 2004
0.04 posts per day
Posts: 288
Points: 15,094
  MSN Messenger 
Good deal! That's why I love this site. I've got so much help here in the past, it's fun to be able to offer it now and then.




_________________
"The pursuit of easy things makes men weak."
-David O. McKay
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum