Ticket #2988: 2988-4.patch
File 2988-4.patch, 13.3 KB (added by , 13 years ago) |
---|
-
bp-themes/bp-default/functions.php
85 85 define( 'HEADER_TEXTCOLOR', 'FFFFFF' ); 86 86 // No CSS. The %s is a placeholder for the theme template directory URI. 87 87 define( 'HEADER_IMAGE', '%s/_inc/images/default_header.jpg' ); 88 88 89 89 // The height and width of your custom header. You can hook into the theme's own filters to change these values. 90 90 // Add a filter to bp_dtheme_header_image_width and bp_dtheme_header_image_height to change these values. 91 91 define( 'HEADER_IMAGE_WIDTH', apply_filters( 'bp_dtheme_header_image_width', 1250 ) ); 92 92 define( 'HEADER_IMAGE_HEIGHT', apply_filters( 'bp_dtheme_header_image_height', 125 ) ); 93 93 94 94 // We'll be using post thumbnails for custom header images on posts and pages. We want them to be 1250 pixels wide by 125 pixels tall. 95 95 // Larger images will be auto-cropped to fit, smaller ones will be ignored. 96 96 set_post_thumbnail_size( HEADER_IMAGE_WIDTH, HEADER_IMAGE_HEIGHT, true ); 97 97 98 98 // Add a way for the custom header to be styled in the admin panel that controls custom headers. 99 99 add_custom_image_header( 'bp_dtheme_header_style', 'bp_dtheme_admin_header_style' ); 100 100 } … … 381 381 * @since 1.2 382 382 */ 383 383 function bp_dtheme_blog_comments( $comment, $args, $depth ) { 384 $GLOBALS['comment'] = $comment; ?>384 $GLOBALS['comment'] = $comment; 385 385 386 <?php if ( 'pingback' == $comment->comment_type ) return false; ?> 386 if ( 'pingback' == $comment->comment_type ) 387 return false; 387 388 388 <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>"> 389 if ( 1 == $depth ) 390 $avatar_size = 50; 391 else 392 $avatar_size = 20; 393 ?> 394 <li <?php comment_class() ?> id="comment-<?php comment_ID() ?>"> 389 395 <div class="comment-avatar-box"> 390 396 <div class="avb"> 391 397 <a href="<?php echo get_comment_author_url() ?>" rel="nofollow"> 392 398 <?php if ( $comment->user_id ) : ?> 393 <?php echo bp_core_fetch_avatar( array( 'item_id' => $comment->user_id, 'width' => 50, 'height' => 50, 'email' => $comment->comment_author_email ) );?>399 <?php echo bp_core_fetch_avatar( array( 'item_id' => $comment->user_id, 'width' => $avatar_size, 'height' => $avatar_size, 'email' => $comment->comment_author_email ) ) ?> 394 400 <?php else : ?> 395 <?php echo get_avatar( $comment, 50) ?>401 <?php echo get_avatar( $comment, $avatar_size ) ?> 396 402 <?php endif; ?> 397 403 </a> 398 404 </div> 399 405 </div> 400 406 401 407 <div class="comment-content"> 408 <div class="comment-meta"> 409 <a href="<?php echo get_comment_author_url() ?>" rel="nofollow"><?php echo get_comment_author() ?></a> <?php echo _n( 'said:', 'replied:', $depth, 'buddypress' ) ?></a> 410 <span class="time-since"> <?php comment_date() ?></span> 402 411 403 <div class="comment-meta"> 404 <?php printf( __( '%s said:', 'buddypress' ), '<a href="' . get_comment_author_url() . '" rel="nofollow">' . get_comment_author() . '</a>' ) ?> 405 <em><?php _e( 'On', 'buddypress' ) ?> <a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date() ?></a></em> 412 <?php if ( 1 == $depth ) : ?> 413 · <a href="#comment-<?php comment_ID() ?>"><?php _e( 'View', 'buddypress' ) ?></a> 414 <?php else: ?> 415 · <?php echo comment_reply_link( array( 'depth' => $depth, 'max_depth' => $args['max_depth'], 'reply_text' => __( 'Reply', 'buddypress' ) ) ) ?> 416 <?php endif; ?> 417 418 <?php edit_comment_link( __( 'Edit', 'buddypress' ), '· ', '' ) ?> 406 419 </div> 407 420 408 421 <?php if ( $comment->comment_approved == '0' ) : ?> 409 <em class="moderate"><?php _e( 'Your comment is awaiting moderation.', 'buddypress' ) ;?></em><br />422 <em class="moderate"><?php _e( 'Your comment is awaiting moderation.', 'buddypress' ) ?></em><br /> 410 423 <?php endif; ?> 411 424 412 425 <?php comment_text() ?> 413 426 414 < div class="comment-options">415 < ?php echo comment_reply_link( array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ?>416 <?php edit_comment_link( __( 'Edit', 'buddypress' ), '', '' );?>417 </div>418 427 <?php if ( 1 == $depth ) : ?> 428 <div class="comment-options"> 429 <?php echo comment_reply_link( array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ?> 430 </div> 431 <?php endif; ?> 419 432 </div> 420 433 <?php 421 434 } … … 549 562 ); 550 563 551 564 $new_labels = array( 552 'cancel_reply_link' => '<p id="cancel-comment-reply">' . __( 'Cancel reply', 'buddypress' ) . '</p>',553 565 '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>', 554 566 'comment_notes_after' => '', 555 567 'comment_notes_before' => '', 556 568 'fields' => apply_filters( 'comment_form_default_fields', $fields ), 557 569 '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>', 558 '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>', 559 'title_reply' => '<h3 id="reply" class="comments-header">' . __( 'Leave a reply', 'buddypress' ) . '</h3>', 560 'title_reply_to' => '<h3 id="reply" class="comments-header">' . __( 'Leave a reply to %s', 'buddypress' ) . '</h3>' 570 '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>' 561 571 ); 562 572 563 573 return apply_filters( 'bp_dtheme_comment_form', array_merge( $default_labels, $new_labels ) ); 564 574 } 565 575 add_filter( 'comment_form_defaults', 'bp_dtheme_comment_form', 10 ); 566 576 577 /** 578 * Adds the user's avatar before the comment form box. 579 * 580 * The 'comment_form_top' action is used to insert our HTML within <div id="reply"> 581 * so that the nested comments comment-reply javascript moves the entirety of the comment reply area. 582 * 583 * @see comment_form() 584 * @since 1.3 585 */ 586 function bp_dtheme_before_comment_form() { 587 ?> 588 <div class="comment-avatar-box"> 589 <div class="avb"> 590 <?php if ( bp_loggedin_user_id() ) : ?> 591 <a href="<?php echo bp_loggedin_user_domain() ?>"> 592 <?php echo get_avatar( bp_loggedin_user_id(), 50 ) ?> 593 </a> 594 <?php else : ?> 595 <?php echo get_avatar( 0, 50 ) ?> 596 <?php endif; ?> 597 </div> 598 </div> 567 599 600 <div class="comment-content standard-form"> 601 <?php 602 } 603 add_action( 'comment_form_top', 'bp_dtheme_before_comment_form' ); 604 605 /** 606 * Closes tags opened in bp_dtheme_before_comment_form(). 607 * 608 * @see bp_dtheme_before_comment_form() 609 * @see comment_form() 610 * @since 1.3 611 */ 612 function bp_dtheme_after_comment_form() { 613 ?> 614 </div><!-- .comment-content standard-form --> 615 <?php 616 } 617 add_action( 'comment_form', 'bp_dtheme_after_comment_form' ); 618 619 568 620 // Everything beyond this point is deprecated as of BuddyPress 1.3. This will be removed in a future version. 569 621 570 622 /** -
bp-themes/bp-default/_inc/css/default.css
1494 1494 } 1495 1495 1496 1496 .activity-list .activity-header a:first-child, 1497 .commentlist .depth-1 > .comment-content .comment-meta a:first-child, 1497 1498 span.highlight { 1498 1499 background: #ebf7ff; 1499 1500 border-bottom: 1px solid #a1dcfa; … … 1516 1517 outline: none; 1517 1518 } 1518 1519 1519 .activity-list .activity-content span.time-since { 1520 .activity-list .activity-content span.time-since, 1521 .comment-content .comment-meta span.time-since { 1520 1522 color: #bbb; 1521 1523 } 1522 1524 … … 1669 1671 padding: 10px 0 0; 1670 1672 } 1671 1673 1672 div.activity-comments ul li p:last-child { 1674 div.activity-comments ul li p:last-child, 1675 .commentlist .comment-content a:first-child { 1673 1676 margin-bottom: 10px; 1674 1677 } 1675 1678 … … 2052 2055 border-top: 1px solid #eee; 2053 2056 } 2054 2057 2055 div.post div.author-box, 2056 div.comment-avatar-box { 2058 div.post div.author-box { 2057 2059 background: #f0f0f0; 2058 2060 padding: 10px; 2059 2061 float: left; … … 2077 2079 text-decoration: none; 2078 2080 } 2079 2081 2080 div.post div.author-box img, 2081 div.comment-avatar-box img { 2082 div.post div.author-box img { 2082 2083 float: none; 2083 2084 border: 4px solid #fff; 2084 2085 margin: 0; 2085 2086 } 2086 2087 2087 div.post div.post-content, 2088 div.comment-content { 2088 div.post div.post-content { 2089 2089 margin-left: 105px; 2090 2090 } 2091 2091 2092 div.post p.date, div.post p.postmetadata,2093 div. comment-meta, div.comment-options{2092 div.post p.date, 2093 div.post p.postmetadata { 2094 2094 color: #888; 2095 2095 font-size: 12px; 2096 2096 font-family: Georgia, times, serif; … … 2188 2188 margin-top: 30px; 2189 2189 } 2190 2190 2191 #comments h3, 2192 #trackbacks h3, 2193 #respond h3 { 2194 font-size: 20px; 2195 margin: 5px 0 25px 0; 2196 font-weight: normal; 2197 color: #555; 2191 .commentlist .bypostauthor { 2198 2192 } 2199 2193 2200 #comments span.title,2201 #trackbacks span.title { 2202 color: #aaa;2194 #comments ol.commentlist { 2195 border-bottom: 1px solid #e4e4e4; 2196 margin-bottom: 30px; 2203 2197 } 2204 2198 2205 .commentlist .bypostauthor { 2199 ol.commentlist div.comment-avatar-box { 2200 float: left; 2201 margin: 10px 10px 10px 0; 2206 2202 } 2207 2203 2208 ol.commentlist li { 2209 margin: 0 0 30px 0; 2204 ul.children div.comment-avatar-box { 2205 float: left; 2206 margin: 0px 10px 10px 0; 2210 2207 } 2211 2208 2212 ol.commentlist ul.children{2213 margin-left: 105px;2209 div.comment-avatar-box img { 2210 border: 2px solid #eee; 2214 2211 } 2215 2212 2216 div.comment- meta{2217 border-top: none;2218 padding- top: 0;2213 div.comment-content { 2214 border-top: 1px solid #e4e4e4; 2215 padding-left: 75px; 2219 2216 } 2220 2217 2221 div.comment-meta h5{2222 font-weight: normal;2218 .commentlist .children .comment { 2219 margin-bottom: 5px; 2223 2220 } 2224 2221 2222 div.comment-meta, 2223 div.comment-options { 2224 color: #888; 2225 font-size: 11px; 2226 margin: 10px 0; 2227 padding: 0 0 3px; 2228 } 2229 2225 2230 div.comment-meta em { 2231 font-style: normal; 2232 } 2233 2234 div.comment-meta span.comment-highlight a { 2235 background: #EBF7FF; 2236 border-bottom: 1px solid #a1dcfa; 2237 border-radius: 4px; 2238 border-right: 1px solid #a1dcfa; 2239 color: #059AE7; 2240 margin-right: 3px; 2241 padding: 3px 8px; 2242 text-decoration: none; 2243 -moz-border-radius: 4px; 2244 -webkit-border-radius: 4px; 2245 } 2246 2247 div.comment-meta .comment-highlight a:hover, 2248 .commentlist .depth-1 > .comment-content .comment-meta a:first-child:hover { 2249 background: #059AE7; 2250 border-color: #059AE7; 2251 color: #fff; 2252 } 2253 2254 #reply-title small { 2226 2255 float: right; 2256 font-size: 11px; 2257 font-weight: normal; 2227 2258 } 2228 2259 2229 div.comment-options { 2230 border-bottom: none; 2260 #reply-title small a, 2261 div.comment-options a.comment-reply-link { 2262 background: #FFF9DB; 2263 border-bottom: 1px solid #FFE8C4; 2264 border-radius: 4px; 2265 border-right: 1px solid #FFE8C4; 2266 color: #ffa200; 2267 margin-right: 10px; 2268 padding: 3px 8px; 2269 text-decoration: none; 2270 -moz-border-radius: 4px; 2271 -webkit-border-radius: 4px; 2231 2272 } 2232 2273 2274 #reply-title small a { 2275 margin-right: 0; 2276 } 2233 2277 2278 #reply-title small a:hover, 2279 div.comment-options a.comment-reply-link:hover { 2280 background: #f7740a; 2281 border-color: #f7740a; 2282 color: #fff; 2283 } 2284 2285 ul.children { 2286 background: #f5f5f5; 2287 margin-bottom: 20px; 2288 margin-left: 75px; 2289 padding: 1px 10px; 2290 -moz-border-radius: 4px; 2291 -webkit-border-radius: 4px; 2292 } 2293 2294 ul.children ul { 2295 margin-left: 20px; 2296 margin-bottom: 0; 2297 padding: 5px 0 0 0; 2298 } 2299 2300 ul.children img.avatar { 2301 border-style: none; 2302 height: 25px; 2303 margin: 0; 2304 width: 25px; 2305 } 2306 2307 ul.children div.comment-content { 2308 border-top: none; 2309 padding-left: 35px; 2310 } 2311 2312 ul.children div.comment-meta { 2313 font-size: 11px; 2314 margin-top: 0; 2315 } 2316 2317 ul.children div.comment-options { 2318 margin-bottom: 5px; 2319 margin-top: 0; 2320 } 2321 2322 ul.children li { 2323 border-top: 2px solid #fffeff; 2324 padding-top: 10px; 2325 } 2326 2327 ul.children li:first-child { 2328 border-top: none; 2329 } 2330 2331 ul.children ul li:first-child { 2332 border-top: 2px solid #fffeff; 2333 } 2334 2335 ul.children div.comment-options a.comment-reply-link { 2336 background: transparent; 2337 border-style: none; 2338 color: #1fb3dd; 2339 margin-right: 0; 2340 padding: 3px 8px; 2341 text-decoration: underline; 2342 } 2343 2344 ul.children div.comment-options a.comment-reply-link:hover { 2345 background: transparent; 2346 border-style: none; 2347 color: #1fb3dd; 2348 } 2349 2350 #respond { 2351 background-color: #fafafa; 2352 border: 1px solid #e5e5e5; 2353 border-radius: 4px; 2354 margin-bottom: 20px; 2355 padding: 10px; 2356 -moz-border-radius: 4px; 2357 -webkit-border-radius: 4px; 2358 } 2359 2360 ol.commentlist #respond { 2361 margin-left: 75px; 2362 } 2363 2364 ul.children #respond { 2365 margin-bottom: 10px; 2366 margin-left: 35px; 2367 margin-right: 20px; 2368 } 2369 2370 h3#reply .comments-header { 2371 font-size: 14px; 2372 } 2373 2374 #respond div.comment-avatar-box { 2375 margin-top: 0; 2376 } 2377 2378 #respond div.comment-content { 2379 border-style: none; 2380 } 2381 2382 2234 2383 /* > Footer 2235 2384 -------------------------------------------------------------- */ 2236 2385 -
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 ) ) : ?>