Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'buddypress'

Viewing 25 results - 17,376 through 17,400 (of 69,106 total)
  • Author
    Search Results
  • #179562
    Henry Wright
    Moderator

    If you have links like this example.com/members/username then root profiles are disabled. If you have this example.com/username then root profiles are enabled.

    Try this:

    function my_filter( $query = false, $object = false ) {
        if ( ! is_page( 'office' ) )
            return $query;
    
        $users = get_users( 'role=YOUR-ROLE-TO-EXCLUDE' );
    
        $exclude = implode( ',', $users );
     
        if ( $object != 'members' )
            return $query;
    
        $args = wp_parse_args( $query );
    
        if ( ! empty( $args['user_id'] ) )
            return $query;
    
        if ( !empty( $args['exclude'] ) )
            $args['exclude'] = $args['exclude'] . ',' . $exclude;
    
        else
            $args['exclude'] = $exclude;
    
        $query = build_query( $args );
    
        return $query;
    
    }
    add_filter( 'bp_ajax_querystring', 'my_filter', 20, 2 );

    Note: Change YOUR-ROLE-TO-EXCLUDE to the role you want to exclude. i.e. Author

    Adapted from here:

    Exclude Users from Members directory on a BuddyPress based social network

    #179553
    landwire
    Participant

    Henry, would just like your thought on the following.
    I went down a different route with the above, not sure if that is recommended though:

    I created a shortcode like so, basically putting the whole new office-index.php into it. Then just put the shortcode into a page called “office” and it looks great out of the box – all formatting etc intact!

    See: http://2013d.landwire.net/office/

    You can compare all three now. There still all live.

    Do you think it’s ok to do it like that?

    function lw_office_directory( $atts ) {
    	 do_action( 'bp_before_directory_members_page' ); ?>
    
    <div id="buddypress">
    
    	<?php do_action( 'bp_before_directory_members' ); ?>
    
    	<?php do_action( 'bp_before_directory_members_content' ); ?>
    
    	<div id="members-dir-search" class="dir-search" role="search">
    		<?php bp_directory_members_search_form(); ?>
    	</div><!-- #members-dir-search -->
    
    	<?php do_action( 'bp_before_directory_members_tabs' ); ?>
    
    	<form action="" method="post" id="members-directory-form" class="dir-form">
    
    		<div class="item-list-tabs" role="navigation">
    			<ul>
    				<li class="selected" id="members-all"><a href="<?php bp_members_directory_permalink(); ?>"><?php printf( __( 'All Members', 'buddypress' )); ?></a></li>
    
    				<?php if ( is_user_logged_in() && bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
    					<li id="members-personal"><a href="<?php echo bp_loggedin_user_domain() . bp_get_friends_slug() . '/my-friends/'; ?>"><?php printf( __( 'My Friends <span>%s</span>', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?></a></li>
    				<?php endif; ?>
    
    				<?php do_action( 'bp_members_directory_member_types' ); ?>
    
    			</ul>
    		</div><!-- .item-list-tabs -->
    
    		<div class="item-list-tabs" id="subnav" role="navigation">
    			<ul>
    				<?php do_action( 'bp_members_directory_member_sub_types' ); ?>
    
    				<li id="members-order-select" class="last filter">
    					<label for="members-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
    					<select id="members-order-by">
    						<option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
    						<option value="newest"><?php _e( 'Newest Registered', 'buddypress' ); ?></option>
    
    						<?php if ( bp_is_active( 'xprofile' ) ) : ?>
    							<option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
    						<?php endif; ?>
    
    						<?php do_action( 'bp_members_directory_order_options' ); ?>
    					</select>
    				</li>
    			</ul>
    		</div>
    
    		<div id="members-dir-list" class="members dir-list">
    			<?php bp_get_template_part( 'members/offices/offices-loop' ); ?>
    		</div><!-- #members-dir-list -->
    
    		<?php do_action( 'bp_directory_members_content' ); ?>
    
    		<?php wp_nonce_field( 'directory_members', '_wpnonce-member-filter' ); ?>
    
    		<?php do_action( 'bp_after_directory_members_content' ); ?>
    
    	</form><!-- #members-directory-form -->
    
    	<?php do_action( 'bp_after_directory_members' ); ?>
    
    </div><!-- #buddypress -->
    
    <?php do_action( 'bp_after_directory_members_page' );
    }
    add_shortcode('lw_office_directory', 'lw_office_directory');
    #179550
    Henry Wright
    Moderator

    I think some of the visual differences could be due to CSS. Fundamentally each of these are different. Take the offices-index template for example. If you view the source you’ll see the body classes:

    page page-id-1100 page-template-default masthead-fixed full-width singular no-js

    Where as if you view the source of the members directory you should see body classes

    directory members buddypress masthead-fixed full-width singular no-js

    If the theme you’re using makes use of the body class when styling body.page { // styles ... } then that could be why it looks different?

    #179548
    landwire
    Participant

    That works ok now. I basically used the page.php template and replaced the whole loop with the page-office-loop.php file contents and saved that as page-office-loop.php. Does still not look like the members page though.

    Maybe take a look if you have a minute. One also shows up a search box while the other does not. Strange. I did NOT use <?php get_footer( ‘buddypress’ ); ?> or <?php get_header( ‘buddypress’ ); ?> as the page template already loads some header/footer.

    Modified: http://2013d.landwire.net/offices-index/
    Original – though I took members count out of tab: http://2013d.landwire.net/members/
    S

    #179546
    Henry Wright
    Moderator

    You’ll need to add your BuddyPress header and footer to the page-office-loop.php file. For example:

    <?php get_header( 'buddypress' ); ?>
    
    <!-- bits and bobs here -->
    
    <?php get_footer( 'buddypress' ); ?>
    #179545
    landwire
    Participant

    Hmm, that works the same as the page template approach I made earlier.

    The display is rather blank though, no footer/header etc. And I had a typo before in my code, so your approach highlighted that mistake!

    Is there a way that I could just use a standard template and “inject” the buddypress members content there. Basically just like a copy and paste of the page-offices-loop.php into the wordpress text editor?

    Sascha

    #179542
    Fuzzielogix
    Participant

    I am receiving mails from other sources i.e mail clients , gmail etc to the mail address, so still unsure whether it’s a wordpress/buddypress issue or server side issue ….

    #179535
    @mercime
    Participant

    @fuzzielogix Have you checked if registration works if BP is deactivated? If it still doesn’t work, then you need to resolve the issue with your hosting. It registration works with BP deactivated, then check out how to resolve the issue in the email section at https://codex.buddypress.org/legacy/faq/

    @mercime
    Participant

    @simple-man BP’s default style for the Member and Group widget avatars have been superseded by your theme’s style where it changed the avatar’s width to auto in one area and in another area, changed it to max-width: 100%. You can add the following to the stylesheet of your child theme

    .widget.buddypress ul.item-list img.avatar {
    width: 20px;
    }
    #179533
    thom7000
    Participant

    Hi Thanks for the response I have done this but when I re-install buddypress the old settings still show up how do i change to default everything??

    #179532
    @mercime
    Participant
    #179519
    BuddyBoss
    Participant
    #179518
    BuddyBoss
    Participant

    I would suggest checking out this BuddyPress ticket:
    https://buddypress.trac.wordpress.org/ticket/5140

    That’s likely the cause. This bug has been documented.

    #179517
    BuddyBoss
    Participant

    Need to build a site for 1000+ members with profile pages. Imagine a company where each salesman has their own page. The profile pages will allow them to post information, links, videos, etc. on a single page with their own url off the site.

    BuddyPress could be used for this, with some customizing. You’ll have to elaborate on what you mean by “with their own url off the site”.

    I also need logged in members to have access to other areas of the site based on their membership level.

    A membership plugin will be necessary for this.

    Need this to be responsive, and I need to be able to style.

    That all comes down to the theme you pick. Whether you use BuddyPress or a membership plugin or neither makes very little difference. Responsive layout is all determined by the theme.

    BuddyBoss
    Participant

    A 404 error is when the server cannot access a link. Usually a broken or dead link. WordPress uses “pretty permalinks” which basically means it creates virtual links for your site using a structure that you assign to it. If this system is messed up you may get 404 errors all over the place.

    First idea: Go to Settings > Permalinks and set the Permalinks to default. Test your site, and then set Permalinks back to whatever custom structure you had set up. Might fix it.

    Second idea: Make sure you have a page assigned to each BuddyPress component, at Settings > BuddyPress. If not, WordPress may not know where to access the BuddyPress pages and may return 404 errors.

    #179515
    BuddyBoss
    Participant

    Look in your themes for the template file:

    wp-content/themes/[theme-name]/buddypress/members/single/home.php

    If that exists, and is from an older theme, look for a “notification” section in there. If it’s missing this will break the loading of your notifications page.

    In this section:

    do_action( 'bp_before_member_body' );

    After this line:

    elseif ( bp_is_user_forums() ) : bp_get_template_part( 'members/single/forums' );

    Add:

    elseif ( function_exists('bp_is_user_notifications') && bp_is_user_notifications() ) : bp_get_template_part( 'members/single/notifications' );

    That allows the profile to load the notification template.

    iameverywhere
    Participant

    Just a heads up, because I know a lot of people have asked and not gotten anywhere, but you can use this feature + Buddypress Xprofile Custom Fields Type plugin to create a forum badges feature. That was my goal with this and it works. You just need to display:none; the field# class so that users dont see it as an option to edit in their profile. Then you have complete control and can give users badges that show up in the forums 😀

    *flys away*

    #179509

    In reply to: 3rd Sized Avatar

    darqpony
    Participant

    Yes! that! Since I know so little about php coding, I didn’t know WHAT to do instead of the choice it gave me or where to look.

    1. I understand about the upgrade will overwrite thing. If I put this bit of code in my bpcustom.php file, will it override the original “$avatar_size = ( ‘full’ == $type ) ? ‘-bpfull’ : ‘-bpthumb;” or do I have to somehow negate that first in the bpcustom file?

    2. I have this in the bp_core_fetch_avatar:

    function bp_core_fetch_avatar( $args = '' ) {
    
    	// If avatars are disabled for the root site, obey that request and bail
    	if ( ! buddypress()->avatar->show_avatars )
    		return;
    
    	global $current_blog;
    
    	$bp = buddypress();
    
    	// Set a few default variables
    	$def_object = 'user';
    	$def_type   = 'thumb';
    	$def_class  = 'avatar';
    
    	// Set the default variables array
    	$params = wp_parse_args( $args, array(
    		'item_id'    => false,
    		'object'     => $def_object, // user/group/blog/custom type (if you use filters)
    		'type'       => $def_type,   // tinythumb, thumb or full
    		'avatar_dir' => false,       // Specify a custom avatar directory for your object
    		'width'      => false,       // Custom width (int)
    		'height'     => false,       // Custom height (int)
    		'class'      => $def_class,  // Custom <img> class (string)
    		'css_id'     => false,       // Custom <img> ID (string)
    		'alt'        => '',    	     // Custom <img> alt (string)
    		'email'      => false,       // Pass the user email (for gravatar) to prevent querying the DB for it
    		'no_grav'    => false,       // If there is no avatar found, return false instead of a grav?
    		'html'       => true,        // Wrap the return img URL in <img />
    		'title'      => ''           // Custom <img> title (string)
    	) );
    	extract( $params, EXTR_SKIP );
    

    Where do I ‘pass’ thumb or full to it? Or is it already there in this original since I haven’t changed anything yet?

    3. If I change the bp_core_fetch_avatar, do I have to somehow change the first 1.’s solution?

    4. Should I post this on the other site you found my question on? LOL (Hey, I gave it two days before trying a different site! But got the same guy answering… go figure… LOL)

    … and yes, it did use the tinythumb type and it did make the thumb sized avatar fuzzy. I have an avatar for that size. I want it to use it! LOL I want to use ALL my avatars!

    #179505
    mcpeanut
    Participant

    @shanebp ty again shane, i still have not had the chance to try this, but im defo gonna get round to it in the next hour lol, so from reading that article i would make a buddypress folder in my twenty twelve child theme then add an activity folder inside it, then i should copy the activity-loop.php from the directory you specified. and then i would perform the edit you mentioned above? is this correct? just making sure im clear on what to do before doing it.

    or should i just copy the entire buddypress directory over from \bp-templates\bp-legacy\buddypress\ to my child theme before making the edit?

    i havent needed to do anything as of yet with buddypress template files you see as all other edits i have made have been in the functions.php and bp-custom.php

    #179503
    shanebp
    Moderator
    #179499
    mcpeanut
    Participant

    Hey @shanebp ty for your response, i have just woke up and read this and will be trying it in the next hour, i will update you on if this solved my problem or not.

    Create a template overload of this file:
    \bp-templates\bp-legacy\buddypress\activity\activity-loop.php

    i assume by this you mean copy this file over to my child twenty twelve theme and make the edits specified in there?

    #179497

    In reply to: 3rd Sized Avatar

    Henry Wright
    Moderator

    You’d change $avatar_size = ( ‘full’ == $type ) ? ‘-bpfull’ : ‘-bpthumb; to:

    if ($type == 'full' ) {
        $avatar_size = '-bpfull';
    } elseif ($type == 'thumb' ) {
        $avatar_size = '-bpthumb';
    } else {
        $avatar_size = '-bptinythumb';
    }

    But that approach wouldn’t be recommended because when you upgrade buddypress your changes will be lost.

    The tiny thumb will be the default avatar size. If you wanted to use the thumb or full versions then you’d need to pass thumb or full to bp_core_fetch_avatar

    #179496
    Craig
    Participant
    #179480
    shanebp
    Moderator

    > exclude creation of public groups and comments posted in them from displaying in the activity stream.

    Changing to $hide_sitewide will prevent it from appearing anywhere ( including the group activity stream ) except the activity stream for the person who created the item.

    You probably want items to appear in the group stream, so try this in bp-custom.php or your theme functions.php

    function remove_groups_from_activity( $activity ) { 
      if( $activity->component == 'groups' )
        $activity->hide_sitewide = true; 
    }
    add_action( 'bp_activity_before_save', 'remove_groups_from_activity', 1, 1); 

    Of course, this will only apply to new activity items.

    Then you need to ‘reveal’ those hidden items in a group stream…

    Create a template overload of this file:
    \bp-templates\bp-legacy\buddypress\activity\activity-loop.php

    Then before the loop, check if you’re viewing a group and if so, then change the
    bp_has_activities call to:

    if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . '&show_hidden=true') ) :

    The activity stream is quite flexible:

    Activity Loop

    mcpeanut
    Participant

    hi matthew, maybee you could you explain a little more?

    All my pages are messed up, the links are all screwy and bunch of other stuff.

    ive looked at your link and everything seems perfectly normal on the twenty fourteen theme, i notice you havent got buddypress installed?
    go to plugins and click add plugins and search for buddypress, then go to buddypress settings and tick what you will want to be using within your website, i would also suggest doing a search for rtmedia plugin for your photos. dunno if this helps as i cant see what you mean with all the links being screwy etc when buddypress isnt even installed?

Viewing 25 results - 17,376 through 17,400 (of 69,106 total)
Skip to toolbar