Community Support Forums — WordPress® ( Users Helping Users ) — 2011-02-09T09:27:09-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=2017 2011-02-09T09:27:09-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2017&p=6541#p6541 <![CDATA[Re: URI access restrictions]]>
Second, what do you mean by viewin members in her group? How does the test user have access to the members? I blocked the members listing page totally from level 0 users.

Statistics: Posted by gvdsleen — February 9th, 2011, 9:27 am


]]>
2011-02-02T14:07:07-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2017&p=6269#p6269 <![CDATA[Re: URI access restrictions]]>
<?php if (current_user_can("access_s2member_level4")){ ?>
<?php } else { ?>Sorry, this is unavailable to you.
<?php } ?>

Hmm. Anyone have any ideas?

Statistics: Posted by nhsatomom — February 2nd, 2011, 2:07 pm


]]>
2011-02-02T13:38:57-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2017&p=6268#p6268 <![CDATA[Re: URI access restrictions]]> Statistics: Posted by nhsatomom — February 2nd, 2011, 1:38 pm


]]>
2011-02-02T09:26:16-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2017&p=6252#p6252 <![CDATA[Re: URI access restrictions]]> http://buddypress.org/community/groups/how-to-and-troubleshooting/forum/topic/how-to-make-pages-like-groups-forums-members-and-updates-only-accessible-to-members/?topic_page=2&num=15

Once BP1.3 is released, this issue should be resolved as it will use WP pages for components. You will then be able to use s2member’s page access restrictions for components like Members. In the meantime, you can protect any component directory from unauthorized member levels by editing its index.php template.

Add the following just after the opening <div class="padder"> tag:

<?php if (current_user_can("access_s2member_level1")){ ?>

Then add this just before the corresponding closing </div> tag:

<?php } else { ?>
You could add a message here for users who do not have the right access level.
<?php } ?>

See the “s2member” > “API/Scripting” section for more examples of how to customize the restriction or display of specific content.

For me, this file was in: mytheme/members/ and the tag was not padder. But hey, it worked fine.

Statistics: Posted by gvdsleen — February 2nd, 2011, 9:26 am


]]>
2011-02-02T08:24:44-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2017&p=6248#p6248 <![CDATA[Re: URI access restrictions]]> Statistics: Posted by nhsatomom — February 2nd, 2011, 8:24 am


]]>
2011-02-01T03:12:20-05:00 http://www.primothemes.com/forums/viewtopic.php?t=2017&p=6214#p6214 <![CDATA[URI access restrictions]]>
Have added:
URI restriction level 1
/groups
/activity
/forums
/friends

This works fine.

Adding for level 1 also works:
/members/%%current_user_login%%/friends/
/members/%%current_user_login%%/activity/friends/
/members/%%current_user_login%%/activity/groups/
/members/%%current_user_login%%/groups/
/members/%%current_user_login%%/messages/

/community/members (access to member directory from webpage, also works fine)

HOWEVER:
If somebody would guess the buddypress members directory page at www.mysite.com/members this is open to all!

adding /members to level 0 prevents open access
adding /members to level 1 makes the profile page not accessible for level 0 (has members in the URI).

What am I doing wrong, how2solve??

Statistics: Posted by gvdsleen — February 1st, 2011, 3:12 am


]]>