PluginProbe
Private groups / 2.3
Private groups v2.3
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 +156 -190 trunk2.3 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,163 @@
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 + if ($check==$name) $countu++ ;
303 + }
304 + echo $countu ;
305 + ?>
306 +
328 307
329 -//**** management info
330 -if( $active_tab == 'management_information' ) {
331 -management_info () ;
308 + <br>Forums in this group :
309 + <?php global $wpdb;
310 + $forum = bbp_get_forum_post_type() ;
311 + $forums=$wpdb->get_col("select ID from $wpdb->posts where post_type='$forum'") ;
312 + $countu=0 ;
313 + echo '<ul><i>' ;
314 + foreach ($forums as $forum) {
315 + $meta = (array)get_post_meta( $forum, '_private_group', false );
316 + foreach ($meta as $meta2) {
317 + if ($meta2==$name) {
318 + $ftitle=bbp_forum_title($forum) ;
319 + echo '<li>'.$ftitle.'</li>' ;
320 + $countu++ ;
321 + }
322 + }
323 +
324 + }
325 + echo '</ul></i>' ;
326 +
327 + echo 'No. forums that have this group set : '.$countu ;
328 + ?>
329 + </td></tr>
330 + <?php }
331 +
332 + ?>
333 +
334 + </table>
335 +
336 + </form>
337 + </div><!--end sf-wrap-->
338 + </div><!--end wrap-->
339 +
340 +<?php
341 +}
342 +?>
332 343
333 -
334 -}
344 +<?php
335 345 //**** user management
336 346 if ($active_tab == 'user_management' ) {
337 347 $group = 'all' ;
338 348 pg_user_management($group) ;
339 349 }
350 +?>
340 351
352 +<?php
341 353 //**** Help
342 354 if ($active_tab == 'help' ) {
343 355 pg_help();
344 356 }
357 +?>
345 358
346 -//**** Plugin Info
347 -if ($active_tab == 'plugin-info' ) {
348 -pg_plugin_info();
349 -}
350 -
359 +<?php
351 360 //**** role assignment
352 361 if ($active_tab == 'role_assignment' ) {
353 362 pg_role_assignment() ;
354 363 }
355 -
356 -//**** disable Groups
357 -if ($active_tab == 'disable_groups' ) {
358 -rpg_disable_groups() ;
364 +//end of tab function
359 365 }
360 366
361 367
362 -//**** widget warning
363 -if ($active_tab == 'widget_warning' ) {
364 -pg_widget_warning() ;
365 -}
366 368
367 -//**** shortcode warning
368 -if ($active_tab == 'shortcode_warning' ) {
369 -pg_shortcode_warning() ;
370 -}
371 369
372 -//**** topic permissions
373 -if ($active_tab == 'topic_permissions' ) {
374 -rpg_topic_permissions() ;
375 -}
376 370
377 -//**** topic permissions
378 -if ($active_tab == 'programmershelp' ) {
379 -rpg_programmers_help() ;
380 -}
381 371
382 -//end of tab function
383 -}
384 372
385 -
386 373 // register the plugin settings
387 374 function rpg_register_settings() {
388 375
389 376 register_setting( 'rpg_forum_settings', 'rpg_settingsf' );
@@ -389,20 +376,16 @@
389 376 register_setting( 'rpg_forum_settings', 'rpg_settingsf' );
390 377 register_setting( 'rpg_general_settings', 'rpg_settingsg' );
391 378 register_setting( 'rpg_group_settings', 'rpg_groups' );
392 379 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 380 }
396 -
397 381 //call register settings function
398 382 add_action( 'admin_init', 'rpg_register_settings' );
399 383
400 384 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');
385 +
403 386 // 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');
387 + 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 388 }
406 389 add_action('admin_menu', 'rpg_settings_menu');
407 390
408 391 /***************************** Checkbox functions **************************/
@@ -407,51 +390,34 @@
407 390
408 391 /***************************** Checkbox functions **************************/
409 392 function activate_forum_visibility_checkbox() {
410 393 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') ;
394 + $item5 = $rpg_settingsf['set_forum_visibility'] ;
395 + 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 396 }
416 397 function freshness_checkbox() {
417 398 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' );
399 + $item4 = $rpg_settingsf['set_freshness_message'] ;
400 + 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 401 }
423 402
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 403 function activate_hide_counts_checkbox() {
432 404 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' );
405 + $item1 = $rpg_settingsg['hide_counts'] ;
406 + 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 407 }
438 408 function activate_descriptions_checkbox() {
439 409 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' );
410 + $item2 = $rpg_settingsg['activate_descriptions'] ;
411 + 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 412 }
445 413 function activate_private_prefix_checkbox() {
446 414 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' );
415 + $item3 = $rpg_settingsg['activate_remove_private_prefix'] ;
416 + 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 417 }
452 418 function activate_new_group() {
453 419 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 - }
420 + $item6 = $rpg_groups['activate_new_group'] ;
421 + 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' ;
422 + }
423 +