Forum Replies Created
-
In reply to: Struggling with Group Invites
The ajax isn’t working, when creating a group and choosing a friend to invite to a group. The main column never gets populated.
In reply to: Struggling with Group Invites@henrywright sorry, I was in a bit of a huff earlier on.
1)
When creating a group it goes to the stepcreate/step/group-invitesin the url, I’m then given a list of friends, I select 1, 2 or more but nothing happens. I don’t know if this is intended, the kicker here is that there is no “Finish” button, it’s removed.I set a height in CSS of the submit buttons, my mistake. I’ll push on and see how this turns out, there is a number 2 for invites and that’s under the manage area but I’ll come back.
Can mark this as resolved due to user error.
In reply to: override bp_show_blog_signup_form()@henrywright this didn’t work, when the form is submitted the original function is run or something along those lines meaning my custom function call with custom markup output was being made redundant.
I’ve returned to using
bp_show_blog_signup_form(). It’s not ideal but hopeful the new templates will allow for a better experience.In reply to: Poor Avatar qualityYou may have to go into the template files that call the avatars for example member-header.php or group-header.php or entry.php and change the values like this
<?php bp_activity_avatar('width=40&height=40'); ?>In reply to: Struggling with Group InvitesThanks for reply, doesn’t matter. I’ve given up once again with BuddyPress, I’ll take a look back when nouveau comes out.
In reply to: Struggling with Group Invitesmy-theme/buddypress/groups/create.php
<?php if(bp_is_group_creation_step('group-invites')) : ?> <?php do_action('bp_before_group_invites_creation_step'); ?> <?php if(bp_is_active('friends') && bp_get_total_friend_count(bp_loggedin_user_id())) : ?> <div class="left-menu"> <div id="invite-list"> <ul> <?php bp_new_group_invite_friend_list(); ?> </ul> <?php wp_nonce_field('groups_invite_uninvite_user', '_wpnonce_invite_uninvite_user'); ?> </div> </div><!-- LEFT --> <div class="main-column"> <div id="message" class="info"> <p><?php _e('Select people to invite from your friends list.', 'buddypress'); ?></p> </div> <ul id="friend-list" class="item-list"> <?php if(bp_group_has_invites()) : ?> <?php while(bp_group_invites()) : bp_group_the_invite(); ?> <li id="<?php bp_group_invite_item_id(); ?>"> <?php bp_group_invite_user_avatar(); ?> <h4><?php bp_group_invite_user_link(); ?></h4> <span class="activity"><?php bp_group_invite_user_last_active(); ?></span> <div class="action"> <a class="remove" href="<?php bp_group_invite_user_remove_invite_url(); ?>" id="<?php bp_group_invite_item_id(); ?>"><?php _e('Remove Invite', 'buddypress'); ?></a> </div> </li> <?php endwhile; ?> <?php wp_nonce_field('groups_send_invites', '_wpnonce_send_invites'); ?> <?php endif; ?> </ul> </div><!-- MAIN --> <?php else : ?> <div id="message" class="info"> <p><?php _e('Once you have built up friend connections you will be able to invite others to your group.', 'buddypress'); ?></p> </div> <?php endif; ?> <?php wp_nonce_field('groups_create_save_group-invites'); ?> <?php do_action('bp_after_group_invites_creation_step'); ?> <?php endif; ?>my-theme/buddypress/groups/single/send-invites.php
<?php /** * BuddyPress - Groups Send Invites * * @package BuddyPress * @subpackage bp-legacy */ /** * Fires before the send invites content. * * @since 1.1.0 */ do_action( 'bp_before_group_send_invites_content' ); ?> <?php /* Does the user have friends that could be invited to the group? */ if ( bp_get_new_group_invite_friend_list() ) : ?> <?php /* 'send-invite-form' is important for AJAX support */ ?> <form action="<?php bp_group_send_invite_form_action(); ?>" method="post" id="send-invite-form" class="standard-form"> <div class="invite"> <?php bp_get_template_part( 'groups/single/invites-loop' ); ?> </div> <div class="submit"> <input type="submit" name="submit" id="submit" value="<?php esc_attr_e( 'Send Invites', 'buddypress' ); ?>" /> </div> <?php wp_nonce_field( 'groups_send_invites', '_wpnonce_send_invites' ); ?> <?php /* This is important, don't forget it */ ?> <input type="hidden" name="group_id" id="group_id" value="<?php bp_group_id(); ?>" /> </form><!-- #send-invite-form --> <?php /* No eligible friends? Maybe the user doesn't have any friends yet. */ elseif ( 0 == bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?> <div id="message" class="info"> <p class="notice"><?php _e( 'Group invitations can only be extended to friends.', 'buddypress' ); ?></p> <p class="message-body"><?php _e( "Once you've made some friendships, you'll be able to invite those members to this group.", 'buddypress' ); ?></p> </div> <?php /* The user does have friends, but none are eligible to be invited to this group. */ else : ?> <div id="message" class="info"> <p class="notice"><?php _e( 'All of your friends already belong to this group.', 'buddypress' ); ?></p> </div> <?php endif; ?> <?php /** * Fires after the send invites content. * * @since 1.2.0 */ do_action( 'bp_after_group_send_invites_content' ); ?>In reply to: Incorrect all member number countI’ve never done this but you’re going to have to modify your database either completely manually or write some PHP to do this.
You’ll be looking in both the
wp_signupstable and also thewp_users.I’m not sure if they are both relevant but if you look at your users and the current situation you should be able to figure it out.
Be careful though, take a DB dump if you’re not sure what you’re doing.
In reply to: WP theme support for sidebar.phpsidebar.php files should be placed in the root if you are using
get_sidebar('name');Otherwise you can load them withlocate_template();This will also point to the theme root, and not the BuddyPress root which is located atyour-theme/buddypress. You can go straight to BuddyPress root in your child-theme by usingbp_get_template_part()You just gotta know where and when to use each one.In reply to: Incorrect all member number countHave you tried wp-admin/tools/buddypress then “re-count member totals”?
If you look at wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/activity/index.php That’s the template you need to edit in order to change that text.Inside
wp-content/themes/your-theme/Make a file calledbuddypress.php. In that file add the following…<?php get_header(); ?> <?php the_post(); the_content(); ?> <?php get_footer(); ?>By default BuddyPress will use a file located in your theme that currently exists, something like
page.phpas you can read about here.By creating a
buddypress.phpwe’re telling BuddyPress to use a custom template loader for all BuddyPress pages and components. Inside that file (buddypress.php) you can do anything you like for the “wrapper” around your BuddyPress stuff. In the code example above forbuddypress.phpwe’re grabbing the content but not bringing in things like<?php the_title(); ?>like you will find in a typicalpage.phpthat most WordPress themes will have.This will remove ALL page titles from BuddyPress pages, as you now have a custom “wrapper” for those areas the plugin will use.
If you wish to remove the title on a per page basis you may simply want to do a CSS solution and do target the
bodytag with CSS and then any suitable elements in the HTML. This means you could do something like…body.activity.directory div.page-inner h2 { display: none; }If you don’t want to do a CSS solution you can then look into component detection.
Hope that helps.
In reply to: Get users using specific profile fieldYou’re going into a pretty complicated MySQL query.
$field_id = SELECT id FROM wp_bp_xprofile_fields WHERE name = Profile Field$users = SELECT DISTINCT user_id FROM wp_bp_xprofile_data WHERE value = enterprise AND field_id = $field_idThen you’re gonna be implementing a foreach loop in PHP.
That’s the approach I would take, it’s quite in-depth and I’m working on something else at the moment but hopefully that gives you an idea of where to look.