PluginProbe
wpForo Forum / 3.2.0
wpForo Forum v3.2.0
3.2.0 3.1.7 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 All 140 releases
wpforo / themes / 2022 / layouts / 4 / post.php

post.php in wpForo Forum 3.2.0, at themes/2022/layouts/4/post.php

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