Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 20,101 through 20,125 (of 68,967 total)
  • Author
    Search Results
  • #167342
    designweb
    Participant

    but it’s not working in member-header. is there any thing wrong in my code:

    <div id="item-buttons">
    <?php 
           if ( is_user_logged_in() ) { 
           do_action( 'bp_member_header_actions' );
           } else { 
           do_action( 'bp_member_header_actions' );
           } 
    ?>
    			
    
    		</div><!-- #item-buttons -->
    #167341
    Henry
    Member

    @maan18

    it should work, I have used this approach many times.

    #167340
    designweb
    Participant

    not working.

    #167339
    Henry
    Member

    @maan18

    I’m not sure what you’re asking exactly but take a look at this:

    <?php 
           if ( is_user_logged_in() ) { 
           // whatever you put here will be displayed if the user is logged in
           } else { 
           // whatever you put here will be displayed when logged out
           } 
    ?>
    #167338
    designweb
    Participant

    @henrywright-1 i need show button only but when user click on any button it required to login or Register to add or send message. same as like this theme Link

    #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

    #167329
    bp-help
    Participant
    nathandboyd
    Participant

    Although this is listed as Resolved, I will still post a reply. I had the exact same issue, and decided to try adding “www.” to the front of the URL in the WordPress address bar (instead of simply http://mysite.com) under General Settings. That fixed the issue immediately.

    #167322
    hkcharlie
    Participant

    Buddypress is fine, it’s everything else we have plugged into it that I worry about.

    #167319
    @mercime
    Participant

    @mgrmn the reverse of BP plugin, Blog Categories for Groups http://buddydev.com/buddypress/blog-categories-for-groups-plugin/

    #167292
    daol9999
    Participant

    Hi Henry,

    I’m using WordPress TwentyTwelve theme with the BuddyPress Template pack add on. Reason being that the design provided by our graphic designer was closer to Twenty Twelve than it was for BP default theme. I appreciate that your going to say should have gone with / switch to the BP default theme, but we are 90% through this project now with this one issue outstanding so that will not be possible.

    Thanks for your help…

    #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' );
    
    #167289
    @mercime
    Participant

    @mewrd you cannot bypass dealing directly with PHP files to customize some or all of your BP pages. Basically BP pages are rendered via the theme’s default page.php file.

    i have tried to remove `<?php get_sidebar( ‘buddypress’ ); ?> from them -didnt help

    What theme are you using? If you’re using a child theme of the BP Default theme, then that would work on the file you copied over from BP Default theme into your child theme’s folder in server.

    However, if you’re using a WordPress theme with BP Theme Compatibility, for BP 1.7 per link hnla gave above you’re limited to customizing the HTML structure wrapping the BP templates to all templates or not at all (see last paragraph). Full customization of HTML wrappers (like removing sidebar for the Members pages only) is possible come BP 1.8 https://codex.buddypress.org/developer/theme-development/template-hierarchy/

    #167286
    @mercime
    Participant
    #167283

    In reply to: too many redirects

    @mercime
    Participant

    @mewrd could be plugin or theme issues. Have you done basic troubleshooting like changing to Twenty Twelve theme and deactivating all plugins except BuddyPress?

    #167282
    @mercime
    Participant

    @reiniggen if you’re on BP Default theme and you’ve deactivated all plugins except BuddyPress, and the issue is still evident, then please post ticket in BP Trac (login with same username and password used here) and include pertinent information about your installation – e.g. single or multisite WP, WP/BP installed in domain root or subsite, etc. Thank you. https://buddypress.trac.wordpress.org/newticket

    #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' );
    #167279
    Garrett Reiniggen
    Participant

    Once upon a time there was a little bug in BuddyPress…

    #167275
    gcarlos8377
    Participant

    @djpaul

    Thanks for your reply on this post. But actually I didn’t do anything else but to upgrade the version from 1.7 to 1.7.2. Any suggestion on what I should try? I tried to find something to downgrade the version but no success on that.

    Thanks for the support

    #167270
    Paul Wong-Gibbs
    Keymaster

    We didn’t change anything with regards to loading translations in BP 1.7-1.7.2, so something else on your site must have changed.

    #167268
    Paul Wong-Gibbs
    Keymaster

    > But as usual, slightly terrified at the same time, since usually we all know something isn’t going to work after the upgrade.

    I don’t think this is true, especially since the 1.5+ releases. BuddyPress is rock-solid nowadays.

    #167266
    darrenmeehan
    Participant

    @bphelp thanks, I’ve forked your plugin and installed it, will test it out and get back to you once I finish some work.


    @deafnation
    thanks for testing it out! What exactly happened? did anything work? What theme were you using?

    #167264
    deafnation
    Participant

    @darrenmeehan

    The plugin is not working on my end. I need to look into other plugins conflicted or not. Keep it up anyway!

Viewing 25 results - 20,101 through 20,125 (of 68,967 total)
Skip to toolbar