PluginProbe
wpForo Forum / 1.4.13
wpForo Forum v1.4.13
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 / wpf-themes / classic / layouts / 3 / post.php

post.php in wpForo Forum 1.4.13, at wpf-themes/classic/layouts/3/post.php

162 lines 10.4 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-3">
7 <div class="wpforo-post-head">
8 <div class="wpf-left">&nbsp;
9 <a href="<?php echo esc_url( 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 $buttons = array( 'tools' ); WPF()->tpl->buttons( $buttons, $forum ); ?>&nbsp;
15 <?php if( wpforo_feature('rss-feed') ): ?><a href="<?php WPF()->feed->rss2_url(); ?>" class="wpfcl-2" title="<?php wpforo_phrase('Topic RSS Feed') ?>"><span class="wpfcl-3"><?php wpforo_phrase('RSS') ?></span> <i class="fas fa-rss wpfsx wpfcl-3"></i></a><?php endif; ?>
16 </div>
17 <br class="wpf-clear" />
18 </div>
19 <?php wpforo_moderation_tools(); ?>
20
21 <?php foreach($posts as $key => $post ) : $is_topic = ( $key ? FALSE : TRUE ); ?>
22
23 <?php if($post['parentid'] == 0): ?>
24 <?php $member = wpforo_member($post); $post_url = wpforo_post($post['postid'],'url'); ?>
25 <div id="post-<?php echo intval($post['postid']) ?>" class="post-wrap wpfn-<?php echo ($key+1); ?><?php if( !$post['is_first_post'] ) echo ' wpf-answer-wrap'; else echo ' wpfp-first'; ?>">
26 <?php wpforo_share_toggle($post_url, $post['body']); ?>
27 <div class="wpforo-post wpfcl-1">
28 <div class="wpf-left">
29 <div class="wpforo-post-voting">
30 <div class="wpf-positive">
31 <?php
32 $buttons = array('positivevote');
33 WPF()->tpl->buttons( $buttons, $forum, $topic, $post, $is_topic );
34 ?>
35 </div>
36 <div class="wpf-vote-number">
37 <?php WPF()->tpl->vote_count($post) ?>
38 </div>
39 <div class="wpf-negative">
40 <?php
41 $buttons = array('negativevote');
42 WPF()->tpl->buttons( $buttons, $forum, $topic, $post, $is_topic );
43 ?>
44 </div>
45
46 <?php
47 if( !$post['is_first_post'] ){
48 $buttons = array( 'isanswer' );
49 WPF()->tpl->buttons( $buttons, $forum, $topic, $post, $is_topic );
50 }
51 ?>
52 </div>
53 </div><!-- left -->
54 <div class="wpf-right">
55 <div class="wpforo-post-content-top">
56 <?php if($post['status']): ?><span class="wpf-mod-message"><i class="fas fa-exclamation-circle" aria-hidden="true"></i> <?php wpforo_phrase('Awaiting moderation') ?></span><?php endif; ?>
57 <?php wpforo_share_toggle($post_url, $post['body'], 'top'); ?>
58 <div class="wpforo-post-link wpf-post-link"><?php $buttons = array( 'link' ); WPF()->tpl->buttons( $buttons, $forum, $topic, $post, $is_topic ); ?></div>
59 <div class="wpforo-post-date"><?php wpforo_date($post['created']); ?></div>
60 <div class="wpf-clear-right"></div>
61 </div>
62 <div class="wpforo-post-content">
63 <?php wpforo_content($post); ?>
64 <?php wpforo_post_edited($post); ?>
65 <?php do_action( 'wpforo_tpl_post_loop_after_content', $post, $member ) ?>
66 <?php if( wpforo_feature('signature') ): ?>
67 <?php if( trim($member['signature'])): ?><div class="wpforo-post-signature"><?php wpforo_signature( $member ) ?></div><?php endif ?>
68 <?php endif; ?>
69 </div>
70 <div class="wpforo-post-author">
71 <div class="wpforo-post-lb-box">
72 <?php
73 if( $post['is_first_post'] ){
74 $buttons = array( 'answer' );
75 echo '<div class="wpf-answer-button">';
76 WPF()->tpl->buttons( $buttons, $forum, $topic, $post, $is_topic );
77 echo '</div>';
78 }
79 $buttons = array( 'comment' );
80 echo '<div class="wpf-add-comment-button">';
81 WPF()->tpl->buttons( $buttons, $forum, $topic, $post, $is_topic );
82 echo '</div>';
83 ?>
84 </div>
85 <div class="wpforo-post-author-data">
86 <div class="wpforo-box-l3a-wrap wpforo-post-author-data-content">
87 <div class="wpforo-box-l3a-top"></div>
88 <div class="wpforo-box-l3a-lr">
89 <?php if( WPF()->perm->usergroup_can('va') && wpforo_feature('avatars') ): $rsz =''; ?>
90 <div class="wpforo-box-l3a-left"><?php echo WPF()->member->avatar($member, 'alt="'.esc_attr($member['display_name']).'"', 96) ?></div>
91 <?php else: $rsz = 'style="margin-left:10px;"'; endif; ?>
92 <div class="wpforo-box-l3a-right" <?php echo $rsz; //This is a HTML content// ?>>
93 <span class="author-name"><?php wpforo_member_link($member); ?></span>&nbsp;<span><?php WPF()->member->show_online_indicator($member['userid']) ?></span><br />
94 <?php wpforo_member_nicename($member, '@'); ?>
95 <span class="author-title">
96 <?php wpforo_member_title($member) ?>
97 </span><br />
98 <?php wpforo_member_badge($member, ' | ') ?>
99 <span class="author-posts"><?php echo intval($member['posts']) ?> <?php wpforo_phrase('Posts') ?></span><br />
100 <span class="author-stat-item"><i class="fas fa-question-circle wpfcl-6" title="<?php wpforo_phrase('Questions') ?>"></i><?php echo intval($member['questions']) ?></span>
101 <span class="author-stat-item"><i class="fas fa-check-square wpfcl-5" title="<?php wpforo_phrase('Answers') ?>"></i><?php echo intval($member['answers']) ?></span>
102 <span class="author-stat-item"><i class="fas fa-comment wpfcl-0" title="<?php wpforo_phrase('Comments') ?>"></i><?php echo intval($member['comments']) ?></span>
103 </div>
104 <div class="wpf-clear"></div>
105 </div>
106 </div>
107 </div>
108 </div><!-- wpforo-post-author -->
109 <div class="wpforo-post-tool-bar">
110 <?php if( $post['is_first_post'] ){
111 $buttons = array( 'report', 'sticky', 'private', 'close', 'approved', 'edit', 'delete' );
112 WPF()->tpl->buttons( $buttons, $forum, $topic, $post, $is_topic );
113 }else{
114 $buttons = array( 'report', 'edit', 'approved', 'delete' );
115 WPF()->tpl->buttons( $buttons, $forum, $topic, $post );
116 } ?>
117 </div>
118 </div><!-- right -->
119 <div class="wpf-clear"></div>
120 </div><!-- wpforo-post -->
121 </div><!-- post-wrap -->
122
123 <?php
124 $comments = WPF()->post->get_posts( array( 'parentid' => $post['postid'] ) );
125 if(is_array($comments) && !empty($comments)):
126 foreach($comments as $comment) : ?>
127 <?php $comment_member = wpforo_member($comment); ?>
128 <div id="post-<?php echo intval($comment['postid']) ?>" class="comment-wrap">
129 <div class="wpforo-comment wpfcl-1">
130 <div class="wpf-left">
131 <div class="wpf-comment-icon wpfcl-0"><i class="fas fa-reply fa-rotate-180"></i></div>
132 </div>
133 <div class="wpf-right">
134 <div class="wpforo-comment-content">
135 <?php wpforo_content($comment); ?>
136 <div class="wpforo-comment-footer">
137 <span class="wpfcl-0" style="white-space:nowrap"><?php wpforo_member_link($comment_member, 'by'); ?>
138 <?php wpforo_date($comment['created']); ?></span>
139 <?php do_action( 'wpforo_tpl_post_loop_after_content', $comment, $comment_member ) ?>
140 <?php wpforo_post_edited($comment); ?>
141 </div>
142 <div class="wpforo-comment-action-links">&nbsp;
143 <?php
144 $buttons = array( 'report', 'approved', 'edit', 'delete', 'link' );
145 WPF()->tpl->buttons( $buttons, $forum, $comment, $comment );
146 ?>
147 </div>
148 </div>
149 </div><!-- right -->
150 <div class="wpf-clear"></div>
151 </div><!-- wpforo-post -->
152 </div><!-- comment-wrap -->
153 <?php endforeach; ?>
154 <?php else: ?>
155 <div class="wpfsep">&nbsp;</div>
156 <?php endif; ?>
157 <?php endif; ?>
158
159 <?php do_action( 'wpforo_loop_hook', $key ) ?>
160
161 <?php endforeach; ?>
162 </div><!-- wpfl-3 -->