2020-12-02 18:34:47 +09:00
|
|
|
<?php
|
|
|
|
// Exit if accessed directly
|
|
|
|
if( !defined( 'ABSPATH' ) ) exit;
|
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="wpfl-2">
|
|
|
|
|
|
|
|
<div class="wpforo-post-head">
|
|
|
|
<div class="wpf-left">
|
|
|
|
<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> <span class="wpfcl-3"><?php wpforo_phrase('Last Post'); ?></span></a>
|
|
|
|
<?php do_action( 'wpforo_topic_head_left', $forum, $topic ) ?>
|
|
|
|
</div>
|
|
|
|
<div class="wpf-right">
|
|
|
|
<?php do_action( 'wpforo_topic_head_right', $forum, $topic ) ?>
|
|
|
|
<?php wpforo_post_buttons( 'icon-text', 'tools', $forum ); ?>
|
|
|
|
<?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; ?>
|
|
|
|
</div>
|
|
|
|
<div class="wpf-clear"></div>
|
|
|
|
</div>
|
|
|
|
<?php wpforo_moderation_tools(); ?>
|
|
|
|
|
|
|
|
<?php foreach($posts as $key => $post) : ?>
|
|
|
|
|
|
|
|
<?php $member = wpforo_member($post); $post_url = wpforo_post($post['postid'],'url'); ?>
|
|
|
|
<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( $member['user_nicename'] ) ?>" data-isowner="<?php echo esc_attr( (int) (bool) wpforo_is_owner($member['userid']) ) ?>" class="post-wrap wpfn-<?php echo ($key+1); ?><?php if( $post['is_first_post'] ) echo ' wpfp-first' ?>">
|
|
|
|
<?php wpforo_share_toggle($post_url, $post['body']); ?>
|
|
|
|
<div class="wpforo-post wpfcl-1">
|
|
|
|
<div class="wpf-left">
|
|
|
|
</div><!-- left -->
|
|
|
|
<div class="wpf-right">
|
|
|
|
<div class="wpforo-post-content-top">
|
|
|
|
<div class="wpf-post-actions">
|
|
|
|
<?php if( $post['is_first_post'] ){
|
|
|
|
$buttons = array( 'solved', 'sticky', 'private', 'close', 'report', 'delete', 'link' );
|
|
|
|
}else{
|
|
|
|
$buttons = array( 'report', 'delete', 'link' );
|
2020-12-17 18:57:18 +09:00
|
|
|
}
|
2020-12-21 18:39:23 +09:00
|
|
|
wpforo_post_buttons( 'icon-text', $buttons, $forum, $topic, $post );
|
2020-12-17 18:57:18 +09:00
|
|
|
if (!is_user_logged_in()) {
|
|
|
|
$forumid = (isset($forum['forumid'])) ? $forum['forumid'] : 0;
|
|
|
|
$topicid = (isset($topic['topicid'])) ? $topic['topicid'] : 0;
|
|
|
|
$is_topic = (bool) wpfval($post, 'is_first_post');
|
|
|
|
$diff = current_time( 'timestamp', 1 ) - strtotime($post['created']);
|
|
|
|
if (WPF()->perm->forum_can(($is_topic ? 'dt' : 'dr' ), $forumid)
|
|
|
|
&& (WPF()->perm->forum_can( ($is_topic ? 'dot' : 'dor'), $forumid)
|
|
|
|
|| $diff < WPF()->post->options[($is_topic ? 'dot' : 'dor').'_durr'])) {
|
|
|
|
$a = ( $is_topic ) ? 'wpftopicdelete' : 'wpfreplydelete';
|
|
|
|
$b = ( $is_topic ) ? $topicid : $postid;
|
|
|
|
echo '<span wpf-tooltip="'.esc_attr(wpforo_phrase('Delete', false)).'" id="'.esc_attr($a.$b).'" class="wpf-action wpforo-delete"><i class="fas fa-trash-alt wpfsx"></i><span class="wpf-button-text">'.wpforo_phrase('Delete', false).'</span></span>';
|
|
|
|
}
|
2020-12-02 18:34:47 +09:00
|
|
|
}
|
|
|
|
?>
|
|
|
|
</div>
|
|
|
|
<?php wpforo_share_toggle($post_url, $post['body'], 'top'); ?>
|
|
|
|
</div>
|
|
|
|
<div class="wpforo-post-content">
|
|
|
|
<?php wpforo_content($post); ?>
|
|
|
|
<?php wpforo_post_edited($post); ?>
|
|
|
|
<?php do_action( 'wpforo_tpl_post_loop_after_content', $post, $member ) ?>
|
|
|
|
<?php if( wpforo_feature('signature') ): ?>
|
|
|
|
<?php if($member['signature']): ?><div class="wpforo-post-signature"><?php wpforo_signature( $member ) ?></div><?php endif; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
<div class="wpf-post-button-actions">
|
|
|
|
<?php
|
|
|
|
$buttons = array( 'reply', 'quote', 'approved', 'edit', 'like' );
|
|
|
|
wpforo_post_buttons( 'icon-text', $buttons, $forum, $topic, $post );
|
2020-12-21 18:39:23 +09:00
|
|
|
if (!is_user_logged_in() && isset($post['email']) && !wpforo_is_owner($post['userid'], $post['email'])) {
|
|
|
|
$forumid = (isset($forum['forumid'])) ? $forum['forumid'] : 0;
|
|
|
|
$topicid = (isset($topic['topicid'])) ? $topic['topicid'] : 0;
|
|
|
|
$is_topic = (bool) wpfval($post, 'is_first_post');
|
|
|
|
$diff = current_time( 'timestamp', 1 ) - strtotime($post['created']);
|
|
|
|
if (WPF()->perm->forum_can(($is_topic ? 'eot' : 'eor' ), $forumid)
|
|
|
|
&& $diff < WPF()->post->options[($is_topic ? 'eot' : 'eor').'_durr']) {
|
|
|
|
$a = ( $is_topic ) ? 'wpfedittopicpid' : '';
|
|
|
|
$b = ( $is_topic ) ? $topicid : $postid;
|
|
|
|
echo '<span wpf-tooltip="'.esc_attr(wpforo_phrase('Edit', false)).'" id="'.esc_attr($a.$b).'" class="wpforo-edit wpf-action"><i class="fas fa-edit wpfsx"></i><span class="wpf-button-text">'.wpforo_phrase('Edit', false).'</span></span>';
|
|
|
|
}
|
|
|
|
}
|
2020-12-02 18:34:47 +09:00
|
|
|
?>
|
|
|
|
<?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; ?>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="wpforo-post-content-bottom">
|
2020-12-03 14:52:03 +09:00
|
|
|
<div class="cbright wpfcl-0">
|
|
|
|
<?php wpforo_phrase('Posted') ?>: <?php wpforo_member_link($member, ''); ?> - <?php wpforo_date($post['created'], 'd/m/Y g:i a') ?>
|
|
|
|
<?php wpforo_post_likers($post['postid']); ?>
|
|
|
|
</div>
|
2020-12-02 18:34:47 +09:00
|
|
|
<div class="wpf-clear"></div>
|
|
|
|
</div>
|
|
|
|
</div><!-- right -->
|
|
|
|
<div class="wpf-clear"></div>
|
|
|
|
</div><!-- wpforo-post -->
|
|
|
|
</div><!-- post-wrap -->
|
|
|
|
|
|
|
|
<?php if( $post['is_first_post'] ): ?>
|
|
|
|
<div class="wpforo-topic-meta">
|
|
|
|
<?php wpforo_tags( $topic ); ?>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<?php do_action( 'wpforo_loop_hook', $key ) ?>
|
|
|
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</div><!-- wpfl-2 -->
|