Search Results for 'private'
-
AuthorSearch Results
-
September 6, 2013 at 4:25 pm #170963
diaritoch
ParticipantNever mind. Fixed it by going to the database and changed the Hide Sitewide value from 1 to 0 in all the activity posts.
September 6, 2013 at 8:35 am #170937In reply to: Restrict Privacy Options (Group Settings)
Matt
ParticipantI want to only allow private groups, so I’ve commented out the equivalent of lines 81-88 & 99-106 in create.php and 59-67 & 79-87 in admin.php. Now when a user creates a new group, it does only show the private option, but it remains unchecked unless they click on it, so if they don’t, the group’s status remains as ‘public’ when they continue to the next stage. How do you set the radio button to be checked by default?
September 6, 2013 at 3:59 am #170907bp-help
ParticipantSeptember 6, 2013 at 12:51 am #170895bp-help
Participant@joe2000
In line 37 of my plugin after this:
if ( !is_user_logged_in()
add this:
&& !is_home()
This will allow that landing page to logged out users but will redirect to register or wp-login.php depending on which you define in the plugins settings. All other pages other than the landing page will be private.September 3, 2013 at 11:11 pm #170829tperkins
ParticipantSame here. private group gets 404. public group fine. cant go live with client.
September 3, 2013 at 3:39 pm #170815In reply to: Private Message/Conversations view messed up
jamesdonegan
ParticipantMaybe @mercime can be of help? You’ve been grea with other issues…. Thank you!
September 3, 2013 at 2:57 pm #170814In reply to: Using BuddyPress as Private Club Network
kimz
ParticipantI’ll check bp_get_current_signup_step(),
and putting the code on the registration page seems to be a simple and good idea,
September 3, 2013 at 2:49 pm #170813In reply to: Private Portal with BuddyPress
Squirrel
ParticipantHi
Thanks @modemlooper I managed to figure it out after trying a few things and your conditional helped me deduce it.
if ( bp_is_current_component(‘activity’) && !bp_is_user_activity() ) {
worked for me.
(redirect if on main activity page but not own activity)September 3, 2013 at 2:25 pm #170810In reply to: Using BuddyPress as Private Club Network
Xevo
ParticipantJust put the actual code on the registration page?
You can edit register.php in the theme.You could also take a look at bp_get_current_signup_step(), if you want to make it an actual step in the registration process.
September 3, 2013 at 2:04 pm #170809In reply to: Using BuddyPress as Private Club Network
kimz
ParticipantI did something similar,
I created a db table with the members’ names and numbers,
and a php form with to field to check the input data with the db table,
if it’s correct the user is redirected to the registration page,but I was lookin for something to integrate between this page and the registration page, like a way to encrypt the link or deal with it as a registration step, you know what I mean? 🙂
September 3, 2013 at 1:47 pm #170807In reply to: Using BuddyPress as Private Club Network
Xevo
ParticipantMaybe you could add a form that shows when a users tries accessing the register page that would require them to enter a security code first before seeing the actual register page.
Something like
if(!is_user_logged_in()) { if(!$_POST["access"]) { -show access form- } else { -show register page- } } else { -redirect user since he's already logged in- }(Just a raw sketch)
September 3, 2013 at 1:31 pm #170805In reply to: Using BuddyPress as Private Club Network
kimz
ParticipantThanks for your contribution @Xevo
all users are already redirected to the login page if not logged in,
but I want to allow only the users with the correct name and membership number to access the registration page
September 3, 2013 at 1:28 pm #170804In reply to: Using BuddyPress as Private Club Network
Xevo
ParticipantJust redirect any url towards the register/login page if the user isn’t logged in?
September 3, 2013 at 11:30 am #170789Peter Hardy-vanDoorn
ParticipantUpdate: bbPress 2.4 does not fix the bug!
September 2, 2013 at 5:49 am #170743In reply to: Private Portal with BuddyPress
modemlooper
Moderatorbp_is_profile is used to test if its a profile page. try that in a conditional.
September 1, 2013 at 1:24 pm #170716In reply to: Hide/restrict access to Private Messaging
rtandoh
ParticipantThank you very much. The code worked nicely, removing both the button and the functionality.
rt.
August 30, 2013 at 7:22 am #170655Hugo Ashmore
ParticipantYou probably ought to have migrated your bbPress group forums to the standalone plugin.
August 29, 2013 at 4:31 pm #170638In reply to: Private Portal with BuddyPress
Squirrel
ParticipantI just read the new Codex on child themes- so it should work with any theme- (answered my own question)
Thank you for putting up with another newbie guys 🙂
Best
August 29, 2013 at 4:13 pm #170636jaemaz
ParticipantBump.
Anyone?
August 29, 2013 at 4:07 pm #170635In reply to: Private Portal with BuddyPress
Squirrel
ParticipantThanks for the feedback
I think I understand now- the profile page has activity on it so it’s not possible to do what that way, and it’s linked to the member page because that is showing profiles.
I could hide things from members with template overrides as you suggest- but I’m not sure if it will work with my theme being a child theme of Twenty Thirteen. If I put the BuddyPress override template files in my child theme will it work?
Thanks
August 29, 2013 at 3:20 pm #170632In reply to: Private Portal with BuddyPress
shanebp
ModeratorSo you want to block
yoursite.com/members/
and
yoursite.com/activity/
from users who aren’t admins or editors ?But allow everyone to view
yoursite.com/members/my-profile?Then you might try putting a current_user_can conditional directly in the over-ride templates for those two pages.
[there surely is a way to write a function to do this, but it escapes me at the moment]
August 29, 2013 at 3:04 pm #170629In reply to: Private Portal with BuddyPress
Squirrel
ParticipantHi @shanebp and @henrywright-1
Thanks for your help- I agree with Shanebp that his function does the same thing and is simpler, however I still have the same problem in that it stops access to the members PROFILE page.
I think this must be a problem with BuddyPress though- maybe it’s a bug?
Anyway thank you both for helping with the functions I think it will be handy for other things until I sort that problem out.
August 29, 2013 at 2:43 pm #170628In reply to: Private Portal with BuddyPress
shanebp
ModeratorPerhaps a simpler way, given that she wants to check for both admin and editor, is to test against a cap that both admin and editor have.
Something like: `function bp_my_restrict() {
if ( !current_user_can(‘edit_posts’) ) {
if ( bp_is_current_component(‘members’) || bp_is_current_component(‘activity’) ) {
bp_core_redirect( home_url() );
}
}
}
add_action(‘wp’,’bp_my_restrict’);`August 29, 2013 at 2:16 pm #170624In reply to: Private Portal with BuddyPress
Henry
MemberHi @mossyoak
I’ve run a few tests and made some slight changes to that code. Try this
function bp_my_restrict() { $user_id = bp_loggedin_user_id(); $user = new WP_User( $user_id ); if ( ( $user->roles[0] != 'administrator' ) ) { if ( bp_is_current_component('members') || bp_is_current_component('activity') ) { wp_redirect( home_url() ); exit(); } } } add_action('wp','bp_my_restrict');August 29, 2013 at 2:07 pm #170623In reply to: Private Portal with BuddyPress
Squirrel
ParticipantHi
Thanks for your help again
I tried your functionfunction bp_my_restrict() { global $bp; $user_id = bp_loggedin_user_id(); $user = new WP_User( $user_id ); if ( bp_is_current_component('members') || bp_is_current_component('activity') ) { if ( ( $user->roles[0] != 'administrator' ) ) { wp_redirect( $bp->loggedin_user->domain ); exit(); } } } add_action('wp','bp_my_restrict');But it gave a redirect loop error- I think it is because these conditionals are stopping the profile page being accessed for users lower than admin so trying to redirect to it is just looping.
I changed the redirect to the home page which stopped the constant loop- but users who are not admin can still not access the profile page- these conditionals are stopping that which is a bit odd.
// BuddyPress restrict activity and members page function bp_my_restrict() { global $bp; $user_id = bp_loggedin_user_id(); $user = new WP_User( $user_id ); if ( bp_is_current_component('members') || bp_is_current_component('activity') ) { if ( ( $user->roles[0] != 'administrator' ) ) { wp_redirect( home_url() ); exit; } } } add_action('wp','bp_my_restrict');Thank you for your help.
-
AuthorSearch Results