PluginProbe
wpForo Forum / 1.1.0
wpForo Forum v1.1.0
3.1.6 3.1.5 3.1.4 3.1.2 3.1.1 3.1.0 3.0.9 3.0.8 3.0.7 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.1.1 1.1.2 1.2.0 1.3.0 1.3.1 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 All 138 releases
wpforo / wpf-admin / options-tabs / members.php

members.php in wpForo Forum 1.1.0, at wpf-admin/options-tabs/members.php

117 lines 9.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // Exit if accessed directly
3 if( !defined( 'ABSPATH' ) ) exit;
4 if( !current_user_can('administrator') ) exit;
5 ?>
6
7 <form action="" method="POST" class="validate">
8 <?php wp_nonce_field( 'wpforo-settings-members' ); ?>
9 <table class="wpforo_settings_table">
10 <tbody>
11 <?php do_action( 'wpforo_settings_members_top', $wpforo ); ?>
12 <tr>
13 <th><label><?php _e('Online status timeout', 'wpforo'); ?>:</label></th>
14 <td>
15 <?php $online_timeout = wpfo($wpforo->member_options['online_status_timeout'], false) ?>
16 <input name="wpforo_member_options[online_status_timeout]" type="number" min="1" value="<?php echo intval($online_timeout / 60 ) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo'); ?>
17 </td>
18 </tr>
19 <tr>
20 <th><label><?php _e('Members URL structure', 'wpforo'); ?>:</label></th>
21 <td>
22 <?php $opt_id_attr = ''; $opt_nicename_attr = ''; ?>
23 <?php if( wpfo($wpforo->member_options['url_structure'], false) == 'id' ){ $opt_id_attr = 'checked="checked"'; }else{ $opt_nicename_attr = 'checked="checked"'; } ?>
24 <input id="id" type="radio" name="wpforo_member_options[url_structure]" value="id" <?php echo $opt_id_attr ?>/><label style="color: gray" for="id"><?php echo WPFORO_BASE_URL ?>profile/<b style="color: #4093bf">USER_ID</b>/</label><br/>
25 <input id="nicename" type="radio" name="wpforo_member_options[url_structure]" value="nicename" <?php echo $opt_nicename_attr ?>/><label style="color: gray" for="nicename"><?php echo WPFORO_BASE_URL ?>profile/<b style="color: #4093bf">USER_NICENAME</b>/</label>
26 </td>
27 </tr>
28 <tr>
29 <th>
30 <label><?php _e('Custom Authorization URLs', 'wpforo'); ?>:</label>
31 <p class="wpf-info">
32 <?php _e('Use this option only if you have set other pages for authorization.
33 wpForo doesn\'t change its own URLs, these options are only for other plugin compatibility.
34 For example, if you use BuddyPress or Ultimate Member plugin you can set these values:', 'wpforo'); ?><br />
35 <?php _e('Login URL', 'wpforo'); ?>: <strong>/login/</strong><br />
36 <?php _e('Register URL', 'wpforo'); ?>: <strong>/register/</strong><br />
37 </p>
38 </th>
39 <td>
40 <ul>
41 <li><?php echo trim(get_bloginfo('url'),'/'); ?><input style="width:30%;padding: 3px 10px 3px 3px; vertical-align:middle; font-size:13px" type="text" name="wpforo_member_options[login_url]" value="<?php wpfo($wpforo->member_options['login_url']) ?>" /> &nbsp;<label style="font-size:13px"><?php _e('Login URL', 'wpforo') ?></label></li>
42 <li><?php echo trim(get_bloginfo('url'),'/'); ?><input style="width:30%;padding: 3px 10px 3px 3px; vertical-align:middle; font-size:13px" type="text" name="wpforo_member_options[register_url]" value="<?php wpfo($wpforo->member_options['register_url']) ?>" /> &nbsp;<label style="font-size:13px"><?php _e('Register URL', 'wpforo') ?></label></li>
43 <li><?php echo trim(get_bloginfo('url'),'/'); ?><input style="width:30%;padding: 3px 10px 3px 3px; vertical-align:middle; font-size:13px" type="text" name="wpforo_member_options[lost_password_url]" value="<?php wpfo($wpforo->member_options['lost_password_url']) ?>" /> &nbsp;<label style="font-size:13px"><?php _e('Lost Password URL', 'wpforo') ?></label></li>
44 </ul>
45 </td>
46 </tr>
47 <tr>
48 <th colspan="2">
49 <h3 style="font-weight:400; padding:5px 0px 10px 0px; margin:0px;"><?php _e('Member Reputation', 'wpforo'); ?></h3>
50 </th>
51 </tr>
52 <tr>
53 <td colspan="2" style="padding:5px 0px 0px 0px;">
54 <table width="100%" border="0" cellspacing="0" cellpadding="0" id="wpf-rating-table">
55 <tbody>
56 <tr>
57 <th style="width:10%;"><?php _e('Rating Level', 'wpforo'); ?></th>
58 <th style="width:15%;"><?php _e('Min Number of Posts', 'wpforo'); ?></th>
59 <th style="width:25%;"><?php _e('Member Title', 'wpforo'); ?></th>
60 <th style="text-align:center;width:10%;"><?php _e('Short Badge', 'wpforo'); ?></th>
61 <th style="text-align:center;width:10%;"><?php _e('Full Badge', 'wpforo'); ?></th>
62 <th style="text-align:center;width:10%;"><?php _e('Rating Color', 'wpforo'); ?></th>
63 <th style="width:20%;"><?php _e('Rating Icon', 'wpforo'); ?> | <a href="http://fontawesome.io/icons/" target="_blank" style="text-decoration:none;"><?php _e('More', 'wpforo'); ?>&raquo;</a></th>
64 </tr>
65 <?php $levels = $wpforo->member->levels(); ?>
66 <?php foreach( $levels as $level ): ?>
67 <tr>
68 <td><h4><?php _e('Level', 'wpforo'); ?> <?php echo esc_html($level) ?></h4></td>
69 <td><input type="number" value="<?php echo $wpforo->member->rating($level, 'points') ?>" name="wpforo_member_options[rating][<?php echo esc_attr($level) ?>][points]" placeholder="<?php _e('Number of Posts', 'wpforo'); ?>"></td>
70 <td style="text-align:center;"><input type="text" value="<?php echo $wpforo->member->rating($level, 'title') ?>" name="wpforo_member_options[rating][<?php echo esc_attr($level) ?>][title]" placeholder="<?php _e('Custom Title', 'wpforo'); ?>"></td>
71 <td style="text-align:center;"><div class="wpf-badge-short wpf-badge-level-<?php echo esc_attr($level) ?>" style="background-color:<?php echo $wpforo->member->rating($level, 'color') ?>;"><?php echo $wpforo->member->rating_badge($level, 'short'); ?></div></td>
72 <td style="text-align:center;"><div class="wpf-badge-full wpf-badge-level-<?php echo esc_attr($level) ?>" style="color:<?php echo $wpforo->member->rating($level, 'color') ?>;"><?php echo $wpforo->member->rating_badge($level, 'full'); ?></div></td>
73 <td style="text-align:center;"><input type="color" value="<?php echo $wpforo->member->rating($level, 'color') ?>" name="wpforo_member_options[rating][<?php echo esc_attr($level) ?>][color]" placeholder="<?php _e('Color', 'wpforo'); ?>"></td>
74 <td><input type="text" value="<?php echo $wpforo->member->rating($level, 'icon') ?>" name="wpforo_member_options[rating][<?php echo esc_attr($level) ?>][icon]" placeholder="<?php _e('Badge Icon', 'wpforo'); ?>"></td>
75 </tr>
76 <?php endforeach; ?>
77 <?php $ugroups = $wpforo->usergroup->usergroup_list_data(); ?>
78 <tr>
79 <td colspan="3">
80 <label style="text-transform:none;font-size: 14px; font-weight: 500; line-height:20px; padding:0px;"><?php _e('Enable Reputation Titles for selected usergroups', 'wpforo'); ?></label>
81 <p class="wpf-info"><?php _e('This option depends on "Enable Member Rating" parent option, witch located in wpForo Settings > Features Tab', 'wpforo'); ?></p>
82 </td>
83 <td colspan="4">
84 <?php
85 foreach($ugroups as $ugroup){
86 $value = ( isset($wpforo->member_options['rating_title_ug'][$ugroup['groupid']]) ) ? $wpforo->member_options['rating_title_ug'][$ugroup['groupid']] : 0;
87 echo '<label style="display:inline-block; text-align:center;"><input name="wpforo_member_options[rating_title_ug]['.intval($ugroup['groupid']).']" value="1" type="checkbox" ' . wpfo_check(1, $value, 'checked', false) . ' /> '.esc_html($ugroup['name']).'</label>';
88 }
89 ?>
90 </td>
91 </tr>
92 <tr>
93 <td colspan="3">
94 <label style="text-transform:none;font-size: 14px; font-weight: 500; line-height:20px;"><?php _e('Enable Reputation Badges for selected usergroups', 'wpforo'); ?></label>
95 <p class="wpf-info"><?php _e('This option depends on "Enable Member Rating Titles" parent option, witch located in wpForo Settings > Features Tab', 'wpforo'); ?></p>
96 </td>
97 <td colspan="4">
98 <?php
99 foreach($ugroups as $ugroup){
100 $value = ( isset($wpforo->member_options['rating_badge_ug'][$ugroup['groupid']]) ) ? $wpforo->member_options['rating_badge_ug'][$ugroup['groupid']] : 0;
101 echo '<label style="display:inline-block; text-align:center;"><input name="wpforo_member_options[rating_badge_ug]['.intval($ugroup['groupid']).']" value="1" type="checkbox" ' . wpfo_check(1, $value, 'checked', false) . ' /> '.esc_html($ugroup['name']).'</label>';
102 }
103 ?>
104 </td>
105 </tr>
106 </tbody>
107 </table>
108
109 </td>
110 </tr>
111 <?php do_action( 'wpforo_settings_members_bottom', $wpforo ); ?>
112 </tbody>
113 </table>
114 <div class="wpforo_settings_foot">
115 <input type="submit" class="button button-primary" value="<?php _e('Update Options', 'wpforo'); ?>" />
116 </div>
117 </form>