PluginProbe
Forumax – AI Powered Advanced Community Forum Plugin / 2.5.0
Forumax – AI Powered Advanced Community Forum Plugin v2.5.0
2.5.0 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 All 30 releases
← All changes | includes/admin/menu/admin_ui.php +32 -15 1.4.0 → 2.5.0 View file →
@@ -83,10 +83,10 @@
83 83 $count_no_reply++;
84 84 }
85 85
86 86 // Count solved.
87 - // Before using $GLOBALS['bbp_solved_topic'], check if it is set
88 - if (isset($GLOBALS['bbp_solved_topic']) && $GLOBALS['bbp_solved_topic']->is_solved($topic_id)) {
87 + // Before using $GLOBALS['forumax_solve_topic'], check if it is set
88 + if (isset($GLOBALS['forumax_solve_topic']) && $GLOBALS['forumax_solve_topic']->is_solved($topic_id)) {
89 89 $count_solved++;
90 90 } else {
91 91 $count_unsolved++;
92 92 }
@@ -117,20 +117,16 @@
117 117
118 118 <!-- Children topics. -->
119 119 <?php include __DIR__ . '/admin_ui/topics.php'; ?>
120 120
121 - <?php
122 - if ( $children->post_count > 10 ) :
123 - ?>
124 - <div class="controls bbpc-admin-pagination">
121 + <?php if ( $children->post_count > 0 ) : ?>
122 + <div class="controls bbpc-admin-pagination" style="display:none;">
125 123 <div class="mixitup-control mixitup-page-list"></div>
126 124 </div>
127 - <?php
128 - endif;
129 - ?>
125 + <?php endif; ?>
130 126
131 127 <a class="easydocs-btn easydocs-btn-outline-blue easydocs-btn-sm easydocs-btn-round button button-info section-doc" id="bbpc-topic" target="_blank" name="submit" href="javascript:void(0)" bbp_forum_id="<?php echo esc_attr( $item ); ?>">
132 - <?php esc_html_e( 'Add Topic', 'bbp-core' ); ?>
128 + <?php esc_html_e( 'Add Topic', 'forumax' ); ?>
133 129 </a>
134 130 </div>
135 131 <?php
136 132 endforeach;
@@ -143,14 +139,20 @@
143 139 <?php
144 140 else :
145 141 ?>
146 142 <div class="eazydocs-no-content">
147 - <img src="<?php echo esc_url( BBPC_IMG . 'icon/folder-open.png' ); ?>" alt="<?php esc_attr_e( 'Folder Open', 'bbp-core' ); ?>">
148 - <p class="big-p"> <?php esc_html_e( 'No forum has been found . Perhaps', 'bbp-core' ); ?> </p>
149 - <p> <br>
143 + <img src="<?php echo esc_url( FORUMAX_IMG . 'icon/folder-open.png' ); ?>" alt="<?php esc_attr_e( 'Folder Open', 'forumax' ); ?>">
144 + <p class="big-p"> <?php esc_html_e( 'No forums found. Get started by creating a new forum or importing demo data.', 'forumax' ); ?> </p>
145 + <p class="forumax-empty-actions">
150 146 <a href="javascript:void(0)" type="button" id="bbpc-forum" class="button button-primary ezd-btn btn-lg">
151 - <?php esc_html_e( 'Create Forum', 'bbp-core' ); ?>
147 + <span class="dashicons dashicons-plus-alt2"></span>
148 + <?php esc_html_e( 'Create Forum', 'forumax' ); ?>
152 149 </a>
150 + <span class="forumax-actions-separator"><?php esc_html_e( 'or', 'forumax' ); ?></span>
151 + <a href="javascript:void(0)" type="button" id="forumax-import-demo" class="button ezd-btn btn-lg forumax-import-demo-btn">
152 + <span class="dashicons dashicons-database-import"></span>
153 + <?php esc_html_e( 'Import Demo Data', 'forumax' ); ?>
154 + </a>
153 155 </p>
154 156 </div>
155 157 <?php
156 158 endif;
@@ -169,12 +171,27 @@
169 171 animation: {
170 172 enable: false,
171 173 },
172 174 load: {
173 - filter: '<?php echo esc_js( bbpc_get_opt( 'default_filter', '.open-topics' ) ); ?>'
175 + filter: '<?php echo esc_js( forumax_get_opt( 'default_filter', '.open-topics' ) ); ?>'
174 176 },
175 177 pagination: {
176 178 limit: 10,
179 + },
180 + callbacks: {
181 + onMixEnd: function(state) {
182 + var pagination = state.container.querySelector('.bbpc-admin-pagination');
183 + if ( pagination ) {
184 + // Count matching items directly from the DOM using the active
185 + // filter selector. MixItUp always renders prev/next buttons so
186 + // children.length is unreliable for detecting multi-page results.
187 + var selector = state.activeFilter ? state.activeFilter.selector : '';
188 + var matchCount = ( ! selector || selector === 'all' )
189 + ? state.container.querySelectorAll('.mix').length
190 + : state.container.querySelectorAll(selector).length;
191 + pagination.style.display = matchCount > 10 ? 'block' : 'none';
192 + }
193 + }
177 194 }
178 195 };
179 196 for (let i = 0; i < docContainer.length; i++) {
180 197 var mixer1 = mixitup(docContainer[i], config);