<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[BuddyPress] [2158] trunk: Adding activity item permalink support</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd>2158</dd>
<dt>Author</dt> <dd>apeatling</dd>
<dt>Date</dt> <dd>2009-11-30 12:27:52 +0000 (Mon, 30 Nov 2009)</dd>
</dl>
<h3>Log Message</h3>
<pre>Adding activity item permalink support</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbpactivitybpactivityclassesphp">trunk/bp-activity/bp-activity-classes.php</a></li>
<li><a href="#trunkbpactivitybpactivitytemplatetagsphp">trunk/bp-activity/bp-activity-templatetags.php</a></li>
<li><a href="#trunkbpactivitybpactivitywidgetsphp">trunk/bp-activity/bp-activity-widgets.php</a></li>
<li><a href="#trunkbpactivityphp">trunk/bp-activity.php</a></li>
<li><a href="#trunkbpgroupsbpgroupstemplatetagsphp">trunk/bp-groups/bp-groups-templatetags.php</a></li>
<li><a href="#trunkbpgroupsphp">trunk/bp-groups.php</a></li>
<li><a href="#trunkbpthemesbpdefault_inccssscreencss">trunk/bp-themes/bp-default/_inc/css/screen.css</a></li>
<li><a href="#trunkbpthemesbpsnparentactivityentryphp">trunk/bp-themes/bp-sn-parent/activity/entry.php</a></li>
<li><a href="#trunkbpthemesbpsnparentactivityjustmephp">trunk/bp-themes/bp-sn-parent/activity/just-me.php</a></li>
<li><a href="#trunkbpthemesbpsnparentgroupssinglehomephp">trunk/bp-themes/bp-sn-parent/groups/single/home.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbpactivitybpactivityclassesphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-classes.php (2157 => 2158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-classes.php        2009-11-30 00:25:30 UTC (rev 2157)
+++ trunk/bp-activity/bp-activity-classes.php        2009-11-30 12:27:52 UTC (rev 2158)
</span><span class="lines">@@ -187,24 +187,28 @@
</span><span class="cx">                 if ( $sort != 'ASC' && $sort != 'DESC' )
</span><span class="cx">                         $sort = 'DESC';
</span><span class="cx">
</span><ins>+                /* Hide Hidden Items? */
+                if ( !$show_hidden )
+                        $hidden_sql = "AND hide_sitewide = 0";
+
</ins><span class="cx">                 /* Alter the query based on whether we want to show activity item comments in the stream like normal comments or threaded below the activity */
</span><span class="cx">                 if ( !$display_comments || 'threaded' == $display_comments ) {
</span><span class="cx">                         if ( $per_page && $page && $max )
</span><del>-                                $activities = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$bp->activity->table_name} WHERE user_id = %d {$search_sql} {$filter_sql} AND component_action != 'activity_comment' ORDER BY date_recorded {$sort} {$pag_sql}", $user_id ) );
</del><ins>+                                $activities = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$bp->activity->table_name} WHERE user_id = %d {$search_sql} {$filter_sql} {$hidden_sql} AND component_action != 'activity_comment' ORDER BY date_recorded {$sort} {$pag_sql}", $user_id ) );
</ins><span class="cx">                         else
</span><del>-                                $activities = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$bp->activity->table_name} WHERE user_id = %d {$search_sql} {$filter_sql} AND component_action != 'activity_comment' ORDER BY date_recorded {$sort} {$pag_sql} {$max_sql}", $user_id ) );
</del><ins>+                                $activities = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$bp->activity->table_name} WHERE user_id = %d {$search_sql} {$filter_sql} {$hidden_sql} AND component_action != 'activity_comment' ORDER BY date_recorded {$sort} {$pag_sql} {$max_sql}", $user_id ) );
</ins><span class="cx">
</span><del>-                        $total_activities = $wpdb->get_var( $wpdb->prepare( "SELECT count(id) FROM {$bp->activity->table_name} WHERE user_id = %d {$search_sql} {$filter_sql} AND component_action != 'activity_comment' ORDER BY date_recorded {$sort} {$max_sql}", $user_id ) );
</del><ins>+                        $total_activities = $wpdb->get_var( $wpdb->prepare( "SELECT count(id) FROM {$bp->activity->table_name} WHERE user_id = %d {$search_sql} {$filter_sql} {$hidden_sql} AND component_action != 'activity_comment' ORDER BY date_recorded {$sort} {$max_sql}", $user_id ) );
</ins><span class="cx">
</span><span class="cx">                         if ( $activities && $display_comments )
</span><span class="cx">                                 $activities = BP_Activity_Activity::append_comments( &$activities );
</span><span class="cx">                 } else {
</span><span class="cx">                         if ( $per_page && $page && $max )
</span><del>-                                $activities = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$bp->activity->table_name} WHERE user_id = %d {$search_sql} {$filter_sql} ORDER BY date_recorded {$sort} {$pag_sql}", $user_id ) );
</del><ins>+                                $activities = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$bp->activity->table_name} WHERE user_id = %d {$search_sql} {$filter_sql} {$hidden_sql} ORDER BY date_recorded {$sort} {$pag_sql}", $user_id ) );
</ins><span class="cx">                         else
</span><del>-                                $activities = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$bp->activity->table_name} WHERE user_id = %d {$search_sql} {$filter_sql} ORDER BY date_recorded {$sort} {$pag_sql} {$max_sql}", $user_id ) );
</del><ins>+                                $activities = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$bp->activity->table_name} WHERE user_id = %d {$search_sql} {$filter_sql} {$hidden_sql} ORDER BY date_recorded {$sort} {$pag_sql} {$max_sql}", $user_id ) );
</ins><span class="cx">
</span><del>-                        $total_activities = $wpdb->get_var( $wpdb->prepare( "SELECT count(id) FROM {$bp->activity->table_name} WHERE user_id = %d {$search_sql} {$filter_sql} ORDER BY date_recorded {$sort} {$max_sql}", $user_id ) );
</del><ins>+                        $total_activities = $wpdb->get_var( $wpdb->prepare( "SELECT count(id) FROM {$bp->activity->table_name} WHERE user_id = %d {$search_sql} {$filter_sql} {$hidden_sql} ORDER BY date_recorded {$sort} {$max_sql}", $user_id ) );
</ins><span class="cx">
</span><span class="cx">                         if ( $activities )
</span><span class="cx">                                 $activities = BP_Activity_Activity::append_comments( &$activities );
</span></span></pre></div>
<a id="trunkbpactivitybpactivitytemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-templatetags.php (2157 => 2158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-templatetags.php        2009-11-30 00:25:30 UTC (rev 2157)
+++ trunk/bp-activity/bp-activity-templatetags.php        2009-11-30 12:27:52 UTC (rev 2158)
</span><span class="lines">@@ -31,7 +31,7 @@
</span><span class="cx">                                 $this->activities = bp_activity_get_sitewide( array( 'display_comments' => $display_comments, 'max' => $max, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'sort' => $sort, 'search_terms' => $search_terms, 'filter' => $filter, 'show_hidden' => $show_hidden ) );
</span><span class="cx">
</span><span class="cx">                         if ( $type == 'personal' )
</span><del>-                                $this->activities = bp_activity_get_for_user( array( 'user_id' => $user_id, 'display_comments' => $display_comments, 'max' => $max, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'sort' => $sort, 'search_terms' => $search_terms, 'filter' => $filter ) );
</del><ins>+                                $this->activities = bp_activity_get_for_user( array( 'user_id' => $user_id, 'display_comments' => $display_comments, 'max' => $max, 'per_page' => $this->pag_num, 'page' => $this->pag_page, 'sort' => $sort, 'search_terms' => $search_terms, 'filter' => $filter, 'show_hidden' => $show_hidden ) );
</ins><span class="cx">
</span><span class="cx">                         if ( $type == 'friends' && ( bp_is_home() || is_site_admin() || $bp->loggedin_user->id == $user_id ) )
</span><span class="cx">                                 $this->activities = bp_activity_get_friends_activity( $user_id, $max, false, $this->pag_num, $this->pag_page, $filter );
</span><span class="lines">@@ -152,6 +152,10 @@
</span><span class="cx">                         $per_page = $max;
</span><span class="cx">         }
</span><span class="cx">
</span><ins>+        /* Support for permalinks on single item pages: /groups/my-group/activity/124/ */
+        if ( $bp->current_action == $bp->activity->slug )
+                $include = $bp->action_variables[0];
+
</ins><span class="cx">         if ( isset( $_GET['afilter'] ) )
</span><span class="cx">                 $filter = array( 'object' => $_GET['afilter'] );
</span><span class="cx">         else
</span><span class="lines">@@ -347,10 +351,16 @@
</span><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx">
</span><ins>+        if ( 'activity_comment' == $activities_template->activity->component_action )
+                $meta = '</span> <span class="activity-header-meta"> &middot; <a href="' . $bp->root_domain . '/' . BP_ACTIVITY_SLUG . '/p/' . $activities_template->activity->item_id . '">' . __( 'View Thread', 'buddypress' ) . '</a>';
+        else
+                $meta = '</span> <span class="activity-header-meta"> &middot; <a href="' . $bp->root_domain . '/' . BP_ACTIVITY_SLUG . '/p/' . $activities_template->activity->id . '">' . __( 'Permalink', 'buddypress' ) . '</a>';
+
</ins><span class="cx">         /* Add the delete link if the user has permission on this item */
</span><span class="cx">         if ( ( $activities_template->activity->user_id == $bp->loggedin_user->id ) || $bp->is_item_admin || is_site_admin() )
</span><del>-                $content[1] = '</span> <span class="activity-delete-link">' . bp_get_activity_delete_link() . '</span>' . $content[1];
</del><ins>+                 $meta .= ' &middot;' . bp_get_activity_delete_link();
</ins><span class="cx">
</span><ins>+        $content[1] = $meta . '</span>' . $content[1];
</ins><span class="cx">         $content_new = '';
</span><span class="cx">
</span><span class="cx">         for ( $i = 0; $i < count($content); $i++ )
</span><span class="lines">@@ -486,6 +496,15 @@
</span><span class="cx">         return apply_filters( 'bp_activity_insert_time_since', @sprintf( $content, @sprintf( __( '&nbsp; %s ago', 'buddypress' ), bp_core_time_since( strtotime( $date ) ) ) ) );
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+function bp_activity_permalink_id() {
+        echo bp_get_activity_permalink_id();
+}
+        function bp_get_activity_permalink_id() {
+                global $bp;
+
+                return apply_filters( 'bp_get_activity_permalink_id', $bp->current_action );
+        }
+
</ins><span class="cx"> function bp_activity_css_class() {
</span><span class="cx">         echo bp_get_activity_css_class();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkbpactivitybpactivitywidgetsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity/bp-activity-widgets.php (2157 => 2158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity/bp-activity-widgets.php        2009-11-30 00:25:30 UTC (rev 2157)
+++ trunk/bp-activity/bp-activity-widgets.php        2009-11-30 12:27:52 UTC (rev 2158)
</span><span class="lines">@@ -48,7 +48,7 @@
</span><span class="cx">                                 <div id="whats-new-options">
</span><span class="cx">                                         <div id="whats-new-submit">
</span><span class="cx">                                                 <span class="ajax-loader"></span> &nbsp;
</span><del>-                                                <input type="submit" name="aw-whats-new-submit" id="aw-whats-new-submit" value="<?php _e( 'Update', 'callisto' ) ?>" />
</del><ins>+                                                <input type="submit" name="aw-whats-new-submit" id="aw-whats-new-submit" value="<?php _e( 'Post Update', 'callisto' ) ?>" />
</ins><span class="cx">                                         </div>
</span><span class="cx">
</span><span class="cx">                                         <div id="whats-new-post-in-box">
</span></span></pre></div>
<a id="trunkbpactivityphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-activity.php (2157 => 2158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-activity.php        2009-11-30 00:25:30 UTC (rev 2157)
+++ trunk/bp-activity.php        2009-11-30 12:27:52 UTC (rev 2158)
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx">         /* Register 'activity' as a root component (for RSS feed use) */
</span><span class="cx">         bp_core_add_root_component( BP_ACTIVITY_SLUG );
</span><span class="cx"> }
</span><del>-add_action( 'plugins_loaded', 'bp_activity_setup_root_component' );
</del><ins>+add_action( 'plugins_loaded', 'bp_activity_setup_root_component', 2 );
</ins><span class="cx">
</span><span class="cx"> function bp_activity_setup_nav() {
</span><span class="cx">         global $bp;
</span><span class="lines">@@ -135,7 +135,48 @@
</span><span class="cx">         bp_core_load_template( apply_filters( 'bp_activity_template_friends_activity', 'activity/my-friends' ) );
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+function bp_activity_screen_single_activity_permalink() {
+        global $bp;
</ins><span class="cx">
</span><ins>+        if ( !$bp->displayed_user->id || $bp->current_component != $bp->activity->slug )
+                return false;
+
+        if ( empty( $bp->current_action ) || !is_numeric( $bp->current_action ) )
+                return false;
+
+        /* Get the activity details */
+        $activity = bp_activity_get_specific( array( 'activity_ids' => $bp->current_action ) );
+
+        if ( !$activity = $activity['activities'][0] )
+                bp_core_redirect( $bp->root_domain );
+
+        $has_access = true;
+        /* Redirect based on the type of activity */
+        if ( $activity->component_name == $bp->groups->id ) {
+                if ( !function_exists( 'groups_get_group' ) )
+                        bp_core_redirect( $bp->root_domain );
+
+                if ( $group = groups_get_group( array( 'group_id' => $activity->item_id ) ) ) {
+                        /* Check to see if the group is not public, if so, check the user has access to see this activity */
+                        if ( 'public' != $group->status ) {
+                                if ( !groups_is_user_member( $bp->loggedin_user->id, $group->id ) )
+                                        $has_access = false;
+                        }
+                }
+        }
+
+        $has_access = apply_filters( 'bp_activity_permalink_access', $has_access, &$activity );
+
+        if ( !$has_access ) {
+                bp_core_add_message( __( 'You do not have access to this activity.', 'buddypress' ), 'error' );
+                bp_core_redirect( $bp->loggedin_user->domain );
+        }
+
+        bp_core_load_template( apply_filters( 'bp_activity_template_profile_activity_permalink', 'activity/single' ) );
+}
+/* This screen is not attached to a nav item, so we need to add an action for it. */
+add_action( 'wp', 'bp_activity_screen_single_activity_permalink', 3 );
+
</ins><span class="cx"> /********************************************************************************
</span><span class="cx"> * Action Functions
</span><span class="cx"> *
</span><span class="lines">@@ -144,6 +185,41 @@
</span><span class="cx"> * back to the default screen after execution.
</span><span class="cx"> */
</span><span class="cx">
</span><ins>+function bp_activity_action_permalink_router() {
+        global $bp;
+
+        if ( $bp->current_component != $bp->activity->slug || $bp->current_action != 'p' )
+                return false;
+
+        if ( empty( $bp->action_variables[0] ) || !is_numeric( $bp->action_variables[0] ) )
+                return false;
+
+        /* Get the activity details */
+        $activity = bp_activity_get_specific( array( 'activity_ids' => $bp->action_variables[0] ) );
+
+        if ( !$activity = $activity['activities'][0] )
+                bp_core_redirect( $bp->root_domain );
+
+        $redirect = false;
+        /* Redirect based on the type of activity */
+        if ( $activity->component_name == $bp->groups->id ) {
+                if ( $activity->user_id )
+                        $redirect = bp_core_get_userurl( $activity->user_id ) . $bp->activity->slug . '/' . $activity->id;
+                else {
+                        if ( $group = groups_get_group( array( 'group_id' => $activity->item_id ) ) )
+                                $redirect = bp_get_group_permalink( $group ) . $bp->activity->slug . '/' . $activity->id;
+                }
+        } else
+                $redirect = bp_core_get_userurl( $activity->user_id ) . $bp->activity->slug . '/' . $activity->id;
+
+        if ( !$redirect )
+                bp_core_redirect( $bp->root_domain );
+
+        /* Redirect to the actual activity permalink page */
+        bp_core_redirect( apply_filters( 'bp_activity_action_permalink_url', $redirect . '/', &$activity ) );
+}
+add_action( 'wp', 'bp_activity_action_permalink_router', 3 );
+
</ins><span class="cx"> function bp_activity_action_delete_activity() {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><span class="lines">@@ -178,7 +254,6 @@
</span><span class="cx"> }
</span><span class="cx"> add_action( 'wp', 'bp_activity_action_delete_activity', 3 );
</span><span class="cx">
</span><del>-
</del><span class="cx"> function bp_activity_action_sitewide_feed() {
</span><span class="cx">         global $bp, $wp_query;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkbpgroupsbpgroupstemplatetagsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups/bp-groups-templatetags.php (2157 => 2158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups/bp-groups-templatetags.php        2009-11-30 00:25:30 UTC (rev 2157)
+++ trunk/bp-groups/bp-groups-templatetags.php        2009-11-30 12:27:52 UTC (rev 2158)
</span><span class="lines">@@ -483,7 +483,7 @@
</span><span class="cx">                 if ( !$group )
</span><span class="cx">                         $group =& $groups_template->group;
</span><span class="cx">
</span><del>-                return apply_filters( 'bp_get_group_permalink', $bp->root_domain . '/' . $bp->groups->slug . '/' . $group->slug );
</del><ins>+                return apply_filters( 'bp_get_group_permalink', $bp->root_domain . '/' . $bp->groups->slug . '/' . $group->slug . '/' );
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx"> function bp_group_admin_permalink( $deprecated = true, $deprecated2 = false ) {
</span><span class="lines">@@ -738,6 +738,15 @@
</span><span class="cx">         return false;
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+function bp_group_is_activity_permalink() {
+        global $bp;
+
+        if ( !$bp->is_single_item || $bp->current_component != $bp->groups->slug || $bp->current_action != $bp->activity->slug )
+                return false;
+
+        return true;
+}
+
</ins><span class="cx"> function bp_group_pagination() {
</span><span class="cx">         echo bp_get_group_pagination();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkbpgroupsphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-groups.php (2157 => 2158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-groups.php        2009-11-30 00:25:30 UTC (rev 2157)
+++ trunk/bp-groups.php        2009-11-30 12:27:52 UTC (rev 2158)
</span><span class="lines">@@ -574,12 +574,10 @@
</span><span class="cx">         bp_core_load_template( apply_filters( 'groups_template_create_group', 'groups/create' ) );
</span><span class="cx"> }
</span><span class="cx">
</span><del>-
</del><span class="cx"> function groups_screen_group_home() {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><span class="cx">         if ( $bp->is_single_item ) {
</span><del>-
</del><span class="cx">                 if ( isset($_GET['new']) ) {
</span><span class="cx">                         // Delete group request notifications for the user
</span><span class="cx">                         bp_core_delete_notifications_for_user_by_type( $bp->loggedin_user->id, $bp->groups->slug, 'membership_request_accepted' );
</span><span class="lines">@@ -975,6 +973,19 @@
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+function groups_screen_group_activity_permalink() {
+        global $bp;
+
+        if ( !$bp->is_single_item || $bp->current_component != $bp->groups->slug || $bp->current_action != $bp->activity->slug )
+                return false;
+
+        if ( '' != locate_template( array( 'groups/single/home.php' ), false ) )
+                bp_core_load_template( apply_filters( 'groups_template_group_home', 'groups/single/home' ) );
+        else
+                bp_core_load_template( apply_filters( 'groups_template_group_home', 'groups/group-home' ) );
+}
+add_action( 'wp', 'groups_screen_group_activity_permalink', 3 );
+
</ins><span class="cx"> function groups_screen_group_admin() {
</span><span class="cx">         global $bp;
</span><span class="cx">
</span><span class="lines">@@ -1606,6 +1617,18 @@
</span><span class="cx"> * true or false on success or failure.
</span><span class="cx"> */
</span><span class="cx">
</span><ins>+function groups_get_group( $args = '' ) {
+        $defaults = array(
+                'group_id' => false,
+                'load_users' => false
+        );
+
+        $args = wp_parse_args( $args, $defaults );
+        extract( $args, EXTR_SKIP );
+
+        return apply_filters( 'groups_get_group', new BP_Groups_Group( $group_id, true, $load_users ) );
+}
+
</ins><span class="cx"> /*** Group Creation, Editing & Deletion *****************************************/
</span><span class="cx">
</span><span class="cx"> function groups_create_group( $args = '' ) {
</span></span></pre></div>
<a id="trunkbpthemesbpdefault_inccssscreencss"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-default/_inc/css/screen.css (2157 => 2158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-default/_inc/css/screen.css        2009-11-30 00:25:30 UTC (rev 2157)
+++ trunk/bp-themes/bp-default/_inc/css/screen.css        2009-11-30 12:27:52 UTC (rev 2158)
</span><span class="lines">@@ -1341,6 +1341,13 @@
</span><span class="cx">                         margin-bottom: 18px;
</span><span class="cx">                 }
</span><span class="cx">
</span><ins>+.activity-list li span.activity-header-meta {
+        font-size: 0.95em;
+}
+        .activity-list li span.activity-header-meta a {
+                color: #888;
+        }
+
</ins><span class="cx"> .activity-list li span.time-since {
</span><span class="cx">         font-size: 0.85em;
</span><span class="cx">         color: #999;
</span></span></pre></div>
<a id="trunkbpthemesbpsnparentactivityentryphp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-sn-parent/activity/entry.php (2157 => 2158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-sn-parent/activity/entry.php        2009-11-30 00:25:30 UTC (rev 2157)
+++ trunk/bp-themes/bp-sn-parent/activity/entry.php        2009-11-30 12:27:52 UTC (rev 2158)
</span><span class="lines">@@ -21,7 +21,10 @@
</span><span class="cx">                 <form action="" method="post" name="activity-comment-form" id="ac-form-<?php bp_activity_id() ?>" class="ac-form">
</span><span class="cx">                         <div class="ac-reply-avatar"><?php bp_loggedin_user_avatar( 'width=25&height=25' ) ?></div>
</span><span class="cx">                         <div class="ac-reply-content">
</span><del>-                                <textarea id="ac-input-<?php bp_activity_id() ?>" class="ac-input" name="ac-input-<?php bp_activity_id() ?>"></textarea>
</del><ins>+                                <div class="ac-textarea">
+                                        <textarea id="ac-input-<?php bp_activity_id() ?>" class="ac-input" name="ac-input-<?php bp_activity_id() ?>"></textarea>
+                                </div>
+
</ins><span class="cx">                                 <input type="submit" name="ac-form-submit" value="<?php _e( 'Post', 'buddypress' ) ?> &rarr;" />
</span><span class="cx">                         </div>
</span><span class="cx">                         <?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment' ) ?>
</span></span></pre></div>
<a id="trunkbpthemesbpsnparentactivityjustmephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-sn-parent/activity/just-me.php (2157 => 2158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-sn-parent/activity/just-me.php        2009-11-30 00:25:30 UTC (rev 2157)
+++ trunk/bp-themes/bp-sn-parent/activity/just-me.php        2009-11-30 12:27:52 UTC (rev 2158)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">
</span><span class="cx">                                         <div class="activity">
</span><span class="cx">
</span><del>-                                        <?php if ( bp_has_activities( 'type=personal&max=20&per_page=20&display_comments=stream' ) ) : ?>
</del><ins>+                                        <?php if ( bp_has_activities( 'type=personal&max=20&per_page=20&display_comments=stream&show_hidden=' . bp_is_home() ) ) : ?>
</ins><span class="cx">
</span><span class="cx">                                                 <ul id="activity-list" class="activity-list item-list">
</span><span class="cx">                                                 <?php while ( bp_activities() ) : bp_the_activity(); ?>
</span></span></pre></div>
<a id="trunkbpthemesbpsnparentgroupssinglehomephp"></a>
<div class="modfile"><h4>Modified: trunk/bp-themes/bp-sn-parent/groups/single/home.php (2157 => 2158)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/bp-themes/bp-sn-parent/groups/single/home.php        2009-11-30 00:25:30 UTC (rev 2157)
+++ trunk/bp-themes/bp-sn-parent/groups/single/home.php        2009-11-30 12:27:52 UTC (rev 2158)
</span><span class="lines">@@ -58,7 +58,7 @@
</span><span class="cx">                                                 <div class="bp-widget">
</span><span class="cx">                                                         <h4><?php _e( 'Group Activity', 'buddypress' ); ?></h4>
</span><span class="cx">
</span><del>-                                                        <?php if ( is_user_logged_in() && bp_group_is_member() ) : ?>
</del><ins>+                                                        <?php if ( is_user_logged_in() && bp_group_is_member() && !bp_group_is_activity_permalink() ) : ?>
</ins><span class="cx">
</span><span class="cx">                                                         <form action="" method="post" id="whats-new-form" name="whats-new-form">
</span><span class="cx">                                                                 <div id="whats-new-avatar">
</span></span></pre>
</div>
</div>
</body>
</html>