Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Getting log-in to disappear
Old 08-31-2010, 06:06 PM Getting log-in to disappear
Extreme Talker

Posts: 218
Trades: 0
With some great forum help my nav menu shows nav options in the main menu, and when the user logs-in, it lines up additional menu choices all on a horizontal line. The issue I'd like to fix is to make the "log-in" menu choice disappear when the user is logged-in. If you can overlook all the font tags, in the code below, I'd greatly appreciate any help.


Code:
<!--Begin Sub-Navigation. This only appears when a user is logged in.-->
<div class="sub-nav">
 
<img src="themes/default/images/arrow-red.gif">&nbsp;<a href="members/[var.user_name]"><font color="#333333" face="verdana">my account</font></a>&nbsp;<img src="themes/default/images/arrow-red.gif">
<a href="credits.php"><font color="#333333" face="verdana">[var.lang_my_credits]: [var.member_credits]</font></a>&nbsp;<img src="themes/default/images/arrow-red.gif">&nbsp;
<a href="logout.php"><font color="#000000" face="verdana">log out</font></a>&nbsp;&nbsp;
 
<!--[onload;block=div;when [var.loggedin]=1;comm]-->
 
</div>
 
<!--Begin Sub-Navigation. This only appears when a user is logged in.-->
<div class="sub-nav1">
<p class="account">
<span id="welc"><span style="color:#333333; font-size: 12px; font-face=verdana;">&nbsp;&nbsp;Welcome! You Are Now Logged In.</span></p>
<!--[onload;block=div;when [var.loggedin]=1;comm]-->
</div>
 
<div class="menu1">
 
&nbsp; <a href="[var.base_url]">&nbsp;<font color="#333333" font face="verdana">home</font></a>
&nbsp;&nbsp;<a href="page.php?page=16"><font color="#333333" face="verdana">faq</font></a>
&nbsp;&nbsp;<a href="[var.base_url]/join.php"><font color="#333333" face="verdana">register</font></a> 
&nbsp; &nbsp;<a href="[var.login_out_link]"><font color="#333333" face="verdana">log in</font></a>
&nbsp;&nbsp;<a href="page.php?page=9"><font color="#333333" face="verdana">search</font></a>
&nbsp; &nbsp;<a href="page.php?page=6"><font color="#333333" face="verdana">upload</font></a>
 
</div>
Code:
.menu1 {
    font-size: 11px;
    font-family: verdana;
    text-align: right;
    float: right;
    color: #333333;
 margin: 0px 5px 0px 0px;
 padding: 0px 0px 0px 0px;
}
 
 
.sub-nav {
    font-size: 11px;
    font-family: verdana;
    text-align: right;
    color: #333333;
    margin: 0px 22px 0px 0px;
    padding: 0px 0px 0px 0px;
}
 
.sub-nav-links {
  color: #;
  font-size: 14px;
  margin: 0px 0px -20px 0px;
}
 
.sub-nav1 {
    font-size: 11px;
    font-family: verdana;
    text-align: right;
    float: left;
    color: #333333;
    margin: 0px 22px 0px 0px;
    padding: 0px 0px 0px 0px;
}
 
 
.sub-nav {float:right}
 
.sub-nav1 p {
margin:0
font-size: 11px;
font-family: verdana;
color: #333333;
}
 
#welc{ float left;
}
 
.account
font-size: 11px;
font-family: arial;
 color: #333333;
}
chrisj is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-03-2010, 07:12 AM Re: Getting log-in to disappear
phpdasan's Avatar
Experienced Talker

Posts: 37
Name: Karthick B
Trades: 0
When user logged in, use session to store like
$_SESSION['isLoggedIn'] = TRUE;

if(!$_SESSION['isLoggedIn'])
show the choice menu
__________________
There is no secret ingredient.
phpdasan is offline
Reply With Quote
View Public Profile
 
Old 09-03-2010, 07:33 PM Re: Getting log-in to disappear
Sleeping Troll's Avatar
Ultra Talker

Posts: 351
Name: Butch Begy
Trades: 0
getElementById("menu1").style.display = 'none';
If you are using prototype.js framework $("menu1").style.display = 'none';
__________________
Sleeping Troll, EMUSE, Mind Expansion...Truly serendipity!
Sleeping Troll is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Getting log-in to disappear
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.20363 seconds with 12 queries