PluginProbe
wpForo Forum / 1.2.0
wpForo Forum v1.2.0
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.2.0, at wpf-themes/classic/layouts/3/post.php

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