| 1 |
<?php |
| 2 |
// Exit if accessed directly |
| 3 |
if( ! defined( 'ABSPATH' ) ) exit; |
| 4 |
?> |
| 5 |
|
| 6 |
<div class="wpfl-3"> |
| 7 |
<div class="wpforo-topic-head"> |
| 8 |
<div class="head-title"><?php wpforo_phrase( 'Topic Title' ) ?></div> |
| 9 |
<div class="head-stat-lastpost"><?php wpforo_phrase( 'Last Post' ) ?></div> |
| 10 |
<br class="wpf-clear"> |
| 11 |
</div> |
| 12 |
|
| 13 |
<?php foreach( $topics as $key => $topic ) : ?> |
| 14 |
|
| 15 |
<?php |
| 16 |
$member = wpforo_member( $topic ); |
| 17 |
if( isset( $topic['last_post'] ) && $topic['last_post'] ) { |
| 18 |
$last_post = wpforo_post( $topic['last_post'] ); |
| 19 |
$last_poster = wpforo_member( $last_post ); |
| 20 |
} |
| 21 |
$topic_url = wpforo_topic( $topic['topicid'], 'url' ); |
| 22 |
?> |
| 23 |
<div class="topic-wrap <?php wpforo_unread( $topic['topicid'], 'topic' ) ?>"> |
| 24 |
<div class="wpforo-topic"> |
| 25 |
<?php if( WPF()->usergroup->can( 'va' ) && wpforo_setting( 'profiles', 'avatars' ) ): ?> |
| 26 |
<div class="wpforo-topic-avatar"><?php echo wpforo_user_avatar( $member ) ?></div> |
| 27 |
<?php endif; ?> |
| 28 |
<div class="wpforo-topic-info"> |
| 29 |
<p class="wpforo-topic-title"><?php wpforo_topic_title( $topic, $topic_url, '{i}{p}{au}{tc}{/a}{n}{v}' ) ?></p> |
| 30 |
<p class="wpforo-topic-start-info wpfcl-2"><?php wpforo_member_link( $member ); ?><span class="wpforo-date wpforo-date-ago">, <?php wpforo_date( $topic['created'] ); ?></span></p> |
| 31 |
<div class="wpforo-topic-badges"><?php do_action( 'wpforo_topic_info_end', $topic ); ?></div> |
| 32 |
</div> |
| 33 |
<div class="wpforo-topic-status wpfcl-2"> |
| 34 |
<div class="votes"> |
| 35 |
<div class="count <?php echo $topic['votes'] == 0 ? 'wpfcl-6' : 'wpfbg-4 wpfcl-3' ?>"><?php echo intval( $topic['votes'] ) ?></div> |
| 36 |
<div class="wpforo-label <?php echo $topic['votes'] == 0 ? 'wpfcl-6' : 'wpfbg-4 wpfcl-3' ?>"><?php wpforo_phrase( 'Votes' ) ?></div> |
| 37 |
</div> |
| 38 |
<div class="answers"> |
| 39 |
<div class="count <?php echo $topic['answers'] == 0 ? 'wpfcl-5' : 'wpfbg-5 wpfcl-3' ?>"><?php echo intval( $topic['answers'] ) ?></div> |
| 40 |
<div class="wpforo-label <?php echo $topic['answers'] == 0 ? 'wpfcl-5' : 'wpfbg-5 wpfcl-3' ?>"><?php wpforo_phrase( 'Answers' ) ?></div> |
| 41 |
</div> |
| 42 |
<div class="views"> |
| 43 |
<div class="count"><?php echo intval( $topic['views'] ) ?></div> |
| 44 |
<div class="wpforo-label"><?php wpforo_phrase( 'Views' ) ?></div> |
| 45 |
</div> |
| 46 |
</div> |
| 47 |
<?php if( isset( $topic['last_post'] ) && $topic['last_post'] ) : ?> |
| 48 |
<div class="wpforo-topic-stat-lastpost"><span style="white-space:nowrap"><?php wpforo_phrase( 'by' ) ?> <?php wpforo_member_link( $last_poster, '', 9 ); ?> <a href="<?php echo esc_url( (string) $last_post['url'] ) ?>" title="<?php wpforo_phrase( 'View the latest post' ) ?>"><i class="fas fa-chevron-right fa-sx wpfcl-a"></i></a></span><br> <?php wpforo_date( $last_post['created'] ); ?></div> |
| 49 |
<?php else: ?> |
| 50 |
<div class="wpforo-topic-stat-lastpost"><?php wpforo_phrase( 'Replies not found' ) ?></div> |
| 51 |
<?php endif; ?> |
| 52 |
</div><!-- wpforo-topic --> |
| 53 |
</div><!-- topic-wrap --> |
| 54 |
|
| 55 |
<?php do_action( 'wpforo_loop_hook', $key ) ?> |
| 56 |
|
| 57 |
<?php endforeach; ?> |
| 58 |
</div><!-- topic-wrap --> |
| 59 |
|