Former Member
inherit
guest@proboards.com
131621
0
Nov 27, 2024 17:35:21 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Nov 19, 2013 11:16:50 GMT -8
This will make it so the Groups tab in User Profiles only appears for Staff. Should a non-staff member type the URL directly in, they'll receive a message that says "You do not have permission to access this page." Staff will be able to see the tab and the Group contents.
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}
Any glitches, problems, or customization requests, post 'em here.
|
|