PluginProbe
wpForo Forum / 1.4.1
wpForo Forum v1.4.1
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.4.1, at wpf-admin/options-tabs/members.php

145 lines 11.4 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_home_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_home_url() ?>profile/<b style="color: #4093bf">USER_NICENAME</b>/</label>
26 </td>
27 </tr>
28 <tr>
29 <th><label><?php _e('Members Search Type', 'wpforo'); ?>:</label></label></th>
30 <td>
31 <div class="wpf-switch-field">
32 <input type="radio" value="search" name="wpforo_member_options[search_type]" id="wpf_new_topic_notify_search" <?php wpfo_check($wpforo->member->options['search_type'], 'search'); ?>><label for="wpf_new_topic_notify_search"><?php _e('Search', 'wpforo'); ?></label> &nbsp;
33 <input type="radio" value="filter" name="wpforo_member_options[search_type]" id="wpf_new_topic_notify_filter" <?php wpfo_check($wpforo->member->options['search_type'], 'filter'); ?>><label for="wpf_new_topic_notify_filter"><?php _e('Filter', 'wpforo'); ?></label>
34 </div>
35 </td>
36 </tr>
37 <tr>
38 <th>
39 <label><?php _e('Custom Authorization URLs', 'wpforo'); ?>:</label>
40 <p class="wpf-info">
41 <?php _e('Use this option only if you have set other pages for authorization.
42 wpForo doesn\'t change its own URLs, these options are only for other plugin compatibility.
43 For example, if you use BuddyPress or Ultimate Member plugin you can set these values:', 'wpforo'); ?><br />
44 <?php _e('Login URL', 'wpforo'); ?>: <strong>/login/</strong><br />
45 <?php _e('Register URL', 'wpforo'); ?>: <strong>/register/</strong><br />
46 </p>
47 </th>
48 <td>
49 <ul>
50 <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>
51 <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>
52 <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>
53 </ul>
54 </td>
55 </tr>
56 <tr>
57 <th colspan="2">
58 <h3 style="font-weight:400; padding:5px 0px 10px 0px; margin:0px;"><?php _e('Member Reputation and Titles', 'wpforo'); ?></h3>
59 </th>
60 </tr>
61 <tr>
62 <th><label><?php _e('Default title', 'wpforo'); ?>:</label></th>
63 <td>
64 <input class="wpf-field-small" type="text" name="wpforo_member_options[default_title]" value="<?php wpfo($wpforo->member->options['default_title']) ?>" />
65 </td>
66 </tr>
67 <tr>
68 <td colspan="2" style="padding:5px 0px 0px 0px;">
69 <table width="100%" border="0" cellspacing="0" cellpadding="0" id="wpf-rating-table">
70 <tbody>
71 <tr>
72 <th style="width:10%;"><?php _e('Rating Level', 'wpforo'); ?></th>
73 <th style="width:15%;"><?php _e('Min Number of Posts', 'wpforo'); ?></th>
74 <th style="width:25%;"><?php _e('Member Title', 'wpforo'); ?></th>
75 <th style="text-align:center;width:10%;"><?php _e('Short Badge', 'wpforo'); ?></th>
76 <th style="text-align:center;width:10%;"><?php _e('Full Badge', 'wpforo'); ?></th>
77 <th style="text-align:center;width:10%;"><?php _e('Rating Color', 'wpforo'); ?></th>
78 <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>
79 </tr>
80 <?php $levels = $wpforo->member->levels(); ?>
81 <?php foreach( $levels as $level ): ?>
82 <tr>
83 <td><h4><?php _e('Level', 'wpforo'); ?> <?php echo esc_html($level) ?></h4></td>
84 <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>
85 <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>
86 <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>
87 <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>
88 <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>
89 <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>
90 </tr>
91 <?php endforeach; ?>
92 <?php $ugroups = $wpforo->usergroup->usergroup_list_data(); ?>
93 <tr>
94 <td colspan="3">
95 <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>
96 <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>
97 </td>
98 <td colspan="4">
99 <?php
100 foreach($ugroups as $ugroup){
101 $value = ( isset($wpforo->member->options['rating_title_ug'][$ugroup['groupid']]) ) ? $wpforo->member->options['rating_title_ug'][$ugroup['groupid']] : 0;
102 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>';
103 }
104 ?>
105 </td>
106 </tr>
107 <tr>
108 <td colspan="3">
109 <label style="text-transform:none;font-size: 14px; font-weight: 500; line-height:20px;"><?php _e('Enable Reputation Badges for selected usergroups', 'wpforo'); ?></label>
110 <p class="wpf-info"><?php _e('This option depends on "Enable Member Rating" parent option, witch located in wpForo Settings > Features Tab', 'wpforo'); ?></p>
111 </td>
112 <td colspan="4">
113 <?php
114 foreach($ugroups as $ugroup){
115 $value = ( isset($wpforo->member->options['rating_badge_ug'][$ugroup['groupid']]) ) ? $wpforo->member->options['rating_badge_ug'][$ugroup['groupid']] : 0;
116 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>';
117 }
118 ?>
119 </td>
120 </tr>
121 <tr>
122 <td colspan="3">
123 <label style="text-transform:none;font-size: 14px; font-weight: 500; line-height:20px;"><?php _e('Display Usergroup under Post Author Avatar', 'wpforo'); ?></label>
124 </td>
125 <td colspan="4">
126 <?php
127 foreach($ugroups as $ugroup){
128 $value = ( isset($wpforo->member->options['title_usergroup'][$ugroup['groupid']]) ) ? $wpforo->member->options['title_usergroup'][$ugroup['groupid']] : 0;
129 echo '<label style="display:inline-block; text-align:center;"><input name="wpforo_member_options[title_usergroup]['.intval($ugroup['groupid']).']" value="1" type="checkbox" ' . wpfo_check(1, $value, 'checked', false) . ' /> '.esc_html($ugroup['name']).'</label>';
130 }
131 ?>
132 </td>
133 </tr>
134 </tbody>
135 </table>
136
137 </td>
138 </tr>
139 <?php do_action( 'wpforo_settings_members_bottom', $wpforo ); ?>
140 </tbody>
141 </table>
142 <div class="wpforo_settings_foot">
143 <input type="submit" class="button button-primary" value="<?php _e('Update Options', 'wpforo'); ?>" />
144 </div>
145 </form>