Skip to:
Content

BuddyPress.org

Ticket #3501: 3501-01.patch

File 3501-01.patch, 3.6 KB (added by Jonnyauk, 14 years ago)
  • bp-themes/bp-default/functions.php

    ### Eclipse Workspace Patch 1.0
    #P BUDDYPRESS TRUNK SVN
     
    702702        <?php endif;
    703703}
    704704endif;
     705
     706if ( !function_exists( 'bp_dtheme_content_member_summary' ) ) :
     707/**
     708 * Display a basic summary of information about a user on member pages
     709 *
     710 * @param string $type Containing CSS element - default: 'span'
     711 * @since 1.5
     712 */
     713function bp_dtheme_content_member_summary( $type ) {
     714        $type = ( isset( $type ) ) ? esc_attr( $type ) : 'span';
     715        echo '<' . $type . ' class="member-summary user-nicename">@' . bp_get_displayed_user_username() . '</' . $type . '>';
     716        echo '<' . $type . ' class="member-summary activity">' . bp_get_last_activity( bp_displayed_user_id() ) . '</' . $type . '>';
     717}
     718endif;
     719
     720if ( !function_exists( 'bp_dtheme_content_member_activity' ) ) :
     721/**
     722 * Display latest update for a user on member pages
     723 *
     724 * @since 1.5
     725 */
     726function bp_dtheme_content_member_update() {
     727        if ( bp_is_active( 'activity' ) ) :
     728        ?>
     729        <div id="latest-update">
     730                <?php bp_activity_latest_update( bp_displayed_user_id() ); ?>
     731        </div>
     732        <?php endif;
     733}
     734endif;
    705735?>
     736 No newline at end of file
  • bp-themes/bp-default/_inc/css/default.css

     
    20092009.item-body {
    20102010        margin: 20px 0;
    20112011}
    2012 span.activity {
     2012.member-summary.activity {
    20132013        display: inline-block;
    20142014        font-size: 11px;
    20152015        opacity: 0.8;
    20162016        padding: 1px 8px;
     2017        margin-right: 5px;
    20172018}
    2018 span.user-nicename {
     2019.member-summary.user-nicename {
    20192020        color: #777;
    20202021        display: inline-block;
    20212022        font-size: 16px;
    20222023        font-weight: bold;
    2023 }
    2024 span.activity,
     2024        margin-right: 5px;
     2025        }
     2026.member-summary.activity,
    20252027div#message p {
    20262028        border: 1px solid #e1ca82;
    20272029        -moz-border-radius: 3px;
     
    20602062div#item-header h2 {
    20612063        margin-bottom: 5px;
    20622064}
    2063 div#item-header span.activity,
     2065div#item-header .activity,
    20642066div#item-header h2 span.highlight {
    20652067        font-size: 11px;
    20662068        font-weight: normal;
  • bp-themes/bp-default/members/single/member-header.php

     
    2121
    2222<div id="item-header-content">
    2323
    24         <h2>
    25                 <a href="<?php bp_displayed_user_link(); ?>"><?php bp_displayed_user_fullname(); ?></a>
    26         </h2>
    27 
    28         <span class="user-nicename">@<?php bp_displayed_user_username(); ?></span>
    29         <span class="activity"><?php bp_last_activity( bp_displayed_user_id() ); ?></span>
    30 
    31         <?php do_action( 'bp_before_member_header_meta' ); ?>
     24        <?php do_action( 'bp_before_member_header_title' ); ?>
    3225
    33         <div id="item-meta">
     26        <h2><a href="<?php bp_displayed_user_link(); ?>"><?php bp_displayed_user_fullname(); ?></a></h2>
    3427
    35                 <?php if ( bp_is_active( 'activity' ) ) : ?>
     28        <?php do_action( 'bp_before_member_header_summary' ); ?>
    3629
    37                         <div id="latest-update">
     30        <?php bp_dtheme_content_member_summary(); ?>
    3831
    39                                 <?php bp_activity_latest_update( bp_displayed_user_id() ); ?>
     32        <?php do_action( 'bp_before_member_header_meta' ); ?>
    4033
    41                         </div>
     34        <div id="item-meta">
    4235
    43                 <?php endif; ?>
     36                <?php bp_dtheme_content_member_update(); ?>
    4437
    4538                <div id="item-buttons">
    4639
     
    5447                 * bp_profile_field_data( 'field=About Me' ); -- Pass the name of the field
    5548                 */
    5649                 do_action( 'bp_profile_header_meta' );
    57 
    5850                 ?>
    5951
    6052        </div><!-- #item-meta -->