add wpforo customization for seminar event.
This commit is contained in:
95
wpforo/layouts/2/post.php
Normal file
95
wpforo/layouts/2/post.php
Normal file
@ -0,0 +1,95 @@
|
||||
<?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">
|
||||
<?php if( WPF()->perm->usergroup_can('va') && wpforo_feature('avatars') ): ?>
|
||||
<div class="author-avatar"><?php echo WPF()->member->avatar($member, 'alt="'.esc_attr($member['display_name']).'"', 110) ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="author-data">
|
||||
<div class="author-name"><span><?php WPF()->member->show_online_indicator($member['userid']) ?></span> <?php wpforo_member_link($member); ?></div>
|
||||
<?php wpforo_member_nicename($member, '@'); ?>
|
||||
<div class="wpf-member-profile-buttons">
|
||||
<?php WPF()->tpl->member_buttons($member) ?>
|
||||
</div>
|
||||
<div class="author-title">
|
||||
<?php wpforo_member_title($member) ?>
|
||||
</div>
|
||||
<?php wpforo_member_badge($member) ?>
|
||||
</div>
|
||||
<div class="wpf-clear"></div>
|
||||
</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' );
|
||||
}
|
||||
wpforo_post_buttons( 'icon-text', $buttons, $forum, $topic, $post );
|
||||
?>
|
||||
</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 );
|
||||
?>
|
||||
<?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">
|
||||
<div class="cbleft wpfcl-0"><?php wpforo_phrase('Posted') ?> : <?php wpforo_date($post['created'], 'd/m/Y g:i a') ?>
|
||||
<?php wpforo_post_likers($post['postid']); ?>
|
||||
</div>
|
||||
<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 -->
|
65
wpforo/layouts/2/topic.php
Normal file
65
wpforo/layouts/2/topic.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
// Exit if accessed directly
|
||||
if( !defined( 'ABSPATH' ) ) exit;
|
||||
|
||||
// NIU:
|
||||
$topic_fields = cbsonline_wpforo_get_topic_fields_list();
|
||||
|
||||
?>
|
||||
|
||||
<div class="wpfl-2">
|
||||
|
||||
<div class="wpforo-topic-head">
|
||||
<div class="head-title"><?php echo wpfval($topic_fields['title'], 'label'); ?></div>
|
||||
<div class="head-stat-lastpost"><?php wpforo_phrase('Last Post') ?></div>
|
||||
<div class="head-stat-views"><?php echo wpfval($topic_fields['seminar_date'], 'label').' / '.wpfval($topic_fields['seminar_time'], 'label'); ?></div>
|
||||
<div class="head-stat-posts"></div>
|
||||
<br class="wpf-clear">
|
||||
</div>
|
||||
|
||||
<?php foreach($topics as $key => $topic) : ?>
|
||||
|
||||
<?php
|
||||
$last_poster = array();
|
||||
$last_post = array();
|
||||
$member = wpforo_member($topic);
|
||||
if(isset($topic['last_post']) && $topic['last_post'] != 0){
|
||||
$last_post = wpforo_post($topic['last_post']);
|
||||
$last_poster = wpforo_member($last_post);
|
||||
}
|
||||
$topic_url = wpforo_topic($topic['topicid'], 'url');
|
||||
|
||||
// NIU:
|
||||
$topic_custom_fields = cbsonline_wpforo_get_topic_custom_fields($topic['first_postid']);
|
||||
?>
|
||||
|
||||
<div class="topic-wrap <?php wpforo_unread($topic['topicid'], 'topic'); ?>">
|
||||
<div class="wpforo-topic">
|
||||
<?php if( WPF()->perm->usergroup_can('va') && wpforo_feature('avatars') ): ?>
|
||||
<div class="wpforo-topic-avatar"><?php echo WPF()->member->avatar($member, 'alt="'.esc_attr($member['display_name']).'"', 48) ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="wpforo-topic-info">
|
||||
<p class="wpforo-topic-title"><a href="<?php wpforo_unread_url( $topic['topicid'], $topic_url ) ?>"><?php wpforo_topic_icon($topic); ?><?php echo esc_html($topic['title']) ?></a> <?php wpforo_unread_button($topic['topicid'], $topic_url); ?> <?php wpforo_viewing( $topic ); ?></p>
|
||||
<p class="wpforo-topic-custom_fields spearker">
|
||||
<span class="label"><?php echo wpfval($topic_fields['speaker_name'], 'label'); ?></span><span class="value"><?php echo $topic_custom_fields['speaker_name']; ?>
|
||||
</p>
|
||||
<p class="wpforo-topic-custom_fields host">
|
||||
<span class="label"><?php echo wpfval($topic_fields['host'], 'label'); ?></span><span class="value"><?php echo $topic_custom_fields['host']; ?>
|
||||
</p>
|
||||
<div class="wpforo-topic-badges"><?php wpforo_hook('wpforo_topic_info_end', $topic); ?></div>
|
||||
</div>
|
||||
<?php if(isset($topic['last_post']) && $topic['last_post'] != 0) : ?>
|
||||
<div class="wpforo-topic-stat-lastpost"><span><?php wpforo_member_link($last_poster, 'by'); ?> <a href="<?php echo esc_url($last_post['url']) ?>" title="<?php wpforo_phrase('View the latest post') ?>"><i class="fas fa-chevron-right fa-sx wpfcl-a"></i></a></span><br> <?php wpforo_date($last_post['created']); ?></div>
|
||||
<?php else: ?>
|
||||
<div class="wpforo-topic-stat-lastpost"><?php wpforo_phrase('Replies not found') ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="wpforo-topic-stat-views"><?php echo $topic_custom_fields['seminar_date']; ?><br /><?php echo $topic_custom_fields['seminar_time']; ?></div>
|
||||
<div class="wpforo-topic-stat-posts"></div>
|
||||
<br class="wpf-clear">
|
||||
</div><!-- wpforo-topic -->
|
||||
</div><!-- topic-wrap -->
|
||||
|
||||
<?php do_action( 'wpforo_loop_hook', $key ) ?>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</div><!-- wpfl-2 -->
|
Reference in New Issue
Block a user