Ticket #2988: 2988-2.patch
| File 2988-2.patch, 11.9 KB (added by , 16 years ago) |
|---|
-
bp-themes/bp-default/functions.php
361 361 * @since 1.2 362 362 */ 363 363 function bp_dtheme_blog_comments( $comment, $args, $depth ) { 364 $GLOBALS['comment'] = $comment; ?>364 $GLOBALS['comment'] = $comment; 365 365 366 <?php if ( 'pingback' == $comment->comment_type ) return false; ?> 366 if ( 'pingback' == $comment->comment_type ) 367 return false; 367 368 368 <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>"> 369 if ( 1 == $depth ) 370 $avatar_size = 50; 371 else 372 $avatar_size = 20; 373 ?> 374 <li <?php comment_class() ?> id="comment-<?php comment_ID() ?>"> 369 375 <div class="comment-avatar-box"> 370 376 <div class="avb"> 371 377 <a href="<?php echo get_comment_author_url() ?>" rel="nofollow"> 372 378 <?php if ( $comment->user_id ) : ?> 373 <?php echo bp_core_fetch_avatar( array( 'item_id' => $comment->user_id, 'width' => 50, 'height' => 50, 'email' => $comment->comment_author_email ) );?>379 <?php echo bp_core_fetch_avatar( array( 'item_id' => $comment->user_id, 'width' => $avatar_size, 'height' => $avatar_size, 'email' => $comment->comment_author_email ) ) ?> 374 380 <?php else : ?> 375 <?php echo get_avatar( $comment, 50) ?>381 <?php echo get_avatar( $comment, $avatar_size ) ?> 376 382 <?php endif; ?> 377 383 </a> 378 384 </div> 379 385 </div> 380 386 381 387 <div class="comment-content"> 388 <div class="comment-meta"> 389 <a href="<?php echo get_comment_author_url() ?>" rel="nofollow"><?php echo get_comment_author() ?></a> <?php echo _n( 'said:', 'replied:', $depth, 'buddypress' ) ?></a> 390 <span class="time-since"> <?php comment_date() ?></span> 382 391 383 <div class="comment-meta"> 384 <a href="<?php echo get_comment_author_url() ?>" rel="nofollow"><?php echo get_comment_author(); ?></a> <?php _e( 'said:', 'buddypress' ) ?> 385 <em><?php _e( 'On', 'buddypress' ) ?> <a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date() ?></a></em> 392 <?php if ( 1 == $depth ) : ?> 393 · <a href="#comment-<?php comment_ID() ?>"><?php _e( 'View', 'buddypress' ) ?></a> 394 <?php else: ?> 395 · <?php echo comment_reply_link( array( 'depth' => $depth, 'max_depth' => $args['max_depth'], 'reply_text' => __( 'Reply', 'buddypress' ) ) ) ?> 396 <?php endif; ?> 397 398 <?php edit_comment_link( __( 'Edit', 'buddypress' ), '· ', '' ) ?> 386 399 </div> 387 400 388 401 <?php if ( $comment->comment_approved == '0' ) : ?> 389 <em class="moderate"><?php _e( 'Your comment is awaiting moderation.', 'buddypress' ) ;?></em><br />402 <em class="moderate"><?php _e( 'Your comment is awaiting moderation.', 'buddypress' ) ?></em><br /> 390 403 <?php endif; ?> 391 404 392 405 <?php comment_text() ?> 393 406 394 < div class="comment-options">395 < ?php echo comment_reply_link( array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ?>396 <?php edit_comment_link( __( 'Edit', 'buddypress' ), '', '' );?>397 </div>398 407 <?php if ( 1 == $depth ) : ?> 408 <div class="comment-options"> 409 <?php echo comment_reply_link( array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ?> 410 </div> 411 <?php endif; ?> 399 412 </div> 400 413 <?php 401 414 } … … 529 542 ); 530 543 531 544 $new_labels = array( 532 'cancel_reply_link' => '<p id="cancel-comment-reply">' . __( 'Cancel reply', 'buddypress' ) . '</p>',533 545 'comment_field' => '<p class="form-textarea"><label for="comment">' . __( 'Comment', 'buddypress' ) . '</label><textarea name="comment" id="comment" cols="60" rows="10" aria-required="true"></textarea></p>', 534 546 'comment_notes_after' => '', 535 547 'comment_notes_before' => '', 536 548 'fields' => apply_filters( 'comment_form_default_fields', $fields ), 537 549 'logged_in_as' => '<p class="log-in-out">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s">Log out?</a>', 'buddypress' ), bp_loggedin_user_domain(), $user_identity, wp_logout_url( get_permalink() ) ) . '</p>', 538 'must_log_in' => '<p class="alert">' . sprintf( __( 'You must be <a href="%1$s">logged in</a> to post a comment.', 'buddypress' ), wp_login_url( get_permalink() ) ) . '</p>', 539 'title_reply' => '<h3 id="reply" class="comments-header">' . __( 'Leave a reply', 'buddypress' ) . '</h3>', 540 'title_reply_to' => '<h3 id="reply" class="comments-header">' . __( 'Leave a reply to %s', 'buddypress' ) . '</h3>' 550 'must_log_in' => '<p class="alert">' . sprintf( __( 'You must be <a href="%1$s">logged in</a> to post a comment.', 'buddypress' ), wp_login_url( get_permalink() ) ) . '</p>' 541 551 ); 542 552 543 553 return apply_filters( 'bp_dtheme_comment_form', array_merge( $default_labels, $new_labels ) ); 544 554 } 545 555 add_filter( 'comment_form_defaults', 'bp_dtheme_comment_form', 10 ); 546 556 557 /** 558 * Adds the user's avatar before the comment form box. 559 * 560 * The 'comment_form_top' action is used to insert our HTML within <div id="reply"> 561 * so that the nested comments comment-reply javascript moves the entirety of the comment reply area. 562 * 563 * @see comment_form() 564 * @since 1.3 565 */ 566 function bp_dtheme_before_comment_form() { 567 ?> 568 <div class="comment-avatar-box"> 569 <div class="avb"> 570 <?php if ( bp_loggedin_user_id() ) : ?> 571 <a href="<?php echo bp_loggedin_user_domain() ?>"> 572 <?php echo get_avatar( bp_loggedin_user_id(), 50 ) ?> 573 </a> 574 <?php else : ?> 575 <?php echo get_avatar( 0, 50 ) ?> 576 <?php endif; ?> 577 </div> 578 </div> 547 579 580 <div class="comment-content standard-form"> 581 <?php 582 } 583 add_action( 'comment_form_top', 'bp_dtheme_before_comment_form' ); 584 585 /** 586 * Closes tags opened in bp_dtheme_before_comment_form(). 587 * 588 * @see bp_dtheme_before_comment_form() 589 * @see comment_form() 590 * @since 1.3 591 */ 592 function bp_dtheme_after_comment_form() { 593 ?> 594 </div><!-- .comment-content standard-form --> 595 <?php 596 } 597 add_action( 'comment_form', 'bp_dtheme_after_comment_form' ); 598 599 548 600 // Everything beyond this point is deprecated as of BuddyPress 1.3. This will be removed in a future version. 549 601 550 602 /** -
bp-themes/bp-default/_inc/css/default.css
1483 1483 } 1484 1484 1485 1485 .activity-list .activity-header a:first-child, 1486 .commentlist .depth-1 > .comment-content .comment-meta a:first-child, 1486 1487 span.highlight { 1487 1488 background: #ebf7ff; 1488 1489 border-bottom: 1px solid #a1dcfa; … … 1505 1506 outline: none; 1506 1507 } 1507 1508 1508 .activity-list .activity-content span.time-since { 1509 .activity-list .activity-content span.time-since, 1510 .comment-content .comment-meta span.time-since { 1509 1511 color: #bbb; 1510 1512 } 1511 1513 … … 1658 1660 padding: 10px 0 0; 1659 1661 } 1660 1662 1661 div.activity-comments ul li p:last-child { 1663 div.activity-comments ul li p:last-child, 1664 .commentlist .comment-content a:first-child { 1662 1665 margin-bottom: 10px; 1663 1666 } 1664 1667 … … 2033 2036 border-top: 1px solid #eee; 2034 2037 } 2035 2038 2036 div.post div.author-box, 2037 div.comment-avatar-box { 2039 div.post div.author-box { 2038 2040 background: #f0f0f0; 2039 2041 padding: 10px; 2040 2042 float: left; … … 2058 2060 text-decoration: none; 2059 2061 } 2060 2062 2061 div.post div.author-box img, 2062 div.comment-avatar-box img { 2063 div.post div.author-box img { 2063 2064 float: none; 2064 2065 border: 4px solid #fff; 2065 2066 margin: 0; 2066 2067 } 2067 2068 2068 div.post div.post-content, 2069 div.comment-content { 2069 div.post div.post-content { 2070 2070 margin-left: 105px; 2071 2071 } 2072 2072 2073 div.post p.date, div.post p.postmetadata,2074 div. comment-meta, div.comment-options{2073 div.post p.date, 2074 div.post p.postmetadata { 2075 2075 color: #888; 2076 2076 font-size: 12px; 2077 2077 font-family: Georgia, times, serif; … … 2169 2169 margin-top: 30px; 2170 2170 } 2171 2171 2172 #comments h3, 2173 #trackbacks h3, 2174 #respond h3 { 2175 font-size: 20px; 2176 margin: 5px 0 25px 0; 2177 font-weight: normal; 2178 color: #555; 2172 #comments ol.commentlist { 2173 border-bottom: 1px solid #e4e4e4; 2174 margin-bottom: 30px; 2179 2175 } 2180 2176 2181 #comments span.title, 2182 #trackbacks span.title { 2183 color: #aaa;2177 ol.commentlist div.comment-avatar-box { 2178 float: left; 2179 margin: 10px 10px 10px 0; 2184 2180 } 2185 2181 2186 ol.commentlist li { 2187 margin: 0 0 30px 0; 2182 ul.children div.comment-avatar-box { 2183 float: left; 2184 margin: 0px 10px 10px 0; 2188 2185 } 2189 2186 2190 div.comment-meta { 2187 div.comment-avatar-box img { 2188 border: 2px solid #eee; 2189 } 2190 2191 div.comment-content { 2192 border-top: 1px solid #e4e4e4; 2193 padding-left: 75px; 2194 } 2195 2196 .commentlist .children .comment { 2197 margin-bottom: 5px; 2198 } 2199 2200 div.comment-meta, 2201 div.comment-options { 2202 color: #888; 2203 font-size: 11px; 2204 margin: 10px 0; 2205 padding: 0 0 3px; 2206 } 2207 2208 div.comment-meta em { 2209 font-style: normal; 2210 } 2211 2212 div.comment-meta span.comment-highlight a { 2213 background: #EBF7FF; 2214 border-bottom: 1px solid #a1dcfa; 2215 border-radius: 4px; 2216 border-right: 1px solid #a1dcfa; 2217 color: #059AE7; 2218 margin-right: 3px; 2219 padding: 3px 8px; 2220 text-decoration: none; 2221 -moz-border-radius: 4px; 2222 -webkit-border-radius: 4px; 2223 } 2224 2225 div.comment-meta .comment-highlight a:hover, 2226 .commentlist .depth-1 > .comment-content .comment-meta a:first-child:hover { 2227 background: #059AE7; 2228 border-color: #059AE7; 2229 color: #fff; 2230 } 2231 2232 div.comment-options a.comment-reply-link { 2233 background: #FFF9DB; 2234 border-bottom: 1px solid #FFE8C4; 2235 border-radius: 4px; 2236 border-right: 1px solid #FFE8C4; 2237 color: #ffa200; 2238 margin-right: 10px; 2239 padding: 3px 8px; 2240 text-decoration: none; 2241 -moz-border-radius: 4px; 2242 -webkit-border-radius: 4px; 2243 } 2244 2245 div.comment-options a.comment-reply-link:hover { 2246 background: #f7740a; 2247 border-color: #f7740a; 2248 color: #fff; 2249 } 2250 2251 ul.children { 2252 background: #f5f5f5; 2253 margin-bottom: 20px; 2254 margin-left: 75px; 2255 padding: 1px 10px; 2256 -moz-border-radius: 4px; 2257 -webkit-border-radius: 4px; 2258 } 2259 2260 ul.children ul { 2261 margin-left: 20px; 2262 margin-bottom: 0; 2263 padding: 0; 2264 } 2265 2266 ul.children img.avatar { 2267 border-style: none; 2268 height: 25px; 2269 margin: 0; 2270 width: 25px; 2271 } 2272 2273 ul.children div.comment-content { 2191 2274 border-top: none; 2192 padding- top: 0;2275 padding-left: 35px; 2193 2276 } 2194 2277 2195 div.comment-meta h5 { 2196 font-weight: normal; 2278 ul.children div.comment-meta { 2279 font-size: 11px; 2280 margin-top: 0; 2197 2281 } 2198 2282 2199 div.comment-meta em { 2283 ul.children div.comment-options { 2284 margin-bottom: 5px; 2285 margin-top: 0; 2286 } 2287 2288 ul.children li { 2289 border-top: 2px solid #fffeff; 2290 padding-top: 10px; 2291 } 2292 2293 ul.children li:first-child { 2294 border-top: none; 2295 } 2296 2297 ul.children ul li:first-child { 2298 border-top: 2px solid #fffeff; 2299 } 2300 2301 ul.children div.comment-options a.comment-reply-link { 2302 background: transparent; 2303 border-style: none; 2304 color: #1fb3dd; 2305 margin-right: 0; 2306 padding: 3px 8px; 2307 text-decoration: underline; 2308 } 2309 2310 ul.children div.comment-options a.comment-reply-link:hover { 2311 background: transparent; 2312 border-style: none; 2313 color: #1fb3dd; 2314 } 2315 2316 #respond { 2317 background-color: #fafafa; 2318 border: 1px solid #e5e5e5; 2319 border-radius: 4px; 2320 margin-bottom: 20px; 2321 margin-left: 75px; 2322 padding: 10px; 2323 -moz-border-radius: 4px; 2324 -webkit-border-radius: 4px; 2325 } 2326 2327 ul.children #respond { 2328 margin-bottom: 10px; 2329 margin-left: 35px; 2330 margin-right: 20px; 2331 } 2332 2333 h3#reply .comments-header { 2334 font-size: 14px; 2335 } 2336 2337 #reply-title small { 2200 2338 float: right; 2201 2339 } 2202 2340 2203 div.comment-options{2204 border-bottom: none;2341 #respond div.comment-avatar-box { 2342 margin-top: 0; 2205 2343 } 2206 2344 2207 ol.commentlist ul.children{2208 margin-left: 105px;2345 #respond div.comment-content { 2346 border-style: none; 2209 2347 } 2210 2348 2211 2349 -
bp-themes/bp-default/comments.php
54 54 <?php endif; ?> 55 55 56 56 <?php if ( comments_open() ) : ?> 57 <div id="respond"> 58 59 <div class="comment-avatar-box"> 60 <div class="avb"> 61 <?php if ( bp_loggedin_user_id() ) : ?> 62 <a href="<?php echo bp_loggedin_user_domain() ?>"> 63 <?php echo get_avatar( bp_loggedin_user_id(), 50 ) ?> 64 </a> 65 <?php else : ?> 66 <?php echo get_avatar( 0, 50 ) ?> 67 <?php endif; ?> 68 </div> 69 </div> 70 71 <div class="comment-content standard-form"> 72 <?php comment_form() ?> 73 </div><!-- .comment-content --> 74 75 </div><!-- #respond --> 57 <?php comment_form() ?> 76 58 <?php endif; ?> 77 59 78 60 <?php if ( !empty( $num_trackbacks ) ) : ?>
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)