Ticket #2988: 2988-3.patch
| File 2988-3.patch, 12.1 KB (added by , 16 years ago) |
|---|
-
bp-themes/bp-default/functions.php
371 371 * @since 1.2 372 372 */ 373 373 function bp_dtheme_blog_comments( $comment, $args, $depth ) { 374 $GLOBALS['comment'] = $comment; ?>374 $GLOBALS['comment'] = $comment; 375 375 376 <?php if ( 'pingback' == $comment->comment_type ) return false; ?> 376 if ( 'pingback' == $comment->comment_type ) 377 return false; 377 378 378 <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>"> 379 if ( 1 == $depth ) 380 $avatar_size = 50; 381 else 382 $avatar_size = 20; 383 ?> 384 <li <?php comment_class() ?> id="comment-<?php comment_ID() ?>"> 379 385 <div class="comment-avatar-box"> 380 386 <div class="avb"> 381 387 <a href="<?php echo get_comment_author_url() ?>" rel="nofollow"> 382 388 <?php if ( $comment->user_id ) : ?> 383 <?php echo bp_core_fetch_avatar( array( 'item_id' => $comment->user_id, 'width' => 50, 'height' => 50, 'email' => $comment->comment_author_email ) );?>389 <?php echo bp_core_fetch_avatar( array( 'item_id' => $comment->user_id, 'width' => $avatar_size, 'height' => $avatar_size, 'email' => $comment->comment_author_email ) ) ?> 384 390 <?php else : ?> 385 <?php echo get_avatar( $comment, 50) ?>391 <?php echo get_avatar( $comment, $avatar_size ) ?> 386 392 <?php endif; ?> 387 393 </a> 388 394 </div> 389 395 </div> 390 396 391 397 <div class="comment-content"> 398 <div class="comment-meta"> 399 <a href="<?php echo get_comment_author_url() ?>" rel="nofollow"><?php echo get_comment_author() ?></a> <?php echo _n( 'said:', 'replied:', $depth, 'buddypress' ) ?></a> 400 <span class="time-since"> <?php comment_date() ?></span> 392 401 393 <div class="comment-meta"> 394 <?php printf( __( '%s said:', 'buddypress' ), '<a href="' . get_comment_author_url() . '" rel="nofollow">' . get_comment_author() . '</a>' ) ?> 395 <em><?php _e( 'On', 'buddypress' ) ?> <a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date() ?></a></em> 402 <?php if ( 1 == $depth ) : ?> 403 · <a href="#comment-<?php comment_ID() ?>"><?php _e( 'View', 'buddypress' ) ?></a> 404 <?php else: ?> 405 · <?php echo comment_reply_link( array( 'depth' => $depth, 'max_depth' => $args['max_depth'], 'reply_text' => __( 'Reply', 'buddypress' ) ) ) ?> 406 <?php endif; ?> 407 408 <?php edit_comment_link( __( 'Edit', 'buddypress' ), '· ', '' ) ?> 396 409 </div> 397 410 398 411 <?php if ( $comment->comment_approved == '0' ) : ?> 399 <em class="moderate"><?php _e( 'Your comment is awaiting moderation.', 'buddypress' ) ;?></em><br />412 <em class="moderate"><?php _e( 'Your comment is awaiting moderation.', 'buddypress' ) ?></em><br /> 400 413 <?php endif; ?> 401 414 402 415 <?php comment_text() ?> 403 416 404 < div class="comment-options">405 < ?php echo comment_reply_link( array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ?>406 <?php edit_comment_link( __( 'Edit', 'buddypress' ), '', '' );?>407 </div>408 417 <?php if ( 1 == $depth ) : ?> 418 <div class="comment-options"> 419 <?php echo comment_reply_link( array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ?> 420 </div> 421 <?php endif; ?> 409 422 </div> 410 423 <?php 411 424 } … … 539 552 ); 540 553 541 554 $new_labels = array( 542 'cancel_reply_link' => '<p id="cancel-comment-reply">' . __( 'Cancel reply', 'buddypress' ) . '</p>',543 555 '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>', 544 556 'comment_notes_after' => '', 545 557 'comment_notes_before' => '', 546 558 'fields' => apply_filters( 'comment_form_default_fields', $fields ), 547 559 '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>', 548 '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>', 549 'title_reply' => '<h3 id="reply" class="comments-header">' . __( 'Leave a reply', 'buddypress' ) . '</h3>', 550 'title_reply_to' => '<h3 id="reply" class="comments-header">' . __( 'Leave a reply to %s', 'buddypress' ) . '</h3>' 560 '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>' 551 561 ); 552 562 553 563 return apply_filters( 'bp_dtheme_comment_form', array_merge( $default_labels, $new_labels ) ); 554 564 } 555 565 add_filter( 'comment_form_defaults', 'bp_dtheme_comment_form', 10 ); 556 566 567 /** 568 * Adds the user's avatar before the comment form box. 569 * 570 * The 'comment_form_top' action is used to insert our HTML within <div id="reply"> 571 * so that the nested comments comment-reply javascript moves the entirety of the comment reply area. 572 * 573 * @see comment_form() 574 * @since 1.3 575 */ 576 function bp_dtheme_before_comment_form() { 577 ?> 578 <div class="comment-avatar-box"> 579 <div class="avb"> 580 <?php if ( bp_loggedin_user_id() ) : ?> 581 <a href="<?php echo bp_loggedin_user_domain() ?>"> 582 <?php echo get_avatar( bp_loggedin_user_id(), 50 ) ?> 583 </a> 584 <?php else : ?> 585 <?php echo get_avatar( 0, 50 ) ?> 586 <?php endif; ?> 587 </div> 588 </div> 557 589 590 <div class="comment-content standard-form"> 591 <?php 592 } 593 add_action( 'comment_form_top', 'bp_dtheme_before_comment_form' ); 594 595 /** 596 * Closes tags opened in bp_dtheme_before_comment_form(). 597 * 598 * @see bp_dtheme_before_comment_form() 599 * @see comment_form() 600 * @since 1.3 601 */ 602 function bp_dtheme_after_comment_form() { 603 ?> 604 </div><!-- .comment-content standard-form --> 605 <?php 606 } 607 add_action( 'comment_form', 'bp_dtheme_after_comment_form' ); 608 609 558 610 // Everything beyond this point is deprecated as of BuddyPress 1.3. This will be removed in a future version. 559 611 560 612 /** -
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 { 2213 div.comment-content { 2214 border-top: 1px solid #e4e4e4; 2215 padding-left: 75px; 2216 } 2217 2218 .commentlist .children .comment { 2219 margin-bottom: 5px; 2220 } 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 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 div.comment-options a.comment-reply-link { 2255 background: #FFF9DB; 2256 border-bottom: 1px solid #FFE8C4; 2257 border-radius: 4px; 2258 border-right: 1px solid #FFE8C4; 2259 color: #ffa200; 2260 margin-right: 10px; 2261 padding: 3px 8px; 2262 text-decoration: none; 2263 -moz-border-radius: 4px; 2264 -webkit-border-radius: 4px; 2265 } 2266 2267 div.comment-options a.comment-reply-link:hover { 2268 background: #f7740a; 2269 border-color: #f7740a; 2270 color: #fff; 2271 } 2272 2273 ul.children { 2274 background: #f5f5f5; 2275 margin-bottom: 20px; 2276 margin-left: 75px; 2277 padding: 1px 10px; 2278 -moz-border-radius: 4px; 2279 -webkit-border-radius: 4px; 2280 } 2281 2282 ul.children ul { 2283 margin-left: 20px; 2284 margin-bottom: 0; 2285 padding: 0; 2286 } 2287 2288 ul.children img.avatar { 2289 border-style: none; 2290 height: 25px; 2291 margin: 0; 2292 width: 25px; 2293 } 2294 2295 ul.children div.comment-content { 2217 2296 border-top: none; 2218 padding- top: 0;2297 padding-left: 35px; 2219 2298 } 2220 2299 2221 div.comment-meta h5 { 2222 font-weight: normal; 2300 ul.children div.comment-meta { 2301 font-size: 11px; 2302 margin-top: 0; 2223 2303 } 2224 2304 2225 div.comment-meta em { 2305 ul.children div.comment-options { 2306 margin-bottom: 5px; 2307 margin-top: 0; 2308 } 2309 2310 ul.children li { 2311 border-top: 2px solid #fffeff; 2312 padding-top: 10px; 2313 } 2314 2315 ul.children li:first-child { 2316 border-top: none; 2317 } 2318 2319 ul.children ul li:first-child { 2320 border-top: 2px solid #fffeff; 2321 } 2322 2323 ul.children div.comment-options a.comment-reply-link { 2324 background: transparent; 2325 border-style: none; 2326 color: #1fb3dd; 2327 margin-right: 0; 2328 padding: 3px 8px; 2329 text-decoration: underline; 2330 } 2331 2332 ul.children div.comment-options a.comment-reply-link:hover { 2333 background: transparent; 2334 border-style: none; 2335 color: #1fb3dd; 2336 } 2337 2338 #respond { 2339 background-color: #fafafa; 2340 border: 1px solid #e5e5e5; 2341 border-radius: 4px; 2342 margin-bottom: 20px; 2343 margin-left: 75px; 2344 padding: 10px; 2345 -moz-border-radius: 4px; 2346 -webkit-border-radius: 4px; 2347 } 2348 2349 ul.children #respond { 2350 margin-bottom: 10px; 2351 margin-left: 35px; 2352 margin-right: 20px; 2353 } 2354 2355 h3#reply .comments-header { 2356 font-size: 14px; 2357 } 2358 2359 #reply-title small { 2226 2360 float: right; 2227 2361 } 2228 2362 2229 div.comment-options{2230 border-bottom: none;2363 #respond div.comment-avatar-box { 2364 margin-top: 0; 2231 2365 } 2232 2366 2367 #respond div.comment-content { 2368 border-style: none; 2369 } 2233 2370 2371 2234 2372 /* > Footer 2235 2373 -------------------------------------------------------------- */ 2236 2374 -
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)