| 1 |
<?php |
| 2 |
// Exit if accessed directly |
| 3 |
if( !defined( 'ABSPATH' ) ) exit; |
| 4 |
?> |
| 5 |
|
| 6 |
<div class="wpforo-activity-content"> |
| 7 |
<?php if(empty($activities)) : ?><p class="wpf-p-error"> <?php wpforo_phrase('No activity found for this member.') ?> </p><?php endif ?> |
| 8 |
<table width="100%" border="0" cellspacing="0" cellpadding="0"> |
| 9 |
<?php $bg = FALSE; foreach( $activities as $activity ) : ?> |
| 10 |
<tr<?php echo ( $bg ? ' class="wpfbg-9"' : '' ) ?>> |
| 11 |
<td class="activity-icon"><i class="far fa-file-alt fa-1x wpfcl-2"></i></td> |
| 12 |
<td class="activity-title"> |
| 13 |
<?php |
| 14 |
if( $activity['is_first_post'] ){ |
| 15 |
$href = esc_url(WPF()->topic->get_topic_url($activity['topicid'])); |
| 16 |
$link_text = wpforo_text( $activity['title'], 60, FALSE ); |
| 17 |
}else{ |
| 18 |
$href = esc_url(WPF()->post->get_post_url($activity['postid'])); |
| 19 |
if( !$link_text = wpforo_text( $activity['body'], 60, FALSE ) ){ |
| 20 |
$link_text = wpforo_text( $activity['title'], 60, FALSE ); |
| 21 |
} |
| 22 |
} |
| 23 |
if(!$href) $href = '#'; |
| 24 |
if(!$link_text) $link_text = wpforo_phrase('post link', false); |
| 25 |
|
| 26 |
printf('<a style="font-size: 17px;" href="%s">%s</a>', $href, $link_text); |
| 27 |
|
| 28 |
if( $activity['forumid'] ){ |
| 29 |
$href = wpforo_forum($activity['forumid'], 'url'); |
| 30 |
$link_text = wpforo_forum($activity['forumid'], 'title'); |
| 31 |
|
| 32 |
if(!$href) $href = '#'; |
| 33 |
if(!$link_text) $link_text = wpforo_phrase('forum link', false); |
| 34 |
|
| 35 |
printf('<p style="font-style: italic"><span>%s</span> <a href="%s">%s</a></p>', wpforo_phrase('in forum', false), $href, $link_text); |
| 36 |
} |
| 37 |
?> |
| 38 |
</td> |
| 39 |
<td class="activity-date"><?php wpforo_date($activity['created']); ?></td> |
| 40 |
</tr> |
| 41 |
<?php $bg = ( $bg ? FALSE : TRUE ); endforeach ?> |
| 42 |
</table> |
| 43 |
<div class="activity-foot"> |
| 44 |
<?php WPF()->tpl->pagenavi( $paged, $items_count ); ?> |
| 45 |
</div> |
| 46 |
</div> |