Changeset 2189
- Timestamp:
- 12/16/2009 09:38:39 AM (16 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
-
bp-activity/bp-activity-templatetags.php (modified) (4 diffs)
-
bp-core/bp-core-admin.php (modified) (2 diffs)
-
bp-core/bp-core-adminbar.php (modified) (5 diffs)
-
bp-groups.php (modified) (23 diffs)
-
bp-themes/bp-default/_inc/css/default.css (modified) (3 diffs)
-
bp-themes/bp-default/_inc/global.js (modified) (1 diff)
-
bp-themes/bp-default/activity/activity-loop.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-templatetags.php
r2168 r2189 343 343 } 344 344 345 if ( !bp_is_activity_permalink() ) {346 if ( 'activity_comment' == $activities_template->activity->component_action )347 $meta = '</span> <span class="activity-header-meta"> · <a href="' . $bp->root_domain . '/' . BP_ACTIVITY_SLUG . '/p/' . $activities_template->activity->item_id . '">' . __( 'View Thread', 'buddypress' ) . '</a>';348 else349 $meta = '</span> <span class="activity-header-meta"> · <a href="' . $bp->root_domain . '/' . BP_ACTIVITY_SLUG . '/p/' . $activities_template->activity->id . '">' . __( 'View Thread', 'buddypress' ) . '</a>';350 }351 352 345 /* Add the delete link if the user has permission on this item */ 353 346 if ( ( $activities_template->activity->user_id == $bp->loggedin_user->id ) || $bp->is_item_admin || is_site_admin() ) … … 497 490 498 491 return apply_filters( 'bp_get_activity_permalink_id', $bp->current_action ); 492 } 493 494 function bp_activity_thread_permalink() { 495 echo bp_get_activity_thread_permalink(); 496 } 497 function bp_get_activity_thread_permalink() { 498 global $bp, $activities_template; 499 500 if ( 'new_blog_post' == bp_get_activity_action_name() || 'new_blog_comment' == bp_get_activity_action_name() || 'new_forum_topic' == bp_get_activity_action_name() || 'new_forum_post' == bp_get_activity_action_name() ) 501 $link = bp_activity_feed_item_link(); 502 else { 503 if ( 'activity_comment' == bp_get_activity_action_name() ) 504 $link = $bp->root_domain . '/' . BP_ACTIVITY_SLUG . '/p/' . $activities_template->activity->item_id; 505 else 506 $link = $bp->root_domain . '/' . BP_ACTIVITY_SLUG . '/p/' . $activities_template->activity->id; 507 } 508 509 return apply_filters( 'bp_get_activity_thread_permalink', $link ); 499 510 } 500 511 … … 514 525 ) ); 515 526 516 $ mini_class = '';527 $class = ''; 517 528 if ( in_array( $activities_template->activity->component_action, (array)$mini_activity_actions ) ) 518 $mini_class = ' mini'; 519 520 return apply_filters( 'bp_get_activity_css_class', $activities_template->activity->component_name . ' ' . $activities_template->activity->component_action . $mini_class ); 529 $class = ' mini'; 530 531 if ( bp_activity_get_comment_count() && bp_activity_can_comment() ) 532 $class .= ' has-comments'; 533 534 return apply_filters( 'bp_get_activity_css_class', $activities_template->activity->component_name . ' ' . $activities_template->activity->component_action . $class ); 521 535 } 522 536 … … 616 630 } 617 631 632 function bp_activity_can_comment() { 633 global $bp; 634 635 if ( false === get_site_option( 'bp-disable-blogforum-comments' ) || (int)get_site_option( 'bp-disable-blogforum-comments' ) ) { 636 if ( 'new_blog_post' == bp_get_activity_action_name() || 'new_blog_comment' == bp_get_activity_action_name() || 'new_forum_topic' == bp_get_activity_action_name() || 'new_forum_post' == bp_get_activity_action_name() ) 637 return false; 638 } 639 640 if ( 'activity_comment' == bp_get_activity_action_name() ) 641 return false; 642 643 return true; 644 } 645 618 646 function bp_sitewide_activity_feed_link() { 619 647 echo bp_get_sitewide_activity_feed_link(); -
trunk/bp-core/bp-core-admin.php
r2168 r2189 81 81 <td> 82 82 <input type="radio" name="bp-admin[bp-disable-account-deletion]"<?php if ( (int)get_site_option( 'bp-disable-account-deletion' ) ) : ?> checked="checked"<?php endif; ?> id="bp-disable-account-deletion" value="1" /> <?php _e( 'Yes', 'buddypress' ) ?> 83 <input type="radio" name="bp-admin[bp-disable-account-deletion]"<?php if ( !(int)get_site_option( 'bp-disable-account-deletion' ) || '' == get_site_option( 'bp-disable-account-deletion' )) : ?> checked="checked"<?php endif; ?> id="bp-disable-account-deletion" value="0" /> <?php _e( 'No', 'buddypress' ) ?>83 <input type="radio" name="bp-admin[bp-disable-account-deletion]"<?php if ( !(int)get_site_option( 'bp-disable-account-deletion' ) ) : ?> checked="checked"<?php endif; ?> id="bp-disable-account-deletion" value="0" /> <?php _e( 'No', 'buddypress' ) ?> 84 84 </td> 85 85 </tr> … … 89 89 <td> 90 90 <input type="radio" name="bp-admin[bp-disable-forum-directory]"<?php if ( (int)get_site_option( 'bp-disable-forum-directory' ) ) : ?> checked="checked"<?php endif; ?> id="bp-disable-forum-directory" value="1" /> <?php _e( 'Yes', 'buddypress' ) ?> 91 <input type="radio" name="bp-admin[bp-disable-forum-directory]"<?php if ( !(int)get_site_option( 'bp-disable-forum-directory' ) || '' == get_site_option( 'bp-disable-forum-directory' ) ) : ?> checked="checked"<?php endif; ?> id="bp-disable-forum-directory" value="0" /> <?php _e( 'No', 'buddypress' ) ?> 91 <input type="radio" name="bp-admin[bp-disable-forum-directory]"<?php if ( !(int)get_site_option( 'bp-disable-forum-directory' ) ) : ?> checked="checked"<?php endif; ?> id="bp-disable-forum-directory" value="0" /> <?php _e( 'No', 'buddypress' ) ?> 92 </td> 93 </tr> 94 <?php endif; ?> 95 <?php if ( function_exists( 'bp_activity_install') ) : ?> 96 <tr> 97 <th scope="row"><?php _e( 'Disable activity stream commenting on blog and forum posts?', 'buddypress' ) ?>:</th> 98 <td> 99 <input type="radio" name="bp-admin[bp-disable-blogforum-comments]"<?php if ( (int)get_site_option( 'bp-disable-blogforum-comments' ) || false === get_site_option( 'bp-disable-blogforum-comments' ) ) : ?> checked="checked"<?php endif; ?> id="bp-disable-blogforum-comments" value="1" /> <?php _e( 'Yes', 'buddypress' ) ?> 100 <input type="radio" name="bp-admin[bp-disable-blogforum-comments]"<?php if ( !(int)get_site_option( 'bp-disable-blogforum-comments' ) ) : ?> checked="checked"<?php endif; ?> id="bp-disable-blogforum-comments" value="0" /> <?php _e( 'No', 'buddypress' ) ?> 92 101 </td> 93 102 </tr> -
trunk/bp-core/bp-core-adminbar.php
r2168 r2189 37 37 global $bp; 38 38 39 if ( !is_user_logged_in() ) { 40 echo '<li class="bp-login no-arrow"><a href="' . $bp->root_domain . '/wp-login.php?redirect_to=' . urlencode( $bp->root_domain ) . '">' . __( 'Log In', 'buddypress' ) . '</a></li>'; 41 42 // Show "Sign Up" link if user registrations are allowed 43 if ( get_site_option( 'registration' ) != 'none' && get_site_option( 'registration' ) != 'blog' ) { 44 echo '<li class="bp-signup no-arrow"><a href="' . bp_signup_page(false) . '">' . __( 'Sign Up', 'buddypress' ) . '</a></li>'; 45 } 39 if ( is_user_logged_in() ) 40 return false; 41 42 echo '<li class="bp-login no-arrow"><a href="' . $bp->root_domain . '/wp-login.php?redirect_to=' . urlencode( $bp->root_domain ) . '">' . __( 'Log In', 'buddypress' ) . '</a></li>'; 43 44 // Show "Sign Up" link if user registrations are allowed 45 if ( get_site_option( 'registration' ) != 'none' && get_site_option( 'registration' ) != 'blog' ) { 46 echo '<li class="bp-signup no-arrow"><a href="' . bp_signup_page(false) . '">' . __( 'Sign Up', 'buddypress' ) . '</a></li>'; 46 47 } 47 48 } … … 51 52 global $bp; 52 53 53 if ( !$bp->bp_nav ) 54 return false; 55 56 if ( is_user_logged_in() ) { 57 58 echo '<li id="bp-adminbar-account-menu"><a href="' . bp_loggedin_user_domain() . '">'; 59 60 echo __( 'My Account', 'buddypress' ) . '</a>'; 61 echo '<ul>'; 62 63 /* Loop through each navigation item */ 64 $counter = 0; 65 foreach( $bp->bp_nav as $nav_item ) { 66 $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; 67 68 echo '<li' . $alt . '>'; 69 echo '<a id="bp-admin-' . $nav_item['css_id'] . '" href="' . $nav_item['link'] . '">' . $nav_item['name'] . '</a>'; 70 71 if ( is_array( $bp->bp_options_nav[$nav_item['css_id']] ) ) { 72 echo '<ul>'; 73 $sub_counter = 0; 74 75 foreach( $bp->bp_options_nav[$nav_item['css_id']] as $subnav_item ) { 76 $alt = ( 0 == $sub_counter % 2 ) ? ' class="alt"' : ''; 77 echo '<li' . $alt . '><a id="bp-admin-' . $subnav_item['css_id'] . '" href="' . $subnav_item['link'] . '">' . $subnav_item['name'] . '</a></li>'; 78 $sub_counter++; 79 } 80 echo '</ul>'; 54 if ( !$bp->bp_nav || !is_user_logged_in() ) 55 return false; 56 57 echo '<li id="bp-adminbar-account-menu"><a href="' . bp_loggedin_user_domain() . '">'; 58 59 echo __( 'My Account', 'buddypress' ) . '</a>'; 60 echo '<ul>'; 61 62 /* Loop through each navigation item */ 63 $counter = 0; 64 foreach( $bp->bp_nav as $nav_item ) { 65 $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; 66 67 echo '<li' . $alt . '>'; 68 echo '<a id="bp-admin-' . $nav_item['css_id'] . '" href="' . $nav_item['link'] . '">' . $nav_item['name'] . '</a>'; 69 70 if ( is_array( $bp->bp_options_nav[$nav_item['css_id']] ) ) { 71 echo '<ul>'; 72 $sub_counter = 0; 73 74 foreach( $bp->bp_options_nav[$nav_item['css_id']] as $subnav_item ) { 75 $alt = ( 0 == $sub_counter % 2 ) ? ' class="alt"' : ''; 76 echo '<li' . $alt . '><a id="bp-admin-' . $subnav_item['css_id'] . '" href="' . $subnav_item['link'] . '">' . $subnav_item['name'] . '</a></li>'; 77 $sub_counter++; 81 78 } 82 83 echo '</li>'; 84 85 $counter++; 79 echo '</ul>'; 86 80 } 87 81 88 $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : '';89 90 if ( function_exists('wp_logout_url') ) {91 echo '<li' . $alt . '><a id="bp-admin-logout" href="' . wp_logout_url(site_url()) . '">' . __( 'Log Out', 'buddypress' ) . '</a></li>';92 } else {93 echo '<li' . $alt . '><a id="bp-admin-logout" href="' . site_url() . '/wp-login.php?action=logout&redirect_to=' . site_url() . '">' . __( 'Log Out', 'buddypress' ) . '</a></li>';94 }95 96 echo '</ul>';97 82 echo '</li>'; 98 } 83 84 $counter++; 85 } 86 87 $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; 88 89 echo '<li' . $alt . '><a id="bp-admin-logout" href="' . wp_logout_url(site_url()) . '">' . __( 'Log Out', 'buddypress' ) . '</a></li>'; 90 echo '</ul>'; 91 echo '</li>'; 99 92 } 100 93 … … 104 97 // If the user is a site admin, just display admin. 105 98 if ( is_site_admin() ) 106 return __( 'Admin', 'buddypress' );99 return __( 'Admin', 'buddypress' ); 107 100 108 101 $roles = get_usermeta( $user, 'wp_' . $blog . '_capabilities' ); … … 126 119 // *** "My Blogs" Menu ******** 127 120 function bp_adminbar_blogs_menu() { 128 if ( is_user_logged_in() ) { 129 global $bp; 130 131 if ( function_exists('bp_blogs_install') ) { 132 133 if ( !$blogs = wp_cache_get( 'bp_blogs_of_user_' . $bp->loggedin_user->id, 'bp' ) ) { 134 $blogs = bp_blogs_get_blogs_for_user( $bp->loggedin_user->id ); 135 wp_cache_set( 'bp_blogs_of_user_' . $bp->loggedin_user->id, $blogs, 'bp' ); 121 global $bp; 122 123 if ( !is_user_logged_in() || !function_exists('bp_blogs_install') ) 124 return false; 125 126 if ( !$blogs = wp_cache_get( 'bp_blogs_of_user_' . $bp->loggedin_user->id, 'bp' ) ) { 127 $blogs = bp_blogs_get_blogs_for_user( $bp->loggedin_user->id ); 128 wp_cache_set( 'bp_blogs_of_user_' . $bp->loggedin_user->id, $blogs, 'bp' ); 129 } 130 131 echo '<li id="bp-adminbar-blogs-menu"><a href="' . $bp->loggedin_user->domain . $bp->blogs->slug . '/my-blogs">'; 132 133 _e( 'My Blogs', 'buddypress' ); 134 135 echo '</a>'; 136 echo '<ul>'; 137 138 if ( is_array( $blogs['blogs'] ) && (int)$blogs['count'] ) { 139 $counter = 0; 140 foreach ( $blogs['blogs'] as $blog ) { 141 $role = get_blog_role_for_user( $bp->loggedin_user->id, $blog->id ); 142 143 $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; 144 echo '<li' . $alt . '>'; 145 echo '<a href="' . $blog->siteurl . '">' . $blog->name . ' (' . $role . ')</a>'; 146 if ( !( 'Subscriber' == $role ) ) { // then they have something to display on the flyout menu 147 echo '<ul>'; 148 echo '<li class="alt"><a href="' . $blog->siteurl . 'wp-admin/">' . __('Dashboard', 'buddypress') . '</a></li>'; 149 echo '<li><a href="' . $blog->siteurl . 'wp-admin/post-new.php">' . __('New Post', 'buddypress') . '</a></li>'; 150 echo '<li class="alt"><a href="' . $blog->siteurl . 'wp-admin/edit.php">' . __('Manage Posts', 'buddypress') . '</a></li>'; 151 echo '<li><a href="' . $blog->siteurl . 'wp-admin/edit-comments.php">' . __('Manage Comments', 'buddypress') . '</a></li>'; 152 if ( 'Admin' == $role ) { 153 echo '<li class="alt"><a href="' . $blog->siteurl . 'wp-admin/themes.php">' . __('Switch Theme', 'buddypress') . '</a></li>'; 154 } 155 echo '</ul>'; 136 156 } 137 138 echo '<li id="bp-adminbar-blogs-menu"><a href="' . $bp->loggedin_user->domain . $bp->blogs->slug . '/my-blogs">'; 139 140 _e( 'My Blogs', 'buddypress' ); 141 157 echo '</li>'; 158 $counter++; 159 } 160 } 161 162 $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; 163 164 if ( bp_blog_signup_enabled() ) { 165 echo '<li' . $alt . '>'; 166 echo '<a href="' . $bp->loggedin_user->domain . $bp->blogs->slug . '/create-a-blog">' . __('Create a Blog!', 'buddypress') . '</a>'; 167 echo '</li>'; 168 } 169 170 echo '</ul>'; 171 echo '</li>'; 172 } 173 174 // **** "Notifications" Menu ********* 175 function bp_adminbar_notifications_menu() { 176 global $bp; 177 178 if ( !is_user_logged_in() ) 179 return false; 180 181 echo '<li id="bp-adminbar-notifications-menu"><a href="' . $bp->loggedin_user->domain . '">'; 182 _e( 'Notifications', 'buddypress' ); 183 184 if ( $notifications = bp_core_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?> 185 <span><?php echo count($notifications) ?></span> 186 <?php 187 } 188 189 echo '</a>'; 190 echo '<ul>'; 191 192 if ( $notifications ) { ?> 193 <?php $counter = 0; ?> 194 <?php for ( $i = 0; $i < count($notifications); $i++ ) { ?> 195 <?php $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; ?> 196 <li<?php echo $alt ?>><?php echo $notifications[$i] ?></li> 197 <?php $counter++; ?> 198 <?php } ?> 199 <?php } else { ?> 200 <li><a href="<?php echo $bp->loggedin_user->domain ?>"><?php _e( 'No new notifications.', 'buddypress' ); ?></a></li> 201 <?php 202 } 203 204 echo '</ul>'; 205 echo '</li>'; 206 } 207 208 // **** "Blog Authors" Menu (visible when not logged in) ******** 209 function bp_adminbar_authors_menu() { 210 global $bp, $current_blog; 211 212 if ( $current_blog->id == $bp->root_blog || !function_exists( 'bp_blogs_install' ) ) 213 return false; 214 215 $authors = get_users_of_blog(); 216 217 if ( is_array( $authors ) ) { 218 /* This is a blog, render a menu with links to all authors */ 219 echo '<li id="bp-adminbar-authors-menu"><a href="/">'; 220 _e('Blog Authors', 'buddypress'); 221 echo '</a>'; 222 223 echo '<ul class="author-list">'; 224 foreach( $authors as $author ) { 225 $author = new BP_Core_User( $author->user_id ); 226 echo '<li>'; 227 228 echo '<a href="' . $author->user_url . '">'; 229 echo $author->avatar_mini; 230 echo ' ' . $author->fullname; 231 echo '<span class="activity">' . $author->last_active . '</span>'; 142 232 echo '</a>'; 143 echo '<ul>'; 144 145 if ( is_array( $blogs['blogs'] ) && (int)$blogs['count'] ) { 146 $counter = 0; 147 foreach ( $blogs['blogs'] as $blog ) { 148 $role = get_blog_role_for_user( $bp->loggedin_user->id, $blog->id ); 149 150 $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; 151 echo '<li' . $alt . '>'; 152 echo '<a href="' . $blog->siteurl . '">' . $blog->name . ' (' . $role . ')</a>'; 153 if ( !( 'Subscriber' == $role ) ) { // then they have something to display on the flyout menu 154 echo '<ul>'; 155 echo '<li class="alt"><a href="' . $blog->siteurl . 'wp-admin/">' . __('Dashboard', 'buddypress') . '</a></li>'; 156 echo '<li><a href="' . $blog->siteurl . 'wp-admin/post-new.php">' . __('New Post', 'buddypress') . '</a></li>'; 157 echo '<li class="alt"><a href="' . $blog->siteurl . 'wp-admin/edit.php">' . __('Manage Posts', 'buddypress') . '</a></li>'; 158 echo '<li><a href="' . $blog->siteurl . 'wp-admin/edit-comments.php">' . __('Manage Comments', 'buddypress') . '</a></li>'; 159 if ( 'Admin' == $role ) { 160 echo '<li class="alt"><a href="' . $blog->siteurl . 'wp-admin/themes.php">' . __('Switch Theme', 'buddypress') . '</a></li>'; 161 } 162 echo '</ul>'; 163 } 164 echo '</li>'; 165 $counter++; 166 } 167 } 168 169 $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; 170 171 if ( bp_blog_signup_enabled() ) { 172 echo '<li' . $alt . '>'; 173 echo '<a href="' . $bp->loggedin_user->domain . $bp->blogs->slug . '/create-a-blog">' . __('Create a Blog!', 'buddypress') . '</a>'; 174 echo '</li>'; 175 } 176 177 echo '</ul>'; 233 echo '<div class="admin-bar-clear"></div>'; 178 234 echo '</li>'; 179 235 } 180 }181 }182 183 // **** "Notifications" Menu *********184 function bp_adminbar_notifications_menu() {185 if ( is_user_logged_in() ) {186 global $bp;187 188 echo '<li id="bp-adminbar-notifications-menu"><a href="' . $bp->loggedin_user->domain . '">';189 _e( 'Notifications', 'buddypress' );190 191 if ( $notifications = bp_core_get_notifications_for_user( $bp->loggedin_user->id ) ) { ?>192 <span><?php echo count($notifications) ?></span>193 <?php194 }195 196 echo '</a>';197 echo '<ul>';198 199 if ( $notifications ) { ?>200 <?php $counter = 0; ?>201 <?php for ( $i = 0; $i < count($notifications); $i++ ) { ?>202 <?php $alt = ( 0 == $counter % 2 ) ? ' class="alt"' : ''; ?>203 <li<?php echo $alt ?>><?php echo $notifications[$i] ?></li>204 <?php $counter++; ?>205 <?php } ?>206 <?php } else { ?>207 <li><a href="<?php echo $bp->loggedin_user->domain ?>"><?php _e( 'No new notifications.', 'buddypress' ); ?></a></li>208 <?php209 }210 211 236 echo '</ul>'; 212 237 echo '</li>'; 213 }214 }215 216 // **** "Blog Authors" Menu (visible when not logged in) ********217 function bp_adminbar_authors_menu() {218 global $current_blog;219 220 if ( $current_blog->blog_id > 1 ) {221 $authors = get_users_of_blog();222 223 if ( is_array( $authors ) ) {224 /* This is a blog, render a menu with links to all authors */225 echo '<li id="bp-adminbar-authors-menu"><a href="/">';226 _e('Blog Authors', 'buddypress');227 echo '</a>';228 229 echo '<ul class="author-list">';230 foreach( $authors as $author ) {231 $author = new BP_Core_User( $author->user_id );232 echo '<li>';233 234 echo '<a href="' . $author->user_url . '">';235 echo $author->avatar_mini;236 echo ' ' . $author->fullname;237 echo '<span class="activity">' . $author->last_active . '</span>';238 echo '</a>';239 echo '<div class="admin-bar-clear"></div>';240 echo '</li>';241 }242 echo '</ul>';243 echo '</li>';244 }245 238 } 246 239 } … … 271 264 } 272 265 273 274 266 add_action( 'bp_adminbar_logo', 'bp_adminbar_logo' ); 275 267 add_action( 'bp_adminbar_menus', 'bp_adminbar_login_menu', 2 ); 276 268 add_action( 'bp_adminbar_menus', 'bp_adminbar_account_menu', 4 ); 277 278 if ( function_exists('bp_blogs_install') ) 279 add_action( 'bp_adminbar_menus', 'bp_adminbar_blogs_menu', 6 ); 280 269 add_action( 'bp_adminbar_menus', 'bp_adminbar_blogs_menu', 6 ); 281 270 add_action( 'bp_adminbar_menus', 'bp_adminbar_notifications_menu', 8 ); 282 283 if ( function_exists('bp_blogs_install') ) 284 add_action( 'bp_adminbar_menus', 'bp_adminbar_authors_menu', 12 ); 285 271 add_action( 'bp_adminbar_menus', 'bp_adminbar_authors_menu', 12 ); 286 272 add_action( 'bp_adminbar_menus', 'bp_adminbar_random_menu', 100 ); 287 273 -
trunk/bp-groups.php
r2179 r2189 321 321 322 322 <ul> 323 <li><a class="confirm" href="<?php echo wp_nonce_url( bp_get_group_permalink( $bp->groups->current_group ) . ' /admin/delete-group/', 'groups_delete_group' ) ?>&delete-group-button=1&delete-group-understand=1"><?php _e( "Delete Group", 'buddypress' ) ?></a></li>323 <li><a class="confirm" href="<?php echo wp_nonce_url( bp_get_group_permalink( $bp->groups->current_group ) . 'admin/delete-group/', 'groups_delete_group' ) ?>&delete-group-button=1&delete-group-understand=1"><?php _e( "Delete Group", 'buddypress' ) ?></a></li> 324 324 325 325 <?php do_action( 'groups_adminbar_menu_items' ) ?> … … 447 447 $query_vars = '?' . $_SERVER['QUERY_STRING']; 448 448 449 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . ' /forum/topic/' . $topic_slug . '/' . $query_vars );449 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic_slug . '/' . $query_vars ); 450 450 } 451 451 … … 546 546 547 547 do_action( 'groups_edit_forum_topic', $topic_id ); 548 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . ' /forum/topic/' . $topic_slug . '/' );548 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic_slug . '/' ); 549 549 } 550 550 … … 592 592 593 593 do_action( 'groups_edit_forum_post', $post_id ); 594 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . ' /forum/topic/' . $topic_slug . '/' );594 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic_slug . '/' ); 595 595 } 596 596 … … 619 619 bp_core_add_message( __( 'The topic was created successfully', 'buddypress') ); 620 620 621 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . ' /forum/topic/' . $topic->topic_slug . '/' );621 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic->topic_slug . '/' ); 622 622 } 623 623 … … 648 648 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) ); 649 649 else 650 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . '/' .$bp->wire->slug );650 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . $bp->wire->slug ); 651 651 652 652 } else if ( 'delete' == $wire_action && ( is_site_admin() || groups_is_user_member( $bp->loggedin_user->id, $bp->groups->current_group->id ) ) ) { … … 665 665 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) ); 666 666 else 667 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . '/' .$bp->wire->slug );667 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . $bp->wire->slug ); 668 668 669 669 } else if ( ( !$wire_action || 'latest' == $bp->action_variables[1] ) ) { … … 790 790 return false; 791 791 792 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . ' /admin/edit-details' );792 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . 'admin/edit-details/' ); 793 793 } 794 794 … … 814 814 do_action( 'groups_group_details_edited', $bp->groups->current_group->id ); 815 815 816 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . ' /admin/edit-details' );816 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . 'admin/edit-details/' ); 817 817 } 818 818 … … 855 855 do_action( 'groups_group_settings_edited', $bp->groups->current_group->id ); 856 856 857 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . ' /admin/group-settings' );857 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . 'admin/group-settings/' ); 858 858 } 859 859 … … 948 948 do_action( 'groups_promoted_member', $user_id, $bp->groups->current_group->id ); 949 949 950 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . ' /admin/manage-members' );950 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . 'admin/manage-members/' ); 951 951 } 952 952 … … 973 973 do_action( 'groups_demoted_member', $user_id, $bp->groups->current_group->id ); 974 974 975 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . ' /admin/manage-members' );975 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . 'admin/manage-members/' ); 976 976 } 977 977 … … 998 998 do_action( 'groups_banned_member', $user_id, $bp->groups->current_group->id ); 999 999 1000 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . ' /admin/manage-members' );1000 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . 'admin/manage-members/' ); 1001 1001 } 1002 1002 … … 1017 1017 do_action( 'groups_unbanned_member', $user_id, $bp->groups->current_group->id ); 1018 1018 1019 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . ' /admin/manage-members' );1019 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . 'admin/manage-members/' ); 1020 1020 } 1021 1021 … … 1071 1071 do_action( 'groups_group_request_managed', $bp->groups->current_group->id, $request_action, $membership_id ); 1072 1072 1073 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . ' /admin/membership-requests' );1073 bp_core_redirect( bp_get_group_permalink( $bp->groups->current_group ) . 'admin/membership-requests/' ); 1074 1074 } 1075 1075 … … 1429 1429 return false; 1430 1430 1431 /* If the group is not public, hide the activity sitewide , or basically when not looking at the group feed. */1431 /* If the group is not public, hide the activity sitewide. */ 1432 1432 if ( 'public' == $bp->groups->current_group->status ) 1433 1433 $hide_sitewide = false; … … 2071 2071 $topic = bp_forums_get_topic_details( $topic_id ); 2072 2072 2073 $activity_content = sprintf( __( '%s posted on the forum topic %s in the group %s:', 'buddypress'), bp_core_get_userlink( $bp->loggedin_user->id ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . ' /forum/topic/' . $topic->topic_slug .'">' . attribute_escape( $topic->topic_title ) . '</a>', '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' );2073 $activity_content = sprintf( __( '%s posted on the forum topic %s in the group %s:', 'buddypress'), bp_core_get_userlink( $bp->loggedin_user->id ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic->topic_slug .'/">' . attribute_escape( $topic->topic_title ) . '</a>', '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' ); 2074 2074 $activity_content .= '<blockquote>' . bp_create_excerpt( attribute_escape( $post_text ) ) . '</blockquote>'; 2075 2075 … … 2077 2077 groups_record_activity( array( 2078 2078 'content' => apply_filters( 'groups_activity_new_forum_post', $activity_content, $post_text, &$topic, &$forum_post ), 2079 'primary_link' => apply_filters( 'groups_activity_new_forum_post_primary_link', bp_get_group_permalink( $bp->groups->current_group ) ),2079 'primary_link' => apply_filters( 'groups_activity_new_forum_post_primary_link', bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic->topic_slug . '/' ), 2080 2080 'component_action' => 'new_forum_post', 2081 2081 'item_id' => $bp->groups->current_group->id, … … 2100 2100 $topic = bp_forums_get_topic_details( $topic_id ); 2101 2101 2102 $activity_content = sprintf( __( '%s started the forum topic %s in the group %s:', 'buddypress'), bp_core_get_userlink( $bp->loggedin_user->id ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . ' /forum/topic/' . $topic->topic_slug .'">' . attribute_escape( $topic->topic_title ) . '</a>', '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' );2102 $activity_content = sprintf( __( '%s started the forum topic %s in the group %s:', 'buddypress'), bp_core_get_userlink( $bp->loggedin_user->id ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic->topic_slug .'/">' . attribute_escape( $topic->topic_title ) . '</a>', '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' ); 2103 2103 $activity_content .= '<blockquote>' . bp_create_excerpt( attribute_escape( $topic_text ) ) . '</blockquote>'; 2104 2104 … … 2106 2106 groups_record_activity( array( 2107 2107 'content' => apply_filters( 'groups_activity_new_forum_topic', $activity_content, $topic_text, &$topic ), 2108 'primary_link' => apply_filters( 'groups_activity_new_forum_topic_primary_link', bp_get_group_permalink( $bp->groups->current_group ) ),2108 'primary_link' => apply_filters( 'groups_activity_new_forum_topic_primary_link', bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic->topic_slug . '/' ), 2109 2109 'component_action' => 'new_forum_topic', 2110 2110 'item_id' => $bp->groups->current_group->id, … … 2128 2128 bp_activity_delete_by_item_id( array( 'item_id' => $bp->groups->current_group->id, 'secondary_item_id' => $topic_id, 'component_name' => $bp->groups->id, 'component_action' => 'new_forum_topic' ) ); 2129 2129 2130 $activity_content = sprintf( __( '%s started the forum topic %s in the group %s:', 'buddypress'), bp_core_get_userlink( $topic->topic_poster ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . ' /forum/topic/' . $topic->topic_slug .'">' . attribute_escape( $topic->topic_title ) . '</a>', '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' );2130 $activity_content = sprintf( __( '%s started the forum topic %s in the group %s:', 'buddypress'), bp_core_get_userlink( $topic->topic_poster ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic->topic_slug .'/">' . attribute_escape( $topic->topic_title ) . '</a>', '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' ); 2131 2131 $activity_content .= '<blockquote>' . bp_create_excerpt( attribute_escape( $topic_text ) ) . '</blockquote>'; 2132 2132 … … 2134 2134 groups_record_activity( array( 2135 2135 'content' => apply_filters( 'groups_activity_new_forum_topic', $activity_content, $topic_text, &$topic ), 2136 'primary_link' => apply_filters( 'groups_activity_new_forum_topic_primary_link', bp_get_group_permalink( $bp->groups->current_group ) ),2136 'primary_link' => apply_filters( 'groups_activity_new_forum_topic_primary_link', bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic->topic_slug . '/' ), 2137 2137 'component_action' => 'new_forum_topic', 2138 2138 'item_id' => (int)$bp->groups->current_group->id, … … 2162 2162 bp_activity_delete_by_item_id( array( 'item_id' => $bp->groups->current_group->id, 'secondary_item_id' => $post_id, 'component_name' => $bp->groups->id, 'component_action' => 'new_forum_post' ) ); 2163 2163 2164 $activity_content = sprintf( __( '%s posted on the forum topic %s in the group %s:', 'buddypress'), bp_core_get_userlink( $post->poster_id ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . ' /forum/topic/' . $topic->topic_slug .'">' . attribute_escape( $topic->topic_title ) . '</a>', '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' );2164 $activity_content = sprintf( __( '%s posted on the forum topic %s in the group %s:', 'buddypress'), bp_core_get_userlink( $post->poster_id ), '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . 'forum/topic/' . $topic->topic_slug .'">' . attribute_escape( $topic->topic_title ) . '</a>', '<a href="' . bp_get_group_permalink( $bp->groups->current_group ) . '">' . attribute_escape( $bp->groups->current_group->name ) . '</a>' ); 2165 2165 $activity_content .= '<blockquote>' . bp_create_excerpt( attribute_escape( $post_text ) ) . '</blockquote>'; 2166 2166 -
trunk/bp-themes/bp-default/_inc/css/default.css
r2188 r2189 927 927 -------------------------------------------------------------- */ 928 928 929 ul.activity-list li { 930 padding: 20px 0 0 0; 931 } 932 ul.activity-list li.has-comments { 933 padding-bottom: 20px; 934 } 935 929 936 .activity-list li.mini { 930 937 font-size: 11px; 931 938 min-height: 35px; 939 padding: 12px 0 0 0; 932 940 } 933 941 .activity-list li.mini div.activity-meta { … … 1087 1095 1088 1096 div.activity-meta { 1089 margin -left:3px;1090 } 1091 1092 .activity-list div.activity-meta a .acomment-reply{1097 margin: 0 0 20px 3px; 1098 } 1099 1100 .activity-list div.activity-meta a { 1093 1101 font-size: 11px; 1094 background: # FFF9DB;1095 border-bottom: 1px solid # FFE8C4;1096 border-right: 1px solid # FFE8C4;1097 color: # ffa200;1102 background: #f4f4f4; 1103 border-bottom: 1px solid #ddd; 1104 border-right: 1px solid #ddd; 1105 color: #999; 1098 1106 padding: 4px 8px; 1099 1107 text-decoration: none; … … 1101 1109 -webkit-border-radius: 4px; 1102 1110 border-radius: 4px; 1103 } 1104 div.activity-meta a.acomment-reply:hover { 1105 background: #f7740a; 1111 margin-right: 3px; 1112 } 1113 .activity-list div.activity-meta a.acomment-reply { 1114 background: #FFF9DB; 1115 border-bottom: 1px solid #FFE8C4; 1116 border-right: 1px solid #FFE8C4; 1117 color: #ffa200; 1118 } 1119 1120 div.activity-meta a:hover { 1121 background: #aaa; 1106 1122 color: #fff; 1107 border-color: #f7740a; 1108 } 1123 border-color: #aaa; 1124 } 1125 div.activity-meta a.acomment-reply:hover { 1126 background: #f7740a; 1127 color: #fff; 1128 border-color: #f7740a; 1129 } 1109 1130 1110 1131 div.activity-comments { 1111 margin: 20px 0 5px75px;1132 margin: 0 0 0 75px; 1112 1133 background: #f5f5f5; 1113 1134 -moz-border-radius: 4px; -
trunk/bp-themes/bp-default/_inc/global.js
r2179 r2189 290 290 form.parent().children('ul').append(response).hide().fadeIn( 200 ); 291 291 form.children('textarea').val(''); 292 form.parent().parent().addClass('has-comments'); 292 293 } 293 294 ); -
trunk/bp-themes/bp-default/activity/activity-loop.php
r2170 r2189 16 16 <?php bp_activity_content() ?> 17 17 18 <?php if ( is_user_logged_in() && 'activity_comment' != bp_get_activity_action_name() ) : ?>19 18 <div class="activity-meta"> 20 <a href="#acomment-<?php bp_activity_id() ?>" class="acomment-reply" id="acomment-comment-<?php bp_activity_id() ?>"><?php _e( 'Comment', 'buddypress' ) ?> (<?php bp_activity_comment_count() ?>)</a> 19 <?php if ( is_user_logged_in() && bp_activity_can_comment() ) : ?> 20 <a href="#acomment-<?php bp_activity_id() ?>" class="acomment-reply" id="acomment-comment-<?php bp_activity_id() ?>"><?php _e( 'Comment', 'buddypress' ) ?> (<?php bp_activity_comment_count() ?>)</a> 21 <?php endif; ?> 22 23 <?php if ( !bp_is_activity_permalink() ) : ?> 24 <a href="<?php bp_activity_thread_permalink() ?>" title="<?php _e( 'View Thread', 'buddypress' ) ?>"><?php _e( 'View Thread', 'buddypress' ) ?></a> 25 <?php endif; ?> 21 26 </div> 22 <?php endif; ?>23 27 </div> 24 28 25 <?php if ( 'activity_comment' == bp_get_activity_action_name() ) : ?> 26 <div class="activity-inreplyto"> 27 <strong><?php _e( 'In reply to', 'buddypress' ) ?></strong> - <?php bp_activity_parent_content() ?> 28 </div> 29 <?php else : ?> 30 <div class="activity-comments"> 31 <?php bp_activity_comments() ?> 29 <?php if ( bp_activity_can_comment() ) : ?> 32 30 33 <?php if ( is_user_logged_in() ) : ?> 34 <form action="" method="post" name="activity-comment-form" id="ac-form-<?php bp_activity_id() ?>" class="ac-form"> 35 <div class="ac-reply-avatar"><?php bp_loggedin_user_avatar( 'width=25&height=25' ) ?></div> 36 <div class="ac-reply-content"> 37 <div class="ac-textarea"> 38 <textarea id="ac-input-<?php bp_activity_id() ?>" class="ac-input" name="ac-input-<?php bp_activity_id() ?>"></textarea> 31 <?php if ( 'activity_comment' == bp_get_activity_action_name() ) : ?> 32 <div class="activity-inreplyto"> 33 <strong><?php _e( 'In reply to', 'buddypress' ) ?></strong> - <?php bp_activity_parent_content() ?> 34 </div> 35 <?php else : ?> 36 <div class="activity-comments"> 37 <?php bp_activity_comments() ?> 38 39 <?php if ( is_user_logged_in() ) : ?> 40 <form action="" method="post" name="activity-comment-form" id="ac-form-<?php bp_activity_id() ?>" class="ac-form"> 41 <div class="ac-reply-avatar"><?php bp_loggedin_user_avatar( 'width=25&height=25' ) ?></div> 42 <div class="ac-reply-content"> 43 <div class="ac-textarea"> 44 <textarea id="ac-input-<?php bp_activity_id() ?>" class="ac-input" name="ac-input-<?php bp_activity_id() ?>"></textarea> 45 </div> 46 <input type="submit" name="ac-form-submit" value="<?php _e( 'Post', 'buddypress' ) ?> →" /> <?php _e( 'or press esc to cancel.', 'buddypress' ) ?> 39 47 </div> 40 <input type="submit" name="ac-form-submit" value="<?php _e( 'Post', 'buddypress' ) ?> →" /> <?php _e( 'or press esc to cancel.', 'buddypress' ) ?> 41 </div> 42 <?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment' ) ?> 43 </form> 44 <?php endif; ?> 45 </div> 46 <?php endif; ?> 48 <?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment' ) ?> 49 </form> 50 <?php endif; ?> 51 </div> 52 <?php endif; ?> 47 53 54 <?php endif;?> 48 55 </li> 49 56
Note: See TracChangeset
for help on using the changeset viewer.