PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Restrict BuddyPress Pages

s2Member Plugin. A Membership plugin for WordPress®.

Restrict BuddyPress Pages

Postby jgucci » August 10th, 2010, 11:51 am

I would like to restrict the buddypress pages, members, activity, groups and so on but I can not find their page ids.

Where do you find these?
User avatar
jgucci
Registered User
Registered User
 
Posts: 1
Joined: August 10, 2010

Re: Restrict BuddyPress Pages

Postby BeckB » August 10th, 2010, 11:43 pm

You should be able to do this through the URI Access Restrictions (under General Settings). e.g.:
members/
groups/
forums/
activity/
BeckB
Guest User
Guest User
 

Re: Restrict BuddyPress Pages

Postby Jason Caldwell » August 17th, 2010, 4:14 pm

Correct. This is how BuddyPress is integrated with s2Member; using URI Level Access.

Inside your WP Dashboard, see:
s2Member -> General Options -> URI Level Access Restrictions.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: Restrict BuddyPress Pages

Postby micb11 » September 8th, 2010, 4:54 am

Dammmmmm! Just spent an hour and a half trying to write some code to stop this. Then eventually found this added the word "members" to URI and all done.

Is there a way to redirect to certain pages for certain uri's. If a member is registered on level 1 they cannot access their profile until we manually upgrade them to level 2. but rather go to the register page I would like them to go to a page that says "Your level of access has not been approved yet"

Sure it can be done with conditionals in function.php ?
User avatar
micb11
Experienced User
Experienced User
 
Posts: 3
Joined: August 28, 2010

Re: Restrict BuddyPress Pages

Postby Jason Caldwell » September 9th, 2010, 10:20 am

Thanks for the great question.
Here are some ways you could handle this:


1. Install Exec-PHP, and then put something like this inside your Login Welcome Page for s2Member.
Code: Select all
<?php if(current_user_is("s2member_level0")){ ?>
    Your level of access has not been approved yet.
<?php } else if(current_user_is("s2member_level1")){ ?>
    Welcome! Thanks for your purchase.
<?php } ?>
( for further details, in your Dashboard, go to: s2Member -> API Scripting -> Advanced Conditionals )

----------------------------------

2. No PHP required, use [s2If] Shortcode Conditionals in any Post/Page/Widget.
Code: Select all
[s2If current_user_is(s2member_level0)]
    Your level of access has not been approved yet.
[/s2If]

[s2If current_user_is(s2member_level1)]
    Welcome! Thanks for your purchase.
[/s2If]
* requires s2Member v3.2.4+ ( for further details, see: s2 -> API Scripting -> Simple Conditionals ).

----------------------------------

3. Use Replacement Codes inside a Special Redirection URL.
Code: Select all
http://www.example.com/login-welcome-level-%%current_user_level%%
( see: General Options -> Login Welcome Page -> Special Redirection URL )
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA


Return to s2Member Plugin

Who is online

Users browsing this forum: Exabot [Bot] and 2 guests

cron