new file mode 100644
---bp-themes/bp-default/search-loop.php (revision 0)n+++bp-themes/bp-default/search-loop.php (revision 0)
@@ -0,0 +1,177 @@
+<!-- blog search loop -->
+<div id="search-loop-results">
+ <div class="search-section">
+ <div class="search-column-component">
+ <h3><?php _e( 'Blog Posts', 'buddypress' ); ?></h3>
+ </div>
+
+ <div class="search-column-results">
+ <?php if ( have_posts() ) : ?>
+ <ul>
+
+ <?php while ( have_posts() ) : the_post(); ?>
+
+ <li class="search-post" id="post-<?php the_ID(); ?>">
+ <div class="search-author-box">
+ <?php echo get_avatar( get_the_author_meta( 'email' ), '25' ); ?>
+ </div>
+
+ <div class="search-post-content">
+ <h4 class="posttitle"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php printf( esc_attr__( 'Permalink to %s', 'buddypress' ), the_title_attribute( 'echo=0' ) ); ?>"><?php the_title(); ?></a></h4>
+
+ <div class="search-entry">
+ <?php the_excerpt( __( 'Read the rest of this entry →', 'buddypress' ) ); ?>
+ </div>
+ </div>
+ </li><!-- .search-post -->
+
+ <?php endwhile; ?>
+
+ </ul>
+ <?php else : ?>
+
+ <div id="message" class="info">
+ <p><?php _e( 'Sorry, no blog posts were found.', 'buddypress' ); ?></p>
+ </div>
+
+ <?php endif; ?>
+ </div>
+</div>
+
+
+<!-- forum search loop -->
+<?php if ( bp_is_active( 'forums' ) ) : ?>
+<div class="search-section">
+ <div class="search-column-component">
+ <h3><?php _e( 'Forum Topics', 'buddypress' ); ?></h3>
+ </div>
+
+ <div class="search-column-results">
+ <?php if ( bp_has_forum_topics( array( 'search_terms' => get_search_query( false ) ) ) ) : ?>
+
+ <table class="forumsearch">
+ <tr>
+ <th id="th-title"><?php _e( 'Topic Title', 'buddypress' ); ?></th>
+ <th id="th-poster"><?php _e( 'Latest Poster', 'buddypress' ); ?></th>
+
+ <?php if ( !bp_is_group_forum() ) : ?>
+ <th id="th-group"><?php _e( 'Posted In Group', 'buddypress' ); ?></th>
+ <?php endif; ?>
+ </tr>
+
+ <?php while ( bp_forum_topics() ) : bp_the_forum_topic(); ?>
+ <tr class="<?php bp_the_topic_css_class(); ?>">
+ <td class="td-title">
+ <a class="topic-title" href="<?php bp_the_topic_permalink(); ?>" title="<?php bp_the_topic_title(); ?>">
+ <?php bp_the_topic_title(); ?>
+ </a>
+ </td>
+
+ <td class="td-poster">
+ <a href="<?php bp_the_topic_permalink(); ?>"><?php bp_the_topic_last_poster_avatar( 'type=thumb&width=20&height=20' ); ?></a>
+ <div class="poster-name"><?php bp_the_topic_last_poster_name(); ?></div>
+ </td>
+
+ <?php if ( !bp_is_group_forum() ) : ?>
+ <td class="td-group">
+ <a href="<?php bp_the_topic_object_permalink(); ?>"><?php bp_the_topic_object_avatar( 'type=thumb&width=20&height=20' ); ?></a>
+ <div class="object-name"><a href="<?php bp_the_topic_object_permalink(); ?>" title="<?php bp_the_topic_object_name(); ?>"><?php bp_the_topic_object_name(); ?></a></div>
+ </td>
+ <?php endif; ?>
+ </tr>
+ <?php endwhile; ?>
+ </table>
+
+ <?php else: ?>
+
+ <div id="message" class="info">
+ <p><?php _e( 'Sorry, no forum topics were found.', 'buddypress' ); ?></p>
+ </div>
+
+ <?php endif; ?>
+ </div>
+
+</div>
+<?php endif; ?>
+
+
+<!-- members search loop -->
+<?php if ( bp_is_active( 'members' ) ) : ?>
+<div class="search-section">
+ <div class="search-column-component">
+ <h3><?php _e( 'Members', 'buddypress' ); ?></h3>
+ </div>
+
+ <div class="search-column-results">
+ <?php if ( bp_has_members( array( 'search_terms' => get_search_query( false ) ) ) ) : ?>
+
+ <ul id="members-list-search" class="item-list">
+
+ <?php while ( bp_members() ) : bp_the_member(); ?>
+ <li>
+ <div class="item-avatar">
+ <a href="<?php bp_member_permalink() ?>"><?php bp_member_avatar( 'type=thumb&width=25&height=25' ); ?></a>
+ </div>
+
+ <div class="item">
+ <div class="item-title">
+ <a href="<?php bp_member_permalink() ?>"><?php bp_member_name(); ?></a>
+ </div>
+ </div>
+ <div class="clear"></div>
+ </li>
+ <?php endwhile; ?>
+
+ </ul>
+
+ <?php else: ?>
+
+ <div id="message" class="info">
+ <p><?php _e( "Sorry, no members were found.", 'buddypress' ); ?></p>
+ </div>
+
+ <?php endif; ?>
+ </div>
+</div>
+<?php endif; ?>
+
+
+<!-- group search loop -->
+<?php if ( bp_is_active( 'groups' ) ) : ?>
+<div class="search-section">
+ <div class="search-column-component">
+ <h3><?php _e( 'Groups', 'buddypress' ); ?></h3>
+ </div>
+
+ <div class="search-column-results">
+ <?php if ( bp_has_groups( array( 'search_terms' => get_search_query( false ) ) ) ) : ?>
+ <ul id="group-list-search" class="item-list">
+
+ <?php while ( bp_groups() ) : bp_the_group(); ?>
+ <li>
+ <div class="item-avatar">
+ <a href="<?php bp_group_permalink() ?>"><?php bp_group_avatar( 'type=thumb&width=25&height=25' ); ?></a>
+ </div>
+
+ <div class="item">
+ <div class="item-title">
+ <a href="<?php bp_group_permalink() ?>"><?php bp_group_name(); ?></a>
+ </div>
+ </div>
+ <div class="clear"></div>
+ </li>
+ <?php endwhile; ?>
+
+ </ul>
+
+ <?php else: ?>
+
+ <div id="message" class="info">
+ <p><?php _e( "Sorry, no groups were found.", 'buddypress' ); ?></p>
+ </div>
+
+ <?php endif; ?>
+
+ </div>
+</div>
+<?php endif; ?>
\ No newline at end of file
|
|
|
|
| 1 | | <?php get_header() ?> |
| | 1 | <?php get_header(); ?> |
| 2 | 2 | |
| 3 | 3 | <div id="content"> |
| 4 | 4 | <div class="padder"> |
| 5 | 5 | |
| 6 | | <?php do_action( 'bp_before_blog_search' ) ?> |
| | 6 | <h2 class="pagetitle"><?php _e( 'Search', 'buddypress' ); ?></h2> |
| | 7 | <?php locate_template( array( 'searchform.php'), true ); ?> |
| 7 | 8 | |
| 8 | | <div class="page" id="blog-search" role="main"> |
| 9 | | |
| 10 | | <h2 class="pagetitle"><?php _e( 'Site', 'buddypress' ) ?></h2> |
| 11 | | |
| 12 | | <?php if (have_posts()) : ?> |
| 13 | | |
| 14 | | <h3 class="pagetitle"><?php _e( 'Search Results', 'buddypress' ) ?></h3> |
| 15 | | |
| 16 | | <?php bp_dtheme_content_nav( 'nav-above' ); ?> |
| 17 | | |
| 18 | | <?php while (have_posts()) : the_post(); ?> |
| 19 | | |
| 20 | | <?php do_action( 'bp_before_blog_post' ) ?> |
| 21 | | |
| 22 | | <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>> |
| 23 | | |
| 24 | | <div class="author-box"> |
| 25 | | <?php echo get_avatar( get_the_author_meta( 'email' ), '50' ); ?> |
| 26 | | <p><?php printf( _x( 'by %s', 'Post written by...', 'buddypress' ), bp_core_get_userlink( $post->post_author ) ) ?></p> |
| 27 | | </div> |
| 28 | | |
| 29 | | <div class="post-content"> |
| 30 | | <h2 class="posttitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', 'buddypress' ) ?> <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> |
| 31 | | |
| 32 | | <p class="date"><?php printf( __( '%1$s <span>in %2$s</span>', 'buddypress' ), get_the_date(), get_the_category_list( ', ' ) ); ?></p> |
| 33 | | |
| 34 | | <div class="entry"> |
| 35 | | <?php the_content( __( 'Read the rest of this entry →', 'buddypress' ) ); ?> |
| 36 | | </div> |
| 37 | | |
| 38 | | <p class="postmetadata"><?php the_tags( '<span class="tags">' . __( 'Tags: ', 'buddypress' ), ', ', '</span>' ); ?> <span class="comments"><?php comments_popup_link( __( 'No Comments »', 'buddypress' ), __( '1 Comment »', 'buddypress' ), __( '% Comments »', 'buddypress' ) ); ?></span></p> |
| 39 | | </div> |
| 40 | | |
| 41 | | </div> |
| 42 | | |
| 43 | | <?php do_action( 'bp_after_blog_post' ) ?> |
| 44 | | |
| 45 | | <?php endwhile; ?> |
| 46 | | |
| 47 | | <?php bp_dtheme_content_nav( 'nav-below' ); ?> |
| 48 | | |
| 49 | | <?php else : ?> |
| 50 | | |
| 51 | | <h2 class="center"><?php _e( 'No posts found. Try a different search?', 'buddypress' ) ?></h2> |
| 52 | | <?php get_search_form() ?> |
| 53 | | |
| 54 | | <?php endif; ?> |
| 55 | | |
| 56 | | </div> |
| 57 | | |
| 58 | | <?php do_action( 'bp_after_blog_search' ) ?> |
| | 9 | <div id="search-content"> |
| | 10 | <div id="search-loop"> |
| | 11 | <div id="search-tab"></div> |
| | 12 | <?php locate_template( array( 'search-loop.php' ), true ); ?> |
| | 13 | </div> |
| | 14 | </div> |
| 59 | 15 | |
| 60 | 16 | </div><!-- .padder --> |
| 61 | 17 | </div><!-- #content --> |
| 62 | 18 | |
| 63 | | <?php get_sidebar() ?> |
| 64 | | |
| 65 | | <?php get_footer() ?> |
| | 19 | <?php get_sidebar(); ?> |
| | 20 | <?php get_footer(); ?> |
| | 21 | No newline at end of file |