Adding Menu Item Issue

Post here to discuss topics relate to the 4.x version for the ASP Football Pool software program. All support topics should go here.
Post Reply
User avatar
fbonani
Posts: 50
Joined: Thu Aug 15, 2019 12:07 pm

Adding Menu Item Issue

Post by fbonani »

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?
User avatar
Russaholic
Posts: 58
Joined: Tue Oct 15, 2013 3:19 pm
Contact:

Re: Adding Menu Item Issue

Post by Russaholic »

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">&#9660;</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">&#9660;</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">&#9660;</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.
User avatar
fbonani
Posts: 50
Joined: Thu Aug 15, 2019 12:07 pm

Re: Adding Menu Item Issue

Post by fbonani »

Thanks for your response Russaholic. I was trying to add it after this code

Code: Select all

<%	if ENABLE_MESSAGE_BOARD then %>
				<td>
					<a href="messageBoard.asp">Message Board</a>
				</td>
				
<%	end if %>
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?
User avatar
Russaholic
Posts: 58
Joined: Tue Oct 15, 2013 3:19 pm
Contact:

Re: Adding Menu Item Issue

Post by Russaholic »

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.
User avatar
Russaholic
Posts: 58
Joined: Tue Oct 15, 2013 3:19 pm
Contact:

Re: Adding Menu Item Issue

Post by Russaholic »

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.
Attachments
Screen Shot 2019-08-27 at 8.49.13 PM.png
User avatar
Stutgrtguy
Posts: 167
Joined: Sun Oct 20, 2013 3:54 pm
Location: Colorado

Re: Adding Menu Item Issue

Post by Stutgrtguy »

File = /includes/menu.asp
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 %>
User avatar
Stutgrtguy
Posts: 167
Joined: Sun Oct 20, 2013 3:54 pm
Location: Colorado

Re: Adding Menu Item Issue

Post by Stutgrtguy »

always make backups before changing anything =)
User avatar
fbonani
Posts: 50
Joined: Thu Aug 15, 2019 12:07 pm

Re: Adding Menu Item Issue

Post by fbonani »

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.
User avatar
Stutgrtguy
Posts: 167
Joined: Sun Oct 20, 2013 3:54 pm
Location: Colorado

Re: Adding Menu Item Issue

Post by Stutgrtguy »

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
User avatar
Stutgrtguy
Posts: 167
Joined: Sun Oct 20, 2013 3:54 pm
Location: Colorado

Re: Adding Menu Item Issue

Post by Stutgrtguy »

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
User avatar
fbonani
Posts: 50
Joined: Thu Aug 15, 2019 12:07 pm

Re: Adding Menu Item Issue

Post by fbonani »

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.
User avatar
Stutgrtguy
Posts: 167
Joined: Sun Oct 20, 2013 3:54 pm
Location: Colorado

Re: Adding Menu Item Issue

Post by Stutgrtguy »

gimme a sec havin keyboard issues, then ill get ya an example code
User avatar
Stutgrtguy
Posts: 167
Joined: Sun Oct 20, 2013 3:54 pm
Location: Colorado

Re: Adding Menu Item Issue

Post by Stutgrtguy »

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!

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">&#9660;</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>
User avatar
Stutgrtguy
Posts: 167
Joined: Sun Oct 20, 2013 3:54 pm
Location: Colorado

Re: Adding Menu Item Issue

Post by Stutgrtguy »

change or delete as ya see fit
Post Reply