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 / 4 / post.php

post.php in wpForo Forum 3.1.6, at themes/classic/layouts/4/post.php

149 lines 9.0 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-4">
7 <div class="wpforo-post-head">
8 <div class="wpf-left">&nbsp;
9 <a href="<?php echo esc_url( (string) wpforo_post( $topic['last_post'], 'url' ) ); ?>" class="wpfcl-2"><i class="far fa-caret-square-down wpfsx wpfcl-3"></i> &nbsp; <span class="wpfcl-3"><?php wpforo_phrase( 'Last Post' ); ?></span></a>
10 <?php do_action( 'wpforo_topic_head_left', $forum, $topic ) ?>
11 </div>
12 <div class="wpf-right">
13 <?php do_action( 'wpforo_topic_head_right', $forum, $topic ) ?>
14 <?php wpforo_post_buttons( 'icon-text', [ 'tools' ], $forum ); ?>
15 <?php wpforo_feed_link(); ?>
16 </div>
17 <br class="wpf-clear"/>
18 </div>
19
20 <?php wpforo_moderation_tools(); ?>
21 <?php wpforo_check_threads( $posts ); ?>
22
23 <?php foreach( $posts as $key => $post ) : ?>
24 <?php $post = wpforo_post( $post['postid'] );
25 $member = wpforo_member( $post );
26 $wpf_is_anon = function_exists('wpforo_is_anonymous_mask_member') ? wpforo_is_anonymous_mask_member($member) : false;
27 $replies = WPF()->post->get_thread_tree( $post );
28 $reply_count = ( wpfval( $replies, 'count' ) ) ? $replies['count'] : 0; ?>
29 <div id="post-<?php echo wpforo_bigintval( $post['postid'] ) ?>" data-postid="<?php echo wpforo_bigintval( $post['postid'] ) ?>" data-userid="<?php echo wpforo_bigintval( $member['userid'] ) ?>" data-mention="<?php echo esc_attr( ( wpforo_setting( 'profiles', 'mention_nicknames' ) ? $member['user_nicename'] : '' ) ) ?>" data-isowner="<?php echo esc_attr( (int) (bool) wpforo_is_owner( $member['userid'] ) ) ?>"
30 class="post-wrap reply-wrap wpfn-<?php echo( $key + 1 ); ?><?php if( $post['is_first_post'] ) echo ' wpfp-first' ?>">
31 <?php wpforo_share_toggle( $post['url'], $post['body'] ); ?>
32 <div class="wpforo-post wpf-parent-post wpfcl-1">
33 <div class="wpf-left">
34 <?php if( WPF()->usergroup->can( 'va' ) && wpforo_setting( 'profiles', 'avatars' ) ): ?>
35 <div class="wpf-author-avatar"><?php echo wpforo_user_avatar( $member, 80 ) ?></div>
36 <?php endif ?>
37 <div class="wpf-author-data">
38 <?php if( (int) wpfval( $member, 'userid' ) ) : ?>
39 <?php wpforo_member_badge( $member ) ?>
40 <?php endif; ?>
41 <?php if( empty($wpf_is_anon) ): ?><div class="wpf-author-posts"><?php wpforo_phrase( 'Posts' ) ?>: <?php echo intval( $member['posts'] ) ?></div><?php endif; ?>
42 </div>
43 <div id="wpforo-memberinfo-<?php echo intval( $post['postid'] ) ?>" class="wpforo-memberinfo">
44 <?php if( (int) wpfval( $member, 'userid' ) ) : ?>
45 <div class="wpf-member-profile-buttons">
46 <?php WPF()->tpl->member_buttons( $member ) ?>
47 <?php WPF()->tpl->member_social_buttons( $member ) ?>
48 </div>
49 <?php endif; ?>
50 </div>
51 </div>
52 <div class="wpf-right">
53 <div class="wpf-content-head">
54 <div class="wpf-content-head-top">
55 <div class="wpf-author">
56 <div class="wpf-author-name"><span><?php WPF()->member->show_online_indicator( $member['userid'] ) ?></span>&nbsp;<?php wpforo_member_link( $member ); ?></div>
57 <?php if( (int) wpfval( $member, 'userid' ) ) : ?>
58 <div class="wpf-author-title"><?php wpforo_member_title( $member, true, '', '', [ 'custom-title', 'rating-title' ] ); ?></div>
59 <?php endif; ?>
60 <?php wpforo_topic_starter( $topic, $post ) ?>
61 <?php do_action( 'wpforo_post_content_top_left', $post ) ?>
62 </div>
63 <div class="wpf-post-date"><?php wpforo_date( $post['created'], 'M d, Y g:i a' ); ?></div>
64 </div>
65 <div class="wpf-content-head-bottom">
66 <div class="wpf-author">
67 <?php if( empty($wpf_is_anon) ) { wpforo_member_nicename( $member, '@' ); } ?>
68 <?php if( (int) wpfval( $member, 'userid' ) ) : ?>
69 <div class="wpf-author-title"><?php wpforo_member_title( $member, true, '', '', [ 'usergroup' ] ) ?></div>
70 <?php endif; ?>
71 <?php if( empty($wpf_is_anon) ): ?><div class="wpf-author-joined"><i class="fas fa-calendar-alt"></i> <?php wpforo_phrase( 'Joined' ) ?>: <?php wpforo_date( $member['user_registered'] ); ?></div><?php endif; ?>
72 </div>
73 <div class="wpf-post-btns">
74 <?php wpforo_post_buttons( 'icon', [ 'report', 'link' ], $forum, $topic, $post ); ?>
75 <?php wpforo_share_toggle( $post['url'], $post['body'], 'top' ); ?>
76 </div>
77 </div>
78 </div>
79 <div class="wpf-content">
80 <?php if( $post['status'] ): ?>
81 <div class="wpf-mod">
82 <span class="wpf-mod-message"><i class="fas fa-exclamation-circle" aria-hidden="true"></i> <?php wpforo_phrase( 'Awaiting moderation' ) ?></span>
83 </div>
84 <?php endif; ?>
85 <div class="wpforo-post-content">
86 <?php wpforo_content( $post ); ?>
87 </div>
88 <div class="wpforo-post-meta">
89 <?php do_action( 'wpforo_tpl_post_loop_after_content', $post, $member ) ?>
90 <?php wpforo_post_edited( $post ); ?>
91 <?php if( wpforo_setting( 'profiles', 'signature' ) ): ?>
92 <?php if( $member['signature'] ): ?>
93 <div class="wpforo-post-signature"><?php wpforo_signature( $member ) ?></div><?php endif; ?>
94 <?php endif; ?>
95 </div>
96 </div>
97 <div class="wpf-content-foot">
98 <?php do_action( 'wpforo_post_footer_start', $post, $topic, $forum, 4 ); ?>
99 <div class="wpf-reply">
100 <?php wpforo_post_buttons( 'icon-text', 'reply', $forum, $topic, $post ); ?>
101 </div>
102 <div class="wpf-buttons">
103 <?php if( $post['is_first_post'] ) {
104 wpforo_post_buttons( 'icon', [ 'custom-bottom', 'quote', 'solved', 'sticky', 'close', 'approved', 'private', 'edit', 'delete' ], $forum, $topic, $post );
105 } else {
106 wpforo_post_buttons( 'icon', [ 'custom-bottom', 'quote', 'approved', 'edit', 'delete' ], $forum, $topic, $post );
107 } ?>
108 </div>
109 </div>
110 <div class="wpforo-post-footer">
111 <?php do_action( 'wpforo_post_footer_bottom_start', $post, $topic, $forum, 4 ); ?>
112 </div>
113 <div class="wpforo-portable-form-wrap"></div>
114 </div>
115 </div><!-- wpforo-post -->
116 <?php if( $post['is_first_post'] ): ?>
117 <div class="wpforo-topic-meta">
118 <?php wpforo_tags( $topic, true, 'small' ); ?>
119 </div>
120 <?php if( $topic['posts'] > 1 ): ?>
121 <script type="text/javascript">jQuery(document).ready(function ($) { if ($('#wpf-ttgg-<?php echo intval( $post['postid'] ) ?>').length) { $('#wpf-replies-sep').hide() } })</script>
122 <div id="wpf-replies-sep" class="wpf-replies-sep">
123 <div class="wpf-replies-title"><?php $replies_count = '<span class="wpf-replies-count">' . ( $topic['posts'] - 1 ) . '</span>' ?>
124 <i class="far fa-comment"></i> <?php ( $topic['posts'] > 2 ) ? printf( wpforo_phrase( '%s Replies', false ), $replies_count ) : printf( wpforo_phrase( '%s Reply', false ), $replies_count ); ?>
125 </div>
126 </div>
127 <?php endif; ?>
128 <?php endif; ?>
129 <?php if( $reply_count && wpforo_setting( 'topics', 'layout_threaded_nesting_level' ) ): ?>
130 <div class="wpf-post-replies-bar" id="wpf-ttgg-<?php echo intval( $post['postid'] ); ?>">
131 <div class="wpf-post-replies-info">
132 <i class="far fa-comments"></i>
133 <span class="wpf-post-replies-count"><?php echo wpforo_print_number( $reply_count ); ?></span>
134 <span class="wpf-post-replies-title"><?php ( $reply_count == 1 ) ? wpforo_phrase( 'Reply' ) : wpforo_phrase( 'Replies' ); ?></span>
135 </div>
136 <div class="wpf-prsep"></div>
137 <div wpf-tooltip="<?php wpforo_phrase( 'Hide replies' ) ?>" class="wpforo-ttgg"><i class="fas fa-angle-up"></i></div>
138 </div>
139 <?php endif; ?>
140 </div><!-- post-wrap -->
141
142 <?php WPF()->post->replies( $replies, $topic, $forum ); ?>
143
144 <?php do_action( 'wpforo_loop_hook', $key ) ?>
145
146 <?php endforeach; ?>
147
148 </div><!-- wpfl-1 -->
149