1 | <div class="home_activity"> |
---|
2 | <h3>Latest Activity</h3> |
---|
3 | <?php if ( bp_has_activities('per_page=6&display_comments=threaded') ) : ?> |
---|
4 | |
---|
5 | <ul id="activity-stream" class="activity-list item-list"> |
---|
6 | |
---|
7 | <?php while ( bp_activities() ) : bp_the_activity(); ?> |
---|
8 | |
---|
9 | <li class="<?php bp_activity_css_class() ?>" id="activity-<?php bp_activity_id() ?>"> |
---|
10 | |
---|
11 | <div class="activity-avatar"> |
---|
12 | <a href="<?php bp_activity_user_link() ?>"> |
---|
13 | <?php bp_activity_avatar( 'type=full&width=20&height=20' ) ?> |
---|
14 | </a> |
---|
15 | </div> |
---|
16 | |
---|
17 | <div class="activity-content"> |
---|
18 | |
---|
19 | <div class="activity-header"> |
---|
20 | <?php bp_activity_action() ?> |
---|
21 | </div> |
---|
22 | |
---|
23 | <?php if ( bp_get_activity_content_body() ) : ?> |
---|
24 | <div class="activity-inner"> |
---|
25 | <?php bp_activity_content_body() ?> |
---|
26 | </div> |
---|
27 | <?php endif; ?> |
---|
28 | |
---|
29 | <?php do_action( 'bp_activity_entry_content' ) ?> |
---|
30 | |
---|
31 | </div> |
---|
32 | |
---|
33 | <div class="activity-meta"> |
---|
34 | <?php if ( is_user_logged_in() && bp_activity_can_comment() ) : ?> |
---|
35 | <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() ?></span>)</a> |
---|
36 | <?php endif; ?> |
---|
37 | |
---|
38 | <?php if ( is_user_logged_in() ) : ?> |
---|
39 | <?php if ( !bp_get_activity_is_favorite() ) : ?> |
---|
40 | <a href="<?php bp_activity_favorite_link() ?>" class="fav" title="<?php _e( 'Mark as Favorite', 'buddypress' ) ?>"><?php _e( 'Favorite', 'buddypress' ) ?></a> |
---|
41 | <?php else : ?> |
---|
42 | <a href="<?php bp_activity_unfavorite_link() ?>" class="unfav" title="<?php _e( 'Remove Favorite', 'buddypress' ) ?>"><?php _e( 'Remove Favorite', 'buddypress' ) ?></a> |
---|
43 | <?php endif; ?> |
---|
44 | <?php endif;?> |
---|
45 | |
---|
46 | <?php do_action( 'bp_activity_entry_meta' ) ?> |
---|
47 | </div> |
---|
48 | |
---|
49 | <?php if ( bp_activity_can_comment() ) : ?> |
---|
50 | <div class="activity-comments"> |
---|
51 | <?php bp_activity_comments() ?> |
---|
52 | |
---|
53 | <?php if ( is_user_logged_in() ) : ?> |
---|
54 | <form action="<?php bp_activity_comment_form_action() ?>" method="post" id="ac-form-<?php bp_activity_id() ?>" class="ac-form"<?php bp_activity_comment_form_nojs_display() ?>> |
---|
55 | <div class="ac-reply-avatar"><?php bp_loggedin_user_avatar( 'width=25&height=25' ) ?></div> |
---|
56 | <div class="ac-reply-content"> |
---|
57 | <div class="ac-textarea"> |
---|
58 | <textarea id="ac-input-<?php bp_activity_id() ?>" class="ac-input" name="ac_input_<?php bp_activity_id() ?>"></textarea> |
---|
59 | </div> |
---|
60 | <input type="submit" name="ac_form_submit" value="<?php _e( 'Post', 'buddypress' ) ?> →" /> <?php _e( 'or press esc to cancel.', 'buddypress' ) ?> |
---|
61 | <input type="hidden" name="comment_form_id" value="<?php bp_activity_id() ?>" /> |
---|
62 | </div> |
---|
63 | <?php wp_nonce_field( 'new_activity_comment', '_wpnonce_new_activity_comment' ) ?> |
---|
64 | </form> |
---|
65 | <?php endif; ?> |
---|
66 | </div> |
---|
67 | <?php endif; ?> |
---|
68 | |
---|
69 | |
---|
70 | </li> |
---|
71 | |
---|
72 | <?php endwhile; ?> |
---|
73 | |
---|
74 | </ul> |
---|
75 | |
---|
76 | <?php else : ?> |
---|
77 | <div id="message" class="info"> |
---|
78 | <p><?php _e( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ) ?></p> |
---|
79 | </div> |
---|
80 | <?php endif; ?> |
---|
81 | |
---|
82 | </div><!-- .home_activity --> |
---|