More user options

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

Moderator: moderators

More user options

Postby pemholder » Fri Oct 28, 2011 9:39 am

Hi,

I would like a lot of the subsonic features to hide from some users, ie. I think that not everyone should see user statistics.
I know how to hide some of these "not wanted" features for all users in changing code in JSPs.
But that's not what I want. I would like to adjust this per user.

Has anyone created a mod in this direction and made most of subsonic features adjustable for different users?
pemholder
 
Posts: 97
Joined: Wed Dec 09, 2009 1:28 pm

Re: More user options

Postby obtek » Fri Oct 28, 2011 9:58 am

Ok, what i did was a quick and dirty fix rather than a perm one but hopefully this will help:

I have 2 user groups

1: Normal free users with audio advertising and no instant play (must queue to listen)
2: premium users whith NO adverts and instant play (normal subsonic)

Also I am unable to allow downloads in my country as my license does not cover this.

So I used the download attribute.

So i edited main.jsp and manually removed the download buttons locating them from the "view source" in the web browser. this led me to another populating script (can't remember the name but it was one of the includes). I copied the code that displays the button to users with the "download" attribute and wrapped my new code (for instant play and no adverts) in this code with an if/else switch) so whenever someone has the download attribute set, they get the premium features.

quick and dirty. enjoy :)
obtek
 
Posts: 1
Joined: Wed Oct 19, 2011 12:44 pm

Re: More user options

Postby branlr » Sat Dec 17, 2011 9:59 pm

You can do this using c: if statements in top.jsp... look at the way that it is done for the settings button, and copy the exact same conditional statement for the other buttons you want to hide, and it will make them only available to administrator.

If I'm not mistaken, it should be fairly straightforward how to mod the conditional statement for other users if you just look at it carefully... but I honestly can't see a point in having these things visible to anyone as long as the administrator still has access. You may also want to change the hyperlink of the logo in the top left hand corner which goes to the about/help window. You can also change the target of this button so that it links to a main website in a new tab, rather than opening it in the middle frame.
branlr
 
Posts: 2
Joined: Thu May 26, 2011 8:31 pm


Return to Mods, Apps and Clients

Who is online

Users browsing this forum: No registered users and 7 guests