Skip to:
Content

BuddyPress.org

Changeset 1834


Ignore:
Timestamp:
09/09/2009 10:20:13 PM (17 years ago)
Author:
apeatling
Message:

Backwards compatibility updates for 1.0.3 built themes

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-templatetags.php

    r1822 r1834  
    345345                global $activities_template, $bp;
    346346
    347                 return apply_filters( 'bp_get_activity_delete_link', '<a href="' . wp_nonce_url( $bp->root_domain . '/' . $bp->activity->slug . '/delete/' . $activities_template->activity->id, 'bp_activity_delete_link' ) . '" class="item-button delete confirm">' . __( 'Delete', 'buddypress' ) . '</a>' );
     347                return apply_filters( 'bp_get_activity_delete_link', '<a href="' . wp_nonce_url( $bp->root_domain . '/' . $bp->activity->slug . '/delete/' . $activities_template->activity->id, 'bp_activity_delete_link' ) . '" class="item-button delete-activity confirm">' . __( 'Delete', 'buddypress' ) . '</a>' );
    348348        }
    349349
  • trunk/bp-activity/bp-activity-widgets.php

    r1819 r1834  
    2525       
    2626        <?php if ( bp_has_activities( 'type=sitewide&max=' . $instance['max_items'] . '&per_page=' . $instance['per_page'] ) ) : ?>
    27                 <div class="pagination">
    28                         <div class="pag-count" id="activity-count">
    29                                 <?php bp_activity_pagination_count() ?>
     27
     28                <?php if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) ) : ?>
     29                        <div class="pagination">
     30                                <div class="pag-count" id="activity-count">
     31                                        <?php bp_activity_pagination_count() ?>
     32                                </div>
     33               
     34                                <div class="pagination-links" id="activity-pag">
     35                                        &nbsp; <?php bp_activity_pagination_links() ?>
     36                                </div>
    3037                        </div>
    3138               
    32                         <div class="pagination-links" id="activity-pag">
    33                                 &nbsp; <?php bp_activity_pagination_links() ?>
    34                         </div>
    35                 </div>
    36                
    37                 <ul id="activity-filter-links">
    38                         <?php bp_activity_filter_links() ?>
    39                 </ul>
     39                        <ul id="activity-filter-links">
     40                                <?php bp_activity_filter_links() ?>
     41                        </ul>
     42                <?php endif; ?>
    4043               
    4144                <ul id="site-wide-stream" class="activity-list">
    4245                <?php while ( bp_activities() ) : bp_the_activity(); ?>
    4346                        <li class="<?php bp_activity_css_class() ?>">
    44                                 <div class="activity-avatar">
    45                                         <?php bp_activity_avatar() ?>
    46                                 </div>
     47                                <?php if ( !file_exists( WP_CONTENT_DIR . '/bp-themes' ) ) : ?>
     48                                        <div class="activity-avatar">
     49                                                <?php bp_activity_avatar() ?>
     50                                        </div>
     51                                <?php endif; ?>
    4752                               
    4853                                <?php bp_activity_content() ?>
  • trunk/bp-core/deprecated/css/structure.css

    r1655 r1834  
    6262 */
    6363
     64
    6465.main-column {
    6566        margin-left: 200px;
     
    7273                }
    7374
    74         div.bp-widget {
     75        div.info-group {
    7576                margin-bottom: 2em;
    7677        }       
    77                 div.bp-widget h4 {
     78                div.info-group h4 {
    7879                        height: 30px;
    7980                        padding: 3px 10px;
     
    8182                        position: relative;
    8283                }
    83                         .left-menu div.bp-widget {
     84                        .left-menu div.info-group {
    8485                                margin-top: 1.5em;
    8586                        }
    8687
    87                         div.bp-widget h4 span {
     88                        div.info-group h4 a {
    8889                                position: absolute;
    8990                                top: 0.31em;
     
    9293                        }
    9394
    94                         .left-menu div.bp-widget img.avatar {
     95                        .left-menu div.info-group img.avatar {
    9596                                float: left;
    9697                                margin-right: 1em;
     
    130131        }
    131132       
    132         div.bp-widget .pagination-links {
     133        div.info-group .pagination-links {
    133134                margin: 0 0 5px 0;
    134135                float: none;
  • trunk/bp-forums.php

    r1749 r1834  
    132132                'topic_last_poster' => $bp->loggedin_user->id, // accepts ids
    133133                'topic_last_poster_name' => $bp->loggedin_user->fullname, // accept names
    134                 'topic_start_time' => bb_current_time( 'mysql' ),
    135                 'topic_time' => bb_current_time( 'mysql' ),
     134                'topic_start_time' => date( 'Y-m-d H:i:s' ),
     135                'topic_time' => date( 'Y-m-d H:i:s' ),
    136136                'topic_open' => 1,
    137137                'forum_id' => 0 // accepts ids or slugs
     
    247247                'topic_id' => false,
    248248                'post_text' => '',
    249                 'post_time' => bb_current_time( 'mysql' ),
     249                'post_time' => date( 'Y-m-d H:i:s' ),
    250250                'poster_id' => $bp->loggedin_user->id, // accepts ids or names
    251251                'poster_ip' => $_SERVER['REMOTE_ADDR'],
  • trunk/bp-friends/bp-friends-templatetags.php

    r1655 r1834  
    407407        }
    408408?>     
    409         <div class="bp-widget">
    410                 <h4><?php bp_word_or_name( __( "My Friends", 'buddypress' ), __( "%s's Friends", 'buddypress' ) ) ?>  (<?php echo BP_Friends_Friendship::total_friend_count( $bp->displayed_user->id ) ?>)  <a href="<?php echo $bp->displayed_user->domain . $bp->friends->slug ?>"><?php _e('See All', 'buddypress') ?> &raquo;</a></h4>
     409        <div class="info-group">
     410                <h4><?php bp_word_or_name( __( "My Friends", 'buddypress' ), __( "%s's Friends", 'buddypress' ) ) ?>  (<?php echo BP_Friends_Friendship::total_friend_count( $bp->displayed_user->id ) ?>) <span><a href="<?php echo $bp->displayed_user->domain . $bp->friends->slug ?>"><?php _e('See All', 'buddypress') ?> &raquo;</a></span></h4>
    411411               
    412412                <?php if ( $friend_ids ) { ?>
  • trunk/bp-groups/bp-groups-templatetags.php

    r1832 r1834  
    708708                return apply_filters( 'bp_get_group_all_members_permalink', bp_get_group_permalink( $group ) . '/members' );
    709709        }
    710 
    711 function bp_group_active_forum_topics( $total_topics = 3, $group = false ) {
    712         global $groups_template, $forum_template;
    713 
    714         if ( !$group )
    715                 $group =& $groups_template->group;
    716 
    717         $forum_id = groups_get_groupmeta( $group->id, 'forum_id' );
    718 
    719         if ( $forum_id && $forum_id != '' ) {
    720                 if ( function_exists( 'bp_forums_setup' ) ) {
    721                         $latest_topics = bp_forums_get_forum_topics( $forum_id );
    722                
    723                         if ( $latest_topics ) { ?>
    724                                 <ul class="item-list" id="recent-forum-topics"><?php
    725                                
    726                                 $counter = 0;
    727                                
    728                                 foreach( $latest_topics as $topic ) {
    729                                         $alt = ( $counter % 2 == 1 ) ? ' class="alt"' : '';
    730                                         $forum_template->topic = (object)$topic; ?>
    731                                        
    732                                         <li<?php echo $alt ?>>
    733                                                 <div class="avatar">
    734                                                         <?php bp_the_topic_poster_avatar() ?>
    735                                                 </div>
    736 
    737                                                 <a href="<?php bp_the_topic_permalink() ?>" title="<?php bp_the_topic_title() ?> - <?php _e( 'Permalink', 'buddypress' ) ?>"><?php bp_the_topic_title() ?></a>
    738                                                 <span class="small">- <?php bp_the_topic_total_post_count() ?> </span>
    739                                                 <p><span class="activity"><?php echo sprintf( __( 'updated %s ago', 'buddypress' ), bp_the_topic_time_since_last_post( false ) ) ?></span></p>
    740                                
    741                                                 <div class="latest-post">
    742                                                         <?php _e( 'Latest by', 'buddypress' ) ?> <?php bp_the_topic_last_poster_name() ?>:
    743                                                         <?php bp_the_topic_latest_post_excerpt() ?>
    744                                                 </div>
    745                                         </li>
    746                                         <?php $counter++ ?>
    747                                        
    748                                 <?php } ?>
    749                                 </ul>
    750                                 <?php
    751                         } else {
    752                         ?>
    753                                 <div id="message" class="info">
    754                                         <p><?php _e( 'There are no active forum topics for this group', 'buddypress' ) ?></p>
    755                                 </div>
    756                         <?php
    757                         }
    758                 }
    759         }
    760 }
    761710
    762711function bp_group_search_form() {
  • trunk/bp-groups/deprecated/bp-groups-deprecated.php

    r1826 r1834  
    231231       
    232232?>     
    233         <div class="bp-widget">
    234                 <h4><?php bp_word_or_name( __( "My Groups", 'buddypress' ), __( "%s's Groups", 'buddypress' ) ) ?> (<?php echo BP_Groups_Member::total_group_count() ?>) <a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>"><?php _e('See All', 'buddypress') ?> &raquo;</a></h4>
     233        <div class="info-group">
     234                <h4><?php bp_word_or_name( __( "My Groups", 'buddypress' ), __( "%s's Groups", 'buddypress' ) ) ?> (<?php echo BP_Groups_Member::total_group_count() ?>) <span><a href="<?php echo $bp->displayed_user->domain . $bp->groups->slug ?>"><?php _e('See All', 'buddypress') ?> &raquo;</a></span></h4>
    235235                <?php if ( $group_ids ) { ?>
    236236                        <ul class="horiz-gallery">
     
    242242                                }
    243243                        ?>                              <li>
    244                                         <a href="<?php echo bp_get_group_permalink( $group ) ?>"><img src="<?php echo attribute_escape( $group->avatar_thumb ); ?>" class="avatar" alt="<?php _e( 'Group Avatar', 'buddypress' ) ?>" /></a>
     244                                        <a href="<?php echo bp_get_group_permalink( $group ) ?>"><?php echo bp_core_fetch_avatar( array( 'item_id' => $group->id, 'object' => 'group', 'type' => 'thumb' ) ) ?></a>
    245245                                        <h5><a href="<?php echo bp_get_group_permalink( $group ) ?>"><?php echo attribute_escape( $group->name ) ?></a></h5>
    246246                                </li>
     
    256256<?php
    257257}
     258
     259/* DEPRECATED - use bp_has_topics() template loop */
     260function bp_group_active_forum_topics( $total_topics = 3, $group = false ) {
     261        global $groups_template, $forum_template;
     262
     263        if ( !$group )
     264                $group =& $groups_template->group;
     265               
     266        $forum_id = groups_get_groupmeta( $group->id, 'forum_id' );
     267
     268        if ( $forum_id && $forum_id != '' ) {
     269                if ( function_exists( 'bp_forums_setup' ) ) {
     270                        $latest_topics = bp_forums_get_forum_topics( array( 'forum_id' => $forum_id ) );
     271               
     272                        if ( $latest_topics ) { ?>
     273                                <ul class="item-list" id="recent-forum-topics"><?php
     274                               
     275                                $counter = 0;
     276                               
     277                                foreach( $latest_topics as $topic ) {
     278                                        $alt = ( $counter % 2 == 1 ) ? ' class="alt"' : '';
     279                                        $forum_template->topic = (object)$topic; ?>
     280                                       
     281                                        <li<?php echo $alt ?>>
     282                                                <div class="avatar">
     283                                                        <?php bp_the_topic_poster_avatar() ?>
     284                                                </div>
     285
     286                                                <a href="<?php bp_the_topic_permalink() ?>" title="<?php bp_the_topic_title() ?> - <?php _e( 'Permalink', 'buddypress' ) ?>"><?php bp_the_topic_title() ?></a>
     287                                                <span class="small">- <?php bp_the_topic_total_post_count() ?> </span>
     288                                                <p><span class="activity"><?php echo sprintf( __( 'updated %s ago', 'buddypress' ), bp_the_topic_time_since_last_post( false ) ) ?></span></p>
     289                               
     290                                                <div class="latest-post">
     291                                                        <?php _e( 'Latest by', 'buddypress' ) ?> <?php bp_the_topic_last_poster_name() ?>:
     292                                                        <?php bp_the_topic_latest_post_excerpt() ?>
     293                                                </div>
     294                                        </li>
     295                                        <?php $counter++ ?>
     296                                       
     297                                <?php } ?>
     298                                </ul>
     299                                <?php
     300                        } else {
     301                        ?>
     302                                <div id="message" class="info">
     303                                        <p><?php _e( 'There are no active forum topics for this group', 'buddypress' ) ?></p>
     304                                </div>
     305                        <?php
     306                        }
     307                }
     308        }
     309}
     310
    258311
    259312/* DEPRECATED - use group invite template loop (see groups/create.php in skeleton BuddyPress theme) */
     
    479532                        <?php if ( bp_are_previous_group_creation_steps_complete( 'group-avatar' ) ) { ?>
    480533                                <div class="left-menu">
    481                                         <?php bp_group_current_avatar() ?>
     534                                        <?php bp_new_group_avatar() ?>
    482535                                </div>
    483536                               
  • trunk/bp-wire/bp-wire-templatetags.php

    r1830 r1834  
    163163        }
    164164       
    165 function bp_wire_item_id( $deprecated = true ) {
     165function bp_wire_item_id( $deprecated = false ) {
    166166        global $bp_item_id;
    167167       
     
    363363                if ( ( $wire_posts_template->wire_post->user_id == $bp->loggedin_user->id ) || $bp->is_item_admin || is_site_admin() ) {
    364364                        if ( $bp->wire->slug == $bp->current_component || $bp->profile->slug == $bp->current_component ) {
    365                                 return apply_filters( 'bp_get_wire_delete_link', '<a class="item-button delete confirm" href="' . wp_nonce_url( $bp->displayed_user->domain . $bp->wire->slug . '/delete/' . $wire_posts_template->wire_post->id, 'bp_wire_delete_link' ) . '">' . __('Delete', 'buddypress') . '</a>' );
     365                                return apply_filters( 'bp_get_wire_delete_link', '<a class="item-button delete-post confirm" href="' . wp_nonce_url( $bp->displayed_user->domain . $bp->wire->slug . '/delete/' . $wire_posts_template->wire_post->id, 'bp_wire_delete_link' ) . '">' . __('Delete', 'buddypress') . '</a>' );
    366366                        } else {
    367                                 return apply_filters( 'bp_get_wire_delete_link', '<a class="item-button delete confirm" href="' . wp_nonce_url( site_url( $bp->{$bp->current_component}->slug . '/' . $uri . '/wire/delete/' . $wire_posts_template->wire_post->id ), 'bp_wire_delete_link' ) . '">' . __('Delete', 'buddypress') . '</a>' );
     367                                return apply_filters( 'bp_get_wire_delete_link', '<a class="item-button delete-post confirm" href="' . wp_nonce_url( site_url( $bp->{$bp->current_component}->slug . '/' . $uri . '/wire/delete/' . $wire_posts_template->wire_post->id ), 'bp_wire_delete_link' ) . '">' . __('Delete', 'buddypress') . '</a>' );
    368368                        }
    369369                }
Note: See TracChangeset for help on using the changeset viewer.