Skip to content

Commit cf7db95

Browse files
committed
buddypress template added in order to fix search issue
1 parent 7ac554d commit cf7db95

File tree

4 files changed

+337
-1
lines changed

4 files changed

+337
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
/**
3+
* Output the search form markup.
4+
*
5+
* @since 2.7.0
6+
* @version 3.0.0
7+
*/
8+
$search_value= (isset($_REQUEST['members_search'])) ? esc_attr($_REQUEST['members_search']) : '';
9+
?>
10+
11+
<div id="<?php echo esc_attr( bp_current_component() ); ?>-dir-search" class="dir-search" role="search">
12+
<form action="" method="get" id="search-<?php echo esc_attr( bp_current_component() ); ?>-form">
13+
<label for="<?php bp_search_input_name(); ?>" class="bp-screen-reader-text"><?php bp_search_placeholder(); ?></label>
14+
<input type="text" name="<?php echo esc_attr( bp_core_get_component_search_query_arg() ); ?>" value="<?php echo $search_value ?>" id="<?php bp_search_input_name(); ?>" placeholder="<?php bp_search_placeholder(); ?>" />
15+
16+
<input type="submit" id="<?php echo esc_attr( bp_get_search_input_name() ); ?>_submit" name="<?php bp_search_input_name(); ?>_submit" value="<?php esc_attr_e( 'Search', 'buddypress' ); ?>" />
17+
</form>
18+
</div><!-- #<?php echo esc_attr( bp_current_component() ); ?>-dir-search -->

themes/cc-commoners/buddypress/members-and-partners.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
* @since 1.1.0
4949
*/
5050
do_action( 'bp_before_directory_members_list' ); ?>
51-
51+
hola hola hola
5252
<div id="members-list" aria-live="assertive" aria-relevant="all">
5353

5454

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
<?php
2+
/**
3+
* BuddyPress - Members
4+
*
5+
* @package BuddyPress
6+
* @subpackage bp-legacy
7+
* @version 3.0.0
8+
*/
9+
10+
/**
11+
* Fires at the top of the members directory template file.
12+
*
13+
* @since 1.5.0
14+
*/
15+
do_action( 'bp_before_directory_members_page' ); ?>
16+
17+
<div id="buddypress">
18+
19+
<?php
20+
21+
/**
22+
* Fires before the display of the members.
23+
*
24+
* @since 1.1.0
25+
*/
26+
do_action( 'bp_before_directory_members' ); ?>
27+
28+
<?php
29+
30+
/**
31+
* Fires before the display of the members content.
32+
*
33+
* @since 1.1.0
34+
*/
35+
do_action( 'bp_before_directory_members_content' ); ?>
36+
37+
<?php /* Backward compatibility for inline search form. Use template part instead. */ ?>
38+
<?php if ( has_filter( 'bp_directory_members_search_form' ) ) : ?>
39+
40+
<div id="members-dir-search" class="dir-search" role="search">
41+
<?php bp_directory_members_search_form(); ?>
42+
</div><!-- #members-dir-search -->
43+
44+
<?php else: ?>
45+
46+
<?php bp_get_template_part( 'common/search/dir-search-form' ); ?>
47+
48+
<?php endif; ?>
49+
50+
<?php
51+
/**
52+
* Fires before the display of the members list tabs.
53+
*
54+
* @since 1.8.0
55+
*/
56+
do_action( 'bp_before_directory_members_tabs' ); ?>
57+
58+
<form action="" method="post" id="members-directory-form" class="dir-form">
59+
60+
<div class="item-list-tabs" aria-label="<?php esc_attr_e( 'Members directory main navigation', 'buddypress' ); ?>" role="navigation">
61+
<ul>
62+
<li class="selected" id="members-all"><a href="<?php bp_members_directory_permalink(); ?>"><?php printf( __( 'All Members %s', 'buddypress' ), '<span>' . bp_get_total_member_count() . '</span>' ); ?></a></li>
63+
64+
<?php if ( is_user_logged_in() && bp_is_active( 'friends' ) && bp_get_total_friend_count( bp_loggedin_user_id() ) ) : ?>
65+
<li id="members-personal"><a href="<?php echo esc_url( bp_loggedin_user_domain() . bp_get_friends_slug() . '/my-friends/' ); ?>"><?php printf( __( 'My Friends %s', 'buddypress' ), '<span>' . bp_get_total_friend_count( bp_loggedin_user_id() ) . '</span>' ); ?></a></li>
66+
<?php endif; ?>
67+
68+
<?php
69+
70+
/**
71+
* Fires inside the members directory member types.
72+
*
73+
* @since 1.2.0
74+
*/
75+
do_action( 'bp_members_directory_member_types' ); ?>
76+
77+
</ul>
78+
</div><!-- .item-list-tabs -->
79+
80+
<div class="item-list-tabs" id="subnav" aria-label="<?php esc_attr_e( 'Members directory secondary navigation', 'buddypress' ); ?>" role="navigation">
81+
<ul>
82+
<?php
83+
84+
/**
85+
* Fires inside the members directory member sub-types.
86+
*
87+
* @since 1.5.0
88+
*/
89+
do_action( 'bp_members_directory_member_sub_types' ); ?>
90+
91+
<li id="members-order-select" class="last filter">
92+
<label for="members-order-by"><?php _e( 'Order By:', 'buddypress' ); ?></label>
93+
<select id="members-order-by">
94+
<option value="active"><?php _e( 'Last Active', 'buddypress' ); ?></option>
95+
<option value="newest"><?php _e( 'Newest Registered', 'buddypress' ); ?></option>
96+
97+
<?php if ( bp_is_active( 'xprofile' ) ) : ?>
98+
<option value="alphabetical"><?php _e( 'Alphabetical', 'buddypress' ); ?></option>
99+
<?php endif; ?>
100+
101+
<?php
102+
103+
/**
104+
* Fires inside the members directory member order options.
105+
*
106+
* @since 1.2.0
107+
*/
108+
do_action( 'bp_members_directory_order_options' ); ?>
109+
</select>
110+
</li>
111+
</ul>
112+
</div>
113+
114+
<h2 class="bp-screen-reader-text"><?php
115+
/* translators: accessibility text */
116+
_e( 'Members directory', 'buddypress' );
117+
?></h2>
118+
119+
<div id="members-dir-list" class="members dir-list">
120+
<?php bp_get_template_part( 'members/members-loop' ); ?>
121+
</div><!-- #members-dir-list -->
122+
123+
<?php
124+
125+
/**
126+
* Fires and displays the members content.
127+
*
128+
* @since 1.1.0
129+
*/
130+
do_action( 'bp_directory_members_content' ); ?>
131+
132+
<?php wp_nonce_field( 'directory_members', '_wpnonce-member-filter' ); ?>
133+
134+
<?php
135+
136+
/**
137+
* Fires after the display of the members content.
138+
*
139+
* @since 1.1.0
140+
*/
141+
do_action( 'bp_after_directory_members_content' ); ?>
142+
143+
</form><!-- #members-directory-form -->
144+
145+
<?php
146+
147+
/**
148+
* Fires after the display of the members.
149+
*
150+
* @since 1.1.0
151+
*/
152+
do_action( 'bp_after_directory_members' ); ?>
153+
154+
</div><!-- #buddypress -->
155+
156+
<?php
157+
158+
/**
159+
* Fires at the bottom of the members directory template file.
160+
*
161+
* @since 1.5.0
162+
*/
163+
do_action( 'bp_after_directory_members_page' );
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
<?php
2+
/**
3+
* BuddyPress - Members Loop
4+
*
5+
* Querystring is set via AJAX in _inc/ajax.php - bp_legacy_theme_object_filter()
6+
*
7+
* @package BuddyPress
8+
* @subpackage bp-legacy
9+
* @version 3.0.0
10+
*/
11+
12+
/**
13+
* Fires before the display of the members loop.
14+
*
15+
* @since 1.2.0
16+
*/
17+
do_action( 'bp_before_members_loop' ); ?>
18+
19+
<?php if ( bp_get_current_member_type() ) : ?>
20+
<p class="current-member-type"><?php bp_current_member_type_message() ?></p>
21+
<?php endif; ?>
22+
23+
<?php if ( bp_has_members( bp_ajax_querystring( 'members' ) ) ) : ?>
24+
25+
<div id="pag-top" class="pagination">
26+
27+
<div class="pag-count" id="member-dir-count-top">
28+
29+
<?php bp_members_pagination_count(); ?>
30+
31+
</div>
32+
33+
<div class="pagination-links" id="member-dir-pag-top">
34+
35+
<?php bp_members_pagination_links(); ?>
36+
37+
</div>
38+
39+
</div>
40+
41+
<?php
42+
43+
/**
44+
* Fires before the display of the members list.
45+
*
46+
* @since 1.1.0
47+
*/
48+
do_action( 'bp_before_directory_members_list' ); ?>
49+
50+
<ul id="members-list" class="item-list" aria-live="assertive" aria-relevant="all">
51+
52+
<?php while ( bp_members() ) : bp_the_member(); ?>
53+
54+
<li <?php bp_member_class(); ?>>
55+
<div class="item-avatar">
56+
<a href="<?php bp_member_permalink(); ?>"><?php bp_member_avatar(); ?></a>
57+
</div>
58+
59+
<div class="item">
60+
<div class="item-title">
61+
<a href="<?php bp_member_permalink(); ?>"><?php bp_member_name(); ?></a>
62+
63+
<?php if ( bp_get_member_latest_update() ) : ?>
64+
65+
<span class="update"> <?php bp_member_latest_update(); ?></span>
66+
67+
<?php endif; ?>
68+
69+
</div>
70+
71+
<div class="item-meta"><span class="activity" data-livestamp="<?php bp_core_iso8601_date( bp_get_member_last_active( array( 'relative' => false ) ) ); ?>"><?php bp_member_last_active(); ?></span></div>
72+
73+
<?php
74+
75+
/**
76+
* Fires inside the display of a directory member item.
77+
*
78+
* @since 1.1.0
79+
*/
80+
do_action( 'bp_directory_members_item' ); ?>
81+
82+
<?php
83+
/***
84+
* If you want to show specific profile fields here you can,
85+
* but it'll add an extra query for each member in the loop
86+
* (only one regardless of the number of fields you show):
87+
*
88+
* bp_member_profile_data( 'field=the field name' );
89+
*/
90+
?>
91+
</div>
92+
93+
<div class="action">
94+
95+
<?php
96+
97+
/**
98+
* Fires inside the members action HTML markup to display actions.
99+
*
100+
* @since 1.1.0
101+
*/
102+
do_action( 'bp_directory_members_actions' ); ?>
103+
104+
</div>
105+
106+
<div class="clear"></div>
107+
</li>
108+
109+
<?php endwhile; ?>
110+
111+
</ul>
112+
113+
<?php
114+
115+
/**
116+
* Fires after the display of the members list.
117+
*
118+
* @since 1.1.0
119+
*/
120+
do_action( 'bp_after_directory_members_list' ); ?>
121+
122+
<?php bp_member_hidden_fields(); ?>
123+
124+
<div id="pag-bottom" class="pagination">
125+
126+
<div class="pag-count" id="member-dir-count-bottom">
127+
128+
<?php bp_members_pagination_count(); ?>
129+
130+
</div>
131+
132+
<div class="pagination-links" id="member-dir-pag-bottom">
133+
134+
<?php bp_members_pagination_links(); ?>
135+
136+
</div>
137+
138+
</div>
139+
140+
<?php else: ?>
141+
142+
<div id="message" class="info">
143+
<p><?php _e( "Sorry, no members were found.", 'buddypress' ); ?></p>
144+
</div>
145+
146+
<?php endif; ?>
147+
148+
<?php
149+
150+
/**
151+
* Fires after the display of the members loop.
152+
*
153+
* @since 1.2.0
154+
*/
155+
do_action( 'bp_after_members_loop' );

0 commit comments

Comments
 (0)