Skip to:
Content

BuddyPress.org

Changeset 2204


Ignore:
Timestamp:
12/18/2009 02:28:54 PM (16 years ago)
Author:
apeatling
Message:

Updated blog styles.

Location:
trunk/bp-themes/bp-default
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-themes/bp-default/_inc/css/default.css

    r2201 r2204  
    13711371    }
    13721372
    1373     ul#topic-post-list li div.poster-meta {
     1373    ul#topic-post-list li divdiv.poster-meta {
    13741374        margin-bottom: 10px;
    13751375        color: #888;
    13761376    }
    13771377
    1378     ul#topic-post-list li div.post-content {
     1378    ul#topic-post-list li divdiv.post-content {
    13791379        margin-left: 54px;
    13801380    }
     
    14081408-------------------------------------------------------------- */
    14091409
    1410 .post {
    1411     margin: 0 0 40px 0;
    1412 }
    1413     .post h3 {
     1410div.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 {
    14141434        font-size: 24px;
    14151435        margin-bottom: 5px;
    1416     }
    1417         .post h3 a {
     1436        line-height: 120%;
     1437    }
     1438        div.post h3 a {
    14181439            text-decoration: none;
    14191440            color: #666;
     
    14211442        }
    14221443
    1423     .post p.date, .post p.postmetadata {
     1444    div.post p.date, div.post p.postmetadata, div.comment-meta, div.comment-options {
    14241445        color: #888;
    14251446        font-size: 11px;
    1426         padding-bottom: 5px;
     1447        padding: 3px 0;
     1448        margin: 10px 0;
    14271449        border-bottom: 1px solid #e4e4e4;
    1428     }
    1429 
    1430     .post p.postmetadata {
    1431         padding-top: 5px;
    14321450        border-top: 1px solid #e4e4e4;
    1433         border-bottom: none;
     1451    }
     1452
     1453    div.post p.postmetadata {
    14341454        margin-top: 15px;
    14351455        overflow: hidden;
    14361456    }
    14371457
    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 {
    14441464        display: block;
    14451465        margin-left: auto;
     
    14471467    }
    14481468
    1449     .post img.alignright {
     1469    div.post img.alignright {
    14501470        padding: 4px;
    14511471        margin: 0 0 2px 7px;
     
    14531473    }
    14541474
    1455     .post img.alignleft {
     1475    div.post img.alignleft {
    14561476        padding: 4px;
    14571477        margin: 0 7px 2px 0;
     
    14701490        }
    14711491
    1472     .post .aligncenter, .post div.aligncenter {
     1492    div.post .aligncenter, div.post div.aligncenter {
    14731493        display: block;
    14741494        margin-left: auto;
     
    14761496    }
    14771497
    1478     .post .wp-caption {
     1498    div.post .wp-caption {
    14791499        border: 1px solid #ddd;
    14801500        text-align: center;
     
    14831503        margin: 10px 0;
    14841504        -moz-border-radius: 3px;
    1485         -khtml-border-radius: 3px;
    14861505        -webkit-border-radius: 3px;
    14871506        border-radius: 3px;
    14881507    }
    14891508
    1490     .post .wp-caption img {
     1509    div.post .wp-caption img {
    14911510        margin: 0;
    14921511        padding: 0;
     
    14941513    }
    14951514
    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 {
    14971516        font-size: 0.9em;
    14981517        line-height: 17px;
     
    15011520    }
    15021521
    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
     1540ol.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;
    15411559    }
    15421560
  • trunk/bp-themes/bp-default/comments.php

    r2170 r2204  
    1010    ?>
    1111
    12     <div id="comments-template">
     12    <?php if ( have_comments() ) : ?>
    1313
    14         <?php if ( have_comments() ) : ?>
     14        <div id="comments">
    1515
    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            ?>
    1720
    18                 <h3 id="comments-number" class="comments-header"><?php comments_number( sprintf( __('No responses to %1$s', 'buddypress'), the_title( '&#8220;', '&#8221;', false ) ), sprintf( __('One response to %1$s', 'buddypress'), the_title( '&#8220;', '&#8221;', false ) ), sprintf( __('%1$s responses to %2$s', 'buddypress'), '%', the_title( '&#8220;', '&#8221;', false ) ) ); ?></h3>
     21            <span class="title"><?php the_title() ?></span>
     22            <h3 id="comments"><?php comments_number( 'No Comments', 'One Comment', $numComments . ' Comments' );?></h3>
    1923
    20                 <?php do_action( 'bp_before_blog_comment_list' ) ?>
     24            <?php do_action( 'bp_before_blog_comment_list' ) ?>
    2125
    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 -->
    2529
    26                 <?php do_action( 'bp_after_blog_comment_list' ) ?>
     30            <?php do_action( 'bp_after_blog_comment_list' ) ?>
    2731
    28                 <?php if ( get_option( 'page_comments' ) ) : ?>
     32            <?php if ( get_option( 'page_comments' ) ) : ?>
    2933
    30                     <div class="comment-navigation paged-navigation">
     34                <div class="comment-navigation paged-navigation">
    3135
    32                         <?php paginate_comments_links(); ?>
     36                    <?php paginate_comments_links(); ?>
    3337
    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>
    5239
    5340            <?php endif; ?>
    5441
     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
    5558        <?php endif; ?>
     59
     60    <?php endif; ?>
    5661
    5762        <?php if ( comments_open() ) : ?>
    5863
    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">
    6079
    6180                <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 ); ?>
    6382                </h3>
    6483
    6584                <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' ) ); ?>
    6786                </p>
    6887
     
    128147                <?php endif; ?>
    129148
    130             </div>
     149            </div><!-- .comment-content -->
     150        </div><!-- #respond -->
    131151
    132152        <?php endif; ?>
    133153
    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  
    5555}
    5656
     57function bp_dtheme_add_blog_comments_js() {
     58    if ( is_singular() ) wp_enqueue_script( 'comment-reply' );
     59}
     60add_action( 'template_redirect', 'bp_dtheme_add_blog_comments_js' );
     61
     62function 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
    57104function bp_dtheme_remove_redundant() {
    58105    global $bp;
  • trunk/bp-themes/bp-default/index.php

    r2170 r2204  
    1616                    <div class="post" id="post-<?php the_ID(); ?>">
    1717
    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 &raquo;', '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>
    2421                        </div>
    2522
    26                         <p class="postmetadata"><span class="tags"><?php the_tags( __( 'Tags: ', 'buddypress' ), ', ', '<br />'); ?></span> <span class="comments"><?php comments_popup_link( __( 'No Comments &#187;', 'buddypress' ), __( '1 Comment &#187;', 'buddypress' ), __( '% Comments &#187;', '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 &raquo;', '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 &#187;', 'buddypress' ), __( '1 Comment &#187;', 'buddypress' ), __( '% Comments &#187;', 'buddypress' ) ); ?></span></p>
     33                        </div>
    2734
    2835                    </div>
  • trunk/bp-themes/bp-default/single.php

    r2170 r2204  
    1919                <div class="post" id="post-<?php the_ID(); ?>">
    2020
    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 &raquo;</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>
    3124                    </div>
    3225
    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 &raquo;', '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 &#187;', 'buddypress' ), __( '1 Comment &#187;', 'buddypress' ), __( '% Comments &#187;', 'buddypress' ) ); ?></span></p>
     38                    </div>
    3439
    3540                </div>
Note: See TracChangeset for help on using the changeset viewer.