PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.4.3
Forumax – AI Powered Advanced Community Forum Plugin v2.4.3
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 2.4.3, at templates/content-single-forum.php

123 lines 6.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 if ( function_exists( 'forumax_get_opt' ) && forumax_get_opt( 'topic_login_shortcode' ) ) : ?>
54 <?php echo do_shortcode( forumax_get_opt( 'topic_login_shortcode' ) ); ?>
55 <?php else : ?>
56 <form method="post" action="<?php bbp_wp_login_action( array( 'context' => 'login_post' ) ); ?>" class="bbp-login-form">
57 <fieldset class="bbp-form">
58 <legend><?php esc_html_e( 'Log In', 'forumax' ); ?></legend>
59
60 <div class="bbp-username">
61 <label for="frmx-forum-sub-user-login"><?php esc_html_e( 'Username', 'forumax' ); ?>: </label>
62 <input type="text" name="log" value="" size="20" maxlength="100" id="frmx-forum-sub-user-login" placeholder="<?php esc_attr_e( 'Username or Email', 'forumax' ); ?>" autocomplete="off" />
63 </div>
64
65 <div class="bbp-password">
66 <label for="frmx-forum-sub-user-pass"><?php esc_html_e( 'Password', 'forumax' ); ?>: </label>
67 <input type="password" name="pwd" value="" size="20" id="frmx-forum-sub-user-pass" placeholder="<?php esc_attr_e( 'Password', 'forumax' ); ?>" autocomplete="off" />
68 </div>
69
70 <div class="bbp-remember-me">
71 <input type="checkbox" name="rememberme" value="forever" id="frmx-forum-sub-rememberme" />
72 <label for="frmx-forum-sub-rememberme"><?php esc_html_e( 'Keep me signed in', 'forumax' ); ?></label>
73 </div>
74
75 <?php do_action( 'login_form' ); ?>
76
77 <div class="bbp-submit-wrapper">
78 <button type="submit" name="user-submit" id="frmx-forum-sub-user-submit" class="button submit user-submit fill-brand"><?php esc_html_e( 'Log In', 'forumax' ); ?></button>
79 <?php bbp_user_login_fields(); ?>
80 </div>
81 </fieldset>
82 </form>
83 <?php endif; ?>
84 </div>
85 </div>
86 </div>
87 <?php endif; ?>
88 <?php endif; ?>
89 </div>
90 <?php endif; ?>
91 </div>
92
93 <?php if (bbp_has_forums()): ?>
94
95 <?php bbp_get_template_part('loop', 'forums'); ?>
96
97 <?php endif; ?>
98
99 <?php if (!bbp_is_forum_category() && bbp_has_topics()): ?>
100
101 <?php bbp_get_template_part('loop', 'topics'); ?>
102
103 <?php bbp_get_template_part('form', 'topic'); ?>
104
105 <?php elseif (!bbp_is_forum_category()): ?>
106
107 <?php bbp_get_template_part('form', 'topic'); ?>
108
109 <?php endif; ?>
110
111 <?php endif; ?>
112
113 <?php do_action('bbp_template_after_single_forum'); ?>
114 </div>
115
116 <?php if ($has_sidebar): ?>
117 <div class="frmx-col-lg-4">
118 <aside class="forum-sidebar">
119 <?php dynamic_sidebar('forum_archive_sidebar'); ?>
120 </aside>
121 </div>
122 <?php endif; ?>
123 </div>