wpForo Forum - Version 1.5.0

Version Description

Download this release

Release Info

Developer Tomdever
Plugin Icon 128x128 wpForo Forum
Version 1.5.0
Comparing to
See all releases

Code changes from version 1.4.13 to 1.5.0

Files changed (52) hide show
  1. readme.txt +59 -6
  2. wpf-admin/admin.php +11 -5
  3. wpf-admin/css/admin.css +2 -0
  4. wpf-admin/css/deactivation-dialog.css +55 -0
  5. wpf-admin/deactivation-dialog.php +74 -0
  6. wpf-admin/forum.php +7 -6
  7. wpf-admin/js/deactivation-dialog.js +126 -0
  8. wpf-admin/options-tabs/accesses.php +5 -2
  9. wpf-admin/options-tabs/emails.php +38 -6
  10. wpf-admin/options-tabs/features.php +34 -30
  11. wpf-admin/options-tabs/general.php +8 -7
  12. wpf-admin/options-tabs/members.php +15 -8
  13. wpf-admin/options-tabs/posts.php +8 -8
  14. wpf-admin/options-tabs/styles.php +1 -1
  15. wpf-admin/tools-tabs/misc.php +100 -3
  16. wpf-admin/usergroup.php +229 -66
  17. wpf-admin/xml/english.xml +47 -1
  18. wpf-includes/class-activity.php +300 -0
  19. wpf-includes/class-cache.php +4 -2
  20. wpf-includes/class-forms.php +1264 -0
  21. wpf-includes/class-forums.php +2 -0
  22. wpf-includes/class-members.php +862 -310
  23. wpf-includes/class-permissions.php +103 -40
  24. wpf-includes/class-posts.php +2 -3
  25. wpf-includes/class-subscribes.php +4 -0
  26. wpf-includes/class-template.php +93 -493
  27. wpf-includes/class-topics.php +25 -6
  28. wpf-includes/class-usergroups.php +178 -11
  29. wpf-includes/functions-installation.php +55 -24
  30. wpf-includes/functions-integration.php +15 -7
  31. wpf-includes/functions-template.php +51 -20
  32. wpf-includes/functions.php +142 -64
  33. wpf-includes/install-sql.php +28 -6
  34. wpf-includes/integration/buddypress.php +4 -4
  35. wpf-includes/integration/legal.php +5 -5
  36. wpf-includes/integration/ultimate-member.php +447 -0
  37. wpf-includes/wpf-actions.php +65 -37
  38. wpf-includes/wpf-hooks.php +333 -55
  39. wpf-includes/wpf-phrases.php +50 -2
  40. wpf-languages/wpforo.pot +895 -323
  41. wpf-themes/classic/.gitignore +0 -1
  42. wpf-themes/classic/colors.css +503 -0
  43. wpf-themes/classic/functions.php +15 -9
  44. wpf-themes/classic/index.php +2 -2
  45. wpf-themes/classic/integration/ultimate-member/style-rtl.css +63 -0
  46. wpf-themes/classic/integration/ultimate-member/style.css +63 -0
  47. wpf-themes/classic/profile-account.php +2 -2
  48. wpf-themes/classic/register.php +1 -1
  49. wpf-themes/classic/style-rtl.css +16 -10
  50. wpf-themes/classic/style.css +17 -10
  51. wpf-themes/classic/styles/css.php +1 -0
  52. wpforo.php +66 -9
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: gVectors Team
3
Tags: forum, forums, forum plugin, WordPress forum plugin, community, discussion
4
Requires at least: 4.1
5
Tested up to: 4.9
6
- Stable tag: 1.4.13
7
Requires PHP: 5.4 and higher
8
License: GPLv2 or later
9
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -33,14 +33,18 @@ GDPR Compliance: [https://wpforo.com/gdpr/](https://wpforo.com/gdpr/)
33
2. [**Simplified Forum Layout**](https://wpforo.com/docs/categories-and-forums/forum-layouts/simplified-layout/)
34
3. [**Question and Answer Forum Layout**](https://wpforo.com/docs/categories-and-forums/forum-layouts/question-answer-layout/)
35
36
- = Available Forum Translations =
37
38
- **Czech** , **Dutch**, **Danish**, **French**, **French**, **German**, **Hebrew**, **Japanese**, **Persian**, **Portuguese**, **Polish**, **Russian**, **Spanish** , **Spanish** , **Swedish**, **Korean**.
39
40
= FORUM FEATURES =
41
42
* Designed for small and extremely large forums/communities.
43
- * Multi-layout forum design.
44
* Super responsive forum on all kind of devices.
45
* Built-in forum SEO functions.
46
* Built-in forum Cache System.
@@ -56,9 +60,9 @@ GDPR Compliance: [https://wpforo.com/gdpr/](https://wpforo.com/gdpr/)
56
* Forum Phrase System for quick translation.
57
* WordPress .MO/.PO translation files.
58
* Tools and options for GDPR Compliance
59
- * Social Network Sahre Buttons
60
* BuddyPress Integration
61
- * Easy to migrate with [Go2wpForo](https://wpforo.com/community/migrate-to-wpforo-from-other-forum-plugins/migrate-to-wpforo-go2wpforo-tool/) tool.
62
63
= Need more forum features? =
64
@@ -152,6 +156,55 @@ Find wpForo forum plugin addons on [gVectors Team website...](https://gvectors.c
152
153
== Changelog ==
154
155
= wpForo Forum 1.4.10 - 1.4.13 | 02.06.2018 =
156
157
* Fixed: This is a not planned security update. It includes data sanitization and filtering changes.
3
Tags: forum, forums, forum plugin, WordPress forum plugin, community, discussion
4
Requires at least: 4.1
5
Tested up to: 4.9
6
+ Stable tag: 1.5.0
7
Requires PHP: 5.4 and higher
8
License: GPLv2 or later
9
License URI: https://www.gnu.org/licenses/gpl-2.0.html
33
2. [**Simplified Forum Layout**](https://wpforo.com/docs/categories-and-forums/forum-layouts/simplified-layout/)
34
3. [**Question and Answer Forum Layout**](https://wpforo.com/docs/categories-and-forums/forum-layouts/question-answer-layout/)
35
36
37
+ = Forum Integration =
38
+
39
+ wpForo forum plugin is well integrated with many Profile Builder and Membership plugins, especially with **BuddyPress** and **Ultimate Members** plugins.
40
+
41
42
= FORUM FEATURES =
43
44
* Designed for small and extremely large forums/communities.
45
+ * Migrate from other forums using [Go2wpForo](https://wpforo.com/community/migrate-to-wpforo-from-other-forum-plugins/migrate-to-wpforo-go2wpforo-tool/) tool.
46
+ * Three different forum layout and design.
47
+ * Six set of forum color styles including dark style.
48
* Super responsive forum on all kind of devices.
49
* Built-in forum SEO functions.
50
* Built-in forum Cache System.
60
* Forum Phrase System for quick translation.
61
* WordPress .MO/.PO translation files.
62
* Tools and options for GDPR Compliance
63
+ * Social Network Share Buttons
64
* BuddyPress Integration
65
+ * Ultimate Member Integration
66
67
= Need more forum features? =
68
156
157
== Changelog ==
158
159
+ = wpForo Forum 1.5.0 | 09.07.2018 =
160
+
161
+ [wpForo v1.5.0 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-5-0-is-released/)
162
+
163
+ * Added: User Role-Usergroup Synchronization
164
+ * Added: Automatically change Usergroup based on User Role
165
+ * Added: Option to set Forum Usergroup for each User Role
166
+ * Added: Supports User Role based Paid Membership Plugins
167
+ * Added: Multiple Usergroups
168
+ * Added: Secondary Usergroups
169
+ * Added: Usergroup option to set as Secondary
170
+ * Added: New permission "Can subscribe" in forum access set
171
+ * Added: New permission "Can answer own question" in forum access set
172
+ * Added: Edit post logging with date and author name
173
+ * Added: Filter hook to control content length in email notification
174
+ * Added: Filter hook to control text length in breadcrumb tabs
175
+ * Added: Option to manage New Registered User email subject and body
176
+ * Added: Admin note/message on Forum frontend (Forums > Tools > Misc)
177
+ * Added: Display top admin bar for Editors and Authors as well
178
+ * Added: Option to manage number of Members per page
179
+ * Added: Ultimate Member | Forums Menu
180
+ * Added: Ultimate Member | Profile Tab Forums > Created forum topics,
181
+ * Added: Ultimate Member | Profile Tab Forums > Posted forum replies,
182
+ * Added: Ultimate Member | Profile Tab Forums > Liked Posts,
183
+ * Added: Ultimate Member | Profile Tab Forums > Subscriptions,
184
+ * Added: Ultimate Member | Real-time notification integration,
185
+ * Added: Forum Dashboard and Forum Home links in top admin bar
186
+ * Added: Help links to documentation next to forum options labels
187
+ * Added: Plugin deactivation reason dialog
188
+ * Modified: Allow users to edit and delete own unapproved posts
189
+ * Modified: Removed quote texts in recent topic/posts excerpts
190
+ * Modified: Totally improved User profile builder functions
191
+ * Fixed Bug: Duplicate meta title for the first Topic page
192
+ * Fixed Bug: SEO issues and conflict with AIO SEO Pack plugin
193
+ * Fixed Bug: Missing topic and post pagination buttons for guests
194
+ * Fixed Bug: Wrong user information appears after login (HTML cache)
195
+ * Fixed Bug: Max upload file size bug when it's set 1MB
196
+ * Fixed Bug: Dashboard > Forums menu Banned Users indicator issue
197
+ * Fixed Bug: When forum is set as home page. Login Menu on home page adds extra domain in URL then return 404 error after login.
198
+
199
+ UPDATE NOTES:
200
+
201
+ - To load your customized colors please refresh forum front-end page twice.
202
+ - If you have a Cache Plugin, please delete all caches after wpForo update.
203
+ - If you use CDN and found some issue please purge it.
204
+ - If you have an old (1.4.2 or lower) customized copy of wpForo forum template files in your WP theme /wpforo/ folder please update them.
205
+
206
+
207
+
208
= wpForo Forum 1.4.10 - 1.4.13 | 02.06.2018 =
209
210
* Fixed: This is a not planned security update. It includes data sanitization and filtering changes.
wpf-admin/admin.php CHANGED
@@ -10,9 +10,9 @@
10
$mod_count = WPF()->post->unapproved_count(); $mod_count_num = intval($mod_count);
11
$mod_count = ( $mod_count ) ? ' <span class="awaiting-mod count-1"><span class="pending-count">' . intval($mod_count) . '</span></span> ' : '' ;
12
$ban_count = WPF()->member->banned_count(); $ban_count_num = intval($ban_count);
13
- $ban_count = ( $ban_count ) ? ' <span class="awaiting-mod count-1"><span class="pending-count">' . intval($ban_count) . '</span></span> ' : '' ;
14
- $all_count = $mod_count_num + $ban_count_num;
15
- $all_count = ( $all_count ) ? ' <span class="awaiting-mod count-1"><span class="pending-count">' . intval($all_count) . '</span></span> ' : '' ;
16
17
$position = ( isset(WPF()->general_options['menu_position']) && WPF()->general_options['menu_position'] > 0 ) ? WPF()->general_options['menu_position'] : 23;
18
if( WPF()->current_user_groupid == 1 ||
@@ -27,7 +27,7 @@
27
if( WPF()->current_user_groupid == 1 ) add_submenu_page('wpforo-community', __('Settings', 'wpforo'), __('Settings', 'wpforo'), 'read', 'wpforo-settings', 'wpforo_settings');
28
if( WPF()->current_user_groupid == 1 ) add_submenu_page('wpforo-community', __('Tools', 'wpforo'), __('Tools', 'wpforo'), 'read', 'wpforo-tools', 'wpforo_tools');
29
if( WPF()->perm->usergroup_can('aum') ) add_submenu_page('wpforo-community', __('Moderation', 'wpforo'), __('Moderation' , 'wpforo') . $mod_count, 'read', 'wpforo-moderations', 'wpforo_moderations');
30
- if( WPF()->perm->usergroup_can('vm') ) add_submenu_page('wpforo-community', __('Members', 'wpforo'), __('Members', 'wpforo'), 'read', 'wpforo-members', 'wpforo_member_menu');
31
if( WPF()->current_user_groupid == 1 ) add_submenu_page('wpforo-community', __('Usergroups', 'wpforo'), __('Usergroups', 'wpforo'), 'read', 'wpforo-usergroups', 'wpforo_usergroups_menu');
32
if( WPF()->current_user_groupid == 1 ) add_submenu_page('wpforo-community', __('Phrases', 'wpforo'), __('Phrases', 'wpforo'), 'read', 'wpforo-phrases', 'wpforo_phrases');
33
if( WPF()->current_user_groupid == 1 ) add_submenu_page('wpforo-community', __('Themes', 'wpforo'), __('Themes', 'wpforo'), 'read', 'wpforo-themes', 'wpforo_themes');
@@ -78,4 +78,10 @@
78
function wpforo_moderations(){
79
require( WPFORO_DIR . '/wpf-admin/moderation.php' );
80
}
81
- ?>
10
$mod_count = WPF()->post->unapproved_count(); $mod_count_num = intval($mod_count);
11
$mod_count = ( $mod_count ) ? ' <span class="awaiting-mod count-1"><span class="pending-count">' . intval($mod_count) . '</span></span> ' : '' ;
12
$ban_count = WPF()->member->banned_count(); $ban_count_num = intval($ban_count);
13
+ $ban_count = ( $ban_count ) ? ' <span class="awaiting-mod count-1" style="background-color:#777777;"><span class="pending-count" style="color:#ffffff;">' . intval($ban_count) . '</span></span> ' : '' ;
14
+ $all_count = $mod_count_num;
15
+ $all_count = ( $all_count ) ? ' <span class="awaiting-mod count-1"><span class="pending-count">' . intval($all_count) . '</span></span> ' : '' ;
16
17
$position = ( isset(WPF()->general_options['menu_position']) && WPF()->general_options['menu_position'] > 0 ) ? WPF()->general_options['menu_position'] : 23;
18
if( WPF()->current_user_groupid == 1 ||
27
if( WPF()->current_user_groupid == 1 ) add_submenu_page('wpforo-community', __('Settings', 'wpforo'), __('Settings', 'wpforo'), 'read', 'wpforo-settings', 'wpforo_settings');
28
if( WPF()->current_user_groupid == 1 ) add_submenu_page('wpforo-community', __('Tools', 'wpforo'), __('Tools', 'wpforo'), 'read', 'wpforo-tools', 'wpforo_tools');
29
if( WPF()->perm->usergroup_can('aum') ) add_submenu_page('wpforo-community', __('Moderation', 'wpforo'), __('Moderation' , 'wpforo') . $mod_count, 'read', 'wpforo-moderations', 'wpforo_moderations');
30
+ if( WPF()->perm->usergroup_can('vm') ) add_submenu_page('wpforo-community', __('Members', 'wpforo'), __('Members', 'wpforo') . $ban_count, 'read', 'wpforo-members', 'wpforo_member_menu');
31
if( WPF()->current_user_groupid == 1 ) add_submenu_page('wpforo-community', __('Usergroups', 'wpforo'), __('Usergroups', 'wpforo'), 'read', 'wpforo-usergroups', 'wpforo_usergroups_menu');
32
if( WPF()->current_user_groupid == 1 ) add_submenu_page('wpforo-community', __('Phrases', 'wpforo'), __('Phrases', 'wpforo'), 'read', 'wpforo-phrases', 'wpforo_phrases');
33
if( WPF()->current_user_groupid == 1 ) add_submenu_page('wpforo-community', __('Themes', 'wpforo'), __('Themes', 'wpforo'), 'read', 'wpforo-themes', 'wpforo_themes');
78
function wpforo_moderations(){
79
require( WPFORO_DIR . '/wpf-admin/moderation.php' );
80
}
81
+
82
+ function wpforo_deactivation_dialog(){
83
+ if( !get_option('wpforo_deactivation_dialog_never_show') && (strpos( wpforo_get_request_uri(), '/plugins.php' ) !== false) ){
84
+ require( WPFORO_DIR . '/wpf-admin/deactivation-dialog.php' );
85
+ }
86
+ }
87
+ add_action('admin_footer', 'wpforo_deactivation_dialog');
wpf-admin/css/admin.css CHANGED
@@ -28,6 +28,7 @@
28
#wpf-admin-wrap .wpf-dw-td-g{ width:50%; text-align:right; vertical-align:top; padding-right:10px; font-weight:bold; }
29
#wpf-admin-wrap .wpf-dw-td-value-b{ vertical-align:bottom; text-align:left; }
30
#wpf-admin-wrap .wpf-dw-td-value-p{ vertical-align:top; text-align:left; padding:5px 1px; }
31
32
33
/****************************************************/
@@ -169,6 +170,7 @@
169
170
#wpf-rating-table{ width:100%; font-size:12px; }
171
#wpf-rating-table input{ font-size:12px; height: 24px; width:100%; }
172
#wpf-rating-table i{}
173
#wpf-rating-table h4{ margin:0px; padding:0px; font-size:14px; font-weight:bold; white-space:nowrap; }
174
#wpf-rating-table .wpf-badge-short{ color:#FFFFFF; white-space:nowrap; font-size:15px; line-height:22px; font-weight:bold; text-align:center; display:inline-block; padding:2px 10px; min-width:30px;}
28
#wpf-admin-wrap .wpf-dw-td-g{ width:50%; text-align:right; vertical-align:top; padding-right:10px; font-weight:bold; }
29
#wpf-admin-wrap .wpf-dw-td-value-b{ vertical-align:bottom; text-align:left; }
30
#wpf-admin-wrap .wpf-dw-td-value-p{ vertical-align:top; text-align:left; padding:5px 1px; }
31
+ #wpf-admin-wrap label i.fa-question-circle{ padding: 0px 3px;}
32
33
34
/****************************************************/
170
171
#wpf-rating-table{ width:100%; font-size:12px; }
172
#wpf-rating-table input{ font-size:12px; height: 24px; width:100%; }
173
+ #wpf-rating-table input[type="checkbox"]{ width: 16px; height: 16px;}
174
#wpf-rating-table i{}
175
#wpf-rating-table h4{ margin:0px; padding:0px; font-size:14px; font-weight:bold; white-space:nowrap; }
176
#wpf-rating-table .wpf-badge-short{ color:#FFFFFF; white-space:nowrap; font-size:15px; line-height:22px; font-weight:bold; text-align:center; display:inline-block; padding:2px 10px; min-width:30px;}
wpf-admin/css/deactivation-dialog.css ADDED
@@ -0,0 +1,55 @@
1
+ .wpf-no-scroll{
2
+ overflow: hidden;
3
+ }
4
+ #wpf_deactivation_dialog_wrap{
5
+ display: none;
6
+ position: fixed;
7
+ z-index: 999998;
8
+ left: 0;
9
+ right: 0;
10
+ top: 0;
11
+ bottom: 0;
12
+ background: rgba(0,0,0,0.31);
13
+ }
14
+ #wpf_deactivation_dialog, #wpf_deactivation_dialog *:not(button){
15
+ -webkit-box-sizing: border-box;
16
+ box-sizing: border-box;
17
+ margin: 0;
18
+ padding: 0;
19
+ line-height: normal;
20
+ }
21
+ #wpf_deactivation_dialog {
22
+ position: fixed;
23
+ overflow: hidden;
24
+ min-width: 50%;
25
+ min-height: 50vh;
26
+ width: 50%;
27
+ left: 25%;
28
+ top: 15%;
29
+ padding: 50px;
30
+ background: white;
31
+ -webkit-box-shadow: 0 0 48px -9px rgba(0,0,0,1);
32
+ box-shadow: 0 0 48px -9px rgba(0,0,0,1);
33
+ }
34
+ #wpf_deactivation_dialog_header{
35
+ text-align: right;
36
+ }
37
+ #wpf_deactivation_dialog_close{
38
+ padding: 0 5px;
39
+ font-weight: bold;
40
+ cursor: pointer;
41
+ }
42
+
43
+ .wpforo-hidden {display: none!important;}
44
+ .wpforo-desc{font-size: 15px!important;}
45
+ .wpforo-note{color: #C74A4A!important;}
46
+ .wpforo-thankyou{font-size:15px;text-align:center;padding:20px 5%;margin:0;}
47
+ #wpf_deactivation_dialog_wrap .wpf-deactivation-reason-item {margin-bottom: 5px;}
48
+ #wpf_deactivation_dialog_wrap .wpf-deactivation-reason-item label {font-size: 14px;}
49
+ #wpf_deactivation_dialog_wrap .wpf-deactivation-reason-more-info {display: none;}
50
+ #wpf_deactivation_dialog_wrap .wpf-deactivation-reason-more-info textarea {width: 100%;margin-top: 10px;}
51
+ #wpf_deactivation_dialog_wrap .wpf-deactivation-reasons-actions {margin-top: 20px;text-align: center;}
52
+ #wpf_deactivation_dialog_wrap .wpf-loading {margin-left: 8px;}
53
+ #wpf_deactivation_dialog_wrap .wpf-deactivation-reason-desc{
54
+ padding: 15px 0;
55
+ }
wpf-admin/deactivation-dialog.php ADDED
@@ -0,0 +1,74 @@
1
+ <?php
2
+ if (!defined('ABSPATH')) {
3
+ exit();
4
+ }
5
+ ?>
6
+ <div id="wpf_deactivation_dialog_wrap">
7
+ <div id='wpf_deactivation_dialog'>
8
+ <div id="wpf_deactivation_dialog_header">
9
+ <h2 class="wpf-deactivation-reason-modal-title" style="float: left"><?php _e('Plugin Usage Feedback', 'wpforo'); ?></h2>
10
+ <button id="wpf_deactivation_dialog_close" style="float: right">X</button>
11
+ <hr style="clear: both"/>
12
+ </div>
13
+ <div class="wpf_deactivation_dialog_body">
14
+ <form method="post" action="" class="wpf-deactivation-reason-form">
15
+
16
+ <div class="wpf-deactivation-reason-desc">
17
+ <p class="wpforo-desc">
18
+ <strong><?php _e('Please let us know why you are deactivating. Choosing one of the options below you will help us make it better for you and for other users.', 'wpforo'); ?></strong>
19
+ </p>
20
+ </div>
21
+ <div class="wpf-deactivation-reasons">
22
+ <div class="wpf-deactivation-reason-item">
23
+ <input type="radio" value="I'll reactivate it later" name="wpforo_deactivation_reason" id="wpf-reactivate_later" class="wpf-deactivation-reason"/>
24
+ <label for="wpf-reactivate_later"><?php _e('I\'ll reactivate it later', 'wpforo'); ?></label>
25
+ </div>
26
+ <div class="wpf-deactivation-reason-item">
27
+ <input type="radio" value="The plugin is not working" name="wpforo_deactivation_reason" id="wpf-not_working" class="wpf-deactivation-reason"/>
28
+ <label for="wpf-not_working"><?php _e('The plugin is not working', 'wpforo'); ?></label>
29
+ <div class="wpf-deactivation-reason-more-info"><textarea class="wpf_dr_more_info" required="required" name="wpforo_deactivation_reason_desc" rows="3" placeholder="<?php _e('What kind of problems do you have?', 'wpforo'); ?>"></textarea></div>
30
+ </div>
31
+ <div class="wpf-deactivation-reason-item">
32
+ <input type="radio" value="It's not what I was looking for" name="wpforo_deactivation_reason" id="wpf-not_what_i_looking_for" class="wpf-deactivation-reason"/>
33
+ <label for="wpf-not_what_i_looking_for"><?php _e('It\'s not what I was looking for', 'wpforo'); ?></label>
34
+ </div>
35
+ <div class="wpf-deactivation-reason-item">
36
+ <input type="radio" value="I couldn't understand how to make it work" name="wpforo_deactivation_reason" id="wpf-how_to_make_it_work" class="wpf-deactivation-reason"/>
37
+ <label for="wpf-how_to_make_it_work"><?php _e('I couldn\'t understand how to make it work', 'wpforo'); ?></label>
38
+ <div class="wpf-deactivation-reason-more-info"><textarea class="wpf_dr_more_info" required="required" name="wpforo_deactivation_reason_desc" rows="3" placeholder="<?php _e('What type of features you want to be in the plugin?', 'wpforo'); ?>"></textarea></div>
39
+ </div>
40
+ <div class="wpf-deactivation-reason-item">
41
+ <input type="radio" value="The plugin is great, but I need specific features" name="wpforo_deactivation_reason" id="wpf-need_specific_features" class="wpf-deactivation-reason"/>
42
+ <label for="wpf-need_specific_features"><?php _e('The plugin is great, but I need specific features', 'wpforo'); ?></label>
43
+ <div class="wpf-deactivation-reason-more-info"><textarea class="wpf_dr_more_info" required="required" name="wpforo_deactivation_reason_desc" rows="3" placeholder="<?php _e('What type of features you want to be in the plugin?', 'wpforo'); ?>"></textarea></div>
44
+ </div>
45
+ <div class="wpf-deactivation-reason-item">
46
+ <input type="radio" value="I didn't like plugin design" name="wpforo_deactivation_reason" id="wpf-did_not_like_design" class="wpf-deactivation-reason"/>
47
+ <label for="wpf-did_not_like_design"><?php _e('I didn\'t like plugin design', 'wpforo'); ?></label>
48
+ <div class="wpf-deactivation-reason-more-info"><textarea class="wpf_dr_more_info" required="required" name="wpforo_deactivation_reason_desc" rows="3" placeholder="<?php _e('What part of design you don\'t like or want to change?', 'wpforo'); ?>"></textarea></div>
49
+ </div>
50
+ <div class="wpf-deactivation-reason-item">
51
+ <input type="radio" value="The plugin works very slow" name="wpforo_deactivation_reason" id="wpf-works_very_slow" class="wpf-deactivation-reason"/>
52
+ <label for="wpf-works_very_slow"><?php _e('The plugin works very slow', 'wpforo'); ?></label>
53
+ <div class="wpf-deactivation-reason-more-info"><textarea class="wpf_dr_more_info" required="required" name="wpforo_deactivation_reason_desc" rows="3" placeholder="<?php _e('Could you please describe which features of the plugin slows down your website?', 'wpforo'); ?>"></textarea></div>
54
+ </div>
55
+ <div class="wpf-deactivation-reason-item">
56
+ <input type="radio" value="I found a better plugin" name="wpforo_deactivation_reason" id="wpf-found_better" class="wpf-deactivation-reason"/>
57
+ <label for="wpf-found_better"><?php _e('I found a better plugin', 'wpforo'); ?></label>
58
+ <div class="wpf-deactivation-reason-more-info"><textarea class="wpf_dr_more_info" required="required" name="wpforo_deactivation_reason_desc" rows="3" placeholder="<?php _e('Please provide a plugin name or URL', 'wpforo'); ?>"></textarea></div>
59
+ </div>
60
+ <div class="wpf-deactivation-reason-item">
61
+ <input type="radio" value="Other" name="wpforo_deactivation_reason" id="wpf-other" class="wpf-deactivation-reason"/>
62
+ <label for="wpf-other"><?php _e('Other', 'wpforo'); ?></label>
63
+ <div class="wpf-deactivation-reason-more-info"><textarea class="wpf_dr_more_info" name="wpforo_deactivation_reason_desc" rows="3" placeholder="<?php _e('Please provide more information', 'wpforo'); ?>"></textarea></div>
64
+ </div>
65
+ </div>
66
+ <div class="wpf-deactivation-reasons-actions">
67
+ <button type="button" class="button button-secondary wpf-dismiss wpf-deactivate"><?php _e('Dismiss and never show again', 'wpforo'); ?></button>
68
+ <button type="button" class="button button-primary wpf-submit wpf-deactivate"><?php _e('Submit &amp; Deactivate'); ?><i class="fas fa-pulse fa-spinner wpf-loading wpforo-hidden"></i></button>
69
+ </div>
70
+ </form>
71
+ <h2 class="wpforo-thankyou wpforo-hidden"><?php _e('Thank you for your feedback!', 'wpforo'); ?></h2>
72
+ </div>
73
+ </div>
74
+ </div>
wpf-admin/forum.php CHANGED
@@ -40,7 +40,7 @@
40
<div id="wpf-admin-wrap" class="wrap">
41
42
<h2 style="padding:30px 0px 10px 0px; line-height: 20px;">
43
- <?php _e('Categories and Forums', 'wpforo'); ?> &nbsp;
44
<a href="<?php echo admin_url( 'admin.php?page=wpforo-forums&action=add' ) ?>" class="add-new-h2"><?php _e('Add New', 'wpforo'); ?></a>
45
</h2>
46
@@ -50,7 +50,8 @@
50
<?php if( !isset($_GET['action'])) : ?>
51
<?php if(WPF()->perm->usergroup_can('ef')): ?>
52
53
- <div class="wpf-info-bar" style="line-height: 1em; clear:both; padding: 5px 30px; font-size:15px; display:block; box-shadow:none; margin: 20px 0 10px 0; font-style: italic; background: #FFFFC6; width:90%;">
54
<ul style="list-style-type: disc; line-height:18px;">
55
<li style="list-style:none; margin-left:-17px; font-style:normal; font-weight:bold;"><i class="fas fa-info-circle" aria-hidden="true"></i>&nbsp; <?php _e('Important Tips', 'wpforo'); ?></li>
56
<li><?php _e('Please drag and drop forum panels to set parent-child hierarchy.', 'wpforo'); ?></li>
@@ -126,7 +127,7 @@
126
127
<div id="forum_cat" class="postbox">
128
<div class="handlediv" title="Click to toggle"><br></div>
129
- <h3 class="hndle"><span><?php _e('Forum Options', 'wpforo'); ?></span></h3>
130
<div class="inside">
131
<div class="form-field">
132
<p><strong><?php _e('Parent Forum', 'wpforo'); ?></strong></p>
@@ -172,7 +173,7 @@
172
173
<div id="forum_permissions" class="postbox">
174
<div class="handlediv" title="Click to toggle"><br></div>
175
- <h3 class="hndle"><span>Forum Permissions</span></h3>
176
<div class="inside">
177
<table>
178
<?php WPF()->forum->permissions(); ?>
@@ -188,7 +189,7 @@
188
189
<div id="forum_slug" class="postbox">
190
<div class="handlediv" title="Click to toggle"><br></div>
191
- <h3 class="hndle"><span><?php _e('Forum Slug', 'wpforo'); ?></span></h3>
192
<div class="inside">
193
<input name="forum[slug]" type="text" value="<?php echo esc_attr(isset($data['slug']) ? $data['slug'] : '') ?>" size="40" />
194
<p><?php _e('The "slug" is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.', 'wpforo'); ?> </p><br />
@@ -197,7 +198,7 @@
197
198
<div id="forum_icon" class="postbox">
199
<div class="handlediv" title="Click to toggle"><br></div>
200
- <h3 class="hndle"><span><?php _e('Forum Icon', 'wpforo'); ?></span></h3>
201
<div class="inside" style="padding-top:10px;">
202
<div class="form-field">
203
<label for="tag-icon" style="display:block; padding-bottom:5px;"><?php _e('Font-awesome Icon', 'wpforo'); ?>:</label>
40
<div id="wpf-admin-wrap" class="wrap">
41
42
<h2 style="padding:30px 0px 10px 0px; line-height: 20px;">
43
+ <?php _e('Categories and Forums', 'wpforo'); ?> &nbsp;
44
<a href="<?php echo admin_url( 'admin.php?page=wpforo-forums&action=add' ) ?>" class="add-new-h2"><?php _e('Add New', 'wpforo'); ?></a>
45
</h2>
46
50
<?php if( !isset($_GET['action'])) : ?>
51
<?php if(WPF()->perm->usergroup_can('ef')): ?>
52
53
+ <div class="wpf-info-bar" style="line-height: 1em; clear:both; padding: 5px 30px; font-size:15px; display:block; box-shadow:none; margin: 20px 0 10px 0; font-style: italic; background: #FFFFC6; width:90%; position: relative;">
54
+ <a href="https://wpforo.com/docs/root/categories-and-forums/forum-manager/" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank" style="font-size: 16px; position: absolute; right: 15px; top: 15px;"><i class="far fa-question-circle"></i></a>
55
<ul style="list-style-type: disc; line-height:18px;">
56
<li style="list-style:none; margin-left:-17px; font-style:normal; font-weight:bold;"><i class="fas fa-info-circle" aria-hidden="true"></i>&nbsp; <?php _e('Important Tips', 'wpforo'); ?></li>
57
<li><?php _e('Please drag and drop forum panels to set parent-child hierarchy.', 'wpforo'); ?></li>
127
128
<div id="forum_cat" class="postbox">
129
<div class="handlediv" title="Click to toggle"><br></div>
130
+ <h3 class="hndle"><span><?php _e('Forum Options', 'wpforo'); ?> &nbsp;<a href="https://wpforo.com/docs/root/categories-and-forums/forum-manager/add-new-forum/#forum-options" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank" style="font-size: 14px;"><i class="far fa-question-circle"></i></a></span></h3>
131
<div class="inside">
132
<div class="form-field">
133
<p><strong><?php _e('Parent Forum', 'wpforo'); ?></strong></p>
173
174
<div id="forum_permissions" class="postbox">
175
<div class="handlediv" title="Click to toggle"><br></div>
176
+ <h3 class="hndle"><span><?php _e('Forum Permissions', 'wpforo'); ?> &nbsp;<a href="https://wpforo.com/docs/root/categories-and-forums/forum-manager/add-new-forum/#forum-permissions" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank" style="font-size: 14px;"><i class="far fa-question-circle"></i></a></span></h3>
177
<div class="inside">
178
<table>
179
<?php WPF()->forum->permissions(); ?>
189
190
<div id="forum_slug" class="postbox">
191
<div class="handlediv" title="Click to toggle"><br></div>
192
+ <h3 class="hndle"><span><?php _e('Forum Slug', 'wpforo'); ?> &nbsp;<a href="https://wpforo.com/docs/root/categories-and-forums/forum-manager/add-new-forum/#forum-slug" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank" style="font-size: 14px;"><i class="far fa-question-circle"></i></a></span></h3>
193
<div class="inside">
194
<input name="forum[slug]" type="text" value="<?php echo esc_attr(isset($data['slug']) ? $data['slug'] : '') ?>" size="40" />
195
<p><?php _e('The "slug" is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.', 'wpforo'); ?> </p><br />
198
199
<div id="forum_icon" class="postbox">
200
<div class="handlediv" title="Click to toggle"><br></div>
201
+ <h3 class="hndle"><span><?php _e('Forum Icon', 'wpforo'); ?> &nbsp;<a href="https://wpforo.com/docs/root/categories-and-forums/forum-manager/add-new-forum/#forum-icon" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank" style="font-size: 14px;"><i class="far fa-question-circle"></i></a></span></h3>
202
<div class="inside" style="padding-top:10px;">
203
<div class="form-field">
204
<label for="tag-icon" style="display:block; padding-bottom:5px;"><?php _e('Font-awesome Icon', 'wpforo'); ?>:</label>
wpf-admin/js/deactivation-dialog.js ADDED
@@ -0,0 +1,126 @@
1
+ jQuery(document).ready(function ($) {
2
+ var dialog = $("#wpf_deactivation_dialog_wrap");
3
+
4
+ var deactivateUrl = '';
5
+
6
+ $(document).delegate('#the-list tr[data-plugin="wpforo/wpforo.php"] .deactivate a, #the-list tr[data-plugin="wpforo/wpforo.php"] a.wpforo-uninstall', 'click', function (e) {
7
+ e.preventDefault();
8
+ dialog.fadeIn( 400, "linear" );
9
+ $('body').addClass('wpf-no-scroll');
10
+ deactivateUrl = $(this).attr('href');
11
+ return false;
12
+ });
13
+
14
+ $(document).on("click", "#wpf_deactivation_dialog_wrap #wpf_deactivation_dialog_close", function () {
15
+ if( dialog.is(':visible') ){
16
+ $('body').removeClass('wpf-no-scroll');
17
+ dialog.fadeOut( 50, "linear" );
18
+ }
19
+ });
20
+
21
+ $(document).on("keydown", dialog, function (e) {
22
+ if( dialog.is(':visible') ) {
23
+ var keycode = e.which;
24
+ if (keycode === 27){
25
+ $('body').removeClass('wpf-no-scroll');
26
+ dialog.fadeOut(50, "linear");
27
+ }
28
+ }
29
+ });
30
+
31
+ var parentItem = $('.wpf-deactivation-reason:checked').parents('.wpf-deactivation-reason-item');
32
+ $('.wpf-deactivation-reason-more-info').slideUp(500);
33
+ $('.wpf-deactivation-reason-more-info', parentItem).slideDown(500);
34
+
35
+ $(document).delegate('.wpf-deactivation-reason', 'change', function (e) {
36
+ $('.wpf-deactivation-reason-more-info').slideUp(500);
37
+ var parentItem = $(this).parents('.wpf-deactivation-reason-item');
38
+ $('.wpf-deactivation-reason-more-info', parentItem).slideDown(500);
39
+ });
40
+
41
+ $(document).delegate('.wpf-deactivate', 'click', function (e) {
42
+ if (isChecked($(this))) {
43
+ var formData = '';
44
+ if ($(this).hasClass('wpf-submit')) {
45
+ var checkedItem = $('.wpf-deactivation-reason:checked');
46
+ var parentItem = checkedItem.parents('.wpf-deactivation-reason-item');
47
+ var reasonDesc = $('.wpf_dr_more_info', parentItem);
48
+ var isValid = true;
49
+
50
+ if (reasonDesc.length && reasonDesc.is(':visible')) {
51
+ var attr = reasonDesc.attr('required');
52
+ if (typeof attr !== typeof undefined && attr !== false) {
53
+ if ($.trim(reasonDesc.val().length) == 0) {
54
+ isValid = false;
55
+ }
56
+ }
57
+ }
58
+
59
+ if (isValid) {
60
+ formData = 'deactivation_reason=' + checkedItem.val();
61
+ if (reasonDesc.length && $.trim(reasonDesc.val().length) > 0) {
62
+ formData += '&deactivation_reason_desc=' + reasonDesc.val();
63
+ }
64
+ $('.wpf-loading', this).toggleClass('wpforo-hidden');
65
+ } else {
66
+ alert(wpforo_deactivation_obj.msgReasonDescRequired);
67
+ return false;
68
+ }
69
+ } else {
70
+ formData = 'never_show=1';
71
+ }
72
+
73
+ if (formData) {
74
+ $.ajax({
75
+ type: 'POST',
76
+ url: ajaxurl,
77
+ data: {
78
+ action: 'wpforo_deactivate',
79
+ deactivateData: formData
80
+ }
81
+ }).done(function (response) {
82
+ try {
83
+ var r = $.parseJSON(response);
84
+ var locHref = deactivateUrl ? wpforo_deactivation_obj.adminUrl + deactivateUrl : location.href;
85
+ if (r.code == 'dismiss_and_deactivate') {
86
+ setTimeout(function () {
87
+ location.href = locHref;
88
+ }, 100);
89
+ } else if (r.code == 'send_and_deactivate') {
90
+ $('.wpf-deactivation-reason-form, .wpforo-thankyou').toggleClass('wpforo-hidden');
91
+ setTimeout(function () {
92
+ location.href = locHref;
93
+ }, 1000);
94
+ }
95
+ } catch (e) {
96
+ console.log(e);
97
+ }
98
+ });
99
+ }
100
+ } else {
101
+ alert(wpforo_deactivation_obj.msgReasonRequired);
102
+ }
103
+ });
104
+
105
+ function isChecked(btn) {
106
+ if (btn.hasClass('wpf-submit')) {
107
+ var elem = $('.wpf-deactivation-reason-form input[name="wpforo_deactivation_reason"]');
108
+ for (var i = 0; i < elem.length; i++) {
109
+ if (elem[i].type == 'radio' && elem[i].checked) {
110
+ return true;
111
+ }
112
+ }
113
+ return false;
114
+ }
115
+ return true;
116
+ }
117
+
118
+ function isValid() {
119
+ if ($('.wpf_dr_more_info').is(':visible')) {
120
+ return $.trim($('.wpf_dr_more_info:visible').length);
121
+ } else {
122
+ return true;
123
+ }
124
+ }
125
+
126
+ });
wpf-admin/options-tabs/accesses.php CHANGED
@@ -12,10 +12,13 @@
12
<?php if( !isset($_GET['action']) ): ?>
13
<?php $accesses = WPF()->perm->get_accesses() ?>
14
<h2 style="margin-top:0px; margin-bottom:20px;"><a href="?page=wpforo-settings&tab=accesses&action=add" class="add-new-h2"><?php _e('Add New Forum Access', 'wpforo'); ?></a></h2>
15
- <table id="usergroup_table" class="wp-list-table widefat fixed posts" cellspacing="0">
16
<thead>
17
<tr>
18
- <th scope="col" id="title" class="manage-column column-title sorted desc" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e('Access names', 'wpforo'); ?></span></th>
19
</tr>
20
</thead>
21
<tbody id="the-list">
12
<?php if( !isset($_GET['action']) ): ?>
13
<?php $accesses = WPF()->perm->get_accesses() ?>
14
<h2 style="margin-top:0px; margin-bottom:20px;"><a href="?page=wpforo-settings&tab=accesses&action=add" class="add-new-h2"><?php _e('Add New Forum Access', 'wpforo'); ?></a></h2>
15
+ <table id="usergroup_table" class="wp-list-table widefat fixed posts" cellspacing="0" style="max-width: 900px;">
16
<thead>
17
<tr>
18
+ <th scope="col" id="title" class="manage-column column-title sorted desc" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;">
19
+ <label><?php _e('Access names', 'wpforo'); ?><a href="https://wpforo.com/docs/root/wpforo-settings/forum-accesses/" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank" style="display: inline;"><i class="far fa-question-circle"></i></a></label>
20
+ <p class="wpf-info"><?php _e('Forum Accesses are designed to do a Forum specific user permission control. These are set of permissions which are attached to certain Usergeoup in each forum. Thus users can have different permissions in different forums based on their Usergroup.', 'wpforo'); ?></p>
21
+ </th>
22
</tr>
23
</thead>
24
<tbody id="the-list">
wpf-admin/options-tabs/emails.php CHANGED
@@ -9,23 +9,23 @@
9
<table class="wpforo_settings_table">
10
<tbody>
11
<tr>
12
- <th style="width:40%"><label for="from_name"><?php _e('FROM Name', 'wpforo'); ?>:</label></th>
13
<td><input id="from_name" name="wpforo_subscribe_options[from_name]" type="text" value="<?php wpfo(WPF()->sbscrb->options['from_name']); ?>" required></td>
14
</tr>
15
<tr>
16
- <th><label for="from_email"><?php _e('FROM Email Address', 'wpforo'); ?>:</label></th>
17
<td><input id="from_email" name="wpforo_subscribe_options[from_email]" type="text" value="<?php wpfo(WPF()->sbscrb->options['from_email']); ?>" required /></td>
18
</tr>
19
<tr>
20
<th>
21
- <label for="admin_emails"><?php _e('Forum Admins email addresses', 'wpforo'); ?>:</label>
22
<p class="wpf-info"><?php _e('Comma separated email addresses of forum administrators to get forum notifications. For example post report messages.', 'wpforo') ?></p>
23
</th>
24
<td><input id="admin_emails" name="wpforo_subscribe_options[admin_emails]" type="text" value="<?php wpfo(WPF()->sbscrb->options['admin_emails']); ?>" required /></td>
25
</tr>
26
<tr>
27
<th>
28
- <label><?php _e('Notify Admins via email on new Topic', 'wpforo'); ?>:</label>
29
<p class="wpf-info"><?php _e('Send Notification emails to all email addresses (comma separated ) of forum administrators when a new Topic is created.', 'wpforo') ?></p>
30
</th>
31
<td>
@@ -37,7 +37,7 @@
37
</tr>
38
<tr>
39
<th>
40
- <label><?php _e('Notify Admins via email on new Post', 'wpforo'); ?>:</label>
41
<p class="wpf-info"><?php _e('Send Notification emails to all email addresses (comma separated ) of forum administrators when a new Reply is created.', 'wpforo') ?></p>
42
</th>
43
<td>
@@ -49,7 +49,7 @@
49
</tr>
50
<tr>
51
<td colspan="2" style="border-bottom:2px solid #ddd;">
52
- <h3 style="font-weight:400; padding:10px 0 0 0; margin:0;"><?php _e('Subscription Emails', 'wpforo'); ?></h3>
53
</td>
54
</tr>
55
<tr>
@@ -92,6 +92,38 @@
92
<th><label for="report_email_message"><?php _e('Report message body', 'wpforo'); ?>:</label></th>
93
<td><textarea id="report_email_message" style="height:190px;" name="wpforo_subscribe_options[report_email_message]" required><?php wpfo(WPF()->sbscrb->options['report_email_message'], true, 'esc_textarea'); ?></textarea></td>
94
</tr>
95
<tr>
96
<td colspan="2" style="border-bottom:2px solid #ddd;">
97
<h3 style="font-weight:400; padding:10px 0 0 0; margin:0;"><?php _e('Reset Password Emails', 'wpforo'); ?></h3>
9
<table class="wpforo_settings_table">
10
<tbody>
11
<tr>
12
+ <th style="width:40%"><label for="from_name"><?php _e('FROM Name', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/emails-settings/" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label></th>
13
<td><input id="from_name" name="wpforo_subscribe_options[from_name]" type="text" value="<?php wpfo(WPF()->sbscrb->options['from_name']); ?>" required></td>
14
</tr>
15
<tr>
16
+ <th><label for="from_email"><?php _e('FROM Email Address', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/emails-settings/" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label></th>
17
<td><input id="from_email" name="wpforo_subscribe_options[from_email]" type="text" value="<?php wpfo(WPF()->sbscrb->options['from_email']); ?>" required /></td>
18
</tr>
19
<tr>
20
<th>
21
+ <label for="admin_emails"><?php _e('Forum Admins email addresses', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/emails-settings/#admin-emails" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label>
22
<p class="wpf-info"><?php _e('Comma separated email addresses of forum administrators to get forum notifications. For example post report messages.', 'wpforo') ?></p>
23
</th>
24
<td><input id="admin_emails" name="wpforo_subscribe_options[admin_emails]" type="text" value="<?php wpfo(WPF()->sbscrb->options['admin_emails']); ?>" required /></td>
25
</tr>
26
<tr>
27
<th>
28
+ <label><?php _e('Notify Admins via email on new Topic', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/emails-settings/#admin-notification" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label>
29
<p class="wpf-info"><?php _e('Send Notification emails to all email addresses (comma separated ) of forum administrators when a new Topic is created.', 'wpforo') ?></p>
30
</th>
31
<td>
37
</tr>
38
<tr>
39
<th>
40
+ <label><?php _e('Notify Admins via email on new Post', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/emails-settings/#admin-notification" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label>
41
<p class="wpf-info"><?php _e('Send Notification emails to all email addresses (comma separated ) of forum administrators when a new Reply is created.', 'wpforo') ?></p>
42
</th>
43
<td>
49
</tr>
50
<tr>
51
<td colspan="2" style="border-bottom:2px solid #ddd;">
52
+ <h3 style="font-weight:400; padding:10px 0 0 0; margin:0;"><?php _e('Subscription Emails', 'wpforo'); ?> &nbsp;<a href="https://wpforo.com/docs/root/wpforo-settings/emails-settings/#email-templates" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank" style="font-size: 14px;"><i class="far fa-question-circle"></i></a></h3>
53
</td>
54
</tr>
55
<tr>
92
<th><label for="report_email_message"><?php _e('Report message body', 'wpforo'); ?>:</label></th>
93
<td><textarea id="report_email_message" style="height:190px;" name="wpforo_subscribe_options[report_email_message]" required><?php wpfo(WPF()->sbscrb->options['report_email_message'], true, 'esc_textarea'); ?></textarea></td>
94
</tr>
95
+ <tr>
96
+ <td colspan="2" style="border-bottom:2px solid #ddd;">
97
+ <h3 style="font-weight:400; padding:10px 0 0 0; margin:0;"><?php _e('New User Registration Email for admins', 'wpforo'); ?></h3>
98
+ <p class="wpf-info"><?php _e('This message comes when new user registers to site', 'wpforo') ?></p>
99
+ </td>
100
+ </tr>
101
+ <tr>
102
+ <th>
103
+ <label for="wp_new_user_notification_email_admin_subject"><?php _e('Message Subject', 'wpforo'); ?>:</label>
104
+ </th>
105
+ <td><input id="wp_new_user_notification_email_admin_subject" name="wpforo_subscribe_options[wp_new_user_notification_email_admin_subject]" type="text" value="<?php wpfo(WPF()->sbscrb->options['wp_new_user_notification_email_admin_subject']); ?>" required></td>
106
+ </tr>
107
+ <tr>
108
+ <th><label for="wp_new_user_notification_email_admin_message"><?php _e('Message Body', 'wpforo'); ?>:</label></th>
109
+ <td><textarea id="wp_new_user_notification_email_admin_message" style="height:190px;" name="wpforo_subscribe_options[wp_new_user_notification_email_admin_message]" required><?php wpfo(WPF()->sbscrb->options['wp_new_user_notification_email_admin_message'], true, 'esc_textarea'); ?></textarea></td>
110
+ </tr>
111
+ <tr>
112
+ <td colspan="2" style="border-bottom:2px solid #ddd;">
113
+ <h3 style="font-weight:400; padding:10px 0 0 0; margin:0;"><?php _e('New User Registration Email for user', 'wpforo'); ?></h3>
114
+ <p class="wpf-info"><?php _e('This message comes when new user registers to site', 'wpforo') ?></p>
115
+ </td>
116
+ </tr>
117
+ <tr>
118
+ <th>
119
+ <label for="wp_new_user_notification_email_subject"><?php _e('Message Subject', 'wpforo'); ?>:</label>
120
+ </th>
121
+ <td><input id="wp_new_user_notification_email_subject" name="wpforo_subscribe_options[wp_new_user_notification_email_subject]" type="text" value="<?php wpfo(WPF()->sbscrb->options['wp_new_user_notification_email_subject']); ?>" required></td>
122
+ </tr>
123
+ <tr>
124
+ <th><label for="wp_new_user_notification_email_message"><?php _e('Message Body', 'wpforo'); ?>:</label></th>
125
+ <td><textarea id="wp_new_user_notification_email_message" style="height:190px;" name="wpforo_subscribe_options[wp_new_user_notification_email_message]" required><?php wpfo(WPF()->sbscrb->options['wp_new_user_notification_email_message'], true, 'esc_textarea'); ?></textarea></td>
126
+ </tr>
127
<tr>
128
<td colspan="2" style="border-bottom:2px solid #ddd;">
129
<h3 style="font-weight:400; padding:10px 0 0 0; margin:0;"><?php _e('Reset Password Emails', 'wpforo'); ?></h3>
wpf-admin/options-tabs/features.php CHANGED
@@ -6,34 +6,34 @@
6
7
<?php
8
$options = array(
9
- 'user-admin-bar' => array( 'label' => __('Show Admin Bar for Members', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0, 'description' => __('This option doesn\'t affect website admins.', 'wpforo') ),
10
- 'page-title' => array( 'label' => __('Show Forum Page Title', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1 ),
11
- 'top-bar' => array( 'label' => __('Show Top/Menu Bar', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
12
- 'top-bar-search' => array( 'label' => __('Show Top Search', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
13
- 'breadcrumb' => array( 'label' => __('Show Breadcrumb', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
14
- 'footer-stat' => array( 'label' => __('Show Forum Statistic', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
15
'mention-nicknames' => array( 'label' => __('Show Member Mention Nicknames', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
16
'content-do_shortcode' => array( 'label' => __('Enable WordPress Shortcodes in Post Content', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
17
'view-logging' => array( 'label' => __('Log Viewed Forums and Topics', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
18
- 'author-link' => array( 'label' => __('Replace Author Link to Forum Profile', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0 ),
19
- 'comment-author-link' => array( 'label' => __('Replace Comment Author Link to Forum Profile', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0 ),
20
- 'user-register' => array( 'label' => __('Enable User Registration', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('This option is not synced with WordPress "Anyone can register" option in Dashboard > Settings > General admin page. If this option is enabled new users will always be able to register.', 'wpforo') ),
21
- 'user-register-email-confirm' => array( 'label' => __('Enable User Registration email confirmation', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0, 'description' => __('If you have enabled this option, after registering, user can not login without confirming the email.', 'wpforo') ),
22
- 'register-url' => array( 'label' => __('Replace Registration Page URL to Forum Registration Page URL', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0 ),
23
- 'login-url' => array( 'label' => __('Replace Login Page URL to Forum Login Page URL', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0 ),
24
'resetpass-url' => array( 'label' => __('Replace Reset Password Page URL to Forum Reset Password Page URL', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1 ),
25
- 'replace-avatar' => array( 'label' => __('Replace Author Avatar with Forum Profile Avatar', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
26
- 'avatars' => array( 'label' => __('Enable Avatars', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
27
- 'custom-avatars' => array( 'label' => __('Enable Custom Avatars', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
28
- 'signature' => array( 'label' => __('Allow Member Signature', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
29
- 'rating' => array( 'label' => __('Enable Member Rating', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
30
- 'rating_title' => array( 'label' => __('Enable Member Rating Titles', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
31
- 'member_cashe' => array( 'label' => __('Enable Member Cache', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
32
'object_cashe' => array( 'label' => __('Enable Object Cache', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
33
'html_cashe' => array( 'label' => __('Enable HTML Cache', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
34
'memory_cashe' => array( 'label' => __('Enable Memory Cache', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
35
- 'seo-title' => array( 'label' => __('Enable wpForo SEO for Meta Titles', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
36
- 'seo-meta' => array( 'label' => __('Enable wpForo SEO for Meta Tags', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
37
'seo-profile' => array( 'label' => __('Enable User Profile Page indexing', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
38
'rss-feed' => array( 'label' => __('Enable RSS Feed', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
39
'user-synch' => array( 'label' => __('Turn Off User Syncing Note', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
@@ -41,14 +41,18 @@ $options = array(
41
'bp_notification' => array( 'label' => __('BuddyPress Notification Integration', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('Creates notification on new forum reply in BuddyPress Profile Notification page.', 'wpforo')),
42
'bp_forum_tab' => array( 'label' => __('BuddyPress Profile Forum Tab Integration', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('Adds "Forums" tab with "Created Topics", "Posted Replies", "Liked Posts" and "Subscriptions" sub-tabs to BuddyPress Profile page.', 'wpforo')),
43
'bp_profile' => array( 'label' => __('Replace Forum Profile with BuddyPress Profile', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0, 'description' => __('Replaces wpForo Member Profile page with BuddyPress Profile Page.', 'wpforo')),
44
- 'font-awesome' => array( 'label' => __('Enable wpForo Font-Awesome Lib', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
45
- 'output-buffer' => array( 'label' => __('Enable Output Buffer', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('This feature is useful if you\'re adding content before or after [wpforo] shortcode in page content. Also it useful if forum is loaded before website header, on top of the front-end.', 'wpforo')),
46
- 'wp-date-format' => array( 'label' => __('Enable WordPress Date/Time Format', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0, 'description' => __('You can manage WordPress date and time format in WordPress Settings > General admin page.', 'wpforo')),
47
- 'subscribe_conf' => array( 'label' => __('Enable Subscription Confirmation', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('Forum and Topic subscription with double opt-in/confirmation system.', 'wpforo') ),
48
- 'subscribe_checkbox_on_post_editor' => array( 'label' => __('Topic subscription option on post editor', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('This option adds topic subscription checkbox next to new topic and post submit button.', 'wpforo') ),
49
- 'subscribe_checkbox_default_status' => array( 'label' => __('Topic subscription option on post editor - checked/enabled', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('Enable this option if you want the topic subscription checkbox to be checked by default.', 'wpforo') ),
50
- 'attach-media-lib' => array( 'label' => __('Insert Forum Attachments to Media Library', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('Enable this option to be able manage forum attachments in Dashboard > Media > Library admin page.', 'wpforo') ),
51
- 'debug-mode' => array( 'label' => __('Enable Debug Mode', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0, 'description' => __('If you got some issue with wpForo, please enable this option before asking for support, this outputs hidden important information to help us debug your issue.', 'wpforo')),
52
'copyright' => array( 'label' => __('Help wpForo to grow, show plugin info', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('Please enable this option to help wpForo get more popularity as your thank to the hard work we do for you totally free. This option adds a very small icon in forum footer, which will allow your site visitors recognize the name of forum solution you use.', 'wpforo')),
53
);
54
@@ -61,7 +65,7 @@ $options = array(
61
<?php if( !isset(WPF()->features[$key]) ){ WPF()->features[$key] = ''; } ?>
62
<tr>
63
<th>
64
- <label><?php echo esc_html($option['label']); ?></label>
65
<p class="wpf-info"><?php if(isset($option['description'])) echo esc_html($option['description']); ?></p>
66
</th>
67
<td>
6
7
<?php
8
$options = array(
9
+ 'user-admin-bar' => array( 'label' => __('Show Admin Bar for Members', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0, 'description' => __('This option doesn\'t affect website admins.', 'wpforo'), 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/' ),
10
+ 'page-title' => array( 'label' => __('Show Forum Page Title', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/' ),
11
+ 'top-bar' => array( 'label' => __('Show Top/Menu Bar', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/'),
12
+ 'top-bar-search' => array( 'label' => __('Show Top Search', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/'),
13
+ 'breadcrumb' => array( 'label' => __('Show Breadcrumb', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/'),
14
+ 'footer-stat' => array( 'label' => __('Show Forum Statistic', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/'),
15
'mention-nicknames' => array( 'label' => __('Show Member Mention Nicknames', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
16
'content-do_shortcode' => array( 'label' => __('Enable WordPress Shortcodes in Post Content', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
17
'view-logging' => array( 'label' => __('Log Viewed Forums and Topics', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
18
+ 'author-link' => array( 'label' => __('Replace Author Link to Forum Profile', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0, 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#replace-author-data' ),
19
+ 'comment-author-link' => array( 'label' => __('Replace Comment Author Link to Forum Profile', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0, 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#replace-author-data' ),
20
+ 'user-register' => array( 'label' => __('Enable User Registration', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('This option is not synced with WordPress "Anyone can register" option in Dashboard > Settings > General admin page. If this option is enabled new users will always be able to register.', 'wpforo'), 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#user-registration' ),
21
+ 'user-register-email-confirm' => array( 'label' => __('Enable User Registration email confirmation', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0, 'description' => __('If you have enabled this option, after registering, user can not login without confirming the email.', 'wpforo'), 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#registration-email-confirmation' ),
22
+ 'register-url' => array( 'label' => __('Replace Registration Page URL to Forum Registration Page URL', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0, 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#url-replace' ),
23
+ 'login-url' => array( 'label' => __('Replace Login Page URL to Forum Login Page URL', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0, 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#url-replace' ),
24
'resetpass-url' => array( 'label' => __('Replace Reset Password Page URL to Forum Reset Password Page URL', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1 ),
25
+ 'replace-avatar' => array( 'label' => __('Replace Author Avatar with Forum Profile Avatar', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#replace-author-data'),
26
+ 'avatars' => array( 'label' => __('Enable Avatars', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#avatars'),
27
+ 'custom-avatars' => array( 'label' => __('Enable Custom Avatars', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#custom-avatars'),
28
+ 'signature' => array( 'label' => __('Allow Member Signature', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#signature'),
29
+ 'rating' => array( 'label' => __('Enable Member Rating', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#member-rating'),
30
+ 'rating_title' => array( 'label' => __('Enable Member Rating Titles', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#member-rating'),
31
+ 'member_cashe' => array( 'label' => __('Enable Member Cache', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#member-cache'),
32
'object_cashe' => array( 'label' => __('Enable Object Cache', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
33
'html_cashe' => array( 'label' => __('Enable HTML Cache', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
34
'memory_cashe' => array( 'label' => __('Enable Memory Cache', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
35
+ 'seo-title' => array( 'label' => __('Enable wpForo SEO for Meta Titles', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#seo-meta'),
36
+ 'seo-meta' => array( 'label' => __('Enable wpForo SEO for Meta Tags', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#seo-meta'),
37
'seo-profile' => array( 'label' => __('Enable User Profile Page indexing', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
38
'rss-feed' => array( 'label' => __('Enable RSS Feed', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
39
'user-synch' => array( 'label' => __('Turn Off User Syncing Note', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
41
'bp_notification' => array( 'label' => __('BuddyPress Notification Integration', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('Creates notification on new forum reply in BuddyPress Profile Notification page.', 'wpforo')),
42
'bp_forum_tab' => array( 'label' => __('BuddyPress Profile Forum Tab Integration', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('Adds "Forums" tab with "Created Topics", "Posted Replies", "Liked Posts" and "Subscriptions" sub-tabs to BuddyPress Profile page.', 'wpforo')),
43
'bp_profile' => array( 'label' => __('Replace Forum Profile with BuddyPress Profile', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0, 'description' => __('Replaces wpForo Member Profile page with BuddyPress Profile Page.', 'wpforo')),
44
+ 'um_notification' => array( 'label' => __('Ultimate Member Notification Integration', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('Creates notification on new forum reply in Ultimate Member Real-time Notification system.', 'wpforo')),
45
+ 'um_forum_tab' => array( 'label' => __('Ultimate Member Profile Forum Tab Integration', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('Adds "Forums" tab with "Created Topics", "Posted Replies", "Liked Posts" and "Subscriptions" sub-tabs to Ultimate Member Profile page.', 'wpforo')),
46
+ 'um_profile' => array( 'label' => __('Replace Forum Profile with Ultimate Member Profile', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0, 'description' => __('Replaces wpForo Member Profile page with BuddyPress Profile Page.', 'wpforo')),
47
+ 'font-awesome' => array( 'label' => __('Enable wpForo Font-Awesome Lib', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#font-awesome-lib'),
48
+ 'output-buffer' => array( 'label' => __('Enable Output Buffer', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('This feature is useful if you\'re adding content before or after [wpforo] shortcode in page content. Also it useful if forum is loaded before website header, on top of the front-end.', 'wpforo'), 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#output-buffer'),
49
+ 'wp-date-format' => array( 'label' => __('Enable WordPress Date/Time Format', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0, 'description' => __('You can manage WordPress date and time format in WordPress Settings > General admin page.', 'wpforo'), 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#wp-date'),
50
+ 'subscribe_conf' => array( 'label' => __('Enable Subscription Confirmation', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('Forum and Topic subscription with double opt-in/confirmation system.', 'wpforo'), 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#double-opt-in' ),
51
+ 'subscribe_checkbox_on_post_editor' => array( 'label' => __('Topic subscription option on post editor', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('This option adds topic subscription checkbox next to new topic and post submit button.', 'wpforo'), 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#topic-subscription' ),
52
+ 'subscribe_checkbox_default_status' => array( 'label' => __('Topic subscription option on post editor - checked/enabled', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('Enable this option if you want the topic subscription checkbox to be checked by default.', 'wpforo'), 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#topic-subscription' ),
53
+ 'role-synch' => array( 'label' => __('Role-Usergroup Synchronization', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('Keep enabled this option to synch WordPress User Roles with Forum Usergroups. This connection allows to automatically change Usergroup of a user when his/her User Role is changed by administrators or by membership plugins. In other words this option allows to manage Usergroups based on Users Roles, thus you can directly control users forum accesses based on Users Roles. If this option is turned off, User Roles don\'t have any affection to users forum accesses, they are only controlled by forum Usergroups.', 'wpforo') ),
54
+ 'attach-media-lib' => array( 'label' => __('Insert Forum Attachments to Media Library', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('Enable this option to be able manage forum attachments in Dashboard > Media > Library admin page.', 'wpforo'), 'help' => 'https://wpforo.com/docs/root/wpforo-settings/features/#media-library' ),
55
+ 'debug-mode' => array( 'label' => __('Enable Debug Mode', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0, 'description' => __('If you got some issue with wpForo, please enable this option before asking for support, this outputs hidden important information to help us debug your issue.', 'wpforo')),
56
'copyright' => array( 'label' => __('Help wpForo to grow, show plugin info', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('Please enable this option to help wpForo get more popularity as your thank to the hard work we do for you totally free. This option adds a very small icon in forum footer, which will allow your site visitors recognize the name of forum solution you use.', 'wpforo')),
57
);
58
65
<?php if( !isset(WPF()->features[$key]) ){ WPF()->features[$key] = ''; } ?>
66
<tr>
67
<th>
68
+ <label><?php echo esc_html($option['label']); ?> <?php if(wpfval($option, 'help')): ?><a href="<?php echo esc_url($option['help']) ?>" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a><?php endif; ?></label>
69
<p class="wpf-info"><?php if(isset($option['description'])) echo esc_html($option['description']); ?></p>
70
</th>
71
<td>
wpf-admin/options-tabs/general.php CHANGED
@@ -12,8 +12,9 @@
12
<tbody>
13
<tr>
14
<th>
15
- <label for="wpforourl"><?php _e('Forum Base URL', 'wpforo'); ?></label>
16
- </th>
17
<td align="left">
18
<?php if(!WPF()->use_home_url): ?>
19
<span style="font-size:14px;"><?php echo esc_url( home_url('/') ) ?></span>
@@ -21,7 +22,7 @@
21
<?php endif; ?>
22
<label for="wpforo_use_home_url">
23
<input id="wpforo_use_home_url" type="checkbox" name="wpforo_use_home_url" value="1" <?php echo (WPF()->use_home_url ? 'checked' : '') ?>/>
24
- <?php _e('Turn WordPress to wpForo', 'wpforo') ?>
25
<p class="wpf-info"><?php _e('This option will disable WordPress on front-end. Only forum pages and excluded post/pages will be available. wpForo will look like as a stand-alone forum.', 'wpforo') ?></p>
26
</label>
27
<?php if(WPF()->use_home_url): ?>
@@ -45,16 +46,16 @@
45
</td>
46
</tr>
47
<tr>
48
- <th><label for="forum_title"><?php _e('Forum Title', 'wpforo'); ?></label></th>
49
<td><input id="forum_title" type="text" name="wpforo_general_options[title]" value="<?php if(isset(WPF()->general_options['title'])) wpfo( WPF()->general_options['title'] ); ?>" required></td>
50
</tr>
51
<tr>
52
- <th><label for="forum_description"><?php _e('Forum Description', 'wpforo'); ?></label></th>
53
<td><input id="forum_description" type="text" name="wpforo_general_options[description]" value="<?php if(isset(WPF()->general_options['description'])) wpfo( WPF()->general_options['description'] ); ?>" required></td>
54
</tr>
55
<tr>
56
<th>
57
- <label><?php _e('Dashboard Menu Position', 'wpforo'); ?></label>
58
<p class="wpf-info"><?php _e('The position in the menu order wpForo should appear.', 'wpforo'); ?></p>
59
<p class="wpf-info" style="font-size:11px; line-height:14px;"><?php _e('Use greater than 5 - below Posts, 10 - below Media, 15 - below Links, 20 - below Pages, 25 - below comments, 60 - below first separator, 65 - below Plugins, 70 - below Users, 75 - below Tools, 80 - below Settings, 100 - below second separator', 'wpforo'); ?></p>
60
</th>
@@ -65,7 +66,7 @@
65
</tr>
66
<tr>
67
<th>
68
- <label for="langid"><?php _e('Forum Language', 'wpforo'); ?></label>
69
<p class="wpf-info"><?php _e('This option is only related to XML language files. You should upload a translation XML file to have a new language option in this drop-down. If you are using PO/MO translation files you should change WordPress Language in Dashboard > Settings admin page to load according translation for wpForo.', 'wpforo'); ?></p>
70
</th>
71
<td>
12
<tbody>
13
<tr>
14
<th>
15
+ <label for="wpforourl"><?php _e('Forum Base URL', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/getting-started/forum-page/change-forum-page/" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label>
16
+ <p class="wpf-info"><?php _e('If you want to set forum on home page, please do not use the "Turn WordPress to wpForo" option. The correct instruction can be found in documentation here') ?> <a href="https://wpforo.com/docs/root/getting-started/forum-page/set-forum-on-home-page/" target="_blank" title="<?php _e('Set Forum on Home Page', 'wpforo') ?>">&raquo;&raquo;</a></p>
17
+ </th>
18
<td align="left">
19
<?php if(!WPF()->use_home_url): ?>
20
<span style="font-size:14px;"><?php echo esc_url( home_url('/') ) ?></span>
22
<?php endif; ?>
23
<label for="wpforo_use_home_url">
24
<input id="wpforo_use_home_url" type="checkbox" name="wpforo_use_home_url" value="1" <?php echo (WPF()->use_home_url ? 'checked' : '') ?>/>
25
+ <?php _e('Turn WordPress to wpForo', 'wpforo') ?> <a href="https://wpforo.com/docs/root/getting-started/forum-page/turn-wordpress-to-wpforo/" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a>
26
<p class="wpf-info"><?php _e('This option will disable WordPress on front-end. Only forum pages and excluded post/pages will be available. wpForo will look like as a stand-alone forum.', 'wpforo') ?></p>
27
</label>
28
<?php if(WPF()->use_home_url): ?>
46
</td>
47
</tr>
48
<tr>
49
+ <th><label for="forum_title"><?php _e('Forum Title', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/general-settings/#forum-title-desc" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label></th>
50
<td><input id="forum_title" type="text" name="wpforo_general_options[title]" value="<?php if(isset(WPF()->general_options['title'])) wpfo( WPF()->general_options['title'] ); ?>" required></td>
51
</tr>
52
<tr>
53
+ <th><label for="forum_description"><?php _e('Forum Description', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/general-settings/#forum-title-desc" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label></th>
54
<td><input id="forum_description" type="text" name="wpforo_general_options[description]" value="<?php if(isset(WPF()->general_options['description'])) wpfo( WPF()->general_options['description'] ); ?>" required></td>
55
</tr>
56
<tr>
57
<th>
58
+ <label><?php _e('Dashboard Menu Position', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/general-settings/#dashboard-menu" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label>
59
<p class="wpf-info"><?php _e('The position in the menu order wpForo should appear.', 'wpforo'); ?></p>
60
<p class="wpf-info" style="font-size:11px; line-height:14px;"><?php _e('Use greater than 5 - below Posts, 10 - below Media, 15 - below Links, 20 - below Pages, 25 - below comments, 60 - below first separator, 65 - below Plugins, 70 - below Users, 75 - below Tools, 80 - below Settings, 100 - below second separator', 'wpforo'); ?></p>
61
</th>
66
</tr>
67
<tr>
68
<th>
69
+ <label for="langid"><?php _e('XML Based Language', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/general-settings/#xml-language" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label>
70
<p class="wpf-info"><?php _e('This option is only related to XML language files. You should upload a translation XML file to have a new language option in this drop-down. If you are using PO/MO translation files you should change WordPress Language in Dashboard > Settings admin page to load according translation for wpForo.', 'wpforo'); ?></p>
71
</th>
72
<td>
wpf-admin/options-tabs/members.php CHANGED
@@ -10,14 +10,21 @@
10
<tbody>
11
<?php do_action('wpforo_settings_members_top'); ?>
12
<tr>
13
- <th><label><?php _e('Online status timeout', 'wpforo'); ?>:</label></th>
14
<td>
15
<?php $online_timeout = wpfo(WPF()->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(WPF()->member->options['url_structure'], false) == 'id' ){ $opt_id_attr = 'checked="checked"'; }else{ $opt_nicename_attr = 'checked="checked"'; } ?>
@@ -26,7 +33,7 @@
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(WPF()->member->options['search_type'], 'search'); ?>><label for="wpf_new_topic_notify_search"><?php _e('Search', 'wpforo'); ?></label> &nbsp;
@@ -36,7 +43,7 @@
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.
@@ -77,7 +84,7 @@
77
</tr>
78
<tr>
79
<th colspan="2">
80
- <h3 style="font-weight:400; padding:5px 0px 10px 0px; margin:0px;"><?php _e('Member Reputation and Titles', 'wpforo'); ?></h3>
81
</th>
82
</tr>
83
<tr>
@@ -130,7 +137,7 @@
130
<?php
131
foreach($ugroups as $ugroup){
132
$value = ( isset(WPF()->member->options['rating_title_ug'][$ugroup['groupid']]) ) ? WPF()->member->options['rating_title_ug'][$ugroup['groupid']] : 0;
133
- 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>';
134
}
135
?>
136
</td>
@@ -144,7 +151,7 @@
144
<?php
145
foreach($ugroups as $ugroup){
146
$value = ( isset(WPF()->member->options['rating_badge_ug'][$ugroup['groupid']]) ) ? WPF()->member->options['rating_badge_ug'][$ugroup['groupid']] : 0;
147
- 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>';
148
}
149
?>
150
</td>
@@ -157,7 +164,7 @@
157
<?php
158
foreach($ugroups as $ugroup){
159
$value = ( isset(WPF()->member->options['title_usergroup'][$ugroup['groupid']]) ) ? WPF()->member->options['title_usergroup'][$ugroup['groupid']] : 0;
160
- 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>';
161
}
162
?>
163
</td>
10
<tbody>
11
<?php do_action('wpforo_settings_members_top'); ?>
12
<tr>
13
+ <th><label><?php _e('Online status timeout', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/members-settings/" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label></th>
14
<td>
15
<?php $online_timeout = wpfo(WPF()->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('Number of Members per Page', 'wpforo'); ?> </label></th>
21
+ <td>
22
+ <?php $members_per_page = wpfo(WPF()->member->options['members_per_page'], false) ?>
23
+ <input name="wpforo_member_options[members_per_page]" type="number" min="1" value="<?php echo intval($members_per_page) ?>" class="wpf-field-small" />&nbsp;
24
+ </td>
25
+ </tr>
26
<tr>
27
+ <th><label><?php _e('Members URL structure', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/members-settings/#members-url" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label></th>
28
<td>
29
<?php $opt_id_attr = ''; $opt_nicename_attr = ''; ?>
30
<?php if( wpfo(WPF()->member->options['url_structure'], false) == 'id' ){ $opt_id_attr = 'checked="checked"'; }else{ $opt_nicename_attr = 'checked="checked"'; } ?>
33
</td>
34
</tr>
35
<tr>
36
+ <th><label><?php _e('Members Search Type', 'wpforo'); ?> </label></label></th>
37
<td>
38
<div class="wpf-switch-field">
39
<input type="radio" value="search" name="wpforo_member_options[search_type]" id="wpf_new_topic_notify_search" <?php wpfo_check(WPF()->member->options['search_type'], 'search'); ?>><label for="wpf_new_topic_notify_search"><?php _e('Search', 'wpforo'); ?></label> &nbsp;
43
</tr>
44
<tr>
45
<th>
46
+ <label><?php _e('Custom Authorization URLs', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/members-settings/#custom-authorization" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label>
47
<p class="wpf-info">
48
<?php _e('Use this option only if you have set other pages for authorization.
49
wpForo doesn\'t change its own URLs, these options are only for other plugin compatibility.
84
</tr>
85
<tr>
86
<th colspan="2">
87
+ <h3 style="font-weight:400; padding:5px 0px 10px 0px; margin:0px;"><?php _e('Member Reputation and Titles', 'wpforo'); ?> &nbsp;<a href="https://wpforo.com/docs/root/wpforo-settings/members-settings/#reputation-settings" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank" style="font-size: 14px;"><i class="far fa-question-circle"></i></a></h3>
88
</th>
89
</tr>
90
<tr>
137
<?php
138
foreach($ugroups as $ugroup){
139
$value = ( isset(WPF()->member->options['rating_title_ug'][$ugroup['groupid']]) ) ? WPF()->member->options['rating_title_ug'][$ugroup['groupid']] : 0;
140
+ echo '<label style="display:inline-block; text-align:center; padding: 0px 10px;"><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>';
141
}
142
?>
143
</td>
151
<?php
152
foreach($ugroups as $ugroup){
153
$value = ( isset(WPF()->member->options['rating_badge_ug'][$ugroup['groupid']]) ) ? WPF()->member->options['rating_badge_ug'][$ugroup['groupid']] : 0;
154
+ echo '<label style="display:inline-block; text-align:center; padding: 0px 10px;"><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>';
155
}
156
?>
157
</td>
164
<?php
165
foreach($ugroups as $ugroup){
166
$value = ( isset(WPF()->member->options['title_usergroup'][$ugroup['groupid']]) ) ? WPF()->member->options['title_usergroup'][$ugroup['groupid']] : 0;
167
+ echo '<label style="display:inline-block; text-align:center; padding: 0px 10px;"><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>';
168
}
169
?>
170
</td>
wpf-admin/options-tabs/posts.php CHANGED
@@ -20,37 +20,37 @@
20
</td>
21
</tr>
22
<tr>
23
- <th><label for="topics_per_page"><?php _e('Number of Topics per Page', 'wpforo'); ?></label></th>
24
<td><input id="topics_per_page" type="number" min="1" name="wpforo_post_options[topics_per_page]" value="<?php wpfo(WPF()->post->options['topics_per_page']) ?>" class="wpf-field-small" /></td>
25
</tr>
26
<tr>
27
<th>
28
- <label for="eot_durr"><?php _e('Allow Edit Own Topic for', 'wpforo'); ?></label>
29
<p class="wpf-info"><?php _e('Set this option value 0 if you want to remove time limit.', 'wpforo') ?></p>
30
</th>
31
<td><input id="eot_durr" type="number" name="wpforo_post_options[eot_durr]" value="<?php wpfo(WPF()->post->options['eot_durr']/60) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo') ?></td>
32
</tr>
33
<tr>
34
<th>
35
- <label for="dot_durr"><?php _e('Allow Delete Own Topic for', 'wpforo'); ?></label>
36
<p class="wpf-info"><?php _e('Set this option value 0 if you want to remove time limit.', 'wpforo') ?></p>
37
</th>
38
<td><input id="dot_durr" type="number" name="wpforo_post_options[dot_durr]" value="<?php wpfo(WPF()->post->options['dot_durr']/60) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo') ?></td>
39
</tr>
40
<tr>
41
- <th><label for="posts_per_page"><?php _e('Number of Posts per Page', 'wpforo'); ?></label></th>
42
<td><input id="posts_per_page" type="number" min="1" name="wpforo_post_options[posts_per_page]" value="<?php wpfo(WPF()->post->options['posts_per_page']) ?>" class="wpf-field-small" /></td>
43
</tr>
44
<tr>
45
<th>
46
- <label for="eor_durr"><?php _e('Allow Edit Own Post for', 'wpforo'); ?></label>
47
<p class="wpf-info"><?php _e('Set this option value 0 if you want to remove time limit.', 'wpforo') ?></p>
48
</th>
49
<td><input id="eor_durr" type="number" name="wpforo_post_options[eor_durr]" value="<?php wpfo(WPF()->post->options['eor_durr']/60) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo') ?></td>
50
</tr>
51
<tr>
52
<th>
53
- <label for="dor_durr"><?php _e('Allow Delete Own post for', 'wpforo'); ?></label>
54
<p class="wpf-info"><?php _e('Set this option value 0 if you want to remove time limit.', 'wpforo') ?></p>
55
</th>
56
<td><input id="dor_durr" type="number" name="wpforo_post_options[dor_durr]" value="<?php wpfo(WPF()->post->options['dor_durr']/60) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo') ?></td>
@@ -58,7 +58,7 @@
58
59
<tr>
60
<th>
61
- <label><?php _e('Maximum upload file size', 'wpforo'); ?></label>
62
<p class="wpf-info"><?php _e('You can not set this value more than "upload_max_filesize" and "post_max_size". If you want to increase server parameters please contact to your hosting service support.', 'wpforo'); ?></p>
63
</th>
64
<td>
@@ -74,7 +74,7 @@
74
75
<tr>
76
<th>
77
- <label><?php _e('Attachment click - message for non-permitted users', 'wpforo'); ?></label>
78
<p class="wpf-info"><?php _e('This message will be displayed when a non-permitted forum member clicks on attached file link in topic and posts.', 'wpforo'); ?></p>
79
</th>
80
<td>
20
</td>
21
</tr>
22
<tr>
23
+ <th><label for="topics_per_page"><?php _e('Number of Topics per Page', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/topic-post-settings/#item-per-page" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label></th>
24
<td><input id="topics_per_page" type="number" min="1" name="wpforo_post_options[topics_per_page]" value="<?php wpfo(WPF()->post->options['topics_per_page']) ?>" class="wpf-field-small" /></td>
25
</tr>
26
<tr>
27
<th>
28
+ <label for="eot_durr"><?php _e('Allow Edit Own Topic for', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/topic-post-settings/#edit-delete-timeout" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label>
29
<p class="wpf-info"><?php _e('Set this option value 0 if you want to remove time limit.', 'wpforo') ?></p>
30
</th>
31
<td><input id="eot_durr" type="number" name="wpforo_post_options[eot_durr]" value="<?php wpfo(WPF()->post->options['eot_durr']/60) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo') ?></td>
32
</tr>
33
<tr>
34
<th>
35
+ <label for="dot_durr"><?php _e('Allow Delete Own Topic for', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/topic-post-settings/#edit-delete-timeout" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label>
36
<p class="wpf-info"><?php _e('Set this option value 0 if you want to remove time limit.', 'wpforo') ?></p>
37
</th>
38
<td><input id="dot_durr" type="number" name="wpforo_post_options[dot_durr]" value="<?php wpfo(WPF()->post->options['dot_durr']/60) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo') ?></td>
39
</tr>
40
<tr>
41
+ <th><label for="posts_per_page"><?php _e('Number of Posts per Page', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/topic-post-settings/#item-per-page" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label></th>
42
<td><input id="posts_per_page" type="number" min="1" name="wpforo_post_options[posts_per_page]" value="<?php wpfo(WPF()->post->options['posts_per_page']) ?>" class="wpf-field-small" /></td>
43
</tr>
44
<tr>
45
<th>
46
+ <label for="eor_durr"><?php _e('Allow Edit Own Post for', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/topic-post-settings/#edit-delete-timeout" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label>
47
<p class="wpf-info"><?php _e('Set this option value 0 if you want to remove time limit.', 'wpforo') ?></p>
48
</th>
49
<td><input id="eor_durr" type="number" name="wpforo_post_options[eor_durr]" value="<?php wpfo(WPF()->post->options['eor_durr']/60) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo') ?></td>
50
</tr>
51
<tr>
52
<th>
53
+ <label for="dor_durr"><?php _e('Allow Delete Own post for', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/topic-post-settings/#edit-delete-timeout" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label>
54
<p class="wpf-info"><?php _e('Set this option value 0 if you want to remove time limit.', 'wpforo') ?></p>
55
</th>
56
<td><input id="dor_durr" type="number" name="wpforo_post_options[dor_durr]" value="<?php wpfo(WPF()->post->options['dor_durr']/60) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo') ?></td>
58
59
<tr>
60
<th>
61
+ <label><?php _e('Maximum upload file size', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/topic-post-settings/#max-file-size" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label>
62
<p class="wpf-info"><?php _e('You can not set this value more than "upload_max_filesize" and "post_max_size". If you want to increase server parameters please contact to your hosting service support.', 'wpforo'); ?></p>
63
</th>
64
<td>
74
75
<tr>
76
<th>
77
+ <label><?php _e('Attachment click - message for non-permitted users', 'wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/topic-post-settings/#no-attach-message" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label>
78
<p class="wpf-info"><?php _e('This message will be displayed when a non-permitted forum member clicks on attached file link in topic and posts.', 'wpforo'); ?></p>
79
</th>
80
<td>
wpf-admin/options-tabs/styles.php CHANGED
@@ -40,7 +40,7 @@
40
</tr>
41
</tbody>
42
</table>
43
- <h3 style="margin:0px 20px 0px 20px; padding:10px 0px; border-bottom:3px solid #F5F5F5;"><?php _e('Forum Color Styles', 'wpforo'); ?> &nbsp;|&nbsp; <a href="https://wpforo.com/docs/root/forum-themes/theme-styles/" target="_blank" style="font-size:13px; text-decoration:none;"><?php _e('Documentation', 'wpforo'); ?> &raquo;</a></h3>
44
<table style="width:95%; border:none; padding:5px; margin-left:10px; margin-top:15px;">
45
<tbody>
46
<tr class="form-field form-required">
40
</tr>
41
</tbody>
42
</table>
43
+ <h3 style="margin:0px 20px 0px 20px; padding:10px 0px; border-bottom:3px solid #F5F5F5;"><?php _e('Forum Color Styles', 'wpforo'); ?> &nbsp;<a href="https://wpforo.com/docs/root/wpforo-settings/style-settings/" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank" style="font-size: 14px;"><i class="far fa-question-circle"></i></a> &nbsp;|&nbsp; <a href="https://wpforo.com/docs/root/forum-themes/theme-styles/" target="_blank" style="font-size:13px; text-decoration:none;"><?php _e('Colors Documentation', 'wpforo'); ?> &raquo;</a></h3>
44
<table style="width:95%; border:none; padding:5px; margin-left:10px; margin-top:15px;">
45
<tbody>
46
<tr class="form-field form-required">
wpf-admin/tools-tabs/misc.php CHANGED
@@ -6,7 +6,7 @@
6
7
<form action="" method="POST" class="validate">
8
<?php wp_nonce_field( 'wpforo-tools-misc' ); ?>
9
- <div class="wpf-tool-box" style="width:60%;">
10
<h3><?php _e('SEO Tools', 'wpforo'); ?>
11
<p class="wpf-info"></p>
12
</h3>
@@ -15,7 +15,7 @@
15
<tbody style="padding:10px;">
16
<tr>
17
<td>
18
- <label style="padding-bottom:5px; display:block;"><?php _e('Allowed dofollow domains', 'wpforo'); ?>:</label>
19
<p class="wpf-info"><?php _e('wpForo adds nofollow to all links with external URLs. If you want to keep some domains as internal please insert domains one per line in the textarea bellow.', 'wpforo'); ?></p>
20
<br>
21
<textarea name="wpforo_tools_misc[dofollow]" style="font-size: 13px; display:block; width:100%; height:120px;" placeholder="example.com" /><?php wpfo(WPF()->tools_misc['dofollow']) ?></textarea></td>
@@ -23,7 +23,7 @@
23
</tr>
24
<tr>
25
<td>
26
- <label style="padding-bottom:5px; display:block;"><?php _e('Noindex forum page URLs', 'wpforo'); ?>:</label>
27
<p class="wpf-info"><?php _e('The noIndex code tells Google and other search engines to NOT index the page, so that it cannot be found in search results. Please insert page URLs you do not want to be indexed one per line in the textarea bellow.', 'wpforo'); ?></p>
28
<br>
29
<textarea name="wpforo_tools_misc[noindex]" style="font-size: 13px; display:block; width:100%; height:120px;" placeholder="https://myforum.com/community/main-forum/my-topic/" /><?php wpfo(WPF()->tools_misc['noindex']) ?></textarea></td>
@@ -33,6 +33,103 @@
33
</table>
34
</div>
35
</div>
36
<div class="wpforo_settings_foot" style="clear:both; margin-top:20px;">
37
<input type="submit" class="button button-primary" value="<?php _e('Update Options', 'wpforo'); ?>" />
38
</div>
6
7
<form action="" method="POST" class="validate">
8
<?php wp_nonce_field( 'wpforo-tools-misc' ); ?>
9
+ <div class="wpf-tool-box" style="width:43%; margin-top: 15px;">
10
<h3><?php _e('SEO Tools', 'wpforo'); ?>
11
<p class="wpf-info"></p>
12
</h3>
15
<tbody style="padding:10px;">
16
<tr>
17
<td>
18
+ <label style="padding-bottom:5px; display:block;font-weight: 600;"><?php _e('Allowed dofollow domains', 'wpforo'); ?>:</label>
19
<p class="wpf-info"><?php _e('wpForo adds nofollow to all links with external URLs. If you want to keep some domains as internal please insert domains one per line in the textarea bellow.', 'wpforo'); ?></p>
20
<br>
21
<textarea name="wpforo_tools_misc[dofollow]" style="font-size: 13px; display:block; width:100%; height:120px;" placeholder="example.com" /><?php wpfo(WPF()->tools_misc['dofollow']) ?></textarea></td>
23
</tr>
24
<tr>
25
<td>
26
+ <label style="padding-bottom:5px; display:block;font-weight: 600;"><?php _e('Noindex forum page URLs', 'wpforo'); ?>:</label>
27
<p class="wpf-info"><?php _e('The noIndex code tells Google and other search engines to NOT index the page, so that it cannot be found in search results. Please insert page URLs you do not want to be indexed one per line in the textarea bellow.', 'wpforo'); ?></p>
28
<br>
29
<textarea name="wpforo_tools_misc[noindex]" style="font-size: 13px; display:block; width:100%; height:120px;" placeholder="https://myforum.com/community/main-forum/my-topic/" /><?php wpfo(WPF()->tools_misc['noindex']) ?></textarea></td>
33
</table>
34
</div>
35
</div>
36
+ <div class="wpf-tool-box" style="width:53%; margin-left: 1%; margin-top: 15px;">
37
+ <h3><?php _e('Admin Note', 'wpforo'); ?>
38
+ <p class="wpf-info"></p>
39
+ </h3>
40
+ <div style="margin-top:10px; clear:both;">
41
+ <table style="width:100%;">
42
+ <tbody style="padding:10px;">
43
+ <tr>
44
+ <td colspan="2">
45
+ <label style="padding-bottom:5px; display:block; font-weight: 600;"><?php _e('Admin message on forum front page', 'wpforo'); ?></label>
46
+ <p class="wpf-info"><?php _e('If you have something important to say on forum front page, you can use this editor. The text will be displayed under forum breadcrumb menu, above forum and topic titles.', 'wpforo'); ?></p>
47
+ <br>
48
+ <?php
49
+ $value = WPF()->tools_misc['admin_note'];
50
+ $args = array(
51
+ 'teeny' => false,
52
+ 'media_buttons' => true,
53
+ 'textarea_rows' => '8',
54
+ 'tinymce' => true,
55
+ 'quicktags' => array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' ),
56
+ 'textarea_name' => 'wpforo_tools_misc[admin_note]',
57
+ );
58
+ wp_editor( wp_unslash($value), 'wpforo_tools_legal_forum_privacy_text', $args ); ?>
59
+
60
+ </td>
61
+ </tr>
62
+ <tr>
63
+ <th style="vertical-align: top; padding: 10px;">
64
+ <label style="font-weight: 600"><?php _e('Display for Usergroups','wpforo'); ?></label>
65
+ </th>
66
+ <td>
67
+ <?php
68
+ $usergroups = WPF()->usergroup->get_usergroups();
69
+ $admin_note_groups = WPF()->tools_misc['admin_note_groups'];
70
+ ?>
71
+ <?php if( !empty($usergroups) ): ?>
72
+ <?php foreach( $usergroups as $usergroup ): ?>
73
+ <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
74
+ <input type="checkbox"
75
+ name="wpforo_tools_misc[admin_note_groups][]"
76
+ value="<?php echo intval($usergroup['groupid']) ?>"
77
+ <?php echo (!empty($admin_note_groups) && in_array($usergroup['groupid'], $admin_note_groups)) ? 'checked="checked"' : ''; ?>>&nbsp;
78
+ <?php echo esc_html($usergroup['name']); ?>
79
+ </label>
80
+ <?php endforeach; ?>
81
+ <?php endif; ?>
82
+ </td>
83
+ </tr>
84
+ <tr>
85
+ <th style="vertical-align: top; padding: 10px;">
86
+ <label style="font-weight: 600"><?php _e('Display on forum pages','wpforo'); ?></label>
87
+ </th>
88
+ <td>
89
+ <?php $pages = WPF()->tools_misc['admin_note_pages']; if(empty($pages)) $pages = array(); ?>
90
+ <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
91
+ <input name="wpforo_tools_misc[admin_note_pages][]" <?php if(in_array('forum', $pages)) echo 'checked' ?> value="forum" type="checkbox">&nbsp;
92
+ <?php _e('Forums', 'wpforo') ?>
93
+ </label>
94
+ <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
95
+ <input name="wpforo_tools_misc[admin_note_pages][]" <?php if(in_array('topic', $pages)) echo 'checked' ?> value="topic" type="checkbox">&nbsp;
96
+ <?php _e('Forum (topic list)', 'wpforo') ?>
97
+ </label>
98
+ <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
99
+ <input name="wpforo_tools_misc[admin_note_pages][]" <?php if(in_array('post', $pages)) echo 'checked' ?> value="post" type="checkbox">&nbsp;
100
+ <?php _e('Topic (post list)', 'wpforo') ?>
101
+ </label>
102
+ <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
103
+ <input name="wpforo_tools_misc[admin_note_pages][]" <?php if(in_array('recent', $pages)) echo 'checked' ?> value="recent" type="checkbox">&nbsp;
104
+ <?php _e('Recent Posts', 'wpforo') ?>
105
+ </label>
106
+ <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
107
+ <input name="wpforo_tools_misc[admin_note_pages][]" <?php if(in_array('members', $pages)) echo 'checked' ?> value="members" type="checkbox">&nbsp;
108
+ <?php _e('Members', 'wpforo') ?>
109
+ </label>
110
+ <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
111
+ <input name="wpforo_tools_misc[admin_note_pages][]" <?php if(in_array('profile', $pages)) echo 'checked' ?> value="profile" type="checkbox">&nbsp;
112
+ <?php _e('Profile Home', 'wpforo') ?>
113
+ </label>
114
+ <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
115
+ <input name="wpforo_tools_misc[admin_note_pages][]" <?php if(in_array('account', $pages)) echo 'checked' ?> value="account" type="checkbox">&nbsp;
116
+ <?php _e('Profile Account', 'wpforo') ?>
117
+ </label>
118
+ <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
119
+ <input name="wpforo_tools_misc[admin_note_pages][]" <?php if(in_array('activity', $pages)) echo 'checked' ?> value="activity" type="checkbox">&nbsp;
120
+ <?php _e('Profile Activity', 'wpforo') ?>
121
+ </label>
122
+ <label style="min-width: 30%; display: inline-block; padding-bottom: 5px;">
123
+ <input name="wpforo_tools_misc[admin_note_pages][]" <?php if(in_array('subscriptions', $pages)) echo 'checked' ?> value="subscriptions" type="checkbox">&nbsp;
124
+ <?php _e('Profile Subscriptions', 'wpforo') ?>
125
+ </label>
126
+
127
+ </td>
128
+ </tr>
129
+ </tbody>
130
+ </table>
131
+ </div>
132
+ </div>
133
<div class="wpforo_settings_foot" style="clear:both; margin-top:20px;">
134
<input type="submit" class="button button-primary" value="<?php _e('Update Options', 'wpforo'); ?>" />
135
</div>
wpf-admin/usergroup.php CHANGED
@@ -7,69 +7,224 @@
7
<div id="wpf-admin-wrap" class="wrap"><div id="icon-users" class="icon32"><br /></div>
8
<h2 style="padding:30px 0px 10px 0px;line-height: 20px;"><?php _e( 'Usergroups', 'wpforo') ?> <a href="<?php echo admin_url( 'admin.php?page=wpforo-usergroups&action=add' ) ?>" class="add-new-h2"><?php _e( 'Add New', 'wpforo') ?></a></h2>
9
<?php WPF()->notice->show(FALSE) ?>
10
-
11
<!-- ############################################################### Usergroup Main Form -->
12
13
<?php if( !isset($_GET['action']) || ( $_GET['action'] != 'add' && $_GET['action'] != 'del' && $_GET['action'] != 'edit') ) : ?>
14
<br/>
15
- <table id="usergroup_table" class="wp-list-table widefat fixed posts" cellspacing="0">
16
- <thead>
17
- <tr>
18
- <th width="130" scope="col" id="id" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'Usergroup id', 'wpforo') ?></span></th>
19
- <th scope="col" id="title" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'Usergroup Name', 'wpforo') ?></span></th>
20
- <th scope="col" id="count" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'Users Count', 'wpforo') ?></span></th>
21
- <th scope="col" id="default" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'New Users Default Group', 'wpforo') ?></span></th>
22
- <th scope="col" id="access" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'Default Access', 'wpforo') ?></span></th>
23
- <th scope="col" id="color" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'Color', 'wpforo') ?></span></th>
24
- </tr>
25
- </thead>
26
- <tbody id="the-list">
27
- <?php $ugroups = WPF()->usergroup->usergroup_list_data(); ?>
28
- <?php foreach( $ugroups as $key => $ugroup ) : ?>
29
- <?php $bgcolor = ( $key % 2 ) ? '#FFFFFF' : '#FCFCFC' ; ?>
30
- <tr id="usergroup-<?php echo intval($ugroup['groupid']) ?>" class="format-standard hentry alternate iedit" valign="top">
31
- <td class="post-title page-title column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; padding-left:20px; background:<?php echo esc_html($bgcolor) ?>;">
32
- <strong><?php echo $ugroup['groupid'] ?></strong>
33
- <div class="row-actions">
34
- <span class="edit"><a title="<?php _e( 'Edit this usergroup', 'wpforo') ?>" href="<?php echo admin_url( 'admin.php?page=wpforo-usergroups&gid=' . intval($ugroup['groupid']) . '&action=edit' ) ?>"><?php _e( 'Edit', 'wpforo') ?></a> |</span>
35
- <?php if( $ugroup['groupid'] != 4 && $ugroup['groupid'] != 1 ): ?>
36
- <span class="trash"><a class="submitdelete" title="<?php _e( 'Delete this usergroup', 'wpforo') ?>" href="<?php echo admin_url( 'admin.php?page=wpforo-usergroups&gid=' . intval($ugroup['groupid']) . '&action=del' ) ?>"><?php _e( 'Delete', 'wpforo') ?></a> |</span>
37
- <?php endif; ?>
38
- <span class="view"><a title="<?php _e( 'View users list in this usergroup', 'wpforo') ?>" href="<?php echo admin_url( 'admin.php?ids=&page=wpforo-members&s=&action=-1&groupid=' . intval($ugroup['groupid']) . '&paged=1&action2=-1' ) ?>" rel="permalink"><?php _e( 'View', 'wpforo') ?></a></span>
39
- </div>
40
- </td>
41
- <td class="post-title page-title column-title" style="border-bottom:1px dotted #CCCCCC; padding-left:20px; background:<?php echo esc_attr($bgcolor) ?>;">
42
- <?php $edit_url = ( $ugroup['groupid'] != 1 ? admin_url( 'admin.php?page=wpforo-usergroups&gid=' . $ugroup['groupid'] . '&action=edit' ) : '#') ?>
43
- <strong>
44
- <a class="row-title" href="<?php echo esc_url($edit_url) ?>" title="<?php _e( 'Usergroup Name', 'wpforo') ?>">
45
- <?php echo esc_html($ugroup['name']) ?>
46
- </a>
47
- </strong>
48
- </td>
49
- <td class="column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; padding-left:20px; background:<?php echo esc_html($bgcolor) ?>;">
50
- <strong><a class="row-title" href="<?php echo admin_url( 'admin.php?ids=&page=wpforo-members&s=&action=-1&groupid=' . intval($ugroup['groupid']) . '&paged=1&action2=-1' ) ?>" title="<?php _e( 'Count of users in this usergroup', 'wpforo') ?>"><?php echo intval($ugroup['count']) ?></a></strong>
51
- </td>
52
- <td class="column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; padding-left:20px; background:<?php echo esc_html($bgcolor) ?>;">
53
- <strong style="color: #00a636">
54
- <?php if( $ugroup['groupid'] == WPF()->usergroup->default_groupid ) : _e( 'is Default', 'wpforo' ); ?>
55
- <?php elseif( $ugroup['groupid'] == 4 || $ugroup['groupid'] == 1) : ?>
56
- <?php else : ?>
57
- <a class="row-title" href="<?php echo admin_url('admin.php?page=wpforo-usergroups&default=' . intval($ugroup['groupid'])) ?>" title="<?php _e('DO NOT set this option on higher level user groups !!!', 'wpforo') ?>"><?php _e('Set as Default', 'wpforo') ?></a>
58
- <?php endif ?>
59
- </strong>
60
- </td>
61
- <td class="column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; padding-left:20px; background:<?php echo esc_html($bgcolor) ?>;">
62
- <strong><?php echo $ugroup['access'] ?></strong>
63
- </td>
64
- <td class="column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; padding-left:20px; background:<?php echo esc_html($bgcolor) ?>;">
65
- <strong><?php if(!isset($ugroup['color']) || !$ugroup['color']): ?><?php _e( 'default (#15)', 'wpforo') ?><?php else: ?><input type="color" value="<?php echo $ugroup['color'] ?>" disabled /><?php endif; ?></strong>
66
- </td>
67
</tr>
68
- <?php endforeach; ?>
69
- </tbody>
70
- </table>
71
- <?php endif; ?>
72
-
73
<!-- ############################################################### Usergroup Main Form END -->
74
75
<!-- ############################################################### Add / Edit Usergroup Form -->
@@ -84,7 +239,8 @@
84
<div style="width:100%; margin-bottom:12px;">
85
<div style="display:block; float:left; padding-right:20px; width:30%; padding-bottom:15px;">
86
<div class="wpf-label-big">
87
- <?php _e( 'Usergroup Name', 'wpforo'); if( isset($_GET['gid']) && $_GET['gid'] == 4 ) echo '<span>: ' . __('Guest', 'wpforo') . '</span><br><br>'; ?>
88
<?php
89
if(isset( $_GET['gid'] )){
90
$group = WPF()->usergroup->get_usergroup($_GET['gid']);
@@ -118,12 +274,14 @@
118
</div>
119
</div>
120
<?php if( isset($_GET['gid']) && $_GET['gid'] == 4 ): ?>
121
- <input type="hidden" name="usergroup[role]" value="" />
122
<?php else: ?>
123
- <div style="display:block; float:left; width:20%; padding-bottom:15px; display:none;">
124
- <div class="wpf-label-big"><?php _e('WordPress User Role', 'wpforo') ?></div>
125
<select name="usergroup[role]" style="background:#FDFDFD; display:block;">
126
- <?php $selected = (!empty($group) && isset($group['role'])) ? $group['role'] : '' ; ?>
127
<?php wp_dropdown_roles( $selected ); ?>
128
</select>
129
</div>
@@ -142,12 +300,17 @@
142
</div>
143
<?php endif; ?>
144
<div style="padding: 10px 1px 5px 1px;">
145
- <label><?php _e('Display on Members List', 'wpforo') ?> <input type="checkbox" name="usergroup[visible]" value="1" <?php echo ( $group['visible'] ) ? 'checked="checked"' : ''; ?> /> </label>
146
- </div>
147
</div>
148
<div style="clear:both;"></div>
149
</div>
150
-
151
<?php $cans = WPF()->perm->usergroup_cans_form( ( isset($_GET['gid'] ) ? $_GET['gid'] : FALSE ) ); ?>
152
<?php $n = 0; foreach( $cans as $can => $data ) : ?>
153
<?php if( $n%4 == 0 ): ?>
7
<div id="wpf-admin-wrap" class="wrap"><div id="icon-users" class="icon32"><br /></div>
8
<h2 style="padding:30px 0px 10px 0px;line-height: 20px;"><?php _e( 'Usergroups', 'wpforo') ?> <a href="<?php echo admin_url( 'admin.php?page=wpforo-usergroups&action=add' ) ?>" class="add-new-h2"><?php _e( 'Add New', 'wpforo') ?></a></h2>
9
<?php WPF()->notice->show(FALSE) ?>
10
+ <?php if( wpfval($_GET, 'sfin') ): ?>
11
+ <div class="notice is-dismissible notice-success" style="width: 94%;">
12
+ <p><?php _e('Role-Usergroup synchronization is complete!', 'wpforo'); ?></p>
13
+ <button type="button" class="notice-dismiss">
14
+ <span class="screen-reader-text"><?php _e('Dismiss this notice.'); ?></span>
15
+ </button>
16
+ <button type="button" class="notice-dismiss"><span class="screen-reader-text"><?php _e('Dismiss this notice.'); ?></span></button>
17
+ </div>
18
+ <?php endif; ?>
19
<!-- ############################################################### Usergroup Main Form -->
20
21
<?php if( !isset($_GET['action']) || ( $_GET['action'] != 'add' && $_GET['action'] != 'del' && $_GET['action'] != 'edit') ) : ?>
22
<br/>
23
+ <form action="" method="post" class="wpforo-ajax-form">
24
+ <table id="usergroup_table" class="wp-list-table widefat fixed posts" cellspacing="0">
25
+ <thead>
26
+ <tr>
27
+ <?php if( wpforo_feature('role-synch')): ?>
28
+ <th scope="col" id="role" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'User Role', 'wpforo') ?> &nbsp;<a href="https://codex.wordpress.org/Roles_and_Capabilities" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank" style="font-size: 14px;"><i class="far fa-question-circle"></i></a></span></th>
29
+ <?php endif; ?>
30
+ <th scope="col" id="title" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'Usergroup', 'wpforo') ?> &nbsp;<a href="https://wpforo.com/docs/root/members/usergroups-and-permissions/" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank" style="font-size: 14px;"><i class="far fa-question-circle"></i></a></span></th>
31
+ <th scope="col" id="count" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'Members', 'wpforo') ?></span></th>
32
+ <th scope="col" id="default" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'Default', 'wpforo') ?></span></th>
33
+ <th scope="col" id="access" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'Default Access', 'wpforo') ?></span></th>
34
+ <th scope="col" id="color" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'Color', 'wpforo') ?></span></th>
35
+ <th scope="col" id="id" class="manage-column column-title" style="padding:10px; width: 4%; font-size:14px; padding-left:15px; font-weight:bold; text-align: center;"><span><?php _e( 'ID', 'wpforo') ?></span></th>
36
</tr>
37
+ </thead>
38
+ <tbody id="the-list">
39
+ <?php $ugroups = WPF()->usergroup->usergroup_list_data(); ?>
40
+ <?php foreach( $ugroups as $key => $ugroup ) : ?>
41
+ <tr id="usergroup-<?php echo intval($ugroup['groupid']) ?>" class="format-standard hentry alternate iedit" valign="top">
42
+ <?php if( wpforo_feature('role-synch')): ?>
43
+ <td class="post-title page-title column-title" style="border-bottom:1px dotted #CCCCCC; padding-left:20px;">
44
+ <?php
45
+ $ug_role = trim($ugroup['role']);
46
+ $ug_role = ( wp_roles()->is_role( $ug_role ) ) ? $ug_role = '<a href="' . admin_url( 'users.php?role=' . $ugroup['role'] ) .'" title="' . __('View Users', 'wpforo') . '" target="_blank"><i class="far fa-user"></i></a>' : '' ;
47
+ ?>
48
+ <span style="font-size: 16px; vertical-align: middle;"><?php echo $ug_role; ?></span> &nbsp;
49
+ <?php if( $ugroup['groupid'] != 4 && $ugroup['groupid'] != 1) : ?>
50
+ <select name="wpf_synch_roles[<?php echo $ugroup['groupid'] ?>]" style="background:#FDFDFD; display:inline;">
51
+ <?php $selected = ( wpfval($ugroup, 'role') ) ? $ugroup['role'] : 'subscriber'; ?>
52
+ <?php wp_dropdown_roles( $selected ); ?>
53
+ </select>
54
+ <?php elseif( $ugroup['groupid'] == 1 ): ?>
55
+ <span style="font-size: 14px; vertical-align: bottom;">&nbsp;<?php echo $ugroup['role']; ?></span>
56
+ <input type="hidden" name="wpf_synch_roles[1]" value="administrator">
57
+ <?php endif; ?>
58
+ </td>
59
+ <?php endif; ?>
60
+ <td class="post-title page-title column-title" style="border-bottom:1px dotted #CCCCCC; padding-left:20px; background:#ffffff;">
61
+ <?php $edit_url = ( $ugroup['groupid'] != 1 ? admin_url( 'admin.php?page=wpforo-usergroups&gid=' . $ugroup['groupid'] . '&action=edit' ) : '#') ?>
62
+ <strong>
63
+ <a class="row-title" href="<?php echo esc_url($edit_url) ?>" title="<?php _e( 'Usergroup Name', 'wpforo') ?>">
64
+ <?php echo esc_html($ugroup['name']) ?>
65
+ </a> <?php if( wpfval($ugroup, 'secondary') ): ?>&nbsp;<span style="font-size: 12px; color: #777777;" title="<?php _e('Also used as Secondary Usergroup'); ?>"><i class="fas fa-pause"></i></span><?php endif; ?>
66
+ </strong>
67
+ <div class="row-actions">
68
+ <span class="edit"><a title="<?php _e( 'Edit this usergroup', 'wpforo') ?>" href="<?php echo admin_url( 'admin.php?page=wpforo-usergroups&gid=' . intval($ugroup['groupid']) . '&action=edit' ) ?>"><?php _e( 'Edit', 'wpforo') ?></a> |</span>
69
+ <?php if( $ugroup['groupid'] != 4 && $ugroup['groupid'] != 1 ): ?>
70
+ <span class="trash"><a class="submitdelete" title="<?php _e( 'Delete this usergroup', 'wpforo') ?>" href="<?php echo admin_url( 'admin.php?page=wpforo-usergroups&gid=' . intval($ugroup['groupid']) . '&action=del' ) ?>"><?php _e( 'Delete', 'wpforo') ?></a> |</span>
71
+ <?php endif; ?>
72
+ <span class="view"><a title="<?php _e( 'View users list in this usergroup', 'wpforo') ?>" href="<?php echo admin_url( 'admin.php?ids=&page=wpforo-members&s=&action=-1&groupid=' . intval($ugroup['groupid']) . '&paged=1&action2=-1' ) ?>" rel="permalink"><?php _e( 'View', 'wpforo') ?></a></span>
73
+ </div>
74
+ </td>
75
+ <td class="column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; padding-left:20px; background:#ffffff;">
76
+ <?php if( $ugroup['groupid'] != 4) : ?>
77
+ <strong><a class="row-title" href="<?php echo admin_url( 'admin.php?ids=&page=wpforo-members&s=&action=-1&groupid=' . intval($ugroup['groupid']) . '&paged=1&action2=-1' ) ?>" title="<?php _e( 'The number of forum members with this usergroup. Click to view members.', 'wpforo') ?>"><i class="fas fa-user"></i>&nbsp; <?php echo intval($ugroup['count']) ?></a></strong>
78
+ <?php endif; ?>
79
+ </td>
80
+ <td class="column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; padding-left:20px; background:#ffffff;">
81
+ <strong style="color: #00a636">
82
+ <?php if( $ugroup['groupid'] == WPF()->usergroup->default_groupid ) : _e( 'is Default', 'wpforo' ); ?>
83
+ <?php elseif( $ugroup['groupid'] == 4 || $ugroup['groupid'] == 1) : ?>
84
+ <?php else : ?>
85
+ <a class="row-title" href="<?php echo admin_url('admin.php?page=wpforo-usergroups&default=' . intval($ugroup['groupid'])) ?>" title="<?php _e('Users get the Default Usergroup on registration', 'wpforo') ?>"><?php _e('Set as Default', 'wpforo') ?></a>
86
+ <?php endif ?>
87
+ </strong>
88
+ </td>
89
+ <td class="column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; padding-left:20px; background:#ffffff;">
90
+ <strong><?php echo $ugroup['access'] ?></strong>
91
+ </td>
92
+ <td class="column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; padding-left:20px; background:#ffffff;">
93
+ <strong><?php if(!isset($ugroup['color']) || !$ugroup['color']): ?><?php _e( 'default (#15)', 'wpforo') ?><?php else: ?><input type="color" value="<?php echo $ugroup['color'] ?>" disabled /><?php endif; ?></strong>
94
+ </td>
95
+ <td class="post-title page-title column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; background:#ffffff; text-align: center;">
96
+ <strong><?php echo $ugroup['groupid'] ?></strong>
97
+ </td>
98
+ </tr>
99
+ <?php endforeach; ?>
100
+ </tbody>
101
+ <tfoot>
102
+ <tr>
103
+ <?php if( wpforo_feature('role-synch')): ?>
104
+ <td style="text-align: center;">
105
+ <button class="button button-primary forum_submit wpf-synch-roles" title="<?php _e('Synchronize Users Usergroups and Roles', 'wpforo') ?>" style="margin: 5px auto;" />
106
+ <?php _e('Synchronize', 'wpforo') ?>
107
+ <i class="fas wpf-spinner"></i>
108
+ </button>
109
+ <?php
110
+ $wpf_nonce = wp_create_nonce('wpforo_synch_roles');
111
+ $wpf_data = get_option('wpforo-synch-roles');
112
+ $wpf_id = ( wpfval($wpf_data, 'id') ) ? intval($wpf_data['id']) : 0;
113
+ $wpf_start = ( wpfval($wpf_data, 'start') ) ? intval($wpf_data['start']) : 0;
114
+ $wpf_step = ( wpfval($wpf_data, 'step') ) ? intval($wpf_data['step']) : 1;
115
+ $wpf_left = ( wpfval($wpf_data, 'left') ) ? intval($wpf_data['left']) : 0;
116
+ ?>
117
+ <input type="hidden" name="wpf-start-id" value="<?php echo intval($wpf_id) ?>" class="wpf-start-id"/>
118
+ <input type="hidden" name="wpf-start" value="<?php echo intval($wpf_start) ?>" class="wpf-start"/>
119
+ <input type="hidden" name="wpf-step" value="<?php echo intval($wpf_step) ?>" class="wpf-step"/>
120
+ <input type="hidden" name="wpf-left-users" value="<?php echo intval($wpf_left) ?>" class="wpf-left-users"/>
121
+ </td>
122
+ <?php endif; ?>
123
+ <td style="text-align:left; vertical-align: middle; padding:10px 20px;"><span class="wpf-progress" style="font-size: 14px; display: inline-block; font-weight: 600; line-height: 18px;">&nbsp;</span></td>
124
+ <td></td>
125
+ <td></td>
126
+ <td></td>
127
+ <td></td>
128
+ <td></td>
129
+ </tr>
130
+ </tfoot>
131
+ </table>
132
+ </form>
133
+
134
+ <?php if( wpforo_feature('role-synch')): ?>
135
+ <p class="description" style="box-shadow: 1px 1px 6px #cccccc; background: #f7f7f7; padding: 20px; width: 95%; margin: 20px 0px 0px 0px; font-size: 14px;">
136
+ <span style="color: #ff4b3c; font-weight: 600;"><?php _e('Note:', 'wpforo') ?></span>
137
+ <?php _e('The [Synchronize] button changes all users Usergroups according to the users Roles. For example, if you select "Contributor" Role for "Registered" Usergroup, all users with "Contributor" Role will get "Registered" Usergroup in forum. The synchronization process may take a few seconds or dozens of minutes, it depends on the number of users. Please be patient, don\'t close this page and wait until the progress counter says 100% completed.', 'wpforo'); ?>
138
+ </p>
139
+ <?php endif; ?>
140
+
141
+ <p id="synch" style="margin: 4px;">&nbsp;</p>
142
+
143
+ <?php if( wpforo_feature('role-synch')): ?>
144
+ <?php $roles_wug = WPF()->usergroup->get_roles(); $roles_ug = WPF()->usergroup->get_roles_ug(); $roles_users = count_users(); ?>
145
+ <?php if(!empty($roles_wug)): ?>
146
+ <h1 style="padding-bottom: 0px; width: 97%; margin-bottom: 15px;">&nbsp;<?php _e('User Roles'); ?></h1>
147
+ <p class="description" style="border-top: 1px solid #cccccc; background: #f7f7f7; padding: 15px 20px; width: 95%; margin: 10px 0px 20px 0px; font-size: 14px;">
148
+ <?php _e('In the table above (Usergroups) you can see the list of all available forum Usergroups. The first column of this table displays selected User Roles which are synched with certain Usergroup. However some User Roles are still not synced with any Usergroup of your forum. You can find not-synced User Roles in the table below (User Roles). If you use any of these not-synced User Roles and you want to grant some forum accesses to users of these User Roles you should create new Usergroups for each of them. Once new Usergroup is created, you should use the [Synchronize] button in the table above to synchronize User Roles with new Usergroups.'); ?>
149
+ </p>
150
+ <table id="usergroup_table" class="wp-list-table widefat fixed posts" cellspacing="0">
151
+ <thead>
152
+ <tr>
153
+ <th scope="col" id="role" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'Role Name', 'wpforo') ?></span></th>
154
+ <th scope="col" id="id" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'User Role', 'wpforo') ?></span></th>
155
+ <th scope="col" id="title" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'Usergroups', 'wpforo') ?></span></th>
156
+ <th scope="col" id="count" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'Users', 'wpforo') ?></span></th>
157
+ <th scope="col" id="default" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold; width: 40%;"><span><?php _e( 'Status', 'wpforo') ?></th>
158
+ </tr>
159
+ </thead>
160
+ <tbody id="the-list">
161
+ <?php foreach( $roles_wug as $role_key => $role_name ): ?>
162
+ <tr>
163
+ <td class="column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; padding-left:20px; background:#F9F9F9; font-weight: 600; font-size: 14px;"><?php echo $role_name; ?></td>
164
+ <td class="column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; padding-left:20px; background:#ffffff; color: #c420fa; font-weight: 600;"><?php echo $role_key; ?></td>
165
+ <td class="column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; padding-left:20px; background:#ffffff;"><?php echo (wpfval($roles_ug, $role_key)) ? '<span style="color:#43a6df; font-weight: 600;">' . implode(', ', $roles_ug[$role_key]) . '</span>' : 'default' ; ?></td>
166
+ <td class="column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; padding-left:20px; background:#ffffff; font-weight: 600; font-size: 14px;">
167
+ <?php echo ( wpfval($roles_users, 'avail_roles') && wpfval($roles_users, 'avail_roles', $role_key) && $roles_users['avail_roles'][$role_key] ) ? '<a href="' . admin_url( 'users.php?role=' . $role_key ) .'" title="' . __('View Users', 'wpforo') . '" target="_blank"><i class="far fa-user"></i> &nbsp;'. intval($roles_users['avail_roles'][$role_key]) .'</a>' : 0; ?>
168
+ </td>
169
+ <td class="column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; padding:10px; background:#ffffff;">
170
+ <?php if(!wpfval($roles_ug, $role_key)): ?>
171
+ <a href="<?php echo admin_url( 'admin.php?page=wpforo-usergroups&action=add&role=' . $role_key ) ?>" class="add-new-h2" style="display: inline-block; vertical-align: middle; top: 0;"><?php _e( 'Add Usergroup to synch', 'wpforo') ?></a>
172
+ <?php elseif( count($roles_ug[$role_key]) > 1 ): ?>
173
+ <span style="color: #f61700; font-weight: 600; padding: 0px 5px; display: inline-block;"><?php _e('Not Synched', 'wpforo') ?></span>
174
+ <p class="wpf-info" style="padding: 0px 4px;"><?php _e('One User Role cannot be synched with multiple Usergroups.', 'wpforo') ?></p>
175
+ <?php else: ?>
176
+ <span style="color: #00a636; font-weight: 600; padding: 0px 5px; display: inline-block;"><?php _e('Synched', 'wpforo') ?></span>
177
+ <?php endif; ?>
178
+ </td>
179
+ </tr>
180
+ <?php endforeach; ?>
181
+ </tbody>
182
+ </table>
183
+ <?php endif; ?>
184
+ <script type="text/javascript">
185
+ jQuery(document).ready(function($){
186
+ $(document).delegate('.wpf-synch-roles', 'click', function (e) {
187
+ e.preventDefault(); if ($('.wpf-left-users').val() >= 0 ) { var btn = $(this); btn.attr('disabled', 'disabled'); $('.fas', btn).addClass('fa-pulse fa-spinner').removeClass('wpf-spinner'); wpforo_update_roles(btn); }
188
+ });
189
+ function wpforo_update_roles(btn) {
190
+ inprocess = true; var data = btn.parents('.wpforo-ajax-form').serialize();
191
+ $.ajax({
192
+ type: 'POST',
193
+ url: ajaxurl,
194
+ data: { wpforo_synch_roles_data: data, action: 'wpforo_synch_roles', checkthis: '<?php echo wp_create_nonce( "wpforo_synch_roles" ) ?>'}
195
+ }).done(function (response) {
196
+ try {
197
+ var resp = $.parseJSON(response);
198
+ $('.wpf-step').val(resp.step);
199
+ $('.wpf-start').val(resp.start);
200
+ $('.wpf-start-id').val(resp.id);
201
+ $('.wpf-left-users').val(resp.left);
202
+ if (resp.progress < 100) {
203
+ wpforo_update_roles(btn);
204
+ } else {
205
+ btn.removeAttr("disabled"); $('.fas', btn).removeClass('fa-pulse fa-spinner').addClass('wpf-spinner');
206
+ }
207
+ if (resp.progress <= 1) {
208
+ $('.wpf-progress').text(1 + '%');
209
+ } else {
210
+ if (resp.progress < 100) {
211
+ $('.wpf-progress').text(resp.progress + '%');
212
+ } else {
213
+ $('.wpf-progress').css({'color': '#00a636'}); $('.wpf-progress').text(resp.progress + '% <?php _e('Complete!', 'wpforo'); ?>'); $('.wpf-left-users').val(0); $('.wpf-step').val(0); $('.wpf-start-id').val(0); inprocess = false;
214
+ window.location.replace("<?php echo admin_url('admin.php?page=wpforo-usergroups&sfin=1') ?>");
215
+ }
216
+ }
217
+ } catch (e) {
218
+ console.log(e);
219
+ }
220
+ });
221
+ }
222
+ });
223
+ </script>
224
+ <?php endif; ?>
225
+ <?php endif; ?>
226
+
227
+
228
<!-- ############################################################### Usergroup Main Form END -->
229
230
<!-- ############################################################### Add / Edit Usergroup Form -->
239
<div style="width:100%; margin-bottom:12px;">
240
<div style="display:block; float:left; padding-right:20px; width:30%; padding-bottom:15px;">
241
<div class="wpf-label-big">
242
+ <?php _e( 'Usergroup Name', 'wpforo'); if( isset($_GET['gid']) && $_GET['gid'] == 4 ) echo '<span>: ' . __('Guest', 'wpforo') . '</span>'; ?>
243
+ &nbsp;<a href="https://wpforo.com/docs/root/members/usergroups-and-permissions/" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank" style="font-size: 14px;"><i class="far fa-question-circle"></i></a><br>
244
<?php
245
if(isset( $_GET['gid'] )){
246
$group = WPF()->usergroup->get_usergroup($_GET['gid']);
274
</div>
275
</div>
276
<?php if( isset($_GET['gid']) && $_GET['gid'] == 4 ): ?>
277
+ <input type="hidden" name="usergroup[role]" value=""/>
278
+ <?php elseif( isset($_GET['gid']) && $_GET['gid'] == 1 ): ?>
279
+ <input type="hidden" name="usergroup[role]" value="administrator"/>
280
<?php else: ?>
281
+ <div style="display:block; float:left; width:20%; padding-bottom:15px;">
282
+ <div class="wpf-label-big"><?php _e('User Role', 'wpforo') ?></div>
283
<select name="usergroup[role]" style="background:#FDFDFD; display:block;">
284
+ <?php if(wpfval($_GET, 'role')){ $selected = sanitize_title( $_GET['role'] ); } else{ $selected = (!empty($group) && isset($group['role'])) ? $group['role'] : 'subscriber'; } ?>
285
<?php wp_dropdown_roles( $selected ); ?>
286
</select>
287
</div>
300
</div>
301
<?php endif; ?>
302
<div style="padding: 10px 1px 5px 1px;">
303
+ <label style="display: block;"><input type="checkbox" name="usergroup[visible]" value="1" <?php echo (wpfval($group, 'visible')) ? 'checked="checked"' : ''; ?> /> <?php _e('Display on Members List', 'wpforo') ?></label>
304
+ <?php if( isset($_GET['gid']) && ($_GET['gid'] == 4 || $_GET['gid'] == 1) ): ?>
305
+ <input type="hidden" name="usergroup[secondary]" value="0">
306
+ <?php else: ?>
307
+ <label style="display: block;"><input type="checkbox" name="usergroup[secondary]" value="1" <?php echo (wpfval($group, 'secondary')) ? 'checked="checked"' : ''; ?> /> <?php _e('Can be also used as Secondary Usergroup', 'wpforo') ?></label>
308
+ <?php endif; ?>
309
+ </div>
310
</div>
311
<div style="clear:both;"></div>
312
</div>
313
+
314
<?php $cans = WPF()->perm->usergroup_cans_form( ( isset($_GET['gid'] ) ? $_GET['gid'] : FALSE ) ); ?>
315
<?php $n = 0; foreach( $cans as $can => $data ) : ?>
316
<?php if( $n%4 == 0 ): ?>
wpf-admin/xml/english.xml CHANGED
@@ -218,7 +218,7 @@
218
<phrase name="Subscribe options successfully updated"><![CDATA[Subscribe options successfully updated]]></phrase>
219
<phrase name="Subscribe options successfully updated, but previous value not changed"><![CDATA[Subscribe options successfully updated, but previous value not changed]]></phrase>
220
<phrase name="Subscriptions"><![CDATA[Subscriptions]]></phrase>
221
- <phrase name="Success! Thank you Dear Friend"><![CDATA[Success! Thank you Dear Friend]]></phrase>
222
<phrase name="Success! Thank you. Please check your email and click confirmation link below to complete this step."><![CDATA[Success! Thank you. Please check your email and click confirmation link below to complete this step.]]></phrase>
223
<phrase name="Successfully updated"><![CDATA[Successfully updated]]></phrase>
224
<phrase name="Successfully voted"><![CDATA[Successfully voted]]></phrase>
@@ -488,4 +488,50 @@
488
<phrase name="Subscription Manager"><![CDATA[Subscription Manager]]></phrase>
489
<phrase name="topics and posts"><![CDATA[topics and posts]]></phrase>
490
<phrase name="topics"><![CDATA[topics]]></phrase>
491
</language>
218
<phrase name="Subscribe options successfully updated"><![CDATA[Subscribe options successfully updated]]></phrase>
219
<phrase name="Subscribe options successfully updated, but previous value not changed"><![CDATA[Subscribe options successfully updated, but previous value not changed]]></phrase>
220
<phrase name="Subscriptions"><![CDATA[Subscriptions]]></phrase>
221
+ <phrase name="Success!"><![CDATA[Success!]]></phrase>
222
<phrase name="Success! Thank you. Please check your email and click confirmation link below to complete this step."><![CDATA[Success! Thank you. Please check your email and click confirmation link below to complete this step.]]></phrase>
223
<phrase name="Successfully updated"><![CDATA[Successfully updated]]></phrase>
224
<phrase name="Successfully voted"><![CDATA[Successfully voted]]></phrase>
488
<phrase name="Subscription Manager"><![CDATA[Subscription Manager]]></phrase>
489
<phrase name="topics and posts"><![CDATA[topics and posts]]></phrase>
490
<phrase name="topics"><![CDATA[topics]]></phrase>
491
+ <phrase name="No data submitted"><![CDATA[No data submitted]]></phrase>
492
+ <phrase name="User profile fields not found"><![CDATA[User profile fields not found]]></phrase>
493
+ <phrase name="field is required"><![CDATA[field is required]]></phrase>
494
+ <phrase name="field value must be at least %d"><![CDATA[field value must be at least %d]]></phrase>
495
+ <phrase name="field value cannot be greater than %d"><![CDATA[field value cannot be greater than %d]]></phrase>
496
+ <phrase name="field length must be at least %d characters"><![CDATA[field length must be at least %d characters]]></phrase>
497
+ <phrase name="field length cannot be greater than %d characters"><![CDATA[field length can not be greater than %d characters]]></phrase>
498
+ <phrase name="field value is not a valid URL"><![CDATA[field value is not a valid URL]]></phrase>
499
+ <phrase name="file type is not detected"><![CDATA[file type is not detected]]></phrase>
500
+ <phrase name="file type %s is not allowed"><![CDATA[file type %s is not allowed]]></phrase>
501
+ <phrase name="file is too large"><![CDATA[file is too large]]></phrase>
502
+ <phrase name="Success! Please check your mail for confirmation."><![CDATA[Success! Please check your mail for confirmation.]]></phrase>
503
+ <phrase name="Username length must be between %d characters and %d characters."><![CDATA[Username length must be between %d characters and %d characters.]]></phrase>
504
+ <phrase name="User registration is disabled."><![CDATA[User registration is disabled.]]></phrase>
505
+ <phrase name="Avatar image is too big maximum allowed size is 2MB"><![CDATA[Avatar image is too big maximum allowed size is 2MB]]></phrase>
506
+ <phrase name="One of the selected Usergroups cannot be set as Secondary"><![CDATA[One of the selected Usergroups cannot be set as Secondary]]></phrase>
507
+ <phrase name="The selected Usergroup is not found in allowed list"><![CDATA[The selected Usergroup is not found in allowed list]]></phrase>
508
+ <phrase name="The selected Usergroup cannot be set"><![CDATA[The selected Usergroup cannot be set]]></phrase>
509
+ <phrase name="Admin and Moderator Usergroups are not permitted"><![CDATA[Admin and Moderator Usergroups are not permitted]]></phrase>
510
+ <phrase name="You have no permission to edit Usergroup field"><![CDATA[You have no permission to edit Usergroup field]]></phrase>
511
+ <phrase name="This nickname is already in use. Please insert another."><![CDATA[This nickname is already in use. Please insert another.]]></phrase>
512
+ <phrase name="Nickname validation failed"><![CDATA[Nickname validation failed]]></phrase>
513
+ <phrase name="Numerical nicknames are not allowed. Please insert another."><![CDATA[Numerical nicknames are not allowed. Please insert another.]]></phrase>
514
+ <phrase name="Maximum allowed file size is %s MB"><![CDATA[Maximum allowed file size is %s MB]]></phrase>
515
+ <phrase name="You are not allowed to attach this file type"><![CDATA[You are not allowed to attach this file type]]></phrase>
516
+ <phrase name="This email address is already registered. Please insert another"><![CDATA[This email address is already registered. Please insert another]]></phrase>
517
+ <phrase name="Allowed file types: %s"><![CDATA[Allowed file types: %s]]></phrase>
518
+ <phrase name="Form name not found"><![CDATA[Form name not found]]></phrase>
519
+ <phrase name="Form template not found"><![CDATA[Form template not found]]></phrase>
520
+ <phrase name="Profile updated successfully"><![CDATA[Profile updated successfully]]></phrase>
521
+ <phrase name="User data update failed"><![CDATA[User data update failed]]></phrase>
522
+ <phrase name="User profile update failed"><![CDATA[User profile update failed]]></phrase>
523
+ <phrase name="User custom field update failed"><![CDATA[User custom field update failed]]></phrase>
524
+ <phrase name="Sorry, there was an error uploading attached file"><![CDATA[Sorry, there was an error uploading attached file]]></phrase>
525
+ <phrase name="Edit Topic"><![CDATA[Edit Topic]]></phrase>
526
+ <phrase name="This topic was modified %s by %s"><![CDATA[This topic was modified %s by %s]]></phrase>
527
+ <phrase name="Edit Post"><![CDATA[Edit Post]]></phrase>
528
+ <phrase name="This post was modified %s by %s"><![CDATA[This post was modified %s by %s]]></phrase>
529
+ <phrase name="Topics Started"><![CDATA[Topics Started]]></phrase>
530
+ <phrase name="Replies Created"><![CDATA[Replies Created]]></phrase>
531
+ <phrase name="Liked Posts"><![CDATA[Liked Posts]]></phrase>
532
+ <phrase name="Topic link"><![CDATA[Topic link]]></phrase>
533
+ <phrase name="Forum Topics Started"><![CDATA[Forum Topics Started]]></phrase>
534
+ <phrase name="Forum Replies Created"><![CDATA[Forum Replies Created]]></phrase>
535
+ <phrase name="Liked Forum Posts"><![CDATA[Liked Forum Posts]]></phrase>
536
+ <phrase name="Forum Subscriptions"><![CDATA[Forum Subscriptions]]></phrase>
537
</language>
wpf-includes/class-activity.php ADDED
@@ -0,0 +1,300 @@
1
+ <?php
2
+ // Exit if accessed directly
3
+ if (!defined('ABSPATH')) exit;
4
+
5
+ class wpForoActivity
6
+ {
7
+ private $default;
8
+ public $options;
9
+ public $activity;
10
+ private $actions;
11
+
12
+ public function __construct()
13
+ {
14
+ add_action( 'init', array($this, 'init'), 11 );
15
+ }
16
+
17
+ public function init()
18
+ {
19
+ $this->init_defaults();
20
+ $this->init_options();
21
+ $this->activity = $this->default->activity;
22
+ $this->init_hooks();
23
+ $this->init_actions();
24
+ }
25
+
26
+ private function init_actions(){
27
+ $this->actions = array(
28
+ 'edit_topic' => array(
29
+ 'title' => wpforo_phrase('Edit Topic', false),
30
+ 'description' => wpforo_phrase('This topic was modified %s by %s', false),
31
+ 'before' => '<div class="wpf-post-edited"><i class="far fa-edit"></i>',
32
+ 'after' => '</div>',
33
+ ),
34
+ 'edit_post' => array(
35
+ 'title' => wpforo_phrase('Edit Post', false),
36
+ 'description' => wpforo_phrase('This post was modified %s by %s', false),
37
+ 'before' => '<div class="wpf-post-edited"><i class="far fa-edit"></i>',
38
+ 'after' => '</div>',
39
+ )
40
+ );
41
+ }
42
+
43
+ private function init_defaults()
44
+ {
45
+ $this->default = new stdClass();
46
+ $this->default->options = array(
47
+ 'edit_topic' => 1,
48
+ 'edit_post' => 1
49
+ );
50
+ $this->default->activity = array(
51
+ 'id' => 0,
52
+ 'type' => '',
53
+ 'itemid' => 0,
54
+ 'itemtype' => '',
55
+ 'itemid_second' => 0,
56
+ 'userid' => 0,
57
+ 'name' => '',
58
+ 'email' => '',
59
+ 'date' => 0,
60
+ 'content' => '',
61
+ 'permalink' => ''
62
+ );
63
+ $this->default->activity_format = array(
64
+ 'id' => '%d',
65
+ 'type' => '%s',
66
+ 'itemid' => '%d',
67
+ 'itemtype' => '%s',
68
+ 'itemid_second' => '%d',
69
+ 'userid' => '%d',
70
+ 'name' => '%s',
71
+ 'email' => '%s',
72
+ 'date' => '%d',
73
+ 'content' => '%s',
74
+ 'permalink' => '%s'
75
+ );
76
+ $this->default->sql_select_args = array(
77
+ 'include' => array(),
78
+ 'exclude' => array(),
79
+ 'userids_include' => array(),
80
+ 'userids_exclude' => array(),
81
+ 'types_include' => array(),
82
+ 'types_exclude' => array(),
83
+ 'itemids_include' => array(),
84
+ 'itemids_exclude' => array(),
85
+ 'itemtypes_include' => array(),
86
+ 'itemtypes_exclude' => array(),
87
+ 'emails_include' => array(),
88
+ 'emails_exclude' => array(),
89
+ 'orderby' => 'id',
90
+ 'order' => 'ASC',
91
+ 'offset' => NULL,
92
+ 'row_count' => NULL
93
+ );
94
+ }
95
+
96
+ private function init_options()
97
+ {
98
+ $this->options = get_wpf_option('wpforo_activity_options', $this->default->options);
99
+ }
100
+
101
+ private function init_hooks()
102
+ {
103
+ if ($this->options['edit_topic']) add_action('wpforo_after_edit_topic', array($this, 'action_edit_topic'));
104
+ if ($this->options['edit_post']) add_action('wpforo_after_edit_post', array($this, 'action_edit_post'));
105
+ }
106
+
107
+ private function parse_args($args)
108
+ {
109
+ $args = wpforo_parse_args($args, $this->default->sql_select_args);
110
+
111
+ $args['include'] = wpforo_parse_args($args['include']);
112
+ $args['exclude'] = wpforo_parse_args($args['exclude']);
113
+
114
+ $args['userids_include'] = wpforo_parse_args($args['userids_include']);
115
+ $args['userids_exclude'] = wpforo_parse_args($args['userids_exclude']);
116
+
117
+ $args['types_include'] = wpforo_parse_args($args['types_include']);
118
+ $args['types_exclude'] = wpforo_parse_args($args['types_exclude']);
119
+
120
+ $args['itemids_include'] = wpforo_parse_args($args['itemids_include']);
121
+ $args['itemids_exclude'] = wpforo_parse_args($args['itemids_exclude']);
122
+
123
+ $args['itemtypes_include'] = wpforo_parse_args($args['itemtypes_include']);
124
+ $args['itemtypes_exclude'] = wpforo_parse_args($args['itemtypes_exclude']);
125
+
126
+ $args['emails_include'] = wpforo_parse_args($args['emails_include']);
127
+ $args['emails_exclude'] = wpforo_parse_args($args['emails_exclude']);
128
+
129
+ return $args;
130
+ }
131
+
132
+ private function build_sql_select($args)
133
+ {
134
+ $args = $this->parse_args($args);
135
+
136
+ $wheres = array();
137
+ if (!empty($args['include'])) $wheres[] = "`id` IN(" . implode(',', array_map('wpforo_bigintval', $args['include'])) . ")";
138
+ if (!empty($args['exclude'])) $wheres[] = "`id` NOT IN(" . implode(',', array_map('wpforo_bigintval', $args['exclude'])) . ")";
139
+
140
+ if (!empty($args['userids_include'])) $wheres[] = "`userid` IN(" . implode(',', array_map('wpforo_bigintval', $args['userids_include'])) . ")";
141
+ if (!empty($args['userids_exclude'])) $wheres[] = "`userid` NOT IN(" . implode(',', array_map('wpforo_bigintval', $args['userids_exclude'])) . ")";
142
+
143
+ if (!empty($args['types_include'])) $wheres[] = "`type` IN('" . implode("','", array_map('trim', $args['types_include'])) . "')";
144
+ if (!empty($args['types_exclude'])) $wheres[] = "`type` IN('" . implode("','", array_map('trim', $args['types_exclude'])) . "')";
145
+
146
+ if (!empty($args['itemids_include'])) $wheres[] = "`itemid` IN(" . implode(',', array_map('wpforo_bigintval', $args['itemids_include'])) . ")";
147
+ if (!empty($args['itemids_exclude'])) $wheres[] = "`itemid` NOT IN(" . implode(',', array_map('wpforo_bigintval', $args['itemids_exclude'])) . ")";
148
+
149
+ if (!empty($args['itemtypes_include'])) $wheres[] = "`itemtype` IN('" . implode("','", array_map('trim', $args['itemtypes_include'])) . "')";
150
+ if (!empty($args['itemtypes_exclude'])) $wheres[] = "`itemtype` IN('" . implode("','", array_map('trim', $args['itemtypes_exclude'])) . "')";
151
+
152
+ if (!empty($args['emails_include'])) $wheres[] = "`email` IN('" . implode("','", array_map('trim', $args['emails_include'])) . "')";
153
+ if (!empty($args['emails_exclude'])) $wheres[] = "`email` IN('" . implode("','", array_map('trim', $args['emails_exclude'])) . "')";
154
+
155
+ $sql = "SELECT * FROM " . WPF()->tables->activity;
156
+ if ($wheres) $sql .= " WHERE " . implode($wheres, " AND ");
157
+ $sql .= " ORDER BY " . $args['orderby'] . " " . $args['order'];
158
+ if ($args['row_count']) $sql .= " LIMIT " . wpforo_bigintval($args['offset']) . "," . wpforo_bigintval($args['row_count']);
159
+
160
+ return $sql;
161
+ }
162
+
163
+ public function get_activity($args)
164
+ {
165
+ if (!$args) return false;
166
+ return WPF()->db->get_row($this->build_sql_select($args), ARRAY_A);
167
+ }
168
+
169
+ public function get_activities($args)
170
+ {
171
+ if (!$args) return false;
172
+ return WPF()->db->get_results($this->build_sql_select($args), ARRAY_A);
173
+ }
174
+
175
+ public function action_edit_topic($topic)
176
+ {
177
+ $data = array(
178
+ 'type' => 'edit_topic',
179
+ 'itemid' => $topic['topicid'],
180
+ 'itemtype' => 'topic',
181
+ 'userid' => WPF()->current_userid,
182
+ 'name' => WPF()->current_user_display_name,
183
+ 'email' => WPF()->current_user_email,
184
+ 'permalink' => wpforo_topic($topic['topicid'], 'url')
185
+ );
186
+
187
+ $this->add($data);
188
+ }
189
+
190
+ public function action_edit_post($post)
191
+ {
192
+ $data = array(
193
+ 'type' => 'edit_post',
194
+ 'itemid' => $post['postid'],
195
+ 'itemtype' => 'post',
196
+ 'userid' => WPF()->current_userid,
197
+ 'name' => WPF()->current_user_display_name,
198
+ 'email' => WPF()->current_user_email,
199
+ 'permalink' => wpforo_post($post['postid'], 'url')
200
+ );
201
+
202
+ $this->add($data);
203
+ }
204
+
205
+ private function add($data)
206
+ {
207
+ if (empty($data)) return false;
208
+ $activity = array_merge($this->default->activity, $data);
209
+ unset($activity['id']);
210
+
211
+ if (!$activity['type'] || !$activity['itemid'] || !$activity['itemtype']) return false;
212
+ if (!$activity['date']) $activity['date'] = current_time('timestamp', 1);
213
+
214
+ if (WPF()->db->insert(
215
+ WPF()->tables->activity,
216
+ wpforo_array_ordered_intersect_key($activity, $this->default->activity_format),
217
+ wpforo_array_ordered_intersect_key($this->default->activity_format, $activity)
218
+ )) {
219
+ return WPF()->db->insert_id;
220
+ }
221
+
222
+ return false;
223
+ }
224
+
225
+ private function edit($data, $where)
226
+ {
227
+ if (empty($data) || empty($where)) return false;
228
+ if (is_numeric($where)) $where = array('id' => $where);
229
+ $data = (array)$data;
230
+ $where = (array)$where;
231
+
232
+ if (false !== WPF()->db->update(
233
+ WPF()->tables->activity,
234
+ wpforo_array_ordered_intersect_key($data, $this->default->activity_format),
235
+ wpforo_array_ordered_intersect_key($where, $this->default->activity_format),
236
+ wpforo_array_ordered_intersect_key($this->default->activity_format, $data),
237
+ wpforo_array_ordered_intersect_key($this->default->activity_format, $where)
238
+ )) {
239
+ return true;
240
+ }
241
+
242
+ return false;
243
+ }
244
+
245
+ private function delete($where)
246
+ {
247
+ if (empty($where)) return false;
248
+ if (is_numeric($where)) $where = array('id' => $where);
249
+ $where = (array)$where;
250
+
251
+ if (false !== WPF()->db->delete(
252
+ WPF()->tables->activity,
253
+ wpforo_array_ordered_intersect_key($where, $this->default->activity_format),
254
+ wpforo_array_ordered_intersect_key($this->default->activity_format, $where)
255
+ )) {
256
+ return true;
257
+ }
258
+
259
+ return false;
260
+ }
261
+
262
+ public function build($itemtype, $itemid, $type, $echo = false){
263
+ $html = '';
264
+ $args = array(
265
+ 'itemtypes_include' => $itemtype,
266
+ 'itemids_include' => $itemid,
267
+ 'types_include' => $type
268
+ );
269
+ if( $activities = $this->get_activities($args) ){
270
+ foreach ($activities as $activity){
271
+ $type = $activity['type'];
272
+ $userid = $activity['userid'];
273
+ $date = wpforo_date($activity['date'], 'ago', false);
274
+
275
+ if( $userid ){
276
+ $profile_url = wpforo_member($userid, 'profile_url');
277
+ $display_name = wpforo_member($userid, 'display_name');
278
+ $user = sprintf( '<a href="%s">%s</a>', $profile_url, $display_name );
279
+ } else {
280
+ $user = ( wpfval($activity, 'name') ) ? $activity['name'] : wpforo_phrase('Guest', false);
281
+ }
282
+
283
+ if( wpfval($this->actions, $type, 'before') ){
284
+ $html .= $this->actions[$type]['before'];
285
+ $html = apply_filters('wpforo_action_html_before', $html, $activity);
286