PluginProbe
wpForo Forum / 3.1.6
wpForo Forum v3.1.6
3.1.6 3.1.5 3.1.4 3.1.2 3.1.1 3.1.0 3.0.9 3.0.8 3.0.7 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 All 138 releases
wpforo / themes / classic / layouts / 2 / topic.php

topic.php in wpForo Forum 3.1.6, at themes/classic/layouts/2/topic.php

54 lines 2.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // Exit if accessed directly
3 if( ! defined( 'ABSPATH' ) ) exit;
4 ?>
5
6 <div class="wpfl-2">
7
8 <div class="wpforo-topic-head">
9 <div class="head-title"><?php wpforo_phrase( 'Topic Title' ) ?></div>
10 <div class="head-stat-lastpost"><?php wpforo_phrase( 'Last Post' ) ?></div>
11 <div class="head-stat-views"><?php wpforo_phrase( 'Views' ) ?></div>
12 <div class="head-stat-posts"><?php wpforo_phrase( 'Posts' ) ?></div>
13 <br class="wpf-clear">
14 </div>
15
16 <?php foreach( $topics as $key => $topic ) : ?>
17
18 <?php
19 $last_poster = [];
20 $last_post = [];
21 $member = wpforo_member( $topic );
22 if( isset( $topic['last_post'] ) && $topic['last_post'] != 0 ) {
23 $last_post = wpforo_post( $topic['last_post'] );
24 $last_poster = wpforo_member( $last_post );
25 }
26 $topic_url = wpforo_topic( $topic['topicid'], 'url' )
27 ?>
28
29 <div class="topic-wrap <?php wpforo_unread( $topic['topicid'], 'topic' ); ?>">
30 <div class="wpforo-topic">
31 <?php if( WPF()->usergroup->can( 'va' ) && wpforo_setting( 'profiles', 'avatars' ) ): ?>
32 <div class="wpforo-topic-avatar"><?php echo wpforo_user_avatar( $member, 48 ) ?></div>
33 <?php endif; ?>
34 <div class="wpforo-topic-info">
35 <p class="wpforo-topic-title"><?php wpforo_topic_title( $topic, $topic_url, '{i}{p}{au}{t}{/a}{n}{v}' ) ?></p>
36 <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>
37 <div class="wpforo-topic-badges"><?php do_action( 'wpforo_topic_info_end', $topic ); ?></div>
38 </div>
39 <?php if( wpfval( $last_post, 'url' ) ) : ?>
40 <div class="wpforo-topic-stat-lastpost"><span><?php wpforo_member_link( $last_poster, 'by' ); ?> <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( wpfval( $last_post, 'created' ) ); ?></div>
41 <?php else: ?>
42 <div class="wpforo-topic-stat-lastpost"><?php wpforo_phrase( 'Replies not found' ) ?></div>
43 <?php endif; ?>
44 <div class="wpforo-topic-stat-views"><?php echo intval( $topic['views'] ) ?></div>
45 <div class="wpforo-topic-stat-posts"><?php echo intval( $topic['posts'] ) ?></div>
46 <br class="wpf-clear">
47 </div><!-- wpforo-topic -->
48 </div><!-- topic-wrap -->
49
50 <?php do_action( 'wpforo_loop_hook', $key ) ?>
51
52 <?php endforeach; ?>
53 </div><!-- wpfl-2 -->
54