PluginProbe
Private groups / 2.4
Private groups v2.4
trunk 1.5 1.6 1.7 1.8 1.8.1 1.9.1 1.9.2 2.0 2.0.1 2.2 2.3 2.4 2.5 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.0.6 All 116 releases
← All changes | includes/settings.php +159 -190 trunk2.4 View file →
@@ -8,10 +8,10 @@
8 8 global $rpg_settingsg ;
9 9 global $rpg_groups;
10 10 global $rpg_group_last ;
11 11 global $rpg_roles ;
12 -
13 12
13 +
14 14 ?>
15 15 <div class="wrap">
16 16 <div id="upb-wrap" class="upb-help">
17 17 <h2><?php _e('Private Group Settings', 'bbp-private-groups'); ?></h2>
@@ -25,9 +25,9 @@
25 25
26 26 <?php //tests if we have selected a tab ?>
27 27 <?php
28 28 if( isset( $_GET[ 'tab' ] ) ) {
29 - if ( !empty($active_tab) && $active_tab == 'user_management') pg_user_management($tab) ;
29 + if ($active_tab == 'user_management') pg_user_management($tab) ;
30 30 $active_tab = $_GET[ 'tab' ];}
31 31 else {$active_tab= 'forum_visibility_settings';
32 32 } // end if
33 33 ?>
@@ -33,58 +33,34 @@
33 33 ?>
34 34
35 35 <?php // sets up the tabs ?>
36 36 <h2 class="nav-tab-wrapper">
37 - <a href="?page=bbp-private-group-settings&tab=group_name_settings" class="nav-tab <?php echo $active_tab == 'group_name_settings' ? 'nav-tab-active' : ''; ?>"><?php _e('Group Name Settings' , 'bbp-private-groups' ) ; ?></a>
38 - <a href="?page=bbp-private-group-settings&tab=forum_visibility_settings" class="nav-tab <?php echo $active_tab == 'forum_visibility_settings' ? 'nav-tab-active' : ''; ?>"><?php _e('Forum Visibility settings' , 'bbp-private-groups' ) ; ?></a>
39 - <a href="?page=bbp-private-group-settings&tab=topic_permissions" class="nav-tab <?php echo $active_tab == 'topic_permissions' ? 'nav-tab-active' : ''; ?>"><?php _e('Topic Permissions' , 'bbp-private-groups' ) ; ?></a>
40 - <a href="?page=bbp-private-group-settings&tab=role_assignment" class="nav-tab <?php echo $active_tab == 'role_assignment' ? 'nav-tab-active' : ''; ?>"><?php _e('Assign groups to roles' , 'bbp-private-groups' ) ; ?></a>
41 - <a href="?page=bbp-private-group-settings&tab=disable_groups" class="nav-tab <?php echo $active_tab == 'disable_groups' ? 'nav-tab-active' : ''; ?>"><?php _e('Disable Groups' , 'bbp-private-groups' ) ; ?></a>
42 - <a href="?page=bbp-private-group-settings&tab=general_settings" class="nav-tab <?php echo $active_tab == 'general_settings' ? 'nav-tab-active' : ''; ?>"><?php _e('General Settings' , 'bbp-private-groups' ) ; ?></a>
43 - <a href="?page=bbp-private-group-settings&tab=user_management" class="nav-tab <?php echo $active_tab == 'user_management' ? 'nav-tab-active' : ''; ?>"><?php _e('User Management' , 'bbp-private-groups' ) ; ?></a>
44 - <a href="?page=bbp-private-group-settings&tab=widget_warning" class="nav-tab <?php echo $active_tab == 'widget_warning' ? 'nav-tab-active' : ''; ?>"><?php _e('Widget Warning !' , 'bbp-private-groups' ) ; ?></a>
45 - <a href="?page=bbp-private-group-settings&tab=shortcode_warning" class="nav-tab <?php echo $active_tab == 'shortcode_warning' ? 'nav-tab-active' : ''; ?>"><?php _e('Shortcode Warning !' , 'bbp-private-groups' ) ; ?></a>
46 - <a href="?page=bbp-private-group-settings&tab=management_information" class="nav-tab <?php echo $active_tab == 'Management_information' ? 'nav-tab-active' : ''; ?>"><?php _e('Management Information' , 'bbp-private-groups' ) ; ?></a>
47 - <a href="?page=bbp-private-group-settings&tab=plugin-info" class="nav-tab <?php echo $active_tab == 'plugin-info' ? 'nav-tab-active' : ''; ?>"><?php _e('Plugin Information' , 'bbp-private-groups' ) ; ?></a>
48 - <a href="?page=bbp-private-group-settings&tab=help" class="nav-tab <?php echo $active_tab == 'help' ? 'nav-tab-active' : ''; ?>"><?php _e('Help' , 'bbp-private-groups' ) ; ?></a>
49 - <a href="?page=bbp-private-group-settings&tab=programmershelp" class="nav-tab <?php echo $active_tab == 'programmershelp' ? 'nav-tab-active' : ''; ?>"><?php _e('Programmers Help' , 'bbp-private-groups' ) ; ?></a></h2>
50 -
51 - <?php
52 - if (class_exists('bbPress_Notify_noSpam') && !class_exists('bbpnns_private_groups_bridge'))
53 - echo '<h1>WARNING !!! You have bbPress Notify (No Spam) active. This plugin will send <b>all</b> topics and replies to users as set and private groups does not filter these.<br>
54 - Either <br> 1. Ensure that you understand this before using (maybe only use for those allowed to see everything eg admins)
55 - or <br> 2. add <a href="https://usestrict.net/product/bbpress-notify-no-spam-private-groups-bridge/" target="_new">bbpnns_private_groups_bridge</a> to get the add-on so that bbpnns and private groups work together.</h1>' ;
56 - ?>
57 37
58 - <?php
59 - if (function_exists('notify_new_topic') )
60 - echo '<h1>WARNING !!! You have an old plugin bbPress Notify active. It is strongly recommended that you use <a href="https://en-gb.wordpress.org/plugins/bbpress-notify-nospam/" target="_new">bbPress Notify (No Spam)</a> instead which is supported.
61 - <br>HOWEVER Both plugins will send <b>all</b> topics and replies to users as set and private groups does not filter these.<br>
62 - Either <br> 1. Ensure that you understand this before using (maybe only use for those allowed to see everything eg admins)
63 - or <br> 2. add <a href="https://usestrict.net/product/bbpress-notify-no-spam-private-groups-bridge/" target="_new">bbpnns_private_groups_bridge\</a> as well as <a href="https://en-gb.wordpress.org/plugins/bbpress-notify-nospam/" target="_new">bbPress Notify (No Spam)</a> to get the add-on so that bbpnns and private groups work together.</h1>' ;
64 -
65 - ?>
66 -
67 -
68 -
69 -
38 + <a href="?page=bbp-private-group-settings&tab=forum_visibility_settings" class="nav-tab <?php echo $active_tab == 'forum_visibility_settings' ? 'nav-tab-active' : ''; ?>">Forum Visibility settings</a>
39 + <a href="?page=bbp-private-group-settings&tab=general_settings" class="nav-tab <?php echo $active_tab == 'general_settings' ? 'nav-tab-active' : ''; ?>">General Settings</a>
40 + <a href="?page=bbp-private-group-settings&tab=group_name_settings" class="nav-tab <?php echo $active_tab == 'group_name_settings' ? 'nav-tab-active' : ''; ?>">Group Name Settings</a>
41 + <a href="?page=bbp-private-group-settings&tab=help" class="nav-tab <?php echo $active_tab == 'help' ? 'nav-tab-active' : ''; ?>">Help</a>
42 + <a href="?page=bbp-private-group-settings&tab=management_information" class="nav-tab <?php echo $active_tab == 'Management_information' ? 'nav-tab-active' : ''; ?>">Management Information</a>
43 + <a href="?page=bbp-private-group-settings&tab=user_management" class="nav-tab <?php echo $active_tab == 'user_management' ? 'nav-tab-active' : ''; ?>">User Management</a>
44 + <a href="?page=bbp-private-group-settings&tab=role_assignment" class="nav-tab <?php echo $active_tab == 'role_assignment' ? 'nav-tab-active' : ''; ?>">Assign groups to roles</a></h2>
70 45 <table class="form-table">
71 - <tr>
46 + <tr>
47 +
72 48 <td>
73 - <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
74 - <input type="hidden" name="cmd" value="_s-xclick" />
75 - <input type="hidden" name="hosted_button_id" value="GEMT7XS7C8PS4" />
76 - <input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" title="PayPal - The safer, easier way to pay online!" alt="Donate with PayPal button" />
77 - <img alt="" border="0" src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1" />
78 - </form>
79 - </td>
80 - <td>
81 - <?php _e('If you find this plugin useful, please consider donating just a few dollars to help me develop and maintain it. You support will be appreciated', 'bbp-style-pack'); ?>
82 - </td>
83 -
84 - </tr>
85 - </table>
49 + <form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
50 +<input type="hidden" name="cmd" value="_s-xclick">
51 +<input type="hidden" name="hosted_button_id" value="S6PZGWPG3HLEA">
52 +<input type="image" src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online.">
53 +<img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
54 +</form>
55 +</td><td>
56 +<?php _e("If you find this plugin useful, please consider donating just a couple of dollars to help me develop and maintain it. You support will be appreciated", 'bbp-last-post'); ?>
86 57
58 +
59 +</td>
60 +</tr>
61 +</table>
62 +
87 63 <?php //************************* Forum Visibility settings *************************// ?>
88 64
89 65 <?php if( $active_tab == 'forum_visibility_settings' ) { ?>
90 66 <form method="post" action="options.php">
@@ -96,9 +72,9 @@
96 72 <!-------------------------------Forum visibility ---------------------------------------->
97 73
98 74 <tr valign="top">
99 75 <th><h3><?php _e('Forum Visibility', 'bbp-private-groups'); ?></h3></th>
100 - <td><p><?php _e('By default only users with access to a forum will see the forum titles in the indexes. However you may want everyone to see that a forum exists (ie see the title) but not be able to access topics and replies within this. In this case, set the forum visibility below. If you want only logged in users to see these forums exist, then also set the forum to private within the dashboard>forums settings', 'bbp-private-groups') ?> <b> <?php _e ('See help tab for more information' , 'bbp-private-groups') ; ?></b></p></td>
76 + <td><p><?php _e('By default only users with access to a forum will see the forum titles in the indexes. However you may want everyone to see that a forum exists (ie see the title) but not be able to access topics and replies within this. In this case, set the forum visibility below. If you want only logged in users to see these forums exist, then also set the forum to private within the dashboard>forums settings', 'bbp-private-groups') ?> <b> See help tab for more information</b></p></td>
101 77 </tr>
102 78
103 79 <!-- checkbox to activate -->
104 80 <tr valign="top">
@@ -126,9 +102,9 @@
126 102 <tr valign="top">
127 103 <th><?php _e('URL of redirect page for NON-LOGGED-IN', 'bbp-private-groups'); ?></th>
128 104 <td>
129 105 <input id="rpg_settingsf[redirect_page2]" class="large-text" name="rpg_settingsf[redirect_page2]" type="text" value="<?php echo isset( $rpg_settingsf['redirect_page2'] ) ? esc_html( $rpg_settingsf['redirect_page2'] ) : '';?>" /><br/>
130 - <label class="description" for="rpg_settingsf[redirect_page]"><?php _e( 'Enter the full url (permalink) of the page to redirect users without access to eg http://www.mysite.com/sign-up. This can be the same as the LOGGED-IN page, just giving the opportunity to have different pages if you want them ! If you leave this blank, users will be sent to the Wordpress login page', 'bbp-private-groups' ); ?></label><br/>
106 + <label class="description" for="rpg_settingsf[redirect_page]"><?php _e( 'Enter the full url (permalink) of the page to redirect users without access to eg http://www.mysite.com/sign-up. This can be the same as the LOGGED-IN page, just giving the opportunity to have different pages if you want them ! If you leave this blank, users will be sent to the wordpress login page', 'bbp-private-groups' ); ?></label><br/>
131 107 </td>
132 108 </tr>
133 109
134 110 <!-------------------------------Freshness settings ---------------------------------------->
@@ -176,14 +152,13 @@
176 152
177 153 <?php settings_fields( 'rpg_general_settings' ); ?>
178 154
179 155 <table class="form-table">
180 -
181 -
182 - <!------------------------------- Hide topic/reply counts ------------------------------------------>
156 + <!------------------------------- Hide topic/reply counts ------------------------------------------>
183 157 <tr valign="top">
184 158 <th colspan="2"><h3><?php _e('Hide topic and reply counts', 'bbp-private-groups'); ?></h3></th>
185 159 </tr>
160 +
186 161 <!-- checkbox to activate -->
187 162 <tr valign="top">
188 163 <th><?php _e('Activate', 'bbp-private-groups'); ?></th>
189 164 <td>
@@ -189,20 +164,8 @@
189 164 <td>
190 165 <?php activate_hide_counts_checkbox() ;?>
191 166 </td>
192 167 </tr>
193 - <!------------------------------- List Sub-forums as columns ------------------------------------------>
194 - <tr valign="top">
195 - <th colspan="2"><h3><?php _e('List Sub-forums in Columns', 'bbp-private-groups'); ?></h3></th>
196 - </tr>
197 -
198 - <!-- checkbox to activate -->
199 - <tr valign="top">
200 - <th><?php _e('Activate', 'bbp-private-groups'); ?></th>
201 - <td>
202 - <?php activate_sub_forums_checkbox() ;?>
203 - </td>
204 - </tr>
205 168
206 169 <!------------------------------- Descriptions ------------------------------------------>
207 170 <tr valign="top">
208 171 <th colspan="2"><h3><?php _e('Show Descriptions', 'bbp-private-groups'); ?></h3></th>
@@ -251,139 +214,166 @@
251 214
252 215
253 216 <?php //************************* Group name settings *************************// ?>
254 217 <?php if( $active_tab == 'group_name_settings' ) { ?>
255 - <form method="post" action="options.php">
256 - <?php global $rpg_disable_groups ;?>
218 + <form method="post" action="options.php">
219 +
257 220 <?php settings_fields( 'rpg_group_settings' ); ?>
258 221
259 222 <table class="form-table">
260 223
261 - <tr valign="top">
262 - <th colspan="3">
263 - <p>
264 - <?php _e('This section allows you to set up groups. Enter a Description for each group eg gamers, teachers, group1 etc.' , 'bbp-private-groups' ) ; ?>
265 - </p>
266 - </th>
267 - </tr>
268 - <?php
269 - if (!empty ($rpg_groups)) $count=count ($rpg_groups) ;
270 - else $count = 1 ;
271 - //a new group is added if $rpg_groups['activate_new_group'] is set, as this becomes part of the count, so it looks like we have an extra group in the count
272 - if ($count==1) $count=2 ;
273 - for ($i = 0 ; $i < $count ; ++$i) {
274 - $g=$i+1 ;
275 - $display=__( 'Group', 'bbp-private-groups' ).$g ;
276 - $name="group".$g ;
277 - $item="rpg_groups[".$name."]" ;
278 - $value = (!empty ($rpg_groups[$name]) ? $rpg_groups[$name] : '' ) ;
279 - ?>
280 - <!------------------------- Group --------------------------------------------->
224 + <tr valign="top">
225 + <th colspan="2"><p> This section allows you to set up groups. Enter a Description for each group eg gamers, teachers, group1 etc.</p></th>
226 + </tr>
227 + <?php
228 + $count=count ($rpg_groups) ;
229 + if ($count==1) $count=2 ;
230 + for ($i = 0 ; $i < $count ; ++$i) {
231 + $g=$i+1 ;
232 + $name="group".$g ;
233 + $item="rpg_groups[".$name."]" ;
234 + ?>
235 + <!------------------------- Group --------------------------------------------->
281 236 <tr valign="top">
282 - <th>
283 - <?php echo $display ?>
284 - </th>
285 -
286 - <td>
287 - <?php echo '<input id="'.$item.'" class="medium-text" name="'.$item.'" type="text" value="'.esc_html( $value ).'"<br>' ; ?>
288 -
289 - <?php
290 - if (!empty ($rpg_disable_groups[$name] ) ) {
291 - _e('This group is disabled - to re-enable use the \'Disable Groups\' tab', 'bbp-private-groups' ) ;
292 - }
293 -
294 - ?>
295 - </td>
237 + <th><?php echo $name ?></th>
238 + <td>
239 + <?php echo '<input id="'.$item.'" class="large-text" name="'.$item.'" type="text" value="'.esc_html( $rpg_groups[$name] ).'"<br>' ;
240 + ?>
241 + </td>
296 242 </tr>
297 - <?php
298 - }
243 + <?php }
299 244
300 - ?>
301 - <!-- checkbox to activate new group -->
245 + ?>
246 + <!-- checkbox to activate new group -->
302 247 <tr valign="top">
303 - <th>
304 - <?php _e('Add new group', 'bbp-private-groups'); ?>
305 - </th>
306 -
307 - <td>
308 - <?php activate_new_group() ;?>
248 + <th><?php _e('Add new group', 'bbp-private-groups'); ?></th>
249 + <td>
250 + <?php activate_new_group() ;?>
309 251
310 - </td>
252 + </td>
311 253 </tr>
312 254
313 255
314 - </table>
315 - <!-- save the options -->
316 - <p class="submit">
317 - <input type="submit" class="button-primary" value="<?php _e( 'Save Groups', 'bbp-private-groups' ); ?>" />
318 - </p>
319 - </form>
320 - </div><!--end sf-wrap-->
256 + </table>
257 + <!-- save the options -->
258 + <p class="submit">
259 + <input type="submit" class="button-primary" value="<?php _e( 'Save Groups', 'bbp-private-groups' ); ?>" />
260 + </p>
261 + </form>
262 + </div><!--end sf-wrap-->
321 263 </div><!--end wrap-->
322 264
323 265 <?php
324 266 }
325 -
267 +?>
326 268
327 269
270 +<?php //************************* Management Info *************************// ?>
271 + <?php if( $active_tab == 'management_information' ) {
272 + ?>
273 +
274 + <?php settings_fields( 'rpg_group_settings' ); ?>
275 +
276 + <table class="form-table">
277 +
278 + <tr valign="top">
279 +
280 + </tr>
281 + <?php
282 + $count=count ($rpg_groups) ;
283 + for ($i = 0 ; $i < $count ; ++$i) {
284 + $g=$i+1 ;
285 + $name="group".$g ;
286 + $item="rpg_groups[".$name."]" ;
287 + ?>
288 + <!------------------------- Group --------------------------------------------->
289 + <tr valign="top">
290 + <th><?php echo $name ?></th>
291 + <td>
292 + Group name :
293 + <?php echo esc_html( $rpg_groups[$name] ).'<br>' ; ?>
294 + No. users in this group :
295 + <?php
296 + global $wpdb;
297 + $users=$wpdb->get_col("select ID from $wpdb->users") ;
298 + $countu=0 ;
299 + foreach ($users as $user) {
300 +
301 + $check= get_user_meta( $user, 'private_group',true);
302 + //single user check
303 + if ($check==$name) $countu++ ;
304 + //multiple group set
305 + if (strpos($check, '*'.$name.'*') !== FALSE) $countu++;
306 + }
307 + echo $countu ;
308 + ?>
309 +
328 310
329 -//**** management info
330 -if( $active_tab == 'management_information' ) {
331 -management_info () ;
311 + <br>Forums in this group :
312 + <?php global $wpdb;
313 + $forum = bbp_get_forum_post_type() ;
314 + $forums=$wpdb->get_col("select ID from $wpdb->posts where post_type='$forum'") ;
315 + $countu=0 ;
316 + echo '<ul><i>' ;
317 + foreach ($forums as $forum) {
318 + $meta = (array)get_post_meta( $forum, '_private_group', false );
319 + foreach ($meta as $meta2) {
320 + if ($meta2==$name) {
321 + $ftitle=bbp_forum_title($forum) ;
322 + echo '<li>'.$ftitle.'</li>' ;
323 + $countu++ ;
324 + }
325 + }
326 +
327 + }
328 + echo '</ul></i>' ;
329 +
330 + echo 'No. forums that have this group set : '.$countu ;
331 + ?>
332 + </td></tr>
333 + <?php }
334 +
335 + ?>
336 +
337 + </table>
338 +
339 + </form>
340 + </div><!--end sf-wrap-->
341 + </div><!--end wrap-->
342 +
343 +<?php
344 +}
345 +?>
332 346
333 -
334 -}
347 +<?php
335 348 //**** user management
336 349 if ($active_tab == 'user_management' ) {
337 350 $group = 'all' ;
338 351 pg_user_management($group) ;
339 352 }
353 +?>
340 354
355 +<?php
341 356 //**** Help
342 357 if ($active_tab == 'help' ) {
343 358 pg_help();
344 359 }
360 +?>
345 361
346 -//**** Plugin Info
347 -if ($active_tab == 'plugin-info' ) {
348 -pg_plugin_info();
349 -}
350 -
362 +<?php
351 363 //**** role assignment
352 364 if ($active_tab == 'role_assignment' ) {
353 365 pg_role_assignment() ;
354 366 }
355 -
356 -//**** disable Groups
357 -if ($active_tab == 'disable_groups' ) {
358 -rpg_disable_groups() ;
367 +//end of tab function
359 368 }
360 369
361 370
362 -//**** widget warning
363 -if ($active_tab == 'widget_warning' ) {
364 -pg_widget_warning() ;
365 -}
366 371
367 -//**** shortcode warning
368 -if ($active_tab == 'shortcode_warning' ) {
369 -pg_shortcode_warning() ;
370 -}
371 372
372 -//**** topic permissions
373 -if ($active_tab == 'topic_permissions' ) {
374 -rpg_topic_permissions() ;
375 -}
376 373
377 -//**** topic permissions
378 -if ($active_tab == 'programmershelp' ) {
379 -rpg_programmers_help() ;
380 -}
381 374
382 -//end of tab function
383 -}
384 375
385 -
386 376 // register the plugin settings
387 377 function rpg_register_settings() {
388 378
389 379 register_setting( 'rpg_forum_settings', 'rpg_settingsf' );
@@ -389,20 +379,16 @@
389 379 register_setting( 'rpg_forum_settings', 'rpg_settingsf' );
390 380 register_setting( 'rpg_general_settings', 'rpg_settingsg' );
391 381 register_setting( 'rpg_group_settings', 'rpg_groups' );
392 382 register_setting( 'rpg_roles_settings', 'rpg_roles' );
393 - register_setting( 'rpg_topic_permissions', 'rpg_topic_permissions' );
394 - register_setting( 'rpg_disable_groups', 'rpg_disable_groups' );
395 383 }
396 -
397 384 //call register settings function
398 385 add_action( 'admin_init', 'rpg_register_settings' );
399 386
400 387 function rpg_settings_menu() {
401 - //allows filter for which capability can access the settings page - default = 'manage_options'
402 - $cap = apply_filters('rpg_plugin_settings_capability','manage_options');
388 +
403 389 // add settings page
404 - add_submenu_page('options-general.php', __('bbp Private Groups', 'bbp-private-groups'), __('bbp Private Groups', 'bbp-private-groups'), $cap, 'bbp-private-group-settings', 'rpg_settings_page');
390 + add_submenu_page('options-general.php', __('bbp Private Groups', 'bbp-private-groups'), __('bbp Private Groups', 'bbp-private-groups'), 'manage_options', 'bbp-private-group-settings', 'rpg_settings_page');
405 391 }
406 392 add_action('admin_menu', 'rpg_settings_menu');
407 393
408 394 /***************************** Checkbox functions **************************/
@@ -407,51 +393,34 @@
407 393
408 394 /***************************** Checkbox functions **************************/
409 395 function activate_forum_visibility_checkbox() {
410 396 global $rpg_settingsf ;
411 - $item5 = (!empty($rpg_settingsf['set_forum_visibility'] ) ? $rpg_settingsf['set_forum_visibility'] : '');
412 - //$item5 = $rpg_settingsf['set_forum_visibility'] ;
413 - echo '<input name="rpg_settingsf[set_forum_visibility]" id="rpg_settingsf[set_forum_visibility]" type="checkbox" value="1" class="code" ' . checked( 1,$item5, false ) . ' />' ;
414 - _e ('Click to activate forum visibility' , 'bbp-private-groups') ;
397 + $item5 = $rpg_settingsf['set_forum_visibility'] ;
398 + echo '<input name="rpg_settingsf[set_forum_visibility]" id="rpg_settingsf[set_forum_visibility]" type="checkbox" value="1" class="code" ' . checked( 1,$item5, false ) . ' /> Click to activate forum visibility';
415 399 }
416 400 function freshness_checkbox() {
417 401 global $rpg_settingsf ;
418 - $item4 = (!empty($rpg_settingsf['set_freshness_message'] ) ? $rpg_settingsf['set_freshness_message'] : '');
419 - //$item4 = $rpg_settingsf['set_freshness_message'] ;
420 - echo '<input name="rpg_settingsf[set_freshness_message]" id="rpg_settingsf[set_freshness_message]" type="checkbox" value="1" class="code" ' . checked( 1,$item4, false ) . ' />' ;
421 - _e ('Click to activate a freshness message', 'bbp-private-groups' );
402 + $item4 = $rpg_settingsf['set_freshness_message'] ;
403 + echo '<input name="rpg_settingsf[set_freshness_message]" id="rpg_settingsf[set_freshness_message]" type="checkbox" value="1" class="code" ' . checked( 1,$item4, false ) . ' /> Click to activate a freshness message';
422 404 }
423 405
424 - function activate_sub_forums_checkbox() {
425 - global $rpg_settingsg ;
426 - $item1 = (!empty( $rpg_settingsg['list_sub_forums_as_column']) ? $rpg_settingsg['list_sub_forums_as_column'] : '');
427 - //$item1 = $rpg_settingsg['list_sub_forums_as_column'] ;
428 - echo '<input name="rpg_settingsg[list_sub_forums_as_column]" id="rpg_settingsg[list_sub_forums_as_column]" type="checkbox" value="1" class="code" ' . checked( 1,$item1, false ) . ' />' ;
429 - _e ('List Sub-forums in column', 'bbp-private-groups' );
430 - }
431 406 function activate_hide_counts_checkbox() {
432 407 global $rpg_settingsg ;
433 - $item1 = (!empty( $rpg_settingsg['hide_counts'] ) ? $rpg_settingsg['hide_counts'] : '');
434 - //$item1 = $rpg_settingsg['hide_counts'] ;
435 - echo '<input name="rpg_settingsg[hide_counts]" id="rpg_settingsg[hide_counts]" type="checkbox" value="1" class="code" ' . checked( 1,$item1, false ) . ' />' ;
436 - _e ('Hide topic and reply counts', 'bbp-private-groups' );
408 + $item1 = $rpg_settingsg['hide_counts'] ;
409 + echo '<input name="rpg_settingsg[hide_counts]" id="rpg_settingsg[hide_counts]" type="checkbox" value="1" class="code" ' . checked( 1,$item1, false ) . ' /> Hide topic and reply counts';
437 410 }
438 411 function activate_descriptions_checkbox() {
439 412 global $rpg_settingsg ;
440 - $item2 = (!empty( $rpg_settingsg['activate_descriptions'] ) ? $rpg_settingsg['activate_descriptions'] : '');
441 - //$item2 = $rpg_settingsg['activate_descriptions'] ;
442 - echo '<input name="rpg_settingsg[activate_descriptions]" id="rpg_settingsg[activate_descriptions]" type="checkbox" value="1" class="code" ' . checked( 1,$item2, false ) . ' />' ;
443 - _e ('Show sub-forum content (Descriptions) on main index - sub-forums will display in columns' , 'bbp-private-groups' );
413 + $item2 = $rpg_settingsg['activate_descriptions'] ;
414 + echo '<input name="rpg_settingsg[activate_descriptions]" id="rpg_settingsg[activate_descriptions]" type="checkbox" value="1" class="code" ' . checked( 1,$item2, false ) . ' /> Show forum content (Descriptions) on main index';
444 415 }
445 416 function activate_private_prefix_checkbox() {
446 417 global $rpg_settingsg ;
447 - $item3 = (!empty( $rpg_settingsg['activate_remove_private_prefix'] ) ? $rpg_settingsg['activate_remove_private_prefix'] : '');
448 - //$item3 = $rpg_settingsg['activate_remove_private_prefix'] ;
449 - echo '<input name="rpg_settingsg[activate_remove_private_prefix]" id="rpg_settingsg[activate_remove_private_prefix]" type="checkbox" value="1" class="code" ' . checked( 1,$item3, false ) . ' />' ;
450 - _e ('Remove Private prefix' , 'bbp-private-groups' );
418 + $item3 = $rpg_settingsg['activate_remove_private_prefix'] ;
419 + echo '<input name="rpg_settingsg[activate_remove_private_prefix]" id="rpg_settingsg[activate_remove_private_prefix]" type="checkbox" value="1" class="code" ' . checked( 1,$item3, false ) . ' /> Remove Private prefix';
451 420 }
452 421 function activate_new_group() {
453 422 global $rpg_groups ;
454 - $item6 = (!empty( $rpg_groups['activate_new_group'] ) ? $rpg_groups['activate_new_group'] : '');
455 - echo '<input name="rpg_groups[activate_new_group]" id="rpg_groups[activate_new_group]" type="checkbox" value="1" class="code" />' ;
456 - _e ('Click and then press "save groups" to add a new group' , 'bbp-private-groups' ) ;
457 - }
423 + $item6 = $rpg_groups['activate_new_group'] ;
424 + echo '<input name="rpg_groups[activate_new_group]" id="rpg_groups[activate_new_group]" type="checkbox" value="1" class="code" /> Click and then press "save groups" to add a new group' ;
425 + }
426 +