PluginProbe
wpForo Forum / 1.0.0
wpForo Forum v1.0.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 1.4.12 All 139 releases
wpforo / wpf-themes / classic / layouts / 3 / post.php

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

152 lines 10.1 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_data['forumid'], $topic['topicid'], $post['postid'], $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_data['forumid'], $topic['topicid'], $post['postid'], $is_topic );
35 ?>
36 </div>
37
38 <?php
39 if( !$post['is_first_post'] ){
40 $buttons = array( 'isanswer' );
41 $wpforo->tpl->buttons( $buttons, $forum_data['forumid'], $topic['topicid'], $post['postid'], $is_topic );
42 }
43 ?>
44 </div>
45 </div><!-- left -->
46 <div class="wpf-right">
47 <div class="wpforo-post-content-top">
48 <div class="wpforo-post-link"><?php $buttons = array( 'link' ); $wpforo->tpl->buttons( $buttons, $forum_data['forumid'], $topic['topicid'], $post['postid'], $is_topic ); ?></div>
49 <div class="wpforo-post-date"><?php wpforo_date($post['created']); ?></div>
50 <div class="wpf-clear-right"></div>
51 </div>
52 <div class="wpforo-post-content">
53 <?php echo wpforo_kses($post['body'], 'post') ?>
54 <?php wpforo_post_edited($post); ?>
55 <?php if( wpforo_feature('signature', $wpforo) ): ?>
56 <?php if( trim($member['signature'])): ?><div class="wpforo-post-signature"><?php echo wpautop(wpforo_kses(stripslashes($member['signature']), 'user_description')) ?></div><?php endif ?>
57 <?php endif; ?>
58 </div>
59 <div class="wpforo-post-author">
60 <div class="wpforo-post-lb-box">
61 <?php
62 if( $post['is_first_post'] ){
63 $buttons = array( 'answer' );
64 echo '<div class="wpf-answer-button">';
65 $wpforo->tpl->buttons( $buttons, $forum_data['forumid'], $topic['topicid'], $post['postid'], $is_topic );
66 echo '</div>';
67 }
68 $buttons = array( 'comment' );
69 echo '<div class="wpf-add-comment-button">';
70 $wpforo->tpl->buttons( $buttons, $forum_data['forumid'], $topic['topicid'], $post['postid'], $is_topic );
71 echo '</div>';
72 ?>
73 </div>
74 <div class="wpforo-post-author-data">
75 <div class="wpforo-box-l3a-wrap wpforo-post-author-data-content">
76 <div class="wpforo-box-l3a-top"></div>
77 <div class="wpforo-box-l3a-lr">
78 <?php if( wpforo_feature('avatars', $wpforo) ): $rsz =''; ?>
79 <div class="wpforo-box-l3a-left"><?php echo $wpforo->member->avatar($member, 'alt="'.esc_attr($member['display_name']).'"', 96, true) ?></div>
80 <?php else: $rsz = 'style="margin-left:10px;"'; endif; ?>
81 <div class="wpforo-box-l3a-right" <?php echo $rsz; //This is a HTML content// ?>>
82 <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 />
83 <span class="author-title">
84 <?php wpforo_member_title($member) ?>
85 </span><br />
86 <?php wpforo_member_badge($member, ' | ') ?>
87 <span class="author-posts">
88 <?php echo intval($member['posts']) ?> <?php wpforo_phrase('Posts') ?></span><br />
89 <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>
90 <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>
91 <span class="author-stat-item"><i class="fa fa-comment wpfcl-0" title="<?php wpforo_phrase('Comments') ?>"></i><?php echo intval($member['comments']) ?></span>
92 </span>
93 </div>
94 <div class="wpf-clear"></div>
95 </div>
96 </div>
97 </div>
98 </div><!-- wpforo-post-author -->
99 <div class="wpforo-post-tool-bar">
100 <?php if( $post['is_first_post'] ){
101 $buttons = array( 'report', 'sticky', 'close', 'move', 'edit', 'delete' );
102 $wpforo->tpl->buttons( $buttons, $forum_data['forumid'], $topic['topicid'], $post['postid'], $is_topic );
103 }else{
104 $buttons = array( 'report', 'edit', 'delete' );
105 $wpforo->tpl->buttons( $buttons, $forum_data['forumid'], $topic['topicid'], $post['postid'] );
106 } ?>
107 </div>
108 </div><!-- right -->
109 <div class="wpf-clear"></div>
110 </div><!-- wpforo-post -->
111 </div><!-- post-wrap -->
112
113 <?php
114 $comments = $wpforo->post->get_posts( array( 'parentid' => $post['postid'] ) );
115 if(is_array($comments) && !empty($comments)):
116 foreach($comments as $comment) : ?>
117 <?php $comment_member = $wpforo->member->get_member($comment['userid'], true); ?>
118 <div id="post-<?php echo intval($comment['postid']) ?>" class="comment-wrap">
119 <div class="wpforo-comment wpfcl-1">
120 <div class="wpf-left">
121 <div class="wpf-comment-icon wpfcl-0"><i class="fa fa-reply fa-rotate-180"></i></div>
122 </div>
123 <div class="wpf-right">
124 <div class="wpforo-comment-content">
125 <?php echo wpforo_kses($comment['body'], 'post') ?>
126 <div class="wpforo-comment-footer">
127 <span class="wpfcl-0" style="white-space:nowrap"><?php wpforo_phrase('by') ?> <a href="<?php echo esc_url($comment_member['profile_url']) ?>">
128 <?php echo esc_html($comment_member['display_name']) ?></a>
129 <?php wpforo_date($comment['created']); ?></span>
130 <?php wpforo_post_edited($comment); ?>
131 </div>
132 <div class="wpforo-comment-action-links">&nbsp;
133 <?php
134 $buttons = array( 'report', 'edit', 'delete', 'link' );
135 $wpforo->tpl->buttons( $buttons, $forum_data['forumid'], $comment['topicid'], $comment['postid'] );
136 ?>
137 </div>
138 </div>
139 </div><!-- right -->
140 <div class="wpf-clear"></div>
141 </div><!-- wpforo-post -->
142 </div><!-- comment-wrap -->
143 <?php endforeach; ?>
144 <?php else: ?>
145 <div class="wpfsep">&nbsp;</div>
146 <?php endif; ?>
147 <?php endif; ?>
148
149 <?php do_action( 'wpforo_loop_hook', $key ) ?>
150
151 <?php endforeach; ?>
152 </div><!-- wpfl-3 -->