PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / trunk
Forumax – AI Powered Advanced Community Forum Plugin vtrunk
2.4.4 2.4.3 2.4.2 2.4.1 2.4.0 trunk 1.0.8 1.1.0 1.2.1 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 2.0.0 2.1.0 All 29 releases
bbp-core / templates / content-single-forum.php

content-single-forum.php in Forumax – AI Powered Advanced Community Forum Plugin trunk, at templates/content-single-forum.php

105 lines 4.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Single Forum Content Part
5 *
6 * @package bbPress
7 * @subpackage Theme
8 */
9
10 // Exit if accessed directly
11 defined('ABSPATH') || exit;
12
13 $has_sidebar = is_active_sidebar('forum_archive_sidebar');
14 $main_column = $has_sidebar ? '8' : '12';
15 ?>
16 <div class="frmx-row frmx-sidebar-<?php echo esc_attr(forumax_get_opt('sidebar_position', 'right')); ?>">
17 <div class="frmx-col-lg-<?php echo esc_attr($main_column); ?>">
18
19 <?php do_action('bbp_template_before_single_forum'); ?>
20
21 <?php if (post_password_required()): ?>
22
23 <?php bbp_get_template_part('form', 'protected'); ?>
24
25 <?php else: ?>
26
27 <div class="frmx-forum-description-row">
28 <div class="frmx-forum-description-text">
29 <?php bbp_single_forum_description(); ?>
30 </div>
31 <?php if ( bbp_is_subscriptions_active() ) : ?>
32 <div class="frmx-forum-subscription-action">
33 <?php if ( is_user_logged_in() ) : ?>
34 <span id="subscription-toggle">
35 <?php
36 bbp_forum_subscription_link( array(
37 'before' => '',
38 'after' => '',
39 'subscribe' => esc_html__( 'Subscribe', 'forumax' ),
40 'unsubscribe' => esc_html__( 'Subscribed', 'forumax' ),
41 ) );
42 ?>
43 </span>
44 <?php else : ?>
45 <?php if ( forumax_get_opt( 'is_forum_subscription', '1' ) == 1 ) : ?>
46 <button class="subscription-login-btn frmx-subscribe-trigger-btn"><?php esc_html_e( 'Subscribe', 'forumax' ); ?></button>
47 <div class="subscription-login-modal frmx-forum-sub-modal">
48 <div class="subscription-login-modal-inner">
49 <button class="subscription-login-modal-close" aria-label="<?php esc_attr_e( 'Close', 'forumax' ); ?>">&times;</button>
50 <h3 class="frmx-inline-login-title"><?php echo esc_html( forumax_get_opt( 'forum_subscription_modal_title', __( 'Login to the community', 'forumax' ) ) ); ?></h3>
51 <p class="frmx-inline-login-subtitle"><?php echo esc_html( forumax_get_opt( 'forum_subscription_modal_subtitle', __( 'You must be logged in to subscribe to this forum.', 'forumax' ) ) ); ?></p>
52 <div class="frmx-subscription-login-form">
53 <?php
54 // Only render login here when the page has no inline topic login
55 // (e.g. forum category). Otherwise one form lives in form-topic.
56 if ( bbp_is_forum_category() ) :
57 forumax_render_topic_login_form();
58 else :
59 ?>
60 <button type="button" class="button fill-brand frmx-scroll-to-login">
61 <?php esc_html_e( 'Go to login form', 'forumax' ); ?>
62 </button>
63 <?php
64 endif;
65 ?>
66 </div>
67 </div>
68 </div>
69 <?php endif; ?>
70 <?php endif; ?>
71 </div>
72 <?php endif; ?>
73 </div>
74
75 <?php if (bbp_has_forums()): ?>
76
77 <?php bbp_get_template_part('loop', 'forums'); ?>
78
79 <?php endif; ?>
80
81 <?php if (!bbp_is_forum_category() && bbp_has_topics()): ?>
82
83 <?php bbp_get_template_part('loop', 'topics'); ?>
84
85 <?php bbp_get_template_part('form', 'topic'); ?>
86
87 <?php elseif (!bbp_is_forum_category()): ?>
88
89 <?php bbp_get_template_part('form', 'topic'); ?>
90
91 <?php endif; ?>
92
93 <?php endif; ?>
94
95 <?php do_action('bbp_template_after_single_forum'); ?>
96 </div>
97
98 <?php if ($has_sidebar): ?>
99 <div class="frmx-col-lg-4">
100 <aside class="forum-sidebar">
101 <?php dynamic_sidebar('forum_archive_sidebar'); ?>
102 </aside>
103 </div>
104 <?php endif; ?>
105 </div>