IP address neat trick

Third-party modifications and add-ons, Apps and Clients

Moderator: moderators

IP address neat trick

Postby ytechie » Sun Jan 22, 2012 10:56 pm

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
User avatar
ytechie
 
Posts: 547
Joined: Sun Dec 12, 2010 5:05 am
Location: Manhattan, New York

Re: IP address neat trick

Postby gurutech » Wed Jan 25, 2012 3:03 pm

Where can I find the playlist.jsp file?
Image
gurutech
 
Posts: 492
Joined: Sun Jan 15, 2012 9:56 pm

Re: IP address neat trick

Postby ytechie » Wed Jan 25, 2012 3:53 pm

[subsonic]/jetty/[build]/webapp/WEB-INF/jsp.
User avatar
ytechie
 
Posts: 547
Joined: Sun Dec 12, 2010 5:05 am
Location: Manhattan, New York

Re: IP address neat trick

Postby siGh » Mon Mar 12, 2012 9:14 am

Modded and working perfectly :) Nice one!
siGh
 
Posts: 30
Joined: Tue Mar 06, 2012 7:51 am
Location: Northamptonshire

Re: IP address neat trick

Postby wannabe_nerd » Fri Jan 03, 2014 2:39 pm

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
Cloud Computing .... i made my own cloud !
wannabe_nerd
 
Posts: 36
Joined: Wed May 11, 2011 9:06 am


Return to Mods, Apps and Clients

Who is online

Users browsing this forum: No registered users and 2 guests