Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'private'

Viewing 25 results - 2,276 through 2,300 (of 5,233 total)
  • Author
    Search Results
  • #167539
    Renato Alves
    Moderator

    @bphelp Yeah, I tested it before commenting… Two pages is very little… My recommendation is to change it to get private only buddypress related pages, like the Private Buddypress plugin does.

    Either way, your plugin has great potential. Great work! =)

    #167527
    bp-help
    Participant

    @espellcaste
    There is a new version that is totally refactored on the repo.
    https://wordpress.org/plugins/private-community-for-bp-lite/

    #167525
    Renato Alves
    Moderator

    Good plugin, works like a charm.. But it would be good if we could set which pages to get private because as of now, it blocks the whole site from outside visitors except the home page.

    #167364

    In reply to: Creating New Plugins

    modemlooper
    Moderator

    Looks good. One more suggestion per WP standards. Place all add_actions right below it’s function unless the action is inside a function in that case you place that actions function below the function the add action is inside. It’s to keep the code easier to manage when you have really long file and scrolling up and down gets tedious.

    /*** Make sure BuddyPress is loaded ********************************/
    function private_community_for_bp_lite_bp_check() {
        if ( !class_exists( 'BuddyPress' ) ) {
    	add_action( 'admin_notices', 'private_community_for_bp_lite_install_buddypress_notice' );
        }
    }
    add_action('plugins_loaded', 'private_community_for_bp_lite_bp_check', 999);
    
    function private_community_for_bp_lite_install_buddypress_notice() {
    	echo '<div id="message" class="error fade"><p style="line-height: 150%">';
    	_e('<strong>Private Community For BP Lite</strong></a> requires the BuddyPress plugin to work. Please <a href="https://buddypress.org/download">install BuddyPress</a> first, or <a href="plugins.php">deactivate Private Community For BP Lite</a>.');
    	echo '</p></div>';
    }
    
    function private_community_for_bp_lite_init() {
    	require( dirname( __FILE__ ) . '/private-community-for-bp-lite.php' );
    }
    add_action( 'bp_include', 'private_community_for_bp_lite_init' );
    #167357
    kizmark
    Participant

    how did you get their name?.. I’ve tried to click on the textbox but their names aren’t appearing where it should have automatically searched.

    #167337
    Henry
    Member

    ‘Add friend’ and ‘send private message’ aren’t supposed to display when a user is logged out. For example, how would BuddyPress know who the friend request came from? How would BP know who the private message came from?

    #167336
    designweb
    Participant

    @bphelp Thank for your reply. my question is simple. i need to show member header item which include (add friend, send private message etc). which are not showing when user are not login. i need to remove login to see header item button condition . any way to do this.

    #167335
    bp-help
    Participant

    @maan18
    I am not certain I understand your requirement but you can try:
    https://github.com/bphelp/private_community_for_bp_lite

    designweb
    Participant

    when i was not login in buddypress the header item buttons in user profiles is not show up and i was trying to show user header item buttons like add friend, follow and send private message in buddypress but it will need required to user login to add add friend, follow and send private message just like this Link . there is any way to do this in buddypress.

    #167291

    In reply to: Creating New Plugins

    bp-help
    Participant

    @modemlooper
    This is what I am adding in the loader.php per your advice. I hope it looks good. I have tested it and I get the effect I want so thank you for the advice.

    
    /*** Make sure BuddyPress is loaded ********************************/
    function private_community_for_bp_lite_bp_check() {
        if ( !class_exists( 'BuddyPress' ) ) {
    	add_action( 'admin_notices', 'private_community_for_bp_lite_install_buddypress_notice' );
        }
    }
    
    function private_community_for_bp_lite_install_buddypress_notice() {
    	echo '<div id="message" class="error fade"><p style="line-height: 150%">';
    	_e('<strong>Private Community For BP Lite</strong></a> requires the BuddyPress plugin to work. Please <a href="https://buddypress.org/download">install BuddyPress</a> first, or <a href="plugins.php">deactivate Private Community For BP Lite</a>.');
    	echo '</p></div>';
    }
    
    function private_community_for_bp_lite_init() {
    	require( dirname( __FILE__ ) . '/private-community-for-bp-lite.php' );
    }
    
    add_action('plugins_loaded', 'private_community_for_bp_lite_bp_check', 999);
    add_action( 'bp_include', 'private_community_for_bp_lite_init' );
    
    #167280
    Henry
    Member

    If you add this to your theme’s functions.php it will basically filter the entire button. You’ll then be free to modify whatever you need:

    //filter group button
    function bp_change_group_button( $button ) {
    
    global $groups_template;
    
    		if ( empty( $group ) )
    			$group =& $groups_template->group;
    
    		if ( !is_user_logged_in() || bp_group_is_user_banned( $group ) )
    			return false;
    
    		// Group creation was not completed or status is unknown
    		if ( !$group->status )
    			return false;
    
    		// Already a member
    		if ( isset( $group->is_member ) && $group->is_member ) {
    
    			// Stop sole admins from abandoning their group
    	 		$group_admins = groups_get_group_admins( $group->id );
    		 	if ( 1 == count( $group_admins ) && $group_admins[0]->user_id == bp_loggedin_user_id() )
    				return false;
    
    			$button = array(
    				'id'                => 'leave_group',
    				'component'         => 'groups',
    				'must_be_logged_in' => true,
    				'block_self'        => false,
    				'wrapper_class'     => 'group-button ' . $group->status,
    				'wrapper_id'        => 'groupbutton-' . $group->id,
    				'link_href'         => wp_nonce_url( bp_get_group_permalink( $group ) . 'leave-group', 'groups_leave_group' ),
    				'link_text'         => __( 'Leave Group', 'buddypress' ),
    				'link_title'        => __( 'Leave Group', 'buddypress' ),
    				'link_class'        => 'group-button leave-group',
    			);
    
    		// Not a member
    		} else {
    
    			// Show different buttons based on group status
    			switch ( $group->status ) {
    				case 'hidden' :
    					return false;
    					break;
    
    				case 'public':
    					$button = array(
    						'id'                => 'join_group',
    						'component'         => 'groups',
    						'must_be_logged_in' => true,
    						'block_self'        => false,
    						'wrapper_class'     => 'group-button ' . $group->status,
    						'wrapper_id'        => 'groupbutton-' . $group->id,
    						'link_href'         => wp_nonce_url( bp_get_group_permalink( $group ) . 'join', 'groups_join_group' ),
    						'link_text'         => __( 'Join Group', 'buddypress' ),
    						'link_title'        => __( 'Join Group', 'buddypress' ),
    						'link_class'        => 'group-button join-group',
    					);
    					break;
    
    				case 'private' :
    
    					// Member has not requested membership yet
    					if ( !bp_group_has_requested_membership( $group ) ) {
    						$button = array(
    							'id'                => 'request_membership',
    							'component'         => 'groups',
    							'must_be_logged_in' => true,
    							'block_self'        => false,
    							'wrapper_class'     => 'group-button ' . $group->status,
    							'wrapper_id'        => 'groupbutton-' . $group->id,
    							'link_href'         => wp_nonce_url( bp_get_group_permalink( $group ) . 'request-membership', 'groups_request_membership' ),
    							'link_text'         => __( 'Request Membership', 'buddypress' ),
    							'link_title'        => __( 'Request Membership', 'buddypress' ),
    							'link_class'        => 'group-button request-membership',
    						);
    
    					// Member has requested membership already
    					} else {
    						$button = array(
    							'id'                => 'membership_requested',
    							'component'         => 'groups',
    							'must_be_logged_in' => true,
    							'block_self'        => false,
    							'wrapper_class'     => 'group-button pending ' . $group->status,
    							'wrapper_id'        => 'groupbutton-' . $group->id,
    							'link_href'         => bp_get_group_permalink( $group ),
    							'link_text'         => __( 'Request Sent', 'buddypress' ),
    							'link_title'        => __( 'Request Sent', 'buddypress' ),
    							'link_class'        => 'group-button pending membership-requested',
    						);
    					}
    
    					break;
    			}
    		}
    
    		return $button;
    
    }
    add_filter( 'bp_get_group_join_button', 'bp_change_group_button' );
    #167243
    bp-help
    Participant

    @darrenmeehan
    Alright, then I will test it out and supply feedback. I have a plugin as well that has been submitted to the repo in the last 4 days that is yet to be approved but I could also use some others testing and supplying feedback. You can get it here: https://github.com/bphelp/private_community_for_bp_lite
    Thanks!

    #167232

    In reply to: Creating New Plugins

    bp-help
    Participant

    @modemlooper
    I have tested the plugin:
    https://github.com/bphelp/private_community_for_bp_lite
    As is it works as expected. If BuddyPress is installed and activated then the notice does not appear, however if you try installing the plugin without BuddyPress installed and activated then the notice appears. Can you test it so you will see what I mean because it simply works!

    #167211

    In reply to: Creating New Plugins

    modemlooper
    Moderator

    Actually just wrap notice check in if class because bp_include won’t run if bp isn’t active.

    add_action( ‘bp_include’, ‘private_community_for_bp_lite_init’ );

    function private_community_for_bp_lite_bp_check() {
        if ( !class_exists( 'BuddyPress' ) ) {
    	add_action( 'admin_notices', 'private_community_for_bp_lite_install_buddypress_notice' );
        }
    }
    add_action('plugins_loaded', 'private_community_for_bp_lite_bp_check', 999);
    #167173

    In reply to: Creating New Plugins

    bp-help
    Participant

    @modemlooper
    What extra file? Are you referring to the loader.php? If that is the case then the example you provided above makes no sense. Why would I require private-community-for-bp-lite.php? Are you suggesting I do away with the loader.php and add the example you provided in the main plugins private-community-for-bp-lite.php file as well as the required plugin header info or am I missing something? This is different than my usual workflow so it seems strange to me. I guess you can require a file from within a file but doesn’t it seem redundant? I really do not see what difference it makes. The plugin works as expected either way. So the hold up with the review panel is kinda tedious. Is this some new way of streamlining plugins for consistency or am I missing something that is required? To me it seems any advantages to this approach you offered are negligible and it apparently still has not made any difference in the approval status. Keep in mind this is the first plugin I have released to the WP repo because I am still new to adding the admin settings but what I have works so far and saves the settings to the database so I don’t see what the problem is! Thanks again!

    #167159

    In reply to: Creating New Plugins

    modemlooper
    Moderator
    /*** Make sure BuddyPress is loaded ********************************/
    if ( class_exists( 'BuddyPress' ) ) {
    	add_action( 'bp_include', 'private_community_for_bp_lite_init' );
    } else {
    	add_action( 'admin_notices', 'private_community_for_bp_lite_install_buddypress_notice' );
    }
    
    function private_community_for_bp_lite_init() {
    	require( dirname( __FILE__ ) . '/private-community-for-bp-lite.php' );
    }
    
    function private_community_for_bp_lite_install_buddypress_notice() {
    	echo '<div id="message" class="error fade"><p style="line-height: 150%">';
    	_e('<strong>Private Community For BP Lite</strong></a> requires the BuddyPress plugin to work. Please <a href="https://buddypress.org/download">install BuddyPress</a> first, or <a href="plugins.php">deactivate Private Community For BP Lite</a>.');
    	echo '</p></div>';
    }
    #167154
    Henry
    Member

    @kizmark

    I’m still scratching my head with this one. It must be my install playing games. In the end I got it working with

    Anyway I thought why not just build the link and throw it directly in the friends template?

    #167153

    In reply to: Creating New Plugins

    bp-help
    Participant

    @hnla @mercime @modemlooper
    I agree there needs sorting out and consistency in how to check for BP etc.
    I just got an email from Mika E one of the plugin reviewers and she says

    But … why?

    BuddyPress has loader actions you can hook into: https://plugins.trac.wordpress.org/browser/buddypress/trunk/bp-core/bp-core-actions.php#L34

    (I’m sitting next to JJJ right now and he pointed this out). So you don’t have to call loader.php, which is slower in the long run, and instead you hook into BP at the appropriate point.

    The whole thing it looks like you’re doing is adding this action:

    add_action( ‘admin_notices’, ‘private_community_for_bp_lite_install_buddypress_notice’ );

    And you want to only add that notice IF BuddyPress is loaded, right? So why not the smaller check? If you do that, you won’t have to call bp-loader, because you’re hooking in after it’s loaded.

    Why would I want my install buddypress notice to display if they have buddypress installed and the requirement for BP is met? That makes no sense. Right now it is setup to display only if someone using wordpress does not have BP installed and activated which is what it does and should do correct?
    I don’t get it! Any of you guys have advice?
    Thanks again!

    #167113
    shanebp
    Moderator

    Messages send is okay.
    Just sent to kizmark and oz_admin

    You have to use the correct name: kiz mark will fail.

    #167112
    kizmark
    Participant

    BP 1.7
    WP 3.5

    URL: http://testbed.offsourcing.us/zqgame/members/demo/messages/compose/
    admin : offsourcing

    login:

    demo:demo

    What might be wrong or missing with this, Can’t even send a message. And also I’m having trouble displaying the “send private message” button. How will I do that?>

    #167111
    kizmark
    Participant

    @Henry, Did you got it solved?

    I’m having the same question.. I want to get the link to have a send private message button

    crashy11
    Participant

    Hello,

    I got one question, I integrated S2 member plugin with buddypress, but I got one problem. I have different types of membership levels (example: level 1, level 2, level 3), when I make post from admin account or another account that I created (editor) every membership level see that post in activity, even level subscribers which are not paid level. If I hide Activity page in general, then they can go on author’s profile and see activity there. If I disable Activity component then it is disabled everywhere even in private groups for that level 1, 2, 3 members.

    So is there way to not show activity from certain account from which I am making posts that only one level should see.

    If I make post for level 2 members for example, then membership levels 2 and 3 should see it.

    If I make post for members on level 3, then only members of level 3 should see it on activity stream.

    If I make post for members on level 1, then members from level 2 and 3 need to see it also.

    Does anyone know how that make that without disabling activity stream component. It would be the best just not to show posts on activity stream from that account that I am making posts, if it is possible to make that.

    Making a url restriction in s2 members doesn’t make sense.

    Thank You and Best regards

    #167081
    bp-help
    Participant

    I usually only give out help but now I need some advice from real BP developers. I don’t intend to sound like I do not appreciate others advice but this is strictly geared more for real BP developers. Anyways on with my question. I have a plugin I submitted to the repository you can examine it here:
    https://github.com/bphelp/private_community_for_bp_lite
    I got a email reply that told me “you should do this” to check if BuddyPress is loaded along with this link:
    http://codex.buddypress.org/developer/plugin-development/checking-buddypress-is-active/

    My issue is I already added that check to the plugins loader.php and I have tested it and it works as expected on my dev server.

    The interesting thing I have noticed is that not only my plugin but @modemlooper ‘s plugins, @imath ‘s plugins, and @sbrajesh ‘s plugins and multiple other revered plugin developers plugins can be installed and activated without any notice given when BP is not even installed. Tested with a plain WP 3.5.2 install with the twenty thirteen theme so what gives? Apparently we all have missed something, or is that email more of an automated email that anyone who tags their plugin with BuddyPress gets? Thanks!

    #167046
    bp-help
    Participant

    @synaptic
    Still waiting for the plugin review before I move it over to the repo but until then you can get it here.
    https://github.com/bphelp/private_community_for_bp_lite

    #167042
    modemlooper
    Moderator

    Don’t think that exists but sounds like a good plugin.

Viewing 25 results - 2,276 through 2,300 (of 5,233 total)
Skip to toolbar