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 / 2022 / recent-topics.php

recent-topics.php in wpForo Forum 3.1.6, at themes/2022/recent-topics.php

70 lines 4.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <div class="wpforo-recent-content wpfr-topics">
2 <?php if( ! empty( WPF()->current_object['topics'] ) ): ?>
3 <table style="width: 100%; border: 0; border-spacing: 0; border-collapse: collapse;">
4 <tr class="wpf-htr">
5 <td class="wpf-shead-title" colspan="3"><?php wpforo_phrase( 'Topics with their latest replies in reversed order' ) ?></td>
6 </tr>
7 <?php foreach( WPF()->current_object['topics'] as $key => $topic ) : ?>
8 <tr class="wpf-ttr <?php wpforo_unread( $topic['topicid'], 'topic' ); ?>">
9 <td class="wpf-spost-avatar">
10 <?php if( WPF()->usergroup->can( 'va' ) && wpforo_setting( 'profiles', 'avatars' ) ): ?>
11 <?php echo wpforo_user_avatar( $topic['member'], 30 ) ?>
12 <?php endif; ?>
13 </td>
14 <td class="wpf-spost-title" colspan="2">
15 <?php wpforo_topic_title( $topic, $topic['topic_url'], '{i}{p}{au}{t}{/a}{n}{v}', true, 'wpf-spost-title-link' ) ?>
16 <p style="font-size: 12px"><?php wpforo_member_link( $topic['member'], 'by' ); ?> <?php if( wpfkey( $topic, 'created' ) ) wpforo_date( $topic['created'] ); ?>
17 &nbsp;|&nbsp;
18 <span style="text-transform: lowercase;"><?php wpforo_phrase( 'Last post' ) ?>:</span> <?php if( wpfkey( $topic['last_post'], 'created' ) ) {
19 wpforo_date( $topic['last_post']['created'] );
20 } ?>
21 </p>
22 <div class="wpf-spost-forum">
23 <span class="wpf-spost-forum-label"><?php wpforo_phrase( 'Forum' ) ?></span>
24 <?php $forum_icon = ( isset( $topic['forum']['icon'] ) && $topic['forum']['icon'] ) ? $topic['forum']['icon'] : 'fas fa-comments'; ?>
25 <i class="<?php echo esc_attr( $forum_icon ) ?>" style="color: <?php echo esc_attr( $topic['forum']['color'] ) ?>"></i>
26 <a href="<?php echo $topic['forum']['url'] ?>"><?php echo esc_html( $topic['forum']['title'] ); ?></a>
27 </div>
28 </td>
29 </tr>
30 <?php if( ! empty( $topic['replies'] ) && is_array( $topic['replies'] ) ) : ?>
31 <tr class="wpf-ptr">
32 <td class="wpf-spost-icon">&nbsp;</td>
33 <td colspan="2" class="wpf-stext">
34 <ul>
35 <?php foreach( $topic['replies'] as $post ) : $poster = wpforo_member( $post ); ?>
36 <li>
37 <i class="fas fa-reply fa-rotate-180 wpfsx wpfcl-0"></i> &nbsp;
38 <a href="<?php echo esc_url( wpforo_post( $post['postid'], 'url' ) ); ?>"
39 title="<?php wpforo_phrase( 'REPLY:' ) ?> <?php echo esc_html( wpforo_text( $post['body'], 100, false ) ) ?>"><?php echo( ( $post_body = esc_html(
40 wpforo_text( $post['body'], wpforo_setting( 'topics', 'layout_extended_intro_posts_length' ), false )
41 ) ) ? $post_body : esc_html( $post['title'] ) ) ?></a>
42 <div class="wpf-spost-topic-recent-posts"><?php wpforo_date( $post['created'] ); ?>&nbsp; <?php wpforo_member_link( $poster, 'by %s', 5 ); ?> </div>
43 <br class="wpf-clear">
44 </li>
45 <?php endforeach ?>
46 <?php if( intval( $topic['posts'] ) > ( intval( wpfval( WPF()->current_object['args'], 'intro_posts' ) ) + 1 ) ): ?>
47 <li style="text-align:right;"><a href="<?php echo esc_url( (string) $topic['topic_url'] ) ?>"><?php wpforo_phrase( 'view all posts', true, 'lower' ); ?> <i
48 class="fas fa-angle-right" aria-hidden="true"></i></a></li>
49 <?php endif ?>
50 </ul>
51 </td>
52 </tr>
53 <?php else: ?>
54 <tr class="wpf-tr-sep">
55 <td colspan="3" style="height: 2px;"></td>
56 </tr>
57 <?php endif; ?>
58
59 <?php do_action( 'wpforo_recent_loop_hook_topics', $key, $topic ) ?>
60 <?php endforeach ?>
61 </table>
62 <?php else: ?>
63 <?php if( wpfval( WPF()->current_object['args'], 'view' ) === 'unread' ): ?>
64 <p class="wpf-p-error"><?php wpforo_phrase( 'No unread posts were found' ) ?> </p>
65 <?php else: ?>
66 <p class="wpf-p-error"><?php wpforo_phrase( 'No topics were found here' ) ?> </p>
67 <?php endif; ?>
68 <?php endif; ?>
69 </div>
70