[buddypress-trac] [BuddyPress] #2542: activity-meta in entry.php needs is_user_logged_in() around whole div...

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Tue Jul 20 08:33:24 UTC 2010

#2542: activity-meta in entry.php needs is_user_logged_in() around whole div...
 Reporter:  grimbog  |       Owner:                                     
     Type:  defect   |      Status:  new                                
 Priority:  normal   |   Milestone:  1.2.5                              
Component:  Core     |    Keywords:  activity-meta div is_user_logged_in
 Hey guys,

 Fairly minor thing, but noticed that an empty div element is rendered to
 the activity entry page when a user is logged out. Usually wouldn't mind,
 but finding that its styled (by default) with "margin:15px 0 15px 5px;",
 which is causing quite a gap, and generally wasting space.

 I've attached a screenshot with the problem highlighted, and have adapted
 the code to this in my version, but you might want to alter the template:

 <?php if ( is_user_logged_in() ) : ?>
 <div class="activity-meta">
         <?php if ( bp_activity_can_comment() ) : ?>
                 <a href="<?php bp_activity_comment_link() ?>" class
 ="acomment-reply" id="acomment-comment-<?php bp_activity_id() ?>"><?php
 _e( 'Reply', 'buddypress' ) ?> (<span><?php bp_activity_comment_count()
         <?php endif; ?>

         <?php if ( !bp_get_activity_is_favorite() ) : ?>
                 <a href="<?php bp_activity_favorite_link() ?>" class="fav"
 title="<?php _e( 'Mark as Favorite', 'buddypress' ) ?>"><?php _e(
 'Favorite', 'buddypress' ) ?></a>
         <?php else : ?>
                 <a href="<?php bp_activity_unfavorite_link() ?>"
 class="unfav" title="<?php _e( 'Remove Favorite', 'buddypress' ) ?>"><?php
 _e( 'Remove Favorite', 'buddypress' ) ?></a>
         <?php endif; ?>

         <?php do_action( 'bp_activity_entry_meta' ) ?>
 <?php endif;?>

Ticket URL: <https://trac.buddypress.org/ticket/2542>
BuddyPress <http://buddypress.org/>

More information about the buddypress-trac mailing list