Skip to:
Content

BuddyPress.org

Changeset 2698 for trunk/bp-blogs.php


Ignore:
Timestamp:
02/12/2010 01:27:20 PM (16 years ago)
Author:
apeatling
Message:

Fixing up the sitewide blog posts widget to only show on multisite installations, and also to use the activity loop filtered on blog posts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-blogs.php

    r2696 r2698  
    99require ( BP_PLUGIN_DIR . '/bp-blogs/bp-blogs-classes.php' );
    1010require ( BP_PLUGIN_DIR . '/bp-blogs/bp-blogs-templatetags.php' );
    11 require ( BP_PLUGIN_DIR . '/bp-blogs/bp-blogs-widgets.php' );
     11
     12/* Include the sitewide blog posts widget if this is a multisite installation */
     13if ( bp_core_is_multisite() )
     14    require ( BP_PLUGIN_DIR . '/bp-blogs/bp-blogs-widgets.php' );
    1215
    1316function bp_blogs_install() {
     
    437440        if ( (int)get_blog_option( $blog_id, 'blog_public' ) || !bp_core_is_multisite() ) {
    438441            /* Now re-record the post in the activity streams */
    439             $post_permalink = bp_post_get_permalink( $post, $blog_id );
     442            $post_permalink = get_permalink( $post_id );
    440443
    441444            $activity_action = sprintf( __( '%s wrote a new blog post: %s', 'buddypress' ), bp_core_get_userlink( (int)$post->post_author ), '<a href="' . $post_permalink . '">' . $post->post_title . '</a>' );
     
    495498    if ( (int)get_blog_option( $recorded_comment->blog_id, 'blog_public' ) || !bp_core_is_multisite() ) {
    496499        /* Record in activity streams */
    497         $comment_link = bp_post_get_permalink( $comment->post, $wpdb->blogid ) . '#comment-' . $comment_id;
     500        $comment_link = get_permalink( $comment->comment_post_ID ) . '#comment-' . $comment_id;
    498501        $activity_action = sprintf( __( '%s commented on the blog post %s', 'buddypress' ), bp_core_get_userlink( $user_id ), '<a href="' . $comment_link . '#comment-' . $comment->comment_ID . '">' . $comment->post->post_title . '</a>' );
    499502        $activity_content = $comment->comment_content;
Note: See TracChangeset for help on using the changeset viewer.