inherit
202206
0
Jan 21, 2014 8:18:23 GMT -8
fallrain
6
November 2013
fallrain
|
Post by fallrain on Nov 19, 2013 9:18:22 GMT -8
I have been looking everywhere for days. I have several different member groups on my board, but I don't want one member to look at another member's profile and be able to see what groups they are a member of. Can we do this?
|
|
Former Member
inherit
guest@proboards.com
131621
0
Nov 29, 2024 9:31:45 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Nov 19, 2013 9:28:55 GMT -8
You could hide the tab for non-staff members? Could probably even hide the info in the tab from non-staff members in case they type the URL in directly.
This would be a template modification I could whip up for you. It would make it so they can't see the Groups tab at all unless they're staff
|
|
inherit
202206
0
Jan 21, 2014 8:18:23 GMT -8
fallrain
6
November 2013
fallrain
|
Post by fallrain on Nov 19, 2013 9:33:49 GMT -8
That might work... But wouldn't that keep a member from seeing their own groups? Just curious. Even your suggestion is better than it being open to everyone.
|
|
Former Member
inherit
guest@proboards.com
131621
0
Nov 29, 2024 9:31:45 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Nov 19, 2013 9:36:33 GMT -8
They'd still see their main Group (the one displayed) in their mini-profile and elsewhere in their profile and if they wanted to see all of their groups they could go to Edit Profile > Settings and look at the drop-down box that lets them choose which Group displays
It's up to you!
|
|
inherit
202206
0
Jan 21, 2014 8:18:23 GMT -8
fallrain
6
November 2013
fallrain
|
Post by fallrain on Nov 19, 2013 9:41:51 GMT -8
That sounds like a great working solution, then. I'm good with that! If you felt like 'whipping that up' that would be awesome!
|
|
Former Member
inherit
guest@proboards.com
131621
0
Nov 29, 2024 9:31:45 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Nov 19, 2013 10:25:20 GMT -8
Alright, first off, go to Admin > Structure > Layout Templates > User Profile > User Profile. Then, scroll through the code until you find:
{foreach $[menu]}<li{if $[menu.active]} class="ui-active"{/if}> <a href="$menu.href]" style="display: none;">$[menu.text]</a> <a href="$[menu.href]">$[menu.text]</a></li>{/foreach}
Change that to this:
{foreach $[menu]}<li{if $[menu.active]} class="ui-active"{/if}> {if $[menu.text] == "Groups"} {if $[current_user.is_staff]}<a href="$menu.href]">$[menu.text]</a> {else}<a href="$menu.href]" style="display: none;">$[menu.text]</a>{/if} {else} <a href="$[menu.href]">$[menu.text]</a>{/if}</li>{/foreach}
Then, go to Admin > Structure > Layout Templates > User Profile > Groups (it's a few tabs to the right)
At the very very top of the code, the first line, put:
{if $[current_user.is_staff]} At the very, very bottom of the code, the last line, put:
{else}You do not have permission to access this page{/if}
Once that's in, let me know how it's working. Any problems, post 'em =)
|
|
inherit
202206
0
Jan 21, 2014 8:18:23 GMT -8
fallrain
6
November 2013
fallrain
|
Post by fallrain on Nov 19, 2013 10:41:31 GMT -8
Ok, code is in, and I may be doing something wrong, but now not even Admin can see groups on a profile... Edit: Sometimes clicking on the Groups tab causes it to error out stating that the account cannot be found...
|
|
Former Member
inherit
guest@proboards.com
131621
0
Nov 29, 2024 9:31:45 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Nov 19, 2013 10:50:11 GMT -8
Oh, I made a typo. should be
{foreach $[menu]}<li{if $[menu.active]} class="ui-active"{/if}> {if $[menu.text] == "Groups"} {if $[current_user.is_staff]}<a href="$[menu.href]">$[menu.text]</a> {else}<a href="$[menu.href]" style="display: none;">$[menu.text]</a>{/if} {else} <a href="$[menu.href]">$[menu.text]</a>{/if}</li>{/foreach}
|
|
inherit
202206
0
Jan 21, 2014 8:18:23 GMT -8
fallrain
6
November 2013
fallrain
|
Post by fallrain on Nov 19, 2013 10:59:36 GMT -8
Now it is working perfectly! If you don't have Staff permission, there isn't even a Group tab. That will work wonderfully! Thank You!
|
|
Former Member
inherit
guest@proboards.com
131621
0
Nov 29, 2024 9:31:45 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Nov 19, 2013 11:04:36 GMT -8
No problem! If you wanna double-check that the content is also hidden if they put the URL in, then switch to a member account (make a temporary test account, for example, that you can delete afterward) and type the URL in. The only thing that should show up in the area is "you do not have permission to access this page," just wanna double-check that part is working right
|
|
inherit
202206
0
Jan 21, 2014 8:18:23 GMT -8
fallrain
6
November 2013
fallrain
|
Post by fallrain on Nov 19, 2013 11:05:42 GMT -8
Sorry. I meant to tell you that I checked that, already. It works perfectly!
|
|
Former Member
inherit
guest@proboards.com
131621
0
Nov 29, 2024 9:31:45 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Nov 19, 2013 11:13:19 GMT -8
Oh, good! Thank you for letting me know and I'm really glad it worked for you! =)
|
|