Ticket #3240: 3240-1.patch
| File 3240-1.patch, 11.5 KB (added by , 15 years ago) |
|---|
-
bp-themes/bp-default/searchform.php
1 <?php do_action( 'bp_before_blog_search_form' ) ?> 2 3 <form role="search" method="get" id="searchform" action="<?php echo home_url() ?>/"> 1 <div id="searchform"> 2 <form id="search"> 4 3 <input type="text" value="<?php the_search_query(); ?>" name="s" id="s" /> 5 4 <input type="submit" id="searchsubmit" value="<?php _e( 'Search', 'buddypress' ) ?>" /> 6 7 <?php do_action( 'bp_blog_search_form' ) ?> 5 <span class="ajax-loader"></span> 8 6 </form> 9 7 10 <?php do_action( 'bp_after_blog_search_form' ) ?> 8 </div> 9 No newline at end of file -
bp-themes/bp-default/search.php
1 1 <?php get_header() ?> 2 3 2 <div id="content"> 4 3 <div class="padder"> 5 6 <?php do_action( 'bp_before_blog_search' ) ?> 7 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' ) ?> 59 4 <?php do_action( 'bp_before_blog_search' ) ?> 5 <h2 class="pagetitle"><?php _e( 'Search', 'buddypress' ) ?></h2> 6 <?php locate_template( array( 'searchform.php'), true ) ?> 7 8 <div id="search-content"> 9 <div id="search-loop"> 10 <div id="search-tab"></div> 11 <?php locate_template( array( 'search-loop.php' ), true ) ?> 12 </div> 13 </div> 60 14 </div><!-- .padder --> 61 15 </div><!-- #content --> 62 16 63 <?php get_sidebar() ?>17 <?php locate_template( array( 'sidebar.php' ), true ) ?> 64 18 65 19 <?php get_footer() ?> -
bp-themes/bp-default/search-loop.php
1 2 <div id="search-loop-results"> 3 <?php $searchVar = $_GET["s"]; ?> 4 5 <!-- ********************* blog search loop ********************* --> 6 <div id="search-section"> 7 <div id="search-left-column"> 8 <h3>Blog Posts</h3> 9 </div> 10 11 <div id="search-right-column"> 12 <?php if (have_posts()) : ?> 13 14 <?php while (have_posts()) : the_post(); ?> 15 16 <div class="search-post" id="post-<?php the_ID(); ?>"> 17 18 <div class="search-author-box"> 19 <?php echo get_avatar( get_the_author_meta( 'email' ), '25' ); ?> 20 </div> 21 22 <div class="search-post-content"> 23 <h4 class="posttitle"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', 'buddypress' ) ?> <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4> 24 25 <div class="search-entry"> 26 <?php the_excerpt( __( 'Read the rest of this entry →', 'buddypress' ) ); ?> 27 </div> 28 </div> 29 30 </div> 31 32 <?php endwhile; ?> 33 34 <?php else : ?> 35 36 37 <div id="message" class="info"> 38 <p><?php _e( 'No posts found. Try a different search?', 'buddypress' ) ?></p> 39 </div> 40 41 <?php endif; ?> 42 </div> 43 </div> 44 45 <!-- ********************* forum search loop ********************* --> 46 <div id="search-section"> 47 <div id="search-left-column"> 48 <h3>Forum Topics</h3> 49 </div> 50 51 <div id="search-right-column"> 52 <?php if ( bp_has_forum_topics( array( 'search_terms' => $searchVar ) )) : ?> 53 54 <table class="forumsearch"> 55 56 <tr> 57 <th id="th-title"><?php _e( 'Topic Title', 'buddypress' ) ?></th> 58 <th id="th-poster"><?php _e( 'Latest Poster', 'buddypress' ) ?></th> 59 60 <?php if ( !bp_is_group_forum() ) : ?> 61 <th id="th-group"><?php _e( 'Posted In Group', 'buddypress' ) ?></th> 62 <?php endif; ?> 63 </tr> 64 65 <?php while ( bp_forum_topics() ) : bp_the_forum_topic(); ?> 66 67 <tr class="<?php bp_the_topic_css_class() ?>"> 68 <td class="td-title"> 69 <a class="topic-title" href="<?php bp_the_topic_permalink() ?>" title="<?php bp_the_topic_title() ?> - <?php _e( 'Permalink', 'buddypress' ) ?>"> 70 <?php bp_the_topic_title() ?> 71 </a> 72 </td> 73 <td class="td-poster"> 74 <a href="<?php bp_the_topic_permalink() ?>"><?php bp_the_topic_last_poster_avatar( 'type=thumb&width=20&height=20' ) ?></a> 75 <div class="poster-name"><?php bp_the_topic_last_poster_name() ?></div> 76 </td> 77 78 <?php if ( !bp_is_group_forum() ) : ?> 79 <td class="td-group"> 80 <a href="<?php bp_the_topic_object_permalink() ?>"><?php bp_the_topic_object_avatar( 'type=thumb&width=20&height=20' ) ?></a> 81 <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> 82 </td> 83 <?php endif; ?> 84 </tr> 85 86 <?php endwhile; ?> 87 88 </table> 89 90 <?php else: ?> 91 92 <div id="message" class="info"> 93 <p><?php _e( 'Sorry, no forum topics were found.', 'buddypress' ) ?></p> 94 </div> 95 96 <?php endif;?> 97 98 </div> 99 </div> 100 <!-- ********************* members search loop ********************* --> 101 <div id="search-section"> 102 <div id="search-left-column"> 103 <h3>Members</h3> 104 </div> 105 106 <div id="search-right-column"> 107 <?php if ( bp_has_members( array( 'search_terms' => $searchVar ) )) : ?> 108 109 110 <ul id="members-list-search" class="item-list"> 111 <?php while ( bp_members() ) : bp_the_member(); ?> 112 113 <li> 114 <div class="item-avatar"> 115 <a href="<?php bp_member_permalink() ?>"><?php bp_member_avatar('type=thumb&width=25&height=25') ?></a> 116 </div> 117 118 <div class="item"> 119 <div class="item-title"> 120 <a href="<?php bp_member_permalink() ?>"><?php bp_member_name() ?></a> 121 </div> 122 </div> 123 <div class="action"> 124 <?php do_action( 'bp_directory_members_actions' ) ?> 125 </div> 126 <div class="clear"></div> 127 </li> 128 129 <?php endwhile; ?> 130 </ul> 131 132 <?php bp_member_hidden_fields() ?> 133 134 <?php else: ?> 135 136 <div id="message" class="info"> 137 <p><?php _e( "Sorry, no members were found.", 'buddypress' ) ?></p> 138 </div> 139 140 <?php endif; ?> 141 </div> 142 </div> 143 144 <!-- ********************* group search loop ********************* --> 145 <div id="search-section"> 146 <div id="search-left-column"> 147 <h3>Groups</h3> 148 </div> 149 150 <div id="search-right-column"> 151 <?php if ( bp_has_groups( array( 'search_terms' => $searchVar ) )) : ?> 152 153 154 <ul id="group-list-search" class="item-list"> 155 <?php while ( bp_groups() ) : bp_the_group(); ?> 156 157 <li> 158 <div class="item-avatar"> 159 <a href="<?php bp_group_permalink() ?>"><?php bp_group_avatar('type=thumb&width=25&height=25') ?></a> 160 </div> 161 162 <div class="item"> 163 <div class="item-title"> 164 <a href="<?php bp_group_permalink() ?>"><?php bp_group_name() ?></a> 165 </div> 166 </div> 167 <div class="action"> 168 <?php do_action( 'bp_directory_group_actions' ) ?> 169 </div> 170 <div class="clear"></div> 171 </li> 172 173 <?php endwhile; ?> 174 </ul> 175 176 <?php bp_member_hidden_fields() ?> 177 178 <?php else: ?> 179 180 <div id="message" class="info"> 181 <p><?php _e( "Sorry, no groups were found.", 'buddypress' ) ?></p> 182 </div> 183 184 <?php endif; ?> 185 </div> 186 </div> 187 188 189 </div> 190 No newline at end of file -
bp-themes/bp-default/_inc/css/default.css
22 22 5.3 - Gallery 23 23 5.4 - Images 24 24 5.5 - Posts 25 5.6 - Search 25 26 6.0 - BuddyPress 26 27 6.1 - Activity 27 28 6.1.1 - Activity Listing … … 1061 1062 1062 1063 1063 1064 /*-------------------------------------------------------------- 1065 5.6 - Search 1066 --------------------------------------------------------------*/ 1067 #search-content { 1068 background: #f7f7f7; 1069 border: 1px solid #ececec; 1070 -moz-border-radius: 7px; 1071 -webkit-border-radius: 7px; 1072 border-radius: 7px; 1073 margin: 20px 0 20px; 1074 padding: 0 10px; 1075 position: relative; 1076 width: 650px; 1077 } 1078 #search-tab { 1079 background: url(../images/search.png) no-repeat 20px top; 1080 height: 16px; 1081 margin-top: -16px; 1082 } 1083 #search-loop { 1084 min-height: 75px; 1085 } 1086 #search-left-column h3 { 1087 color: #707070; 1088 font-size: 16px; 1089 } 1090 #search-left-column { 1091 float: left; 1092 padding: 10px 10px 0 0; 1093 text-align: right; 1094 width: 20%; 1095 } 1096 #search-right-column { 1097 border-left: 1px solid #e1e3e3; 1098 float: left; 1099 padding: 10px 0 42px 10px; 1100 width: 76%; 1101 } 1102 #search-section { 1103 display: inline-block; 1104 width: 100%; 1105 } 1106 input#s { 1107 border: 1px inset #c3c5c5; 1108 -moz-border-radius: 3px; 1109 -webkit-border-radius: 3px; 1110 border-radius: 3px; 1111 color: #696a6a; 1112 font-size: 20px; 1113 height: 30px; 1114 width: 300px; 1115 } 1116 input#searchsubmit { 1117 background-position: 0 bottom; 1118 height: 35px; 1119 } 1120 div.search-post-content h4.posttitle { 1121 font-size: 14px; 1122 margin: 10px 0 10px 35px; 1123 } 1124 div.search-entry { 1125 margin: 0 0 10px 35px; 1126 } 1127 div.search-post-content { 1128 border-bottom: 1px solid #eaeaea; 1129 } 1130 #search-section ul.item-list li { 1131 padding-bottom: 0; 1132 } 1133 1134 1135 /*-------------------------------------------------------------- 1064 1136 6.0 - BuddyPress 1065 1137 --------------------------------------------------------------*/ 1066 1138 /*-------------------------------------------------------------- -
bp-themes/bp-default/_inc/global.js
1067 1067 jq.cookie('bp-' + objects[i] + '-extras', null, {path: '/'} ); 1068 1068 }); 1069 1069 }); 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("/?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 }); 1070 1082 }); 1071 1083 1072 1084 /* Setup activity scope and filter based on the current cookie settings. */