Page 1 of 1

removing the help / about tab from top menu

PostPosted: Tue Mar 15, 2011 6:50 pm
by 3R3
This mod exists to make a point about hiding the about tab with critical server info permission based/optional at admins discretion. As long as it is not, this mod is here so admins still have the option of at least completely hiding it from users.
Thanks to trickydick for the suggestion instead of completely hiding the tabs, make it so only admin can see them (viewtopic.php?f=8&t=5971&p=23217#p28450)

To remove the about or help tab in the topmost menu completely, do the following:
1. stop server
2. BACKUP ALL FILES of SS
3. Edit stuff
In a file called "top.jsp" in subsonic/jetty/xxxx/webapp/WEB-INF/jsp:
find
Code: Select all
<fmt:message key="top.more" var="more"/>

change to
Code: Select all
<c:if test="${model.user.adminRole}"><fmt:message key="top.more" var="more"/></c:if>

---
find
Code: Select all
<fmt:message key="top.help" var="help"/>

change to
Code: Select all
<c:if test="${model.user.adminRole}"><fmt:message key="top.help" var="help"/></c:if>

---
find
Code: Select all
<td style="min-width:4em;padding-right:1.5em">
                <a href="more.view?" target="main"><img src="<spring:theme code="moreImage"/>" title="${more}" alt="${more}"></a><br>
                <a href="more.view?" target="main">${more}</a>
            </td>

change to
Code: Select all
<c:if test="${model.user.adminRole}"><td style="min-width:4em;padding-right:1.5em">
                <a href="more.view?" target="main"><img src="<spring:theme code="moreImage"/>" title="${more}" alt="${more}"></a><br>
                <a href="more.view?" target="main">${more}</a>
            </td></c:if>

---
find
Code: Select all
<td style="min-width:4em;padding-right:1.5em">
                <a href="help.view?" target="main"><img src="<spring:theme code="helpImage"/>" title="${help}" alt="${help}"></a><br>
                <a href="help.view?" target="main">${help}</a>
            </td>

change to
Code: Select all
<c:if test="${model.user.adminRole}"><td style="min-width:4em;padding-right:1.5em">
                <a href="help.view?" target="main"><img src="<spring:theme code="helpImage"/>" title="${help}" alt="${help}"></a><br>
                <a href="help.view?" target="main">${help}</a>
            </td></c:if>

basically you now made the bits responsible for showing the "about" and "help" tab conditional, only visible to admin users.

4. restart server
5. clear browser cache and cookies
6. clear jetty cache (see here: http://forum.subsonic.org/forum/viewtopic.php?t=5852
7. login

DONE

edit: incorporated trickydicks suggestion

PostPosted: Tue Mar 15, 2011 7:37 pm
by benzubi
hey

Just applied this.
Works great.

Cheers

Use the admin role

PostPosted: Sun Jul 10, 2011 3:33 am
by trickydick
Instead of doing this i figured the admin would want this for loggin, troubleshooting and such, so I just added this before and after the <td>

Code: Select all
<c:if test="${model.user.adminRole}">


then after the </td>

Code: Select all
</c:if>


Just a suggestion

Re: removing the help / about tab from top menu

PostPosted: Mon Sep 19, 2011 8:38 pm
by osnet
mmh wouldn't this be the start of beeing able to hide stuff from other users ?

i.e. if you just set shared folders into the adminrole

so you ( as admin ) can see em and the normal user doesn't ?

Re: removing the help / about tab from top menu

PostPosted: Tue Sep 20, 2011 12:26 pm
by fventura03
here's how I have mine setup, I only have videos, so I got rid of the playlist feature, and chat feature, I made the covers bigger (some missing), and I got rid of some of the buttons on the top.

Image

also made my video bigger

Image

Re: removing the help / about tab from top menu

PostPosted: Wed Oct 05, 2011 11:53 pm
by trickydick
@osnet

EXACTLY!

Re: removing the help / about tab from top menu

PostPosted: Sat Nov 24, 2012 2:33 am
by lars mars
osnet wrote:mmh wouldn't this be the start of beeing able to hide stuff from other users ?

i.e. if you just set shared folders into the adminrole

so you ( as admin ) can see em and the normal user doesn't ?


i really dont get the point of your post (no offense at all to you). thats why i am the admin (and owner of server and contents). sure it would enable you as the admin/ owner to hide some things from your users. in my case my 'users' are a handful friends of mine i generally trust. on the other hand, what is the reason for them to have access to the 'about' menu, even if you decide to have some private media folders - you should be able to do so. just because you share media with friends does not mean you have to share everything. stuff that is of no consequence really for my users (like the about/ click on logo), info about new versions (causes more confusion than anything else!!!! - constant questions what they need to update, where and why) shouldnt be enabled to them in the first place for the user level/ be an option if you really think they need to look into parts of the logs, your server info and donation details....

if i dont care at all, i just share all folders on my computer to the world.... you wouldnt do that, would you? ;)

Re: removing the help / about tab from top menu

PostPosted: Sat Nov 24, 2012 3:49 am
by GJ51
Wow. There's a whole lot going on here. I won't even attempt to address every point.

First, you have a lot of control over what users can do. I usually only allow the average user to play files and change settings and password. A common misconception is that when you let a user change settings, but they do not have admin rights, they only have a restricted menu that only allows them to change setting that affect their account.

Typically they can only change their password, theme, and display settings that they want to see on the screen. These settings only affect their account. If they are allowed to share media, they only see shared media that they have defined.

Second, private folders has been requested for almost as long as Subsonic has been around. It is perhaps the single most often requested feature. Fortunately, it is now available in the Madsonic mod version and works very well. I used to stay away from mods as many weren't well done, were often pretty buggy, and were a pain to keep current with new SS releases. MadEvil has addressed all those concerns and has a really stable mod that he constantly improves. He also responds quickly to requests and any concerns raised about the mod.

The Madsonic mod is now my primary site. I only keep the base Subsonic for reference. If any one want to see it live, just send me a PM for logon instructions.

I'd be willing to bet that if enough users made a few donations and requested a pic list for each user to see only certain icons, MadEvil would probably do it in short order.

Re: Use the admin role

PostPosted: Sat Nov 24, 2012 4:29 am
by lars mars
trickydick wrote:Instead of doing this i figured the admin would want this for loggin, troubleshooting and such, so I just added this before and after the <td>

Code: Select all
<c:if test="${model.user.adminRole}">


then after the </td>

Code: Select all
</c:if>


Just a suggestion

thx m8!!! used your solution, since i like to be able to have the quick check option. worked nicely. since i have very little knowledge about all the coding stuff, but consider myself clever enough to see, try and learn ;), the same two little snippets took care of of the initial 'about' button, the stats and the 'new version available...' note for the user level... very nice.
cant thank you enough!
L

Re: removing the help / about tab from top menu

PostPosted: Sat Nov 24, 2012 4:46 am
by lars mars
GJ51 wrote:Wow. There's a whole lot going on here. I won't even attempt to address every point.

First, you have a lot of control over what users can do. I usually only allow the average user to play files and change settings and password. A common misconception is that when you let a user change settings, but they do not have admin rights, they only have a restricted menu that only allows them to change setting that affect their account.

Typically they can only change their password, theme, and display settings that they want to see on the screen. These settings only affect their account. If they are allowed to share media, they only see shared media that they have defined.

agree completely with you there!!! no changes needed at all... well maybe the 'concerned admins' should take a minute or two and get the settings for their users access rights straight! thats all cool. with some help from here and a little looking around (i am not the sharpest marble, when it comes to programming, but able to apply the learned) got all the stuff eliminated from the top menu for the user view that concerned me (about, stats and the annoying - for the user completely senseless and confusing - new version msg.) that shall be it for 2nite ;)

GJ51 wrote:Second, private folders has been requested for almost as long as Subsonic has been around. It is perhaps the single most often requested feature. Fortunately, it is now available in the Madsonic mod version and works very well. I used to stay away from mods as many weren't well done, were often pretty buggy, and were a pain to keep current with new SS releases. MadEvil has addressed all those concerns and has a really stable mod that he constantly improves. He also responds quickly to requests and any concerns raised about the mod.

as i mentioned at one point in the past, i dont believe in 'overmodding'... just try to 'fix' the stuff that really annoys me. private folders are not an issue on my server, i include the stuff i like to share in subsonic, the rest does not make it there... ss is not the software i use at home to run my htpc :), as for my peeps, i feed you media, you dont need to store private stuff with me - you do that at your own machine ;)

Re: removing the help / about tab from top menu

PostPosted: Wed Jan 16, 2013 6:15 pm
by 3R3
trickydick wrote:Instead of doing this i figured the admin would want this for loggin, troubleshooting and such, so I just added this before and after the <td>
Code: Select all
<c:if test="${model.user.adminRole}">

then after the </td>
Code: Select all
</c:if>

Just a suggestion

Great idea, will put it in OP if you don't mind.
lars mars wrote:i feed you media, you dont need to store private stuff with me - you do that at your own machine ;)

Duly agreed!