You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 150 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - How can I add a Logut link in theme header? [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
Gaurav
Captain
Captain


Joined: Oct 13, 2003
Posts: 317


PostPosted: Wed Oct 22, 2003 11:14 pm Reply with quoteBack to top

I have zoneCopper theme and on the header/ top it shows something like this

Code:
 Welcome username! ::  Home  ::  Downloads  ::  Your Account  ::  Forums  :: October 23, 2003   


I want to add a link for logout here.

what file should I be editing? and what link should it be?
Thanx
Find all posts by GauravView user's profileSend private messageVisit poster's website
dezina
Support Mod
Support Mod


Joined: Jun 09, 2003
Posts: 1713

Location: England

PostPosted: Thu Oct 23, 2003 1:13 am Reply with quoteBack to top

Code:
if ($username == "Anonymous") {
      echo "&nbsp;&nbsp;<font color=\"#363636\"><a href=\"modules.php?name=Your_Account\">Create an Account</a></font>\n";
       } else {
      echo "&nbsp;&nbsp;".Hello." $username! &nbsp;&nbsp;[ <a href=\"modules.php?name=Your_Account&amp;op=logout\">Logout</a> ]";
    }

In theme.php of theme you are using

_________________
Image
Backup files BEFORE altering
Use PHPNuke 7.6 with patches!!
No private messages please, POST in forums.
Find all posts by dezinaView user's profileSend private messageVisit poster's website
Gaurav
Captain
Captain


Joined: Oct 13, 2003
Posts: 317


PostPosted: Thu Oct 23, 2003 8:33 pm Reply with quoteBack to top

thanx, it works very well
Find all posts by GauravView user's profileSend private messageVisit poster's website
roze
Nuke Soldier
Nuke Soldier


Joined: Jan 24, 2004
Posts: 17

Location: Morristown, NJ, USA

PostPosted: Sat Jan 24, 2004 6:00 am Reply with quoteBack to top

Hello! I put that block of code into my header where I wanted it, and it's just showing:

Hello ! [Logout]

regardless of whether or not i'm logged in as admin, regular user, or not logged in at all.

I tried to put this code into my modified version of the ExtraLite theme, and I'm assuming there's some kind of global or definition i'm missing. There are no errors, so I dont think it's huge...

would someone be kind enough to tell me what I'll have to add into my theme.php and where to get this to work?

My eventual goal is:
Welcome, Name! [Logout] (if they're logged in)

and

Welcome, Anonymous [Login or Register] (My login/new user registration page are the same)

I'm not so great with php, mysql, but I've done pretty well modifying theme.php so I think I just need a push in the right direction.

Thank you, nuke guys, you are incredible!
Find all posts by rozeView user's profileSend private message
roze
Nuke Soldier
Nuke Soldier


Joined: Jan 24, 2004
Posts: 17

Location: Morristown, NJ, USA

PostPosted: Sat Jan 24, 2004 7:19 pm Reply with quoteBack to top

Ahh - I actually managed to fix it myself... i refered to one of my login/logout blocks and changed anything that was $content to echo

I dont think this is the slickest piece of code ever, but it works well, and it's super customizable. I didn't use any language files, just hard coded the text. My site is in english only.

if (is_user($user)) {
$memname = $cookie[1];
echo "<big><br>Hello, <b>$memname</b>! [<a href=\"modules.php?name=Your_Account&amp;op=logout\"><big>Logout</big></a>]<br></big>";
}
else {
echo "<big><br>Welcome, <b>Anonymous</b>!&nbsp;&nbsp;[Click <a href=\"http://www.tubanews.com/modules.php?name=Your_Account\"><big>here</big></a> to Login or Register]</big>";
}

You can see it in action on my site, right above the right blocks.
Find all posts by rozeView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by TOGETHER TEAM srl ITALY http://www.togetherteam.it - DONDELEO E-COMMERCE http://www.DonDeLeo.com - TUTTISU E-COMMERCE http://www.tuttisu.it
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.617 Seconds - 81 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::