Page 1 of 1

IP address neat trick

PostPosted: Sun Jan 22, 2012 10:56 pm
by ytechie
Here's something you might find helpful. We are going to have the IP address of each player in the player dropdown in playlist.jsp assigned to the title. Sounds complicated, but it really isn't. Check it out:

We are going to edit playlist.jsp.

Here is the part we are going to edit:
Code: Select all
<td><select name="player" onchange="location='playlist.view?player=' + options[selectedIndex].value;">
   <c:forEach items="${model.players}" var="player">
      <option ${player.id eq model.player.id ? "selected" : ""} value="${player.id}">${player.shortDescription}</option>
   </c:forEach>
</select></td>


Right before "value="${player.id}"", add "title='${player.ipAddress}'".
Now, when you open the dropdown and hover over an entry, it will show you the last IP address that was used by that player.

Hope this helps! :D

Re: IP address neat trick

PostPosted: Wed Jan 25, 2012 3:03 pm
by gurutech
Where can I find the playlist.jsp file?

Re: IP address neat trick

PostPosted: Wed Jan 25, 2012 3:53 pm
by ytechie
[subsonic]/jetty/[build]/webapp/WEB-INF/jsp.

Re: IP address neat trick

PostPosted: Mon Mar 12, 2012 9:14 am
by siGh
Modded and working perfectly :) Nice one!

Re: IP address neat trick

PostPosted: Fri Jan 03, 2014 2:39 pm
by wannabe_nerd
Hey everybody,

i know this thread is quite old, but i'd like to reanimate it because for several days i'm trying to enhance this litte tweak.

I want to change the "status.jsp" file so that the IPs are only shown if you logon with an admin-account. All the other Users shall only see the default status-page/frame without ip address.

But i don't know how to do that. I tried to look how the admin-user-role is requiered in other *.jsp-Files but everything I tired to copy form there didn't work as i want it.

Can you help me with this?

Greets