Forum Replies Created
-
update :
I found issue.
if there is members widget active in sidebar then group invitation button does not appear on that page. I think this is a bug.
can you please guide me.
Thanks for reply. I am trying to make my theme buddy press compatible. I am adding only one file which is buddypress/buddypress.php.
I have checked css buttons are not hidden. If I remove buddypress.php from my theme it displays buttons.I am using simple loop in buddypress.php is that ok?
<?php while ( have_posts() ) : the_post(); ?> <?php the_content(); ?> <?php endwhile; // end of the loop. ?>
I am trying to allow user to join group using enrollment key as you can see here.
https://buddypress.org/support/topic/join-group-by-key/I got it working in core file but i have no idea how to implement in my plugin is there any other way?
Here is my codeif ($_POST['enrollment-key'] =='xxx'){ groups_join_group($bp->groups->current_group->id , bp_loggedin_user_id() ); bp_core_add_message( __('You have successfully joined this group.', 'buddypress' ) ); }else{ groups_join_group($bp->groups->current_group->id , bp_loggedin_user_id() ); bp_core_add_message( __( 'Your membership request was sent to the group administrator successfully. You will be notified when the group administrator responds to your request.', 'buddypress' ) ); }
Okay I have created a new enrollment key option in request membership form.
The problem is that where should I add check if enrollment key is true that user auto join group without asking from admin.
I have some code for auto join i think it will work but where should I add it.
if($enrollment_key == 'xxx'){ if ( bp_groups_auto_join() && bp_current_user_can( 'bp_moderate' ) && 'key' $bp->groups->current_group->status && !groups_is_user_member( bp_loggedin_user_id(),$bp->groups->current_group->id ) ) { groups_join_group( $bp->groups->current_group->id, bp_loggedin_user_id() ); } }
yes. Some time it appears quickly after making a request and some time it take too much time. Should I send you site details?
Okay again buttons have disappeared ..
var_dump() returns NULL
@shanebp thanks for your help. I don’t know what was the problem but its working now.
okay i used
bp_get_button
but still no luck. then I removed requests-loop.php from theme buddypress folder that it can use plugin’s requests-loop.php still its not displaying