Adding Menu Item Issue
Adding Menu Item Issue
I'm trying to add a link to the menu but it only works when the Admin is logged in. When a player is logged in, clicking on the menu item takes me back to the login page even though it shows I am logged in as a player. Can anyone tell me what I am doing wrong?
- Russaholic
- Posts: 58
- Joined: Tue Oct 15, 2013 3:19 pm
- Contact:
Re: Adding Menu Item Issue
So in the code, the link must be added before this tag:
<%if IsAdmin() then %>
Anything after that is set to only show for the Admin.
See larger snippet:
______________________________________________
</li>
<li class="dropdown"> <a href="javascript:void(0)" class="dropbtn">History <span class="style3">▼</span></a>
<div class="dropdown-content"> <a href="historyRecords.asp">Record Book</a> <a href="historyWinners.asp">Yearly Winners</a> <a href="historyweeks.asp">Weekly Winners</a> </div>
</li>
<li><a href="/messageBoard.asp">Chat</a></li>
<li class="dropdown"> <a href="javascript:void(0)" class="dropbtn">Account <span class="style3">▼</span></a>
<div class="dropdown-content"> <a href="changePassword.asp">Change Password</a> <a href="editProfile.asp">Edit Profile</a> <a href="makePayment.asp">Make Payment</a> </div>
</li>
<li><a href="helpRules.asp">Rules</a></li>
<% if IsAdmin() then %>
<li class="dropdown"> <a href="javascript:void(0)" class="dropbtn">Admin <span class="style3">▼</span></a>
<div class="dropdown-content"> <a href="updateScores.asp">Update Scores</a> <a href="updateSchedule.asp">Update Schedules</a> <a href="manageUsers.asp">Manage Users</a> <a href="manageAccounts.asp">Manage Accounts</a> <a href="accountBalances.asp">Account Balances</a> <a href="playerContacts.asp">Player Contacts</a> </div>
</li>
______________________________________________
I hope this helps. Let me know if you have any more problems.
<%if IsAdmin() then %>
Anything after that is set to only show for the Admin.
See larger snippet:
______________________________________________
</li>
<li class="dropdown"> <a href="javascript:void(0)" class="dropbtn">History <span class="style3">▼</span></a>
<div class="dropdown-content"> <a href="historyRecords.asp">Record Book</a> <a href="historyWinners.asp">Yearly Winners</a> <a href="historyweeks.asp">Weekly Winners</a> </div>
</li>
<li><a href="/messageBoard.asp">Chat</a></li>
<li class="dropdown"> <a href="javascript:void(0)" class="dropbtn">Account <span class="style3">▼</span></a>
<div class="dropdown-content"> <a href="changePassword.asp">Change Password</a> <a href="editProfile.asp">Edit Profile</a> <a href="makePayment.asp">Make Payment</a> </div>
</li>
<li><a href="helpRules.asp">Rules</a></li>
<% if IsAdmin() then %>
<li class="dropdown"> <a href="javascript:void(0)" class="dropbtn">Admin <span class="style3">▼</span></a>
<div class="dropdown-content"> <a href="updateScores.asp">Update Scores</a> <a href="updateSchedule.asp">Update Schedules</a> <a href="manageUsers.asp">Manage Users</a> <a href="manageAccounts.asp">Manage Accounts</a> <a href="accountBalances.asp">Account Balances</a> <a href="playerContacts.asp">Player Contacts</a> </div>
</li>
______________________________________________
I hope this helps. Let me know if you have any more problems.
Re: Adding Menu Item Issue
Thanks for your response Russaholic. I was trying to add it after this code
which in my menu.asp starts at line 10 right after the Home link. This is way above the <% if IsAdmin() then %> code you refer to. In looking at the code you provided, you have links that I don't seem to have although that shouldn't have anything to do with my problem. Any other suggestions?
Code: Select all
<% if ENABLE_MESSAGE_BOARD then %>
<td>
<a href="messageBoard.asp">Message Board</a>
</td>
<% end if %>
- Russaholic
- Posts: 58
- Joined: Tue Oct 15, 2013 3:19 pm
- Contact:
Re: Adding Menu Item Issue
Let me take a look at the original menu coding. I've altered mine so much over the years that it's probably completely different.
- Russaholic
- Posts: 58
- Joined: Tue Oct 15, 2013 3:19 pm
- Contact:
Re: Adding Menu Item Issue
See the attached screenshot to see how I added my own menu dropdown on an early version of my site. It's pretty straight forward, but if you keep having issues, just copy over your entire code and I will make it work for you.
- Stutgrtguy
- Posts: 167
- Joined: Sun Oct 20, 2013 3:54 pm
- Location: Colorado
Re: Adding Menu Item Issue
File = /includes/menu.asp
This will add another menu item, if I am understanding u correctly
This will add another menu item, if I am understanding u correctly
Code: Select all
<% if ENABLE_MESSAGE_BOARD then %>
<td>
<a href="messageBoard.asp">Message Board</a>
<a href="YOURPAGE.asp">YOURLABEL</a>
</td>
<% end if %>
- Stutgrtguy
- Posts: 167
- Joined: Sun Oct 20, 2013 3:54 pm
- Location: Colorado
Re: Adding Menu Item Issue
always make backups before changing anything =)
Re: Adding Menu Item Issue
Thanks for your response Stutgrtguy and I added my link exactly where you suggest I should add it. Unfortunately it did not work until I removed the code in the file that said it required a login to view it. The problem is that even if a player was logged in, clicking that link would take him back to the login page. I have it working now without having to log in.
- Stutgrtguy
- Posts: 167
- Joined: Sun Oct 20, 2013 3:54 pm
- Location: Colorado
Re: Adding Menu Item Issue
would you like to add anothe menu item somewhere else othere than the message board, whats the end goal hereSorry my keyboard is messin up
- Stutgrtguy
- Posts: 167
- Joined: Sun Oct 20, 2013 3:54 pm
- Location: Colorado
Re: Adding Menu Item Issue
Problem being that the message board menu is an "add on" so editing that menu is a little more complicated. you can add more menus and more menu items elsewhere easier
Re: Adding Menu Item Issue
It doesn't matter where I add the link, unless I remove the requires login to view code in the file, it keeps sending the player to the login module.
- Stutgrtguy
- Posts: 167
- Joined: Sun Oct 20, 2013 3:54 pm
- Location: Colorado
Re: Adding Menu Item Issue
gimme a sec havin keyboard issues, then ill get ya an example code
- Stutgrtguy
- Posts: 167
- Joined: Sun Oct 20, 2013 3:54 pm
- Location: Colorado
Re: Adding Menu Item Issue
here's a copy of a menu I did long ago, just look for the "if SERVER_EMAIL_ENABLED then " in your /includes/menu.asp
adds a new menu and items with links
cut n paste, make backups!
adds a new menu and items with links
cut n paste, make backups!
Code: Select all
<% if SERVER_EMAIL_ENABLED then %>
<a href="contact.asp">Email Players</a>
<% end if %>
</div>
</td>
<% end if %>
<td>
<a href="#" onclick="return false;">NFL Resource's <span class="arrow">▼</span></a>
<div class="subMenu">
<a href="http://nfl.com" target="_blank">NFL.COM</a>
<a href="http://espn.go.com/nfl/" target="_blank">ESPN.COM</a>
<a href="http://espn.go.com/nfl/injuries" target="_blank">ESPN Injury Report</a>
<a href="http://games.espn.go.com/nfl-pigskin-pickem/en/" target="_blank">ESPN Pigskin Pickem</a>
<a href="http://msn.foxsports.com/nfl" target="_blank">Fox Sports.COM</a>
<a href="http://sportsillustrated.cnn.com/football/nfl/" target="_blank">SI.COM</a>
</div>
</td>
<td>
- Stutgrtguy
- Posts: 167
- Joined: Sun Oct 20, 2013 3:54 pm
- Location: Colorado
Re: Adding Menu Item Issue
change or delete as ya see fit