Skip to:
Content
Pages
Categories
Search
Top
Bottom

Ajax of Send Invites displays 0


  • m1000
    Participant

    @m1000

    Hi,

    When go to Sent Invites tab, select some friend then below tabs is displayed 0 only. All other ajax actions like messages, add friends works fine. I enabled debug mode, no errors.

    I have the same code in send-invites.php like default theme:

    <?php 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" role="main">
     
                    <div class="invite">
                            <?php bp_get_template_part( 'groups/single/invites-loop' ); ?>
                    </div>
     
                    <?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 do_action( 'bp_after_group_send_invites_content' ); ?>

    invites-loop.php:

    <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-menu -->
     
    <div class="main-column">
     
            <?php do_action( 'bp_before_group_send_invites_list' ); ?>
     
            <?php if ( bp_group_has_invites( bp_ajax_querystring( 'invite' ) . '&per_page=10' ) ) : ?>
     
                    <div id="pag-top" class="pagination">
     
                            <div class="pag-count" id="group-invite-count-top">
     
                                    <?php bp_group_invite_pagination_count(); ?>
     
                            </div>
     
                            <div class="pagination-links" id="group-invite-pag-top">
     
                                    <?php bp_group_invite_pagination_links(); ?>
     
                            </div>
     
                    </div>
     
                    <?php /* The ID 'friend-list' is important for AJAX support. */ ?>
                    <ul id="friend-list" class="item-list">
     
                    <?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>
     
                                    <?php do_action( 'bp_group_send_invites_item' ); ?>
     
                                    <div class="action">
                                            <a class="button remove" href="<?php bp_group_invite_user_remove_invite_url(); ?>" id="<?php bp_group_invite_item_id(); ?>"><?php _e( 'Remove Invite', 'buddypress' ); ?></a>
     
                                            <?php do_action( 'bp_group_send_invites_item_action' ); ?>
                                    </div>
                            </li>
     
                    <?php endwhile; ?>
     
                    </ul><!-- #friend-list -->
     
                    <div id="pag-bottom" class="pagination">
     
                            <div class="pag-count" id="group-invite-count-bottom">
     
                                    <?php bp_group_invite_pagination_count(); ?>
     
                            </div>
     
                            <div class="pagination-links" id="group-invite-pag-bottom">
     
                                    <?php bp_group_invite_pagination_links(); ?>
     
                            </div>
     
                    </div>
     
            <?php else : ?>
     
                    <div id="message" class="info">
                            <p><?php _e( 'Select friends to invite.', 'buddypress' ); ?></p>
                    </div>
     
            <?php endif; ?>
     
    <?php do_action( 'bp_after_group_send_invites_list' ); ?>
     
    </div><!-- .main-column -->
     
    <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

    // Groups
    'groups_invite_user' => 'bp_legacy_theme_ajax_invite_user',
    'joinleave_group' => 'bp_legacy_theme_ajax_joinleave_group',

    http://pastebin.com/GybF2F5s

    AJAX
    http://pastebin.com/3Np10jnx

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Ajax of Send Invites displays 0’ is closed to new replies.
Skip to toolbar