Skip to:
Content

BuddyPress.org

Ticket #3240: 3240-3.patch

File 3240-3.patch, 13.6 KB (added by boonebgorges, 15 years ago)
  • bp-themes/bp-default/_inc/css/default-rtl.css

    right to left for languages that support this method. 
    2222        4.3 - Gallery
    2323        4.4 - Images
    2424        4.5 - Posts
     25        4.6 - Search
    25265.0 - BuddyPress
    2627        5.1 - Activity
    2728                5.1.1 - Activity Listing
    dd.wp-caption p.wp-caption-text, 
    395396        float: right;
    396397}
    397398
     399/*--------------------------------------------------------------
     4004.6 - Search
     401--------------------------------------------------------------*/
     402
    398403
    399404/*--------------------------------------------------------------
    4004055.0 - BuddyPress
  • bp-themes/bp-default/_inc/css/default.css

    Hello, this is the BuddyPress Default theme stylesheet. 
    2222        5.3 - Gallery
    2323        5.4 - Images
    2424        5.5 - Posts
     25        5.6 - Search
    25266.0 - BuddyPress
    2627        6.1 - Activity
    2728                6.1.1 - Activity Listing
    p.postmetadata { 
    10371038
    10381039
    10391040/*--------------------------------------------------------------
     10415.6 - Search
     1042--------------------------------------------------------------*/
     1043#search-content {
     1044        background: #f7f7f7;
     1045        border: 1px solid #ececec;
     1046        -moz-border-radius: 7px;
     1047        -webkit-border-radius: 7px;
     1048        border-radius: 7px;
     1049        margin: 20px 0 20px;
     1050        padding: 0 10px;
     1051        position: relative;
     1052}
     1053#search-tab {
     1054        background: url(../images/search.png) no-repeat 20px top;
     1055        height: 16px;
     1056        margin-top: -16px;
     1057}
     1058#search-loop {
     1059        min-height: 75px;
     1060}
     1061.search-column-component h3 {
     1062        color: #707070;
     1063        font-size: 16px;
     1064}
     1065.search-column-component {
     1066        float: left;
     1067        padding: 10px 10px 0 0;
     1068        text-align: right;
     1069        width: 20%;
     1070}
     1071.search-column-results {
     1072        border-left: 1px solid #e1e3e3;
     1073        float: left;
     1074        padding: 10px 0 42px 10px;
     1075        width: 76%;
     1076}
     1077.search-section {
     1078        display: inline-block;
     1079        width: 100%;
     1080}
     1081.search-section:last-child .search-column-results {
     1082        margin-bottom: 0;
     1083}
     1084input#s {
     1085        border: 1px inset #c3c5c5;
     1086        -moz-border-radius: 3px;
     1087        -webkit-border-radius: 3px;
     1088        border-radius: 3px;
     1089        color: #696a6a;
     1090        font-size: 20px;
     1091        height: 30px;
     1092        width: 300px;
     1093}
     1094input#searchsubmit {
     1095        background-position: 0 bottom;
     1096        height: 35px;
     1097}
     1098div.search-post-content h4.posttitle {
     1099        font-size: 14px;
     1100        margin: 10px 0 10px 35px;
     1101}
     1102div.search-entry {
     1103        margin: 0 0 10px 35px;
     1104}
     1105div.search-post-content {
     1106        border-bottom: 1px solid #eaeaea;
     1107}
     1108.search-section ul.item-list li {
     1109        padding-bottom: 0;
     1110}
     1111
     1112
     1113/*--------------------------------------------------------------
    104011146.0 - BuddyPress
    10411115--------------------------------------------------------------*/
    10421116/*--------------------------------------------------------------
  • bp-themes/bp-default/_inc/global.js

    jq(document).ready( function() { 
    10671067                        jq.cookie('bp-' + objects[i] + '-extras', null, {path: '/'} );
    10681068                });
    10691069        });
     1070
     1071        /* search template */
     1072        jq("#searchsubmit").click(function(e) {
     1073                e.preventDefault();
     1074                jq('form#search span.ajax-loader').show();
     1075
     1076                jq("#search-loop-results").load(BP_DTheme.root_domain + "/?s=" + escape(jq("#s").val()) + " #search-loop-results", function(response, status, xhr) {
     1077                        if (status == "success") {
     1078                                jq('span.ajax-loader').hide();
     1079                        }
     1080                });
     1081        });
    10701082});
    10711083
    10721084/* Setup activity scope and filter based on the current cookie settings. */
  • bp-themes/bp-default/functions.php

    function bp_dtheme_enqueue_scripts() { 
    147147                'show_all_comments' => __( 'Show all comments for this thread', 'buddypress' ),
    148148                'show_all'          => __( 'Show all', 'buddypress' ),
    149149                'comments'          => __( 'comments', 'buddypress' ),
    150                 'close'             => __( 'Close', 'buddypress' )
     150                'close'             => __( 'Close', 'buddypress' ),
     151                'root_domain'       => bp_get_root_domain()
    151152        );
    152153
    153154        if ( !empty( $bp->displayed_user->id ) )
  • bp-themes/bp-default/search.php

    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 &rarr;', '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(); ?>
    22
    33        <div id="content">
    44                <div class="padder">
    55
    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 ); ?>
    78
    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 &rarr;', '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 &#187;', 'buddypress' ), __( '1 Comment &#187;', 'buddypress' ), __( '% Comments &#187;', '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>
    5915
    6016                </div><!-- .padder -->
    6117        </div><!-- #content -->
    6218
    63         <?php get_sidebar() ?>
    64 
    65 <?php get_footer() ?>
     19        <?php get_sidebar(); ?>
     20<?php get_footer(); ?>
     21 No newline at end of file
  • bp-themes/bp-default/searchform.php

     
    11<?php do_action( 'bp_before_blog_search_form' ) ?>
    22
    3 <form role="search" method="get" id="searchform" action="<?php echo home_url() ?>/">
    4         <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
    5         <input type="submit" id="searchsubmit" value="<?php _e( 'Search', 'buddypress' ) ?>" />
     3<div id="searchform">
     4        <form role="search" id="search">
     5                <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" />
     6                <input type="submit" id="searchsubmit" value="<?php _e( 'Search', 'buddypress' ); ?>" />
     7                <span class="ajax-loader"></span>
    68
    7         <?php do_action( 'bp_blog_search_form' ) ?>
    8 </form>
     9                <?php do_action( 'bp_blog_search_form' ) ?>
     10        </form>
     11</div>
    912
    10 <?php do_action( 'bp_after_blog_search_form' ) ?>
     13<?php do_action( 'bp_after_blog_search_form' ) ?>
     14 No newline at end of file