Changeset 2204
- Timestamp:
- 12/18/2009 02:28:54 PM (16 years ago)
- Location:
- trunk/bp-themes/bp-default
- Files:
-
- 5 edited
-
_inc/css/default.css (modified) (10 diffs)
-
comments.php (modified) (2 diffs)
-
functions.php (modified) (1 diff)
-
index.php (modified) (1 diff)
-
single.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-themes/bp-default/_inc/css/default.css
r2201 r2204 1371 1371 } 1372 1372 1373 ul#topic-post-list li div .poster-meta {1373 ul#topic-post-list li divdiv.poster-meta { 1374 1374 margin-bottom: 10px; 1375 1375 color: #888; 1376 1376 } 1377 1377 1378 ul#topic-post-list li div .post-content {1378 ul#topic-post-list li divdiv.post-content { 1379 1379 margin-left: 54px; 1380 1380 } … … 1408 1408 -------------------------------------------------------------- */ 1409 1409 1410 .post { 1411 margin: 0 0 40px 0; 1412 } 1413 .post h3 { 1410 div.post { 1411 margin: 0 0 60px 0; 1412 } 1413 div.post div.author-box, div.comment-avatar-box { 1414 background: #f0f0f0; 1415 padding: 10px; 1416 float: left; 1417 margin: 0 15px 15px 0; 1418 text-align: center; 1419 width: 70px; 1420 -moz-border-radius: 3px; 1421 -webkit-border-radius: 3px; 1422 border-radius: 3px; 1423 } 1424 div.post div.author-box img, div.comment-avatar-box img { 1425 float: none; 1426 border: 4px solid #fff; 1427 } 1428 1429 div.post div.post-content, div.comment-content { 1430 margin-left: 105px; 1431 } 1432 1433 div.post h3 { 1414 1434 font-size: 24px; 1415 1435 margin-bottom: 5px; 1416 } 1417 .post h3 a { 1436 line-height: 120%; 1437 } 1438 div.post h3 a { 1418 1439 text-decoration: none; 1419 1440 color: #666; … … 1421 1442 } 1422 1443 1423 .post p.date, .post p.postmetadata{1444 div.post p.date, div.post p.postmetadata, div.comment-meta, div.comment-options { 1424 1445 color: #888; 1425 1446 font-size: 11px; 1426 padding-bottom: 5px; 1447 padding: 3px 0; 1448 margin: 10px 0; 1427 1449 border-bottom: 1px solid #e4e4e4; 1428 }1429 1430 .post p.postmetadata {1431 padding-top: 5px;1432 1450 border-top: 1px solid #e4e4e4; 1433 border-bottom: none; 1451 } 1452 1453 div.post p.postmetadata { 1434 1454 margin-top: 15px; 1435 1455 overflow: hidden; 1436 1456 } 1437 1457 1438 .post .tags { float: left; }1439 .post .comments { float: right; }1440 1441 .post img.wp-smiley { padding: 0 !important; margin: 0 !important; border: none !important; float: none !important; clear: none !important; }1442 1443 .post img.centered, img.aligncenter {1458 div.post .tags { float: left; } 1459 div.post .comments { float: right; } 1460 1461 div.post img.wp-smiley { padding: 0 !important; margin: 0 !important; border: none !important; float: none !important; clear: none !important; } 1462 1463 div.post img.centered, img.aligncenter { 1444 1464 display: block; 1445 1465 margin-left: auto; … … 1447 1467 } 1448 1468 1449 .post img.alignright {1469 div.post img.alignright { 1450 1470 padding: 4px; 1451 1471 margin: 0 0 2px 7px; … … 1453 1473 } 1454 1474 1455 .post img.alignleft {1475 div.post img.alignleft { 1456 1476 padding: 4px; 1457 1477 margin: 0 7px 2px 0; … … 1470 1490 } 1471 1491 1472 .post .aligncenter,.post div.aligncenter {1492 div.post .aligncenter, div.post div.aligncenter { 1473 1493 display: block; 1474 1494 margin-left: auto; … … 1476 1496 } 1477 1497 1478 .post .wp-caption {1498 div.post .wp-caption { 1479 1499 border: 1px solid #ddd; 1480 1500 text-align: center; … … 1483 1503 margin: 10px 0; 1484 1504 -moz-border-radius: 3px; 1485 -khtml-border-radius: 3px;1486 1505 -webkit-border-radius: 3px; 1487 1506 border-radius: 3px; 1488 1507 } 1489 1508 1490 .post .wp-caption img {1509 div.post .wp-caption img { 1491 1510 margin: 0; 1492 1511 padding: 0; … … 1494 1513 } 1495 1514 1496 .post dd.wp-caption p.wp-caption-text,.post .wp-caption p.wp-caption-text {1515 div.post dd.wp-caption p.wp-caption-text, div.post .wp-caption p.wp-caption-text { 1497 1516 font-size: 0.9em; 1498 1517 line-height: 17px; … … 1501 1520 } 1502 1521 1503 /* WordPress comment form styles */ 1504 1505 #commentform { padding: 1em 1.5em; } 1506 #commentform textarea { width: 100%;} 1507 #comment-textarea { float: right; width: 80%; } 1508 1509 .comment-details { float: left; width: 20%; } 1510 .comment-content { float: right; width: 80%; } 1511 1512 .commentlist li { 1513 padding: 15px; 1514 background: #fff; 1515 margin-bottom: 1em; 1516 -moz-border-radius: 3px; 1517 -khtml-border-radius: 3px; 1518 -webkit-border-radius: 3px; 1519 border-radius: 3px; 1520 } 1521 1522 .commentlist li.alt { background: #f0f0f0; } 1523 .commentlist li img.avatar { 1524 padding: 0; 1525 margin: 0 10px 10px 0; 1526 float: left; 1527 1528 } 1529 .commentlist li.alt img.avatar { border-color: #fff !important; } 1530 1531 .commentmetadata { 1532 font-size: 0.9em; 1533 border-bottom: 1px solid #ddd; 1534 padding-bottom: 10px; 1535 margin-bottom: 15px; 1536 } 1537 .commentmetadata a { color: #888; } 1538 1539 #commentform input, #commentform textarea { 1540 margin: 0 5px 8px 0; 1522 /* > WordPress Blog Comment Styles 1523 -------------------------------------------------------------- */ 1524 1525 #trackbacks { 1526 margin-top: 30px; 1527 } 1528 1529 #comments h3, #trackbacks h3, #respond h3 { 1530 font-size: 20px; 1531 margin: 5px 0 25px 0; 1532 font-weight: normal; 1533 color: #555; 1534 } 1535 1536 #comments span.title, #trackbacks span.title { 1537 color: #aaa; 1538 } 1539 1540 ol.commentlist li { 1541 margin: 0 0 30px 0; 1542 } 1543 1544 div.comment-meta { 1545 border-top: none; 1546 padding-top: 0; 1547 } 1548 1549 div.comment-meta h5 { 1550 font-weight: normal; 1551 } 1552 1553 div.comment-meta em { 1554 float: right; 1555 } 1556 1557 div.comment-options { 1558 border-bottom: none; 1541 1559 } 1542 1560 -
trunk/bp-themes/bp-default/comments.php
r2170 r2204 10 10 ?> 11 11 12 < div id="comments-template">12 <?php if ( have_comments() ) : ?> 13 13 14 < ?php if ( have_comments() ) : ?>14 <div id="comments"> 15 15 16 <div id="comments"> 16 <?php 17 $numTrackBacks = 0; $numComments = 0; 18 foreach ( $comments as $comment ) if ( get_comment_type() != "comment") $numTrackBacks++; else $numComments++; 19 ?> 17 20 18 <h3 id="comments-number" class="comments-header"><?php comments_number( sprintf( __('No responses to %1$s', 'buddypress'), the_title( '“', '”', false ) ), sprintf( __('One response to %1$s', 'buddypress'), the_title( '“', '”', false ) ), sprintf( __('%1$s responses to %2$s', 'buddypress'), '%', the_title( '“', '”', false ) ) ); ?></h3> 21 <span class="title"><?php the_title() ?></span> 22 <h3 id="comments"><?php comments_number( 'No Comments', 'One Comment', $numComments . ' Comments' );?></h3> 19 23 20 <?php do_action( 'bp_before_blog_comment_list' ) ?>24 <?php do_action( 'bp_before_blog_comment_list' ) ?> 21 25 22 <ol class="commentlist">23 <?php wp_list_comments( array( 'style' => 'ol', 'type' => 'all' ) ); ?>24 </ol><!-- .comment-list -->26 <ol class="commentlist"> 27 <?php wp_list_comments( array( 'callback' => 'bp_dtheme_comments' ) ); ?> 28 </ol><!-- .comment-list --> 25 29 26 <?php do_action( 'bp_after_blog_comment_list' ) ?>30 <?php do_action( 'bp_after_blog_comment_list' ) ?> 27 31 28 <?php if ( get_option( 'page_comments' ) ) : ?>32 <?php if ( get_option( 'page_comments' ) ) : ?> 29 33 30 <div class="comment-navigation paged-navigation">34 <div class="comment-navigation paged-navigation"> 31 35 32 <?php paginate_comments_links(); ?>36 <?php paginate_comments_links(); ?> 33 37 34 </div> 35 <?php endif; ?> 36 37 </div><!-- #comments --> 38 39 <?php else : ?> 40 41 <?php if ( pings_open() && !comments_open() && is_single() ) : ?> 42 43 <p class="comments-closed pings-open"> 44 <?php printf( __('Comments are closed, but <a href="%1$s" title="Trackback URL for this post">trackbacks</a> and pingbacks are open.', 'buddypress'), trackback_url( '0' ) ); ?> 45 </p> 46 47 <?php elseif ( !comments_open() && is_single() ) : ?> 48 49 <p class="comments-closed"> 50 <?php _e('Comments are closed.', 'buddypress'); ?> 51 </p> 38 </div> 52 39 53 40 <?php endif; ?> 54 41 42 </div><!-- #comments --> 43 44 <?php else : ?> 45 46 <?php if ( pings_open() && !comments_open() && is_single() ) : ?> 47 48 <p class="comments-closed pings-open"> 49 <?php printf( __('Comments are closed, but <a href="%1$s" title="Trackback URL for this post">trackbacks</a> and pingbacks are open.', 'buddypress'), trackback_url( '0' ) ); ?> 50 </p> 51 52 <?php elseif ( !comments_open() && is_single() ) : ?> 53 54 <p class="comments-closed"> 55 <?php _e('Comments are closed.', 'buddypress'); ?> 56 </p> 57 55 58 <?php endif; ?> 59 60 <?php endif; ?> 56 61 57 62 <?php if ( comments_open() ) : ?> 58 63 59 <div id="respond"> 64 <div id="respond"> 65 66 <div class="comment-avatar-box"> 67 <div class="avb"> 68 <?php if ( bp_loggedin_user_id() ) : ?> 69 <a href="<?php echo bp_loggedin_user_domain() ?>"> 70 <?php echo get_avatar( bp_loggedin_user_id(), 50 ); ?> 71 </a> 72 <?php else : ?> 73 <?php echo get_avatar( 0, 50 ); ?> 74 <?php endif; ?> 75 </div> 76 </div> 77 78 <div class="comment-content"> 60 79 61 80 <h3 id="reply" class="comments-header"> 62 <?php comment_form_title( __( 'Leave a Reply', 'buddypress'), __('Leave a Reply to %s', 'buddypress'), true ); ?>81 <?php comment_form_title( __( 'Leave a Reply', 'buddypress' ), __( 'Leave a Reply to %s', 'buddypress' ), true ); ?> 63 82 </h3> 64 83 65 84 <p id="cancel-comment-reply"> 66 <?php cancel_comment_reply_link( __( 'Click here to cancel reply.', 'buddypress') ); ?>85 <?php cancel_comment_reply_link( __( 'Click here to cancel reply.', 'buddypress' ) ); ?> 67 86 </p> 68 87 … … 128 147 <?php endif; ?> 129 148 130 </div> 149 </div><!-- .comment-content --> 150 </div><!-- #respond --> 131 151 132 152 <?php endif; ?> 133 153 134 </div> 154 <?php if ( $numTrackBacks ) : ?> 155 <div id="trackbacks"> 156 157 <span class="title"><?php the_title() ?></span> 158 159 <?php if ( 1 == $numTrackBacks ) : ?> 160 <h3><?php printf( __( '%d Trackback', 'buddypress' ), $numTrackBacks ) ?></h3> 161 <?php else : ?> 162 <h3><?php printf( __( '%d Trackbacks', 'buddypress' ), $numTrackBacks ) ?></h3> 163 <?php endif; ?> 164 165 <ul id="trackbacklist"> 166 <?php foreach ( $comments as $comment ) : ?> 167 168 <?php if ( get_comment_type() != 'comment' ) : ?> 169 <li><h5><?php comment_author_link() ?></h5><em>on <?php comment_date() ?></em></li> 170 <?php endif; ?> 171 <?php endforeach; ?> 172 </ul> 173 </div> 174 <?php endif; ?> -
trunk/bp-themes/bp-default/functions.php
r2195 r2204 55 55 } 56 56 57 function bp_dtheme_add_blog_comments_js() { 58 if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); 59 } 60 add_action( 'template_redirect', 'bp_dtheme_add_blog_comments_js' ); 61 62 function bp_dtheme_comments( $comment, $args, $depth ) { 63 $GLOBALS['comment'] = $comment; 64 $comment_type = get_comment_type(); 65 66 if ( $comment->user_id ) 67 $userlink = bp_core_get_userurl( $comment->user_id ); 68 69 if ( $comment_type == 'comment' ) { ?> 70 <li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>"> 71 72 <div class="comment-avatar-box<?php if ( $comment->user_id ) : ?> extra<?php endif; ?>"> 73 <div class="avb"> 74 <a href="<?php if ( $userlink ) : echo $userlink; else : echo get_comment_author_url(); endif;?>"> 75 <?php echo get_avatar( $comment, 50 ); ?> 76 </a> 77 </div> 78 </div> 79 80 <div class="comment-content"> 81 82 <div class="comment-meta"> 83 <a href="<?php if ( $userlink ) : echo $userlink; else : echo get_comment_author_url(); endif;?>"><?php echo get_comment_author(); ?></a> <?php _e( 'said:', 'buddypress' ) ?> 84 <em><?php _e( 'On', 'buddypress' ) ?> <a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date() ?></a></em> 85 </div> 86 87 <?php if ($comment->comment_approved == '0') : ?> 88 <em class="moderate"><?php _e('Your comment is awaiting moderation.'); ?></em><br /> 89 <?php endif; ?> 90 91 <?php comment_text() ?> 92 93 <div class="comment-options"> 94 <?php echo comment_reply_link( array('depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ?> 95 <?php edit_comment_link( __( 'Edit' ),'','' ); ?> 96 </div> 97 98 </div> 99 </li> 100 <?php } ?> 101 <?php 102 } 103 57 104 function bp_dtheme_remove_redundant() { 58 105 global $bp; -
trunk/bp-themes/bp-default/index.php
r2170 r2204 16 16 <div class="post" id="post-<?php the_ID(); ?>"> 17 17 18 <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', 'buddypress' ) ?> <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> 19 20 <p class="date"><?php the_time('F j, Y') ?> <em><?php _e( 'in', 'buddypress' ) ?> <?php the_category(', ') ?> <?php printf( __( 'by %s', 'buddypress' ), bp_core_get_userlink($post->post_author) ) ?></em></p> 21 22 <div class="entry"> 23 <?php the_content( __( 'Read the rest of this entry »', 'buddypress' ) ); ?> 18 <div class="author-box"> 19 <?php echo get_avatar( get_the_author_email(), '50' ); ?> 20 <p><?php printf( __( 'by %s', 'buddypress' ), bp_core_get_userlink( $post->post_author ) ) ?></p> 24 21 </div> 25 22 26 <p class="postmetadata"><span class="tags"><?php the_tags( __( 'Tags: ', 'buddypress' ), ', ', '<br />'); ?></span> <span class="comments"><?php comments_popup_link( __( 'No Comments »', 'buddypress' ), __( '1 Comment »', 'buddypress' ), __( '% Comments »', 'buddypress' ) ); ?></span></p> 23 <div class="post-content"> 24 <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', 'buddypress' ) ?> <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> 25 26 <p class="date"><?php the_time('F j, Y') ?> <em><?php _e( 'in', 'buddypress' ) ?> <?php the_category(', ') ?> <?php printf( __( 'by %s', 'buddypress' ), bp_core_get_userlink( $post->post_author ) ) ?></em></p> 27 28 <div class="entry"> 29 <?php the_content( __( 'Read the rest of this entry »', 'buddypress' ) ); ?> 30 </div> 31 32 <p class="postmetadata"><span class="tags"><?php the_tags( __( 'Tags: ', 'buddypress' ), ', ', '<br />'); ?></span> <span class="comments"><?php comments_popup_link( __( 'No Comments »', 'buddypress' ), __( '1 Comment »', 'buddypress' ), __( '% Comments »', 'buddypress' ) ); ?></span></p> 33 </div> 27 34 28 35 </div> -
trunk/bp-themes/bp-default/single.php
r2170 r2204 19 19 <div class="post" id="post-<?php the_ID(); ?>"> 20 20 21 <?php do_action( 'bp_before_blog_post' ) ?> 22 23 <h3><a href="<?php echo get_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent link to', 'buddypress' ) ?> <?php the_title(); ?>"><?php the_title(); ?></a></h3> 24 25 <div class="entry"> 26 27 <?php the_content( __( '<p class="serif">Read the rest of this entry »</p>', 'buddypress' ) ); ?> 28 29 <?php wp_link_pages(array('before' => __( '<p><strong>Pages:</strong> ', 'buddypress' ), 'after' => '</p>', 'next_or_number' => 'number')); ?> 30 21 <div class="author-box"> 22 <?php echo get_avatar( get_the_author_email(), '50' ); ?> 23 <p><?php printf( __( 'by %s', 'buddypress' ), bp_core_get_userlink( $post->post_author ) ) ?></p> 31 24 </div> 32 25 33 <?php do_action( 'bp_after_blog_post' ) ?> 26 <div class="post-content"> 27 <h3><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php _e( 'Permanent Link to', 'buddypress' ) ?> <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3> 28 29 <p class="date"><?php the_time('F j, Y') ?> <em><?php _e( 'in', 'buddypress' ) ?> <?php the_category(', ') ?> <?php printf( __( 'by %s', 'buddypress' ), bp_core_get_userlink( $post->post_author ) ) ?></em></p> 30 31 <div class="entry"> 32 <?php the_content( __( 'Read the rest of this entry »', 'buddypress' ) ); ?> 33 34 <?php wp_link_pages(array('before' => __( '<p><strong>Pages:</strong> ', 'buddypress' ), 'after' => '</p>', 'next_or_number' => 'number')); ?> 35 </div> 36 37 <p class="postmetadata"><span class="tags"><?php the_tags( __( 'Tags: ', 'buddypress' ), ', ', '<br />'); ?></span> <span class="comments"><?php comments_popup_link( __( 'No Comments »', 'buddypress' ), __( '1 Comment »', 'buddypress' ), __( '% Comments »', 'buddypress' ) ); ?></span></p> 38 </div> 34 39 35 40 </div>
Note: See TracChangeset
for help on using the changeset viewer.