<?php

global $activities_template,$bp;

/**
 * BuddyPress - Activity Stream Comment
 *
 * This template is used by bp_activity_comments() functions to show
 * each activity.
 *
 * @package BuddyPress
 * @subpackage bp-default
 */

$post_mood = xprofile_get_field_data( 'EstadoAnimo', get_current_user_id());

$classmeta       = classMetaEstadoAnimo($post_mood);
$classbackground = classBackgroundEstadoAnimo($post_mood);

$idfav = bp_get_activity_comment_id();

do_action( 'bp_before_activity_comment' );

?>
    <li id="acomment-<?php bp_activity_id(); ?>" <?php echo 'class="'. $classbackground .'"'; ?>>
        
        <div class="acomment-avatar">
            <?php bp_activity_avatar(); ?>
        </div>
        
        <div class="acomment-meta <?php echo $classmeta; ?>">
            <?php echo bp_core_get_userlink( $activities_template->activity->current_comment->user_id ) . '<span id="mentions">@'. get_userdata( $activities_template->activity->current_comment->user_id )->user_login .'</span>' ?>&#32;&middot; <?php echo bp_core_time_since( bp_core_current_time() )  ?>
             &middot; <a href="<?php echo wp_nonce_url( get_option('home') . '/activity/delete/?cid=' . bp_get_activity_comment_id() . '' . $comment_id, 'bp_activity_delete_link' ) ?>" class="delete acomment-delete confirm"><?php _e( 'Delete', 'buddypress' ) ?></a>
        </div>
        
        <div class="acomment-content">
            <?php
            bp_activity_comment_content();
            ?>
        </div>
        
        <?php //echo wp_nonce_url( home_url( bp_get_activity_root_slug() . '/favorite/' . $idfav . '/' ), 'mark_favorite' )?>
        
        <?php //var_dump(bp_activity_comment_id(),bp_activity_favorite_link() , wp_nonce_url( home_url( bp_get_activity_root_slug() . '/favorite/' . bp_activity_comment_id() . '/' ), 'mark_favorite' ));?>
        
        <?php
            if ( is_user_logged_in() ) {
                ?>
                <div id="activity-<?php echo $idfav; ?>" class="activity-meta <?php echo $classbackground; ?>">
                    
                    <a class="acomment-reply" href="#acomment-<?php bp_activity_id() ?>" id="acomment-reply-<?php echo esc_attr( $_POST['form_id'] ) ?>">
                        <?php _e( 'Reply', 'buddypress' ) ?>
                    </a>
                    <a style="margin-left: 4px; margin-right: 4px;" rel="<?php echo get_stylesheet_directory_uri() .'/_inc/tips.php?id='. $idfav .'&act=fav'; ?>" href="<?php echo bp_get_activity_comment_favorite_link( $idfav ) ?>" class="fav" title="<?php _e( 'Me gusta', 'buddypress' ) ?>" id="<?php echo $idfav; ?>">
                        <?php _e( 'Me gusta', 'buddypress' ) ?>
                    </a>
                    <span id="me-gusta-count-<?php echo $idfav; ?>" rel="<?php echo get_stylesheet_directory_uri() .'/_inc/tips.php?id='. $idfav .'&act=fav'; ?>" class="cluetip fav-count">(0)</span> 
                    <?php
                        do_action( 'bp_activity_entry_meta' );
                    ?>
                </div>
            <?php
            }
        ?>
    </li>
<?php
do_action( 'bp_after_activity_comment' );
?>