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
+ }
287
+ if( wpfval($this->actions, $type, 'description') ){
288
+ $html .= sprintf( $this->actions[$activity['type']]['description'], $date, $user );
289
+ $html = apply_filters('wpforo_action_html', $html, $activity);
290
+ }
291
+ if( wpfval($this->actions, $type, 'after') ) {
292
+ $html .= $this->actions[$type]['after'];
293
+ $html = apply_filters('wpforo_action_html_after', $html, $activity);
294
+ }
295
+ }
296
+ }
297
+ if(!$echo) return $html;
298
+ echo $html;
299
+ }
300
+ }
wpf-includes/class-cache.php CHANGED
@@ -183,7 +183,7 @@ class wpForoCache{
183
  */
184
 
185
  public function clean( $id, $template, $item = array() ){
186
-
187
  $dirs = array();
188
  $userid = (isset($item['userid']) && $item['userid']) ? $item['userid'] : 0;
189
  $postid = (isset($item['postid']) && $item['postid']) ? $item['postid'] : 0;
@@ -194,7 +194,9 @@ class wpForoCache{
194
  $id = isset($id) ? $id : $forumid;
195
  if( $template == 'forum'){
196
  $dirs = array( $this->dir . '/forum', $this->dir . '/item/forum' );
197
- }
 
 
198
  if( $id ){
199
  $file = $this->dir . '/item/forum/' . $id . '_' . $this->lang; $this->clean_file( $file );
200
  }
183
  */
184
 
185
  public function clean( $id, $template, $item = array() ){
186
+
187
  $dirs = array();
188
  $userid = (isset($item['userid']) && $item['userid']) ? $item['userid'] : 0;
189
  $postid = (isset($item['postid']) && $item['postid']) ? $item['postid'] : 0;
194
  $id = isset($id) ? $id : $forumid;
195
  if( $template == 'forum'){
196
  $dirs = array( $this->dir . '/forum', $this->dir . '/item/forum' );
197
+ } elseif( $template == 'forum-soft' ) {
198
+ $dirs = array( $this->dir . '/forum' );
199
+ }
200
  if( $id ){
201
  $file = $this->dir . '/item/forum/' . $id . '_' . $this->lang; $this->clean_file( $file );
202
  }
wpf-includes/class-forms.php ADDED
@@ -0,0 +1,1264 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly
3
+ if( !defined( 'ABSPATH' ) ) exit;
4
+
5
+ class wpForoForm{
6
+
7
+ public $default;
8
+ public $user_dir;
9
+ public $field_dir;
10
+
11
+ public function __construct(){
12
+ $this->init_defaults();
13
+ }
14
+
15
+ private function init_defaults(){
16
+ $this->user_dir = '/wpforo/users/';
17
+ $this->field_dir = '/wpforo/users/fields/';
18
+ $this->default = array(
19
+ 'label' => '',
20
+ 'title' => '',
21
+ 'name' => '',
22
+ 'value' => '',
23
+ 'values' => '',
24
+ 'type' => 'text',
25
+ 'placeholder' => '',
26
+ 'description' => '',
27
+ 'id' => '',
28
+ 'class' => '',
29
+ 'attributes' => '',
30
+ 'isDefault' => 1,
31
+ 'isWrapItem' => '',
32
+ 'isLabelFirst' => '',
33
+ 'isDisabled' => false,
34
+ 'isEditable' => 1,
35
+ 'isRequired' => 1,
36
+ 'isMultiChoice' => 0,
37
+ 'isConfirmPassword' => 1,
38
+ 'allowedGroupIds' => array(),
39
+ 'fileExtensions' => '',
40
+ 'minLength' => 0,
41
+ 'maxLength' => 0,
42
+ 'faIcon' => '',
43
+ 'html' => '',
44
+ 'varname' => '',
45
+ 'template' => '',
46
+ 'canBeInactive' => 1,
47
+ 'canEdit' => array('1'),
48
+ 'canView' => array('1', '2', '3', '5'),
49
+ 'can' => ''
50
+ );
51
+ }
52
+
53
+ /**
54
+ * The varname of custom fields in forms:
55
+ * $varname = 'member' user account
56
+ * $varname = 'wpfreg' register forms
57
+ * $varname = '' member search
58
+ * $varname = 'data' custom fields (by default)
59
+ *
60
+ * @return string
61
+ */
62
+ public function varname(){
63
+ $template = ( isset(WPF()->data['template']) ) ? WPF()->data['template'] : WPF()->current_object['template'];
64
+ if( $template == 'members' ){
65
+ $varname = WPF()->data['varname'];
66
+ } else {
67
+ $varname = ( wpfval( WPF()->data, 'varname') ) ? WPF()->data['varname'] : 'data';
68
+ $varname = apply_filters( 'wpforo_user_custom_field_varname', $varname);
69
+ $varname = ( $varname ) ? $varname : 'data';
70
+ }
71
+ return $varname;
72
+ }
73
+
74
+ /**
75
+ * Form builder
76
+ *
77
+ * @param $fields associative multi-level array
78
+ * for form layout and field building
79
+ * @return string form HTML
80
+ */
81
+ public function build( $fields ){
82
+ if(empty($fields)) return ''; $html = '';
83
+ foreach ($fields as $row_key => $row){
84
+ $row_class = "row-$row_key " . apply_filters('wpforo_row_classes', '', $row_key);
85
+ $html .= '<div class="wpf-tr ' . esc_attr( $row_class ) . '">';
86
+ foreach ( $row as $col_key => $col ){
87
+ $col_class = "row_$row_key-col_$col_key " . apply_filters('wpforo_col_classes', '', $row_key, $col_key);
88
+ $html .= '<div class="wpf-td wpfw-' . count($row) . ' ' . esc_attr( $col_class ) . '">';
89
+ foreach ( $col as $field ){
90
+ if( !empty($field) ) $html .= $this->build_field( $field );
91
+ }
92
+ $html .= '</div>';
93
+ }
94
+ $html .= '<div class="wpf-cl"></div></div>';
95
+ }
96
+ return $html;
97
+ }
98
+
99
+ /**
100
+ * Builds field with input HTML and wrapper divs
101
+ *
102
+ * @param $args field arguments
103
+ * @return string field HTML
104
+ */
105
+ public function build_field( $args ){
106
+
107
+ $html = '';
108
+ if( !is_array($args) || empty($args) ) return;
109
+ $f = wpforo_parse_args( $args, $this->default );
110
+ $f = $this->prepare_args( $f );
111
+
112
+ //Get field input tag
113
+ $field_html = $this->field( $f );
114
+
115
+ //Wrapping field input
116
+ if( $f['template'] == 'register' ){
117
+ if( $this->can_add( $f ) ){
118
+ $html = $this->field_wrap_register( $field_html, $f );
119
+ }
120
+ }
121
+ elseif( $f['template'] == 'account' ){
122
+ if( $this->can_edit( $f ) ){
123
+ $html = $this->field_wrap_account( $field_html, $f );
124
+ }
125
+ }
126
+ elseif( $f['template'] == 'profile' ){
127
+ if( $this->can_view( $f ) ){
128
+ $f = $this->esc_field( $f );
129
+ $html = $this->field_wrap_profile( $field_html, $f );
130
+ }
131
+ }
132
+ elseif( $f['template'] == 'members' ){
133
+ $html = $this->field_wrap_members( $field_html, $f );
134
+ }
135
+ else{
136
+ $html = $this->field_wrap_default( $field_html, $f );
137
+ }
138
+ return $html;
139
+ }
140
+
141
+ /**
142
+ * Field input HTML builder
143
+ *
144
+ * @param $f field arguments
145
+ * @return string field input HTML
146
+ */
147
+ public function field( $f ){
148
+
149
+ $field_html = '';
150
+ $f = $this->prepare_field_args( $f );
151
+
152
+ switch( $f['type'] ){
153
+ case 'url': $field_html = $this->field_url($f); break;
154
+ case 'file': $field_html = $this->field_file($f); break;
155
+ case 'html': $field_html = $this->field_html($f); break;
156
+ case 'radio': $field_html = $this->field_radio($f); break;
157
+ case 'select': $field_html = $this->field_select($f); break;
158
+ case 'avatar': $field_html = $this->field_avatar($f); break;
159
+ case 'textarea': $field_html = $this->field_textarea($f); break;
160
+ case 'password': $field_html = $this->field_password($f); break;
161
+ case 'checkbox': $field_html = $this->field_checkbox($f); break;
162
+ case 'usergroup': $field_html = $this->field_usergroup($f); break;
163
+ case 'user_nicename': $field_html = $this->field_nicename($f); break;
164
+ default: $field_html = $this->field_text($f);
165
+ }
166
+
167
+ return $field_html;
168
+ }
169
+
170
+ /**
171
+ * Wraps input HTML for Registration form
172
+ *
173
+ * @param $field_html input HTML
174
+ * @param $f field arguments
175
+ * @return string wrapped field input HTML
176
+ */
177
+ public function field_wrap_register( $field_html, $f ){
178
+ $html = '<div class="wpf-field wpf-field-type-' . esc_attr($f['type']) . ' wpf-field-name-' . esc_attr($f['field_class']) . ' ' . esc_attr($f['required_class']) . '" title="' . esc_attr($f['title']) . '">';
179
+ if( $f['type'] != 'html' ){
180
+ if ( $f['label'] || $f['description'] ) {
181
+ $html .= '<div class="wpf-label-wrap">';
182
+ if( $f['label'] ){ $html .= '<p class="wpf-label wpfcl-1">' . $f['label'] . $f['required_indicator'] . '</p>'; }
183
+ if( $f['description'] ){ $html .= '<div class="wpf-desc wpfcl-2">' . $f['description'] . '</div>'; }
184
+ $html .= '</div>';
185
+ }
186
+ $html .= '<div class="wpf-field-wrap">';
187
+ if( $f['faIcon'] ){ $html .= '<i class="' . esc_attr($f['faIcon']) . ' wpf-field-icon"></i>'; }
188
+ $html .= $field_html;
189
+ $html .= '</div>';
190
+ }
191
+ else{
192
+ $html .= $field_html;
193
+ }
194
+ $html .= '<div class="wpf-field-cl"></div></div>';
195
+ return $html;
196
+ }
197
+
198
+ /**
199
+ * Wraps input HTML for Account form
200
+ *
201
+ * @param $field_html input HTML
202
+ * @param $f field arguments
203
+ * @return string wrapped field input HTML
204
+ */
205
+ public function field_wrap_account( $field_html, $f ){
206
+ $html = '<div class="wpf-field wpf-field-type-' . esc_attr($f['type']) . ' wpf-field-name-' . esc_attr($f['field_class']) . ' ' . esc_attr($f['required_class']) . '" title="' . esc_attr($f['title']) . '">';
207
+ if( $f['type'] == 'html' ){
208
+ $html .= $field_html;
209
+ }
210
+ elseif($f['name'] == 'user_login'){
211
+ $html .= '<div class="wpf-label-wrap">';
212
+ $html .= '<p class="wpf-label wpfcl-1">' . stripslashes($f['label']) . '</p>';
213
+ $html .= '</div>';
214
+ $html .= '<div class="wpf-field-wrap">';
215
+ $html .= '<span class="wpf-username">' . $f['value'] . '</span>';
216
+ $html .= '</div>';
217
+ }
218
+ elseif( !$f['isEditable'] && !$this->can_moderate($f) && WPF()->current_user_groupid !== 1 ){
219
+ $f = $this->esc_field( $f );
220
+ $html .= '<div class="wpf-label-wrap">';
221
+ $html .= '<p class="wpf-label wpfcl-1">' . stripslashes($f['label']) . '</p>';
222
+ $html .= '</div>';
223
+ $html .= '<div class="wpf-field-wrap">';
224
+ $html .= '<span class="wpf-filed-value"><i class="' . esc_attr($f['faIcon']) . '"></i> ' . $f['value'] . '</span>';
225
+ $html .= '</div>';
226
+ }
227
+ else{
228
+ if ( $f['label'] || $f['description'] ) {
229
+ $html .= '<div class="wpf-label-wrap">';
230
+ if ($f['label']){ $html .= '<p class="wpf-label wpfcl-1">' . stripslashes($f['label']) . $f['required_indicator'] . '</p>'; }
231
+ if ($f['description']){ $html .= '<div class="wpf-desc wpfcl-2">' . $f['description'] . '</div>'; }
232
+ $html .= '</div>';
233
+ }
234
+ $html .= '<div class="wpf-field-wrap">';
235
+ if($f['faIcon']){ $html .= '<i class="' . esc_attr($f['faIcon']) . ' wpf-field-icon"></i>'; }
236
+ $html .= $field_html;
237
+ $html .= '</div>';
238
+ }
239
+ $html .= '<div class="wpf-field-cl"></div></div>';
240
+ return $html;
241
+ }
242
+
243
+ /**
244
+ * Wraps input HTML for Profile page
245
+ *
246
+ * @param $field_html input HTML
247
+ * @param $f field arguments
248
+ * @return string wrapped field input HTML
249
+ */
250
+ public function field_wrap_profile( $field_html, $f ){
251
+
252
+ if( $f['type'] != 'html' && ( !isset($f['value']) || (!is_numeric($f['value']) && empty($f['value']))) ){
253
+ return false;
254
+ }
255
+
256
+ $html = '<div class="wpf-field wpf-field-type-' . esc_attr($f['type']) . ' wpf-field-name-' . esc_attr($f['field_class']) . ' ' . esc_attr($f['required_class']) . '" title="' . esc_attr($f['title']) . '">';
257
+ if( $f['type'] != 'html' ){
258
+ if( !$f['faIcon'] ) { $f['faIcon'] = 'fas fa-address-card'; }
259
+ if( $f['label'] ) {
260
+ $html .= '<div class="wpf-label-wrap">';
261
+ if ($f['label']){
262
+ $html .= '<p class="wpf-label wpfcl-1"><i class="' . esc_attr($f['faIcon']) . ' wpf-field-icon"></i> ' . $f['label'] . '</p>';
263
+ }
264
+ $html .= '</div>';
265
+ }
266
+ if( isset($f['value']) && !empty($f['value']) ){
267
+ if( is_array($f['value']) ){
268
+ $html .= esc_html(implode( ', ', $f['value']));
269
+ }
270
+ else{
271
+ $f = $this->prepare_values( $f );
272
+ $html .= '<div class="wpf-field-wrap">';
273
+ $html .= $f['value'];
274
+ $html .= '</div>';
275
+ }
276
+ }
277
+ }
278
+ else{
279
+ $html .= $field_html;
280
+ }
281
+ $html .= '<div class="wpf-field-cl"></div></div>';
282
+ return $html;
283
+ }
284
+
285
+ /**
286
+ * Wraps input HTML for Members Search form
287
+ *
288
+ * @param $field_html input HTML
289
+ * @param $f field arguments
290
+ * @return string wrapped field input HTML
291
+ */
292
+ public function field_wrap_members( $field_html, $f ){
293
+ $html = '<div class="wpf-field wpf-field-type-' . esc_attr($f['type']) . ' wpf-field-name-' . esc_attr($f['field_class']) . ' ' . esc_attr($f['required_class']) . '" title="' . esc_attr($f['title']) . '">';
294
+ if( $f['type'] == 'html' ){
295
+ $html .= $field_html;
296
+ }
297
+ else{
298
+ if ( $f['label'] || $f['description'] ) {
299
+ $html .= '<div class="wpf-label-wrap">';
300
+ if ($f['label']){ $html .= '<p class="wpf-label wpfcl-1">' . stripslashes($f['label']) . $f['required_indicator'] . '</p>'; }
301
+ if ($f['description']){ $html .= '<div class="wpf-desc wpfcl-2">' . $f['description'] . '</div>'; }
302
+ $html .= '</div>';
303
+ }
304
+ $html .= '<div class="wpf-field-wrap">';
305
+ if($f['faIcon']){
306
+ $html .= '<i class="' . esc_attr($f['faIcon']) . ' wpf-field-icon"></i>';
307
+ }
308
+ $html .= $field_html;
309
+ $html .= '</div>';
310
+ }
311
+ $html .= '<div class="wpf-field-cl"></div></div>';
312
+ return $html;
313
+ }
314
+
315
+ /**
316
+ * Default wrapper of input HTML
317
+ *
318
+ * @param $field_html input HTML
319
+ * @param $f field arguments
320
+ * @return string wrapped field input HTML
321
+ */
322
+ public function field_wrap_default( $field_html, $f ){
323
+ $html = '<div class="wpf-field wpf-field-type-' . esc_attr($f['type']) . ' wpf-field-name-' . esc_attr($f['field_class']) . ' ' . esc_attr($f['required_class']) . '" title="' . esc_attr($f['title']) . '">';
324
+ $html .= '<div class="wpf-field-wrap">' . $field_html . '<div class="wpf-field-cl"></div></div>';
325
+ $html .= '<div class="wpf-field-cl"></div></div>';
326
+ return $html;
327
+ }
328
+
329
+ /**
330
+ * File - Field builder
331
+ *
332
+ * @param $f field arguments
333
+ * @return string field HTML
334
+ */
335
+ public function field_file( $f ){
336
+ $field_html = '';
337
+ $extensions = '';
338
+ if( $f['fileExtensions'] ) {
339
+ foreach( $f['fileExtensions'] as $key => $ext ){ if( strpos($ext, '.') === FALSE ) { $f['fileExtensions'][ $key ] = '.' . $ext; }}
340
+ $f['fileExtensions'] = implode(', ', $f['fileExtensions']);
341
+ if( $f['fileExtensions'] ) $extensions = ' accept="' . esc_attr($f['fileExtensions']) . '" ';
342
+ }
343
+ if( $f['value'] ){
344
+ $f['isRequired'] = '';
345
+ $file_name = basename( $f['value'] );
346
+ $extension = pathinfo( $f['value'], PATHINFO_EXTENSION );
347
+ $wp_upload_dir = wp_upload_dir();
348
+ $f['value'] = $wp_upload_dir['baseurl'] . "/" . trim( $f['value'], '/' );
349
+
350
+ if( wpfval(WPF()->current_object['user'], 'ID') ){
351
+ $url = strtok( wpforo_get_request_uri(), '?');
352
+ $delete = $url . '?foro_f=' . $f['name'] . '&foro_u=' . WPF()->current_object['user']['ID'];
353
+ $delete_url = wp_nonce_url( wpforo_home_url( $delete ) , 'wpforo_delete_profile_field', 'foro_n' );
354
+ $delete_html = ' &nbsp;|&nbsp; <a href="' . $delete_url . '" title="' . wpforo_phrase( 'Delete this file', false ) . '" onclick="return confirm(\'' . wpforo_phrase( 'Are you sure you want to delete this file?', false ) . '\')"><i class="fas fa-times" style="color:#e86666; font-size:14px; line-height:14px;"></i></a>';
355
+ }
356
+
357
+ if( $extension && wpforo_is_image( $extension ) ){
358
+ $field_html .= '<div class="wpf-field-file-wrap" style="margin-bottom: 10px;">
359
+ <img src="' . esc_url_raw( $f['value'] ) . '" alt="' . esc_attr($file_name) . '" title="' . esc_attr($file_name) . '" style="max-width:100px; max-height:100px"/>
360
+ <div class="wpf-field-file-name">
361
+ <i class="fas fa-paperclip"></i>
362
+ <a href="' . esc_url_raw( $f['value'] ) . '" title="' . esc_attr($file_name) . '" target="_blank">' . esc_attr($file_name) . '</a>' . $delete_html . '
363
+ </div>
364
+ </div>';
365
+ }
366
+ else{
367
+ $field_html .= '<div class="wpf-field-file-wrap" style="margin-bottom: 10px;">
368
+ <div class="wpf-field-file-name">
369
+ <i class="fas fa-paperclip"></i>
370
+ <a href="' . esc_url_raw( $f['value'] ) . '" title="' . esc_attr($file_name) . '" target="_blank">' . esc_attr($file_name) . '</a>' . $delete_html . '
371
+ </div>
372
+ </div>';
373
+ }
374
+ }
375
+ $field_html .= '<input type="file" name="' . esc_attr( $f['fieldName'] ) . '" value=""
376
+ id="' . esc_attr( $f['fieldId'] ) . '" class="' . esc_attr( $f['fieldId'] ) . '"
377
+ ' . $f['isRequired'] . ' ' . $f['isDisabled'] . ' ' . $f['attributes'] . ' ' . $extensions . ' />';
378
+ return $field_html;
379
+ }
380
+
381
+ /**
382
+ * Textarea - Field builder
383
+ *
384
+ * @param $f field arguments
385
+ * @return string field HTML
386
+ */
387
+ public function field_textarea( $f ){
388
+ $field_html = '<textarea name="' . esc_attr( $f['fieldName'] ) . '"
389
+ id="' . esc_attr( $f['fieldId'] ) . '"
390
+ class="' . esc_attr( $f['fieldId'] ) . '"
391
+ placeholder="' . esc_attr($f['placeholder']) . '"
392
+ ' . $f['isRequired'] . ' ' . $f['isDisabled'] . ' ' . $f['attributes'] . '
393
+ ' . $f['minmax'] . '>' . esc_textarea( $f['value'] ) . '</textarea>';
394
+ return $field_html;
395
+ }
396
+
397
+ /**
398
+ * Password - Field builder
399
+ *
400
+ * @param $f field arguments
401
+ * @return string field HTML
402
+ */
403
+ public function field_password( $f ){
404
+ $field_html = '';
405
+ if( $f['template'] == 'account' ){
406
+ $f['isRequired'] = 0;
407
+ $f['label'] = wpforo_phrase('Old password', false); $f['description'] = '';
408
+ $field_html .= '<input type="password"
409
+ name="' . esc_attr( $f['varname'] ) . '[old_pass]"
410
+ value="" id="' . esc_attr($f['fieldId']) . '-old"
411
+ class="' . esc_attr( $f['fieldId'] ) . '"
412
+ placeholder="' . esc_attr( wpforo_phrase('Old password', false) ) . '"
413
+ ' . $f['isDisabled'] . ' ' . $f['attributes'] . '/>
414
+ <i class="fas fa-eye-slash wpf-show-password"></i>';
415
+ }
416
+ if( $f['isConfirmPassword'] ) { $p1 = '1'; $p2 = '2'; } else{ $p1 = ''; $p2 = ''; }
417
+ if( !empty($f['varname']) ){ $f['fieldName'] = $f['varname'] . '[' . $f['name'] . $p1 . ']'; } else { $f['fieldName'] = $f['name'] . $p1; }
418
+ if( $f['template'] == 'account' ) {
419
+ $f['label'] = wpforo_phrase('New', false) . ' ' . $f['label'];
420
+ $f['placeholder'] = wpforo_phrase('New', false) . ' ' . $f['placeholder'];
421
+ }
422
+ if( $f['template'] == 'account' || $f['template'] == 'register' ){
423
+ if( $f['template'] == 'account' ) $field_html .= '<div style="position:relative"><i class="' . esc_attr($f['faIcon']) . ' wpf-field-icon"></i>';
424
+ $field_html .= '<input type="password"
425
+ name="' . esc_attr($f['fieldName']) . '"
426
+ value="" id="' . esc_attr($f['fieldId']) . '-new1"
427
+ class="' . esc_attr( $f['fieldId'] ) . '"
428
+ placeholder="' . esc_attr($f['placeholder']) . '"
429
+ ' . $f['isDisabled'] . ' ' . $f['attributes'] . ' ' . $f['minmax'] . '/>';
430
+ if( $f['template'] == 'register' ){ $field_html .= '<i class="fas fa-eye-slash wpf-show-password"></i>'; }
431
+ if( $f['template'] == 'account' ){ $field_html .= '</div>'; }
432
+ if( $f['isConfirmPassword'] ){
433
+ $f['label'] = wpforo_phrase('Confirm Password', false);
434
+ $f['placeholder'] = wpforo_phrase('Confirm Password', false);
435
+ $f['description'] = '';
436
+ $f['fieldName'] = ( !empty($f['varname']) ? $f['varname'] . '[' . $f['name'] . $p2 . ']' : $f['name'] . $p2 );
437
+ if( $f['template'] == 'account' || $f['template'] == 'register' ) $field_html .= '<div style="position:relative"><i class="' . esc_attr($f['faIcon']) . ' wpf-field-icon"></i>';
438
+ $field_html .= '<input type="password"
439
+ name="' . esc_attr($f['fieldName']) . '"
440
+ value="" id="' . esc_attr($f['fieldId']) . '-new2"
441
+ class="' . esc_attr( $f['fieldId'] ) . '"
442
+ placeholder="' . esc_attr($f['placeholder']) . '"
443
+ ' . $f['isDisabled'] . ' ' . $f['attributes'] . ' ' . $f['minmax'] . '/>';
444
+ if( $f['template'] == 'account' || $f['template'] == 'register' ){ $field_html .= '</div>'; }
445
+ }
446
+ }
447
+
448
+ return $field_html;
449
+ }
450
+
451
+ /**
452
+ * Checkbox - Field builder
453
+ *
454
+ * @param $f field arguments
455
+ * @return string field HTML
456
+ */
457
+ public function field_checkbox( $f ){
458
+ $i = 0; $field_zero = true; $field_html = '';
459
+ $f['value'] = $this->build_array_value( $f['value'] );
460
+ if( !is_array($f['values']) ) $f['values'] = $this->build_array_using_string_rows( $f['values'] );
461
+ if( !empty($f['values']) ){
462
+ $item_field_name = $f['fieldName'] . '[]';
463
+ $f['isRequired'] = ( count($f['values']) == 1 ) ? $f['isRequired'] : '';
464
+ foreach( $f['values'] as $row ){
465
+ $item = $this->build_item_value_lable($row);
466
+ $field_zero = ( $field_zero === false || $item['value'] === 0 ) ? false : $field_zero;
467
+ $field_html .= '<div class="wpf-field-item">';
468
+ $item_html = '<input type="checkbox" ' . $this->check($item['value'], $f['value']) . '
469
+ name="' . esc_attr( $item_field_name ) . '"
470
+ value="' . esc_attr( $item['value'] ) . '"
471
+ id="' . esc_attr( $f['fieldId'] . '_' . ($i + 1) ) . '"
472
+ class="wpf-input-checkbox ' . esc_attr( $f['class'] ) . '"
473
+ ' . $f['isDisabled'] . ' ' . $f['isRequired'] . ' ' . $f['attributes'] . ' />';
474
+ $field_html .= $this->build_label($item['label'], $item_html, $f);
475
+ $field_html .= '</div>';
476
+ $i++;
477
+ }
478
+ if( $field_zero ) $field_html .= '<input type="hidden" name="' . esc_attr( $item_field_name ) . '" value="0"/>';
479
+ }
480
+ return $field_html;
481
+ }
482
+
483
+ /**
484
+ * Radio - Field builder
485
+ *
486
+ * @param $f field arguments
487
+ * @return string field HTML
488
+ */
489
+ public function field_radio( $f ){
490
+ $i = 0; $field_html = '';
491
+ if( !is_array($f['values']) ) $f['values'] = $this->build_array_using_string_rows( $f['values'] );
492
+ if( !empty($f['values']) ){
493
+ foreach( $f['values'] as $row ){
494
+ $item = $this->build_item_value_lable($row);
495
+ $field_html .= '<div class="wpf-field-item">';
496
+ $item_html = '<input type="radio" ' . $this->check($item['value'], $f['value']) . '
497
+ name="' . esc_attr( $f['fieldName'] ) . '"
498
+ value="' . esc_attr( $item['value'] ) . '"
499
+ id="' . esc_attr( $f['fieldId'] . '_' . ($i + 1) ) . '"
500
+ class="wpf-input-radio ' . esc_attr( $f['class'] ) . '"
501
+ ' . $f['isDisabled'] . ' ' . $f['isRequired'] . ' ' . $f['attributes'] . ' />';
502
+ $field_html .= $this->build_label($item['label'], $item_html, $f);
503
+ $field_html .= '</div>';
504
+ $i++;
505
+ }
506
+ }
507
+ return $field_html;
508
+ }
509
+
510
+ /**
511
+ * Radio - Field builder
512
+ *
513
+ * @param $f field arguments
514
+ * @return string field HTML
515
+ */
516
+ public function field_select( $f ){
517
+ $field_html = '';
518
+ if( !is_array($f['values']) ) $f['values'] = $this->build_array_using_string_rows( $f['values'] );
519
+ if( !empty($f['values']) ){
520
+ $field_html .= '<select name="' . esc_attr( $f['fieldName'] ) . '"
521
+ id="' . esc_attr( $f['fieldId'] ) . '"
522
+ class="' . esc_attr( $f['class'] ) . '"
523
+ ' . $f['isMultiChoice'] . ' ' . $f['isDisabled'] . '
524
+ ' . $f['isRequired'] . ' ' . $f['attributes'] . '>';
525
+ $field_html .= '<option value="">' . wpforo_phrase('--- Choose ---', false) . '</option>';
526
+ foreach ($f['values'] as $optgroup => $row) {
527
+ if( is_array($row) && !empty($row) ){
528
+ $field_html .= '<optgroup label="' . esc_attr( $optgroup ) . '">';
529
+ foreach ( $row as $sub_row ){
530
+ $item = $this->build_item_value_lable( $sub_row );
531
+ $field_html .= '<option value="' . esc_attr( $item['value'] ) . '" ' . $this->select( $item['value'], $f['value'] ) . '>' . esc_html( $item['label'] ) . '</option>';
532
+ }
533
+ $field_html .= '</optgroup>';
534
+ }else{
535
+ $item = $this->build_item_value_lable($row);
536
+ $field_html .= '<option value="' . esc_attr( $item['value'] ) . '" ' . $this->select( $item['value'], $f['value'] ) . '>' . esc_html( $item['label'] ) . '</option>';
537
+ }
538
+ }
539
+ $field_html .= '</select>';
540
+ }
541
+ return $field_html;
542
+ }
543
+
544
+ /**
545
+ * Usergroup - Field builder
546
+ *
547
+ * @param $f field arguments
548
+ * @return string field HTML
549
+ */
550
+ public function field_usergroup( $f ){
551
+ $field_html = '';
552
+ if( !empty($f['allowedGroupIds']) ){
553
+ $field_html .= '<select name="' . esc_attr( $f['fieldName'] ) . '"
554
+ id="' . esc_attr( $f['fieldId'] ) . '"
555
+ class="' . esc_attr( $f['class'] ) . '"
556
+ ' . $f['isDisabled'] . ' ' . $f['isRequired'] . ' ' . $f['attributes'] . '>';
557
+
558
+ $field_html .= '<option value="">' . wpforo_phrase('--- Choose ---', false) . '</option>';
559
+ foreach( $f['allowedGroupIds'] as $groupid ) {
560
+ if( $f['value'] != 4 && $groupid == 4 ) continue;
561
+ if ( $group = WPF()->usergroup->get_usergroup($groupid) ) {
562
+ $field_html .= '<option value="' . esc_attr($groupid) . '" ' . $this->select( $groupid, $f['value'] ) . '>' . $group['name'] . '</option>';
563
+ }
564
+ }
565
+ $field_html .= '</select>';
566
+ }
567
+ return $field_html;
568
+ }
569
+
570
+ /**
571
+ * Avatar - Field builder
572
+ *
573
+ * @param $f field arguments
574
+ * @return string field HTML
575
+ */
576
+ public function field_avatar( $f ){
577
+ $remote_url = ( $f['value'] && strpos($f['value'], 'wpforo/avatars') === FALSE ) ? $f['value'] : '';
578
+ $field_html = '<ul>
579
+ <li>
580
+ <input ' . $f['isRequired'] . ' name="' . esc_attr($f['varname']) . '[avatar_type]" id="wpfat_gravatar" value="gravatar" ' . ( $f['value'] == '' || $f['value'] == NULL ? 'checked="checked"' : '' ) . ' type="radio" />&nbsp;
581
+ <label for="wpfat_gravatar">' . wpforo_phrase('Wordpress avatar system', false) . '</label>
582
+ </li>
583
+ <li>
584
+ <input name="' . esc_attr($f['varname']) . '[avatar_type]" id="wpfat_remote" value="remote" ' . ( $f['value'] && strpos($f['value'], 'wpforo/avatars') === FALSE ? 'checked="checked"' : '' ) . ' type="radio" />&nbsp;
585
+ <label for="wpfat_remote">' . wpforo_phrase('Specify avatar by URL:', false) . '</label>
586
+ <input autocomplete="off" name="' . esc_attr($f['varname']) . '[avatar_url]" value="' . esc_url($remote_url) . '" maxlength="300" data-wpfucf-minmaxlength="1,300" type="url" />
587
+ </li>';
588
+ if( ( wpfval( WPF()->current_object, 'template') && WPF()->current_object['template'] == 'register') || WPF()->perm->usergroup_can('upa') ) {
589
+ if( strpos($f['value'], 'gravatar.com') === FALSE && strpos($f['value'], 'facebook.com') === FALSE ){
590
+ $url = $f['value'] . '?lm=' . time();
591
+ }
592
+ $field_html .= '<li>
593
+ <input name="' . esc_attr($f['varname']) . '[avatar_type]" id="wpfat_custom" value="custom" type="radio" ' . ( (strpos($url, 'wpforo/avatars') !== FALSE) ? 'checked' : '' ) . ' />&nbsp;
594
+ <label for="wpfat_custom"> ' . wpforo_phrase('Upload an avatar', false) . '</label>' . ( strpos($url, 'wpforo/avatars') !== FALSE ? '<br />
595
+ <img src="' . esc_url($url) . '" class="wpf-custom-avatar-img"/>' : '' ) .'&nbsp;
596
+ <input class="wpf-custom-avatar" name="avatar" type="file" />&nbsp;</li>';
597
+ }
598
+ $field_html .= '</ul> <script type="text/javascript">jQuery(document).ready(function($){$( "input[name=\'' . esc_attr($f['varname']) . '\[avatar_url\]\']" ).click(function(){$( "#wpfat_remote" ).prop(\'checked\', true);}); $( "input[name=\'avatar\']" ).click(function(){$( "#wpfat_custom" ).prop(\'checked\', true);});});</script>';
599
+ return $field_html;
600
+ }
601
+
602
+ /**
603
+ * HTML - Field builder
604
+ *
605
+ * @param $f field arguments
606
+ * @return string field HTML
607
+ */
608
+ public function field_html( $f ){
609
+ return stripslashes( $f['html'] );
610
+ }
611
+
612
+ /**
613
+ * URL - Field builder
614
+ *
615
+ * @param $f field arguments
616
+ * @return string field HTML
617
+ */
618
+ public function field_url( $f ){
619
+ return '<input type="url" value="' . esc_url_raw( $f['value'] ) . '"
620
+ name="' . esc_attr( $f['fieldName'] ) .'"
621
+ id="' . esc_attr( $f['fieldId'] ) . '"
622
+ class="' . esc_attr( $f['class'] ) . '"
623
+ placeholder="' . esc_attr( $f['placeholder'] ) . '"
624
+ ' . $f['isRequired'] . ' ' . $f['isDisabled'] . ' ' . $f['attributes'] . ' ' . $f['minmax'] . '/>';
625
+ }
626
+
627
+ /**
628
+ * Nickname - Field builder
629
+ *
630
+ * @param $f field arguments
631
+ * @return string field HTML
632
+ */
633
+ public function field_nicename( $f ){
634
+ return '<input type="text" value="' . esc_attr( urldecode( $f['value'] ) ) . '"
635
+ name="' . esc_attr( $f['fieldName'] ) .'"
636
+ id="' . esc_attr( $f['fieldId'] ) . '"
637
+ class="' . esc_attr( $f['class'] ) . '"
638
+ placeholder="' . esc_attr( $f['placeholder'] ) . '"
639
+ ' . $f['isRequired'] . ' ' . $f['isDisabled'] . ' ' . $f['attributes'] . ' ' . $f['minmax'] . '/>';
640
+ }
641
+
642
+ /**
643
+ * Text - Field builder
644
+ *
645
+ * @param $f field arguments
646
+ * @return string field HTML
647
+ */
648
+ public function field_text( $f ){
649
+ return '<input type="' . esc_attr( $f['type'] ) .'"
650
+ value="' . esc_attr( $f['value'] ) . '"
651
+ name="' . esc_attr( $f['fieldName'] ) .'"
652
+ id="' . esc_attr( $f['fieldId'] ) . '"
653
+ class="' . esc_attr( $f['class'] ) . '"
654
+ placeholder="' . esc_attr( $f['placeholder'] ) . '"
655
+ ' . $f['isRequired'] . ' ' . $f['isDisabled'] . ' ' . $f['attributes'] . ' ' . $f['minmax'] . '/>';
656
+ }
657
+
658
+ /**
659
+ * Prepares displayed values for Profile fields
660
+ *
661
+ * @param $f field arguments
662
+ * @return array prepared values
663
+ */
664
+ public function prepare_values( $f ){
665
+ switch ( $f['type'] ){
666
+ case 'textarea':
667
+ $f['value'] = wpforo_kses(wpforo_decode($f['value']));
668
+ break;
669
+ case 'url':
670
+ $f['value'] = sprintf('<a href="%s" target="_blank" rel="nofollow">%s</a>', $f['value'], $f['value']);
671
+ break;
672
+ case 'email':
673
+ $f['value'] = sprintf('<a href="mailto:%s" rel="nofollow">%s</a>', $f['value'], $f['value']);
674
+ break;
675
+ case 'phone':
676
+ $f['value'] = sprintf('<a href="tel:%s" rel="nofollow">%s</a>', $f['value'], $f['value']);
677
+ break;
678
+ case 'file':
679
+ if( !empty($f['value']) ){
680
+ $wp_upload_dir = wp_upload_dir();
681
+ $f['value'] = $wp_upload_dir['baseurl'] . "/" . trim($f['value'], '/');
682
+ $extension = pathinfo($f['value'], PATHINFO_EXTENSION);
683
+ $file_url = esc_url_raw( $f['value'] );
684
+ $file_name = esc_attr( basename($f['value']) );
685
+ if( wpforo_is_image( $extension ) ){
686
+ $f['value'] = sprintf('<a href="%s" target="_blank" title="%s"><img src="%s" alt="%s" class="wpf-field-file-img" style="max-width:120px; max-height:120px" /></a>', $file_url, $file_name, $file_url, $file_name );
687
+ } else {
688
+ $f['value'] = sprintf('<a href="%s" target="_blank">%s</a>', $file_url, $file_name );
689
+ }
690
+ }
691
+ break;
692
+ }
693
+ switch ( $f['name'] ){
694
+ case 'skype':
695
+ $f['value'] = sprintf('<a href="skype:%s?userinfo" rel="nofollow">%s</a>', $f['value'], $f['value']);
696
+ break;
697
+ case 'location':
698
+ $f['value'] = sprintf('<a href="//maps.google.com/?q=%s" target="_blank" rel="nofollow">%s</a>', $f['value'], $f['value']);
699
+ break;
700
+ case 'signature':
701
+ $f['value'] = wpforo_signature( $f['value'], array('echo' => 0) );
702
+ break;
703
+ case 'about':
704
+ $f['value'] = wpforo_nofollow_tag( $f['value'] );
705
+ break;
706
+ }
707
+ return $f;
708
+ }
709
+
710
+ public function prepare_args( $f ){
711
+
712
+ $is_owner = $this->owner();
713
+
714
+ //field_class
715
+ $f['field_class'] = sanitize_text_field( $f['name'] );
716
+
717
+ //varname
718
+ $f['varname'] = ( !$f['isDefault'] ) ? apply_filters( 'wpforo_user_custom_field_varname', 'data') : $this->varname();
719
+
720
+ //template
721
+ $f['template'] = ( isset(WPF()->data['template']) ) ? WPF()->data['template'] : WPF()->current_object['template'];
722
+
723
+ //value
724
+ $f['value'] = ( isset(WPF()->data['value'][$f['name']]) ) ? WPF()->data['value'][$f['name']] : $f['value'];
725
+ if( !$f['isDefault'] && $f['varname'] ) {
726
+ $f['value'] = ( isset(WPF()->data['value'][$f['varname']][$f['name']]) ) ? WPF()->data['value'][$f['varname']][$f['name']] : $f['value'];
727
+ }
728
+ $f['value'] = wpforo_unslashe( $f['value'] );
729
+
730
+ if( $f['name'] == 'user_nicename' ){
731
+ $f['value'] = urldecode($f['value']);
732
+ }
733
+
734
+ //allowedGroupIds
735
+ $groups = array();
736
+ if ( !empty($f['allowedGroupIds']) ) {
737
+ $groups = $this->build_array_value( $f['allowedGroupIds'] );
738
+ }
739
+ if ( !$is_owner && (WPF()->current_user_groupid == 1 || current_user_can('administrator') ) ){
740
+ $groups = WPF()->usergroup->get_usergroups('groupid');
741
+ }
742
+ if( $is_owner && !in_array(WPF()->current_user_groupid, $f['allowedGroupIds']) ) {
743
+ $groups = array();
744
+ }
745
+ $f['allowedGroupIds'] = array_filter( $groups );
746
+
747
+ //isRequired
748
+ if( $f['isRequired'] ) {
749
+ $f['required_class'] = ' wpf-field-required ';
750
+ $f['required_indicator'] = ' <span class="wpf-field-required-icon" title="' . esc_attr( wpforo_phrase('Required field', false) ) . '">*</span>';
751
+ }
752
+ else{
753
+ $f['required_class'] = '';
754
+ $f['required_indicator'] = '';
755
+ }
756
+
757
+ return $f;
758
+ }
759
+
760
+ public function prepare_field_args( $f ){
761
+ //faIcon
762
+ $f['faIcon'] = trim($f['faIcon']);
763
+ if( strpos($f['faIcon'], ' ') === false ) $f['faIcon'] = 'fas ' . $f['faIcon'];
764
+
765
+ //isRequired
766
+ $f['isRequired'] = ( $f['isRequired'] ) ? ' required="required" ' : '';
767
+
768
+ //isDisabled
769
+ $f['isDisabled'] = ( $f['isDisabled'] ) ? ' disabled="disabled" ' : '';
770
+
771
+ //isMultiChoice
772
+ $f['isMultiChoice'] = ( $f['isMultiChoice'] ) ? ' multiple="multiple" ' : '';
773
+
774
+ //fieldName | new key in args
775
+ $f['fieldName'] = ( !empty($f['varname'] ) ? $f['varname'] . '[' . $f['name'] . ']' : $f['name'] );
776
+
777
+ //fieldId | new key in args
778
+ $f['fieldId'] = ( !empty($f['varname'] ) ? $f['varname'] . '_' : '' ) . ( ($f['id']) ? $f['id'] : $f['name'] );
779
+
780
+ //minLength & maxLength
781
+ $f['minLength'] = ($f['minLength']) ? intval($f['minLength']): '';
782
+ $f['maxLength'] = ($f['maxLength']) ? intval($f['maxLength']): '';
783
+ if( $f['minLength'] ) { $minLength_attr = ($f['type'] == 'date' || $f['type'] == 'number' || $f['type'] == 'range') ? ' min="' . $f['minLength'] . '" ' : ' minlength="' . $f['minLength'] . '" '; }
784
+ if( $f['maxLength'] ) { $maxLength_attr = ($f['type'] == 'date' || $f['type'] == 'number' || $f['type'] == 'range') ? ' max="' . $f['maxLength'] . '" ' : ' maxlength="' . $f['maxLength'] . '" '; }
785
+ $f['minmax'] = ( isset($minLength_attr) && isset($maxLength_attr) ) ? $minLength_attr . ' ' . $maxLength_attr : '';
786
+
787
+ //attributes
788
+ $f['attributes'] .= ' autocomplete="off"';
789
+
790
+ return $f;
791
+ }
792
+
793
+ public function prepare_file_args( $file_data, $userid = 1 ){
794
+
795
+ $file = array( 'files' => array(), 'fields' => array() );
796
+ $userid = ( $userid ) ? $userid : WPF()->current_userid;
797
+
798
+ if( !empty( $file_data ) ){
799
+ $wp_upload_dir = wp_upload_dir();
800
+ $wp_basedir = $wp_upload_dir['basedir'] . $this->field_dir;
801
+ foreach( $file_data as $file_field_name => $file_name ){
802
+ $field_name_folder = substr( $file_field_name, 6 );
803
+ $file_upload_dir = $wp_basedir . $userid . '/' . $field_name_folder . '/';
804
+ $file_path = $file_upload_dir . $file_name;
805
+ $file['files'][ $file_field_name ] = $file_path;
806
+ $file['fields'][ $file_field_name ] = $this->field_dir . $userid . '/' . $field_name_folder . '/' . $file_name;
807
+ wp_mkdir_p( $file_upload_dir );
808
+ }
809
+ return $file;
810
+ }
811
+ return false;
812
+ }
813
+
814
+ public function check( $item_value, $checked_value ){
815
+ if( is_array($checked_value) ){
816
+ $checked = ( in_array($item_value, $checked_value) ) ? 'checked="checked"' : '';
817
+ }
818
+ else{
819
+ $checked = ( $item_value == $checked_value ) ? 'checked="checked"' : '';
820
+ }
821
+ return $checked;
822
+ }
823
+
824
+ public function select( $item_value, $selected_value ){
825
+ $selected = ( $item_value == $selected_value ) ? 'selected="selected"' : '';
826
+ return $selected;
827
+ }
828
+
829
+ public function build_label( $item_label, $item_html, $f ){
830
+ $field_html = '';
831
+ if ($f['isWrapItem']) {
832
+ $field_html .= '<label>';
833
+ if ($f['isLabelFirst']) {
834
+ $field_html .= '<span class="wpf-' . $f['type'] . '-label">' . stripslashes($item_label) . '</span>&nbsp;' . $item_html;
835
+ } else {
836
+ $field_html .= $item_html . ' <span class="wpf-' . $f['type'] . '-label">' . stripslashes($item_label) . '</span>';
837
+ }
838
+ $field_html .= '</label>';
839
+ }
840
+ else {
841
+ if ($f['isLabelFirst']) {
842
+ $field_html .= '<span class="wpf-' . $f['type'] . '-label">' . stripslashes($item_label) . '</span>&nbsp;' . $item_html;
843
+ } else {
844
+ $field_html .= $item_html . ' <span class="wpf-' . $f['type'] . '-label">' . stripslashes($item_label) . '</span>';
845
+ }
846
+ }
847
+ return $field_html;
848
+ }
849
+
850
+ public function build_item_value_lable( $string, $sep = '=>' ){
851
+ $item = array('value' => '', 'label' => '');
852
+ $string = trim($string);
853
+ $data = explode($sep, $string);
854
+ $item['value'] = isset($data[0]) ? $data[0] : 'no_value';
855
+ $item['label'] = isset($data[1]) ? $data[1] : $item['value'];
856
+ return $item;
857
+ }
858
+
859
+ public function build_array_value( $var, $sep = ',' ){
860
+ if( is_serialized( $var ) ) {
861
+ $var = unserialize( $var );
862
+ } elseif( !is_array($var) && strpos($var, $sep) !== FALSE ) {
863
+ $var = explode($sep, $var);
864
+ } else {
865
+ $var = (array)$var;
866
+ }
867
+ return $var;
868
+ }
869
+
870
+ public function build_array_using_string_rows( $string, $regexp = '' ){
871
+ if( !$regexp ) $regexp = '#' . preg_quote(PHP_EOL) . '#isu';
872
+ $array = preg_split($regexp, $string);
873
+ return array_filter($array);
874
+ }
875
+
876
+ public function sanitize( $data, $fields ){
877
+ $types = $this->field_types($fields);
878
+ if( !empty($data) && !empty($types) ){
879
+ foreach( $data as $name => $value ){
880
+ if( wpfval($types, $name) ){
881
+ $data[ $name ] = $this->sanitize_field( $value, $types[ $name ], $name );
882
+ }
883
+ }
884
+ }
885
+ return $data;
886
+ }
887
+
888
+ public function sanitize_field( $data, $type = 'text', $name = '' ){
889
+ if( !is_null($data) ){
890
+ if( $type == 'text' ){
891
+ $data = sanitize_text_field($data);
892
+ if( $name == 'user_nicename' ){
893
+ $data = sanitize_user( $data, true );
894
+ $data = sanitize_title( $data );
895
+ }
896
+ }
897
+ elseif( $type == 'url' ){
898
+ $data = esc_url_raw($data);
899
+ }
900
+ elseif( $type == 'date' ){
901
+ $data = sanitize_text_field($data);
902
+ }
903
+ elseif( $type == 'textarea' ){
904
+ $data = stripslashes( wpforo_kses( trim( $data ), 'user_description' ) );
905
+ }
906
+ elseif( $type == 'email' ){
907
+ $data = sanitize_email($data);
908
+ }
909
+ elseif( $type == 'password' ){
910
+ $data = trim($data);
911
+ }
912
+ elseif( $type == 'usergroup' ){
913
+ $data = intval($data);
914
+ }
915
+ elseif( $type == 'radio' ){
916
+ $data = sanitize_text_field($data);
917
+ }
918
+ elseif( $type == 'checkbox' ){
919
+ if( $name == 'secondary_groups' ){
920
+ $data = wpforo_sanitize_int($data);
921
+ } else{
922
+ $data = wpforo_sanitize_text($data);
923
+ }
924
+ }
925
+ elseif( $type == 'select' ){
926
+ $data = sanitize_text_field($data);
927
+ }
928
+ elseif( $type == 'color' ){
929
+ $data = sanitize_text_field($data);
930
+ }
931
+ elseif( $type == 'date' ){
932
+ $data = sanitize_text_field($data);
933
+ }
934
+ elseif( $type == 'number' ){
935
+ $data = intval($data);
936
+ }
937
+ elseif( $type == 'tel' ){
938
+ $data = sanitize_text_field($data);
939
+ }
940
+ elseif( $type == 'html' ){
941
+ $data = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $data);
942
+ }
943
+
944
+ if( is_string($data) ){
945
+ $data = stripslashes( $data );
946
+ }
947
+ }
948
+ return $data;
949
+ }
950
+
951
+ public function esc_field( $f ){
952
+ if( wpfkey($f, 'value') ){
953
+ $f['value'] = wpforo_trim($f['value']);
954
+ if( wpfval($f, 'type') && $f['type'] == 'textarea' ) {
955
+ $f['value'] = wpautop( wpforo_kses( stripslashes( $f['value'] ) ) );
956
+ }
957
+ if( wpfval($f, 'type') && $f['type'] == 'checkbox' ) {
958
+ if( wpfval($f, 'value') ){
959
+ if( $f['name'] == 'secondary_groups' ){
960
+ $f['value'] = WPF()->usergroup->get_secondary_usergroup_names( $f['value'] );
961
+ $f['value'] = implode(', ', $f['value']);
962
+ } elseif ( is_array($f['value']) ){
963
+ $f['value'] = implode( ', ', $f['value'] );
964
+ }
965
+ }
966
+ }
967
+ else{
968
+ $f['value'] = esc_html($f['value']);
969
+ }
970
+ }
971
+ $f['value'] = apply_filters('wpforo_display_field_value', $f['value'], $f );
972
+ return $f;
973
+ }
974
+
975
+ public function validate( $data, $fields ){
976
+ $type = '';
977
+ $label = '';
978
+ $userid = '';
979
+ $error = array();
980
+ $return = array();
981
+ $is_owner = $this->owner();
982
+ $varname = $this->varname();
983
+ $template = ( isset(WPF()->data['template']) ) ? WPF()->data['template'] : WPF()->current_object['template'];
984
+ if( empty($data) ) $error[] = 'No data submitted';
985
+ if( empty($fields) ) $error[] = 'User profile fields not found';
986
+ if( empty($error) ){
987
+ foreach( $fields as $rows ){
988
+ foreach( $rows as $cols ){
989
+ foreach( $cols as $key => $field ){
990
+ $name = ''; $value = '';
991
+ if( wpfval($field, 'name') ){
992
+ $name = $field['name'];
993
+ if( !$template && wpfval($field,'template') ) $template = $field['template'];
994
+ if( wpfval($field, 'label') ) $label = esc_html($field['label']);
995
+ if( wpfval($field, 'type') ) $type = $field['type'];
996
+ if( wpfval($data, 'userid') ) $userid = $data['userid'];
997
+ if( $template != 'register' ){
998
+ if( !$this->can_edit( $field ) ) {
999
+ unset($cols[$key]);
1000
+ }
1001
+ }
1002
+ if( wpfkey($cols, $key) && wpfkey( $data, $name ) ){
1003
+ $value = $data[ $name ];
1004
+ if( is_string($value) ){
1005
+ $value = trim($value);
1006
+ $value = htmlspecialchars_decode($value);
1007
+ $length = wpforo_strlen( $value );
1008
+ }
1009
+ if( wpfval($field, 'isRequired') && !$value){
1010
+ $error[] = $label . ' ' . wpforo_phrase('field is required', false, false);
1011
+ }
1012
+ if( $value ){
1013
+ if( $type == 'number' ){
1014
+ if( wpfval($field, 'minLength') ){
1015
+ if( (int)$value < $field['minLength'] ){
1016
+ $error[] = $label . ' ' . sprintf( wpforo_phrase('field value must be at least %d', false, false), intval($field['minLength']) );
1017
+ }
1018
+ }
1019
+ if( wpfval($field, 'maxLength') ){
1020
+ if( (int)$value > $field['maxLength'] ){
1021
+ $error[] = $label . ' ' . sprintf( wpforo_phrase('field value cannot be greater than %d', false, false) , intval($field['maxLength']) );
1022
+ }
1023
+ }
1024
+ }
1025
+ else{
1026
+ if( wpfval($field, 'minLength') ){
1027
+ if( $length < $field['minLength'] ){
1028
+ $error[] = $label . ' ' . sprintf( wpforo_phrase('field length must be at least %d characters', false, false) , intval($field['minLength']) );
1029
+ }
1030
+ }
1031
+ if( wpfval($field, 'maxLength') ){
1032
+ if( $length > $field['maxLength'] ){
1033
+ $error[] = $label . ' ' . sprintf( wpforo_phrase('field length cannot be greater than %d characters', false, false) , intval($field['maxLength']) );
1034
+ }
1035
+ }
1036
+ }
1037
+ if( $type == 'url' && filter_var($value, FILTER_VALIDATE_URL) === FALSE ){
1038
+ $error[] = $label . ' ' . wpforo_phrase('field value is not a valid URL', false, false);
1039
+ }
1040
+ if( $type == 'email' ){
1041
+ if ( !is_email( $value ) ) {
1042
+ $error[] = $label . ' ' . wpforo_phrase('Invalid Email address', false, false);
1043
+ }
1044
+ if ( $name == 'user_email' ){
1045
+ $email_owner = email_exists( $value );
1046
+ if( $email_owner && $email_owner != $userid ){
1047
+ $error[] = $label . ' ' . wpforo_phrase('This email address is already registered. Please insert another', false, false);
1048
+ }
1049
+ }
1050
+ }
1051
+ if( $type == 'file' ){
1052
+ $extension = pathinfo( $value, PATHINFO_EXTENSION );
1053
+ $extension = ( function_exists('mb_strtolower') ) ? mb_strtolower( $extension ) : strtolower( $extension );
1054
+ if( wpfval( $field, 'fileExtensions' ) ){
1055
+ if( $extension ){
1056
+ if( !in_array( $extension, $field['fileExtensions'] ) ) {
1057
+ $error[] = $label . ' ' . wpforo_phrase('file type is not allowed', false, false);
1058
+ $error[] = sprintf( 'Allowed file types: %s', implode(', ', $field['fileExtensions']) );
1059
+ }
1060
+ } else {
1061
+ $error[] = $label . ' ' . wpforo_phrase('file type is not detected', false, false);
1062
+ }
1063
+ } else {
1064
+ $mime_types = get_allowed_mime_types();
1065
+ $mime_types = array_flip( $mime_types );
1066
+ if( !empty( $mime_types ) ){
1067
+ $implode_types = implode('|', $mime_types );
1068
+ $explode_types = explode('|', $implode_types );
1069
+ if( !in_array( $extension, $explode_types ) ){
1070
+ $error[] = $label . ' ' . sprintf( wpforo_phrase('file type %s is not allowed', false, false), $extension );
1071
+ }
1072
+ if( !WPF()->perm->can_attach_file_type( $extension ) ){
1073
+ $error[] = 'You are not allowed to attach this file type';
1074
+ }
1075
+ }
1076
+ }
1077
+ if( wpfval( $field, 'fileSize' ) ){
1078
+ if ( wpfval( $_FILES, $varname, 'size', $name ) && $_FILES[ $varname ]['size'][ $name ] > ( $field['fileSize'] * 1024 * 1024 ) ) {
1079
+ $error[] = $label . ' ' . wpforo_phrase('file is too large', false, false);
1080
+ $error[] = sprintf( 'Maximum allowed file size is %s MB', $field['fileSize'] );
1081
+ }
1082
+ }
1083
+ }
1084
+ if( $name == 'user_nicename' ){
1085
+ $user_nicename = sanitize_title( trim( $value ) );
1086
+ if( is_numeric( $user_nicename ) ){
1087
+ $error[] = 'Numerical nicknames are not allowed. Please insert another.';
1088
+ }
1089
+ if( !$user_nicename ){
1090
+ $error[] = 'Nickname validation failed';
1091
+ }
1092
+ $sql = "SELECT `ID` FROM `" . WPF()->db->users . "` WHERE `ID` != " . intval( $userid ) . " AND ( `user_nicename` LIKE '" . esc_sql( $user_nicename ). "' OR `ID` LIKE '" . esc_sql( $user_nicename ) . "')";
1093
+ if( WPF()->db->get_var($sql)){
1094
+ $error[] = 'This nickname is already in use. Please insert another.';
1095
+ }
1096
+ }
1097
+ if( $name == 'groupid' ){
1098
+ if( $template != 'register' ){
1099
+ if( $is_owner || (!WPF()->current_user_groupid == 1 && !current_user_can('administrator'))){
1100
+ $error[] = 'You have no permission to edit Usergroup field';
1101
+ }
1102
+ } else {
1103
+ if( $value == 1 || $value == 2 ){
1104
+ $error[] = 'Admin and Moderator Usergroups are not permitted';
1105
+ } else {
1106
+ if( wpfval($field, 'allowedGroupIds') ){
1107
+ $allowedGroupIds = wpforo_parse_args( $field['allowedGroupIds'] );
1108
+ if( !in_array( $value, $allowedGroupIds ) ) {
1109
+ $error[] = 'The selected Usergroup cannot be set';
1110
+ }
1111
+ } else {
1112
+ $error[] = 'The selected Usergroup is not found in allowed list';
1113
+ }
1114
+ }
1115
+ }
1116
+ }
1117
+ if( $name == 'secondary_groups' ){
1118
+ $secondary_usergroups = WPF()->usergroup->get_secondary_usergroup_ids();
1119
+ if( $template != 'register' ){
1120
+ if( WPF()->current_user_groupid != 1 && WPF()->current_user_groupid != 2 ) {
1121
+ $error[] = 'You have no permission to edit Usergroup field';
1122
+ } else{
1123
+ if( !empty($value) && is_array($value) ){
1124
+ foreach( $value as $secondary_usergroup_id ){
1125
+ if( $secondary_usergroup_id && !in_array( $secondary_usergroup_id, $secondary_usergroups) ){
1126
+ $error[] = 'One of the selected Usergroups cannot be set as Secondary';
1127
+ }
1128
+ }
1129
+ }
1130
+ }
1131
+ } else {
1132
+ if( $value == 1 || $value == 2 ){
1133
+ $error[] = 'Admin and Moderator Usergroups are not permitted';
1134
+ } else {
1135
+ if( !empty($value) && is_array($value) ){
1136
+ foreach( $value as $secondary_usergroup_id ){
1137
+ if( $secondary_usergroup_id && !in_array( $secondary_usergroup_id, $secondary_usergroups) ){
1138
+ $error[] = 'One of the selected Usergroups cannot be set as Secondary';
1139
+ }
1140
+ }
1141
+ }
1142
+ }
1143
+ }
1144
+ }
1145
+ }
1146
+ }
1147
+ }
1148
+ }
1149
+ }
1150
+ }
1151
+ }
1152
+ if( !empty($error) ){
1153
+ $return['error'] = $error;
1154
+ return $return;
1155
+ } else {
1156
+ return true;
1157
+ }
1158
+ }
1159
+
1160
+ public function validate_password( $data ){
1161
+ $error = array();
1162
+ $return = array( 'error' => false );
1163
+ if( wpfval($data, 'old_pass') && wpfval($data, 'user_pass1') && wpfval($data, 'user_pass2') ){
1164
+ if( $data['user_pass1'] != $data['user_pass2'] ){
1165
+ $error[] = 'New Passwords do not match';
1166
+ }
1167
+ else{
1168
+ return true;
1169
+ }
1170
+ }
1171
+ if( !empty($error) ){
1172
+ $return['error'] = $error;
1173
+ return $return;
1174
+ }
1175
+ return false;
1176
+ }
1177
+
1178
+ public function field_types( $fields ){
1179
+ $name_type_fields = array();
1180
+ if( !empty($fields) ){
1181
+ foreach( $fields as $rows ){
1182
+ foreach( $rows as $cols ){
1183
+ foreach( $cols as $field ){
1184
+ if( wpfval($field, 'name') && wpfval($field, 'type') ){
1185
+ $name_type_fields[ $field['name'] ] = $field['type'];
1186
+ }
1187
+ }
1188
+ }
1189
+ }
1190
+ }
1191
+ return $name_type_fields;
1192
+ }
1193
+
1194
+ public function owner( $object_userid = false ){
1195
+ if( !$object_userid ){
1196
+ if( wpfval(WPF()->current_object, 'user', 'ID') ){
1197
+ return wpforo_is_owner( WPF()->current_object['user']['ID'] );
1198
+ } else {
1199
+ return false;
1200
+ }
1201
+ } else{
1202
+ return wpforo_is_owner( $object_userid );
1203
+ }
1204
+ }
1205
+
1206
+ public function can_add( $f ){
1207
+ if( wpfval($f, 'name') ){
1208
+ if( $f['name'] == 'signature' && !wpforo_feature('signature') ){
1209
+ return false;
1210
+ }
1211
+ if( $f['name'] == 'avatar' && ( !wpforo_feature('custom-avatars') || !wpforo_feature('avatars') ) ){
1212
+ return false;
1213
+ }
1214
+ }
1215
+ return true;
1216
+ }
1217
+
1218
+ public function can_view( $f ){
1219
+ $is_owner = $this->owner();
1220
+ if( !$is_owner && !in_array( WPF()->current_user_groupid, $f['canView'] ) ){
1221
+ return false;
1222
+ } else {
1223
+ return true;
1224
+ }
1225
+ }
1226
+
1227
+ public function can_edit( $f ){
1228
+ if( wpfval(WPF()->current_object, 'user', 'ID') ){
1229
+ $is_owner = $this->owner();
1230
+ $value = wpfkey($f, 'value') ? $f['value'] : false;
1231
+ $can_edit = wpfkey($f, 'isEditable') ? $f['isEditable'] : false;
1232
+ $can_moderate = $this->can_moderate( $f );
1233
+ if( !$is_owner && !$can_moderate && WPF()->current_user_groupid !== 1){
1234
+ return false;
1235
+ }
1236
+ if( !$can_edit && !$can_moderate && WPF()->current_user_groupid !== 1 && !$value ){
1237
+ return false;
1238
+ }
1239
+ if( wpfkey($f, 'name') ){
1240
+ if( $f['name'] == 'signature' && ( !WPF()->perm->usergroup_can('ups') || !wpforo_feature('signature'))){
1241
+ return false;
1242
+ }
1243
+ if( $f['name'] == 'avatar' && ( !wpforo_feature('custom-avatars') || !wpforo_feature('avatars') ) ){
1244
+ return false;
1245
+ }
1246
+ if( $f['name'] == 'groupid' && ( WPF()->current_user_groupid != 1 || $is_owner || !current_user_can('administrator') ) ){
1247
+ return false;
1248
+ }
1249
+ }
1250
+ return true;
1251
+ }
1252
+ else{
1253
+ return false;
1254
+ }
1255
+ }
1256
+
1257
+ public function can_moderate( $f ){
1258
+ if( empty($f) ) return false;
1259
+ $usergroups_who_can_edit = ( !empty($f['canEdit']) ) ? (array)$f['canEdit'] : array(1);
1260
+ $can_moderate = ( in_array( WPF()->current_user_groupid, $usergroups_who_can_edit) ) ? true : false;
1261
+ return $can_moderate;
1262
+ }
1263
+
1264
+ }
wpf-includes/class-forums.php CHANGED
@@ -41,6 +41,7 @@ class wpForoForum{
41
  'eor' => 'Can edit own reply',
42
  'dot' => 'Can delete own topic',
43
  'dor' => 'Can delete own reply',
 
44
  'l' => 'Can like',
45
  'r' => 'Can report',
46
  's' => 'Can set topic sticky',
@@ -55,6 +56,7 @@ class wpForoForum{
55
  'va' => 'Can view attached files',
56
  'at' => 'Can set topic answered',
57
  'oat' => 'Can set own topic answered',
 
58
  'cot' => 'Can close topic',
59
  'mt' => 'Can move topic',
60
  'ccp' => 'Can create poll',
41
  'eor' => 'Can edit own reply',
42
  'dot' => 'Can delete own topic',
43
  'dor' => 'Can delete own reply',
44
+ 'sb' => 'Can subscribe',
45
  'l' => 'Can like',
46
  'r' => 'Can report',
47
  's' => 'Can set topic sticky',
56
  'va' => 'Can view attached files',
57
  'at' => 'Can set topic answered',
58
  'oat' => 'Can set own topic answered',
59
+ 'aot' => 'Can answer own question',
60
  'cot' => 'Can close topic',
61
  'mt' => 'Can move topic',
62
  'ccp' => 'Can create poll',
wpf-includes/class-members.php CHANGED
@@ -29,6 +29,7 @@ class wpForoMember{
29
  $this->default->options = array(
30
  'custom_title_is_on' => 1,
31
  'default_title' => 'Member',
 
32
  'online_status_timeout' => 240,
33
  'url_structure' => 'nicename',
34
  'search_type' => 'search', // can to be 'search' or 'filter'
@@ -87,133 +88,28 @@ class wpForoMember{
87
  array( '%d', '%s', '%s', '%d', '%s', '%s', '%s', '%s' )
88
  );
89
  }
90
-
91
- function edit_profile($args){
92
- if(empty($args)) return FALSE;
93
- if( !isset($args['userid']) || !$args['userid'] ) return FALSE;
94
- extract( $args, EXTR_OVERWRITE );
95
-
96
- $fields = array();
97
- $fields_types = array();
98
-
99
- if(isset($last_login) && $last_login){
100
- $fields['last_login'] = sanitize_text_field($last_login);
101
- $fields_types[] = '%s';
102
- }
103
-
104
- if(isset($groupid) && $groupid){
105
- $groupid = intval($groupid);
106
- if( !(!WPF()->current_object['user_is_same_current_user'] && (WPF()->current_user_groupid == 1 || current_user_can('administrator') )) ) {
107
- $flds = $this->get_fields();
108
- if( !in_array($groupid, wpforo_parse_args($flds['groupid']['allowedGroupIds'])) ) $groupid = WPF()->usergroup->default_groupid;
109
- }
110
- $fields['groupid'] = $groupid;
111
- $fields_types[] = '%d';
112
- }
113
-
114
- if(isset($title) && $title){
115
- $fields['title'] = sanitize_text_field(trim($title));
116
- $fields_types[] = '%s';
117
- }
118
- if(isset($site)){
119
- $fields['site'] = sanitize_text_field(trim($site));
120
- $fields_types[] = '%s';
121
- }
122
- if(isset($icq)){
123
- $fields['icq'] = sanitize_text_field(trim($icq));
124
- $fields_types[] = '%s';
125
- }
126
- if(isset($aim)){
127
- $fields['aim'] = sanitize_text_field(trim($aim));
128
- $fields_types[] = '%s';
129
- }
130
- if(isset($yahoo)){
131
- $fields['yahoo'] = sanitize_text_field(trim($yahoo));
132
- $fields_types[] = '%s';
133
- }
134
- if(isset($msn)){
135
- $fields['msn'] = sanitize_text_field(trim($msn));
136
- $fields_types[] = '%s';
137
- }
138
- if(isset($facebook)){
139
- $fields['facebook'] = sanitize_text_field(trim($facebook));
140
- $fields_types[] = '%s';
141
- }
142
- if(isset($twitter)){
143
- $fields['twitter'] = sanitize_text_field(trim($twitter));
144
- $fields_types[] = '%s';
145
- }
146
- if(isset($gtalk)){
147
- $fields['gtalk'] = sanitize_text_field(trim($gtalk));
148
- $fields_types[] = '%s';
149
- }
150
- if(isset($skype)){
151
- $fields['skype'] = sanitize_text_field(trim($skype));
152
- $fields_types[] = '%s';
153
- }
154
- if(isset($signature)){
155
- $fields['signature'] = stripslashes(wpforo_kses(trim($signature), 'user_description'));
156
- $fields_types[] = '%s';
157
- }
158
- if(isset($about)){
159
- $fields['about'] = stripslashes(wpforo_kses(trim($about), 'user_description'));
160
- $fields_types[] = '%s';
161
- }
162
- if(isset($occupation)){
163
- $fields['occupation'] = stripslashes(sanitize_text_field(trim($occupation)));
164
- $fields_types[] = '%s';
165
- }
166
- if(isset($location)){
167
- $fields['location'] = stripslashes(sanitize_text_field(trim($location)));
168
- $fields_types[] = '%s';
169
- }
170
- if(isset($timezone)){
171
- $fields['timezone'] = sanitize_text_field(trim($timezone));
172
- $fields_types[] = '%s';
173
- }
174
- if(isset($avatar_type) && $avatar_type != 'gravatar' && isset($avatar_url) && $avatar_url){
175
- $fields['avatar'] = esc_url(trim($avatar_url));
176
- $fields_types[] = '%s';
177
- }
178
- if(isset($avatar_type) && $avatar_type == 'gravatar'){
179
- $fields['avatar'] = '';
180
- $fields_types[] = '%s';
181
- }
182
-
183
- $this->reset($userid);
184
-
185
- $result = true;
186
- if($fields){
187
- $result = WPF()->db->update(
188
- WPF()->tables->profiles,
189
- $fields,
190
- array('userid' => intval($userid)),
191
- $fields_types,
192
- array('%d')
193
- );
194
-
195
- if( $result !== FALSE && $userid ){
196
- if(isset($fields['site'])){
197
- WPF()->db->query("UPDATE `".WPF()->db->users."` SET `user_url` = '" . esc_sql($fields['site']) . "' WHERE `ID` = " . intval($userid) );
198
- }
199
- if(isset($fields['about'])){
200
- update_user_meta( $userid, 'description', $fields['about'] );
201
- }
202
- }
203
- }
204
-
205
- return $result;
206
- }
207
 
208
- function create($args){
 
209
  if(!wpforo_feature('user-register')){
210
  WPF()->notice->add('User registration is disabled.', 'error');
211
  return FALSE;
212
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
213
 
214
- $args = apply_filters( 'wpforo_create_profile', $args );
215
-
216
- if( (isset($args['error']) && $args['error']) || !$args ){
217
  return FALSE;
218
  }
219
 
@@ -222,110 +118,135 @@ class wpForoMember{
222
  $this->pass_min_length = apply_filters('wpforo_pass_min_length', $this->pass_min_length);
223
  $this->pass_max_length = apply_filters('wpforo_pass_max_length', $this->pass_max_length);
224
 
225
- if( !empty($args) && is_array($args) && !empty($args['user_pass1']) ){
226
- remove_action('register_new_user', 'wp_send_new_user_notifications');
 
227
  add_action('register_new_user', array($this, 'send_new_user_notifications'));
228
-
229
- do_action( 'wpforo_create_profile_before', $args );
230
-
231
  $errors = new WP_Error();
232
 
233
- extract($args, EXTR_OVERWRITE);
234
  $sanitized_user_login = sanitize_user( $user_login );
235
  $user_email = apply_filters( 'user_registration_email', $user_email );
236
  $user_pass1 = trim(substr($user_pass1, 0, 100));
237
  $user_pass2 = trim(substr($user_pass2, 0, 100));
238
  $illegal_user_logins = array_map( 'strtolower', (array) apply_filters( 'illegal_user_logins', array() ) );
239
- if ( $sanitized_user_login == '' ) {
 
240
  $errors->add( 'empty_username', __( '<strong>ERROR</strong>: Please enter a username.' ) );
241
  WPF()->notice->add('Username is missed.', 'error');
242
  return FALSE;
243
- }elseif ( ! validate_username( $user_login ) ) {
 
244
  $errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) );
245
  $sanitized_user_login = '';
246
  WPF()->notice->add('Illegal character in username.', 'error');
247
  $user_login = '';
248
  return FALSE;
249
- }elseif( strlen($user_login) < $this->login_min_length || strlen($user_login) > $this->login_max_length ){
 
250
  WPF()->notice->add( 'Username length must be between %d characters and %d characters.', 'error', array($this->login_min_length, $this->login_max_length) );
251
  return FALSE;
252
- }elseif ( username_exists( $sanitized_user_login ) ) {
 
253
  $errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ) );
254
  WPF()->notice->add('Username exists. Please insert another.', 'error');
255
  return FALSE;
256
- }elseif ( in_array( strtolower( $sanitized_user_login ), $illegal_user_logins ) ) {
 
257
  $errors->add( 'invalid_username', __( '<strong>ERROR</strong>: Sorry, that username is not allowed.' ) );
258
  WPF()->notice->add('ERROR: invalid_username. Sorry, that username is not allowed. Please insert another.', 'error');
259
  return FALSE;
260
- }elseif ( $user_email == '' ) {
 
261
  $errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please type your email address.' ) );
262
  WPF()->notice->add('Insert your Email address.', 'error');
263
  return FALSE;
264
- }elseif ( ! is_email( $user_email ) ) {
 
265
  $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The email address isn&#8217;t correct.' ) );
266
  WPF()->notice->add('Invalid Email address', 'error');
267
  $user_email = '';
268
  return FALSE;
269
- }elseif ( email_exists( $user_email ) ) {
 
270
  $errors->add( 'email_exists', __( '<strong>ERROR</strong>: This email is already registered, please choose another one.' ) );
271
  WPF()->notice->add('Email address exists. Please insert another.', 'error');
272
  return FALSE;
273
- }elseif( strlen($user_pass1) < $this->pass_min_length || strlen($user_pass1) > $this->pass_max_length ){
 
274
  WPF()->notice->add( 'Password length must be between %d characters and %d characters.', 'error', array($this->pass_min_length, $this->pass_max_length) );
275
  return FALSE;
276
- }elseif($user_pass1 != $user_pass2){
 
277
  WPF()->notice->add('Password mismatch.', 'error');
278
  return FALSE;
279
- }else{
 
280
  do_action( 'register_post', $sanitized_user_login, $user_email, $errors );
281
  $errors = apply_filters( 'registration_errors', $errors, $sanitized_user_login, $user_email );
282
- if ( $errors->get_error_code() ){
283
- $args = array();
284
- foreach($errors->errors as $u_err) $args[] = $u_err[0];
285
- WPF()->notice->add($args, 'error');
286
  return FALSE;
287
  }
288
  $user_id = wp_create_user( $sanitized_user_login, $user_pass1, $user_email );
289
- if ( !is_wp_error( $user_id ) && $user_id ) {
290
- $args['userid'] = $user_id;
291
  $creds = array('user_login' => $sanitized_user_login, 'user_password' => $user_pass1 );
292
- wp_signon($creds);
293
- do_action( 'wpforo_create_profile_after', $args );
294
  do_action( 'register_new_user', $user_id );
295
- WPF()->notice->add('Success! Thank you Dear Friend', 'success');
 
 
 
296
  return $user_id;
297
  }
298
  }
299
- }elseif( !empty($args['user_login']) && !empty($args['user_email']) ){
300
- if( strlen($args['user_login']) < $this->login_min_length || strlen($args['user_login']) > $this->login_max_length ){
 
301
  WPF()->notice->add( 'Username length must be between %d characters and %d characters.', 'error', array($this->login_min_length, $this->login_max_length) );
302
  return FALSE;
303
  }
304
- $user_id = register_new_user( $args['user_login'], $args['user_email'] );
305
  if ( !is_wp_error( $user_id ) && $user_id ) {
306
- $args['userid'] = $user_id;
307
- do_action( 'wpforo_create_profile_after', $args );
 
 
 
308
  WPF()->notice->add('Success! Please check your mail for confirmation.', 'success');
309
  return $user_id;
310
  }
311
  }
 
312
  if(!empty($user_id->errors)){
313
- $args = array();
314
- foreach($user_id->errors as $u_err) $args[] = $u_err[0];
315
- WPF()->notice->add($args, 'error');
316
  return FALSE;
317
  }
 
318
  WPF()->notice->add('Registration Error', 'error');
319
  return FALSE;
320
  }
321
-
 
 
 
 
 
322
  function edit( $args = array() ){
323
  if( empty($args) && empty($_REQUEST['member']) ) return FALSE;
324
  if( empty($args) && !empty($_REQUEST['member']) ) $args = $_REQUEST['member'];
325
-
326
  $args = apply_filters( 'wpforo_edit_profile', $args );
327
  do_action( 'wpforo_edit_profile_before', $args );
328
-
329
  if( (isset($args['error']) && $args['error']) || !$args ){
330
  return FALSE;
331
  }
@@ -396,7 +317,6 @@ class wpForoMember{
396
 
397
  $this->reset($userid);
398
  }
399
-
400
  if( FALSE !== $this->edit_profile($args) ){
401
  do_action( 'wpforo_edit_profile_after', $args );
402
  WPF()->notice->add('Your profile data have been successfully updated.', 'success');
@@ -408,6 +328,638 @@ class wpForoMember{
408
  return FALSE;
409
  }
410
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
411
  public function change_password($old_passw, $new_passw, $userid){
412
  if( !$userid = wpforo_bigintval($userid) ){
413
  WPF()->notice->clear();
@@ -435,94 +987,30 @@ class wpForoMember{
435
  WPF()->notice->add('Old password is wrong', 'error');
436
  return false;
437
  }
438
-
439
- function upload_avatar( $userid = 0 ){
440
-
441
- $userid = intval($userid);
442
- if( !WPF()->perm->usergroup_can('upa') ) return;
443
-
444
- if( !$userid ){
445
- if( !isset($_POST['member']['userid']) || !$userid = intval($_POST['member']['userid']) ) return;
446
- }
447
-
448
- if( !$user = $this->get_member($userid) ) return;
449
- $user_nicename = urldecode($user['user_nicename']);
450
- if(isset($_FILES['avatar']) && !empty($_FILES['avatar']) && isset($_FILES['avatar']['name']) && $_FILES['avatar']['name']){
451
-
452
- $name = sanitize_file_name($_FILES['avatar']['name']); //myimg.png
453
- $type = sanitize_mime_type($_FILES['avatar']['type']); //image/png
454
- $tmp_name = sanitize_text_field($_FILES['avatar']['tmp_name']); //D:\wamp\tmp\php986B.tmp
455
- $error = sanitize_text_field($_FILES['avatar']['error']); //0
456
- $size = intval($_FILES['avatar']['size']); //6112
457
-
458
- if( $size > 2*1048576 ){
459
- WPF()->notice->clear();
460
- WPF()->notice->add('Avatar image is too big maximum allowed size is 2MB', 'error');
461
- return FALSE;
462
- }
463
-
464
- if( $error ){
465
- $error = wpforo_file_upload_error($error);
466
- WPF()->notice->clear();
467
- WPF()->notice->add($error, 'error');
468
- return FALSE;
469
- }
470
-
471
- $upload_dir = wp_upload_dir();
472
- $uplds_dir = $upload_dir['basedir']."/wpforo";
473
- $avatar_dir = $upload_dir['basedir']."/wpforo/avatars";
474
- if(!is_dir($uplds_dir)) wp_mkdir_p($uplds_dir);
475
- if(!is_dir($avatar_dir)) wp_mkdir_p($avatar_dir);
476
-
477
- $ext = pathinfo($name, PATHINFO_EXTENSION);
478
- if( !wpforo_is_image($ext) ){
479
- WPF()->notice->clear();
480
- WPF()->notice->add('Incorrect file format. Allowed formats: jpeg, jpg, png, gif.', 'error');
481
- return FALSE;
482
- }
483
-
484
- $fnm = pathinfo($user_nicename, PATHINFO_FILENAME);
485
- $fnm = str_replace(' ', '-', $fnm);
486
- while(strpos($fnm, '--') !== FALSE) $fnm = str_replace('--', '-', $fnm);
487
- $fnm = preg_replace("/[^-a-zA-Z0-9]/", "", $fnm);
488
- $fnm = trim($fnm, "-");
489
-
490
- $avatar_fname = $fnm . ( $fnm ? '_' : '' ) . $userid . "." . strtolower($ext);
491
- $avatar_fname_orig = $fnm . ( $fnm ? '_' : '' ) . $userid . "." . $ext;
492
- $avatar_path = $avatar_dir . "/" . $avatar_fname;
493
- $avatar_path_orig = $avatar_dir . "/" . $avatar_fname_orig;
494
-
495
- if(is_dir($avatar_dir)){
496
- if(move_uploaded_file($tmp_name, $avatar_path)) {
497
- $image = wp_get_image_editor( $avatar_path );
498
- if ( ! is_wp_error( $image ) ) {
499
- $image->resize( 150, 150, true );
500
- $saved = $image->save( $avatar_path );
501
- if(! is_wp_error( $saved ) && $avatar_fname != $avatar_fname_orig ) {
502
- if ( defined (PHP_OS) && strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') unlink( $avatar_path_orig );
503
- }
504
- }
505
- $blog_url = preg_replace('#^https?\:#is', '', $upload_dir['baseurl']);
506
- WPF()->db->update(WPF()->tables->profiles, array('avatar' => $blog_url . "/wpforo/avatars/" . $avatar_fname), array('userid' => intval($userid)), array('%s'), array('%d'));
507
- $this->reset($userid);
508
- }
509
- }
510
- }
511
- }
512
-
513
- function synchronize_user($userid){
514
- if(!$userid) return FALSE;
515
  $user = get_userdata($userid);
516
- if( is_super_admin( $userid ) || in_array('administrator', $user->roles) ){
517
- $groupid = 1;
518
- }elseif( in_array('editor', $user->roles) ){
519
- $groupid = 2;
520
- }elseif( in_array('customer', $user->roles) ){
521
- $groupid = 5;
522
- }else{
523
- $groupid = WPF()->usergroup->default_groupid;
524
- }
525
- $insert_groupid = (isset($_POST['wpforo_usergroup'])) ? intval($_POST['wpforo_usergroup']) : $groupid;
 
 
 
 
 
 
 
 
 
526
  $insert_timezone = (isset($_POST['wpforo_usertimezone'])) ? sanitize_text_field($_POST['wpforo_usertimezone']) : '';
527
  $about = get_user_meta( $userid, 'description', true );
528
  return $this->add_profile(
@@ -534,8 +1022,8 @@ class wpForoMember{
534
  'about' => stripslashes( wpforo_kses(trim($about), 'user_description') ),
535
  'last_login' => sanitize_text_field($user->user_registered) ) );
536
  }
537
-
538
- function synchronize_users(){
539
 
540
  if( is_multisite() ){
541
  $sql = "SELECT `user_id` FROM `".WPF()->db->usermeta."` WHERE `meta_key` LIKE '".WPF()->blog_prefix."capabilities' AND `user_id` NOT IN( SELECT `userid` FROM `".WPF()->tables->profiles."` )";
@@ -544,8 +1032,9 @@ class wpForoMember{
544
  }
545
  $userids = WPF()->db->get_col($sql);
546
  if( !empty($userids) ){
 
547
  foreach($userids as $userid){
548
- $this->synchronize_user($userid);
549
  }
550
  }
551
 
@@ -557,7 +1046,7 @@ class wpForoMember{
557
  ## -- END -- delete profiles where not participant on multisite blog
558
  }
559
 
560
- function get_member($args){
561
  if(!$args) return $this->get_guest();
562
 
563
  $cache = WPF()->cache->on('memory_cashe');
@@ -623,8 +1112,8 @@ class wpForoMember{
623
  return $member;
624
  }
625
  }
626
-
627
- function get_members($args = array(), &$items_count = 0){
628
 
629
  $default = array(
630
  'include' => array(), // array( 2, 10, 25 )
@@ -669,8 +1158,8 @@ class wpForoMember{
669
  return WPF()->db->get_results($sql, ARRAY_A);
670
  }
671
  }
672
-
673
- function search($needle, $fields = array(), $limit = NULL){
674
 
675
  if($needle != ''){
676
  $needle = sanitize_text_field($needle);
@@ -728,8 +1217,8 @@ class wpForoMember{
728
 
729
  return array();
730
  }
731
-
732
- function ban($userid){
733
  if( $userid == WPF()->current_userid ){
734
  WPF()->notice->add('You can\'t make yourself banned user', 'error');
735
  return FALSE;
@@ -754,8 +1243,8 @@ class wpForoMember{
754
  WPF()->notice->add('User ban action error', 'error');
755
  return FALSE;
756
  }
757
-
758
- function unban($userid){
759
  if( !WPF()->perm->usergroup_can('bm') || !WPF()->perm->user_can_manage_user( WPF()->current_userid, intval( $userid ) )){
760
  WPF()->notice->add('Permission denied for this action', 'error');
761
  return FALSE;
@@ -872,7 +1361,7 @@ class wpForoMember{
872
  $src = $member['avatar'];
873
  $userid = ( $member['userid'] ? $member['userid'] : $member['user_email'] );
874
  if($cache && isset(self::$cache['avatar'][$userid])){
875
- if(self::$cache['avatar'][$userid]['attr'] == $attr && self::$cache['avatar'][$userid]['size'] == $size){
876
  if(isset(self::$cache['avatar'][$userid]['img'])){
877
  return self::$cache['avatar'][$userid]['img'];
878
  }
@@ -894,8 +1383,8 @@ class wpForoMember{
894
  return $img;
895
  }
896
  }
897
-
898
- function get_avatar($userid, $attr = '', $size = ''){
899
 
900
  $cache = WPF()->cache->on('memory_cashe');
901
 
@@ -938,55 +1427,55 @@ class wpForoMember{
938
  if($cache) return self::$cache['avatar'][$userid]['avatar_url'] = $avatar_url;
939
  return $avatar_url;
940
  }
941
-
942
- function get_topics_count( $userid ){
943
  $count = WPF()->db->get_var("SELECT count(topicid) FROM `".WPF()->tables->topics."` WHERE `userid` = ".intval($userid));
944
  return $count;
945
  }
946
-
947
- function get_questions_count( $userid ){
948
  $count = WPF()->db->get_var("SELECT count(topicid) FROM `".WPF()->tables->topics."` WHERE `userid` = ".intval($userid));
949
  return $count;
950
  }
951
-
952
- function get_answers_count( $userid ){
953
  $count = WPF()->db->get_var("SELECT count(postid) FROM `".WPF()->tables->posts."` WHERE `is_answer` = 1 AND `userid` = ".intval($userid));
954
  return $count;
955
  }
956
-
957
- function get_question_comments_count( $userid ){
958
  $count = WPF()->db->get_var("SELECT count(postid) FROM `".WPF()->tables->posts."` WHERE `parentid` > 0 AND `userid` = ".intval($userid));
959
  return $count;
960
  }
961
-
962
- function get_replies_count( $userid ){
963
  $count = WPF()->db->get_var("SELECT count(postid) FROM `".WPF()->tables->posts."` WHERE `userid` = ".intval($userid));
964
  return $count;
965
  }
966
-
967
- function get_likes_count( $userid ){
968
  $count = WPF()->db->get_var("SELECT count(likeid) FROM `".WPF()->tables->likes."` WHERE `userid` = ".intval($userid));
969
  return $count;
970
  }
971
-
972
- function get_votes_count( $userid ){
973
  $count = WPF()->db->get_var("SELECT count(voteid) FROM `".WPF()->tables->votes."` WHERE `userid` = ".intval($userid));
974
  return $count;
975
  }
976
 
977
  // how many times the user like or vote
978
- function get_votes_and_likes_count( $userid ){
979
  return $this->get_votes_count( intval($userid) ) + $this->get_likes_count( intval($userid) );
980
  }
981
 
982
  //getting user's posts votes and likes count
983
- function get_user_votes_and_likes_count( $userid ){
984
  $votes_count = WPF()->db->get_var("SELECT count(voteid) FROM `".WPF()->tables->votes."` WHERE `post_userid` = ".intval($userid));
985
  $likes_count = WPF()->db->get_var("SELECT count(likeid) FROM `".WPF()->tables->likes."` WHERE `post_userid` = ".intval($userid));
986
  return $votes_count + $likes_count;
987
  }
988
-
989
- function get_profile_url( $arg, $template = 'profile' ){
990
  if(!$arg) return wpforo_home_url();
991
  $userid = intval( basename($arg) );
992
  $member_args = ( $userid ? $userid : array( 'user_nicename' => basename($arg) ) );
@@ -996,8 +1485,8 @@ class wpForoMember{
996
  $profile_url = wpforo_home_url("$template/$user_slug");
997
  return apply_filters('wpforo_member_profile_url', $profile_url, $user, $template);
998
  }
999
-
1000
- function profile_url( $member = array(), $template = 'profile' ){
1001
  if(isset($member['ID']) || isset($member['user_nicename'])){
1002
  $user_slug = ( wpfo(WPF()->member->options['url_structure'], false) == 'id' ? $member['ID'] : $member['user_nicename'] );
1003
  $profile_url = wpforo_home_url("$template/$user_slug");
@@ -1013,7 +1502,7 @@ class wpForoMember{
1013
 
1014
  //$args = UserID or Member Object
1015
  //$live_count = TRUE / FALSE
1016
- function get_stat( $args = array(), $live_count = false, $cache = false ){
1017
 
1018
  $cache = WPF()->cache->on('memory_cashe');
1019
 
@@ -1082,14 +1571,13 @@ class wpForoMember{
1082
  return $stat;
1083
  }
1084
  }
1085
-
1086
- function get_count(){
1087
  return WPF()->db->get_var( "SELECT COUNT(p.`userid`) FROM `".WPF()->tables->profiles."` p
1088
  INNER JOIN `".WPF()->db->users."` u ON u.`ID` = p.`userid` WHERE p.`status` NOT LIKE 'trashed'" );
1089
  }
1090
-
1091
-
1092
- function is_online( $userid, $duration = NULL ){
1093
 
1094
  $cache = WPF()->cache->on('memory_cashe');
1095
 
@@ -1136,16 +1624,16 @@ class wpForoMember{
1136
 
1137
  <?php endif;
1138
  }
1139
-
1140
- function online_members_count( $duration = NULL ){
1141
  if(!$duration) $duration = WPF()->member->options['online_status_timeout'];
1142
  $current_time = current_time( 'timestamp', 1 );
1143
  $online_timeframe = $current_time - $duration;
1144
  return WPF()->db->get_var( "SELECT COUNT(*) FROM `".WPF()->tables->profiles."` WHERE `online_time` > " . intval($online_timeframe) );
1145
 
1146
  }
1147
-
1148
- function get_online_members( $count = 1, $duration = NULL ){
1149
  if(!$duration) $duration = WPF()->member->options['online_status_timeout'];
1150
  $current_time = current_time( 'timestamp', 1 );
1151
  $online_timeframe = $current_time - $duration;
@@ -1157,13 +1645,13 @@ class wpForoMember{
1157
  );
1158
  return $this->get_members($args);
1159
  }
1160
-
1161
- function levels(){
1162
  $levels = array( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
1163
  return $levels;
1164
  }
1165
-
1166
- function rating( $level = false, $var = false, $default = false ){
1167
  $rating = array();
1168
  $rating['color'] = array( 0 => '#d2d2d2', 1 => '#4dca5c', 2 => '#4dca5c', 3 => '#4dca5c', 4 => '#4dca5c', 5 => '#4dca5c', 6 => '#E5D600', 7 => '#E5D600', 8 => '#E5D600', 9 => '#FF812D', 10 => '#E04A47' );
1169
  $rating['points'] = array( 0 => 0, 1 => 5, 2 => 20, 3 => 50, 4 => 100, 5 => 250, 6 => 500, 7 => 750, 8 => 1000, 9 => 2500, 10 => 5000 );
@@ -1189,8 +1677,8 @@ class wpForoMember{
1189
  elseif( $level === false && !$var ) return $rating;
1190
  else return array();
1191
  }
1192
-
1193
- function rating_level($member_posts, $percent = TRUE){
1194
  $bar = 0;
1195
  if($member_posts < $this->rating(1, 'points')){$bar = 0;}
1196
  elseif($member_posts < $this->rating(2, 'points')){$bar = 10;}
@@ -1209,8 +1697,8 @@ class wpForoMember{
1209
  return floor($bar/10);
1210
  }
1211
  }
1212
-
1213
- function rating_badge($level = 0, $view = 'short'){
1214
 
1215
  $level = ( $level > 10 ) ? floor($level/10) : $level;
1216
 
@@ -1262,7 +1750,7 @@ class wpForoMember{
1262
  }
1263
 
1264
  public function init_current_user(){
1265
- $current_user = wp_get_current_user();
1266
  if( $current_user->exists() ){
1267
  $user = $this->get_member( $current_user->ID );
1268
  $status = ( isset($user['status']) ? $user['status'] : '' );
@@ -1270,11 +1758,11 @@ class wpForoMember{
1270
  $user['groupid'] = intval($user['groupid']);
1271
  WPF()->current_user = $user;
1272
  WPF()->current_user_groupid = WPF()->current_user['groupid'];
1273
- WPF()->current_userid = $current_user->ID;
 
1274
  WPF()->current_username = $current_user->user_login;
1275
  WPF()->current_user_email = $current_user->user_email;
1276
  WPF()->current_user_display_name = $current_user->display_name;
1277
-
1278
  $this->update_online_time();
1279
  }
1280
  WPF()->current_user_status = $status;
@@ -1335,8 +1823,6 @@ class wpForoMember{
1335
  <?php endif;
1336
  }
1337
 
1338
-
1339
-
1340
  public function autoban($userid){
1341
  if( !WPF()->perm->usergroup_can( 'em' ) ){
1342
  WPF()->db->update(
@@ -1440,7 +1926,8 @@ class wpForoMember{
1440
  'groupname' => wpforo_phrase('Guest', false),
1441
  'profile_url' => '',
1442
  'stat' => array( 'points' => 0, 'rating' => 0, 'rating_procent' => 0, 'color' => '', 'badge' => '', 'posts' => $args['posts'], 'topics' => 0, 'questions' => 0, 'answers' => 0, 'question_comments' => 0, 'likes' => 0, 'liked' => 0, 'title' => '' ),
1443
- 'is_email_confirmed' => 0
 
1444
  );
1445
 
1446
  if( $cache && $args['email'] ){
@@ -1459,7 +1946,15 @@ class wpForoMember{
1459
 
1460
  $this->fields = apply_filters('wpforo_member_before_init_fields', $this->fields);
1461
 
1462
- $usergroupids = WPF()->usergroup->get_usergroups('groupid');
 
 
 
 
 
 
 
 
1463
  $usergroupids_can_edit_fields = WPF()->perm->usergroups_can('em');
1464
  $usergroupids_can_view_social_net = WPF()->perm->usergroups_can('vmsn');
1465
 
@@ -1627,7 +2122,7 @@ class wpForoMember{
1627
  'placeholder' => wpforo_phrase('User Group', false),
1628
  'faIcon' => 'fas fa-users',
1629
  'name' => 'groupid',
1630
- 'allowedGroupIds' => array(),
1631
  'canBeInactive' => array(
1632
  'register',
1633
  'account',
@@ -1640,6 +2135,33 @@ class wpForoMember{
1640
  'isSearchable' => 1
1641
  );
1642
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1643
  $this->fields['avatar'] = array(
1644
  'fieldKey' => 'avatar',
1645
  'type' => 'avatar',
@@ -2111,7 +2633,7 @@ class wpForoMember{
2111
 
2112
  public function get_register_fields($only_defaults = false){
2113
  $this->init_fields();
2114
-
2115
  $regform = array(
2116
  $this->fields['user_login'],
2117
  $this->fields['user_email']
@@ -2122,8 +2644,21 @@ class wpForoMember{
2122
  $regform
2123
  )
2124
  );
2125
-
2126
- if(!$only_defaults) $fields = apply_filters('wpforo_get_register_fields', $fields);
 
 
 
 
 
 
 
 
 
 
 
 
 
2127
  return $fields;
2128
  }
2129
 
@@ -2139,6 +2674,7 @@ class wpForoMember{
2139
  $this->fields['user_email'],
2140
  $this->fields['title'],
2141
  $this->fields['groupid'],
 
2142
  $this->fields['avatar'],
2143
  $this->fields['about'],
2144
  $this->fields['site'],
@@ -2305,4 +2841,20 @@ class wpForoMember{
2305
  return (bool) WPF()->db->get_var( WPF()->db->prepare($sql, $userid) );
2306
  }
2307
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2308
  }
29
  $this->default->options = array(
30
  'custom_title_is_on' => 1,
31
  'default_title' => 'Member',
32
+ 'members_per_page' => 15,
33
  'online_status_timeout' => 240,
34
  'url_structure' => 'nicename',
35
  'search_type' => 'search', // can to be 'search' or 'filter'
88
  array( '%d', '%s', '%s', '%d', '%s', '%s', '%s', '%s' )
89
  );
90
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
 
92
+ function create( $data ){
93
+
94
  if(!wpforo_feature('user-register')){
95
  WPF()->notice->add('User registration is disabled.', 'error');
96
  return FALSE;
97
  }
98
+
99
+ $user_fields = array();
100
+ $user_fields_ignore = array( 'user_login', 'user_email', 'user_pass1', 'user_pass2' );
101
+
102
+ if( !empty($data) ){
103
+ if( wpfval($data, 'wpfreg') ){
104
+ $user_fields = $data['wpfreg'];
105
+ } else {
106
+ $user_fields = $data;
107
+ }
108
+ }
109
+
110
+ $user_fields = apply_filters( 'wpforo_create_profile', $user_fields );
111
 
112
+ if( (isset($user_fields['error']) && $user_fields['error']) || !$user_fields ){
 
 
113
  return FALSE;
114
  }
115
 
118
  $this->pass_min_length = apply_filters('wpforo_pass_min_length', $this->pass_min_length);
119
  $this->pass_max_length = apply_filters('wpforo_pass_max_length', $this->pass_max_length);
120
 
121
+ if( !empty($user_fields) && is_array($user_fields) && !empty($user_fields['user_pass1']) ){
122
+
123
+ remove_action('register_new_user', 'wp_send_new_user_notifications');
124
  add_action('register_new_user', array($this, 'send_new_user_notifications'));
125
+ do_action( 'wpforo_create_profile_before', $user_fields );
126
+
 
127
  $errors = new WP_Error();
128
 
129
+ extract($user_fields, EXTR_OVERWRITE);
130
  $sanitized_user_login = sanitize_user( $user_login );
131
  $user_email = apply_filters( 'user_registration_email', $user_email );
132
  $user_pass1 = trim(substr($user_pass1, 0, 100));
133
  $user_pass2 = trim(substr($user_pass2, 0, 100));
134
  $illegal_user_logins = array_map( 'strtolower', (array) apply_filters( 'illegal_user_logins', array() ) );
135
+
136
+ if( $sanitized_user_login == '' ) {
137
  $errors->add( 'empty_username', __( '<strong>ERROR</strong>: Please enter a username.' ) );
138
  WPF()->notice->add('Username is missed.', 'error');
139
  return FALSE;
140
+ }
141
+ elseif ( ! validate_username( $user_login ) ) {
142
  $errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) );
143
  $sanitized_user_login = '';
144
  WPF()->notice->add('Illegal character in username.', 'error');
145
  $user_login = '';
146
  return FALSE;
147
+ }
148
+ elseif( strlen($user_login) < $this->login_min_length || strlen($user_login) > $this->login_max_length ){
149
  WPF()->notice->add( 'Username length must be between %d characters and %d characters.', 'error', array($this->login_min_length, $this->login_max_length) );
150
  return FALSE;
151
+ }
152
+ elseif ( username_exists( $sanitized_user_login ) ) {
153
  $errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ) );
154
  WPF()->notice->add('Username exists. Please insert another.', 'error');
155
  return FALSE;
156
+ }
157
+ elseif ( in_array( strtolower( $sanitized_user_login ), $illegal_user_logins ) ) {
158
  $errors->add( 'invalid_username', __( '<strong>ERROR</strong>: Sorry, that username is not allowed.' ) );
159
  WPF()->notice->add('ERROR: invalid_username. Sorry, that username is not allowed. Please insert another.', 'error');
160
  return FALSE;
161
+ }
162
+ elseif ( $user_email == '' ) {
163
  $errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please type your email address.' ) );
164
  WPF()->notice->add('Insert your Email address.', 'error');
165
  return FALSE;
166
+ }
167
+ elseif ( ! is_email( $user_email ) ) {
168
  $errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The email address isn&#8217;t correct.' ) );
169
  WPF()->notice->add('Invalid Email address', 'error');
170
  $user_email = '';
171
  return FALSE;
172
+ }
173
+ elseif ( email_exists( $user_email ) ) {
174
  $errors->add( 'email_exists', __( '<strong>ERROR</strong>: This email is already registered, please choose another one.' ) );
175
  WPF()->notice->add('Email address exists. Please insert another.', 'error');
176
  return FALSE;
177
+ }
178
+ elseif( strlen($user_pass1) < $this->pass_min_length || strlen($user_pass1) > $this->pass_max_length ){
179
  WPF()->notice->add( 'Password length must be between %d characters and %d characters.', 'error', array($this->pass_min_length, $this->pass_max_length) );
180
  return FALSE;
181
+ }
182
+ elseif( $user_pass1 != $user_pass2 ) {
183
  WPF()->notice->add('Password mismatch.', 'error');
184
  return FALSE;
185
+ }
186
+ else{
187
  do_action( 'register_post', $sanitized_user_login, $user_email, $errors );
188
  $errors = apply_filters( 'registration_errors', $errors, $sanitized_user_login, $user_email );
189
+ if( $errors->get_error_code()){
190
+ $user_fields = array();
191
+ foreach($errors->errors as $u_err) $user_fields[] = $u_err[0];
192
+ WPF()->notice->add($user_fields, 'error');
193
  return FALSE;
194
  }
195
  $user_id = wp_create_user( $sanitized_user_login, $user_pass1, $user_email );
196
+ if( !is_wp_error( $user_id ) && $user_id ){
197
+ $data['userid'] = $user_id;
198
  $creds = array('user_login' => $sanitized_user_login, 'user_password' => $user_pass1 );
199
+ wp_signon( $creds );
200
+ do_action( 'wpforo_create_user_after', $data );
201
  do_action( 'register_new_user', $user_id );
202
+ $data['wpfreg'] = wpforo_clear_array( $data['wpfreg'], $user_fields_ignore, 'key' );
203
+ $this->update( $data, 'full', false );
204
+ WPF()->notice->clear();
205
+ WPF()->notice->add('Success!', 'success');
206
  return $user_id;
207
  }
208
  }
209
+ }
210
+ elseif( !empty($user_fields['user_login']) && !empty($user_fields['user_email']) ){
211
+ if( strlen($user_fields['user_login']) < $this->login_min_length || strlen($user_fields['user_login']) > $this->login_max_length ){
212
  WPF()->notice->add( 'Username length must be between %d characters and %d characters.', 'error', array($this->login_min_length, $this->login_max_length) );
213
  return FALSE;
214
  }
215
+ $user_id = register_new_user( $user_fields['user_login'], $user_fields['user_email'] );
216
  if ( !is_wp_error( $user_id ) && $user_id ) {
217
+ $data['userid'] = $user_id;
218
+ $data['wpfreg'] = wpforo_clear_array( $data['wpfreg'], $user_fields_ignore, 'key' );
219
+ $this->update( $data, 'full', false );
220
+ do_action( 'wpforo_create_user_after', $data );
221
+ WPF()->notice->clear();
222
  WPF()->notice->add('Success! Please check your mail for confirmation.', 'success');
223
  return $user_id;
224
  }
225
  }
226
+
227
  if(!empty($user_id->errors)){
228
+ $user_fields = array();
229
+ foreach($user_id->errors as $u_err) $user_fields[] = $u_err[0];
230
+ WPF()->notice->add($user_fields, 'error');
231
  return FALSE;
232
  }
233
+
234
  WPF()->notice->add('Registration Error', 'error');
235
  return FALSE;
236
  }
237
+
238
+ /**
239
+ * @deprecated since 1.5.0
240
+ * @deprecated No longer used by core and not recommended.
241
+ * @deprecated Use WPF()->member->update()
242
+ */
243
  function edit( $args = array() ){
244
  if( empty($args) && empty($_REQUEST['member']) ) return FALSE;
245
  if( empty($args) && !empty($_REQUEST['member']) ) $args = $_REQUEST['member'];
246
+
247
  $args = apply_filters( 'wpforo_edit_profile', $args );
248
  do_action( 'wpforo_edit_profile_before', $args );
249
+
250
  if( (isset($args['error']) && $args['error']) || !$args ){
251
  return FALSE;
252
  }
317
 
318
  $this->reset($userid);
319
  }
 
320
  if( FALSE !== $this->edit_profile($args) ){
321
  do_action( 'wpforo_edit_profile_after', $args );
322
  WPF()->notice->add('Your profile data have been successfully updated.', 'success');
328
  return FALSE;
329
  }
330
 
331
+ /**
332
+ * @deprecated since 1.5.0
333
+ * @deprecated No longer used by core and not recommended.
334
+ * @deprecated Use WPF()->member->update()
335
+ * @deprecated Or use WPF()->member->update_profile_field() for one field update
336
+ */
337
+ function edit_profile($args){
338
+ if(empty($args)) return FALSE;
339
+ if( !isset($args['userid']) || !$args['userid'] ) return FALSE;
340
+ extract( $args, EXTR_OVERWRITE );
341
+
342
+ $fields = array();
343
+ $fields_types = array();
344
+ $secondary_groups = (isset($secondary_groups)) ? $secondary_groups : ' ';
345
+
346
+ if(isset($last_login) && $last_login){
347
+ $fields['last_login'] = sanitize_text_field($last_login);
348
+ $fields_types[] = '%s';
349
+ }
350
+ if(isset($groupid) && $groupid){
351
+ $groupid = intval($groupid);
352
+ if( !(!WPF()->current_object['user_is_same_current_user'] && (WPF()->current_user_groupid == 1 || current_user_can('administrator') )) ) {
353
+ $flds = $this->get_fields();
354
+ if( !in_array($groupid, wpforo_parse_args($flds['groupid']['allowedGroupIds'])) ) $groupid = WPF()->usergroup->default_groupid;
355
+ }
356
+ $fields['groupid'] = $groupid;
357
+ $fields_types[] = '%d';
358
+ }
359
+ if(isset($title) && $title){
360
+ $fields['title'] = sanitize_text_field(trim($title));
361
+ $fields_types[] = '%s';
362
+ }
363
+ if(isset($site)){
364
+ $fields['site'] = sanitize_text_field(trim($site));
365
+ $fields_types[] = '%s';
366
+ }
367
+ if(isset($icq)){
368
+ $fields['icq'] = sanitize_text_field(trim($icq));
369
+ $fields_types[] = '%s';
370
+ }
371
+ if(isset($aim)){
372
+ $fields['aim'] = sanitize_text_field(trim($aim));
373
+ $fields_types[] = '%s';
374
+ }
375
+ if(isset($yahoo)){
376
+ $fields['yahoo'] = sanitize_text_field(trim($yahoo));
377
+ $fields_types[] = '%s';
378
+ }
379
+ if(isset($msn)){
380
+ $fields['msn'] = sanitize_text_field(trim($msn));
381
+ $fields_types[] = '%s';
382
+ }
383
+ if(isset($facebook)){
384
+ $fields['facebook'] = sanitize_text_field(trim($facebook));
385
+ $fields_types[] = '%s';
386
+ }
387
+ if(isset($twitter)){
388
+ $fields['twitter'] = sanitize_text_field(trim($twitter));
389
+ $fields_types[] = '%s';
390
+ }
391
+ if(isset($gtalk)){
392
+ $fields['gtalk'] = sanitize_text_field(trim($gtalk));
393
+ $fields_types[] = '%s';
394
+ }
395
+ if(isset($skype)){
396
+ $fields['skype'] = sanitize_text_field(trim($skype));
397
+ $fields_types[] = '%s';
398
+ }
399
+ if(isset($signature)){
400
+ $fields['signature'] = stripslashes(wpforo_kses(trim($signature), 'user_description'));
401
+ $fields_types[] = '%s';
402
+ }
403
+ if(isset($about)){
404
+ $fields['about'] = stripslashes(wpforo_kses(trim($about), 'user_description'));
405
+ $fields_types[] = '%s';
406
+ }
407
+ if(isset($occupation)){
408
+ $fields['occupation'] = stripslashes(sanitize_text_field(trim($occupation)));
409
+ $fields_types[] = '%s';
410
+ }
411
+ if(isset($location)){
412
+ $fields['location'] = stripslashes(sanitize_text_field(trim($location)));
413
+ $fields_types[] = '%s';
414
+ }
415
+ if(isset($timezone)){
416
+ $fields['timezone'] = sanitize_text_field(trim($timezone));
417
+ $fields_types[] = '%s';
418
+ }
419
+ if(isset($avatar_type) && $avatar_type != 'gravatar' && isset($avatar_url) && $avatar_url){
420
+ $fields['avatar'] = esc_url(trim($avatar_url));
421
+ $fields_types[] = '%s';
422
+ }
423
+ if(isset($avatar_type) && $avatar_type == 'gravatar'){
424
+ $fields['avatar'] = '';
425
+ $fields_types[] = '%s';
426
+ }
427
+ if(isset($secondary_groups) && !is_null($secondary_groups)){
428
+ if( is_array( $secondary_groups ) && !empty( $secondary_groups ) ){
429
+ $secondary_groups = array_map('intval', $secondary_groups);
430
+ $secondary_groups = implode(',', $secondary_groups);
431
+ }
432
+ $fields['secondary_groups'] = stripslashes(sanitize_text_field(trim($secondary_groups)));
433
+ $fields_types[] = '%s';
434
+ }
435
+
436
+ $this->reset($userid);
437
+
438
+ $result = true;
439
+ if($fields){
440
+ $result = WPF()->db->update(
441
+ WPF()->tables->profiles,
442
+ $fields,
443
+ array('userid' => intval($userid)),
444
+ $fields_types,
445
+ array('%d')
446
+ );
447
+
448
+ if( $result !== FALSE && $userid ){
449
+ if(isset($fields['site'])){
450
+ WPF()->db->query("UPDATE `".WPF()->db->users."` SET `user_url` = '" . esc_sql($fields['site']) . "' WHERE `ID` = " . intval($userid) );
451
+ }
452
+ if(isset($fields['about'])){
453
+ update_user_meta( $userid, 'description', $fields['about'] );
454
+ }
455
+ }
456
+ }
457
+
458
+ return $result;
459
+ }
460
+
461
+ /**
462
+ * Updates user data
463
+ * @since 1.5.0
464
+ *
465
+ * @param array $data - User data as a simple array( field => value ) OR
466
+ * $data['member'] = array( field => value ) user and profile fields - Account form
467
+ * $data['wpfreg'] = array( field => value ) user and profile fields - Registration form
468
+ * $data['data'] = array( field => value ) user custom fields
469
+ *
470
+ * $data['member']['userid'] or $data['userid'] is required
471
+ *
472
+ * @param string $type User data update types (comma separated)
473
+ * $type = 'full' user fields, profile fields, custom fields
474
+ * $type = 'user' only user fields (wp_users table)
475
+ * $type = 'profile' only profile fields (wp_wpforo_profiles table)
476
+ * $type = 'custom_fields' only custom fields (wp_wpforo_profiles table > fields column)
477
+ * $type = 'profile, custom_fields'
478
+ *
479
+ * @param boolean $check_permissions Whether check the current editor permissions or not
480
+ *
481
+ * @return false|int User ID
482
+ */
483
+ public function update( $data, $type = 'full', $check_permissions = true ){
484
+
485
+ $type = explode(',', $type);
486
+ $type = array_map('trim', $type );
487
+ $varname = WPF()->form->varname();
488
+ $template = (wpfval(WPF()->current_object, 'template')) ? WPF()->current_object['template'] : false;
489
+
490
+ if( $template == 'account' ){
491
+ $form = 'member';
492
+ $form_fields = $this->get_account_fields();
493
+ } elseif( $template == 'register' ){
494
+ $form = 'wpfreg';
495
+ $form_fields = $this->get_register_fields();
496
+ } else{
497
+ $form = 'member';
498
+ $form_fields = $this->get_account_fields();
499
+ $form = apply_filters( 'wpforo_user_update_form', $form );
500
+ $form_fields = apply_filters( 'wpforo_user_update_fields', $form_fields );
501
+ }
502
+
503
+ if( !$form ){ WPF()->notice->add( 'Form name not found', 'error'); return false; }
504
+ if( !$form_fields ){ WPF()->notice->add( 'Form template not found', 'error'); return false; }
505
+
506
+ if( !wpfkey($data, $form) ){
507
+ if( in_array('custom_fields', $type) && count($type) == 1 ){
508
+ if( !wpfval($data, $varname) ){
509
+ $data[ $varname ] = $data;
510
+ if( wpfkey($data, $varname, 'userid') ) unset($data[ $varname ]['userid']);
511
+ }
512
+ } else {
513
+ $data[ $form ] = $data;
514
+ }
515
+ }
516
+ if( wpfval($data, 'userid') && !wpfval($data, $form, 'userid') ){
517
+ $data[ $form ]['userid'] = $data['userid'];
518
+ }
519
+
520
+ if( wpfval($data, $form, 'userid') ){
521
+
522
+ $result_user = true;
523
+ $result_fields = true;
524
+ $result_profile = true;
525
+ $custom_fields = array();
526
+
527
+ //Define $user
528
+ $user = $data[ $form ];
529
+
530
+ //Define $userid
531
+ $userid = intval($data[ $form ]['userid']);
532
+
533
+ //Check profile editor permissions
534
+ if( $check_permissions ) WPF()->perm->can_edit_user( $userid );
535
+
536
+ //Check custom fields and merge to $user array
537
+ if( wpfval($data, $varname) && is_array($data[$varname]) && !empty($data[$varname]) ){
538
+ $custom_fields = $data[$varname];
539
+ $user = array_merge( $custom_fields, $user );
540
+ }
541
+
542
+ //Check file uploading custom fields and merge to $user array
543
+ $file_data = isset($_FILES[$varname]['name']) && $_FILES[$varname]['name'] && is_array($_FILES[$varname]['name']) ? array_filter($_FILES[$varname]['name']) : array();
544
+ $file_fields = WPF()->form->prepare_file_args( $file_data, $userid );
545
+ if( wpfval( $file_fields, 'fields') ) {
546
+ $user = array_merge( $file_fields['fields'], $user );
547
+ $custom_fields = ( !empty($custom_fields) ) ? array_merge($custom_fields, $file_fields['fields']) : $file_fields['fields'];
548
+ }
549
+
550
+ //Hooks
551
+ $user = apply_filters( 'wpforo_update_profile', $user );
552
+ do_action( 'wpforo_update_profile_before', $user );
553
+ if( wpfval($user, 'error') || empty($user) ){
554
+ $error_message = ( wpfval($user, 'error_message') ) ? sanitize_text_field($user['error_message']) : 'Unknown error in profile editing hook. Please disable all plugins and check it again.';
555
+ WPF()->notice->add( $error_message, 'error');
556
+ return false;
557
+ }
558
+
559
+ //Validate fields
560
+ $result = WPF()->form->validate( $user, $form_fields );
561
+ if( wpfval( $result, 'error' ) ){
562
+ if(is_admin() && wpfval($result['error'], 0)){
563
+ wp_die($result['error'][0]);
564
+ }
565
+ else{
566
+ WPF()->notice->add( $result['error'], 'error');
567
+ return false;
568
+ }
569
+ }
570
+
571
+ //Sanitize fields
572
+ $user = WPF()->form->sanitize( $user, $form_fields );
573
+
574
+ //Update User Fields
575
+ if( !empty($user) && ( in_array('full', $type) || in_array('user', $type) ) ){
576
+ $result_user = $this->update_user_fields( $userid, $user, false );
577
+ }
578
+
579
+ //Update Profile Fields
580
+ if( !empty($user) && (in_array('full', $type) || in_array('profile', $type) ) ){
581
+ $result_profile = $this->update_profile_fields( $userid, $user, false );
582
+ }
583
+
584
+ //Password field validation and update
585
+ $result_password = WPF()->form->validate_password( $user );
586
+ if( $result_password === false ){
587
+ $result_password = true;
588
+ }
589
+ if( wpfval( $result_password, 'error' ) ){
590
+ WPF()->notice->add( $result_password['error'], 'error');
591
+ $result_password = false;
592
+ }
593
+ if( $result_password && wpfval($user, 'old_pass') && wpfval($user, 'user_pass1') ){
594
+ $result_password = WPF()->member->change_password( $user['old_pass'], $user['user_pass1'], $userid );
595
+ }
596
+
597
+ //Upload avatar
598
+ if( wpfval($user, 'avatar_type') && $user['avatar_type'] == 'custom' ){
599
+ WPF()->member->upload_avatar( $userid );
600
+ }
601
+
602
+ //Update Custom Fields
603
+ if( !empty($custom_fields) && ( in_array('full', $type) || in_array('custom_fields', $type) ) ){
604
+ $result_fields = $this->update_custom_fields( $userid, $custom_fields, false );
605
+ }
606
+
607
+ //Upload Files from Custom Fields
608
+ if ( wpfval( $file_fields, 'files' ) ) {
609
+ $this->upload_files( $file_fields['files'] );
610
+ }
611
+
612
+ //Reset this user cache
613
+ $this->reset($userid);
614
+
615
+ if( $result_user === false || $result_profile === false || $result_fields === false || $result_password === false ){
616
+ return false;
617
+ } else{
618
+ WPF()->notice->add('Profile updated successfully', 'success');
619
+ do_action( 'wpforo_update_profile_after', $user );
620
+ return $user;
621
+ }
622
+ }
623
+ }
624
+
625
+ public function update_user_fields( $userid, $data, $check_permissions = true ){
626
+
627
+ $result_user = true;
628
+
629
+ if( $check_permissions ){
630
+ WPF()->perm->can_edit_user( $userid );
631
+ }
632
+
633
+ //User Fields
634
+ if( wpfkey($data, 'display_name') ){
635
+ $user_fields['display_name'] = $data['display_name'];
636
+ $user_fields_types[] = '%s';
637
+ }
638
+ if( wpfkey($data, 'user_email') ){
639
+ $user_fields['user_email'] = $data['user_email'];
640
+ $user_fields_types[] = '%s';
641
+ }
642
+ if( wpfkey($data, 'user_nicename') ){
643
+ if( !wpfval($data, 'user_nicename') ){
644
+ $user_info = get_userdata( $userid );
645
+ $data['user_nicename'] = sanitize_title( $user_info->user_nicename );
646
+ }
647
+ $user_fields['user_nicename'] = $data['user_nicename'];
648
+ WPF()->db->update( WPF()->db->usermeta, array('meta_value' => $data['user_nicename'] ), array('user_id' => $userid, 'meta_key' => 'nickname'), array('%s'), array('%d', '%s') );
649
+ $user_fields_types[] = '%s';
650
+ }
651
+ if( wpfkey($data, 'site') ){
652
+ $user_fields['user_url'] = $data['site'];
653
+ $user_fields_types[] = '%s';
654
+ }
655
+
656
+ if( !empty($user_fields) ){
657
+ $result_user = WPF()->db->update(
658
+ WPF()->db->users,
659
+ $user_fields,
660
+ array('ID' => $userid),
661
+ $user_fields_types,
662
+ array('%d')
663
+ );
664
+ if( false === $result_user ) {
665
+ WPF()->notice->add('User data update failed', 'error');
666
+ if( WPF()->db->last_error ){
667
+ WPF()->notice->add( sanitize_text_field( WPF()->db->last_error ), 'error');
668
+ }
669
+ }
670
+ }
671
+ return $result_user;
672
+ }
673
+
674
+ public function update_profile_field( $userid, $field_name, $field_value = NULL ){
675
+ $result = false;
676
+ if( $field_name && !is_null($field_value) ) {
677
+ $sql = "UPDATE `" . WPF()->tables->profiles . "` SET `" . esc_sql( $field_name ) . "` = '" . esc_sql( $field_name ) . "' WHERE `userid` = " . intval( $userid );
678
+ $result = WPF()->db->query( $sql );
679
+ }
680
+ return $result;
681
+ }
682
+
683
+ public function update_profile_fields( $userid, $data, $check_permissions = true ){
684
+
685
+ $result_profile = true;
686
+
687
+ if( $check_permissions ){
688
+ WPF()->perm->can_edit_user( $userid );
689
+ }
690
+
691
+ //Profile Fields
692
+ if( wpfkey($data, 'last_login') ){
693
+ $profile_fields['last_login'] = $data['last_login'];
694
+ $profile_fields_types[] = '%s';
695
+ }
696
+ if( wpfkey($data, 'groupid') ){
697
+ $profile_fields['groupid'] = $data['groupid'];
698
+ $profile_fields_types[] = '%d';
699
+ }
700
+ if( wpfkey($data, 'title') ){
701
+ $profile_fields['title'] = $data['title'];
702
+ $profile_fields_types[] = '%s';
703
+ }
704
+ if( wpfkey($data, 'site') ){
705
+ $profile_fields['site'] = $data['site'];
706
+ $profile_fields_types[] = '%s';
707
+ }
708
+ if( wpfkey($data, 'icq') ){
709
+ $profile_fields['icq'] = $data['icq'];
710
+ $profile_fields_types[] = '%s';
711
+ }
712
+ if( wpfkey($data, 'aim') ){
713
+ $profile_fields['aim'] = $data['aim'];
714
+ $profile_fields_types[] = '%s';
715
+ }
716
+ if( wpfkey($data, 'yahoo') ){
717
+ $profile_fields['yahoo'] = $data['yahoo'];
718
+ $profile_fields_types[] = '%s';
719
+ }
720
+ if( wpfkey($data, 'msn') ){
721
+ $profile_fields['msn'] = $data['msn'];
722
+ $profile_fields_types[] = '%s';
723
+ }
724
+ if( wpfkey($data, 'facebook') ){
725
+ $profile_fields['facebook'] = $data['facebook'];
726
+ $profile_fields_types[] = '%s';
727
+ }
728
+ if( wpfkey($data, 'twitter') ){
729
+ $profile_fields['twitter'] = $data['twitter'];
730
+ $profile_fields_types[] = '%s';
731
+ }
732
+ if( wpfkey($data, 'gtalk') ){
733
+ $profile_fields['gtalk'] = $data['gtalk'];
734
+ $profile_fields_types[] = '%s';
735
+ }
736
+ if( wpfkey($data, 'skype') ){
737
+ $profile_fields['skype'] = $data['skype'];
738
+ $profile_fields_types[] = '%s';
739
+ }
740
+ if( wpfkey($data, 'signature') ){
741
+ $profile_fields['signature'] = $data['signature'];
742
+ $profile_fields_types[] = '%s';
743
+ }
744
+ if( wpfkey($data, 'about') ){
745
+ $profile_fields['about'] = $data['about'];
746
+ $profile_fields_types[] = '%s';
747
+ update_user_meta( $userid, 'description', $data['about'] );
748
+ }
749
+ if( wpfkey($data, 'occupation') ){
750
+ $profile_fields['occupation'] = $data['occupation'];
751
+ $profile_fields_types[] = '%s';
752
+ }
753
+ if( wpfkey($data, 'location') ){
754
+ $profile_fields['location'] = $data['location'];
755
+ $profile_fields_types[] = '%s';
756
+ }
757
+ if( wpfkey($data, 'timezone') ){
758
+ $profile_fields['timezone'] = $data['timezone'];
759
+ $profile_fields_types[] = '%s';
760
+ }
761
+ if( wpfkey($data, 'avatar_type') && $data['avatar_type'] != 'gravatar' && wpfval($data, 'avatar_url') ){
762
+ $profile_fields['avatar'] = esc_url(trim($data['avatar_url']));
763
+ $profile_fields_types[] = '%s';
764
+ }
765
+ if( wpfkey($data, 'avatar_type') && $data['avatar_type'] == 'gravatar'){
766
+ $profile_fields['avatar'] = '';
767
+ $profile_fields_types[] = '%s';
768
+ }
769
+ if( wpfkey($data, 'secondary_groups') ){
770
+ $data['secondary_groups'] = array_filter($data['secondary_groups']);
771
+ $profile_fields['secondary_groups'] = implode( ',', $data['secondary_groups'] );
772
+ $profile_fields_types[] = '%s';
773
+ }
774
+
775
+ if( !empty($profile_fields) ){
776
+ $result_profile = WPF()->db->update(
777
+ WPF()->tables->profiles,
778
+ $profile_fields,
779
+ array('userid' => intval($userid)),
780
+ $profile_fields_types,
781
+ array('%d') );
782
+ if( false === $result_profile ) {
783
+ WPF()->notice->add('User profile update failed', 'error');
784
+ if( WPF()->db->last_error ){
785
+ WPF()->notice->add( sanitize_text_field( WPF()->db->last_error ), 'error');
786
+ }
787
+ }
788
+ }
789
+ return $result_profile;
790
+ }
791
+
792
+ public function update_custom_field( $userid, $field_name, $field_value = NULL ){
793
+ $result = false;
794
+ $fields = $this->get_custom_fields( $userid );
795
+ if( !empty($fields) && $field_name && !is_null($field_value) ){
796
+ foreach( $fields as $name => $value ){
797
+ if( $name == $field_name ){
798
+ $fields[ $name ] = $field_value;
799
+ }
800
+ }
801
+ $custom_fields = array_filter($fields);
802
+ $custom_fields = wpforo_unslashe($custom_fields);
803
+ $custom_fields = wpforo_decode($custom_fields);
804
+ $custom_fields = wpforo_encode($custom_fields);
805
+ $fields_json = json_encode($custom_fields, JSON_UNESCAPED_UNICODE);
806
+ $sql = "UPDATE `" . WPF()->tables->profiles . "` SET `fields` = %s WHERE `userid` = %d;";
807
+ $sql = WPF()->db->prepare($sql, $fields_json, $userid);
808
+ $result = WPF()->db->query($sql);
809
+ }
810
+ return $result;
811
+ }
812
+
813
+ public function update_custom_fields( $userid, $custom_fields, $check_permissions = true ){
814
+
815
+ $result_fields = true;
816
+
817
+ if( !empty($custom_fields) ){
818
+ if( $check_permissions ){
819
+ WPF()->perm->can_edit_user( $userid );
820
+ }
821
+ $custom_fields = array_filter($custom_fields);
822
+ $custom_fields = wpforo_unslashe($custom_fields);
823
+ $custom_fields = wpforo_decode($custom_fields);
824
+ $custom_fields = wpforo_encode($custom_fields);
825
+ $data_old = $this->get_custom_fields( $userid );
826
+ if ($data_old && is_array($data_old)) {
827
+ $custom_fields = wp_parse_args($custom_fields, $data_old);
828
+ }
829
+ $fields_json = json_encode($custom_fields, JSON_UNESCAPED_UNICODE);
830
+ $sql = "UPDATE `" . WPF()->tables->profiles . "` SET `fields` = %s WHERE `userid` = %d;";
831
+ $sql = WPF()->db->prepare($sql, $fields_json, $userid);
832
+ $result_fields = WPF()->db->query($sql);
833
+ if( false === $result_fields ) {
834
+ WPF()->notice->add('User custom field update failed', 'error');
835
+ if( WPF()->db->last_error ){
836
+ WPF()->notice->add( sanitize_text_field( WPF()->db->last_error ), 'error');
837
+ }
838
+ }
839
+ }
840
+
841
+ return $result_fields;
842
+ }
843
+
844
+ public function upload_avatar( $userid = 0 ){
845
+
846
+ $userid = intval($userid);
847
+
848
+ if( wpfval( WPF()->current_object, 'template') ){
849
+ $template = WPF()->current_object['template'];
850
+ if( $template == 'account' ){
851
+ if( !WPF()->perm->usergroup_can('upa') ) return;
852
+ }
853
+ }
854
+
855
+ if( !$user = $this->get_member($userid) ) return;
856
+ $user_nicename = urldecode($user['user_nicename']);
857
+ if(isset($_FILES['avatar']) && !empty($_FILES['avatar']) && isset($_FILES['avatar']['name']) && $_FILES['avatar']['name']){
858
+ $name = sanitize_file_name($_FILES['avatar']['name']); //myimg.png
859
+ $type = sanitize_mime_type($_FILES['avatar']['type']); //image/png
860
+ $tmp_name = sanitize_text_field($_FILES['avatar']['tmp_name']); //D:\wamp\tmp\php986B.tmp
861
+ $error = sanitize_text_field($_FILES['avatar']['error']); //0
862
+ $size = intval($_FILES['avatar']['size']); //6112
863
+
864
+ if( $size > 2*1048576 ){
865
+ WPF()->notice->clear();
866
+ WPF()->notice->add('Avatar image is too big maximum allowed size is 2MB', 'error');
867
+ return FALSE;
868
+ }
869
+
870
+ if( $error ){
871
+ $error = wpforo_file_upload_error($error);
872
+ WPF()->notice->clear();
873
+ WPF()->notice->add($error, 'error');
874
+ return FALSE;
875
+ }
876
+
877
+ $upload_dir = wp_upload_dir();
878
+ $uplds_dir = $upload_dir['basedir']."/wpforo";
879
+ $avatar_dir = $upload_dir['basedir']."/wpforo/avatars";
880
+ if(!is_dir($uplds_dir)) wp_mkdir_p($uplds_dir);
881
+ if(!is_dir($avatar_dir)) wp_mkdir_p($avatar_dir);
882
+
883
+ $ext = pathinfo($name, PATHINFO_EXTENSION);
884
+ if( !wpforo_is_image($ext) ){
885
+ WPF()->notice->clear();
886
+ WPF()->notice->add('Incorrect file format. Allowed formats: jpeg, jpg, png, gif.', 'error');
887
+ return FALSE;
888
+ }
889
+
890
+ $fnm = pathinfo($user_nicename, PATHINFO_FILENAME);
891
+ $fnm = str_replace(' ', '-', $fnm);
892
+ while(strpos($fnm, '--') !== FALSE) $fnm = str_replace('--', '-', $fnm);
893
+ $fnm = preg_replace("/[^-a-zA-Z0-9]/", "", $fnm);
894
+ $fnm = trim($fnm, "-");
895
+
896
+ $avatar_fname = $fnm . ( $fnm ? '_' : '' ) . $userid . "." . strtolower($ext);
897
+ $avatar_fname_orig = $fnm . ( $fnm ? '_' : '' ) . $userid . "." . $ext;
898
+ $avatar_path = $avatar_dir . "/" . $avatar_fname;
899
+ $avatar_path_orig = $avatar_dir . "/" . $avatar_fname_orig;
900
+
901
+ if(is_dir($avatar_dir)){
902
+ if(move_uploaded_file($tmp_name, $avatar_path)) {
903
+ $image = wp_get_image_editor( $avatar_path );
904
+ if ( ! is_wp_error( $image ) ) {
905
+ $image->resize( 150, 150, true );
906
+ $saved = $image->save( $avatar_path );
907
+ if(! is_wp_error( $saved ) && $avatar_fname != $avatar_fname_orig ) {
908
+ if ( defined (PHP_OS) && strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN') unlink( $avatar_path_orig );
909
+ }
910
+ }
911
+ $blog_url = preg_replace('#^https?\:#is', '', $upload_dir['baseurl']);
912
+ WPF()->db->update(WPF()->tables->profiles, array('avatar' => $blog_url . "/wpforo/avatars/" . $avatar_fname), array('userid' => intval($userid)), array('%s'), array('%d'));
913
+ $this->reset($userid);
914
+ }
915
+ }
916
+ }
917
+ }
918
+
919
+ public function upload_files( $file_fields ){
920
+ if ( !empty( $file_fields ) ) {
921
+ $varname = WPF()->form->varname();
922
+ foreach( $file_fields as $field_name => $file_path ) {
923
+ if( wpfval( $_FILES, $varname, 'tmp_name', $field_name ) &&
924
+ !move_uploaded_file( $_FILES[ $varname ]['tmp_name'][$field_name], $file_path )
925
+ ) {
926
+ WPF()->notice->add('Sorry, there was an error uploading attached file', 'error');
927
+ }
928
+ }
929
+ }
930
+ }
931
+
932
+ public function get_custom_field( $userid, $field_name ) {
933
+ $field_value = '';
934
+ if( $userid ){
935
+ $sql = WPF()->db->prepare( "SELECT `fields` FROM `" . WPF()->tables->profiles . "` WHERE userid = %d", $userid);
936
+ $fields = WPF()->db->get_var( $sql );
937
+ if( $fields ) {
938
+ $data = (array) json_decode( $fields, true );
939
+ if( !empty($data) ){
940
+ $data = wpforo_unslashe($data);
941
+ if( wpfkey($data, $field_name) ){
942
+ $field_value = $data[ $field_name ];
943
+ }
944
+ }
945
+ }
946
+ }
947
+ return $field_value;
948
+ }
949
+
950
+ public function get_custom_fields( $userid ) {
951
+ $data = array();
952
+ if( $userid ){
953
+ $sql = WPF()->db->prepare( "SELECT `fields` FROM `" . WPF()->tables->profiles . "` WHERE userid = %d", $userid);
954
+ $fields = WPF()->db->get_var( $sql );
955
+ if( $fields ) {
956
+ $data = (array) json_decode( $fields, true );
957
+ }
958
+ $data = wpforo_unslashe($data);
959
+ }
960
+ return $data;
961
+ }
962
+
963
  public function change_password($old_passw, $new_passw, $userid){
964
  if( !$userid = wpforo_bigintval($userid) ){
965
  WPF()->notice->clear();
987
  WPF()->notice->add('Old password is wrong', 'error');
988
  return false;
989
  }
990
+
991
+ public function synchronize_user($userid, $roles_usergroups = array()){
992
+ $groupid = false;
993
+ if(!$userid) return FALSE;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
994
  $user = get_userdata($userid);
995
+ if( !empty($roles_usergroups) && !empty($user->roles) ){
996
+ foreach( $user->roles as $role ){
997
+ if( isset($roles_usergroups[$role]) ){
998
+ $groupid = $roles_usergroups[$role]; break;
999
+ }
1000
+ }
1001
+ }
1002
+ if( !$groupid ){
1003
+ if( is_super_admin( $userid ) || in_array('administrator', $user->roles) ){
1004
+ $groupid = 1;
1005
+ }elseif( in_array('editor', $user->roles) ){
1006
+ $groupid = 2;
1007
+ }elseif( in_array('customer', $user->roles) ){
1008
+ $groupid = 5;
1009
+ }else{
1010
+ $groupid = WPF()->usergroup->default_groupid;
1011
+ }
1012
+ }
1013
+ $insert_groupid = ( isset($_POST['wpforo_usergroup']) && !wpforo_feature('role-synch') ) ? intval($_POST['wpforo_usergroup']) : $groupid;
1014
  $insert_timezone = (isset($_POST['wpforo_usertimezone'])) ? sanitize_text_field($_POST['wpforo_usertimezone']) : '';
1015
  $about = get_user_meta( $userid, 'description', true );
1016
  return $this->add_profile(
1022
  'about' => stripslashes( wpforo_kses(trim($about), 'user_description') ),
1023
  'last_login' => sanitize_text_field($user->user_registered) ) );
1024
  }
1025
+
1026
+ public function synchronize_users(){
1027
 
1028
  if( is_multisite() ){
1029
  $sql = "SELECT `user_id` FROM `".WPF()->db->usermeta."` WHERE `meta_key` LIKE '".WPF()->blog_prefix."capabilities' AND `user_id` NOT IN( SELECT `userid` FROM `".WPF()->tables->profiles."` )";
1032
  }
1033
  $userids = WPF()->db->get_col($sql);
1034
  if( !empty($userids) ){
1035
+ $roles_usergroups = WPF()->usergroup->get_role_usergroup_relation();
1036
  foreach($userids as $userid){
1037
+ $this->synchronize_user($userid, $roles_usergroups);
1038
  }
1039
  }
1040
 
1046
  ## -- END -- delete profiles where not participant on multisite blog
1047
  }
1048
 
1049
+ public function get_member($args){
1050
  if(!$args) return $this->get_guest();
1051
 
1052
  $cache = WPF()->cache->on('memory_cashe');
1112
  return $member;
1113
  }
1114
  }
1115
+
1116
+ public function get_members($args = array(), &$items_count = 0){
1117
 
1118
  $default = array(
1119
  'include' => array(), // array( 2, 10, 25 )
1158
  return WPF()->db->get_results($sql, ARRAY_A);
1159
  }
1160
  }
1161
+
1162
+ public function search($needle, $fields = array(), $limit = NULL){
1163
 
1164
  if($needle != ''){
1165
  $needle = sanitize_text_field($needle);
1217
 
1218
  return array();
1219
  }
1220
+
1221
+ public function ban($userid){
1222
  if( $userid == WPF()->current_userid ){
1223
  WPF()->notice->add('You can\'t make yourself banned user', 'error');
1224
  return FALSE;
1243
  WPF()->notice->add('User ban action error', 'error');
1244
  return FALSE;
1245
  }
1246
+
1247
+ public function unban($userid){
1248
  if( !WPF()->perm->usergroup_can('bm') || !WPF()->perm->user_can_manage_user( WPF()->current_userid, intval( $userid ) )){
1249
  WPF()->notice->add('Permission denied for this action', 'error');
1250
  return FALSE;
1361
  $src = $member['avatar'];
1362
  $userid = ( $member['userid'] ? $member['userid'] : $member['user_email'] );
1363
  if($cache && isset(self::$cache['avatar'][$userid])){
1364
+ if( isset(self::$cache['avatar'][$userid]['attr']) && self::$cache['avatar'][$userid]['attr'] == $attr && isset(self::$cache['avatar'][$userid]['size']) && self::$cache['avatar'][$userid]['size'] == $size){
1365
  if(isset(self::$cache['avatar'][$userid]['img'])){
1366
  return self::$cache['avatar'][$userid]['img'];
1367
  }
1383
  return $img;
1384
  }
1385
  }
1386
+
1387
+ public function get_avatar($userid, $attr = '', $size = ''){
1388
 
1389
  $cache = WPF()->cache->on('memory_cashe');
1390
 
1427
  if($cache) return self::$cache['avatar'][$userid]['avatar_url'] = $avatar_url;
1428
  return $avatar_url;
1429
  }
1430
+
1431
+ public function get_topics_count( $userid ){
1432
  $count = WPF()->db->get_var("SELECT count(topicid) FROM `".WPF()->tables->topics."` WHERE `userid` = ".intval($userid));
1433
  return $count;
1434
  }
1435
+
1436
+ public function get_questions_count( $userid ){
1437
  $count = WPF()->db->get_var("SELECT count(topicid) FROM `".WPF()->tables->topics."` WHERE `userid` = ".intval($userid));
1438
  return $count;
1439
  }
1440
+
1441
+ public function get_answers_count( $userid ){
1442
  $count = WPF()->db->get_var("SELECT count(postid) FROM `".WPF()->tables->posts."` WHERE `is_answer` = 1 AND `userid` = ".intval($userid));
1443
  return $count;
1444
  }
1445
+
1446
+ public function get_question_comments_count( $userid ){
1447
  $count = WPF()->db->get_var("SELECT count(postid) FROM `".WPF()->tables->posts."` WHERE `parentid` > 0 AND `userid` = ".intval($userid));
1448
  return $count;
1449
  }
1450
+
1451
+ public function get_replies_count( $userid ){
1452
  $count = WPF()->db->get_var("SELECT count(postid) FROM `".WPF()->tables->posts."` WHERE `userid` = ".intval($userid));
1453
  return $count;
1454
  }
1455
+
1456
+ public function get_likes_count( $userid ){
1457
  $count = WPF()->db->get_var("SELECT count(likeid) FROM `".WPF()->tables->likes."` WHERE `userid` = ".intval($userid));
1458
  return $count;
1459
  }
1460
+
1461
+ public function get_votes_count( $userid ){
1462
  $count = WPF()->db->get_var("SELECT count(voteid) FROM `".WPF()->tables->votes."` WHERE `userid` = ".intval($userid));
1463
  return $count;
1464
  }
1465
 
1466
  // how many times the user like or vote
1467
+ public function get_votes_and_likes_count( $userid ){
1468
  return $this->get_votes_count( intval($userid) ) + $this->get_likes_count( intval($userid) );
1469
  }
1470
 
1471
  //getting user's posts votes and likes count
1472
+ public function get_user_votes_and_likes_count( $userid ){
1473
  $votes_count = WPF()->db->get_var("SELECT count(voteid) FROM `".WPF()->tables->votes."` WHERE `post_userid` = ".intval($userid));
1474
  $likes_count = WPF()->db->get_var("SELECT count(likeid) FROM `".WPF()->tables->likes."` WHERE `post_userid` = ".intval($userid));
1475
  return $votes_count + $likes_count;
1476
  }
1477
+
1478
+ public function get_profile_url( $arg, $template = 'profile' ){
1479
  if(!$arg) return wpforo_home_url();
1480
  $userid = intval( basename($arg) );
1481
  $member_args = ( $userid ? $userid : array( 'user_nicename' => basename($arg) ) );
1485
  $profile_url = wpforo_home_url("$template/$user_slug");
1486
  return apply_filters('wpforo_member_profile_url', $profile_url, $user, $template);
1487
  }
1488
+
1489
+ public function profile_url( $member = array(), $template = 'profile' ){
1490
  if(isset($member['ID']) || isset($member['user_nicename'])){
1491
  $user_slug = ( wpfo(WPF()->member->options['url_structure'], false) == 'id' ? $member['ID'] : $member['user_nicename'] );
1492
  $profile_url = wpforo_home_url("$template/$user_slug");
1502
 
1503
  //$args = UserID or Member Object
1504
  //$live_count = TRUE / FALSE
1505
+ public function get_stat( $args = array(), $live_count = false, $cache = false ){
1506
 
1507
  $cache = WPF()->cache->on('memory_cashe');
1508
 
1571
  return $stat;
1572
  }
1573
  }
1574
+
1575
+ public function get_count(){
1576
  return WPF()->db->get_var( "SELECT COUNT(p.`userid`) FROM `".WPF()->tables->profiles."` p
1577
  INNER JOIN `".WPF()->db->users."` u ON u.`ID` = p.`userid` WHERE p.`status` NOT LIKE 'trashed'" );
1578
  }
1579
+
1580
+ public function is_online( $userid, $duration = NULL ){
 
1581
 
1582
  $cache = WPF()->cache->on('memory_cashe');
1583
 
1624
 
1625
  <?php endif;
1626
  }
1627
+
1628
+ public function online_members_count( $duration = NULL ){
1629
  if(!$duration) $duration = WPF()->member->options['online_status_timeout'];
1630
  $current_time = current_time( 'timestamp', 1 );
1631
  $online_timeframe = $current_time - $duration;
1632
  return WPF()->db->get_var( "SELECT COUNT(*) FROM `".WPF()->tables->profiles."` WHERE `online_time` > " . intval($online_timeframe) );
1633
 
1634
  }
1635
+
1636
+ public function get_online_members( $count = 1, $duration = NULL ){
1637
  if(!$duration) $duration = WPF()->member->options['online_status_timeout'];
1638
  $current_time = current_time( 'timestamp', 1 );
1639
  $online_timeframe = $current_time - $duration;
1645
  );
1646
  return $this->get_members($args);
1647
  }
1648
+
1649
+ public function levels(){
1650
  $levels = array( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
1651
  return $levels;
1652
  }
1653
+
1654
+ public function rating( $level = false, $var = false, $default = false ){
1655
  $rating = array();
1656
  $rating['color'] = array( 0 => '#d2d2d2', 1 => '#4dca5c', 2 => '#4dca5c', 3 => '#4dca5c', 4 => '#4dca5c', 5 => '#4dca5c', 6 => '#E5D600', 7 => '#E5D600', 8 => '#E5D600', 9 => '#FF812D', 10 => '#E04A47' );
1657
  $rating['points'] = array( 0 => 0, 1 => 5, 2 => 20, 3 => 50, 4 => 100, 5 => 250, 6 => 500, 7 => 750, 8 => 1000, 9 => 2500, 10 => 5000 );
1677
  elseif( $level === false && !$var ) return $rating;
1678
  else return array();
1679
  }
1680
+
1681
+ public function rating_level($member_posts, $percent = TRUE){
1682
  $bar = 0;
1683
  if($member_posts < $this->rating(1, 'points')){$bar = 0;}
1684
  elseif($member_posts < $this->rating(2, 'points')){$bar = 10;}
1697
  return floor($bar/10);
1698
  }
1699
  }
1700
+
1701
+ public function rating_badge($level = 0, $view = 'short'){
1702
 
1703
  $level = ( $level > 10 ) ? floor($level/10) : $level;
1704
 
1750
  }
1751
 
1752
  public function init_current_user(){
1753
+ WPF()->wp_current_user = $current_user = wp_get_current_user();
1754
  if( $current_user->exists() ){
1755
  $user = $this->get_member( $current_user->ID );
1756
  $status = ( isset($user['status']) ? $user['status'] : '' );
1758
  $user['groupid'] = intval($user['groupid']);
1759
  WPF()->current_user = $user;
1760
  WPF()->current_user_groupid = WPF()->current_user['groupid'];
1761
+ WPF()->current_user_secondary_groupids = ( wpfkey(WPF()->current_user, 'secondary_groups') ) ? WPF()->current_user['secondary_groups'] : '';
1762
+ WPF()->current_userid = $current_user->ID;
1763
  WPF()->current_username = $current_user->user_login;
1764
  WPF()->current_user_email = $current_user->user_email;
1765
  WPF()->current_user_display_name = $current_user->display_name;
 
1766
  $this->update_online_time();
1767
  }
1768
  WPF()->current_user_status = $status;
1823
  <?php endif;
1824
  }
1825
 
 
 
1826
  public function autoban($userid){
1827
  if( !WPF()->perm->usergroup_can( 'em' ) ){
1828
  WPF()->db->update(
1926
  'groupname' => wpforo_phrase('Guest', false),
1927
  'profile_url' => '',
1928
  'stat' => array( 'points' => 0, 'rating' => 0, 'rating_procent' => 0, 'color' => '', 'badge' => '', 'posts' => $args['posts'], 'topics' => 0, 'questions' => 0, 'answers' => 0, 'question_comments' => 0, 'likes' => 0, 'liked' => 0, 'title' => '' ),
1929
+ 'is_email_confirmed' => 0,
1930
+ '$secondary_groups' => ''
1931
  );
1932
 
1933
  if( $cache && $args['email'] ){
1946
 
1947
  $this->fields = apply_filters('wpforo_member_before_init_fields', $this->fields);
1948
 
1949
+ $usergroupids = array();
1950
+ $secondary_groups = '';
1951
+ $usergroups = WPF()->usergroup->get_usergroups();
1952
+ foreach( $usergroups as $usergroup ){
1953
+ $usergroupids[] = $usergroup['groupid'];
1954
+ if( $usergroup['groupid'] != 1 && $usergroup['secondary'] ){
1955
+ $secondary_groups .= $usergroup['groupid'] . '=>' . $usergroup['name'] . "\r\n";
1956
+ }
1957
+ }
1958
  $usergroupids_can_edit_fields = WPF()->perm->usergroups_can('em');
1959
  $usergroupids_can_view_social_net = WPF()->perm->usergroups_can('vmsn');
1960
 
2122
  'placeholder' => wpforo_phrase('User Group', false),
2123
  'faIcon' => 'fas fa-users',
2124
  'name' => 'groupid',
2125
+ 'allowedGroupIds' => array(3, 5),
2126
  'canBeInactive' => array(
2127
  'register',
2128
  'account',
2135
  'isSearchable' => 1
2136
  );
2137
 
2138
+ $this->fields['secondary_groups'] = array(
2139
+ 'fieldKey' => 'secondary_groups',
2140
+ 'type' => 'checkbox',
2141
+ 'isWrapItem' => 1,
2142
+ 'isDefault' => 1,
2143
+ 'isRemovable' => 0,
2144
+ 'isRequired' => 0,
2145
+ 'isEditable' => 0,
2146
+ 'label' => wpforo_phrase('User Groups Secondary', false),
2147
+ 'title' => wpforo_phrase('User Groups Secondary', false),
2148
+ 'placeholder' => '',
2149
+ 'faIcon' => '',
2150
+ 'values' => $secondary_groups,
2151
+ 'name' => 'secondary_groups',
2152
+ 'allowedGroupIds' => array(3, 5),
2153
+ 'canBeInactive' => array(
2154
+ 'register',
2155
+ 'account',
2156
+ 'profile',
2157
+ 'search'
2158
+ ),
2159
+ 'canEdit' => $usergroupids_can_edit_fields,
2160
+ 'canView' => $usergroupids,
2161
+ 'can' => '',
2162
+ 'isSearchable' => 1
2163
+ );
2164
+
2165
  $this->fields['avatar'] = array(
2166
  'fieldKey' => 'avatar',
2167
  'type' => 'avatar',
2633
 
2634
  public function get_register_fields($only_defaults = false){
2635
  $this->init_fields();
2636
+ $password = false;
2637
  $regform = array(
2638
  $this->fields['user_login'],
2639
  $this->fields['user_email']
2644
  $regform
2645
  )
2646
  );
2647
+ if(!$only_defaults) {
2648
+ $fields = apply_filters('wpforo_get_register_fields', $fields);
2649
+ foreach( $fields as $kr => $row ){
2650
+ foreach( $row as $kc => $cols ){
2651
+ foreach( $cols as $field ){
2652
+ if( 'user_pass' == $field['name'] ){
2653
+ $password = true;
2654
+ }
2655
+ }
2656
+ }
2657
+ }
2658
+ if( !wpforo_feature('user-register-email-confirm') && !$password ){
2659
+ $fields[$kr][$kc][] = $this->fields['user_pass'];
2660
+ }
2661
+ }
2662
  return $fields;
2663
  }
2664
 
2674
  $this->fields['user_email'],
2675
  $this->fields['title'],
2676
  $this->fields['groupid'],
2677
+ $this->fields['secondary_groups'],
2678
  $this->fields['avatar'],
2679
  $this->fields['about'],
2680
  $this->fields['site'],
2841
  return (bool) WPF()->db->get_var( WPF()->db->prepare($sql, $userid) );
2842
  }
2843
 
2844
+ public function get_usergroup($userid){
2845
+ $sql = "SELECT `groupid` FROM `" . WPF()->tables->profiles . "` WHERE `userid` = %d";
2846
+ return WPF()->db->get_var( WPF()->db->prepare($sql, $userid) );
2847
+ }
2848
+
2849
+ public function set_usergroup($userid, $groupid){
2850
+ if($userid && $groupid){
2851
+ WPF()->db->query( "UPDATE `" . WPF()->tables->profiles . "` SET `groupid` = " . intval($groupid) . " WHERE `userid` = " . intval($userid) );
2852
+ $this->reset($userid);
2853
+ }
2854
+ }
2855
+
2856
+ public function set_usergroups_secondary($userid, $group_ids = array()){
2857
+ //to-do
2858
+ }
2859
+
2860
  }
wpf-includes/class-permissions.php CHANGED
@@ -172,10 +172,11 @@ class wpForoPermissions{
172
  return FALSE;
173
  }
174
 
175
- function forum_can( $do, $forumid = NULL, $groupid = NULL ){
176
 
177
  $can = 0;
178
- if( !WPF()->current_user_groupid ) return 0;
 
179
 
180
  if( is_null($forumid) && isset(WPF()->current_object['forumid']) ) {
181
  $forumid = WPF()->current_object['forumid'];
@@ -185,25 +186,70 @@ class wpForoPermissions{
185
  if( is_null($groupid) ) {
186
  $groupid = WPF()->current_user_groupid;
187
  }
188
-
189
- if( $forum = WPF()->forum->get_forum($forumid) ){
190
- $permissions = unserialize($forum['permissions']);
191
- if( isset($permissions[$groupid]) ){
192
- $access = $permissions[$groupid];
193
- $access_arr = $this->get_access($access);
194
- $cans = unserialize($access_arr['cans']);
195
- $can = ( isset($cans[$do]) ? $cans[$do] : 0 );
196
- }
197
- }
198
- return $can;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
199
  }
200
 
201
- function usergroup_can( $do, $usergroupid = NULL ){
202
- if( is_null($usergroupid) ) $usergroupid = WPF()->current_user_groupid;
203
- $usergroupid = intval($usergroupid);
204
- $usergroup = WPF()->usergroup->get_usergroup( $usergroupid );
205
- $cans = unserialize($usergroup['cans']);
206
- return ( isset($cans[$do]) ? $cans[$do] : 0 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
  }
208
 
209
  function usergroups_can( $do ){
@@ -256,27 +302,44 @@ class wpForoPermissions{
256
  return false;
257
  }
258
  }
259
-
260
- function user_wp_level( $user_object ){
261
- $level = 0;
262
- $levels = array();
263
- if( is_int($user_object) ){
264
- $user_object = new WP_User( $user_object );
265
- }
266
- if( isset($user_object->allcaps) && is_array($user_object->allcaps) && !empty($user_object->allcaps) ){
267
- foreach($user_object->allcaps as $level_key => $level_value){
268
- if( strpos($level_key, 'level_') !== FALSE && $level_value == 1 ){
269
- $levels[] = intval(str_replace('level_', '', $level_key));
270
- }
271
- }
272
- if(!empty($levels)){
273
- $level = max($levels);
274
- }
275
- }
276
- return $level;
277
- }
278
-
279
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
280
 
281
  public function can_link(){
282
  if( !WPF()->perm->usergroup_can( 'em' ) ){
172
  return FALSE;
173
  }
174
 
175
+ function forum_can( $do, $forumid = NULL, $groupid = NULL, $second_usergroupids = NULL ){
176
 
177
  $can = 0;
178
+ $second_can = 0;
179
+ if( !WPF()->current_user_groupid && is_null($groupid) ) return 0;
180
 
181
  if( is_null($forumid) && isset(WPF()->current_object['forumid']) ) {
182
  $forumid = WPF()->current_object['forumid'];
186
  if( is_null($groupid) ) {
187
  $groupid = WPF()->current_user_groupid;
188
  }
189
+ if( is_null($second_usergroupids) && WPF()->current_user_secondary_groupids ) {
190
+ $second_usergroupids = explode(',', WPF()->current_user_secondary_groupids );
191
+ }
192
+
193
+ if( $forum = WPF()->forum->get_forum($forumid) ){
194
+ $permissions = unserialize($forum['permissions']);
195
+ //Primary Usergroup
196
+ if( isset($permissions[$groupid]) ){
197
+ $access = $permissions[$groupid];
198
+ $access_arr = $this->get_access($access);
199
+ $cans = unserialize($access_arr['cans']);
200
+ $can = ( isset($cans[$do]) ? $cans[$do] : 0 );
201
+ }
202
+ //Secondary Usergroup
203
+ if( !empty($second_usergroupids) && is_array($second_usergroupids) ){
204
+ $second_usergroupids = array_map('intval', $second_usergroupids );
205
+ foreach( $second_usergroupids as $second_usergroupid ){
206
+ if( isset($permissions[$second_usergroupid]) ){
207
+ $access_second = $permissions[$second_usergroupid];
208
+ $access_second_arr = $this->get_access($access_second);
209
+ $second_cans = unserialize($access_second_arr['cans']);
210
+ $second_can = ( isset($second_cans[$do]) ? $second_cans[$do] : 0 );
211
+ if( $second_can ) break;
212
+ }
213
+ }
214
+ }
215
+ }
216
+
217
+ if( !$can && $second_can ){
218
+ return $second_can;
219
+ } else {
220
+ return $can;
221
+ }
222
  }
223
 
224
+ function usergroup_can( $do, $usergroupid = NULL, $second_usergroupids = NULL ){
225
+
226
+ if( is_null($usergroupid) ) $usergroupid = WPF()->current_user_groupid;
227
+ $usergroupid = intval($usergroupid);
228
+ $usergroup = WPF()->usergroup->get_usergroup( $usergroupid );
229
+ $cans = unserialize($usergroup['cans']);
230
+ $can = ( isset($cans[$do]) ? $cans[$do] : 0 );
231
+
232
+ $second_can = 0;
233
+ if( is_null($second_usergroupids) && WPF()->current_user_secondary_groupids ) {
234
+ $second_usergroupids = explode(',', WPF()->current_user_secondary_groupids );
235
+ }
236
+ if( !empty($second_usergroupids) && is_array($second_usergroupids) ){
237
+ $second_usergroupids = array_map('intval', $second_usergroupids );
238
+ foreach( $second_usergroupids as $second_usergroupid ){
239
+ if( $second_usergroupid ){
240
+ $second_usergroup = WPF()->usergroup->get_usergroup( $second_usergroupid );
241
+ $second_cans = unserialize($second_usergroup['cans']);
242
+ $second_can = ( isset($second_cans[$do]) ? $second_cans[$do] : 0 );
243
+ if( $second_can ) break;
244
+ }
245
+ }
246
+ }
247
+
248
+ if( !$can && $second_can ){
249
+ return $second_can;
250
+ } else {
251
+ return $can;
252
+ }
253
  }
254
 
255
  function usergroups_can( $do ){
302
  return false;
303
  }
304
  }
305
+
306
+ function user_wp_level( $user_object ){
307
+ $level = 0;
308
+ $levels = array();
309
+ if( is_int($user_object) ){
310
+ $user_object = new WP_User( $user_object );
311
+ }
312
+ if( isset($user_object->allcaps) && is_array($user_object->allcaps) && !empty($user_object->allcaps) ){
313
+ foreach($user_object->allcaps as $level_key => $level_value){
314
+ if( strpos($level_key, 'level_') !== FALSE && $level_value == 1 ){
315
+ $levels[] = intval(str_replace('level_', '', $level_key));
316
+ }
317
+ }
318
+ if(!empty($levels)){
319
+ $level = max($levels);
320
+ }
321
+ }
322
+ return $level;
323
+ }
324
+
325
+ function can_edit_user( $userid ){
326
+
327
+ if( !$userid ) return false;
328
+
329
+ if( !( $userid == WPF()->current_userid ||
330
+ ( WPF()->perm->usergroup_can('em') &&
331
+ WPF()->perm->user_can_manage_user( WPF()->current_userid, $userid )
332
+ )
333
+ )
334
+ ){
335
+ WPF()->notice->clear();
336
+ WPF()->notice->add('Permission denied', 'error');
337
+ wp_redirect(wpforo_get_request_uri());
338
+ exit();
339
+ }
340
+
341
+ return true;
342
+ }
343
 
344
  public function can_link(){
345
  if( !WPF()->perm->usergroup_can( 'em' ) ){
wpf-includes/class-posts.php CHANGED
@@ -254,6 +254,7 @@ class wpForoPost{
254
  $title = ( isset($title) ? stripslashes($title) : stripslashes($post['title']) );
255
  $body = ( (isset($body) && $body) ? stripslashes($body) : stripslashes($post['body']) );
256
  $status = ( isset($status) ? $status : intval($post['status']) );
 
257
  $name = ( isset($name) ? stripslashes($name) : stripslashes($post['name']) );
258
  $email = ( isset($email) ? stripslashes($email) : stripslashes($post['email']) );
259
 
@@ -324,7 +325,7 @@ class wpForoPost{
324
  if(is_array($last_post) && !empty($last_post)){
325
  $last_post = $last_post[0];
326
  }else{
327
- $last_post = array( 'created' => '0000-00-00 00:00:00', 'userid' => 0, 'postid' => 0 );
328
  }
329
 
330
  WPF()->db->delete(
@@ -507,7 +508,6 @@ class wpForoPost{
507
  $object_key = md5( $sql . WPF()->current_user_groupid );
508
  $object_cache = WPF()->cache->get($object_key);
509
  if(!empty($object_cache)){
510
- $items_count = $object_cache['items_count'];
511
  return $object_cache['items'];
512
  }
513
  else{
@@ -515,7 +515,6 @@ class wpForoPost{
515
  $cache_args_key = md5( $hach . WPF()->current_user_groupid );
516
  $object_cache = WPF()->cache->get($cache_args_key, 'loop', 'post');
517
  if(!empty($object_cache)){
518
- $items_count = $object_cache['items_count'];
519
  return $object_cache['items'];
520
  }
521
  }
254
  $title = ( isset($title) ? stripslashes($title) : stripslashes($post['title']) );
255
  $body = ( (isset($body) && $body) ? stripslashes($body) : stripslashes($post['body']) );
256
  $status = ( isset($status) ? $status : intval($post['status']) );
257
+ $private = ( isset($private) ? $private : intval($post['private']) );
258
  $name = ( isset($name) ? stripslashes($name) : stripslashes($post['name']) );
259
  $email = ( isset($email) ? stripslashes($email) : stripslashes($post['email']) );
260
 
325
  if(is_array($last_post) && !empty($last_post)){
326
  $last_post = $last_post[0];
327
  }else{
328
+ $last_post = array( 'modified' => '0000-00-00 00:00:00', 'created' => '0000-00-00 00:00:00', 'userid' => 0, 'postid' => 0 );
329
  }
330
 
331
  WPF()->db->delete(
508
  $object_key = md5( $sql . WPF()->current_user_groupid );
509
  $object_cache = WPF()->cache->get($object_key);
510
  if(!empty($object_cache)){
 
511
  return $object_cache['items'];
512
  }
513
  else{
515
  $cache_args_key = md5( $hach . WPF()->current_user_groupid );
516
  $object_cache = WPF()->cache->get($cache_args_key, 'loop', 'post');
517
  if(!empty($object_cache)){
 
518
  return $object_cache['items'];
519
  }
520
  }
wpf-includes/class-subscribes.php CHANGED
@@ -36,6 +36,10 @@ class wpForoSubscribe{
36
  'new_post_notification_email_message' => "Hello [member_name]!<br>\r\n New reply has been posted on your subscribed topic - [topic].\r\n <br><br>\r\n <strong>[reply_title]</strong>\r\n <blockquote >\r\n [reply_desc]\r\n </blockquote>\r\n <br><hr>\r\n If you want to unsubscribe from this topic please use the link below.<br>\r\n [unsubscribe_link]" ,
37
  'report_email_subject' => "Forum Post Report",
38
  'report_email_message' => "<strong>Report details:</strong>\r\n Reporter: [reporter], <br>\r\n Message: [message],<br>\r\n <br>\r\n [post_url]",
 
 
 
 
39
  'reset_password_email_message' => "Hello! <br>\r\n\r\n You asked us to reset your password for your account using the email address [user_login]. <br>\r\n\r\n If this was a mistake, or you didn't ask for a password reset, just ignore this email and nothing will happen. <br>\r\n\r\n To reset your password, visit the following address: <br>\r\n\r\n [reset_password_url] <br>\r\n\r\n Thanks!",
40
  //'spam_notification_email_subject' => 'New Banned User',
41
  //'spam_notification_email_message' => "Hello [member_name]!<br>\r\n Please check this user's topics/posts and consider to Delete or Unban.<br>\r\n User Activity: [profile_activity_url]",
36
  'new_post_notification_email_message' => "Hello [member_name]!<br>\r\n New reply has been posted on your subscribed topic - [topic].\r\n <br><br>\r\n <strong>[reply_title]</strong>\r\n <blockquote >\r\n [reply_desc]\r\n </blockquote>\r\n <br><hr>\r\n If you want to unsubscribe from this topic please use the link below.<br>\r\n [unsubscribe_link]" ,
37
  'report_email_subject' => "Forum Post Report",
38
  'report_email_message' => "<strong>Report details:</strong>\r\n Reporter: [reporter], <br>\r\n Message: [message],<br>\r\n <br>\r\n [post_url]",
39
+ 'wp_new_user_notification_email_admin_subject' => "[blogname] New User Registration",
40
+ 'wp_new_user_notification_email_admin_message' => "New user registration on your site [blogname]:\r\n\r\nUsername: [user_login]\r\n\r\nEmail: [user_email]\r\n",
41
+ 'wp_new_user_notification_email_subject' => "[blogname] Your username and password info",
42
+ 'wp_new_user_notification_email_message' => "Username: [user_login]\r\n\r\nTo set your password, visit the following address:\r\n\r\n[set_password_url]\r\n\r\n",
43
  'reset_password_email_message' => "Hello! <br>\r\n\r\n You asked us to reset your password for your account using the email address [user_login]. <br>\r\n\r\n If this was a mistake, or you didn't ask for a password reset, just ignore this email and nothing will happen. <br>\r\n\r\n To reset your password, visit the following address: <br>\r\n\r\n [reset_password_url] <br>\r\n\r\n Thanks!",
44
  //'spam_notification_email_subject' => 'New Banned User',
45
  //'spam_notification_email_message' => "Hello [member_name]!<br>\r\n Please check this user's topics/posts and consider to Delete or Unban.<br>\r\n User Activity: [profile_activity_url]",
wpf-includes/class-template.php CHANGED
@@ -163,7 +163,7 @@ class wpForoTemplate{
163
  <?php endif; ?>
164
  <?php do_action('wpforo_topic_form_extra_fields_after') ?>
165
  </div>
166
- <?php if( wpforo_feature('subscribe_checkbox_on_post_editor') ) : ?>
167
  <div class="wpf-topic-sbs"><input id="wpf-topic-sbs" type="checkbox" name="wpforo_topic_subs" value="1" <?php echo ( wpforo_feature('subscribe_checkbox_default_status') ) ? 'checked="true" ' : ''; ?>/>&nbsp;<label for="wpf-topic-sbs"><?php wpforo_phrase('Subscribe to this topic') ?></label></div>
168
  <?php endif; ?>
169
  <?php do_action('wpforo_editor_topic_submit_before', $forumid) ?>
@@ -218,9 +218,10 @@ class wpForoTemplate{
218
  <div id="wpf-post-create" class="wpf-post-create">
219
  <form name="post" action="" enctype="multipart/form-data" method="POST" class="editor">
220
  <?php wp_nonce_field( 'wpforo_verify_form', 'wpforo_form' ); ?>
 
221
  <input type="hidden" id="wpf_formaction" name="post[action]" value="add"/>
222
  <input type="hidden" id="wpf_formtopicid" name="post[topicid]" value="<?php echo intval($topicid) ?>"/>
223
- <input type="hidden" id="wpf_postparentid" name="post[parentid]" value="0"/>
224
  <input type="hidden" id="wpf_formpostid" name="post[postid]" value=""/>
225
  <input type="hidden" id="wpf_parent" name="post[forumid]" value="<?php echo intval($forumid) ?>" />
226
  <?php if(!is_user_logged_in()): ?>
@@ -282,7 +283,7 @@ class wpForoTemplate{
282
  <?php endif; ?>
283
  <?php do_action('wpforo_reply_form_extra_fields_after') ?>
284
  </div>
285
- <?php if( wpforo_feature('subscribe_checkbox_on_post_editor') ) :
286
  $args = array( "userid" => WPF()->current_userid , "itemid" => intval($topicid), "type" => "topic" );
287
  $subscribe = WPF()->sbscrb->get_subscribe( $args );
288
  if( !isset($subscribe['subid']) ) : ?>
@@ -494,30 +495,53 @@ class wpForoTemplate{
494
  }
495
 
496
  function pagenavi($paged, $items_count, $permalink = TRUE, $class = ''){
497
- $items_per_page = ( WPF()->current_object['template'] == 'topic' ? WPF()->post->options['topics_per_page'] : WPF()->post->options['posts_per_page'] );
 
 
 
 
 
 
 
 
 
498
  if($items_count <= $items_per_page) return;
499
 
500
  $pages_count = ceil($items_count/$items_per_page);
501
 
502
  $current_url = ( WPF()->current_url ? WPF()->current_url : wpforo_get_request_uri() );
 
503
  if($permalink){
504
- $url = trim( preg_replace('#\/paged\/[\d]+\/*.*$#is', '', $current_url), '/' ) . '/paged/';
505
  }else{
506
- $url = trim( preg_replace('#[\&\?]wpfpaged=[\d]*.*$#is', '', $current_url), '/' );
507
  $url .= (strpos($url, '?') === FALSE ? '?' : '&') . 'wpfpaged=';
508
  }
509
  ?>
510
 
511
  <div class="wpf-navi <?php echo esc_attr($class) ?>">
512
  <div class="wpf-navi-wrap">
513
- <span class="wpf-page-info"><?php wpforo_phrase('Page') ?> <?php echo intval($paged) ?> / <?php echo intval($pages_count) ?></span>
514
- <?php if( $paged - 1 > 0 ): ?><a href="<?php echo esc_url($url) . ($paged - 1) ?>" class="wpf-prev-button"><i class="fas fa-chevron-left fa-sx"></i> <?php wpforo_phrase('prev') ?></a><?php endif ?>
515
- <select class="wpf-navi-dropdown" onchange="if (this.value) window.location.href=this.value" title="<?php esc_attr( wpforo_phrase('Select Page') ) ?>">
516
- <?php for($i = 1; $i <= $pages_count; $i++) : ?>
517
- <option value="<?php echo esc_url($url) . $i ?>" <?php echo $paged == $i ? ' selected="selected"' : '' ?>><?php echo intval($i); ?></option>
 
 
 
 
 
 
 
 
 
518
  <?php endfor; ?>
519
  </select>
520
- <?php if( $paged + 1 <= $pages_count ): ?><a href="<?php echo esc_url($url) . ($paged + 1) ?>" class="wpf-prev-button"><?php wpforo_phrase('next') ?> <i class="fas fa-chevron-right fa-sx"></i></a><?php endif ?>
 
 
 
 
521
  </div>
522
  </div>
523
 
@@ -598,8 +622,10 @@ class wpForoTemplate{
598
  break;
599
  case 'answer':
600
  if( WPF()->perm->forum_can('cr', $forumid) ){
601
- $button_html[] = '<span class="wpforo-answer wpf-button"><i class="fas fa-pencil-alt"></i> ' . wpforo_phrase('Answer', false).'</span>';
602
- }else{
 
 
603
  $button_html[] = '<span class="wpf-button not_reg_user"><i class="fas fa-pencil-alt"></i> ' . wpforo_phrase('Answer', false).'</span>';
604
  }
605
  break;
@@ -675,10 +701,10 @@ class wpForoTemplate{
675
  case 'edit':
676
  if($is_closed) break;
677
  $diff = current_time( 'timestamp', 1 ) - strtotime($post['created']);
678
- if( WPF()->member->current_user_is_new() && $post['status'] ){
679
  //New registered user's unapproved topic/post | No Edit button.
680
- }
681
- elseif( !$login && isset($post['email'])
682
  && wpforo_is_owner($post['userid'], $post['email'])
683
  && WPF()->perm->forum_can( ($is_topic ? 'eot' : 'eor' ), $forumid )
684
  && $diff < WPF()->post->options[($is_topic ? 'eot' : 'eor' ).'_durr']
@@ -704,10 +730,10 @@ class wpForoTemplate{
704
  break;
705
  case 'delete':
706
  if( $login ){
707
- if( WPF()->member->current_user_is_new() && $post['status'] ){
708
  //New registered user's unapproved topic/post | No Delete button.
709
- }
710
- else{
711
  $diff = current_time( 'timestamp', 1 ) - strtotime($post['created']);
712
  if( WPF()->perm->forum_can( ($is_topic ? 'dt' : 'dr' ), $forumid ) ||
713
  (WPF()->current_userid == $post['userid'] &&
@@ -720,7 +746,7 @@ class wpForoTemplate{
720
  $b = ( $is_topic ) ? $topicid : $postid;
721
  $button_html[] = '<span id="'. esc_attr( $a . $b ) .'" class="wpf-action wpforo-delete"><i class="fas fa-times wpfsx"></i>' . wpforo_phrase('Delete', false).'</span>';
722
  }
723
- }
724
  }
725
  break;
726
  case 'link':
@@ -770,8 +796,11 @@ class wpForoTemplate{
770
  }
771
 
772
  function breadcrumb($url_data){
 
773
  extract($url_data, EXTR_OVERWRITE);
774
-
 
 
775
  switch($template) :
776
  case 'search': ?>
777
 
@@ -843,7 +872,7 @@ class wpForoTemplate{
843
  <a href="<?php echo wpforo_home_url() ?>" class="wpf-root" title="<?php esc_attr( wpforo_phrase('Forums') ) ?>"><i class="fas fa-home"></i></a>
844
 
845
  <a href="<?php echo wpforo_home_url('members') ?>"><?php wpforo_phrase('Members') ?></a>
846
- <a href="#" class="active"><?php @wpforo_text( wpforo_make_dname($user['display_name'], $user['user_nicename']), 19 ) ?></a>
847
 
848
  <a href="#" class="wpf-end">&nbsp;</a>
849
  </div>
@@ -855,7 +884,7 @@ class wpForoTemplate{
855
  <a href="<?php echo wpforo_home_url() ?>" class="wpf-root" title="<?php esc_attr( wpforo_phrase('Forums') ) ?>"><i class="fas fa-home"></i>
856
 
857
  <a href="<?php echo wpforo_home_url('members') ?>"><?php wpforo_phrase('Members') ?></a>
858
- <a href="<?php echo esc_url($user['profile_url']) ?>"><?php wpforo_text( wpforo_make_dname($user['display_name'], $user['user_nicename']), 19 ) ?></a>
859
  <a href="#" class="active"><?php wpforo_phrase('Account') ?></a>
860
 
861
  <a href="#" class="wpf-end">&nbsp;</a>
@@ -868,7 +897,7 @@ class wpForoTemplate{
868
  <a href="<?php echo wpforo_home_url() ?>" class="wpf-root" title="<?php esc_attr( wpforo_phrase('Forums') ) ?>"><i class="fas fa-home"></i>
869
 
870
  <a href="<?php echo wpforo_home_url('members') ?>"><?php wpforo_phrase('Members') ?></a>
871
- <a href="<?php echo esc_url($user['profile_url']) ?>"><?php wpforo_text( wpforo_make_dname($user['display_name'], $user['user_nicename']), 19 ) ?></a>
872
  <a href="#" class="active"><?php wpforo_phrase('Activity') ?></a>
873
 
874
  <a href="#" class="wpf-end">&nbsp;</a>
@@ -881,7 +910,7 @@ class wpForoTemplate{
881
  <a href="<?php echo wpforo_home_url() ?>" class="wpf-root" title="<?php esc_attr( wpforo_phrase('Forums') ) ?>"><i class="fas fa-home"></i>
882
 
883
  <a href="<?php echo wpforo_home_url('members') ?>"><?php wpforo_phrase('Members') ?></a>
884
- <a href="<?php echo esc_url($user['profile_url']) ?>"><?php wpforo_text( wpforo_make_dname($user['display_name'], $user['user_nicename']), 19 ) ?></a>
885
  <a href="#" class="active"><?php wpforo_phrase('Subscriptions') ?></a>
886
 
887
  <a href="#" class="wpf-end">&nbsp;</a>
@@ -898,7 +927,7 @@ class wpForoTemplate{
898
 
899
  <?php if(!empty($user)) : ?>
900
 
901
- <a href="<?php echo esc_url($user['profile_url']) ?>"><?php wpforo_text( wpforo_make_dname($user['display_name'], $user['user_nicename']), 19 ) ?></a>
902
 
903
  <?php endif ?>
904
 
@@ -920,9 +949,9 @@ class wpForoTemplate{
920
  <?php $forum = wpforo_forum($rel_forumid) ?>
921
  <?php if(!empty($forum)): ?>
922
  <?php if( $key != ( count($relative_ids) - 1 ) ) : ?>
923
- <a href="<?php echo esc_url( $forum['url'] ) ?>" title="<?php echo esc_attr($forum['title']) ?>"><?php wpforo_text($forum['title'], 19) ?></a>
924
  <?php else : ?>
925
- <a href="#" class="active" title="<?php echo esc_attr($forum['title']) ?>"><?php wpforo_text($forum['title'], 19) ?></a>
926
  <?php endif ?>
927
  <?php endif ?>
928
  <?php endforeach ?>
@@ -943,13 +972,13 @@ class wpForoTemplate{
943
  foreach( $relative_ids as $key => $rel_forumid ) : ?>
944
  <?php $forum = wpforo_forum($rel_forumid) ?>
945
  <?php if(!empty($forum)): ?>
946
- <a href="<?php echo esc_url( $forum['url'] ) ?>" title="<?php echo esc_attr($forum['title']) ?>"><?php wpforo_text($forum['title'], 19) ?></a>
947
  <?php endif ?>
948
  <?php endforeach ?>
949
  <?php endif ?>
950
  <?php if(!empty($topic)) : ?>
951
 
952
- <a href="#" class="active" title="<?php echo esc_attr($topic['title']) ?>"><?php wpforo_text($topic['title'], 19) ?></a>
953
 
954
  <?php endif ?>
955
  <a href="#" class="wpf-end">&nbsp;</a>
@@ -1630,479 +1659,50 @@ class wpForoTemplate{
1630
  echo apply_filters('wpforo_member_error_filter', wpforo_phrase('Members not found', FALSE));
1631
  }
1632
 
1633
- public function field( $args, $wrap = true ){
1634
-
1635
- $default = array(
1636
- 'label' => '',
1637
- 'title' => '',
1638
- 'name' => '',
1639
- 'value' => '', //url
1640
- 'values' => '',
1641
- 'type' => 'text',
1642
- 'placeholder' => '',
1643
- 'description' => '',
1644
- 'id' => '',
1645
- 'class' => '',
1646
- 'attributes' => '',
1647
- 'isWrapItem' => '',
1648
- 'isLabelFirst' => '',
1649
- 'isDisabled' => false,
1650
- 'isEditable' => 1,
1651
- 'isRequired' => 1,
1652
- 'isMultiChoice' => 0,
1653
- 'isConfirmPassword' => 1,
1654
- 'minLength' => 0,
1655
- 'maxLength' => 0,
1656
- 'faIcon' => '',
1657
- 'html' => '',
1658
- 'varname' => (( isset(WPF()->form['varname']) ) ? WPF()->form['varname'] : 'wpfdata'),
1659
- 'template' => (( isset(WPF()->form['template']) ) ? WPF()->form['template'] : WPF()->current_object['template']),
1660
- 'canBeInactive' => 1,
1661
- 'canEdit' => array('1'),
1662
- 'canView' => array('1', '2', '3', '5'),
1663
- 'can' => ''
1664
- );
1665
-
1666
-
1667
- $args = wpforo_parse_args( $args, $default );
1668
- $args['faIcon'] = trim($args['faIcon']);
1669
- if( strpos($args['faIcon'], ' ') === false ) $args['faIcon'] = 'fas ' . $args['faIcon'];
1670
- extract( $args );
1671
- $field_html = '';
1672
- $minLength_attr = '';
1673
- $maxLength_attr = '';
1674
- $isRequired = ( $isRequired ) ? ' required="required" ' : '';
1675
- $isDisabled = ( $isDisabled ) ? ' disabled="disabled" ' : '';
1676
- if( !$isDefault ){ $varname = 'data'; }
1677
- $fieldName = ( !empty($varname) ? $varname . '[' . $name . ']' : $name );
1678
- $fieldId = ( !empty($varname) ? $varname . '_' : '' ) . ( ($id) ? $id : $name );
1679
- $minLength = ($minLength) ? intval($minLength): '';
1680
- $maxLength = ($maxLength) ? intval($maxLength): '';
1681
- if( $minLength ) { $minLength_attr = ($type == 'date' || $type == 'number' || $type == 'range') ? ' min="' . $minLength . '" ' : ' minlength="' . $minLength . '" '; }
1682
- if( $maxLength ) { $maxLength_attr = ($type == 'date' || $type == 'number' || $type == 'range') ? ' max="' . $maxLength . '" ' : ' maxlength="' . $maxLength . '" '; }
1683
- $minmax = $minLength_attr . ' ' . $maxLength_attr;
1684
- $attributes .= ' autocomplete="off"';
1685
- $args['value'] = ( isset(WPF()->form['value'][$name]) ) ? WPF()->form['value'][$name] : $args['value'];
1686
- if( !$isDefault && $varname ) $args['value'] = ( isset(WPF()->form['value'][$varname][$name]) ) ? WPF()->form['value'][$varname][$name] : $args['value'];
1687
- $value = $args['value'];
1688
-
1689
- if( $type == 'textarea' ){
1690
- $field_html = '<textarea '. $isRequired .' name="' . esc_attr($fieldName) . '" id="' . esc_attr($fieldId) . '" class="' . esc_attr($class) . '" ' . $isDisabled . ' '.$attributes.' ' . trim($minmax) . ' placeholder="' . esc_attr($placeholder) . '">' . esc_textarea($value) . '</textarea>';
1691
- }
1692
- elseif( $type == 'password' ){
1693
- $password_html = '';
1694
- if( $template == 'account' ){
1695
- $isRequired = 0;
1696
- $args['label'] = wpforo_phrase('Old password', false); $args['description'] = '';
1697
- $password_html = '<input type="password" name="' . esc_attr($varname) . '[old_pass]" value="" id="' . esc_attr($fieldId) . '-old" class="' . esc_attr($class) . '" ' . $isDisabled . ' '.$attributes.' placeholder="' . esc_attr( wpforo_phrase('Old password', false) ) . '"/><i class="fas fa-eye-slash wpf-show-password"></i>';
1698
- $field_html .= ( $wrap ) ? $this->field_wrap( $args, $password_html ) : $password_html;
1699
- }
1700
- if( $template == 'register' && wpforo_feature('user-register-email-confirm') ){
1701
- //If the option "User Registration with Email Confirmation" is enabled password fields should be removed on registration page.
1702
- }
1703
- else{
1704
- if( $isConfirmPassword ) { $p1 = '1'; $p2 = '2'; } else{ $p1 = ''; $p2 = ''; } $fieldName = ( !empty($varname) ? $varname . '[' . $name . $p1 . ']' : $name . $p1 );
1705
- if( $template == 'account' ) { $label = wpforo_phrase('New', false) . ' ' . $label; } $args['label'] = $label; $args['description'] = $description;
1706
- $password_html = '<input type="password" name="' . esc_attr($fieldName) . '" value="" id="' . esc_attr($fieldId) . '-new1" class="' . esc_attr($class) . '" ' . $isDisabled . ' '.$attributes.' ' . trim($minmax) . ' placeholder="' . esc_attr($placeholder) . '"/><i class="fas fa-eye-slash wpf-show-password"></i>';
1707
- $field_html .= ( $wrap ) ? $this->field_wrap( $args, $password_html ) : $password_html;
1708
- if( $isConfirmPassword ){
1709
- $args['label'] = wpforo_phrase('Confirm Password', false); $args['description'] = '';
1710
- $fieldName = ( !empty($varname) ? $varname . '[' . $name . $p2 . ']' : $name . $p2 );
1711
- $password_html = '<input type="password" name="' . esc_attr($fieldName) . '" value="" id="' . esc_attr($fieldId) . '-new2" class="' . esc_attr($class) . '" ' . $isDisabled . ' ' . $attributes . ' ' . trim($minmax) . ' placeholder="' . esc_attr($placeholder) . '"/><i class="fas fa-eye-slash wpf-show-password"></i>';
1712
- $field_html .= ( $wrap ) ? $this->field_wrap( $args, $password_html ) : $password_html;
1713
- }
1714
- }
1715
- }
1716
- elseif( $type == 'file' ){
1717
- $extensions = '';
1718
- if( $fileExtensions ) {
1719
- $fileExtensions = wpforo_parse_args($fileExtensions);
1720
- foreach($fileExtensions as $key => $ext ){ if( strpos($ext, '.') === FALSE ) $fileExtensions[ $key ] = '.' . $ext; }
1721
- $fileExtensions = implode(', ', $fileExtensions);
1722
- if( $fileExtensions ) $extensions = 'accept="' .$fileExtensions . '"';
1723
- }
1724
- $field_html = '<input '. $isRequired .' type="file" name="' . esc_attr($fieldName) . '" value="" id="' . esc_attr($fieldId) . '" class="' . esc_attr($class) . '" ' . $isDisabled . ' ' . $attributes . ' ' . $extensions . ' />';
1725
- }
1726
- elseif( $type == 'checkbox' ){
1727
- $step = 0;
1728
- $field_html = '';
1729
- $value = (is_serialized($value)) ? unserialize($value) : (array)$value;
1730
- if( !is_array($values) ) $values = wpforo_string2array($values);
1731
- if( !empty($values) ){
1732
- foreach( $values as $v ){
1733
- $v = trim($v);
1734
- $data = explode('=>', $v);
1735
- $item_value = isset($data[0]) ? $data[0] : 'no_value';
1736
- $item_label = isset($data[1]) ? $data[1] : $item_value;
1737
- $item_fieldid = $fieldId . '_' . ($step + 1);
1738
- $item_fieldname = $fieldName . '[]';
1739
- $checked = ( in_array($item_value, $value) ) ? 'checked="checked"' : '';
1740
- $field_html .= '<div class="wpf-field-item">';
1741
- $input_html = '<input type="checkbox" name="' . esc_attr($item_fieldname) . '" id="' . esc_attr($item_fieldid) . '" class="wpf-input-checkbox ' . esc_attr($class) . '" value="' . esc_attr($item_value) . '" ' . $checked . ' ' . $isDisabled . ' '.$attributes.' />';
1742
- if ($isWrapItem) {
1743
- $field_html .= '<label>';
1744
- if ($isLabelFirst) { $field_html .= '<span class="wpf-checkbox-label">'. stripslashes($item_label) .'</span> ' . $input_html; } else { $field_html .= $input_html . ' <span class="wpf-checkbox-label">' . stripslashes($item_label) . '</span>'; }
1745
- $field_html .= '</label>';
1746
- }
1747
- else {
1748
- if ($isLabelFirst) { $field_html .= '<span class="wpf-checkbox-label">' . stripslashes($item_label) . '</span> ' . $input_html; } else { $field_html .= $input_html . ' <span class="wpf-checkbox-label">' . stripslashes($item_label) . '</span>'; }
1749
- }
1750
- $field_html .= '</div>';
1751
- $step++;
1752
- }
1753
- }
1754
- }
1755
- elseif( $type == 'radio' ){
1756
- $step = 0;
1757
- $field_html = '';
1758
- if (!is_array($values)) $values = wpforo_string2array($values);
1759
- if (!empty($values)) {
1760
- $item_values = array();
1761
- foreach ($values as $v) {
1762
- $v = trim($v);
1763
- $data = explode('=>', $v);
1764
- $item_value = $data[0];
1765
- $item_label = isset($data[1]) ? $data[1] : $item_value;
1766
- $item_fieldid = $fieldId . '_' . ($step + 1);
1767
- $attrs = ($isRequired) ? 'required="required"' : '';
1768
- $attrs .= ($item_value == $value) ? ' checked="checked"' : '';
1769
-
1770
- $field_html .= '<div class="wpf-field-item">';
1771
- $input_html = '<input type="radio" name="' . esc_attr($fieldName) . '" id="' . esc_attr($item_fieldid) . '" class="wpf-input-radio ' . esc_attr($class) . '" value="' . esc_attr($item_value) . '" ' . $attrs . ' ' . $isDisabled . ' ' . $attributes . ' />';
1772
- if ($isWrapItem) {
1773
- $field_html .= '<label>';
1774
- if ($isLabelFirst) {
1775
- $field_html .= '<span class="wpf-radio-label">' . stripslashes($item_label) . '</span> ' . $input_html;
1776
- } else {
1777
- $field_html .= $input_html . ' <span class="wpf-radio-label">' . stripslashes($item_label) . '</span>';
1778
- }
1779
- $field_html .= '</label>';
1780
- } else {
1781
- if ($isLabelFirst) {
1782
- $field_html .= '<span class="wpf-radio-label">' . stripslashes($item_label) . '</span> ' . $input_html;
1783
- } else {
1784
- $field_html .= $input_html . ' <span class="wpf-radio-label">' . stripslashes($item_label) . '</span>';
1785
- }
1786
- }
1787
- $field_html .= '</div>';
1788
- $step++;
1789
- }
1790
-
1791
- }
1792
- }
1793
- elseif( $type == 'select' ){
1794
-
1795
- $isMultiChoice = $isMultiChoice ? 'multiple="multiple"' : '';
1796
- $field_html = '<select '. $isRequired .' name="' . esc_attr($fieldName) . '" id="' . esc_attr($fieldId) . '" class="' . esc_attr($class) . '" ' . $isMultiChoice . ' ' . $isDisabled . ' '.$attributes.'>';
1797
- $field_html .= '<option value="">' . wpforo_phrase('--- Choose ---', false) . '</option>';
1798
- if( !empty($values) ){
1799
- foreach ($values as $k => $v) {
1800
- if( is_array($v) ){
1801
- $field_html .= '<optgroup label="' . esc_attr($k) . '">';
1802
- foreach ($v as $_k => $_v){
1803
- $data = explode('=>', $_v);
1804
- $item_value = isset($data[0]) ? $data[0] : 'no_value';
1805
- $item_label = isset($data[1]) ? $data[1] : $item_value;
1806
- $value = stripslashes(htmlspecialchars(trim($value)));
1807
- $item_value = stripslashes(htmlspecialchars(trim($item_value)));
1808
- $selected = ( $item_value == $value ) ? 'selected="selected"' : '';
1809
- $field_html .= '<option value="' . esc_attr($item_value) . '" ' . $selected . '>' . stripslashes($item_label) . '</option>';
1810
- }
1811
- $field_html .= '</optgroup>';
1812
- }else{
1813
- $data = explode('=>', $v);
1814
- $item_value = isset($data[0]) ? $data[0] : 'no_value';
1815
- $item_label = isset($data[1]) ? $data[1] : $item_value;
1816
- $value = stripslashes(htmlspecialchars(trim($value)));
1817
- $item_value = stripslashes(htmlspecialchars(trim($item_value)));
1818
- $selected = ( $item_value == $value ) ? 'selected="selected"' : '';
1819
- $field_html .= '<option value="' . esc_attr($item_value) . '" ' . $selected . '>' . stripslashes($item_label) . '</option>';
1820
- }
1821
- }
1822
- }
1823
- $field_html .= '</select>';
1824
- }
1825
- elseif ($type == 'usergroup') {
1826
- $groupids = array();
1827
-
1828
- if ($allowedGroupIds) {
1829
- if (!is_array($allowedGroupIds)) $allowedGroupIds = explode(',', trim($allowedGroupIds));
1830
- $groupids = $allowedGroupIds;
1831
- }
1832
- if ( !WPF()->current_object['user_is_same_current_user'] && (WPF()->current_user_groupid == 1 || current_user_can('administrator') ) ) $groupids = WPF()->usergroup->get_usergroups('groupid');
1833
-
1834
- if( WPF()->current_object['user_is_same_current_user'] && !in_array(WPF()->current_user_groupid, $allowedGroupIds) ) $groupids = array();
1835
-
1836
- $groupids = array_filter($groupids);
1837
- if( $groupids ){
1838
- $field_html = '<select ' . $isRequired . ' name="' . esc_attr($fieldName) . '" id="' . esc_attr($fieldId) . '" class="' . esc_attr($class) . '" ' . $isDisabled . ' ' . $attributes . '>';
1839
- $field_html .= '<option value="">' . wpforo_phrase('--- Choose ---', false) . '</option>';
1840
- foreach ($groupids as $groupid) {
1841
- if ( $group = WPF()->usergroup->get_usergroup($groupid) ) {
1842
- $selected = ($groupid == $value) ? 'selected="selected"' : '';
1843
- $field_html .= '<option value="' . esc_attr($groupid) . '" ' . $selected . '>' . $group['name'] . '</option>';
1844
- }
1845
- }
1846
- $field_html .= '</select>';
1847
- }
1848
- }
1849
- elseif( $type == 'avatar' ){
1850
- $remote_url = ( $value && strpos($value, 'wpforo/avatars') === FALSE ) ? $value : '';
1851
- $field_html = '<ul>
1852
- <li><input ' . $isRequired . ' name="' . esc_attr($varname) . '[avatar_type]" id="wpfat_gravatar" value="gravatar" ' . ( $value == '' || $value == NULL ? 'checked="checked"' : '' ) . ' type="radio" />&nbsp; <label for="wpfat_gravatar">' . wpforo_phrase('Wordpress avatar system', false) . '</label></li>
1853
- <li><input name="' . esc_attr($varname) . '[avatar_type]" id="wpfat_remote" value="remote" ' . ( $value && strpos($value, 'wpforo/avatars') === FALSE ? 'checked="checked"' : '' ) . ' type="radio" />&nbsp; <label for="wpfat_remote">' . wpforo_phrase('Specify avatar by URL:', false) . '</label> <input autocomplete="off" name="' . esc_attr($varname) . '[avatar_url]" value="' . esc_url($remote_url) . '" maxlength="300" data-wpfucf-minmaxlength="1,300" type="url" /></li>';
1854
- if( WPF()->perm->usergroup_can('upa') ) {
1855
- if( strpos($value, 'gravatar.com') === FALSE && strpos($value, 'facebook.com') === FALSE ){
1856
- $url = $value . '?lm=' . time();
1857
- }
1858
- $field_html .= '<li><input name="' . esc_attr($varname) . '[avatar_type]" id="wpfat_custom" value="custom" type="radio" ' . ( (strpos($url, 'wpforo/avatars') !== FALSE) ? 'checked' : '' ) . ' />&nbsp;<label for="wpfat_custom"> ' . wpforo_phrase('Upload an avatar', false) . '</label>' . ( strpos($url, 'wpforo/avatars') !== FALSE ? '<br /><img src="' . esc_url($url) . '" class="wpf-custom-avatar-img"/>' : '' ) .'&nbsp; <input class="wpf-custom-avatar" name="avatar" type="file" />&nbsp;</li>';
1859
- }
1860
- $field_html .= '</ul>
1861
- <script type="text/javascript">jQuery(document).ready(function($){$( "input[name=\'member\[avatar_url\]\']" ).click(function(){$( "#wpfat_remote" ).prop(\'checked\', true);}); $( "input[name=\'avatar\']" ).click(function(){$( "#wpfat_custom" ).prop(\'checked\', true);});});</script>';
1862
- }
1863
- elseif( $type == 'html' ){
1864
- $field_html = stripslashes($html);
1865
- }
1866
- elseif( $type == 'url' || $name == 'user_nicename' ){
1867
- $field_html = '<input ' . $isRequired . ' type="' . $type .'" value="' . esc_attr( urldecode($value) ) . '" name="' . esc_attr($fieldName) .'" id="' . esc_attr($fieldId) . '" class="' . esc_attr($class) . '" ' . $isDisabled . ' '.$attributes.' ' . trim($minmax) . ' placeholder="' . esc_attr($placeholder) . '"/>';
1868
- }
1869
- else{
1870
- $field_html = '<input ' . $isRequired . ' type="' . $type .'" value="' . esc_attr($value) . '" name="' . esc_attr($fieldName) .'" id="' . esc_attr($fieldId) . '" class="' . esc_attr($class) . '" ' . $isDisabled . ' '.$attributes.' ' . trim($minmax) . ' placeholder="' . esc_attr($placeholder) . '"/>';
1871
- }
1872
-
1873
- if( $wrap && $type != 'password' && $field_html ) $field_html = $this->field_wrap( $args, $field_html );
1874
-
1875
- return $field_html;
1876
-
1877
- }
1878
-
1879
-
1880
- public function field_wrap( $args, $field_html ){
1881
- if( !is_array($args) || empty($args) ) return $field_html;
1882
- extract( $args );
1883
- $field_wrap_html = '';
1884
- $is_owner = false;
1885
- $rIcon = '';
1886
- if( isset(WPF()->current_object['user']['ID']) ) {
1887
- $is_owner = wpforo_is_owner( WPF()->current_object['user']['ID'] );
1888
- }
1889
- $field_name_class = sanitize_text_field($name);
1890
- if( $isRequired ) $rIcon = ' <span class="wpf-field-required-icon" title="' . esc_attr(wpforo_phrase('Required field', false)) . '">*</span>';
1891
- $field_required_class = ( $isRequired ) ? 'wpf-field-required' : '';
1892
- if( $template == 'register' ){
1893
- $field_wrap_html .= '<div class="wpf-field wpf-field-type-' . esc_attr($type) . ' wpf-field-name-' . esc_attr($field_name_class) . ' ' . esc_attr($field_required_class) . '" title="' . esc_attr($title) . '">';
1894
- if( $type == 'html' ){
1895
- $field_wrap_html .= $field_html;
1896
- }
1897
- else{
1898
- if ( $label || $description ) {
1899
- $field_wrap_html .= '<div class="wpf-label-wrap">';
1900
- if ($label){ $field_wrap_html .= '<p class="wpf-label wpfcl-1">' . stripslashes($label) . $rIcon . '</p>'; }
1901
- if ($description){ $field_wrap_html .= '<div class="wpf-desc wpfcl-2">' . $description . '</div>'; }
1902
- $field_wrap_html .= '</div>';
1903
- }
1904
- $field_wrap_html .= '<div class="wpf-field-wrap">';
1905
- if($faIcon){ $field_wrap_html .= '<i class="' . esc_attr($faIcon) . ' wpf-field-icon"></i>'; }
1906
- $field_wrap_html .= $field_html;
1907
- $field_wrap_html .= '</div>';
1908
- }
1909
- $field_wrap_html .= '<div class="wpf-field-cl"></div></div>';
1910
- }
1911
- elseif( $template == 'account' ){
1912
-
1913
- $canEdit = ( !empty($canEdit) ) ? (array)$canEdit : array(1);
1914
- $current_user_can_moderate = ( in_array( WPF()->current_user_groupid, $canEdit) ) ? true : false;
1915
-
1916
- if( !$is_owner && !$current_user_can_moderate && WPF()->current_user_groupid !== 1) return;
1917
- if( !$isEditable && !$current_user_can_moderate && WPF()->current_user_groupid !== 1 && !$value) return;
1918
- if( $name == 'signature' && ( !WPF()->perm->usergroup_can('ups') || !wpforo_feature('signature'))) return;
1919
- if( $name == 'avatar' && ( !wpforo_feature('custom-avatars') || !wpforo_feature('avatars') ) ) return;
1920
- if( $name == 'groupid' && WPF()->current_user_groupid !== 1 ) return;
1921
-
1922
- $field_wrap_html .= '<div class="wpf-field wpf-field-type-' . esc_attr($type) . ' wpf-field-name-' . esc_attr($field_name_class) . ' ' . esc_attr($field_required_class) . '" title="' . esc_attr($title) . '">';
1923
-
1924
- if( $type == 'html' ){
1925
- $field_wrap_html .= $field_html;
1926
- }
1927
- elseif($name == 'user_login'){
1928
- $field_wrap_html .= '<div class="wpf-label-wrap">';
1929
- $field_wrap_html .= '<p class="wpf-label wpfcl-1">' . stripslashes($label) . '</p>';
1930
- $field_wrap_html .= '</div>';
1931
- $field_wrap_html .= '<div class="wpf-field-wrap">';
1932
- $field_wrap_html .= '<span class="wpf-username">' . $value . '</span>';
1933
- $field_wrap_html .= '</div>';
1934
- }
1935
- elseif( !$isEditable && !$current_user_can_moderate && WPF()->current_user_groupid !== 1 ){
1936
- $field_wrap_html .= '<div class="wpf-label-wrap">';
1937
- $field_wrap_html .= '<p class="wpf-label wpfcl-1">' . stripslashes($label) . '</p>';
1938
- $field_wrap_html .= '</div>';
1939
- $field_wrap_html .= '<div class="wpf-field-wrap">';
1940
- $field_wrap_html .= '<span class="wpf-filed-value"><i class="' . esc_attr($faIcon) . '"></i> ' . $value . '</span>';
1941
- $field_wrap_html .= '</div>';
1942
- }
1943
- else{
1944
- if ( $label || $description ) {
1945
- $field_wrap_html .= '<div class="wpf-label-wrap">';
1946
- if ($label){ $field_wrap_html .= '<p class="wpf-label wpfcl-1">' . stripslashes($label) . $rIcon . '</p>'; }
1947
- if ($description){ $field_wrap_html .= '<div class="wpf-desc wpfcl-2">' . $description . '</div>'; }
1948
- $field_wrap_html .= '</div>';
1949
- }
1950
- $field_wrap_html .= '<div class="wpf-field-wrap">';
1951
- if($faIcon){ $field_wrap_html .= '<i class="' . esc_attr($faIcon) . ' wpf-field-icon"></i>'; }
1952
- $field_wrap_html .= $field_html;
1953
- switch ($type){
1954
- case 'file':
1955
- if( !empty($value) ) {
1956
- $wp_upload_dir = wp_upload_dir();
1957
- $value = $wp_upload_dir['baseurl'] . "/" . trim($value, '/');
1958
- $field_wrap_html .= '<br/>' . sprintf('<a href="%s" target="_blank">%s</a>', $value, basename($value));
1959
- }
1960
- break;
1961
- }
1962
- $field_wrap_html .= '</div>';
1963
- }
1964
-
1965
- $field_wrap_html .= '<div class="wpf-field-cl"></div></div>';
1966
- }
1967
- elseif( $template == 'profile' ){
1968
- if( !$is_owner && !in_array( WPF()->current_user_groupid, $canView ) ){ return ''; }
1969
- if( $type != 'html' && (!isset($value) || (!is_numeric($value) && empty($value))) ){ return ''; }
1970
- if(is_string($value)) $value = trim($value);
1971
- if(is_array($value)) $value = array_map('trim', $value);
1972
- if( $type == 'textarea' ) $value = wpautop(wpforo_kses(stripslashes($value)));
1973
- $field_wrap_html .= '<div class="wpf-field wpf-field-type-' . esc_attr($type) . ' wpf-field-name-' . esc_attr($field_name_class) . ' ' . esc_attr($field_required_class) . '" title="' . esc_attr($title) . '">';
1974
- if( $type == 'html' ){
1975
- $field_wrap_html .= $field_html;
1976
- }
1977
- else{
1978
- if( !$faIcon ) { $faIcon = 'fas fa-address-card'; }
1979
- if( $label ) {
1980
- $field_wrap_html .= '<div class="wpf-label-wrap">';
1981
- if ($label){
1982
- $field_wrap_html .= '<p class="wpf-label wpfcl-1"><i class="' . esc_attr($faIcon) . ' wpf-field-icon"></i> ' . stripslashes($label) . '</p>';
1983
- }
1984
- $field_wrap_html .= '</div>';
1985
- }
1986
- if( isset($value) && !empty($value) ){
1987
- if( is_array($value) ){
1988
- $field_wrap_html .= esc_html(implode( ', ', $value));
1989
- }
1990
- else{
1991
- switch ($args['type']){
1992
- case 'url':
1993
- $value = sprintf('<a href="%s" target="_blank" rel="nofollow">%s</a>', $value, $value);
1994
- break;
1995
- case 'email':
1996
- $value = sprintf('<a href="mailto:%s" rel="nofollow">%s</a>', $value, $value);
1997
- break;
1998
- case 'phone':
1999
- $value = sprintf('<a href="tel:%s" rel="nofollow">%s</a>', $value, $value);
2000
- break;
2001
- case 'file':
2002
- if( !empty($value) ){
2003
- $wp_upload_dir = wp_upload_dir();
2004
- $value = $wp_upload_dir['baseurl'] . "/" . trim($value, '/');
2005
- $value = sprintf('<a href="%s" target="_blank">%s</a>', $value, basename($value));
2006
- }
2007
- break;
2008
- }
2009
-
2010
- switch ($args['name']){
2011
- case 'skype':
2012
- $value = sprintf('<a href="skype:%s?userinfo" rel="nofollow">%s</a>', $value, $value);
2013
- break;
2014
- case 'location':
2015
- $value = sprintf('<a href="//maps.google.com/?q=%s" target="_blank" rel="nofollow">%s</a>', $value, $value);
2016
- break;
2017
- case 'signature':
2018
- $value = wpforo_signature( $value, array('echo' => 0) );
2019
- break;
2020
- case 'about':
2021
- $value = wpforo_nofollow_tag( $value );
2022
- break;
2023
- }
2024
-
2025
 
2026
- $field_wrap_html .= '<div class="wpf-field-wrap">';
2027
- $field_wrap_html .= $value;
2028
- $field_wrap_html .= '</div>';
2029
- }
2030
- }
2031
- }
2032
- $field_wrap_html .= '<div class="wpf-field-cl"></div></div>';
2033
- }
2034
- elseif( $template == 'members' ){
2035
- $field_wrap_html .= '<div class="wpf-field wpf-field-type-' . esc_attr($type) . ' wpf-field-name-' . esc_attr($field_name_class) . ' ' . esc_attr($field_required_class) . '" title="' . esc_attr($title) . '">';
2036
- if( $type == 'html' ){
2037
- $field_wrap_html .= $field_html;
2038
- }
2039
- else{
2040
- if ( $label || $description ) {
2041
- $field_wrap_html .= '<div class="wpf-label-wrap">';
2042
- if ($label){ $field_wrap_html .= '<p class="wpf-label wpfcl-1">' . stripslashes($label) . $rIcon . '</p>'; }
2043
- if ($description){ $field_wrap_html .= '<div class="wpf-desc wpfcl-2">' . $description . '</div>'; }
2044
- $field_wrap_html .= '</div>';
2045
- }
2046
- $field_wrap_html .= '<div class="wpf-field-wrap">';
2047
- if($faIcon){
2048
- $field_wrap_html .= '<i class="' . esc_attr($faIcon) . ' wpf-field-icon"></i>';
2049
- }
2050
- $field_wrap_html .= $field_html;
2051
- $field_wrap_html .= '</div>';
2052
- }
2053
- $field_wrap_html .= '<div class="wpf-field-cl"></div></div>';
2054
- }
2055
- else{
2056
- $field_wrap_html .= '<div class="wpf-field wpf-field-type-' . esc_attr($type) . ' wpf-field-name-' . esc_attr($field_name_class) . ' ' . esc_attr($field_required_class) . '" title="' . esc_attr($title) . '">';
2057
- $field_wrap_html .= '<div class="wpf-field-wrap">' . $field_html . '<div class="wpf-field-cl"></div></div>';
2058
- $field_wrap_html .= '<div class="wpf-field-cl"></div></div>';
2059
- }
2060
- return $field_wrap_html;
2061
- }
2062
-
2063
-
2064
- public function form_fields( $fields ){
2065
- if(empty($fields)) return '';
2066
- $html = '';
2067
- foreach ($fields as $row_key => $row){
2068
- $rowClasses = "row-$row_key " . apply_filters('wpforo_row_classes', '', $row_key);
2069
- $html .= '<div class="wpf-tr ' . esc_attr( $rowClasses ) . '">';
2070
- foreach ( $row as $col_key => $col ){
2071
- $colClasses = "row_$row_key-col_$col_key " . apply_filters('wpforo_col_classes', '', $row_key, $col_key);
2072
- $html .= '<div class="wpf-td wpfw-' . count($row) . ' ' . esc_attr( $colClasses ) . '">';
2073
- foreach ( $col as $field ){
2074
- if( !empty($field) ) $html .= $this->field( $field );
2075
- }
2076
- $html .= '</div>';
2077
- }
2078
- $html .= '<div class="wpf-cl"></div></div>';
2079
- }
2080
 
2081
- return $html;
2082
- }
 
 
 
2083
 
2084
  public function forum_subscribe_link(){
2085
  if ( WPF()->current_userid || WPF()->current_user_email ): ?>
2086
- <?php
2087
- $args = array( "userid" => WPF()->current_userid, "itemid" => WPF()->current_object['forumid'], "type" => "forum", 'user_email' => WPF()->current_user_email );
2088
- $subscribe = WPF()->sbscrb->get_subscribe( $args );
2089
- if( isset( $subscribe['subid'] ) ): ?>
2090
- <span class="wpf-unsubscribe-forum wpf-action" id="wpfsubscribe-<?php echo WPF()->current_object['forumid'] ?>"><?php wpforo_phrase('Unsubscribe') ?></span>
2091
- <?php else: ?>
2092
- <span class="wpf-subscribe-forum wpf-action wpfcl-5" id="wpfsubscribe-<?php echo WPF()->current_object['forumid'] ?>"><i class="far fa-envelope wpfcl-5"></i> <?php wpforo_phrase('Subscribe for new topics') ?></span>
 
 
2093
  <?php endif; ?>
2094
  <?php endif;
2095
  }
2096
 
2097
  public function topic_subscribe_link(){
2098
  if ( WPF()->current_userid || WPF()->current_user_email ){
2099
- $args = array( "userid" => WPF()->current_userid , "itemid" => WPF()->current_object['topicid'], "type" => "topic", 'user_email' => WPF()->current_user_email );
2100
- $subscribe = WPF()->sbscrb->get_subscribe( $args );
2101
- if( isset( $subscribe['subid'] ) ): ?>
2102
- <span class="wpf-unsubscribe-topic wpf-action" id="wpfsubscribe-<?php echo WPF()->current_object['topicid'] ?>" ><?php wpforo_phrase('Unsubscribe') ?></span>
2103
- <?php else: ?>
2104
- <span class="wpf-subscribe-topic wpf-action wpfcl-5" id="wpfsubscribe-<?php echo WPF()->current_object['topicid'] ?>" ><i class="far fa-envelope"></i> <?php wpforo_phrase('Subscribe for new replies') ?></span>
2105
- <?php endif;
 
 
2106
  }
2107
  }
2108
 
163
  <?php endif; ?>
164
  <?php do_action('wpforo_topic_form_extra_fields_after') ?>
165
  </div>
166
+ <?php if( wpforo_feature('subscribe_checkbox_on_post_editor') && WPF()->perm->forum_can('sb', $forumid) ) : ?>
167
  <div class="wpf-topic-sbs"><input id="wpf-topic-sbs" type="checkbox" name="wpforo_topic_subs" value="1" <?php echo ( wpforo_feature('subscribe_checkbox_default_status') ) ? 'checked="true" ' : ''; ?>/>&nbsp;<label for="wpf-topic-sbs"><?php wpforo_phrase('Subscribe to this topic') ?></label></div>
168
  <?php endif; ?>
169
  <?php do_action('wpforo_editor_topic_submit_before', $forumid) ?>
218
  <div id="wpf-post-create" class="wpf-post-create">
219
  <form name="post" action="" enctype="multipart/form-data" method="POST" class="editor">
220
  <?php wp_nonce_field( 'wpforo_verify_form', 'wpforo_form' ); ?>
221
+ <?php $parentid = 0; if( wpfval($args, 'layout') && $args['layout'] == 3 && isset($topicid) && !WPF()->topic->can_answer($topicid) ){ $topic = wpforo_topic( $topicid ); $parentid = ( wpfval($topic, 'first_postid') ) ? $topic['first_postid'] : 0;} ?>
222
  <input type="hidden" id="wpf_formaction" name="post[action]" value="add"/>
223
  <input type="hidden" id="wpf_formtopicid" name="post[topicid]" value="<?php echo intval($topicid) ?>"/>
224
+ <input type="hidden" id="wpf_postparentid" name="post[parentid]" value="<?php echo intval($parentid) ?>"/>
225
  <input type="hidden" id="wpf_formpostid" name="post[postid]" value=""/>
226
  <input type="hidden" id="wpf_parent" name="post[forumid]" value="<?php echo intval($forumid) ?>" />
227
  <?php if(!is_user_logged_in()): ?>
283
  <?php endif; ?>
284
  <?php do_action('wpforo_reply_form_extra_fields_after') ?>
285
  </div>
286
+ <?php if( wpforo_feature('subscribe_checkbox_on_post_editor') && WPF()->perm->forum_can('sb', $forumid) ) :
287
  $args = array( "userid" => WPF()->current_userid , "itemid" => intval($topicid), "type" => "topic" );
288
  $subscribe = WPF()->sbscrb->get_subscribe( $args );
289
  if( !isset($subscribe['subid']) ) : ?>
495
  }
496
 
497
  function pagenavi($paged, $items_count, $permalink = TRUE, $class = ''){
498
+ switch (WPF()->current_object['template']){
499
+ case 'topic':
500
+ $items_per_page = WPF()->post->options['topics_per_page'];
501
+ break;
502
+ case 'members':
503
+ $items_per_page = WPF()->member->options['members_per_page'];
504
+ break;
505
+ default:
506
+ $items_per_page = WPF()->post->options['posts_per_page'];
507
+ }
508
  if($items_count <= $items_per_page) return;
509
 
510
  $pages_count = ceil($items_count/$items_per_page);
511
 
512
  $current_url = ( WPF()->current_url ? WPF()->current_url : wpforo_get_request_uri() );
513
+ $sanitized_current_url = trim( preg_replace(array('#\/paged\/[\d]+\/*.*$#is', '#[\&\?]wpfpaged=[\d]*.*$#is'), '', $current_url), '/' );
514
  if($permalink){
515
+ $url = $sanitized_current_url . '/paged/';
516
  }else{
517
+ $url = $sanitized_current_url;
518
  $url .= (strpos($url, '?') === FALSE ? '?' : '&') . 'wpfpaged=';
519
  }
520
  ?>
521
 
522
  <div class="wpf-navi <?php echo esc_attr($class) ?>">
523
  <div class="wpf-navi-wrap">
524
+ <span class="wpf-page-info">
525
+ <?php wpforo_phrase('Page') ?> <?php echo intval($paged) ?> / <?php echo intval($pages_count) ?>
526
+ </span>
527
+ <?php if( $paged - 1 > 0 ): $prev_url = ( ($paged - 1) == 1 ? $sanitized_current_url : $url . ($paged - 1) ); ?>
528
+ <a href="<?php echo esc_url( WPF()->user_trailingslashit($prev_url) ) ?>" class="wpf-prev-button">
529
+ <i class="fas fa-chevron-left fa-sx"></i> <?php wpforo_phrase('prev') ?>
530
+ </a>
531
+ <?php endif ?>
532
+ <select class="wpf-navi-dropdown" onchange="if (this.value) window.location.href=this.value" title="<?php esc_attr( wpforo_phrase('Select Page') ) ?>">
533
+ <option value="<?php echo esc_url( WPF()->user_trailingslashit($sanitized_current_url) ) ?>" <?php echo $paged == 1 ? ' selected="selected"' : '' ?>>1</option>
534
+ <?php for($i = 2; $i <= $pages_count; $i++) : ?>
535
+ <option value="<?php echo esc_url( WPF()->user_trailingslashit($url . $i) ) ?>" <?php echo $paged == $i ? ' selected="selected"' : '' ?>>
536
+ <?php echo intval($i); ?>
537
+ </option>
538
  <?php endfor; ?>
539
  </select>
540
+ <?php if( $paged + 1 <= $pages_count ): ?>
541
+ <a href="<?php echo esc_url( WPF()->user_trailingslashit($url . ($paged + 1) ) ) ?>" class="wpf-prev-button">
542
+ <?php wpforo_phrase('next') ?> <i class="fas fa-chevron-right fa-sx"></i>
543
+ </a>
544
+ <?php endif ?>
545
  </div>
546
  </div>
547
 
622
  break;
623
  case 'answer':
624
  if( WPF()->perm->forum_can('cr', $forumid) ){
625
+ if( WPF()->topic->can_answer($topicid) ){
626
+ $button_html[] = '<span class="wpforo-answer wpf-button"><i class="fas fa-pencil-alt"></i> ' . wpforo_phrase('Answer', false).'</span>';
627
+ }
628
+ } else {
629
  $button_html[] = '<span class="wpf-button not_reg_user"><i class="fas fa-pencil-alt"></i> ' . wpforo_phrase('Answer', false).'</span>';
630
  }
631
  break;
701
  case 'edit':
702
  if($is_closed) break;
703
  $diff = current_time( 'timestamp', 1 ) - strtotime($post['created']);
704
+ //if( WPF()->member->current_user_is_new() && $post['status'] ){
705
  //New registered user's unapproved topic/post | No Edit button.
706
+ //} elseif ....
707
+ if( !$login && isset($post['email'])
708
  && wpforo_is_owner($post['userid'], $post['email'])
709
  && WPF()->perm->forum_can( ($is_topic ? 'eot' : 'eor' ), $forumid )
710
  && $diff < WPF()->post->options[($is_topic ? 'eot' : 'eor' ).'_durr']
730
  break;
731
  case 'delete':
732
  if( $login ){
733
+ //if( WPF()->member->current_user_is_new() && $post['status'] ){
734
  //New registered user's unapproved topic/post | No Delete button.
735
+ //}
736
+ //else{
737
  $diff = current_time( 'timestamp', 1 ) - strtotime($post['created']);
738
  if( WPF()->perm->forum_can( ($is_topic ? 'dt' : 'dr' ), $forumid ) ||
739
  (WPF()->current_userid == $post['userid'] &&
746
  $b = ( $is_topic ) ? $topicid : $postid;
747
  $button_html[] = '<span id="'. esc_attr( $a . $b ) .'" class="wpf-action wpforo-delete"><i class="fas fa-times wpfsx"></i>' . wpforo_phrase('Delete', false).'</span>';
748
  }
749
+ //}
750
  }
751
  break;
752
  case 'link':
796
  }
797
 
798
  function breadcrumb($url_data){
799
+
800
  extract($url_data, EXTR_OVERWRITE);
801
+
802
+ $lenght = apply_filters( 'wpforo_breadcrumb_text_lenght', 19 );
803
+
804
  switch($template) :
805
  case 'search': ?>
806
 
872
  <a href="<?php echo wpforo_home_url() ?>" class="wpf-root" title="<?php esc_attr( wpforo_phrase('Forums') ) ?>"><i class="fas fa-home"></i></a>
873
 
874
  <a href="<?php echo wpforo_home_url('members') ?>"><?php wpforo_phrase('Members') ?></a>
875
+ <a href="#" class="active"><?php @wpforo_text( wpforo_make_dname($user['display_name'], $user['user_nicename']), $lenght ) ?></a>
876
 
877
  <a href="#" class="wpf-end">&nbsp;</a>
878
  </div>
884
  <a href="<?php echo wpforo_home_url() ?>" class="wpf-root" title="<?php esc_attr( wpforo_phrase('Forums') ) ?>"><i class="fas fa-home"></i>
885
 
886
  <a href="<?php echo wpforo_home_url('members') ?>"><?php wpforo_phrase('Members') ?></a>
887
+ <a href="<?php echo esc_url($user['profile_url']) ?>"><?php wpforo_text( wpforo_make_dname($user['display_name'], $user['user_nicename']), $lenght ) ?></a>
888
  <a href="#" class="active"><?php wpforo_phrase('Account') ?></a>
889
 
890
  <a href="#" class="wpf-end">&nbsp;</a>
897
  <a href="<?php echo wpforo_home_url() ?>" class="wpf-root" title="<?php esc_attr( wpforo_phrase('Forums') ) ?>"><i class="fas fa-home"></i>
898
 
899
  <a href="<?php echo wpforo_home_url('members') ?>"><?php wpforo_phrase('Members') ?></a>
900
+ <a href="<?php echo esc_url($user['profile_url']) ?>"><?php wpforo_text( wpforo_make_dname($user['display_name'], $user['user_nicename']), $lenght ) ?></a>
901
  <a href="#" class="active"><?php wpforo_phrase('Activity') ?></a>
902
 
903
  <a href="#" class="wpf-end">&nbsp;</a>
910
  <a href="<?php echo wpforo_home_url() ?>" class="wpf-root" title="<?php esc_attr( wpforo_phrase('Forums') ) ?>"><i class="fas fa-home"></i>
911
 
912
  <a href="<?php echo wpforo_home_url('members') ?>"><?php wpforo_phrase('Members') ?></a>
913
+ <a href="<?php echo esc_url($user['profile_url']) ?>"><?php wpforo_text( wpforo_make_dname($user['display_name'], $user['user_nicename']), $lenght ) ?></a>
914
  <a href="#" class="active"><?php wpforo_phrase('Subscriptions') ?></a>
915
 
916
  <a href="#" class="wpf-end">&nbsp;</a>
927
 
928
  <?php if(!empty($user)) : ?>
929
 
930
+ <a href="<?php echo esc_url($user['profile_url']) ?>"><?php wpforo_text( wpforo_make_dname($user['display_name'], $user['user_nicename']), $lenght ) ?></a>
931
 
932
  <?php endif ?>
933
 
949
  <?php $forum = wpforo_forum($rel_forumid) ?>
950
  <?php if(!empty($forum)): ?>
951
  <?php if( $key != ( count($relative_ids) - 1 ) ) : ?>
952
+ <a href="<?php echo esc_url( $forum['url'] ) ?>" title="<?php echo esc_attr($forum['title']) ?>"><?php wpforo_text($forum['title'], $lenght) ?></a>
953
  <?php else : ?>
954
+ <a href="#" class="active" title="<?php echo esc_attr($forum['title']) ?>"><?php wpforo_text($forum['title'], $lenght) ?></a>
955
  <?php endif ?>
956
  <?php endif ?>
957
  <?php endforeach ?>
972
  foreach( $relative_ids as $key => $rel_forumid ) : ?>
973
  <?php $forum = wpforo_forum($rel_forumid) ?>
974
  <?php if(!empty($forum)): ?>
975
+ <a href="<?php echo esc_url( $forum['url'] ) ?>" title="<?php echo esc_attr($forum['title']) ?>"><?php wpforo_text($forum['title'], $lenght) ?></a>
976
  <?php endif ?>
977
  <?php endforeach ?>
978
  <?php endif ?>
979
  <?php if(!empty($topic)) : ?>
980
 
981
+ <a href="#" class="active" title="<?php echo esc_attr($topic['title']) ?>"><?php wpforo_text($topic['title'], $lenght) ?></a>
982
 
983
  <?php endif ?>
984
  <a href="#" class="wpf-end">&nbsp;</a>
1659
  echo apply_filters('wpforo_member_error_filter', wpforo_phrase('Members not found', FALSE));
1660
  }
1661
 
1662
+ /**
1663
+ * @deprecated since 1.5.0
1664
+ * @deprecated No longer used by core and not recommended.
1665
+ */
1666
+ public function field( $args, $wrap = true ){}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1667
 
1668
+ /**
1669
+ * @deprecated since 1.5.0
1670
+ * @deprecated No longer used by core and not recommended.
1671
+ */
1672
+ public function field_wrap( $args, $field_html ){}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1673
 
1674
+ /**
1675
+ * @deprecated since 1.5.0
1676
+ * @deprecated No longer used by core and not recommended.
1677
+ */
1678
+ public function form_fields( $fields ){}
1679
 
1680
  public function forum_subscribe_link(){
1681
  if ( WPF()->current_userid || WPF()->current_user_email ): ?>
1682
+ <?php if( wpfval( WPF()->current_object, 'forumid') && WPF()->perm->forum_can('sb', WPF()->current_object['forumid']) ): ?>
1683
+ <?php
1684
+ $args = array( "userid" => WPF()->current_userid, "itemid" => WPF()->current_object['forumid'], "type" => "forum", 'user_email' => WPF()->current_user_email );
1685
+ $subscribe = WPF()->sbscrb->get_subscribe( $args );
1686
+ if( isset( $subscribe['subid'] ) ): ?>
1687
+ <span class="wpf-unsubscribe-forum wpf-action" id="wpfsubscribe-<?php echo WPF()->current_object['forumid'] ?>"><?php wpforo_phrase('Unsubscribe') ?></span>
1688
+ <?php else: ?>
1689
+ <span class="wpf-subscribe-forum wpf-action wpfcl-5" id="wpfsubscribe-<?php echo WPF()->current_object['forumid'] ?>"><i class="far fa-envelope wpfcl-5"></i> <?php wpforo_phrase('Subscribe for new topics') ?></span>
1690
+ <?php endif; ?>
1691
  <?php endif; ?>
1692
  <?php endif;
1693
  }
1694
 
1695
  public function topic_subscribe_link(){
1696
  if ( WPF()->current_userid || WPF()->current_user_email ){
1697
+ if( wpfval( WPF()->current_object, 'forumid') && WPF()->perm->forum_can('sb', WPF()->current_object['forumid']) ){
1698
+ $args = array( "userid" => WPF()->current_userid , "itemid" => WPF()->current_object['topicid'], "type" => "topic", 'user_email' => WPF()->current_user_email );
1699
+ $subscribe = WPF()->sbscrb->get_subscribe( $args );
1700
+ if( isset( $subscribe['subid'] ) ): ?>
1701
+ <span class="wpf-unsubscribe-topic wpf-action" id="wpfsubscribe-<?php echo WPF()->current_object['topicid'] ?>" ><?php wpforo_phrase('Unsubscribe') ?></span>
1702
+ <?php else: ?>
1703
+ <span class="wpf-subscribe-topic wpf-action wpfcl-5" id="wpfsubscribe-<?php echo WPF()->current_object['topicid'] ?>" ><i class="far fa-envelope"></i> <?php wpforo_phrase('Subscribe for new replies') ?></span>
1704
+ <?php endif;
1705
+ }
1706
  }
1707
  }
1708
 
wpf-includes/class-topics.php CHANGED
@@ -430,12 +430,10 @@ class wpForoTopic{
430
  // END delete topic posts include first post
431
 
432
  if( WPF()->db->delete(WPF()->tables->topics, array('topicid' => $topicid)) ){
433
- WPF()->db->delete(
434
- WPF()->tables->views, array( 'topicid' => $topicid ), array( '%d' )
435
- );
436
  $last_topic = $this->get_topics( array('forumid' => intval($forumid), 'orderby' => 'modified', 'order' => 'DESC', 'row_count' => 1, 'status' => 0, 'private' => 0) );
437
  if(is_array($last_topic) && !empty($last_topic)){
438
- $last_topic = $last_post[0];
439
  if( isset($last_topic['last_post']) ) {
440
  $last_post = WPF()->post->get_post($last_topic['last_post']);
441
  if( is_array($last_post) && !empty($last_post) ){
@@ -694,7 +692,7 @@ class wpForoTopic{
694
  }
695
  }
696
 
697
- if( $cache ){ $object_key = md5( $sql . WPF()->current_user_groupid ); $object_cache = WPF()->cache->get( $object_key ); if( !empty($object_cache) ){ $items_count = $object_cache['items_count']; return $object_cache['items']; }}
698
 
699
  $topics = WPF()->db->get_results($sql, ARRAY_A);
700
  $topics = apply_filters('wpforo_get_topics', $topics);
@@ -951,7 +949,7 @@ class wpForoTopic{
951
  WPF()->notice->clear();
952
  WPF()->notice->add('Done!', 'success');
953
 
954
- wpforo_clean_cache('topic', $target['topicid'], $target);
955
  return true;
956
  }
957
 
@@ -1227,4 +1225,25 @@ class wpForoTopic{
1227
  $members = array_filter($members);
1228
  if(!empty($members)) return $members;
1229
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1230
  }
430
  // END delete topic posts include first post
431
 
432
  if( WPF()->db->delete(WPF()->tables->topics, array('topicid' => $topicid)) ){
433
+ WPF()->db->delete(WPF()->tables->views, array( 'topicid' => $topicid ), array( '%d' ));
 
 
434
  $last_topic = $this->get_topics( array('forumid' => intval($forumid), 'orderby' => 'modified', 'order' => 'DESC', 'row_count' => 1, 'status' => 0, 'private' => 0) );
435
  if(is_array($last_topic) && !empty($last_topic)){
436
+ $last_topic = $last_topic[0];
437
  if( isset($last_topic['last_post']) ) {
438
  $last_post = WPF()->post->get_post($last_topic['last_post']);
439
  if( is_array($last_post) && !empty($last_post) ){
692
  }
693
  }
694
 
695
+ if( $cache ){ $object_key = md5( $sql . WPF()->current_user_groupid ); $object_cache = WPF()->cache->get( $object_key ); if( !empty($object_cache) ){ return $object_cache['items']; }}
696
 
697
  $topics = WPF()->db->get_results($sql, ARRAY_A);
698
  $topics = apply_filters('wpforo_get_topics', $topics);
949
  WPF()->notice->clear();
950
  WPF()->notice->add('Done!', 'success');
951
 
952
+ wpforo_clean_cache();
953
  return true;
954
  }
955
 
1225
  $members = array_filter($members);
1226
  if(!empty($members)) return $members;
1227
  }
1228
+
1229
+ public function can_answer( $topicid ){
1230
+ if( !$topicid ) return false;
1231
+ $topic = wpforo_topic( $topicid );
1232
+ if( wpfval($topic, 'topicid') ){
1233
+ if( wpfval($topic, 'userid') ){
1234
+ if( !WPF()->perm->forum_can('aot', $topic['forumid']) && WPF()->current_userid == $topic['userid'] ){
1235
+ return false;
1236
+ }
1237
+ } else {
1238
+ $guest = WPF()->member->get_guest_cookies();
1239
+ if( wpfval($topic, 'email') && wpfval($guest, 'email') ){
1240
+ if( !WPF()->perm->forum_can('aot', $topic['forumid']) && $topic['email'] == $guest['email'] ){
1241
+ return false;
1242
+ }
1243
+ }
1244
+ }
1245
+ }
1246
+ return true;
1247
+ }
1248
+
1249
  }
wpf-includes/class-usergroups.php CHANGED
@@ -7,7 +7,7 @@ class wpForoUsergroup{
7
  public $default_groupid;
8
  public $cans;
9
 
10
- static $cache = array( 'usergroup' => array(), 'user' => array() );
11
 
12
  function __construct(){
13
  $this->init_defaults();
@@ -65,19 +65,21 @@ class wpForoUsergroup{
65
 
66
  function usergroup_list_data(){
67
  $ugdata = array();
68
- $ugroups = WPF()->db->get_results('SELECT `groupid`, `name`, `access`, `color` FROM '.WPF()->tables->usergroups.' ORDER BY `name` ', ARRAY_A);
69
  foreach($ugroups as $ugroup){
70
  $user_count = WPF()->db->get_var('SELECT COUNT(*) FROM '.WPF()->tables->profiles.' WHERE `groupid` = ' . intval($ugroup['groupid']));
71
  $ugdata[$ugroup['groupid']]['groupid'] = $ugroup['groupid'];
72
  $ugdata[$ugroup['groupid']]['name'] = wpforo_phrase($ugroup['name'], FALSE);
 
73
  $ugdata[$ugroup['groupid']]['count'] = intval($user_count);
74
  $ugdata[$ugroup['groupid']]['access'] = $ugroup['access'];
75
  $ugdata[$ugroup['groupid']]['color'] = $ugroup['color'];
 
76
  }
77
  return $ugdata;
78
  }
79
 
80
- function add($title, $cans = array(), $description = '', $role = 'subscriber', $access = 'standard', $color = '', $visible = 1 ){
81
  $i = 2;
82
  $real_title = $title;
83
  while( WPF()->db->get_var(
@@ -101,7 +103,8 @@ class wpForoUsergroup{
101
  'role' => $role,
102
  'access' => $access,
103
  'color' => $color,
104
- 'visible' => $visible
 
105
  ),
106
  array(
107
  '%s',
@@ -111,7 +114,8 @@ class wpForoUsergroup{
111
  '%s',
112
  '%s',
113
  '%s',
114
- '%d'
 
115
  )
116
  )
117
  ){
@@ -137,7 +141,7 @@ class wpForoUsergroup{
137
  return FALSE;
138
  }
139
 
140
- function edit( $groupid, $title, $cans, $description = '', $role = NULL, $access = NULL, $color = '', $visible = 1 ){
141
 
142
  //if( $groupid == 1 ) return false;
143
  if( !current_user_can('administrator') ){
@@ -160,7 +164,8 @@ class wpForoUsergroup{
160
  'role' => $role,
161
  'access' => $access,
162
  'color' => $color,
163
- 'visible' => $visible
 
164
  ),
165
  array( 'groupid' => intval($groupid) ),
166
  array(
@@ -171,7 +176,8 @@ class wpForoUsergroup{
171
  '%s',
172
  '%s',
173
  '%s',
174
- '%d'
 
175
  ),
176
  array( '%d' ))
177
  ){
@@ -253,6 +259,18 @@ class wpForoUsergroup{
253
  }
254
  return $groupid;
255
  }
 
 
 
 
 
 
 
 
 
 
 
 
256
 
257
  function show_selectbox( $groupid = 0, $exclude = array() ){
258
  if( !$groupid = intval($groupid) ) $groupid = (isset($_POST['usergroup']['groupid'])) ? intval($_POST['usergroup']['groupid']) : 0;
@@ -260,14 +278,163 @@ class wpForoUsergroup{
260
  if( empty($exclude) && isset($_GET['gid']) && intval($_GET['gid']) ) $exclude[] = intval($_GET['gid']);
261
  $ugroups = $this->usergroup_list_data();
262
  foreach($ugroups as $ugroup){
263
- if( in_array($ugroup['groupid'], $exclude) ) continue;
264
  echo '<option value="'.esc_attr($ugroup['groupid']).'" '.($groupid == $ugroup['groupid'] ? 'selected' : '').'>' . esc_html( __($ugroup['name'], 'wpforo') ) . '</option>';
265
  }
266
  }
267
 
268
  function get_visible_usergroup_ids(){
269
  return $results = WPF()->db->get_col("SELECT `groupid` FROM `".WPF()->tables->usergroups."` WHERE `visible` = 1");
270
-
271
  }
272
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
273
  }
7
  public $default_groupid;
8
  public $cans;
9
 
10
+ static $cache = array( 'usergroup' => array(), 'user' => array(), 'user_second' => array() );
11
 
12
  function __construct(){
13
  $this->init_defaults();
65
 
66
  function usergroup_list_data(){
67
  $ugdata = array();
68
+ $ugroups = WPF()->db->get_results('SELECT * FROM '.WPF()->tables->usergroups.' ORDER BY `name` ', ARRAY_A);
69
  foreach($ugroups as $ugroup){
70
  $user_count = WPF()->db->get_var('SELECT COUNT(*) FROM '.WPF()->tables->profiles.' WHERE `groupid` = ' . intval($ugroup['groupid']));
71
  $ugdata[$ugroup['groupid']]['groupid'] = $ugroup['groupid'];
72
  $ugdata[$ugroup['groupid']]['name'] = wpforo_phrase($ugroup['name'], FALSE);
73
+ $ugdata[$ugroup['groupid']]['role'] = $ugroup['role'];
74
  $ugdata[$ugroup['groupid']]['count'] = intval($user_count);
75
  $ugdata[$ugroup['groupid']]['access'] = $ugroup['access'];
76
  $ugdata[$ugroup['groupid']]['color'] = $ugroup['color'];
77
+ $ugdata[$ugroup['groupid']]['secondary'] = $ugroup['secondary'];
78
  }
79
  return $ugdata;
80
  }
81
 
82
+ function add($title, $cans = array(), $description = '', $role = 'subscriber', $access = 'standard', $color = '', $visible = 1, $secondary = 0 ){
83
  $i = 2;
84
  $real_title = $title;
85
  while( WPF()->db->get_var(
103
  'role' => $role,
104
  'access' => $access,
105
  'color' => $color,
106
+ 'visible' => $visible,
107
+ 'secondary' => $secondary
108
  ),
109
  array(
110
  '%s',
114
  '%s',
115
  '%s',
116
  '%s',
117
+ '%d',
118
+ '%d'
119
  )
120
  )
121
  ){
141
  return FALSE;
142
  }
143
 
144
+ function edit( $groupid, $title, $cans, $description = '', $role = NULL, $access = NULL, $color = '', $visible = 1, $secondary = 0 ){
145
 
146
  //if( $groupid == 1 ) return false;
147
  if( !current_user_can('administrator') ){
164
  'role' => $role,
165
  'access' => $access,
166
  'color' => $color,
167
+ 'visible' => $visible,
168
+ 'secondary' => $secondary
169
  ),
170
  array( 'groupid' => intval($groupid) ),
171
  array(
176
  '%s',
177
  '%s',
178
  '%s',
179
+ '%d',
180
+ '%d'
181
  ),
182
  array( '%d' ))
183
  ){
259
  }
260
  return $groupid;
261
  }
262
+
263
+ function get_second_groupid_by_userid( $userid ){
264
+ $cache = WPF()->cache->on('memory_cashe');
265
+ if( $cache && isset(self::$cache['user_second'][$userid]) ){
266
+ return self::$cache['user_second'][$userid];
267
+ }
268
+ $second_groupid = WPF()->db->get_var("SELECT `secondary_groups` FROM `".WPF()->tables->profiles."` WHERE `userid` = " . intval($userid));
269
+ if($cache && isset($second_groupid)){
270
+ self::$cache['user_second'][$userid] = $second_groupid;
271
+ }
272
+ return $second_groupid;
273
+ }
274
 
275
  function show_selectbox( $groupid = 0, $exclude = array() ){
276
  if( !$groupid = intval($groupid) ) $groupid = (isset($_POST['usergroup']['groupid'])) ? intval($_POST['usergroup']['groupid']) : 0;
278
  if( empty($exclude) && isset($_GET['gid']) && intval($_GET['gid']) ) $exclude[] = intval($_GET['gid']);
279
  $ugroups = $this->usergroup_list_data();
280
  foreach($ugroups as $ugroup){
281
+ if( in_array($ugroup['groupid'], $exclude) || ( $groupid != 4 && $ugroup['groupid'] == 4) ) continue;
282
  echo '<option value="'.esc_attr($ugroup['groupid']).'" '.($groupid == $ugroup['groupid'] ? 'selected' : '').'>' . esc_html( __($ugroup['name'], 'wpforo') ) . '</option>';
283
  }
284
  }
285
 
286
  function get_visible_usergroup_ids(){
287
  return $results = WPF()->db->get_col("SELECT `groupid` FROM `".WPF()->tables->usergroups."` WHERE `visible` = 1");
 
288
  }
289
+
290
+ function get_secondary_usergroup_ids(){
291
+ return $results = WPF()->db->get_col("SELECT `groupid` FROM `".WPF()->tables->usergroups."` WHERE `secondary` = 1");
292
+ }
293
+
294
+ function get_secondary_usergroup_names( $ids ){
295
+ if( !is_array($ids) ){
296
+ $ids = explode( ',', $ids );
297
+ }
298
+ $ids = array_map('intval', $ids);
299
+ $ids = implode(',', $ids);
300
+ return $results = WPF()->db->get_col("SELECT `name` FROM `".WPF()->tables->usergroups."` WHERE `secondary` = 1 AND `groupid` IN (" . esc_sql( $ids ) . ")");
301
+ }
302
+
303
+ function get_secondary_usergroups(){
304
+ return $results = WPF()->db->get_results("SELECT * FROM `".WPF()->tables->usergroups."` WHERE `secondary` = 1", ARRAY_A);
305
+ }
306
+
307
+ function get_usergroups_by_role( $role ){
308
+ if( $role ){
309
+ $ugids = WPF()->db->get_col("SELECT `groupid` FROM `" . WPF()->tables->usergroups . "` WHERE `role` = '" . esc_sql($role) . "' ORDER BY `groupid` ASC");
310
+ if( !empty($ugids) ){
311
+ return $ugids;
312
+ }
313
+ }
314
+ return NULL;
315
+ }
316
+
317
+ function get_roles(){
318
+ $roles = wp_roles();
319
+ $roles = $roles->get_names();
320
+ return $roles;
321
+ }
322
+
323
+ function get_roles_ug(){
324
+ $roles_ug = WPF()->db->get_results("SELECT `name`, `role` FROM `" . WPF()->tables->usergroups . "`", ARRAY_A);
325
+ $roles = wp_roles();
326
+ $roles = $roles->get_names();
327
+ if(!empty( $roles )){
328
+ foreach($roles as $role => $name){
329
+ foreach($roles_ug as $ug){
330
+ if( wpfval($ug, 'role') && $role == $ug['role'] ){
331
+ $roles_ug[$role][] = $ug['name'];
332
+ }
333
+ }
334
+ }
335
+ }
336
+ return $roles_ug;
337
+ }
338
+
339
+ function get_roles_woug(){
340
+ $roles_woug = array();
341
+ $roles_ug = WPF()->db->get_col("SELECT `role` FROM `" . WPF()->tables->usergroups . "` GROUP BY `role`");
342
+ $roles = wp_roles();
343
+ $roles = $roles->get_names();
344
+ if(!empty( $roles )){
345
+ foreach($roles as $role => $name){
346
+ if( !in_array($role, $roles_ug) ){
347
+ $roles_woug[$role] = $name;
348
+ }
349
+ }
350
+ }
351
+ return $roles_woug;
352
+ }
353
+
354
+ function get_role_usergroup_relation(){
355
+ $roles = array();
356
+ $data = WPF()->db->get_results("SELECT `groupid`, `role` FROM `" . WPF()->tables->usergroups . "` ORDER BY `groupid` DESC", ARRAY_A);
357
+ if(!empty( $data )){
358
+ foreach($data as $rel){
359
+ $roles[ $rel['role'] ] = $rel['groupid'];
360
+ }
361
+ }
362
+ return $roles;
363
+ }
364
+
365
+ function get_usergroup_role_relation(){
366
+ $usergroups = array();
367
+ $data = WPF()->db->get_results("SELECT `groupid`, `role` FROM `" . WPF()->tables->usergroups . "`", ARRAY_A);
368
+ if(!empty( $data )){
369
+ foreach($data as $rel){
370
+ $usergroups[ $rel['groupid'] ] = $rel['role'];
371
+ }
372
+ }
373
+ return $usergroups;
374
+ }
375
+
376
+ function set_ug_roles( $ug_role ){
377
+ if( !empty($ug_role) ){
378
+ foreach( $ug_role as $usergroupid => $role ){
379
+ $role = sanitize_text_field($role);
380
+ WPF()->db->query("UPDATE " . WPF()->tables->usergroups . " SET `role` = '" . esc_sql($role) . "' WHERE `groupid` = " . intval($usergroupid) );
381
+ }
382
+ }
383
+ }
384
+
385
+ function set_users_groupid( $groupid_userids ){
386
+ $status = array('error' => 0, 'success' => false );
387
+ if( !empty($groupid_userids) ){
388
+ foreach( $groupid_userids as $group_id => $user_ids ){
389
+ if( $group_id && !empty($user_ids) ){
390
+ $userids = implode(',', $user_ids);
391
+ $sql = "UPDATE " . WPF()->tables->profiles ." SET `groupid` = " . intval($group_id) . " WHERE `userid` IN(" . esc_sql($userids) . ")";
392
+ if( FALSE === WPF()->db->query($sql) ){
393
+ $status['error'] = WPF()->db->last_error;
394
+ $status['success'] = false;
395
+ break;
396
+ }
397
+ else{
398
+ $status['success'] = true;
399
+ }
400
+ }
401
+ }
402
+ }
403
+ return $status;
404
+ }
405
+
406
+ function build_users_groupid_array( $usergroupid_role, $users ){
407
+ $array = array();
408
+ $group_users = array();
409
+ $user_prime_group = array();
410
+ $user_second_groups = array();
411
+ if( !empty($users) ){
412
+ foreach( $users as $user ){
413
+ if( !empty($user->roles) ){
414
+ foreach( $user->roles as $role ) {
415
+ $ugids = wpforo_key($usergroupid_role, $role, 'sort');
416
+ $ug_count = count($ugids);
417
+ if(!empty($ugids)){
418
+ foreach($ugids as $ugid){
419
+ if( $ug_count == 1 ){
420
+ if( !isset($user_prime_group[$user->ID]) ) {
421
+ $user_prime_group[$user->ID][] = $ugid;
422
+ $group_users[$ugid][] = intval($user->ID);
423
+ }
424
+ else{
425
+ $user_second_groups[$user->ID][] = $ugid;
426
+ }
427
+ }
428
+ }
429
+ }
430
+ }
431
+ }
432
+ }
433
+ }
434
+ $array['group_users'] = $group_users;
435
+ $array['user_prime_group'] = $user_prime_group;
436
+ $array['user_second_groups'] = $user_second_groups;
437
+ return $array;
438
+ }
439
+
440
  }
wpf-includes/functions-installation.php CHANGED
@@ -41,7 +41,9 @@ function wpforo_activation(){
41
  add_option('wpforo_default_groupid', WPF()->usergroup->default->default_groupid);
42
 
43
  require( WPFORO_DIR . '/wpf-includes/install-sql.php' );
44
- foreach( $wpforo_sql as $sql ) if( FALSE === @WPF()->db->query($sql) ) @WPF()->db->query( preg_replace('#)[\r\n\t\s]*ENGINE.*$#isu', ')', $sql) );
 
 
45
 
46
  $users = WPF()->db->get_var("SELECT COUNT(*) FROM `".WPF()->db->users."`");
47
  if( $users <= 100 ) WPF()->member->synchronize_users();
@@ -198,39 +200,44 @@ function wpforo_activation(){
198
  // Access Sets //////////////////////////////////////////////////
199
  $cans_n = array('vf' => 0, 'ct' => 0, 'vt' => 0, 'et' => 0, 'dt' => 0,
200
  'cr' => 0, 'vr' => 0, 'er' => 0, 'dr' => 0,
201
- 'eot' => 0, 'eor' => 0, 'dot' => 0, 'dor' => 0,
202
  'l' => 0, 'r' => 0, 's' => 0, 'au' => 0,
203
  'p' => 0, 'op' => 0, 'vp' => 0, 'sv' => 0,
204
  'osv' => 0, 'v' => 0, 'a' => 0, 'va' => 0,
205
- 'at' => 0, 'oat' => 0, 'cot' => 0, 'mt' => 0, 'ccp' => 0, 'cvp' => 0, 'cvpr' => 0 );
206
  $cans_r = array('vf' => 1, 'ct' => 0, 'vt' => 1, 'et' => 0, 'dt' => 0,
207
  'cr' => 0, 'vr' => 1, 'er' => 0, 'dr' => 0,
208
- 'eot' => 0, 'eor' => 0, 'dot' => 0, 'dor' => 0,
209
  'l' => 0, 'r' => 0, 's' => 0, 'au' => 0,
210
  'p' => 0, 'op' => 0, 'vp' => 0, 'sv' => 0,
211
  'osv' => 0, 'v' => 0, 'a' => 0, 'va' => 1,
212
- 'at' => 0, 'oat' => 0, 'cot' => 0, 'mt' => 0, 'ccp' => 0, 'cvp' => 0, 'cvpr' => 1 );
213
  $cans_s = array('vf' => 1, 'ct' => 1, 'vt' => 1, 'et' => 0, 'dt' => 0,
214
  'cr' => 1, 'vr' => 1, 'er' => 0, 'dr' => 0,
215
- 'eot' => 1, 'eor' => 1, 'dot' => 1, 'dor' => 1,
216
  'l' => 1, 'r' => 1, 's' => 0, 'au' => 0,
217
  'p' => 0, 'op' => 1, 'vp' => 0, 'sv' => 0,
218
  'osv' => 1, 'v' => 1, 'a' => 1, 'va' => 1,
219
- 'at' => 0, 'oat' => 1, 'cot' => 0, 'mt' => 0, 'ccp' => 1, 'cvp' => 1, 'cvpr' => 1 );
220
  $cans_m = array('vf' => 1, 'ct' => 1, 'vt' => 1, 'et' => 1, 'dt' => 1,
221
  'cr' => 1, 'vr' => 1, 'er' => 1, 'dr' => 1,
222
- 'eot' => 1, 'eor' => 1, 'dot' => 1, 'dor' => 1,
223
  'l' => 1, 'r' => 1, 's' => 1, 'au' => 1,
224
  'p' => 1, 'op' => 1, 'vp' => 1, 'sv' => 1,
225
  'osv' => 1, 'v' => 1, 'a' => 1, 'va' => 1,
226
- 'at' => 1, 'oat' => 1, 'cot' => 1, 'mt' => 1, 'ccp' => 1, 'cvp' => 1, 'cvpr' => 1 );
227
  $cans_a = array('vf' => 1, 'ct' => 1, 'vt' => 1, 'et' => 1, 'dt' => 1,
228
  'cr' => 1, 'vr' => 1, 'er' => 1, 'dr' => 1,
229
- 'eot' => 1, 'eor' => 1, 'dot' => 1, 'dor' => 1,
230
  'l' => 1, 'r' => 1, 's' => 1, 'au' => 1,
231
  'p' => 1, 'op' => 1, 'vp' => 1, 'sv' => 1,
232
  'osv' => 1, 'v' => 1, 'a' => 1, 'va' => 1,
233
- 'at' => 1, 'oat' => 1, 'cot' => 1, 'mt' => 1, 'ccp' => 1, 'cvp' => 1, 'cvpr' => 1 );
 
 
 
 
 
234
 
235
  $sql = "SELECT * FROM `".WPF()->tables->accesses."`";
236
  $accesses = WPF()->db->get_results($sql, ARRAY_A);
@@ -253,13 +260,13 @@ function wpforo_activation(){
253
  WPF()->db->query( $sql );
254
  }else{
255
  foreach($accesses as $access){
256
- $default = array();
257
  $current = unserialize($access['cans']);
258
- if( strtolower($access['access']) == 'no_access' ) $default = $cans_n;
259
- elseif( strtolower($access['access']) == 'read_only' ) $default = $cans_r;
260
- elseif( strtolower($access['access']) == 'standard' ) $default = $cans_s;
261
- elseif( strtolower($access['access']) == 'moderator' ) $default = $cans_m;
262
- elseif( strtolower($access['access']) == 'full' ) $default = $cans_a;
 
263
  if( !empty($default) ){
264
  $data_update = array_merge($default, $current);
265
  if( !empty($data_update) ){
@@ -304,14 +311,16 @@ function wpforo_activation(){
304
  'vmlad' => '1', 'vip' => '0', 'vml' => '1', 'vmo' => '1',
305
  'vms' => '1', 'vmam' => '1', 'vmpn' => '0', 'vwpm' => '1');
306
 
 
 
307
 
308
  $sql = "SELECT * FROM `".WPF()->tables->usergroups."`";
309
  if( !$usergroups = WPF()->db->get_results($sql, ARRAY_A) ){
310
- WPF()->usergroup->add('Admin', $cans_admin, '', 'administrator', 'full', '#FF3333');
311
- WPF()->usergroup->add('Moderator', $cans_moder, '', 'editor', 'moderator', '#0066FF');
312
- WPF()->usergroup->add('Registered', $cans_reg, '', 'subscriber', 'standard', '');
313
- WPF()->usergroup->add('Guest', $cans_guest, '', '', 'read_only', '#222222');
314
- WPF()->usergroup->add('Customer', $cans_customer, '', 'subscriber', 'standard', '#993366');
315
  }
316
  else{
317
  foreach($usergroups as $usergroup){
@@ -322,6 +331,7 @@ function wpforo_activation(){
322
  elseif( strtolower($usergroup['name']) == 'registered' ) $default = $cans_reg;
323
  elseif( strtolower($usergroup['name']) == 'guest' ) $default = $cans_guest;
324
  elseif( strtolower($usergroup['name']) == 'customer' ) $default = $cans_customer;
 
325
  if( !empty($default) ){
326
  $data_update = array_merge($default, $current);
327
  if( !empty($data_update) ){
@@ -506,7 +516,6 @@ function wpforo_activation(){
506
  if( $col_type != 'varchar(50)' ){
507
  @WPF()->db->query( "ALTER TABLE `".WPF()->tables->subscribes."` MODIFY `type` VARCHAR(50) NOT NULL" );
508
  }
509
-
510
  //Add index for double condition queries to avoid SQl caching
511
  $args = array( 'table' => WPF()->tables->posts, 'col' => 'forumid_status', 'check' => 'key_exists' );
512
  if( !wpforo_db_check( $args ) ) {
@@ -515,6 +524,24 @@ function wpforo_activation(){
515
  @WPF()->db->query( "ALTER TABLE `".WPF()->tables->posts."` ADD KEY `topicid_solved` (`topicid`,`is_answer`)" );
516
  @WPF()->db->query( "ALTER TABLE `".WPF()->tables->topics."` ADD KEY `forumid_status` (`forumid`,`status`)" );
517
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
518
  #################################################################
519
  // CHECK Addon Notice /////////////////////////////////////////
520
  $lastHash = get_option('wpforo-addon-note-dismissed');
@@ -595,7 +622,10 @@ function wpforo_uninstall() {
595
  'wpforo_excld_urls',
596
  'wpforo_tools_antispam',
597
  'wpforo_tools_cleanup',
598
- 'wpforo_tools_misc'
 
 
 
599
  );
600
 
601
  foreach($options as $option){
@@ -606,6 +636,7 @@ function wpforo_uninstall() {
606
 
607
  WPF()->db->query( "DELETE FROM `" . WPF()->db->usermeta."` WHERE `meta_key` = '_wpf_member_obj'" );
608
  WPF()->db->query( "DELETE FROM `" . WPF()->db->options."` WHERE option_name LIKE 'wpforo_stat%'" );
 
609
  WPF()->db->query( "DELETE FROM `" . WPF()->db->options."` WHERE option_name LIKE 'widget_wpforo_widget_%'" );
610
 
611
  $menu = wp_get_nav_menu_object( 'wpforo-navigation' );
41
  add_option('wpforo_default_groupid', WPF()->usergroup->default->default_groupid);
42
 
43
  require( WPFORO_DIR . '/wpf-includes/install-sql.php' );
44
+ foreach( $wpforo_sql as $sql ) if( FALSE === @WPF()->db->query($sql) ) {
45
+ @WPF()->db->query( preg_replace('#)[\r\n\t\s]*ENGINE.*$#isu', ')', $sql) );
46
+ }
47
 
48
  $users = WPF()->db->get_var("SELECT COUNT(*) FROM `".WPF()->db->users."`");
49
  if( $users <= 100 ) WPF()->member->synchronize_users();
200
  // Access Sets //////////////////////////////////////////////////
201
  $cans_n = array('vf' => 0, 'ct' => 0, 'vt' => 0, 'et' => 0, 'dt' => 0,
202
  'cr' => 0, 'vr' => 0, 'er' => 0, 'dr' => 0,
203
+ 'eot' => 0, 'eor' => 0, 'dot' => 0, 'dor' => 0, 'sb' => 0,
204
  'l' => 0, 'r' => 0, 's' => 0, 'au' => 0,
205
  'p' => 0, 'op' => 0, 'vp' => 0, 'sv' => 0,
206
  'osv' => 0, 'v' => 0, 'a' => 0, 'va' => 0,
207
+ 'at' => 0, 'oat' => 0, 'aot'=> 0, 'cot' => 0, 'mt' => 0, 'ccp' => 0, 'cvp' => 0, 'cvpr' => 0 );
208
  $cans_r = array('vf' => 1, 'ct' => 0, 'vt' => 1, 'et' => 0, 'dt' => 0,
209
  'cr' => 0, 'vr' => 1, 'er' => 0, 'dr' => 0,
210
+ 'eot' => 0, 'eor' => 0, 'dot' => 0, 'dor' => 0, 'sb' => 1,
211
  'l' => 0, 'r' => 0, 's' => 0, 'au' => 0,
212
  'p' => 0, 'op' => 0, 'vp' => 0, 'sv' => 0,
213
  'osv' => 0, 'v' => 0, 'a' => 0, 'va' => 1,
214
+ 'at' => 0, 'oat' => 0, 'aot'=> 0, 'cot' => 0, 'mt' => 0, 'ccp' => 0, 'cvp' => 0, 'cvpr' => 1 );
215
  $cans_s = array('vf' => 1, 'ct' => 1, 'vt' => 1, 'et' => 0, 'dt' => 0,
216
  'cr' => 1, 'vr' => 1, 'er' => 0, 'dr' => 0,
217
+ 'eot' => 1, 'eor' => 1, 'dot' => 1, 'dor' => 1, 'sb' => 1,
218
  'l' => 1, 'r' => 1, 's' => 0, 'au' => 0,
219
  'p' => 0, 'op' => 1, 'vp' => 0, 'sv' => 0,
220
  'osv' => 1, 'v' => 1, 'a' => 1, 'va' => 1,
221
+ 'at' => 0, 'oat' => 1, 'aot'=> 1, 'cot' => 0, 'mt' => 0, 'ccp' => 1, 'cvp' => 1, 'cvpr' => 1 );
222
  $cans_m = array('vf' => 1, 'ct' => 1, 'vt' => 1, 'et' => 1, 'dt' => 1,
223
  'cr' => 1, 'vr' => 1, 'er' => 1, 'dr' => 1,
224
+ 'eot' => 1, 'eor' => 1, 'dot' => 1, 'dor' => 1, 'sb' => 1,
225
  'l' => 1, 'r' => 1, 's' => 1, 'au' => 1,
226
  'p' => 1, 'op' => 1, 'vp' => 1, 'sv' => 1,
227
  'osv' => 1, 'v' => 1, 'a' => 1, 'va' => 1,
228
+ 'at' => 1, 'oat' => 1, 'aot'=> 1, 'cot' => 1, 'mt' => 1, 'ccp' => 1, 'cvp' => 1, 'cvpr' => 1 );
229
  $cans_a = array('vf' => 1, 'ct' => 1, 'vt' => 1, 'et' => 1, 'dt' => 1,
230
  'cr' => 1, 'vr' => 1, 'er' => 1, 'dr' => 1,
231
+ 'eot' => 1, 'eor' => 1, 'dot' => 1, 'dor' => 1, 'sb' => 1,
232
  'l' => 1, 'r' => 1, 's' => 1, 'au' => 1,
233
  'p' => 1, 'op' => 1, 'vp' => 1, 'sv' => 1,
234
  'osv' => 1, 'v' => 1, 'a' => 1, 'va' => 1,
235
+ 'at' => 1, 'oat' => 1, 'aot'=> 1, 'cot' => 1, 'mt' => 1, 'ccp' => 1, 'cvp' => 1, 'cvpr' => 1 );
236
+
237
+ //Add new Accesses in this array to add those in custom Accesses created by forum admin
238
+ $cans_default = array( 'sb' => 1, 'au' => 1, 'p' => 0, 'op' => 1,
239
+ 'vp' => 0,'ccp' => 0, 'cvp' => 0, 'cvpr' => 1,
240
+ 'aot'=> 1 );
241
 
242
  $sql = "SELECT * FROM `".WPF()->tables->accesses."`";
243
  $accesses = WPF()->db->get_results($sql, ARRAY_A);
260
  WPF()->db->query( $sql );
261
  }else{
262
  foreach($accesses as $access){
 
263
  $current = unserialize($access['cans']);
264
+ if( strtolower($access['access']) == 'no_access' ){ $default = $cans_n; }
265
+ elseif( strtolower($access['access']) == 'read_only' ){ $default = $cans_r; }
266
+ elseif( strtolower($access['access']) == 'standard' ) { $default = $cans_s; }
267
+ elseif( strtolower($access['access']) == 'moderator' ) { $default = $cans_m; }
268
+ elseif( strtolower($access['access']) == 'full' ) { $default = $cans_a; }
269
+ else { $default = $cans_default; }
270
  if( !empty($default) ){
271
  $data_update = array_merge($default, $current);
272
  if( !empty($data_update) ){
311
  'vmlad' => '1', 'vip' => '0', 'vml' => '1', 'vmo' => '1',
312
  'vms' => '1', 'vmam' => '1', 'vmpn' => '0', 'vwpm' => '1');
313
 
314
+ //Add new Cans in this array to add those in custom Usergroup created by forum admin
315
+ $cans_defaults = array( 'vmem' => 1, 'vprf' => 1 );
316
 
317
  $sql = "SELECT * FROM `".WPF()->tables->usergroups."`";
318
  if( !$usergroups = WPF()->db->get_results($sql, ARRAY_A) ){
319
+ WPF()->usergroup->add('Admin', $cans_admin, '', 'administrator', 'full', '#FF3333', 1, 0);
320
+ WPF()->usergroup->add('Moderator', $cans_moder, '', 'editor', 'moderator', '#0066FF', 1, 0);
321
+ WPF()->usergroup->add('Registered', $cans_reg, '', 'subscriber', 'standard', '', 1, 1);
322
+ WPF()->usergroup->add('Guest', $cans_guest, '', '', 'read_only', '#222222', 0, 0);
323
+ WPF()->usergroup->add('Customer', $cans_customer, '', 'customer', 'standard', '#993366', 1, 1);
324
  }
325
  else{
326
  foreach($usergroups as $usergroup){
331
  elseif( strtolower($usergroup['name']) == 'registered' ) $default = $cans_reg;
332
  elseif( strtolower($usergroup['name']) == 'guest' ) $default = $cans_guest;
333
  elseif( strtolower($usergroup['name']) == 'customer' ) $default = $cans_customer;
334
+ else { $default = $cans_defaults; }
335
  if( !empty($default) ){
336
  $data_update = array_merge($default, $current);
337
  if( !empty($data_update) ){
516
  if( $col_type != 'varchar(50)' ){
517
  @WPF()->db->query( "ALTER TABLE `".WPF()->tables->subscribes."` MODIFY `type` VARCHAR(50) NOT NULL" );
518
  }
 
519
  //Add index for double condition queries to avoid SQl caching
520
  $args = array( 'table' => WPF()->tables->posts, 'col' => 'forumid_status', 'check' => 'key_exists' );
521
  if( !wpforo_db_check( $args ) ) {
524
  @WPF()->db->query( "ALTER TABLE `".WPF()->tables->posts."` ADD KEY `topicid_solved` (`topicid`,`is_answer`)" );
525
  @WPF()->db->query( "ALTER TABLE `".WPF()->tables->topics."` ADD KEY `forumid_status` (`forumid`,`status`)" );
526
  }
527
+ #################################################################
528
+ // ADD `secondary_groups` field in profiles TABLE //////////////
529
+ $args = array( 'table' => WPF()->tables->profiles, 'col' => 'secondary_groups', 'check' => 'col_exists' );
530
+ if( !wpforo_db_check( $args ) ){
531
+ @WPF()->db->query( "ALTER TABLE `".WPF()->tables->profiles."` ADD `secondary_groups` VARCHAR(255)" );
532
+ }
533
+ $args = array( 'table' => WPF()->tables->usergroups, 'col' => 'secondary', 'check' => 'col_exists' );
534
+ if( !wpforo_db_check( $args ) ){
535
+ @WPF()->db->query( "ALTER TABLE `" . WPF()->tables->usergroups . "` ADD `secondary` TINYINT(1) NOT NULL DEFAULT 0;" );
536
+ @WPF()->db->query( "UPDATE `".WPF()->tables->usergroups."` SET `secondary` = 1 WHERE `groupid` IN(3,5)");
537
+ }
538
+ #################################################################
539
+ // ADD `fields` field in profiles TABLE //////////////
540
+ $args = array( 'table' => WPF()->tables->profiles, 'col' => 'fields', 'check' => 'col_exists' );
541
+ if( !wpforo_db_check( $args ) ){
542
+ @WPF()->db->query( "ALTER TABLE `".WPF()->tables->profiles."` ADD `fields` LONGTEXT" );
543
+ }
544
+
545
  #################################################################
546
  // CHECK Addon Notice /////////////////////////////////////////
547
  $lastHash = get_option('wpforo-addon-note-dismissed');
622
  'wpforo_excld_urls',
623
  'wpforo_tools_antispam',
624
  'wpforo_tools_cleanup',
625
+ 'wpforo_tools_misc',
626
+ 'wpforo_tools_legal',
627
+ 'wpforo_api_options',
628
+ 'wpforo_deactivation_dialog_never_show'
629
  );
630
 
631
  foreach($options as $option){
636
 
637
  WPF()->db->query( "DELETE FROM `" . WPF()->db->usermeta."` WHERE `meta_key` = '_wpf_member_obj'" );
638
  WPF()->db->query( "DELETE FROM `" . WPF()->db->options."` WHERE option_name LIKE 'wpforo_stat%'" );
639
+ WPF()->db->query( "DELETE FROM `" . WPF()->db->options."` WHERE option_name LIKE 'wpforo_forum_tree_%'" );
640
  WPF()->db->query( "DELETE FROM `" . WPF()->db->options."` WHERE option_name LIKE 'widget_wpforo_widget_%'" );
641
 
642
  $menu = wp_get_nav_menu_object( 'wpforo-navigation' );
wpf-includes/functions-integration.php CHANGED
@@ -18,7 +18,7 @@ function wpforo_has_profile_plugin( $userid = 0 ){
18
  $profile_url = false;
19
  if($userid){
20
  // Ultimate Member | Profile Page URL
21
- if(class_exists('UM_API')){
22
  um_fetch_user($userid); $profile_url = um_user_profile_url(); um_reset_user();
23
  }
24
  // BuddyPress | Profile Page URL
@@ -66,6 +66,8 @@ function wpforo_seo_clear(){
66
  if (defined('AIOSEOP_VERSION')) { // All-In-One SEO
67
  global $aiosp;
68
  remove_action('wp_head',array($aiosp,'wp_head'));
 
 
69
  }
70
  remove_action('wp_head','rel_canonical');
71
  remove_action('wp_head','index_rel_link');
@@ -75,10 +77,9 @@ function wpforo_seo_clear(){
75
  }
76
  add_action( 'parse_query', 'wpforo_seo_clear' );
77
 
78
-
79
- /**
80
- * Initiate BuddyPress Integration (Profile Activity and Profile Forums)
81
- */
82
  function wpforo_bp_profile() {
83
  if ( ! function_exists( 'buddypress' ) ) {
84
  function buddypress() { return isset( $GLOBALS['bp'] ) ? $GLOBALS['bp'] : false; }
@@ -94,5 +95,12 @@ function wpforo_bp_profile() {
94
  }
95
  add_action( 'bp_include', 'wpforo_bp_profile', 10 );
96
 
97
- //Include functions for General Data Protection Regulation (GDPR)
98
- include( WPFORO_DIR . '/wpf-includes/integration/legal.php' );
 
 
 
 
 
 
 
18
  $profile_url = false;
19
  if($userid){
20
  // Ultimate Member | Profile Page URL
21
+ if(function_exists('UM')){
22
  um_fetch_user($userid); $profile_url = um_user_profile_url(); um_reset_user();
23
  }
24
  // BuddyPress | Profile Page URL
66
  if (defined('AIOSEOP_VERSION')) { // All-In-One SEO
67
  global $aiosp;
68
  remove_action('wp_head',array($aiosp,'wp_head'));
69
+ add_filter( 'aioseop_title', '__return_false' );
70
+ add_filter( 'aioseop_canonical_url', '__return_false' );
71
  }
72
  remove_action('wp_head','rel_canonical');
73
  remove_action('wp_head','index_rel_link');
77
  }
78
  add_action( 'parse_query', 'wpforo_seo_clear' );
79
 
80
+ ////////////////////////////////////////////////////////////////////////////////////////
81
+ // BuddyPress Integration //////////////////////////////////////////////////////////////
82
+ ////////////////////////////////////////////////////////////////////////////////////////
 
83
  function wpforo_bp_profile() {
84
  if ( ! function_exists( 'buddypress' ) ) {
85
  function buddypress() { return isset( $GLOBALS['bp'] ) ? $GLOBALS['bp'] : false; }
95
  }
96
  add_action( 'bp_include', 'wpforo_bp_profile', 10 );
97
 
98
+ ////////////////////////////////////////////////////////////////////////////////////////
99
+ // General Data Protection Regulation (GDPR) ///////////////////////////////////////////
100
+ ////////////////////////////////////////////////////////////////////////////////////////
101
+ include( WPFORO_DIR . '/wpf-includes/integration/legal.php' );
102
+
103
+ ////////////////////////////////////////////////////////////////////////////////////////
104
+ // Ultimate Member Integration /////////////////////////////////////////////////////////
105
+ ////////////////////////////////////////////////////////////////////////////////////////
106
+ include( WPFORO_DIR . '/wpf-includes/integration/ultimate-member.php' );
wpf-includes/functions-template.php CHANGED
@@ -13,7 +13,7 @@ function wpforo_login_url(){
13
  $wp_login_url = trim(get_bloginfo('url') , '/') . '/' . ltrim(WPF()->member->options['login_url'] , '/');
14
  }else{
15
  $request_uri = preg_replace( '#/?\?.*$#isu', '', wpforo_get_request_uri() );
16
- $wp_login_url = (!is_wpforo_page() ? wpforo_home_url('?wpforo=signin') : wpforo_home_url( $request_uri . '?wpforo=signin' ) );
17
  }
18
 
19
  return esc_url($wp_login_url);
@@ -654,11 +654,16 @@ add_action( 'widgets_init', 'wpforo_widget_forums' );
654
  function wpforo_post_edited($post, $echo = true){
655
  $edit_html = '';
656
  if(!empty($post)){
657
- $created = wpforo_date($post['created'], 'd/m/Y g:i a', false);
658
- $modified = wpforo_date($post['modified'], 'd/m/Y g:i a', false);
659
- if( isset($modified) && $created != $modified ){
660
- $edit_html = '<div class="wpf-post-edited">' . wpforo_phrase('Edited: ', false) . wpforo_date($post['modified'], 'ago', false) . '</div>';
661
- }
 
 
 
 
 
662
  }
663
  if( $echo ) {
664
  echo $edit_html;
@@ -1078,7 +1083,7 @@ function wpforo_resetpassword(){ ?>
1078
  function wpforo_fields( $fields, $echo = true ){
1079
  if( empty($fields) ) return '';
1080
  $fields = apply_filters( 'wpforo_form_fields', $fields );
1081
- $html = WPF()->tpl->form_fields( $fields );
1082
  if( $echo ){
1083
  echo $html;
1084
  }
@@ -1099,9 +1104,9 @@ function wpforo_fields( $fields, $echo = true ){
1099
  */
1100
 
1101
  function wpforo_register_page_field_values( $fields ){
1102
- WPF()->form['value']['user_login'] = (isset($_POST['wpfreg']['user_login'])) ? sanitize_user($_POST['wpfreg']['user_login']) : '';
1103
- WPF()->form['value']['user_email'] = (isset($_POST['wpfreg']['user_email'])) ? sanitize_email($_POST['wpfreg']['user_email']) : '';
1104
- WPF()->form['varname'] = 'wpfreg';
1105
  }
1106
  add_action( 'wpforo_register_page_start', 'wpforo_register_page_field_values', 10, 1 );
1107
 
@@ -1121,8 +1126,8 @@ function wpforo_account_page_field_values( $fields ){
1121
  if( isset(WPF()->current_object['user']) && !empty(WPF()->current_object['user']) ){
1122
  $user = WPF()->current_object['user'];
1123
  $user = apply_filters('wpforo_profile_header_obj', $user);
1124
- WPF()->form['value'] = $user;
1125
- WPF()->form['varname'] = 'member';
1126
  }
1127
  }
1128
  add_action( 'wpforo_account_page_start', 'wpforo_account_page_field_values', 10, 1 );
@@ -1142,15 +1147,15 @@ add_action( 'wpforo_account_page_start', 'wpforo_account_page_field_values', 10,
1142
  function wpforo_profile_page_field_values( $fields ){
1143
  if( isset(WPF()->current_object['user']) && !empty(WPF()->current_object['user']) ){
1144
  $user = WPF()->current_object['user'];
1145
- WPF()->form['value'] = $user;
1146
  }
1147
  }
1148
  add_action( 'wpforo_profile_page_start', 'wpforo_profile_page_field_values', 10, 1 );
1149
 
1150
 
1151
  function wpforo_search_page_field_values( $fields ){
1152
- WPF()->form['value'] = ( !empty($_GET) ? (array) $_GET : array() );
1153
- WPF()->form['varname'] = '';
1154
  }
1155
  add_action( 'wpforo_search_page_start', 'wpforo_search_page_field_values', 10, 1 );
1156
 
@@ -1229,7 +1234,6 @@ function wpforo_register_fields(){
1229
  function wpforo_account_fields(){
1230
  $fields = WPF()->member->get_account_fields();
1231
  do_action( 'wpforo_account_page_start', $fields );
1232
-
1233
  return $fields;
1234
  }
1235
 
@@ -1428,7 +1432,7 @@ function wpforo_subscription_tools(){
1428
  * @param array $args {
1429
  * An array of arguments.
1430
  * @type string $action Optional. The activity action/description, typically something like "Joe posted an update".
1431
- * @type string $title Optional. The title of the activity item.
1432
  * @type string $content Optional. The content of the activity item.
1433
  * @type string $component The unique name of the component associated with the activity item - 'activity', etc.
1434
  * @type string $type The specific activity type, used for directory filtering. 'wpforo_topic', 'wpforo_post', etc.
@@ -1483,7 +1487,7 @@ function wpforo_activity_content( $item = array() ){
1483
  $member = wpforo_member( $args['user_id'] );
1484
  if( isset($item['topicurl']) ){
1485
  $args['type'] = 'wpforo_topic';
1486
- $args['content'] = $item['body'];
1487
  $args['primary_link'] = $item['topicurl'];
1488
  if( isset($item['title']) ) $args['title'] = $item['title'];
1489
  if( $args['title'] ) $args['title'] = ' "' . esc_html($args['title']) . '"';
@@ -1491,7 +1495,7 @@ function wpforo_activity_content( $item = array() ){
1491
  }
1492
  elseif( isset($item['posturl']) ){
1493
  $args['type'] = 'wpforo_post';
1494
- $args['content'] = $item['body'];
1495
  $args['primary_link'] = $item['posturl'];
1496
  if( isset($item['title']) ) $args['title'] = preg_replace('|^.+?\:\s*|is', '', $item['title']);
1497
  if( $args['title'] ) $args['title'] = ' "' . esc_html($args['title']) . '"';
@@ -1668,4 +1672,31 @@ function wpforo_share_buttons( $location = 'bottom', $url = '', $custom = false
1668
  function wpforo_page(){
1669
  $page_template = ( wpfval($_GET, 'view') ) ? sanitize_title($_GET['view']) : false;
1670
  do_action('wpforo_page', $page_template );
1671
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
  $wp_login_url = trim(get_bloginfo('url') , '/') . '/' . ltrim(WPF()->member->options['login_url'] , '/');
14
  }else{
15
  $request_uri = preg_replace( '#/?\?.*$#isu', '', wpforo_get_request_uri() );
16
+ $wp_login_url = (!(is_wpforo_page() && !is_wpforo_shortcode_page()) ? wpforo_home_url('?wpforo=signin') : wpforo_home_url( $request_uri . '?wpforo=signin' ) );
17
  }
18
 
19
  return esc_url($wp_login_url);
654
  function wpforo_post_edited($post, $echo = true){
655
  $edit_html = '';
656
  if(!empty($post)){
657
+ $created = wpforo_date($post['created'], 'd/m/Y g:i a', false);
658
+ $modified = wpforo_date($post['modified'], 'd/m/Y g:i a', false);
659
+ if( isset($modified) && $created != $modified ){
660
+ if($post['is_first_post']){
661
+ $edit_html = WPF()->activity->build('topic', $post['topicid'], 'edit_topic');
662
+ }else{
663
+ $edit_html = WPF()->activity->build('post', $post['postid'], 'edit_post');
664
+ }
665
+ $edit_html = ( $edit_html ) ? sprintf( '<div class="wpf-post-edit-wrap">%s</div>', $edit_html ) : '';
666
+ }
667
  }
668
  if( $echo ) {
669
  echo $edit_html;
1083
  function wpforo_fields( $fields, $echo = true ){
1084
  if( empty($fields) ) return '';
1085
  $fields = apply_filters( 'wpforo_form_fields', $fields );
1086
+ $html = WPF()->form->build( $fields );
1087
  if( $echo ){
1088
  echo $html;
1089
  }
1104
  */
1105
 
1106
  function wpforo_register_page_field_values( $fields ){
1107
+ WPF()->data['value']['user_login'] = (isset($_POST['wpfreg']['user_login'])) ? sanitize_user($_POST['wpfreg']['user_login']) : '';
1108
+ WPF()->data['value']['user_email'] = (isset($_POST['wpfreg']['user_email'])) ? sanitize_email($_POST['wpfreg']['user_email']) : '';
1109
+ WPF()->data['varname'] = 'wpfreg';
1110
  }
1111
  add_action( 'wpforo_register_page_start', 'wpforo_register_page_field_values', 10, 1 );
1112
 
1126
  if( isset(WPF()->current_object['user']) && !empty(WPF()->current_object['user']) ){
1127
  $user = WPF()->current_object['user'];
1128
  $user = apply_filters('wpforo_profile_header_obj', $user);
1129
+ WPF()->data['value'] = $user;
1130
+ WPF()->data['varname'] = 'member';
1131
  }
1132
  }
1133
  add_action( 'wpforo_account_page_start', 'wpforo_account_page_field_values', 10, 1 );
1147
  function wpforo_profile_page_field_values( $fields ){
1148
  if( isset(WPF()->current_object['user']) && !empty(WPF()->current_object['user']) ){
1149
  $user = WPF()->current_object['user'];
1150
+ WPF()->data['value'] = $user;
1151
  }
1152
  }
1153
  add_action( 'wpforo_profile_page_start', 'wpforo_profile_page_field_values', 10, 1 );
1154
 
1155
 
1156
  function wpforo_search_page_field_values( $fields ){
1157
+ WPF()->data['value'] = ( !empty($_GET) ? (array) $_GET : array() );
1158
+ WPF()->data['varname'] = '';
1159
  }
1160
  add_action( 'wpforo_search_page_start', 'wpforo_search_page_field_values', 10, 1 );
1161
 
1234
  function wpforo_account_fields(){
1235
  $fields = WPF()->member->get_account_fields();
1236
  do_action( 'wpforo_account_page_start', $fields );
 
1237
  return $fields;
1238
  }
1239
 
1432
  * @param array $args {
1433
  * An array of arguments.
1434
  * @type string $action Optional. The activity action/description, typically something like "Joe posted an update".
1435
+ * @type string $title Optional. The title of the activity item.
1436
  * @type string $content Optional. The content of the activity item.
1437
  * @type string $component The unique name of the component associated with the activity item - 'activity', etc.
1438
  * @type string $type The specific activity type, used for directory filtering. 'wpforo_topic', 'wpforo_post', etc.
1487
  $member = wpforo_member( $args['user_id'] );
1488
  if( isset($item['topicurl']) ){
1489
  $args['type'] = 'wpforo_topic';
1490
+ $args['content'] = ( wpfval($item, 'body') ) ? $item['body'] : '';
1491
  $args['primary_link'] = $item['topicurl'];
1492
  if( isset($item['title']) ) $args['title'] = $item['title'];
1493
  if( $args['title'] ) $args['title'] = ' "' . esc_html($args['title']) . '"';
1495
  }
1496
  elseif( isset($item['posturl']) ){
1497
  $args['type'] = 'wpforo_post';
1498
+ $args['content'] = ( wpfval($item, 'body') ) ? $item['body'] : '';
1499
  $args['primary_link'] = $item['posturl'];
1500
  if( isset($item['title']) ) $args['title'] = preg_replace('|^.+?\:\s*|is', '', $item['title']);
1501
  if( $args['title'] ) $args['title'] = ' "' . esc_html($args['title']) . '"';
1672
  function wpforo_page(){
1673
  $page_template = ( wpfval($_GET, 'view') ) ? sanitize_title($_GET['view']) : false;
1674
  do_action('wpforo_page', $page_template );
1675
+ }
1676
+
1677
+ function wpforo_admin_note(){
1678
+
1679
+ $display = false;
1680
+ $templates = WPF()->tools_misc['admin_note_pages'];
1681
+ $usergroups = WPF()->tools_misc['admin_note_groups'];
1682
+
1683
+ if( !wpfval(WPF()->tools_misc, 'admin_note_pages') ) return false;
1684
+ if( !wpfval(WPF()->tools_misc, 'admin_note_groups') ) return false;
1685
+
1686
+ if( in_array(WPF()->current_user_groupid, $usergroups) ){
1687
+ if( wpfval(WPF()->current_object, 'template') && in_array(WPF()->current_object['template'], $templates) ){
1688
+ $display = true;
1689
+ } else {
1690
+ $display = false;
1691
+ }
1692
+ }
1693
+ if( $display ){
1694
+ $note = wpforo_kses( wpforo_unslashe( trim( WPF()->tools_misc['admin_note'] ) ) );
1695
+ $note = apply_filters( 'wpforo_admin_note', $note );
1696
+ if( $note ){
1697
+ ?><div class="wpforo-admin-note"><?php echo wpautop( $note ) ?><div class="wpf-clear"></div></div><?php
1698
+ }
1699
+ }
1700
+
1701
+ }
1702
+ add_action('wpforo_header_hook', 'wpforo_admin_note', 1 );
wpf-includes/functions.php CHANGED
@@ -137,13 +137,11 @@ function get_wpforo_shortcode_atts($text = ''){
137
 
138
  function wpforo_get_url_query_vars_str($url = ''){
139
  if(!$url) $url = wpforo_get_request_uri();
140
-
141
  $home_url = preg_replace( '#/?\?.*$#isu', '', home_url('/') );
142
  $current_url = preg_replace('#https?://[^/\?]+/?#isu', '', $url);
143
  $site_url = preg_replace('#https?://[^/\?]+/?#isu', '', $home_url);
144
  $current_url = preg_replace( '#^/?'.preg_quote($site_url).'(?:/?index\.php/?)?#isu', '' , $current_url, 1 );
145
  $current_url = preg_replace('#^[\r\n\t\s\0/]*(.*?)[\r\n\t\s\0/]*$#isu', '$1', $current_url);
146
-
147
  return $current_url;
148
  }
149
 
@@ -168,7 +166,6 @@ function wpforo_dir_size($directory) {
168
 
169
  function wpforo_make_hidden_fields_from_url($url = '', $echo = true){
170
  if( !$url ) $url = wpforo_get_request_uri();
171
-
172
  $return = '';
173
  if( $url_query = parse_url($url, PHP_URL_QUERY) ){
174
  parse_str($url_query, $url_query_arr);
@@ -178,12 +175,10 @@ function wpforo_make_hidden_fields_from_url($url = '', $echo = true){
178
  }
179
  }
180
  }
181
-
182
  if( !$echo ) return $return;
183
  echo $return;
184
  }
185
 
186
- #################################################################################
187
  /**
188
  * Returns merged arguments array from defined and default arguments.
189
  * @param mixed $args
@@ -221,7 +216,6 @@ function wpforo_parse_args( $args, $default = array() ) {
221
  }
222
  }
223
 
224
- // #############################################################################
225
  /**
226
  * Detects serialized data
227
  *
@@ -246,7 +240,6 @@ if(!function_exists('is_serialized')){
246
  }
247
  }
248
 
249
-
250
  function wpforo_get_request_uri($with_port = FALSE, $get_referer_when_ajax = TRUE){
251
  if( $get_referer_when_ajax && wpforo_is_ajax() ){
252
  if( isset($_SERVER['HTTP_REFERER']) ){ return $_SERVER['HTTP_REFERER']; }
@@ -259,7 +252,6 @@ function wpforo_get_request_uri($with_port = FALSE, $get_referer_when_ajax = TRU
259
  return esc_url_raw($url);
260
  }
261
 
262
-
263
  function wpforo_arr_group_by($array, $key_by){
264
  if(!empty($array)){
265
  $fltrd = array();
@@ -272,7 +264,6 @@ function wpforo_arr_group_by($array, $key_by){
272
  }
273
  }
274
 
275
- // #############################################################################
276
  /**
277
  * Print item's (topics, replyes ...) table in dashboard
278
  * @since 1.0.0
@@ -763,7 +754,7 @@ function wpforo_phrase($key, $echo = TRUE, $format = 'first-upper'){
763
  if (strtolower($key) == strtolower($phrase)) {
764
  $phrase = __(ucfirst($key), 'wpforo');
765
  if (strtolower($key) == strtolower($phrase)) {
766
- $phrase = __($native, 'wpforo'); //Try all, if no result pass the original text to treanslation again.
767
  }
768
  }
769
  }
@@ -771,7 +762,7 @@ function wpforo_phrase($key, $echo = TRUE, $format = 'first-upper'){
771
  }
772
 
773
  if( $format == 'first-upper' ){
774
- if( 'en_US' != $locale && function_exists('mb_strlen') && mb_strlen($phrase) != strlen($phrase) ) {
775
  $phrase = mb_strtoupper(mb_substr($phrase, 0, 1)) . mb_substr($phrase, 1);
776
  }
777
  else{
@@ -831,12 +822,18 @@ function wpforo_screen_option(){ ?>
831
  <?php
832
  }
833
 
834
-
835
- function wpforo_text( $text, $length = 0, $echo = true, $strip_tags = true, $strip_urls = true, $strip_shortcodes = true ){
836
  $text = str_replace('</p>', '</p> ', $text);
 
 
 
 
 
 
 
837
  if($strip_urls) $text = preg_replace('#(?:[^\'\"]|^)(https?://[^\s\'\"<>]+)(?:[^\'\"]|$)#isu', '', $text);
838
  if($strip_tags) $text = strip_tags($text);
839
- if($strip_shortcodes){
840
  $text = preg_replace('#\[attach[^\[\]]*\][^\[\]]*\[/attach\]#isu', '', $text);
841
  $text = strip_shortcodes( $text );
842
  }
@@ -928,6 +925,7 @@ function wpforo_nofollow_tag($content){
928
  $content = preg_replace_callback('#<a[^><]*?href=[\'\"]([^\'\"]+)[\'\"][^><]*?>#isu', 'wpforo_nofollow', $content);
929
  return $content;
930
  }
 
931
  function wpforo_nofollow($match){
932
  $link = $match[0];
933
  $dofollow = trim(WPF()->tools_misc['dofollow']);
@@ -1007,7 +1005,6 @@ function wpforo_user_logging(){
1007
  }
1008
  }
1009
 
1010
-
1011
  add_action( 'init', 'wpforo_setcookie', 10, 2);
1012
 
1013
  function wpforo_setcookie( $key = '', $args = array(), $implode = false ) {
@@ -1114,6 +1111,41 @@ function wpfval( $array, $a = NULL, $b = NULL, $c = NULL ){
1114
  return false;
1115
  }
1116
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1117
  function wpforo_human_filesize($bytes, $decimals = 2) {
1118
  $size = array('B','KB','MB','GB','TB','PB','EB','ZB','YB');
1119
  $factor = floor((strlen($bytes) - 1) / 3);
@@ -1220,7 +1252,6 @@ function wpforo_write_file( $new_file, $content ){
1220
  return $return;
1221
  }
1222
 
1223
-
1224
  function wpforo_get_file_content( $file ){
1225
  $fp = @fopen( $file, 'r' );
1226
  if( !$fp ){
@@ -1290,51 +1321,47 @@ function wpforo_remove_directory( $directory ) {
1290
  * @return string
1291
  */
1292
  function wpforo_print_size($value, $points = true ){
1293
-
1294
- if($value <= 1024)
1295
- {
1296
  return $value . (($points) ? " B" : '' );
1297
- }
1298
- if($value > 1024 && $value <= (1024*1024))
1299
- {
1300
- $value=round(($value/1024)*10)/10;
1301
  return $value . (($points) ? " KB" : '' );
1302
- }
1303
- if($value > 1024*1024 && $value <= 1024*1024*1024)
1304
- {
1305
- $value=round(($value/(1024*1024))*10)/10;
1306
  return $value . (($points) ? " MB" : '' );
1307
- }
1308
- if($value > 1024*1024*1024 && $value <= 1024*1024*1024*1024)
1309
- {
1310
- $value=round(($value/(1024*1024*1024))*10)/10;
1311
  return $value . (($points) ? " GB" : '' );
1312
- }
1313
- }
1314
-
1315
- function wpforo_human_size_to_bytes($sSize)
1316
- {
1317
- if ( is_numeric( $sSize) ) {
1318
- return $sSize;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1319
  }
1320
- $sSuffix = substr($sSize, -1);
1321
- $iValue = substr($sSize, 0, -1);
1322
- switch(strtoupper($sSuffix)){
1323
- case 'P':
1324
- $iValue *= 1024;
1325
- case 'T':
1326
- $iValue *= 1024;
1327
- case 'G':
1328
- $iValue *= 1024;
1329
- case 'M':
1330
- $iValue *= 1024;
1331
- case 'K':
1332
- $iValue *= 1024;
1333
- break;
1334
- }
1335
- return $iValue;
1336
- }
1337
-
1338
 
1339
  function wpforo_print_number($n, $echo = false) {
1340
  $x = str_replace(",","",$n);
@@ -1437,6 +1464,8 @@ function wpforo_kses( $string = '', $key = 'post' ){
1437
  $allowed_html['a']['download'] = array();
1438
  $allowed_html['blockquote']['class'] = TRUE;
1439
  $allowed_html['blockquote']['data-width'] = TRUE;
 
 
1440
  $allowed_html['p']['lang'] = TRUE;
1441
  $allowed_html['p']['dir'] = TRUE;
1442
  if(!wpfval($allowed_html, 'iframe') && class_exists('wpForoEmbeds')){
@@ -1480,7 +1509,6 @@ function wpforo_deep_merge($default, $current = array()){
1480
  return $default;
1481
  }
1482
 
1483
-
1484
  function wpforo_is_image($e){
1485
  $is_image = false;
1486
  $e = strtolower($e);
@@ -1490,7 +1518,6 @@ function wpforo_is_image($e){
1490
  return $is_image;
1491
  }
1492
 
1493
-
1494
  function get_wpf_option( $option, $default = false ){
1495
  $value = get_option($option, $default);
1496
  if( $value ){
@@ -1874,7 +1901,6 @@ function wpforo_get_fb_user( $user ) {
1874
  return $user_data;
1875
  }
1876
 
1877
-
1878
  function wpforo_unique_username( $username ) {
1879
  static $i;
1880
  if( !$username ) $username = 'user_' . uniqid();
@@ -1896,7 +1922,6 @@ function wpforo_unique_username( $username ) {
1896
  }
1897
  }
1898
 
1899
-
1900
  function wpforo_find_current_user_data( $current_object ){
1901
  if( is_user_logged_in() && !(isset($current_object['user_nicename']) && $current_object['user_nicename']) && !(isset($current_object['userid']) && $current_object['userid']) ){
1902
  $user = wp_get_current_user();
@@ -1954,11 +1979,16 @@ function wpforo_extra_html_parser( $extra_html = '', $allowed_html = array() ){
1954
  return $allowed_html;
1955
  }
1956
 
1957
- function wpforo_clear_array($array, $clear = array()){
1958
  if( is_array($clear) && !empty($clear) ){
1959
  foreach( $clear as $ext ){
1960
- if (($key = array_search($ext, $array)) !== false) {
1961
- unset($array[$key]);
 
 
 
 
 
1962
  }
1963
  }
1964
  }
@@ -1966,4 +1996,52 @@ function wpforo_clear_array($array, $clear = array()){
1966
  if( wpfval($array, $clear) ) unset( $array[$clear] );
1967
  }
1968
  return $array;
1969
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
137
 
138
  function wpforo_get_url_query_vars_str($url = ''){
139
  if(!$url) $url = wpforo_get_request_uri();
 
140
  $home_url = preg_replace( '#/?\?.*$#isu', '', home_url('/') );
141
  $current_url = preg_replace('#https?://[^/\?]+/?#isu', '', $url);
142
  $site_url = preg_replace('#https?://[^/\?]+/?#isu', '', $home_url);
143
  $current_url = preg_replace( '#^/?'.preg_quote($site_url).'(?:/?index\.php/?)?#isu', '' , $current_url, 1 );
144
  $current_url = preg_replace('#^[\r\n\t\s\0/]*(.*?)[\r\n\t\s\0/]*$#isu', '$1', $current_url);
 
145
  return $current_url;
146
  }
147
 
166
 
167
  function wpforo_make_hidden_fields_from_url($url = '', $echo = true){
168
  if( !$url ) $url = wpforo_get_request_uri();
 
169
  $return = '';
170
  if( $url_query = parse_url($url, PHP_URL_QUERY) ){
171
  parse_str($url_query, $url_query_arr);
175
  }
176
  }
177
  }
 
178
  if( !$echo ) return $return;
179
  echo $return;
180
  }
181
 
 
182
  /**
183
  * Returns merged arguments array from defined and default arguments.
184
  * @param mixed $args
216
  }
217
  }
218
 
 
219
  /**
220
  * Detects serialized data
221
  *
240
  }
241
  }
242
 
 
243
  function wpforo_get_request_uri($with_port = FALSE, $get_referer_when_ajax = TRUE){
244
  if( $get_referer_when_ajax && wpforo_is_ajax() ){
245
  if( isset($_SERVER['HTTP_REFERER']) ){ return $_SERVER['HTTP_REFERER']; }
252
  return esc_url_raw($url);
253
  }
254
 
 
255
  function wpforo_arr_group_by($array, $key_by){
256
  if(!empty($array)){
257
  $fltrd = array();
264
  }
265
  }
266
 
 
267
  /**
268
  * Print item's (topics, replyes ...) table in dashboard
269
  * @since 1.0.0
754
  if (strtolower($key) == strtolower($phrase)) {
755
  $phrase = __(ucfirst($key), 'wpforo');
756
  if (strtolower($key) == strtolower($phrase)) {
757
+ $phrase = __($native, 'wpforo'); //Try all, if no result pass the original text to translation again.
758
  }
759
  }
760
  }
762
  }
763
 
764
  if( $format == 'first-upper' ){
765
+ if( 'en_US' != $locale && function_exists('mb_strlen') && mb_strlen($phrase) != strlen($phrase) && function_exists('mb_strtoupper') ) {
766
  $phrase = mb_strtoupper(mb_substr($phrase, 0, 1)) . mb_substr($phrase, 1);
767
  }
768
  else{
822
  <?php
823
  }
824
 
825
+ function wpforo_text( $text, $length = 0, $echo = true, $strip_tags = true, $strip_urls = true, $strip_shortcodes = true, $strip_quotes = true ){
 
826
  $text = str_replace('</p>', '</p> ', $text);
827
+ $text = str_replace('</div>', '</div> ', $text);
828
+ if($strip_quotes){
829
+ $text_tmp = preg_replace('#(<div class="wpforo-post-quote-author")(.+)(<\/div>)#isu', '', $text);
830
+ $text = ( $text_tmp ) ? $text_tmp : preg_replace('#(<div class="wpforo-post-quote-author")(.+?)(<\/div>)#isu', '', $text);
831
+ $text_tmp = preg_replace('#(<blockquote)(.+)(<\/blockquote>)#isu', '', $text);
832
+ $text = ( $text_tmp ) ? $text_tmp : preg_replace('#(<blockquote)(.+?)(<\/blockquote>)#isu', '', $text);
833
+ }
834
  if($strip_urls) $text = preg_replace('#(?:[^\'\"]|^)(https?://[^\s\'\"<>]+)(?:[^\'\"]|$)#isu', '', $text);
835
  if($strip_tags) $text = strip_tags($text);
836
+ if($strip_shortcodes){
837
  $text = preg_replace('#\[attach[^\[\]]*\][^\[\]]*\[/attach\]#isu', '', $text);
838
  $text = strip_shortcodes( $text );
839
  }
925
  $content = preg_replace_callback('#<a[^><]*?href=[\'\"]([^\'\"]+)[\'\"][^><]*?>#isu', 'wpforo_nofollow', $content);
926
  return $content;
927
  }
928
+
929
  function wpforo_nofollow($match){
930
  $link = $match[0];
931
  $dofollow = trim(WPF()->tools_misc['dofollow']);
1005
  }
1006
  }
1007
 
 
1008
  add_action( 'init', 'wpforo_setcookie', 10, 2);
1009
 
1010
  function wpforo_setcookie( $key = '', $args = array(), $implode = false ) {
1111
  return false;
1112
  }
1113
 
1114
+ /**
1115
+ * Validates keys of requested array.
1116
+ *
1117
+ * @param array $array
1118
+ * @param null|string $a First key of $array
1119
+ * @param null|string $b Second key of $array
1120
+ * @param null|string $c Third key of $array
1121
+ *
1122
+ * @return bool|mixed
1123
+ */
1124
+ function wpfkey( $array, $a = NULL, $b = NULL, $c = NULL ){
1125
+ if($a || $a === 0){
1126
+ if( is_array($array) && array_key_exists($a, $array) ){
1127
+ if($b || $b === 0){
1128
+ if( is_array($array[$a]) && array_key_exists($b, $array[$a]) ){
1129
+ if($c || $c === 0){
1130
+ if( is_array($array[$a][$b]) && array_key_exists($c, $array[$a][$b]) ){
1131
+ return true;
1132
+ } else{
1133
+ return false;
1134
+ }
1135
+ } else{
1136
+ return true;
1137
+ }
1138
+ } else{
1139
+ return false;
1140
+ }
1141
+ } else{
1142
+ return true;
1143
+ }
1144
+ }
1145
+ }
1146
+ return false;
1147
+ }
1148
+
1149
  function wpforo_human_filesize($bytes, $decimals = 2) {
1150
  $size = array('B','KB','MB','GB','TB','PB','EB','ZB','YB');
1151
  $factor = floor((strlen($bytes) - 1) / 3);
1252
  return $return;
1253
  }
1254
 
 
1255
  function wpforo_get_file_content( $file ){
1256
  $fp = @fopen( $file, 'r' );
1257
  if( !$fp ){
1321
  * @return string
1322
  */
1323
  function wpforo_print_size($value, $points = true ){
1324
+ if($value < 1024){
 
 
1325
  return $value . (($points) ? " B" : '' );
1326
+ }elseif($value >= 1024 && $value < (1024*1024)){
1327
+ $value = round(($value/1024)*10)/10;
 
 
1328
  return $value . (($points) ? " KB" : '' );
1329
+ }elseif($value >= 1024*1024 && $value < 1024*1024*1024){
1330
+ $value = round(($value/(1024*1024))*10)/10;
 
 
1331
  return $value . (($points) ? " MB" : '' );
1332
+ }elseif($value >= 1024*1024*1024 && $value <= 1024*1024*1024*1024){
1333
+ $value = round(($value/(1024*1024*1024))*10)/10;
 
 
1334
  return $value . (($points) ? " GB" : '' );
1335
+ }else{
1336
+ $value = round(($value/(1024*1024*1024*1024))*10)/10;
1337
+ return $value . (($points) ? " TB" : '' );
1338
+ }
1339
+ }
1340
+
1341
+ function wpforo_human_size_to_bytes($sSize){
1342
+ if (is_numeric($sSize)) return $sSize;
1343
+
1344
+ $sSuffix = substr($sSize, -1);
1345
+ $iValue = substr($sSize, 0, -1);
1346
+ switch (strtoupper($sSuffix)) {
1347
+ case 'M':
1348
+ $iValue *= 1024*1024;
1349
+ break;
1350
+ case 'K':
1351
+ $iValue *= 1024;
1352
+ break;
1353
+ case 'G':
1354
+ $iValue *= 1024*1024*1024;
1355
+ break;
1356
+ case 'T':
1357
+ $iValue *= 1024*1024*1024*1024;
1358
+ break;
1359
+ case 'P':
1360
+ $iValue *= 1024*1024*1024*1024*1024;
1361
+ break;
1362
  }
1363
+ return $iValue;
1364
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1365
 
1366
  function wpforo_print_number($n, $echo = false) {
1367
  $x = str_replace(",","",$n);
1464
  $allowed_html['a']['download'] = array();
1465
  $allowed_html['blockquote']['class'] = TRUE;
1466
  $allowed_html['blockquote']['data-width'] = TRUE;
1467
+ $allowed_html['blockquote']['data-userid'] = TRUE;
1468
+ $allowed_html['blockquote']['data-postid'] = TRUE;
1469
  $allowed_html['p']['lang'] = TRUE;
1470
  $allowed_html['p']['dir'] = TRUE;
1471
  if(!wpfval($allowed_html, 'iframe') && class_exists('wpForoEmbeds')){
1509
  return $default;
1510
  }
1511
 
 
1512
  function wpforo_is_image($e){
1513
  $is_image = false;
1514
  $e = strtolower($e);
1518
  return $is_image;
1519
  }
1520
 
 
1521
  function get_wpf_option( $option, $default = false ){
1522
  $value = get_option($option, $default);
1523
  if( $value ){
1901
  return $user_data;
1902
  }
1903
 
 
1904
  function wpforo_unique_username( $username ) {
1905
  static $i;
1906
  if( !$username ) $username = 'user_' . uniqid();
1922
  }
1923
  }
1924
 
 
1925
  function wpforo_find_current_user_data( $current_object ){
1926
  if( is_user_logged_in() && !(isset($current_object['user_nicename']) && $current_object['user_nicename']) && !(isset($current_object['userid']) && $current_object['userid']) ){
1927
  $user = wp_get_current_user();
1979
  return $allowed_html;
1980
  }
1981
 
1982
+ function wpforo_clear_array($array, $clear = array(), $by = 'value' ){
1983
  if( is_array($clear) && !empty($clear) ){
1984
  foreach( $clear as $ext ){
1985
+ if( $by == 'value' ){
1986
+ if (($key = array_search($ext, $array)) !== false) {
1987
+ unset($array[$key]);
1988
+ }
1989
+ }
1990
+ elseif( $by == 'key' ){
1991
+ if( wpfkey($array, $ext) ) unset($array[$ext]);
1992
  }
1993
  }
1994
  }
1996
  if( wpfval($array, $clear) ) unset( $array[$clear] );
1997
  }
1998
  return $array;
1999
+ }
2000
+
2001
+ function wpforo_key($array = array(), $value = '', $type = 'default'){
2002
+ $keys = array();
2003
+ if( is_array($array) && !empty($array) ){
2004
+ foreach($array as $k => $v){
2005
+ if($v == $value){
2006
+ $keys[] = $k;
2007
+ }
2008
+ }
2009
+ }
2010
+ if( $type == 'sort' ){
2011
+ sort($keys);
2012
+ return $keys;
2013
+ }
2014
+ else{
2015
+ return $keys;
2016
+ }
2017
+ }
2018
+
2019
+ function wpforo_unslashe( $data){
2020
+ $data = is_array($data) ? array_map( 'wpforo_unslashe', $data) : stripslashes($data);
2021
+ return $data;
2022
+ }
2023
+
2024
+ function wpforo_encode($data) {
2025
+ $data = is_array($data) ? array_map('wpforo_encode', $data) : htmlspecialchars($data, ENT_QUOTES);
2026
+ return $data;
2027
+ }
2028
+
2029
+ function wpforo_decode($data) {
2030
+ $data = is_array($data) ? array_map('wpforo_decode', $data) : htmlspecialchars_decode($data, ENT_QUOTES);
2031
+ return $data;
2032
+ }
2033
+
2034
+ function wpforo_trim($data){
2035
+ $data = is_array($data) ? array_map('wpforo_trim', $data) : trim($data);
2036
+ return $data;
2037
+ }
2038
+
2039
+ function wpforo_sanitize_int($data) {
2040
+ $data = is_array($data) ? array_map( 'wpforo_sanitize_int', $data) : intval($data);
2041
+ return $data;
2042
+ }
2043
+
2044
+ function wpforo_sanitize_text($data) {
2045
+ $data = is_array($data) ? array_map( 'wpforo_sanitize_text', $data) : sanitize_text_field($data);
2046
+ return $data;
2047
+ }
wpf-includes/install-sql.php CHANGED
@@ -119,14 +119,14 @@
119
  `answers` INT NOT NULL DEFAULT 0,
120
  `comments` INT NOT NULL DEFAULT 0,
121
  `site` VARCHAR(255),
122
- `icq` VARCHAR(255),
123
- `aim` VARCHAR(255),
124
- `yahoo` VARCHAR(255),
125
- `msn` VARCHAR(255),
126
  `facebook` VARCHAR(255),
127
  `twitter` VARCHAR(255),
128
- `gtalk` VARCHAR(255),
129
- `skype` VARCHAR(255),
130
  `avatar` VARCHAR(255),
131
  `signature` TEXT,
132
  `about` TEXT,
@@ -139,6 +139,8 @@
139
  `status` VARCHAR(8) DEFAULT 'active' COMMENT 'active, blocked, trashed, spamer',
140
  `timezone` VARCHAR(255),
141
  `is_email_confirmed` TINYINT(1) NOT NULL DEFAULT 0,
 
 
142
  PRIMARY KEY (`userid`),
143
  UNIQUE KEY `UNIQUE ID` (`userid`),
144
  KEY `groupid` (`groupid`),
@@ -157,8 +159,10 @@
157
  `access` VARCHAR(50) NOT NULL DEFAULT '',
158
  `color` varchar(7) NOT NULL DEFAULT '',
159
  `visible` tinyint(1) UNSIGNED NOT NULL DEFAULT 1,
 
160
  PRIMARY KEY (`groupid`),
161
  KEY `visible` (`visible`),
 
162
  UNIQUE KEY `UNIQUE_GROUP_NAME` (`name`(191))
163
  ) ENGINE=MyISAM $charset_collate;",
164
  "CREATE TABLE IF NOT EXISTS `".WPF()->tables->languages."`(
@@ -240,5 +244,23 @@
240
  KEY `topicid` (`topicid`),
241
  KEY `time` (`time`),
242
  KEY `ip` (`ip`)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
243
  ) ENGINE=INNODB $charset_collate;"
244
  );
119
  `answers` INT NOT NULL DEFAULT 0,
120
  `comments` INT NOT NULL DEFAULT 0,
121
  `site` VARCHAR(255),
122
+ `icq` VARCHAR(50),
123
+ `aim` VARCHAR(50),
124
+ `yahoo` VARCHAR(50),
125
+ `msn` VARCHAR(50),
126
  `facebook` VARCHAR(255),
127
  `twitter` VARCHAR(255),
128
+ `gtalk` VARCHAR(50),
129
+ `skype` VARCHAR(50),
130
  `avatar` VARCHAR(255),
131
  `signature` TEXT,
132
  `about` TEXT,
139
  `status` VARCHAR(8) DEFAULT 'active' COMMENT 'active, blocked, trashed, spamer',
140
  `timezone` VARCHAR(255),
141
  `is_email_confirmed` TINYINT(1) NOT NULL DEFAULT 0,
142
+ `secondary_groups` VARCHAR(255),
143
+ `fields` LONGTEXT,
144
  PRIMARY KEY (`userid`),
145
  UNIQUE KEY `UNIQUE ID` (`userid`),
146
  KEY `groupid` (`groupid`),
159
  `access` VARCHAR(50) NOT NULL DEFAULT '',
160
  `color` varchar(7) NOT NULL DEFAULT '',
161
  `visible` tinyint(1) UNSIGNED NOT NULL DEFAULT 1,
162
+ `secondary` tinyint(1) UNSIGNED NOT NULL DEFAULT 1,
163
  PRIMARY KEY (`groupid`),
164
  KEY `visible` (`visible`),
165
+ KEY `secondary` (`secondary`),
166
  UNIQUE KEY `UNIQUE_GROUP_NAME` (`name`(191))
167
  ) ENGINE=MyISAM $charset_collate;",
168
  "CREATE TABLE IF NOT EXISTS `".WPF()->tables->languages."`(
244
  KEY `topicid` (`topicid`),
245
  KEY `time` (`time`),
246
  KEY `ip` (`ip`)
247
+ ) ENGINE=INNODB $charset_collate;",
248
+ "CREATE TABLE IF NOT EXISTS `".WPF()->tables->activity."` (
249
+ `id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
250
+ `type` VARCHAR(60) NOT NULL,
251
+ `itemid` BIGINT UNSIGNED NOT NULL,
252
+ `itemtype` VARCHAR(60) NOT NULL,
253
+ `itemid_second` BIGINT UNSIGNED NOT NULL DEFAULT 0,
254
+ `userid` BIGINT UNSIGNED NOT NULL DEFAULT 0,
255
+ `name` VARCHAR(60) NOT NULL DEFAULT '',
256
+ `email` VARCHAR(70) NOT NULL DEFAULT '',
257
+ `date` INT UNSIGNED NOT NULL DEFAULT 0,
258
+ `content` TEXT,
259
+ `permalink` VARCHAR(255) NOT NULL DEFAULT '',
260
+ PRIMARY KEY (`id`),
261
+ KEY `type` (`type`),
262
+ KEY `type_objid_objtype` (`type`,`itemid`,`itemtype`),
263
+ KEY `type_objid_objtype_userid` (`type`,`itemid`,`itemtype`,`userid`),
264
+ KEY `date` (`date`)
265
  ) ENGINE=INNODB $charset_collate;"
266
  );
wpf-includes/integration/buddypress.php CHANGED
@@ -122,9 +122,6 @@ if ( !class_exists( 'WPF_Forums_Component' ) ){
122
  parent::setup_nav( $main_nav, $sub_nav );
123
  }
124
 
125
- /**
126
- * Sets up the title for pages and <title>
127
- */
128
  public function setup_title() {
129
  $bp = buddypress();
130
  if ( bp_is_forums_component() ) {
@@ -580,7 +577,9 @@ function wpforo_bp_add_notification( $post = array(), $topic = array() ) {
580
  }
581
 
582
  // Notify the topic author if not the current reply author
 
583
  if ( $author_id !== $topic_author_id ) {
 
584
  $args = array(
585
  'user_id' => $topic_author_id,
586
  'item_id' => $post['postid'],
@@ -593,7 +592,7 @@ function wpforo_bp_add_notification( $post = array(), $topic = array() ) {
593
  }
594
 
595
  // Notify the immediate reply author if not the current reply author
596
- if ( wpfval($post, 'parentid') && ($topic_author_id !== $reply_to_item_author_id) && ( $author_id !== $reply_to_item_author_id ) ) {
597
  $args = array(
598
  'user_id' => $reply_to_item_author_id,
599
  'item_id' => $post['postid'],
@@ -716,6 +715,7 @@ function wpforo_bp_profile_url( $url = '', $member = array(), $template = 'profi
716
  if(wpfval($member, 'ID')){
717
 
718
  $user_domain = trim( bp_core_get_user_domain( $member['ID'] ), '/');
 
719
 
720
  if( $user_domain ){
721
  if( $template == 'account' ){
122
  parent::setup_nav( $main_nav, $sub_nav );
123
  }
124
 
 
 
 
125
  public function setup_title() {
126
  $bp = buddypress();
127
  if ( bp_is_forums_component() ) {
577
  }
578
 
579
  // Notify the topic author if not the current reply author
580
+ $has_topic_note = false;
581
  if ( $author_id !== $topic_author_id ) {
582
+ $has_topic_note = true;
583
  $args = array(
584
  'user_id' => $topic_author_id,
585
  'item_id' => $post['postid'],
592
  }
593
 
594
  // Notify the immediate reply author if not the current reply author
595
+ if ( wpfval($post, 'parentid') && !$has_topic_note && ($topic_author_id !== $reply_to_item_author_id) && ( $author_id !== $reply_to_item_author_id ) ) {
596
  $args = array(
597
  'user_id' => $reply_to_item_author_id,
598
  'item_id' => $post['postid'],
715
  if(wpfval($member, 'ID')){
716
 
717
  $user_domain = trim( bp_core_get_user_domain( $member['ID'] ), '/');
718
+ $user_domain = strtok( $user_domain, '?');
719
 
720
  if( $user_domain ){
721
  if( $template == 'account' ){
wpf-includes/integration/legal.php CHANGED
@@ -26,7 +26,7 @@ function wpforo_legal_checkbox_forum_privacy(){
26
  $str_privacy_text = str_replace($find, $replace, $str_privacy_text);
27
  ?>
28
  <label class="wpforo-legal-checkbox wpflegal-privacy">
29
- <input id="wpflegal_privacy" name="legal[gdpr]" value="1" required type="checkbox"> &nbsp;
30
  <span><?php echo wp_unslash($str_privacy); ?></span>
31
  </label>
32
  <div class="wpforo-legal-privacy wpforo-text" style="display: none;">
@@ -63,7 +63,7 @@ function wpforo_legal_checkbox_forum_rules(){
63
  $str_rules_text = apply_filters('wpforo_legal_forum_rules_text', $set['rules_text']);
64
  ?>
65
  <label class="wpforo-legal-checkbox wpflegal-rules">
66
- <input id="wpflegal_rules" name="legal[rules]" value="1" required type="checkbox"> &nbsp;
67
  <span><?php echo $str_rules; ?></span>
68
  </label>
69
  <div class="wpforo-legal-rules wpforo-text" style="display: none;">
@@ -125,7 +125,7 @@ function wpforo_legal_checkbox_terms_privacy(){
125
  if( ( $str_terms || $str_privacy ) && $terms_privacy ){
126
  ?>
127
  <label class="wpforo-legal-checkbox wpflegal-terms-privacy">
128
- <input name="legal[terms_privacy]" value="1" required type="checkbox"> &nbsp;
129
  <span><?php echo $terms_privacy; ?></span>
130
  </label>
131
  <?php
@@ -134,7 +134,7 @@ function wpforo_legal_checkbox_terms_privacy(){
134
  elseif( wpfval($set, 'checkbox_terms_privacy') ){
135
  ?>
136
  <label class="wpforo-legal-checkbox wpflegal-terms-privacy">
137
- <input name="legal[terms_privacy]" value="1" required type="checkbox"> &nbsp;
138
  <span><?php echo $str_if_no_pages; ?></span>
139
  </label>
140
  <?php
@@ -156,7 +156,7 @@ function wpforo_legal_checkbox_email_password(){
156
  $str_email_password = apply_filters('wpforo_legal_checkbox_confirm_email_password', $str_email_password);
157
  ?>
158
  <label class="wpforo-legal-checkbox wpflegal-email">
159
- <input name="legal[email]" value="1" required type="checkbox"> &nbsp;
160
  <span><?php echo $str_email_password; ?></span>
161
  </label>
162
  <?php
26
  $str_privacy_text = str_replace($find, $replace, $str_privacy_text);
27
  ?>
28
  <label class="wpforo-legal-checkbox wpflegal-privacy">
29
+ <input id="wpflegal_privacy" name="legal[gdpr]" value="1" required="required" type="checkbox"> &nbsp;
30
  <span><?php echo wp_unslash($str_privacy); ?></span>
31
  </label>
32
  <div class="wpforo-legal-privacy wpforo-text" style="display: none;">
63
  $str_rules_text = apply_filters('wpforo_legal_forum_rules_text', $set['rules_text']);
64
  ?>
65
  <label class="wpforo-legal-checkbox wpflegal-rules">
66
+ <input id="wpflegal_rules" name="legal[rules]" value="1" required="required" type="checkbox"> &nbsp;
67
  <span><?php echo $str_rules; ?></span>
68
  </label>
69
  <div class="wpforo-legal-rules wpforo-text" style="display: none;">
125
  if( ( $str_terms || $str_privacy ) && $terms_privacy ){
126
  ?>
127
  <label class="wpforo-legal-checkbox wpflegal-terms-privacy">
128
+ <input name="legal[terms_privacy]" value="1" required="required" type="checkbox"> &nbsp;
129
  <span><?php echo $terms_privacy; ?></span>
130
  </label>
131
  <?php
134
  elseif( wpfval($set, 'checkbox_terms_privacy') ){
135
  ?>
136
  <label class="wpforo-legal-checkbox wpflegal-terms-privacy">
137
+ <input name="legal[terms_privacy]" value="1" required="required" type="checkbox"> &nbsp;
138
  <span><?php echo $str_if_no_pages; ?></span>
139
  </label>
140
  <?php
156
  $str_email_password = apply_filters('wpforo_legal_checkbox_confirm_email_password', $str_email_password);
157
  ?>
158
  <label class="wpforo-legal-checkbox wpflegal-email">
159
+ <input name="legal[email]" value="1" required="required" type="checkbox"> &nbsp;
160
  <span><?php echo $str_email_password; ?></span>
161
  </label>
162
  <?php
wpf-includes/integration/ultimate-member.php ADDED
@@ -0,0 +1,447 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ // Exit if accessed directly
4
+ if ( !defined( 'ABSPATH' ) ) exit;
5
+
6
+ if ( false ) {
7
+
8
+ function wpforo_um_tab_init(){
9
+
10
+ $options = get_option( 'um_options' );
11
+
12
+ if( wpfkey($options, 'profile_tab_foro') ||
13
+ wpfkey($options, 'log_wpforo_user_reply')
14
+ ){
15
+ if( !empty( $options ) ){
16
+ //Set default options for Tab Settings
17
+ $tab_options = array( 'profile_tab_foro' => 1, 'profile_tab_foro_privacy' => 0 );
18
+ foreach( $tab_options as $key => $value ) {
19
+ if(!isset($options[$key])) $options[$key] = $value;
20
+ }
21
+ //Set default options for Notification Settings
22
+ $notification_options = array();
23
+ $notification_options['wpforo_user_reply'] = array(
24
+ 'title' => __('User leaves a reply to wpForo topic', 'wpforo'),
25
+ 'template' => '<strong>{member}</strong> has <strong>replied</strong> to a topic you started on the forum.',
26
+ 'account_desc' => __('When a member replies to one of my forum topics', 'wpforo')
27
+ );
28
+ $notification_options['wpforo_user_reply_to_reply'] = array(
29
+ 'title' => __('User replied to wpForo post', 'wpforo'),
30
+ 'template' => '<strong>{member}</strong> has <strong>replied</strong> to your post on the forum.',
31
+ 'account_desc' => __('When a member replies to one of my post in forum topics', 'wpforo')
32
+ );
33
+ foreach( $notification_options as $type => $note ) {
34
+ if(!isset($options['log_' . $type])) $options['log_' . $type] = 1;
35
+ if(!isset( $options['log_' . $type . '_template'])) $options['log_' . $type . '_template'] = $note['template'];
36
+ }
37
+ update_option( 'um_options', $options );
38
+ }
39
+ }
40
+ }
41
+
42
+ add_action('wp_enqueue_scripts', 'wpforo_um_frontend_enqueue');
43
+ function wpforo_um_frontend_enqueue(){
44
+ if (is_rtl()) {
45
+ wp_register_style('wpforo-um-rtl', WPFORO_TEMPLATE_URL . '/integration/ultimate-member/style-rtl.css', false, WPFORO_VERSION );
46
+ wp_enqueue_style('wpforo-um-rtl');
47
+ }
48
+ else{
49
+ wp_register_style('wpforo-um', WPFORO_TEMPLATE_URL . '/integration/ultimate-member/style.css', false, WPFORO_VERSION );
50
+ wp_enqueue_style('wpforo-um');
51
+ }
52
+ if(!is_wpforo_page()){
53
+ wp_enqueue_style( 'dashicons' );
54
+ }
55
+ }
56
+
57
+
58
+ add_filter("um_notifications_core_log_types", "wpforo_um_notification_types", 500, 1);
59
+ function wpforo_um_notification_types( $array ){
60
+ $array['wpforo_user_reply'] = array(
61
+ 'title' => __('User leaves a reply to wpForo topic', 'wpforo'),
62
+ 'template' => '<strong>{member}</strong> has <strong>replied</strong> to a topic you started on the forum.',
63
+ 'account_desc' => __('When a member replies to one of my forum topics', 'wpforo')
64
+ );
65
+ $array['wpforo_user_reply_to_reply'] = array(
66
+ 'title' => __('User replied to wpForo post', 'wpforo'),
67
+ 'template' => '<strong>{member}</strong> has <strong>replied</strong> to your post on the forum.',
68
+ 'account_desc' => __('When a member replies to one of my post in forum topics', 'wpforo')
69
+ );
70
+ return $array;
71
+ }
72
+
73
+ add_filter('um_notifications_get_icon', 'wpforo_um_notification_icon', 10, 2 );
74
+ function wpforo_um_notification_icon( $output, $type ) {
75
+ if ( $type == 'wpforo_user_reply' ) {
76
+ $output = '<i class="um-faicon-comments" style="color: #43A6DF"></i>';
77
+ }
78
+ if ( $type == 'wpforo_user_reply_to_reply' ) {
79
+ $output = '<i class="um-faicon-comment" style="color: #43A6DF"></i>';
80
+ }
81
+ return $output;
82
+ }
83
+
84
+ add_action( 'wpforo_after_add_post', 'wpforo_um_add_notification', 10, 2 );
85
+ function wpforo_um_add_notification( $post = array(), $topic = array() ) {
86
+
87
+ if( !wpforo_feature('um_notification') || !class_exists( 'UM_Notifications_API' ) ) return;
88
+
89
+ //Get reply data
90
+ if( !wpfval($post,'postid') ) return;
91
+ if( !wpfval($topic,'topicid') ) return;
92
+
93
+ //Don't notify if a new reply is unapproved
94
+ if( wpfval($post,'status') ) return false;
95
+ if( wpfval($post, 'is_first_post')) return false;
96
+
97
+ //Get author information
98
+ $author_id = $post['userid'];
99
+ $topic_author_id = $topic['userid'];
100
+
101
+ // Hierarchical replies
102
+ if ( wpfval($post, 'parentid') ) {
103
+ $reply_to_item_author_id = wpforo_post( $post['parentid'], 'userid' );
104
+ }
105
+
106
+ // Notify the topic author if not the current reply author
107
+ $has_topic_note = false;
108
+ if ( $author_id !== $topic_author_id ) {
109
+ $has_topic_note = true;
110
+ $vars['photo'] = um_get_avatar_url( get_avatar( get_current_user_id(), 40 ) );
111
+ $vars['member'] = wpforo_member( get_current_user_id(), 'display_name');
112
+ $vars['notification_uri'] = esc_url_raw( $post['posturl'] );
113
+ UM()->Notifications_API()->api()->store_notification( $topic_author_id, 'wpforo_user_reply', $vars );
114
+ }
115
+
116
+ // Notify the immediate reply author if not the current reply author
117
+ if ( wpfval($post, 'parentid') && !$has_topic_note && ($topic_author_id !== $reply_to_item_author_id) && ( $author_id !== $reply_to_item_author_id ) ) {
118
+ $vars['photo'] = um_get_avatar_url( get_avatar( get_current_user_id(), 40 ) );
119
+ $vars['member'] = wpforo_member( get_current_user_id(), 'display_name');
120
+ $vars['notification_uri'] = esc_url_raw( $post['posturl'] );
121
+ UM()->Notifications_API()->api()->store_notification( $reply_to_item_author_id, 'wpforo_user_reply_to_reply', $vars );
122
+ }
123
+ }
124
+
125
+ add_action( 'wpforo_post_status_update', 'wpforo_um_notification_on_post_status_change', 10, 2 );
126
+ function wpforo_um_notification_on_post_status_change( $reply_id, $status = 0 ) {
127
+ if( !$reply_id || !wpforo_feature('bp_notification') ) return;
128
+ $post = WPF()->post->get_post($reply_id);
129
+ $post['status'] = $status;
130
+ $post['posturl'] = WPF()->post->get_post_url( $post['postid'] );
131
+ if( wpfval($post,'topicid') ) {
132
+ $topic = WPF()->topic->get_topic($post['topicid']);
133
+ } else {
134
+ return false;
135
+ }
136
+ if( !$status ){
137
+ wpforo_um_add_notification( $post, $topic );
138
+ }
139
+ }
140
+
141
+ add_filter('um_profile_tabs', 'wpforo_um_tabs', 999 );
142
+ function wpforo_um_tabs( $tabs ) {
143
+ $user_id = um_user('ID');
144
+ if( $user_id && wpforo_feature('um_forum_tab') ){
145
+ $member = wpforo_member( $user_id );
146
+ $topics = 0; $posts = 0; $likes = 0; $subscriptions = 0;
147
+ if( wpfval( $member, 'stat' ) ){
148
+ if( wpfval($member, 'stat', 'topics') ) $topics = $member['stat']['topics'];
149
+ if( wpfval($member, 'stat', 'posts') ) $posts = $member['stat']['posts'];
150
+ if( wpfval($member, 'stat', 'likes') ) $likes = $member['stat']['likes'];
151
+ }
152
+ $args = array('userid' => $user_id);
153
+ $subs = WPF()->sbscrb->get_subscribes( $args);
154
+ if( !empty($subs) ) $subscriptions = count($subs);
155
+ $tabs['foro'] = array(
156
+ 'name' => wpforo_phrase('Forums', false),
157
+ 'icon' => 'um-faicon-comments',
158
+ 'subnav' => array(
159
+ 'topics' => wpforo_phrase('Topics Started', false) . '<span>' . intval($topics) . '</span>',
160
+ 'replies' => wpforo_phrase('Replies Created', false) . '<span>' . intval($posts) . '</span>',
161
+ 'favorites' => wpforo_phrase('Liked Posts', false) . '<span>' . intval($likes) . '</span>',
162
+ 'subscriptions' => wpforo_phrase('Subscriptions', false) . '<span>' . intval($subscriptions) . '</span>',
163
+ ),
164
+ 'subnav_default' => 'topics'
165
+ );
166
+ }
167
+ return $tabs;
168
+ }
169
+
170
+ add_filter('um_user_profile_tabs', 'wpforo_um_user_tabs', 999 );
171
+ function wpforo_um_user_tabs( $tabs ) {
172
+ if( wpfval($tabs, 'foro','subnav_default') &&
173
+ wpfval($tabs, 'foro', 'subnav', $tabs['foro']['subnav_default'])
174
+ ) {
175
+ $i = 0;
176
+ if ( isset( $tabs['foro']['subnav'] ) ) {
177
+ foreach( $tabs['foro']['subnav'] as $id => $data ) {
178
+ $i++;
179
+ if ( $i == 1 ) {
180
+ $tabs['foro']['subnav_default'] = $id;
181
+ }
182
+ }
183
+ }
184
+ }
185
+ return $tabs;
186
+ }
187
+
188
+ add_action('um_profile_content_foro_default', 'wpforo_um_default_tab_content');
189
+ function wpforo_um_default_tab_content( $args ) {
190
+ wpforo_um_user_topics( $args );
191
+
192
+ }
193
+
194
+ add_action('um_profile_content_foro_topics', 'wpforo_um_user_topics');
195
+ function wpforo_um_user_topics( $args ) {
196
+ $user_id = um_user('ID');
197
+ if(isset($_GET['wpfpaged']) && intval($_GET['wpfpaged'])) $paged = intval($_GET['wpfpaged']);
198
+ $paged = (isset($paged) && $paged) ? $paged : 1;
199
+ $args = array(
200
+ 'offset' => ($paged - 1) * WPF()->post->options['posts_per_page'],
201
+ 'row_count' => WPF()->post->options['posts_per_page'],
202
+ 'userid' => $user_id,
203
+ 'check_private' => true
204
+ );
205
+ $activities = WPF()->topic->get_topics( $args, $items_count);
206
+ ?>
207
+ <div id="wpforo-topics" class="wpforo-activity">
208
+ <h3 class="wpf-activity-head"><?php wpforo_phrase('Forum Topics Started'); ?></h3>
209
+ <?php if(empty($activities)) : ?>
210
+ <p class="wpf-p-error"> <?php wpforo_phrase('No activity found for this member.') ?> </p>
211
+ <?php else: ?>
212
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
213
+ <?php $bg = FALSE; foreach( $activities as $activity ) : ?>
214
+ <tr>
215
+ <td class="wpf-activity-title">
216
+ <span class="dashicons dashicons-admin-comments"></span>
217
+ <?php
218
+ $topic = wpforo_topic($activity['topicid']);
219
+ if( !empty($topic)){ $topic_url = $topic['url']; $topic_title = $topic['title']; if(!$topic_url) $topic_url = '#'; if(!$topic_title) $topic_title = wpforo_phrase('Topic link');
220
+ ?><a href="<?php echo esc_url($topic_url) ?>" class="wpf-item-title"><?php echo $topic_title ?></a><?php
221
+ }
222
+ if( wpfval($topic, 'forumid') ){
223
+ $forum = wpforo_forum($topic['forumid']); $forum_url = $forum['url']; $forum_title = $forum['title']; if(!$forum_url) $forum_url = '#'; if(!$forum_title) $forum_url = wpforo_phrase('Forum link');
224
+ ?><p style="font-style: italic"><span><?php echo wpforo_phrase('in forum', false) ?></span> <a href="<?php echo esc_url($forum_url) ?>"><?php echo $forum_title ?></a></p><?php
225
+ }
226
+ ?>
227
+ </td>
228
+ <td class="wpf-activity-users">
229
+ <?php $members = WPF()->topic->members($topic['topicid'], 3); ?>
230
+ <?php if(!empty($members)): foreach( $members as $member ): ?>
231
+ <?php if(!empty($member)): ?>
232
+ <a href="<?php echo um_user_profile_url($member['ID']) ?>" title="<?php echo esc_attr(um_get_display_name($member['ID'])); ?>"><?php echo WPF()->member->avatar($member, 'alt="'.esc_attr($member['display_name']).'"', 30) ?></a>
233
+ <?php endif; ?>
234
+ <?php endforeach; endif; ?>
235
+ </td>
236
+ <td class="wpf-activity-posts">
237
+ <?php echo $activity['posts']; ?> <?php wpforo_phrase('posts'); ?>
238
+ </td>
239
+ <td class="wpf-activity-date"><?php wpforo_date($topic['created']); ?></td>
240
+ </tr>
241
+ <?php endforeach ?>
242
+ </table>
243
+ <div class="wpf-activity-foot"><?php WPF()->tpl->pagenavi( $paged, $items_count, false ); ?></div>
244
+ <div style="clear: both"></div>
245
+ <?php endif; ?>
246
+ </div>
247
+ <?php
248
+
249
+ }
250
+
251
+ add_action('um_profile_content_foro_replies', 'wpforo_um_user_replies');
252
+ function wpforo_um_user_replies( $args ) {
253
+ $user_id = um_user('ID');
254
+ if(isset($_GET['wpfpaged']) && intval($_GET['wpfpaged'])) $paged = intval($_GET['wpfpaged']);
255
+ $paged = (isset($paged) && $paged) ? $paged : 1;
256
+ $args = array(
257
+ 'offset' => ($paged - 1) * WPF()->post->options['posts_per_page'],
258
+ 'row_count' => WPF()->post->options['posts_per_page'],
259
+ 'userid' => $user_id,
260
+ 'check_private' => true
261
+ );
262
+ $activities = WPF()->post->get_posts( $args, $items_count);
263
+ ?>
264
+ <div id="wpforo-posts" class="wpforo-activity">
265
+ <h3 class="wpf-activity-head"><?php wpforo_phrase('Forum Replies Created'); ?></h3>
266
+ <?php if(empty($activities)) : ?>
267
+ <p class="wpf-p-error"> <?php wpforo_phrase('No activity found for this member.') ?> </p>
268
+ <?php else: ?>
269
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
270
+ <?php $bg = FALSE; foreach( $activities as $activity ) : ?>
271
+ <tr>
272
+ <td class="wpf-activity-title">
273
+ <span class="dashicons dashicons-format-chat"></span>
274
+ <?php
275
+ $post = wpforo_post($activity['postid']);
276
+ if( !empty($post)){ $post_url = $post['url']; $post_title = $post['title']; if(!$post_url) $post_url = '#'; if(!$post_title) $post_title = wpforo_phrase('Post link');
277
+ ?><a href="<?php echo esc_url($post_url) ?>" class="wpf-item-title"><?php echo $post_title ?></a><?php
278
+ }
279
+ ?>
280
+ <?php if(wpfval($post, 'body')): ?>
281
+ <p class="wpf-post-excerpt" style="font-style: italic">
282
+ <?php
283
+ $body = wpforo_content_filter( $post['body'] );
284
+ $body = preg_replace('#\[attach\][^\[\]]*\[\/attach\]#is', '', strip_shortcodes(strip_tags($body)));
285
+ wpforo_text($body, 200);
286
+ ?>
287
+ </p>
288
+ <?php endif; ?>
289
+ </td>
290
+ <td class="wpf-activity-forum">
291
+ <?php
292
+ if( wpfval($post, 'forumid') ){
293
+ $forum = wpforo_forum($post['forumid']); $forum_url = $forum['url']; $forum_title = $forum['title']; if(!$forum_url) $forum_url = '#'; if(!$forum_title) $forum_url = wpforo_phrase('Forum link');
294
+ ?><p style="font-style: italic"><span><?php echo wpforo_phrase('in forum', false) ?></span> <a href="<?php echo esc_url($forum_url) ?>"><?php echo $forum_title ?></a></p><?php
295
+ }
296
+ ?>
297
+ </td>
298
+ <td class="wpf-activity-date"><?php wpforo_date($post['created']); ?></td>
299
+ </tr>
300
+ <?php endforeach ?>
301
+ </table>
302
+ <div class="wpf-activity-foot"><?php WPF()->tpl->pagenavi( $paged, $items_count, false ); ?></div>
303
+ <div style="clear: both"></div>
304
+ <?php endif; ?>
305
+ </div>
306
+ <?php
307
+ }
308
+
309
+ add_action('um_profile_content_foro_favorites', 'wpforo_um_user_favorites');
310
+ function wpforo_um_user_favorites( $args ) {
311
+ $user_id = um_user('ID');
312
+ if(isset($_GET['wpfpaged']) && intval($_GET['wpfpaged'])) $paged = intval($_GET['wpfpaged']);
313
+ $paged = (isset($paged) && $paged) ? $paged : 1;
314
+ $args = array(
315
+ 'userid' => $user_id,
316
+ 'offset' => ($paged - 1) * WPF()->post->options['posts_per_page'],
317
+ 'row_count' => WPF()->post->options['posts_per_page'],
318
+ 'var' => 'postid'
319
+ );
320
+ $activities = WPF()->post->get_liked_posts( $args, $items_count);
321
+ ?>
322
+ <div id="wpforo-liked-posts" class="wpforo-activity">
323
+ <h3 class="wpf-activity-head"><?php wpforo_phrase('Liked Forum Posts'); ?></h3>
324
+ <?php if(empty($activities)) : ?>
325
+ <p class="wpf-p-error"> <?php wpforo_phrase('No activity found for this member.') ?> </p>
326
+ <?php else: ?>
327
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
328
+ <?php $bg = FALSE; foreach( $activities as $postid ) : ?>
329
+ <tr>
330
+ <td class="wpf-activity-title">
331
+ <span class="dashicons dashicons-thumbs-up"></span>
332
+ <?php
333
+ $post = wpforo_post($postid);
334
+ if( !empty($post)){ $post_url = $post['url']; $post_title = $post['title']; if(!$post_url) $post_url = '#'; if(!$post_title) $post_title = wpforo_phrase('Post link');
335
+ ?><a href="<?php echo esc_url($post_url) ?>" class="wpf-item-title"><?php echo $post_title ?></a><?php
336
+ }
337
+ ?>
338
+ <?php if(wpfval($post, 'body')): ?>
339
+ <p class="wpf-post-excerpt" style="font-style: italic">
340
+ <?php
341
+ $body = wpforo_content_filter( $post['body'] );
342
+ $body = preg_replace('#\[attach\][^\[\]]*\[\/attach\]#is', '', strip_shortcodes(strip_tags($body)));
343
+ wpforo_text($body, 200);
344
+ ?>
345
+ </p>
346
+ <?php endif; ?>
347
+ </td>
348
+ <td class="wpf-activity-forum">
349
+ <?php
350
+ if( wpfval($post, 'forumid') ){
351
+ $forum = wpforo_forum($post['forumid']); $forum_url = $forum['url']; $forum_title = $forum['title']; if(!$forum_url) $forum_url = '#'; if(!$forum_title) $forum_url = wpforo_phrase('Forum link');
352
+ ?><p style="font-style: italic"><span><?php echo wpforo_phrase('in forum', false) ?></span> <a href="<?php echo esc_url($forum_url) ?>"><?php echo $forum_title ?></a></p><?php
353
+ }
354
+ ?>
355
+ </td>
356
+ <td class="wpf-activity-date"><?php wpforo_date($post['created']); ?></td>
357
+ </tr>
358
+ <?php endforeach ?>
359
+ </table>
360
+ <div class="wpf-activity-foot"><?php WPF()->tpl->pagenavi( $paged, $items_count, false ); ?></div>
361
+ <div style="clear: both"></div>
362
+ <?php endif; ?>
363
+ </div>
364
+ <?php
365
+ }
366
+
367
+ add_action('um_profile_content_foro_subscriptions', 'wpforo_um_user_subscriptions');
368
+ function wpforo_um_user_subscriptions( $args ) {
369
+ $user_id = um_user('ID');
370
+ if(isset($_GET['wpfpaged']) && intval($_GET['wpfpaged'])) $paged = intval($_GET['wpfpaged']);
371
+ $paged = (isset($paged) && $paged) ? $paged : 1;
372
+ $args = array(
373
+ 'offset' => ($paged - 1) * WPF()->post->options['posts_per_page'],
374
+ 'row_count' => WPF()->post->options['posts_per_page'],
375
+ 'userid' => $user_id,
376
+ 'order' => 'DESC'
377
+ );
378
+ $activities = WPF()->sbscrb->get_subscribes( $args, $items_count);
379
+ ?>
380
+ <div id="wpforo-subscriptions" class="wpforo-activity">
381
+ <h3 class="wpf-activity-head"><?php wpforo_phrase('Forum Subscriptions'); ?></h3>
382
+ <?php if(empty($activities)) : ?>
383
+ <p class="wpf-p-error"> <?php wpforo_phrase('No activity found for this member.') ?> </p>
384
+ <?php else: ?>
385
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
386
+ <?php $bg = FALSE; foreach( $activities as $activity ) : ?>
387
+ <tr>
388
+ <td class="wpf-activity-title">
389
+ <span class="dashicons <?php echo ($activity['type'] == 'forum') ? 'dashicons-category' : 'dashicons-admin-comments' ; ?>"></span>
390
+ <?php
391
+ if( in_array($activity['type'], array('forum', 'forum-topic')) ){
392
+ $item = wpforo_forum($activity['itemid']);
393
+ $item_url = $item['url'];
394
+ }elseif($activity['type'] == 'topic'){
395
+ $item = wpforo_topic($activity['itemid']);
396
+ $item_url = $item['url'];
397
+ }elseif ( in_array($activity['type'], array('forums', 'forums-topics')) ){
398
+ $item = array('title' => wpforo_phrase('All ' . $activity['type'], false));
399
+ $item_url = '#';
400
+ }
401
+ if(empty($item)) continue;
402
+ ?>
403
+ <a href="<?php echo esc_url($item_url) ?>" class="wpf-item-title"><?php echo esc_html($item['title']) ?></a>
404
+ </td>
405
+ <td class="wpf-activity-unsb"><a href="<?php echo esc_url(WPF()->sbscrb->get_unsubscribe_link($activity['confirmkey'])) ?>"><?php wpforo_phrase('Unsubscribe'); ?></a></td>
406
+ </tr>
407
+ <?php endforeach ?>
408
+ </table>
409
+ <div class="wpf-activity-foot"><?php WPF()->tpl->pagenavi( $paged, $items_count, false ); ?></div>
410
+ <div style="clear: both"></div>
411
+ <?php endif; ?>
412
+ </div>
413
+ <?php
414
+ }
415
+
416
+ wpforo_um_tab_init();
417
+
418
+ add_filter( 'wpforo_member_profile_url', 'wpforo_um_profile_url', 10, 3 );
419
+ function wpforo_um_profile_url( $url = '', $member = array(), $template = 'profile' ){
420
+ if( wpfval($member, 'ID') && wpforo_feature('um_profile') ){
421
+ //UM Functions don't work here
422
+ //um_fetch_user( $member['ID'] );
423
+ //$user_domain = um_user_profile_url();
424
+ //Fatal error: Allowed memory size of ### bytes exhausted (tried to allocate #### bytes) in wp-includes\option.php on line 33
425
+ $user_domain = get_author_posts_url( $member['ID'] );
426
+ $user_domain = strtok( $user_domain, '?');
427
+ if( $user_domain ){
428
+ if( $template == 'account' ){
429
+ //$url = $user_domain . '?profiletab=main&um_action=edit';
430
+ $url = $user_domain;
431
+ }
432
+ elseif( $template == 'activity' ){
433
+ //$url = $user_domain . '?profiletab=foro';
434
+ $url = $user_domain;
435
+ }
436
+ elseif( $template == 'subscriptions' ){
437
+ //$url = $user_domain . '?profiletab=foro&subnav=subscriptions';
438
+ $url = $user_domain;
439
+ } else{
440
+ $url = $user_domain;
441
+ }
442
+ }
443
+ }
444
+ return apply_filters('wpforo_um_member_profile_url', $url, $member, $template);
445
+ }
446
+
447
+ }
wpf-includes/wpf-actions.php CHANGED
@@ -5,7 +5,7 @@
5
  function wpforo_actions(){
6
  do_action( 'wpforo_actions' );
7
 
8
- if( isset($_POST['wpfreg']) && !empty($_POST['wpfreg']) && $userid = WPF()->member->create($_POST['wpfreg'])){
9
  wpforo_verify_form('ref');
10
  WPF()->member->reset($userid);
11
  if( WPF()->member->options['redirect_url_after_register'] ){
@@ -52,38 +52,42 @@ function wpforo_actions(){
52
  wp_redirect( wpforo_home_url() );
53
  exit();
54
  }
55
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
  if(isset($_POST['wpforo_member_submit'])){
57
- if(isset($_POST['member']['userid']) && $_POST['member']['userid']){
58
- wpforo_verify_form();
59
-
60
  if( !( intval($_POST['member']['userid']) == WPF()->current_userid ||
61
- ( WPF()->perm->usergroup_can('em') && WPF()->perm->user_can_manage_user( WPF()->current_userid, intval($_POST['member']['userid']) )) ) ){
62
  WPF()->notice->clear();
63
  WPF()->notice->add('Permission denied', 'error');
64
  wp_redirect(wpforo_get_request_uri());
65
  exit();
66
  }
67
-
68
- $edit_response = WPF()->member->edit();
69
- if( isset($_POST['member']['avatar_type']) && $_POST['member']['avatar_type'] == 'custom' ) WPF()->member->upload_avatar();
70
-
71
- if( isset($_POST['member']['old_pass'])
72
- && isset($_POST['member']['user_pass1'])
73
- && isset($_POST['member']['user_pass2'])
74
- && $_POST['member']['user_pass1'] && $_POST['member']['user_pass2'] && $_POST['member']['old_pass'] ){
75
- if( $_POST['member']['user_pass1'] == $_POST['member']['user_pass2'] ){
76
- WPF()->member->change_password($_POST['member']['old_pass'], $_POST['member']['user_pass1'], $_POST['member']['userid']);
77
- }else{
78
- WPF()->notice->clear();
79
- WPF()->notice->add('New Passwords do not match', 'error');
80
- }
81
- }
82
-
83
- WPF()->member->reset($_POST['member']['userid']);
84
- $gpua = ( !empty($_POST['member']['user_nicename']) ? sanitize_title($_POST['member']['user_nicename']) : $_POST['member']['userid'] );
85
- if( $edit_response && $profile_url = WPF()->member->get_profile_url( $gpua, 'account') ){
86
- wp_redirect($profile_url);
87
  exit();
88
  }
89
  }
@@ -770,7 +774,9 @@ function wpforo_actions(){
770
  }
771
 
772
  if(isset( $_POST['usergroup']['action'] ) && ( $_POST['usergroup']['action'] == 'add' || $_POST['usergroup']['action'] == 'edit' ) ){
773
- check_admin_referer( 'wpforo-usergroup-addedit' );
 
 
774
  $board_cans = ( isset($_POST['cans']) ? $_POST['cans'] : array() );
775
  if( $_POST['usergroup']['action'] == 'add' ){
776
  $insert_usergroup_name = sanitize_text_field($_POST['usergroup']['name']);
@@ -778,22 +784,40 @@ function wpforo_actions(){
778
  $insert_usergroup_access = sanitize_text_field($_POST['usergroup']['access']);
779
  $insert_usergroup_color = ( isset($_POST['wpfugc']) && $_POST['wpfugc'] ) ? '' : sanitize_text_field($_POST['usergroup']['color']);
780
  $insert_usergroup_visible = intval($_POST['usergroup']['visible']);
781
- $insert_usergroup_id = WPF()->usergroup->add( $insert_usergroup_name, $board_cans, '', $insert_usergroup_role, $insert_usergroup_access, $insert_usergroup_color, $insert_usergroup_visible );
782
- if(isset($$insert_usergroup_id)) wpforo_clean_cache( 'loop', $insert_usergroup_id );
783
- wp_redirect( admin_url( 'admin.php?page=wpforo-usergroups' ) );
784
- exit();
785
  }elseif( $_POST['usergroup']['action'] == 'edit' ){
786
  $insert_usergroup_id = intval($_GET['gid']);
787
  $insert_usergroup_name = sanitize_text_field($_POST['usergroup']['name']);
788
  $insert_usergroup_role = sanitize_text_field($_POST['usergroup']['role']);
789
  $insert_usergroup_color = ( isset($_POST['wpfugc']) && $_POST['wpfugc'] ) ? '' : sanitize_text_field($_POST['usergroup']['color']);
790
  $insert_usergroup_visible = intval($_POST['usergroup']['visible']);
791
- WPF()->usergroup->edit( $insert_usergroup_id, $insert_usergroup_name, $board_cans, '', $insert_usergroup_role, NULL, $insert_usergroup_color, $insert_usergroup_visible );
792
- if(isset($insert_usergroup_id)) wpforo_clean_cache( 'loop', $insert_usergroup_id );
793
- wp_redirect( admin_url( 'admin.php?page=wpforo-usergroups' ) );
794
- exit();
795
  }
796
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
797
  }
798
  if(isset($_GET['action']) && $_GET['action']=='del' && isset($_POST['usergroup']['submit']) && $_POST['usergroup']['submit'] == 'Delete'){
799
  check_admin_referer( 'wpforo-usergroup-delete' );
@@ -1003,7 +1027,11 @@ function wpforo_actions(){
1003
  check_admin_referer( 'wpforo-tools-misc' );
1004
  $_POST['wpforo_tools_misc']['dofollow'] = sanitize_textarea_field($_POST['wpforo_tools_misc']['dofollow']);
1005
  $_POST['wpforo_tools_misc']['noindex'] = sanitize_textarea_field($_POST['wpforo_tools_misc']['noindex']);
1006
- if( update_option('wpforo_tools_misc', $_POST['wpforo_tools_misc']) ){
 
 
 
 
1007
  WPF()->notice->add('Settings successfully updated', 'success');
1008
  }
1009
  wp_redirect( admin_url( 'admin.php?page=wpforo-tools&tab=misc' ) );
5
  function wpforo_actions(){
6
  do_action( 'wpforo_actions' );
7
 
8
+ if( isset($_POST['wpfreg']) && !empty($_POST['wpfreg']) && $userid = WPF()->member->create( $_POST )){
9
  wpforo_verify_form('ref');
10
  WPF()->member->reset($userid);
11
  if( WPF()->member->options['redirect_url_after_register'] ){
52
  wp_redirect( wpforo_home_url() );
53
  exit();
54
  }
55
+
56
+ if( wpfval($_GET, 'foro_f') && wpfval($_GET, 'foro_u') && wpfval($_GET, 'foro_n') ){
57
+ if( wp_verify_nonce($_GET['foro_n'], 'wpforo_delete_profile_field') ){
58
+ $userid = intval( $_GET['foro_u'] );
59
+ $field = sanitize_title( $_GET['foro_f'] );
60
+ $wpudir = wp_upload_dir();
61
+ if( $file = WPF()->member->get_custom_field( $userid, $field ) ){
62
+ $file = $wpudir['basedir'] . $file;
63
+ $result = WPF()->member->update_custom_field( $userid, $field, '' );
64
+ if( $result ){
65
+ @unlink($file);
66
+ WPF()->phrase->clear_cache();
67
+ WPF()->notice->add('Deleted Successfully!', 'success');
68
+ } else {
69
+ WPF()->notice->clear();
70
+ WPF()->notice->add('Sorry, this file cannot be deleted', 'error');
71
+ }
72
+ }
73
+ }
74
+ }
75
+
76
  if(isset($_POST['wpforo_member_submit'])){
77
+ if( wpfval($_POST, 'member', 'userid') ){
78
+ wpforo_verify_form();
79
+ $uid = intval($_POST['member']['userid']);
80
  if( !( intval($_POST['member']['userid']) == WPF()->current_userid ||
81
+ ( WPF()->perm->usergroup_can('em') && WPF()->perm->user_can_manage_user( WPF()->current_userid, $uid )) ) ){
82
  WPF()->notice->clear();
83
  WPF()->notice->add('Permission denied', 'error');
84
  wp_redirect(wpforo_get_request_uri());
85
  exit();
86
  }
87
+ $user = WPF()->member->update( $_POST );
88
+ $uid = ( wpfval($user, 'user_nicename') ) ? $user['user_nicename'] : $uid;
89
+ if( $profile_url = WPF()->member->get_profile_url( $uid, 'account') ){
90
+ wp_redirect($profile_url);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  exit();
92
  }
93
  }
774
  }
775
 
776
  if(isset( $_POST['usergroup']['action'] ) && ( $_POST['usergroup']['action'] == 'add' || $_POST['usergroup']['action'] == 'edit' ) ){
777
+ $insert_usergroup_id = 0;
778
+ $insert_usergroup_role = false;
779
+ check_admin_referer( 'wpforo-usergroup-addedit' );
780
  $board_cans = ( isset($_POST['cans']) ? $_POST['cans'] : array() );
781
  if( $_POST['usergroup']['action'] == 'add' ){
782
  $insert_usergroup_name = sanitize_text_field($_POST['usergroup']['name']);
784
  $insert_usergroup_access = sanitize_text_field($_POST['usergroup']['access']);
785
  $insert_usergroup_color = ( isset($_POST['wpfugc']) && $_POST['wpfugc'] ) ? '' : sanitize_text_field($_POST['usergroup']['color']);
786
  $insert_usergroup_visible = intval($_POST['usergroup']['visible']);
787
+ $insert_usergroup_secondary = intval($_POST['usergroup']['secondary']);
788
+ $insert_usergroup_id = WPF()->usergroup->add( $insert_usergroup_name, $board_cans, '', $insert_usergroup_role, $insert_usergroup_access, $insert_usergroup_color, $insert_usergroup_visible, $insert_usergroup_secondary );
789
+ if( $$insert_usergroup_id ) wpforo_clean_cache( 'loop', $insert_usergroup_id );
 
790
  }elseif( $_POST['usergroup']['action'] == 'edit' ){
791
  $insert_usergroup_id = intval($_GET['gid']);
792
  $insert_usergroup_name = sanitize_text_field($_POST['usergroup']['name']);
793
  $insert_usergroup_role = sanitize_text_field($_POST['usergroup']['role']);
794
  $insert_usergroup_color = ( isset($_POST['wpfugc']) && $_POST['wpfugc'] ) ? '' : sanitize_text_field($_POST['usergroup']['color']);
795
  $insert_usergroup_visible = intval($_POST['usergroup']['visible']);
796
+ $insert_usergroup_secondary = intval($_POST['usergroup']['secondary']);
797
+ WPF()->usergroup->edit( $insert_usergroup_id, $insert_usergroup_name, $board_cans, '', $insert_usergroup_role, NULL, $insert_usergroup_color, $insert_usergroup_visible, $insert_usergroup_secondary );
798
+ if( $insert_usergroup_id ) wpforo_clean_cache( 'loop', $insert_usergroup_id );
 
799
  }
800
+ if( wpforo_feature('role-synch') && $insert_usergroup_id && $insert_usergroup_role ){
801
+ $args = array( 'role' => $insert_usergroup_role );
802
+ $users = get_users( $args );
803
+ $users_count = count( $users );
804
+ $users_count_limit = apply_filters('wpforo_synch_roles_users_limit', 5000);
805
+ $ug_role = array( $insert_usergroup_id => $insert_usergroup_role);
806
+ if( !empty($users) ){
807
+ if( $users_count <= $users_count_limit ){
808
+ $status = wpforo_synch_role( $ug_role, $users );
809
+ wpforo_clean_cache('user');
810
+ if( wpfval($status, 'error') && $status['error'] ){
811
+ WPF()->notice->add($status['error'], 'error');
812
+ }
813
+ }
814
+ else{
815
+ WPF()->notice->add('Please make sure you don\'t have not-synched Roles in the "User Roles" table below, then click on the [Synchronize] button to update users Usergroup IDs.' , 'error');
816
+ }
817
+ }
818
+ }
819
+ wp_redirect( admin_url( 'admin.php?page=wpforo-usergroups' ) );
820
+ exit();
821
  }
822
  if(isset($_GET['action']) && $_GET['action']=='del' && isset($_POST['usergroup']['submit']) && $_POST['usergroup']['submit'] == 'Delete'){
823
  check_admin_referer( 'wpforo-usergroup-delete' );
1027
  check_admin_referer( 'wpforo-tools-misc' );
1028
  $_POST['wpforo_tools_misc']['dofollow'] = sanitize_textarea_field($_POST['wpforo_tools_misc']['dofollow']);
1029
  $_POST['wpforo_tools_misc']['noindex'] = sanitize_textarea_field($_POST['wpforo_tools_misc']['noindex']);
1030
+ $_POST['wpforo_tools_misc']['admin_note'] = wpforo_kses($_POST['wpforo_tools_misc']['admin_note']);
1031
+ $_POST['wpforo_tools_misc']['admin_note_groups'] = ( wpfval($_POST, 'wpforo_tools_misc', 'admin_note_groups' ) ) ? array_map( 'intval', $_POST['wpforo_tools_misc']['admin_note_groups'] ) : array();
1032
+ $_POST['wpforo_tools_misc']['admin_note_pages'] = ( wpfval($_POST, 'wpforo_tools_misc', 'admin_note_pages' ) ) ? array_map( 'sanitize_textarea_field', $_POST['wpforo_tools_misc']['admin_note_pages'] ) : array();
1033
+ if( update_option('wpforo_tools_misc', $_POST['wpforo_tools_misc']) ){
1034
+ wpforo_clean_cache('forum-soft');
1035
  WPF()->notice->add('Settings successfully updated', 'success');
1036
  }
1037
  wp_redirect( admin_url( 'admin.php?page=wpforo-tools&tab=misc' ) );
wpf-includes/wpf-hooks.php CHANGED
@@ -17,7 +17,7 @@ function wpforo_action_link( $links, $file ) {
17
 
18
  $uninstall_url = wp_nonce_url( admin_url( 'plugins.php?action=wpforo-uninstall' ), 'wpforo_uninstall' );
19
 
20
- $links[] = '<a href="'.esc_url( $uninstall_url ).'" style="color:#a00;" onclick="return confirm(\'' . __('IMPORTANT! Uninstall is not a simple deactivation action. This action will permanently remove all forum data (forums, topics, replies, attachments...) from database. Please backup database before this action, you may need this forum data in future. If you are sure that you want to delete all forum data please confirm. If not, just cancel it, then you can deactivate this plugin, that will not remove forum data.', 'wpforo').'\')">' . __( 'Uninstall', 'wpforo' ) . '</a>';
21
 
22
  $settings_link = '<a href="'.esc_url( admin_url( 'admin.php?page=wpforo-community' ) ).'">' . __( 'Settings', 'wpforo' ) . '</a>';
23
  array_unshift( $links, $settings_link );
@@ -28,12 +28,14 @@ function wpforo_action_link( $links, $file ) {
28
  function wpforo_notice_show(){
29
  WPF()->notice->show();
30
  }
31
- add_action( 'wpforo_top_hook', 'wpforo_notice_show', 10, 0 );
32
 
33
  function wpforo_user_admin_bar(){
34
- if( !is_super_admin() && is_user_logged_in() ) show_admin_bar( wpforo_feature('user-admin-bar') );
 
 
35
  }
36
- add_action('init', 'wpforo_user_admin_bar');
37
 
38
  function wpforo_admin_notice__menu_help(){
39
  if(strpos(wpforo_get_request_uri(), 'nav-menus.php') !== FALSE){
@@ -163,7 +165,6 @@ function wpforo_init_template(){
163
  add_shortcode( 'wpforo', 'wpforo_load' );
164
  function wpforo_load( $atts ){
165
  if(wpforo_is_admin()) return '';
166
-
167
  if(wpforo_feature('output-buffer') && function_exists('ob_start')){
168
  if( wpforo_feature('html_cashe') ){
169
  if( $html = WPF()->cache->get_html() ) return $html;
@@ -584,11 +585,12 @@ function wpf_answer(){
584
  add_action('wp_ajax_wpforo_quote_ajax', 'wpf_quote');
585
  add_action('wp_ajax_nopriv_wpforo_quote_ajax', 'wpf_quote' );
586
  function wpf_quote(){
587
- $post = WPF()->db->get_row('SELECT `userid`, `name`, `email`, `body` FROM '.WPF()->tables->posts.' WHERE postid =' . intval($_POST['postid']), ARRAY_A);
 
588
  if( !WPF()->perm->forum_can( 'cr', $post['forumid']) ) return;
589
  $post = apply_filters('wpforo_quote_post_ajax', $post);
590
  $poster = wpforo_member( $post );
591
- echo '<blockquote><div class="wpforo-post-quote-author"><strong>' . wpforo_phrase('Posted by', FALSE) . ': ' . ( $poster['display_name'] ? esc_textarea($poster['display_name']) : esc_textarea($poster['user_login']) ) . '</strong></div>' . wpautop($post['body']) . '</blockquote><br />';
592
  exit();
593
  }
594
 
@@ -1164,8 +1166,19 @@ function wpforo_admin_enqueue(){
1164
  wp_register_script( 'wpforo-contenthover', WPFORO_URL . '/wpf-admin/js/functions.js', array('jquery'), WPFORO_VERSION, false );
1165
  wp_enqueue_script( 'wpforo-contenthover' );
1166
  wp_localize_script( 'wpforo-contenthover', 'wpforo_admin', array('phrases' => $phrases) );
1167
-
1168
  }
 
 
 
 
 
 
 
 
 
 
 
 
1169
  }
1170
  add_action( 'admin_enqueue_scripts', 'wpforo_admin_enqueue' );
1171
 
@@ -1184,31 +1197,86 @@ function wpforo_userform_to_wpuser_html_form($wp_user){
1184
  if( is_super_admin() ){
1185
  if( is_object($wp_user) ){
1186
  $user = WPF()->member->get_member($wp_user->ID);
1187
- $groupid = $user['groupid'];
1188
- $timezone = $user['timezone'];
 
 
 
 
1189
  }
1190
  if( !isset($groupid) ) $groupid = 0;
1191
  if( !isset($timezone) ) $timezone = '';
1192
-
1193
- echo '<table class="form-table">
1194
- <tr class="form-field">
1195
- <th scope="row"><label for="wpforo_usergroup">' . __('wpForo Usergroup', 'wpforo') . '</label></th>
1196
- <td>
1197
- <select name="wpforo_usergroup" id="wpforo_usergroup">';
1198
- WPF()->usergroup->show_selectbox($groupid);
1199
- echo ' </select>
1200
- </td>
1201
- </tr>
1202
- <tr class="form-field">
1203
- <th scope="row"><label for="wpforo_usertimezone">' . __('wpForo User Timezone', 'wpforo') . '</label></th>
1204
- <td>
1205
- <select name="wpforo_usertimezone" id="wpforo_usertimezone">
1206
- ' . wp_timezone_choice($timezone) .
1207
- '</select>
1208
- </td>
1209
- </tr>
1210
- </table>';
1211
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1212
  }
1213
  }
1214
  add_action( 'user_new_form', 'wpforo_userform_to_wpuser_html_form' );
@@ -1222,11 +1290,18 @@ add_action( 'user_register', 'wpforo_do_hook_user_register', 10, 1 );
1222
 
1223
  function wpforo_do_hook_update_profile($userid){
1224
  if( isset($_POST['wpforo_usergroup']) && $_POST['wpforo_usergroup'] ){
1225
- WPF()->member->edit_profile( array( 'userid' => intval($userid),
1226
- 'groupid' => intval($_POST['wpforo_usergroup']),
1227
- 'site' => esc_url($_POST['url']),
1228
- 'about' => wpforo_kses($_POST['description'], 'user_description'),
1229
- 'timezone' => ( isset($_POST['wpforo_usertimezone']) ? sanitize_text_field($_POST['wpforo_usertimezone']) : '' ) ) );
 
 
 
 
 
 
 
1230
  }
1231
  WPF()->member->reset($userid);
1232
  }
@@ -1235,7 +1310,7 @@ add_action('edit_user_profile_update', 'wpforo_do_hook_update_profile');
1235
 
1236
  function wpforo_update_last_login_date($user_login, $user = array()){
1237
  if(empty($user)) return;
1238
- WPF()->member->edit_profile( array( 'userid' => intval($user->ID), 'last_login' => current_time( 'mysql', 1 ) ) );
1239
  }
1240
  add_action('wp_login', 'wpforo_update_last_login_date', 10, 2);
1241
 
@@ -1329,11 +1404,13 @@ function wpforo_send_mail_to_mentioned_users($item){
1329
  if( in_array($member['user_email'], WPF()->sbscrb->already_sent_emails) ) continue;
1330
 
1331
  if( isset($item['private']) && $item['private'] ){
1332
- if( !WPF()->perm->forum_can('vp', $item['forumid'], $member['groupid']) ) continue;
1333
  }
1334
  if( isset($item['status']) && $item['status'] ){
1335
- if( !WPF()->perm->forum_can('au', $item['forumid'], $member['groupid']) ) continue;
1336
  }
 
 
1337
 
1338
  $dname = wpforo_make_dname($member['display_name'], $member['user_nicename']);
1339
  $subject = stripslashes(str_replace('[mentioned-user-name]', $dname, $_subject));
@@ -1451,22 +1528,27 @@ function wpforo_forum_subscribers_mail_sender( $topic ){
1451
  $member = array('display_name' => $subscriber, 'user_email' => $subscriber);
1452
  $unsubscribe_link = '#';
1453
  }
1454
-
1455
- if( isset($topic['forumid']) && $topic['forumid'] ){
1456
- if( isset($topic['private']) && $topic['private'] && isset($subscriber['userid'])
 
 
 
 
1457
  && ( ( $topic['userid'] && $subscriber['userid'] && $topic['userid'] != $subscriber['userid'] )
1458
  || ( $topic['email'] && $subscriber['user_email'] && $topic['email'] != $subscriber['user_email'] ) ) ){
1459
- $subscriber_groupid = ( isset($member['groupid']) && $member['groupid'] ) ? $member['groupid'] : WPF()->usergroup->get_groupid_by_userid($subscriber['userid']);
1460
- if( !WPF()->perm->forum_can('vp', $topic['forumid'], $subscriber_groupid) ){
1461
  continue;
1462
  }
1463
  }
1464
  if( isset($topic['status']) && $topic['status'] == 1 && isset($subscriber['userid']) ){
1465
- $subscriber_groupid = ( isset($member['groupid']) && $member['groupid'] ) ? $member['groupid'] : WPF()->usergroup->get_groupid_by_userid($subscriber['userid']);
1466
- if( !WPF()->perm->forum_can('au', $topic['forumid'], $subscriber_groupid) ){
1467
  continue;
1468
  }
1469
  }
 
 
 
1470
  }
1471
 
1472
  $owner = wpforo_member( $topic );
@@ -1489,13 +1571,15 @@ function wpforo_forum_subscribers_mail_sender( $topic ){
1489
 
1490
  $subject = WPF()->sbscrb->options['new_topic_notification_email_subject'];
1491
  $message = WPF()->sbscrb->options['new_topic_notification_email_message'];
1492
-
 
 
1493
  $from_tags = array( "[member_name]", "[forum]", "[unsubscribe_link]", "[topic_title]", "[topic_desc]");
1494
  $to_words = array( sanitize_text_field($member['display_name']),
1495
  '<a href="' . esc_url($forum['url']) . '">' . sanitize_text_field($forum['title']) . '</a>',
1496
  '<br><a target="_blank" href="' . esc_url($unsubscribe_link) . '">' . wpforo_phrase('Unsubscribe', false) . '</a>' ,
1497
  '<a target="_blank" href="' . esc_url($topic['topicurl']) . '">' . sanitize_text_field($topic['title']) . '</a>' ,
1498
- wpforo_text( wpforo_kses( $topic['body'], 'email'), 70, FALSE ) );
1499
 
1500
  $subject = stripslashes(strip_tags(str_replace($from_tags, $to_words, $subject)));
1501
  $message = stripslashes(str_replace($from_tags, $to_words, $message));
@@ -1552,21 +1636,25 @@ function wpforo_topic_subscribers_mail_sender( $post ){
1552
  if( in_array($member['user_email'], WPF()->sbscrb->already_sent_emails) ) continue;
1553
 
1554
  if( isset($topic['forumid']) && $topic['forumid'] && isset($subscriber['userid']) ){
1555
-
1556
- $subscriber_groupid = ( isset($member['groupid']) && $member['groupid'] ) ? $member['groupid'] : WPF()->usergroup->get_groupid_by_userid($subscriber['userid']);
1557
-
1558
- if( isset($topic['private']) && $topic['private']
 
1559
  && ( ( $topic['userid'] && $subscriber['userid'] && $topic['userid'] != $subscriber['userid'] )
1560
  || ( $topic['email'] && $subscriber['user_email'] && $topic['email'] != $subscriber['user_email'] ) ) ){
1561
- if( !WPF()->perm->forum_can('vp', $topic['forumid'], $subscriber_groupid) ){
1562
  continue;
1563
  }
1564
  }
1565
  if( (isset($topic['status']) && $topic['status'] == 1) || (isset($post['status']) && $post['status'] == 1) ){
1566
- if( !WPF()->perm->forum_can('au', $topic['forumid'], $subscriber_groupid) ){
1567
  continue;
1568
  }
1569
  }
 
 
 
1570
  }
1571
 
1572
  ############### Sending Email ##################
@@ -1582,13 +1670,14 @@ function wpforo_topic_subscribers_mail_sender( $post ){
1582
 
1583
  $subject = WPF()->sbscrb->options['new_post_notification_email_subject'];
1584
  $message = WPF()->sbscrb->options['new_post_notification_email_message'];
 
1585
 
1586
  $from_tags = array( "[member_name]", "[topic]", "[unsubscribe_link]", "[reply_title]", "[reply_desc]");
1587
  $to_words = array( sanitize_text_field($member['display_name']),
1588
  '<a href="' . esc_url($post['posturl']) . '">' . sanitize_text_field($topic['title']) . '</a>',
1589
  '<br><a target="_blank" href="' . esc_url($unsubscribe_link) . '">'.wpforo_phrase('Unsubscribe', false).'</a>' ,
1590
  '<a target="_blank" href="' . esc_url($post['posturl']) . '">' . sanitize_text_field($post['title']) . '</a>' ,
1591
- wpforo_text( wpforo_kses($post['body'], 'email'), 70, FALSE ) );
1592
 
1593
  $subject = stripslashes(strip_tags(str_replace($from_tags, $to_words, $subject)));
1594
  $message = stripslashes(str_replace($from_tags, $to_words, $message));
@@ -1773,6 +1862,14 @@ function wpforo_add_adminbar_links( $wp_admin_bar ) {
1773
  'href' => admin_url('admin.php?page=wpforo-phrases&action=add'),
1774
  'parent' => 'new-content'
1775
  );
 
 
 
 
 
 
 
 
1776
  $wp_admin_bar->add_node( $args );
1777
 
1778
  if( WPF()->current_user_groupid == 1 ||
@@ -1788,6 +1885,15 @@ function wpforo_add_adminbar_links( $wp_admin_bar ) {
1788
  'href' => admin_url('admin.php?page=wpforo-community')
1789
  );
1790
  $wp_admin_bar->add_node( $args );
 
 
 
 
 
 
 
 
 
1791
  }
1792
  if( WPF()->perm->usergroup_can('cf') && WPF()->perm->usergroup_can('ef') && WPF()->perm->usergroup_can('df') ){
1793
  $args = array(
@@ -2032,4 +2138,176 @@ function wpforo_replace_retrieve_password_message( $message, $key, $user_login,
2032
  }
2033
  return $message;
2034
  }
2035
- add_filter( 'retrieve_password_message', 'wpforo_replace_retrieve_password_message', 10, 4 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  $uninstall_url = wp_nonce_url( admin_url( 'plugins.php?action=wpforo-uninstall' ), 'wpforo_uninstall' );
19
 
20
+ $links[] = '<a href="'.esc_url( $uninstall_url ).'" class="wpforo-uninstall" style="color:#a00;" onclick="return confirm(\'' . __('IMPORTANT! Uninstall is not a simple deactivation action. This action will permanently remove all forum data (forums, topics, replies, attachments...) from database. Please backup database before this action, you may need this forum data in future. If you are sure that you want to delete all forum data please confirm. If not, just cancel it, then you can deactivate this plugin, that will not remove forum data.', 'wpforo').'\')">' . __( 'Uninstall', 'wpforo' ) . '</a>';
21
 
22
  $settings_link = '<a href="'.esc_url( admin_url( 'admin.php?page=wpforo-community' ) ).'">' . __( 'Settings', 'wpforo' ) . '</a>';
23
  array_unshift( $links, $settings_link );
28
  function wpforo_notice_show(){
29
  WPF()->notice->show();
30
  }
31
+ add_action( 'wp_footer', 'wpforo_notice_show' );
32
 
33
  function wpforo_user_admin_bar(){
34
+ $allowed_roles = array('editor', 'administrator', 'author');
35
+ if( !is_super_admin() && !array_intersect($allowed_roles, (array) WPF()->wp_current_user->roles) /*&& WPF()->current_user_groupid != 1*/ )
36
+ show_admin_bar( wpforo_feature('user-admin-bar') );
37
  }
38
+ add_action('init', 'wpforo_user_admin_bar', 11);
39
 
40
  function wpforo_admin_notice__menu_help(){
41
  if(strpos(wpforo_get_request_uri(), 'nav-menus.php') !== FALSE){
165
  add_shortcode( 'wpforo', 'wpforo_load' );
166
  function wpforo_load( $atts ){
167
  if(wpforo_is_admin()) return '';
 
168
  if(wpforo_feature('output-buffer') && function_exists('ob_start')){
169
  if( wpforo_feature('html_cashe') ){
170
  if( $html = WPF()->cache->get_html() ) return $html;
585
  add_action('wp_ajax_wpforo_quote_ajax', 'wpf_quote');
586
  add_action('wp_ajax_nopriv_wpforo_quote_ajax', 'wpf_quote' );
587
  function wpf_quote(){
588
+ if( !$current_topicid = wpforo_bigintval( WPF()->current_object['topicid'] ) ) exit();
589
+ $post = WPF()->db->get_row('SELECT * FROM '.WPF()->tables->posts.' WHERE topicid = ' . $current_topicid . ' AND postid =' . wpforo_bigintval($_POST['postid']), ARRAY_A);
590
  if( !WPF()->perm->forum_can( 'cr', $post['forumid']) ) return;
591
  $post = apply_filters('wpforo_quote_post_ajax', $post);
592
  $poster = wpforo_member( $post );
593
+ echo '<blockquote data-userid="' . $post['userid'] . '" data-postid="'. $post['postid'] .'"><div class="wpforo-post-quote-author"><strong>' . wpforo_phrase('Posted by', FALSE) . ': ' . esc_textarea( wpforo_make_dname($poster['display_name'], $poster['user_nicename']) ) . '</strong></div>' . wpautop($post['body']) . '</blockquote><br />';
594
  exit();
595
  }
596
 
1166
  wp_register_script( 'wpforo-contenthover', WPFORO_URL . '/wpf-admin/js/functions.js', array('jquery'), WPFORO_VERSION, false );
1167
  wp_enqueue_script( 'wpforo-contenthover' );
1168
  wp_localize_script( 'wpforo-contenthover', 'wpforo_admin', array('phrases' => $phrases) );
 
1169
  }
1170
+ if( !get_option('wpforo_deactivation_dialog_never_show') && (strpos( wpforo_get_request_uri(), '/plugins.php' ) !== false) ){
1171
+ $wpforo_deactivation_obj = array(
1172
+ 'msgReasonRequired' => __('Please check one of reasons before sending feedback!', 'wpforo'),
1173
+ 'msgReasonDescRequired' => __('Please provide more information', 'wpforo'),
1174
+ 'adminUrl' => get_admin_url()
1175
+ );
1176
+ wp_register_style('wpforo-deactivation-css', WPFORO_URL . '/wpf-admin/css/deactivation-dialog.css', array(), WPFORO_VERSION);
1177
+ wp_enqueue_style('wpforo-deactivation-css');
1178
+ wp_register_script('wpforo-deactivation-js', WPFORO_URL . '/wpf-admin/js/deactivation-dialog.js', array('jquery'), WPFORO_VERSION);
1179
+ wp_enqueue_script('wpforo-deactivation-js');
1180
+ wp_localize_script('wpforo-deactivation-js', 'wpforo_deactivation_obj', $wpforo_deactivation_obj);
1181
+ }
1182
  }
1183
  add_action( 'admin_enqueue_scripts', 'wpforo_admin_enqueue' );
1184
 
1197
  if( is_super_admin() ){
1198
  if( is_object($wp_user) ){
1199
  $user = WPF()->member->get_member($wp_user->ID);
1200
+ $groupid = intval($user['groupid']);
1201
+ $timezone = sanitize_text_field($user['timezone']);
1202
+ if(wpfval($user, 'secondary_groups')){
1203
+ $secondary_groups = explode(',', $user['secondary_groups']);
1204
+ $secondary_groups = array_map('intval', $secondary_groups);
1205
+ }
1206
  }
1207
  if( !isset($groupid) ) $groupid = 0;
1208
  if( !isset($timezone) ) $timezone = '';
1209
+ if( !isset($secondary_groups) ) $secondary_groups = array();
1210
+ ?>
1211
+ <h2 style="margin-bottom: 30px; margin-top: 50px;"><?php _e('Forum Profile Fields - wpForo') ;?></h2>
1212
+ <table class="form-table wpforo-profile-table" style="box-shadow: 1px 1px 6px #cccccc; background: #f7f7f7; margin-bottom: 30px; width: 97%;">
1213
+ <tr>
1214
+ <td colspan="2" style="padding: 5px;"></td>
1215
+ </tr>
1216
+ <tr class="form-field">
1217
+ <th scope="row" style="padding: 10px 20px 10px 20px; width: 30%;">
1218
+ <label for="wpforo_usergroup">
1219
+ <?php _e('Forum - Usergroup', 'wpforo'); ?>
1220
+ </label>
1221
+ <?php if( wpforo_feature('role-synch') ): ?>
1222
+ <p class="description" style="font-weight: normal;">
1223
+ <?php $wpforo_synch_table = admin_url( 'admin.php?page=wpforo-usergroups') ?>
1224
+ <?php echo sprintf( __('Forum Usergroups are synched with User Roles based on the %s. When you change this user Role the Usergroup is automatically changed according to that table.', 'wpforo'), '<a href="' . $wpforo_synch_table . '" target="_blank">Role-Usergroup synchronization table</a>'); ?>
1225
+ </p>
1226
+ <?php endif; ?>
1227
+ </th>
1228
+ <td style="padding: 15px 20px 10px 20px; vertical-align: top;">
1229
+ <?php if( wpforo_feature('role-synch') ): ?>
1230
+ <select id="wpforo_usergroup" disabled="disabled">
1231
+ <?php WPF()->usergroup->show_selectbox($groupid); ?>
1232
+ </select>
1233
+ <input type="hidden" name="wpforo_usergroup" value="<?php echo intval($groupid); ?>">
1234
+ &nbsp; <span style="color: green"><?php _e('Role-Usergroup Synchronization is Turned ON!', 'wpforo'); ?></span><br />
1235
+ <p class="description" style="font-weight: normal; font-size: 13px; line-height: 18px;"><?php _e('This user Usergroup is automatically changed according to current Role. If you want to disable Role-Usergroup synchronization and manage Usergroups and User Roles independently, please navigate to <b>Forums > Settings > Features</b> admin page and disable "Role-Usergroup Synchronization" option.', 'wpforo'); ?></p>
1236
+ <?php else: ?>
1237
+ <select id="wpforo_usergroup" name="wpforo_usergroup">
1238
+ <?php WPF()->usergroup->show_selectbox($groupid); ?>
1239
+ </select>
1240
+ <?php endif; ?>
1241
+ </td>
1242
+ </tr>
1243
+ <tr class="form-field">
1244
+ <th scope="row" style="padding: 10px 20px 10px 20px;">
1245
+ <label for="wpforo_usergroup">
1246
+ <?php _e('Forum - Secondary Usergroups', 'wpforo'); ?>
1247
+ </label>
1248
+ </th>
1249
+ <td style="padding: 15px 20px 10px 20px; vertical-align: top;">
1250
+ <?php $usergroups = WPF()->usergroup->get_secondary_usergroups(); ?>
1251
+ <?php if( !empty($usergroups) ): ?>
1252
+ <?php foreach( $usergroups as $usergroup ): ?>
1253
+ <?php if($usergroup['groupid'] == 1 || $usergroup['groupid'] == 4 ) continue; //|| $usergroup['groupid'] == $groupid ?>
1254
+ <label style="min-width: 20%; display: inline-block; padding-bottom: 5px;">
1255
+ <input type="checkbox"
1256
+ name="wpforo_secondary_usergroup[]"
1257
+ value="<?php echo intval($usergroup['groupid']) ?>"
1258
+ <?php echo (!empty($secondary_groups) && in_array($usergroup['groupid'], $secondary_groups)) ? 'checked="checked"' : ''; ?>>&nbsp;
1259
+ <?php echo esc_html($usergroup['name']); ?>
1260
+ </label>
1261
+ <?php endforeach; ?>
1262
+ <?php endif; ?>
1263
+ </td>
1264
+ </tr>
1265
+ <tr class="form-field">
1266
+ <th scope="row" style="padding: 10px 20px 10px 20px;">
1267
+ <label for="wpforo_usertimezone"><?php _e('Forum - User Timezone', 'wpforo'); ?></label>
1268
+ </th>
1269
+ <td style="padding: 15px 20px 10px 20px; vertical-align: top;">
1270
+ <select name="wpforo_usertimezone" id="wpforo_usertimezone">
1271
+ <?php echo wp_timezone_choice($timezone); ?>
1272
+ </select>
1273
+ </td>
1274
+ </tr>
1275
+ <tr>
1276
+ <td colspan="2" style="padding: 5px;"></td>
1277
+ </tr>
1278
+ </table>
1279
+ <?php
1280
  }
1281
  }
1282
  add_action( 'user_new_form', 'wpforo_userform_to_wpuser_html_form' );
1290
 
1291
  function wpforo_do_hook_update_profile($userid){
1292
  if( isset($_POST['wpforo_usergroup']) && $_POST['wpforo_usergroup'] ){
1293
+ if( wpfval($_POST, 'wpforo_secondary_usergroup') ){
1294
+ if( !empty($_POST['wpforo_secondary_usergroup']) ){
1295
+ $secondary_groups = array_map('intval', $_POST['wpforo_secondary_usergroup']);
1296
+ }
1297
+ }
1298
+ $args = array( 'userid' => intval($userid),
1299
+ 'groupid' => intval($_POST['wpforo_usergroup']),
1300
+ 'site' => esc_url($_POST['url']),
1301
+ 'about' => wpforo_kses($_POST['description'], 'user_description'),
1302
+ 'timezone' => ( isset($_POST['wpforo_usertimezone']) ? sanitize_text_field($_POST['wpforo_usertimezone']) : '' ),
1303
+ 'secondary_groups' => ( isset($secondary_groups) ? $secondary_groups : ' ' ) );
1304
+ WPF()->member->update($args);
1305
  }
1306
  WPF()->member->reset($userid);
1307
  }
1310
 
1311
  function wpforo_update_last_login_date($user_login, $user = array()){
1312
  if(empty($user)) return;
1313
+ WPF()->member->update_profile_field( intval($user->ID), 'last_login', current_time( 'mysql', 1 ) );
1314
  }
1315
  add_action('wp_login', 'wpforo_update_last_login_date', 10, 2);
1316
 
1404
  if( in_array($member['user_email'], WPF()->sbscrb->already_sent_emails) ) continue;
1405
 
1406
  if( isset($item['private']) && $item['private'] ){
1407
+ if( !WPF()->perm->forum_can('vp', $item['forumid'], $member['groupid'], false) ) continue;
1408
  }
1409
  if( isset($item['status']) && $item['status'] ){
1410
+ if( !WPF()->perm->forum_can('au', $item['forumid'], $member['groupid'], false) ) continue;
1411
  }
1412
+ if( !WPF()->perm->forum_can('vf', $item['forumid'], $member['groupid'], $member['secondary_groups']) ) continue;
1413
+
1414
 
1415
  $dname = wpforo_make_dname($member['display_name'], $member['user_nicename']);
1416
  $subject = stripslashes(str_replace('[mentioned-user-name]', $dname, $_subject));
1528
  $member = array('display_name' => $subscriber, 'user_email' => $subscriber);
1529
  $unsubscribe_link = '#';
1530
  }
1531
+
1532
+ if( isset($topic['forumid']) && $topic['forumid'] ){
1533
+
1534
+ $subscriber_groupid = ( wpfval($member, 'groupid') ) ? $member['groupid'] : ( wpfval($subscriber, 'userid') ? WPF()->usergroup->get_groupid_by_userid($subscriber['userid']) : 0 );
1535
+ $subscriber_secondary_groups = ( wpfval($member, 'secondary_groups') ) ? $member['secondary_groups'] : ( wpfval($subscriber, 'userid') ? WPF()->usergroup->get_second_groupid_by_userid($subscriber['userid']) : 0 );
1536
+
1537
+ if( isset($topic['private']) && $topic['private'] && isset($subscriber['userid'])
1538
  && ( ( $topic['userid'] && $subscriber['userid'] && $topic['userid'] != $subscriber['userid'] )
1539
  || ( $topic['email'] && $subscriber['user_email'] && $topic['email'] != $subscriber['user_email'] ) ) ){
1540
+ if( !WPF()->perm->forum_can('vp', $topic['forumid'], $subscriber_groupid, false) ){
 
1541
  continue;
1542
  }
1543
  }
1544
  if( isset($topic['status']) && $topic['status'] == 1 && isset($subscriber['userid']) ){
1545
+ if( !WPF()->perm->forum_can('au', $topic['forumid'], $subscriber_groupid, false) ){
 
1546
  continue;
1547
  }
1548
  }
1549
+ if( !WPF()->perm->forum_can('vf', $topic['forumid'], $subscriber_groupid, $subscriber_secondary_groups) ){
1550
+ continue;
1551
+ }
1552
  }
1553
 
1554
  $owner = wpforo_member( $topic );
1571
 
1572
  $subject = WPF()->sbscrb->options['new_topic_notification_email_subject'];
1573
  $message = WPF()->sbscrb->options['new_topic_notification_email_message'];
1574
+ $message_length = apply_filters('wpforo_email_notification_post_body_length', 100);
1575
+
1576
+
1577
  $from_tags = array( "[member_name]", "[forum]", "[unsubscribe_link]", "[topic_title]", "[topic_desc]");
1578
  $to_words = array( sanitize_text_field($member['display_name']),
1579
  '<a href="' . esc_url($forum['url']) . '">' . sanitize_text_field($forum['title']) . '</a>',
1580
  '<br><a target="_blank" href="' . esc_url($unsubscribe_link) . '">' . wpforo_phrase('Unsubscribe', false) . '</a>' ,
1581
  '<a target="_blank" href="' . esc_url($topic['topicurl']) . '">' . sanitize_text_field($topic['title']) . '</a>' ,
1582
+ wpforo_text( wpforo_kses( $topic['body'], 'email'), $message_length, FALSE ) );
1583
 
1584
  $subject = stripslashes(strip_tags(str_replace($from_tags, $to_words, $subject)));
1585
  $message = stripslashes(str_replace($from_tags, $to_words, $message));
1636
  if( in_array($member['user_email'], WPF()->sbscrb->already_sent_emails) ) continue;
1637
 
1638
  if( isset($topic['forumid']) && $topic['forumid'] && isset($subscriber['userid']) ){
1639
+
1640
+ $subscriber_groupid = ( wpfval($member, 'groupid') ) ? $member['groupid'] : ( wpfval($subscriber, 'userid') ? WPF()->usergroup->get_groupid_by_userid($subscriber['userid']) : 0 );
1641
+ $subscriber_secondary_groups = ( wpfval($member, 'secondary_groups') ) ? $member['secondary_groups'] : ( wpfval($subscriber, 'userid') ? WPF()->usergroup->get_second_groupid_by_userid($subscriber['userid']) : 0 );
1642
+
1643
+ if( isset($topic['private']) && $topic['private']
1644
  && ( ( $topic['userid'] && $subscriber['userid'] && $topic['userid'] != $subscriber['userid'] )
1645
  || ( $topic['email'] && $subscriber['user_email'] && $topic['email'] != $subscriber['user_email'] ) ) ){
1646
+ if( !WPF()->perm->forum_can('vp', $topic['forumid'], $subscriber_groupid, false) ){
1647
  continue;
1648
  }
1649
  }
1650
  if( (isset($topic['status']) && $topic['status'] == 1) || (isset($post['status']) && $post['status'] == 1) ){
1651
+ if( !WPF()->perm->forum_can('au', $topic['forumid'], $subscriber_groupid, false) ){
1652
  continue;
1653
  }
1654
  }
1655
+ if( !WPF()->perm->forum_can('vf', $topic['forumid'], $subscriber_groupid, $subscriber_secondary_groups) ){
1656
+ continue;
1657
+ }
1658
  }
1659
 
1660
  ############### Sending Email ##################
1670
 
1671
  $subject = WPF()->sbscrb->options['new_post_notification_email_subject'];
1672
  $message = WPF()->sbscrb->options['new_post_notification_email_message'];
1673
+ $message_length = apply_filters('wpforo_email_notification_post_body_length', 100);
1674
 
1675
  $from_tags = array( "[member_name]", "[topic]", "[unsubscribe_link]", "[reply_title]", "[reply_desc]");
1676
  $to_words = array( sanitize_text_field($member['display_name']),
1677
  '<a href="' . esc_url($post['posturl']) . '">' . sanitize_text_field($topic['title']) . '</a>',
1678
  '<br><a target="_blank" href="' . esc_url($unsubscribe_link) . '">'.wpforo_phrase('Unsubscribe', false).'</a>' ,
1679
  '<a target="_blank" href="' . esc_url($post['posturl']) . '">' . sanitize_text_field($post['title']) . '</a>' ,
1680
+ wpforo_text( wpforo_kses($post['body'], 'email'), $message_length, FALSE ) );
1681
 
1682
  $subject = stripslashes(strip_tags(str_replace($from_tags, $to_words, $subject)));
1683
  $message = stripslashes(str_replace($from_tags, $to_words, $message));
1862
  'href' => admin_url('admin.php?page=wpforo-phrases&action=add'),
1863
  'parent' => 'new-content'
1864
  );
1865
+ $wp_admin_bar->add_node( $args );
1866
+
1867
+ $args = array(
1868
+ 'id' => 'wpforo-home',
1869
+ 'title' => __('Forum Home', 'wpforo'),
1870
+ 'href' => wpforo_home_url(),
1871
+ 'parent' => 'wpf-community'
1872
+ );
1873
  $wp_admin_bar->add_node( $args );
1874
 
1875
  if( WPF()->current_user_groupid == 1 ||
1885
  'href' => admin_url('admin.php?page=wpforo-community')
1886
  );
1887
  $wp_admin_bar->add_node( $args );
1888
+
1889
+ $args = array(
1890
+ 'id' => 'wpforo-dashboard',
1891
+ 'title' => __('Forum Dashboard', 'wpforo'),
1892
+ 'href' => admin_url('admin.php?page=wpforo-community'),
1893
+ 'parent' => 'wpf-community'
1894
+ );
1895
+ $wp_admin_bar->add_node( $args );
1896
+
1897
  }
1898
  if( WPF()->perm->usergroup_can('cf') && WPF()->perm->usergroup_can('ef') && WPF()->perm->usergroup_can('df') ){
1899
  $args = array(
2138
  }
2139
  return $message;
2140
  }
2141
+ add_filter( 'retrieve_password_message', 'wpforo_replace_retrieve_password_message', 10, 4 );
2142
+
2143
+
2144
+ function wpforo_new_user_notification_email_admin($wp_new_user_notification_email_admin, $user, $blogname){
2145
+ $wp_new_user_notification_email_admin['subject'] = str_replace('[blogname]', '['.$blogname.']', WPF()->sbscrb->options['wp_new_user_notification_email_admin_subject']);
2146
+ $wp_new_user_notification_email_admin['message'] = str_replace(
2147
+ array('[blogname]', '[user_login]', '[user_email]'),
2148
+ array($blogname, $user->user_login, $user->user_email),
2149
+ WPF()->sbscrb->options['wp_new_user_notification_email_admin_message']
2150
+ );
2151
+
2152
+ return $wp_new_user_notification_email_admin;
2153
+ }
2154
+ add_filter('wp_new_user_notification_email_admin', 'wpforo_new_user_notification_email_admin', 10, 3);
2155
+
2156
+ function wpforo_new_user_notification_email($wp_new_user_notification_email, $user, $blogname){
2157
+ $set_password_url = '';
2158
+ if( wpforo_feature('resetpass-url') ){
2159
+ if( preg_match('#<\s*https?://[^\r\n\t\s\0]+?wp-login\.php\?action=rp\&key=(?<key>[^\?\&\=\r\n\t\s]+)[^\r\n\t\s\0]+?\s*>#isu', $wp_new_user_notification_email['message'], $match) ){
2160
+ $key = $match['key'];
2161
+ $set_password_url = '<' . wpforo_home_url( '?wpforo=resetpassword&rp_key='.esc_attr( $key ).'&rp_login='.rawurlencode( $user->user_login ) ) . '>';
2162
+ }
2163
+ }elseif( preg_match('#<\s*https?://[^\r\n\t\s\0]+?wp-login\.php\?action=rp[^\r\n\t\s\0]+?\s*>#isu', $wp_new_user_notification_email['message'], $match) ){
2164
+ $set_password_url = $match[0];
2165
+ }
2166
+
2167
+ if( $set_password_url ){
2168
+ $wp_new_user_notification_email['subject'] = str_replace('[blogname]', '['.$blogname.']', WPF()->sbscrb->options['wp_new_user_notification_email_subject']);
2169
+ $wp_new_user_notification_email['message'] = str_replace(
2170
+ array('[user_login]', '[set_password_url]'),
2171
+ array($user->user_login, $set_password_url),
2172
+ WPF()->sbscrb->options['wp_new_user_notification_email_message']
2173
+ );
2174
+ }
2175
+
2176
+ return $wp_new_user_notification_email;
2177
+ }
2178
+ add_filter('wp_new_user_notification_email', 'wpforo_new_user_notification_email', 10, 3);
2179
+
2180
+
2181
+ function wpforo_synch_role( $ug_role = array(), $users = array() ){
2182
+ if( !empty($ug_role) ){
2183
+ $status = array();
2184
+ WPF()->usergroup->set_ug_roles( $ug_role );
2185
+ $usergroups_roles = WPF()->usergroup->get_usergroup_role_relation();
2186
+ if( empty($users) ){
2187
+ foreach( $ug_role as $ug => $role ){
2188
+ $args = array( 'role' => $role );
2189
+ $users = get_users( $args );
2190
+ $array = WPF()->usergroup->build_users_groupid_array( $usergroups_roles, $users );
2191
+ if( wpfval($array, 'group_users') && !empty($array['group_users']) ){
2192
+ $status = WPF()->usergroup->set_users_groupid($array['group_users']);
2193
+ }
2194
+ }
2195
+ }
2196
+ else{
2197
+ $array = WPF()->usergroup->build_users_groupid_array( $usergroups_roles, $users );
2198
+ if( wpfval($array, 'group_users') && !empty($array['group_users']) ){
2199
+ $status = WPF()->usergroup->set_users_groupid($array['group_users']);
2200
+ }
2201
+ }
2202
+ return $status;
2203
+ }
2204
+ }
2205
+
2206
+
2207
+ function wpforo_synch_roles() {
2208
+
2209
+ $status = array(
2210
+ 'progress' => 0,
2211
+ 'error' => 0,
2212
+ 'start' => 0,
2213
+ 'step' => 1,
2214
+ 'left' => 0,
2215
+ 'total' => 0,
2216
+ 'id' => 0
2217
+ );
2218
+
2219
+ $wpforo_synch_roles_data = isset($_POST['wpforo_synch_roles_data']) ? $_POST['wpforo_synch_roles_data'] : '';
2220
+
2221
+ if ($wpforo_synch_roles_data) {
2222
+ parse_str($wpforo_synch_roles_data, $data);
2223
+ check_ajax_referer( 'wpforo_synch_roles', 'checkthis' );
2224
+ $limit = apply_filters('wpforo_synch_roles_step_limit', 50);
2225
+ $success = false;
2226
+ $group_users = array();
2227
+ $user_prime_group = array();
2228
+ $user_second_groups = array();
2229
+ $options = get_option('wpforo-synch-roles');
2230
+ $step = isset($data['wpf-step']) ? intval($data['wpf-step']) : 1;
2231
+ $left = isset($data['wpf-left-users']) ? intval($data['wpf-left-users']) : 0;
2232
+ $id = isset($data['wpf-start-id']) ? intval($data['wpf-start-id']) : 0;
2233
+ $start = isset($data['wpf-start']) ? intval($data['wpf-start']) : 0;
2234
+ $ug_role = isset($data['wpf_synch_roles']) ? $data['wpf_synch_roles'] : array();
2235
+ if( !empty($ug_role) ){
2236
+ /////////////////////////////////////////////////////
2237
+ /// Update Roles of Usergroups in usergroups table
2238
+ WPF()->usergroup->set_ug_roles( $ug_role );
2239
+ /////////////////////////////////////////////////////
2240
+ if( !is_array($options) || $left > 0 ) {
2241
+ $args = array( 'orderby' => 'ID', 'order' => 'ASC', 'offset' => $start, 'number' => $limit );
2242
+ $users = get_users( $args );
2243
+ ////////////////////////////////////////////////////////////////////////////////////
2244
+ /// Builds associative array of Usergroup ID => Users ID array()
2245
+ $ug_users_array = WPF()->usergroup->build_users_groupid_array( $ug_role, $users );
2246
+ ////////////////////////////////////////////////////////////////////////////////////
2247
+ if( wpfval($ug_users_array, 'group_users')) $group_users = $ug_users_array['group_users'];
2248
+ if( wpfval($ug_users_array, 'user_prime_group')) $user_prime_group = $ug_users_array['user_prime_group']; /* to-do */
2249
+ if( wpfval($ug_users_array, 'user_second_groups')) $user_second_groups = $ug_users_array['user_second_groups']; /* to-do */
2250
+ if( !empty($group_users) ){
2251
+ /////////////////////////////////////////////////////////////////
2252
+ /// Updates users Usergroup Ids in profiles table
2253
+ $return = WPF()->usergroup->set_users_groupid( $group_users );
2254
+ /////////////////////////////////////////////////////////////////
2255
+ $success = (wpfval($return, 'success')) ? $return['success'] : $success;
2256
+ $status['error'] = (wpfval($return, 'error')) ? $return['error'] : $status['error'];
2257
+ if( $success ){
2258
+ end($users);
2259
+ $key = key($users);
2260
+ $status['id'] = $users[$key]->ID;
2261
+ $result = count_users();
2262
+ $status['total'] = ( wpfval( $result, 'total_users') ) ? intval($result['total_users']) : 0;
2263
+ $status['start'] = $step * $limit;
2264
+ $status['left'] = ( $status['total'] > $status['start'] ) ? ($status['total'] - $status['start']) : 0;
2265
+ $status['step'] = $step + 1;
2266
+ $progress = ( $status['total'] > $status['start'] ) ? ($status['start'] * 100) / $status['total'] : 100;
2267
+ $status['progress'] = round($progress);
2268
+ if( $progress == 100 ){
2269
+ delete_option( 'wpforo-synch-roles' );
2270
+ }
2271
+ else{
2272
+ update_option('wpforo-synch-roles', $status);
2273
+ }
2274
+ }
2275
+ }
2276
+ else{
2277
+ $status['total'] = 0; $status['start'] = 0; $status['left'] = 0; $status['step'] = 1; $status['progress'] = 100;
2278
+ delete_option( 'wpforo-synch-roles' );
2279
+ }
2280
+ }
2281
+ else{
2282
+ $result = count_users(); $status['total'] = ( wpfval( $result, 'total_users') ) ? intval($result['total_users']) : 0; $status['start'] = $step * $limit; $status['left'] = 0; $status['step'] = 1; $status['progress'] = 100;
2283
+ delete_option( 'wpforo-synch-roles' );
2284
+ }
2285
+ }
2286
+ }
2287
+ wp_die(json_encode($status));
2288
+ }
2289
+ add_action('wp_ajax_wpforo_synch_roles', 'wpforo_synch_roles');
2290
+
2291
+
2292
+ function wpforo_update_usergroup_on_role_change( $userid, $new_role, $old_roles ){
2293
+ if( wpforo_feature('role-synch') ) {
2294
+ $user_ug_id = WPF()->member->get_usergroup( $userid );
2295
+ $role_ug_ids = WPF()->usergroup->get_usergroups_by_role( $new_role );
2296
+ if( !empty($role_ug_ids) && is_array($role_ug_ids) ){
2297
+ if( count($role_ug_ids) > 1 ){
2298
+ $prime_ugid = array_shift($role_ug_ids);
2299
+ if( !in_array($user_ug_id, $role_ug_ids) ){
2300
+ WPF()->member->set_usergroup( $userid, $prime_ugid );
2301
+ WPF()->member->set_usergroups_secondary( $userid, $role_ug_ids );
2302
+ }
2303
+ }
2304
+ else{
2305
+ $groupid = current($role_ug_ids);
2306
+ if( $groupid != $user_ug_id ){
2307
+ WPF()->member->set_usergroup( $userid, $groupid );
2308
+ }
2309
+ }
2310
+ }
2311
+ }
2312
+ }
2313
+ add_action( 'set_user_role', 'wpforo_update_usergroup_on_role_change', 10, 3 );
wpf-includes/wpf-phrases.php CHANGED
@@ -485,7 +485,7 @@ $wpforo_phrases = array(
485
  'Something wrong with profile data.' => __('Something wrong with profile data.', 'wpforo'),
486
  'Subscribe options successfully updated' => __('Subscribe options successfully updated', 'wpforo'),
487
  'Subscribe options successfully updated, but previous value not changed' => __('Subscribe options successfully updated, but previous value not changed', 'wpforo'),
488
- 'Success! Thank you Dear Friend' => __('Success! Thank you Dear Friend', 'wpforo'),
489
  'Success! Thank you. Please check your email and click confirmation link below to complete this step.' => __('Success! Thank you. Please check your email and click confirmation link below to complete this step.', 'wpforo'),
490
  'Successfully updated' => __('Successfully updated', 'wpforo'),
491
  'Successfully voted' => __('Successfully voted', 'wpforo'),
@@ -746,4 +746,52 @@ $wpforo_phrases = array(
746
  'Split' => __('Split', 'wpforo'),
747
  'Move Reply' => __('Move Reply', 'wpforo'),
748
  'This action changes topic URL. Once the topic is moved to other forum the old URL of this topic will no longer be available.' => __('This action changes topic URL. Once the topic is moved to other forum the old URL of this topic will no longer be available.', 'wpforo'),
749
- );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
485
  'Something wrong with profile data.' => __('Something wrong with profile data.', 'wpforo'),
486
  'Subscribe options successfully updated' => __('Subscribe options successfully updated', 'wpforo'),
487
  'Subscribe options successfully updated, but previous value not changed' => __('Subscribe options successfully updated, but previous value not changed', 'wpforo'),
488
+ 'Success!' => __('Success!', 'wpforo'),
489
  'Success! Thank you. Please check your email and click confirmation link below to complete this step.' => __('Success! Thank you. Please check your email and click confirmation link below to complete this step.', 'wpforo'),
490
  'Successfully updated' => __('Successfully updated', 'wpforo'),
491
  'Successfully voted' => __('Successfully voted', 'wpforo'),
746
  'Split' => __('Split', 'wpforo'),
747
  'Move Reply' => __('Move Reply', 'wpforo'),
748
  'This action changes topic URL. Once the topic is moved to other forum the old URL of this topic will no longer be available.' => __('This action changes topic URL. Once the topic is moved to other forum the old URL of this topic will no longer be available.', 'wpforo'),
749
+
750
+ //1.5.0
751
+ 'No data submitted' => __('No data submitted', 'wpforo'),
752
+ 'User profile fields not found' => __('User profile fields not found', 'wpforo'),
753
+ 'field is required' => __('field is required', 'wpforo'),
754
+ 'field value must be at least %d' => __('field value must be at least %d', 'wpforo'),
755
+ 'field value cannot be greater than %d' => __('field value cannot be greater than %d', 'wpforo'),
756
+ 'field length must be at least %d characters' => __('field length must be at least %d characters', 'wpforo'),
757
+ 'field length cannot be greater than %d characters' => __('field length can not be greater than %d characters', 'wpforo'),
758
+ 'field value is not a valid URL' => __('field value is not a valid URL', 'wpforo'),
759
+ 'file type is not detected' => __('file type is not detected', 'wpforo'),
760
+ 'file type %s is not allowed' => __('file type %s is not allowed', 'wpforo'),
761
+ 'file is too large' => __('file is too large', 'wpforo'),
762
+ 'Success! Please check your mail for confirmation.' => __('Success! Please check your mail for confirmation.', 'wpforo'),
763
+ 'Username length must be between %d characters and %d characters.' => __('Username length must be between %d characters and %d characters.', 'wpforo'),
764
+ 'User registration is disabled.' => __('User registration is disabled.', 'wpforo'),
765
+ 'Avatar image is too big maximum allowed size is 2MB' => __('Avatar image is too big maximum allowed size is 2MB', 'wpforo'),
766
+ 'One of the selected Usergroups cannot be set as Secondary' => __('One of the selected Usergroups cannot be set as Secondary', 'wpforo'),
767
+ 'The selected Usergroup is not found in allowed list' => __('The selected Usergroup is not found in allowed list', 'wpforo'),
768
+ 'The selected Usergroup cannot be set' => __('The selected Usergroup cannot be set', 'wpforo'),
769
+ 'Admin and Moderator Usergroups are not permitted' => __('Admin and Moderator Usergroups are not permitted', 'wpforo'),
770
+ 'You have no permission to edit Usergroup field' => __('You have no permission to edit Usergroup field', 'wpforo'),
771
+ 'This nickname is already in use. Please insert another.' => __('This nickname is already in use. Please insert another.', 'wpforo'),
772
+ 'Nickname validation failed' => __('Nickname validation failed', 'wpforo'),
773
+ 'Numerical nicknames are not allowed. Please insert another.' => __('Numerical nicknames are not allowed. Please insert another.', 'wpforo'),
774
+ 'Maximum allowed file size is %s MB' => __('Maximum allowed file size is %s MB', 'wpforo'),
775
+ 'You are not allowed to attach this file type' => __('You are not allowed to attach this file type', 'wpforo'),
776
+ 'This email address is already registered. Please insert another' => __('This email address is already registered. Please insert another', 'wpforo'),
777
+ 'Allowed file types: %s' => __('Allowed file types: %s', 'wpforo'),
778
+ 'Form name not found' => __('Form name not found', 'wpforo'),
779
+ 'Form template not found' => __('Form template not found', 'wpforo'),
780
+ 'Profile updated successfully' => __('Profile updated successfully', 'wpforo'),
781
+ 'User data update failed' => __('User data update failed', 'wpforo'),
782
+ 'User profile update failed' => __('User profile update failed', 'wpforo'),
783
+ 'User custom field update failed' => __('User custom field update failed', 'wpforo'),
784
+ 'Sorry, there was an error uploading attached file' => __('Sorry, there was an error uploading attached file', 'wpforo'),
785
+ 'Edit Topic' => __('Edit Topic', 'wpforo'),
786
+ 'This topic was modified %s by %s' => __('This topic was modified %s by %s', 'wpforo'),
787
+ 'Edit Post' => __('Edit Post', 'wpforo'),
788
+ 'This post was modified %s by %s' => __('This post was modified %s by %s', 'wpforo'),
789
+ 'Topics Started' => __('Topics Started', 'wpforo'),
790
+ 'Replies Created' => __('Replies Created', 'wpforo'),
791
+ 'Liked Posts' => __('Liked Posts', 'wpforo'),
792
+ 'Topic link' => __('Topic link', 'wpforo'),
793
+ 'Forum Topics Started' => __('Forum Topics Started', 'wpforo'),
794
+ 'Forum Replies Created' => __('Forum Replies Created', 'wpforo'),
795
+ 'Liked Forum Posts' => __('Liked Forum Posts', 'wpforo'),
796
+ 'Forum Subscriptions' => __('Forum Subscriptions', 'wpforo'),
797
+ );
wpf-languages/wpforo.pot CHANGED
@@ -5,7 +5,7 @@ msgid ""
5
  msgstr ""
6
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
7
  "Project-Id-Version: Forum - wpForo\n"
8
- "POT-Creation-Date: 2018-04-30 17:15+0400\n"
9
  "PO-Revision-Date: 2016-06-28 21:09+0400\n"
10
  "Last-Translator: \n"
11
  "Language-Team: \n"
@@ -69,52 +69,54 @@ msgstr ""
69
  msgid "Dashboard"
70
  msgstr ""
71
 
72
- #: wpf-admin/admin.php:24 wpf-admin/admin.php:26 wpf-admin/dashboard.php:136
73
  #: wpf-admin/options-tabs/api.php:83 wpf-admin/options-tabs/styles.php:16
74
- #: wpf-admin/options.php:15 wpf-includes/integration/buddypress.php:11
 
75
  #: wpf-includes/integration/buddypress.php:57
76
- #: wpf-includes/integration/buddypress.php:132 wpf-includes/wpf-hooks.php:1822
77
  #: wpf-includes/wpf-phrases.php:123
78
  msgid "Forums"
79
  msgstr ""
80
 
81
  #: wpf-admin/admin.php:27 wpf-includes/wpf-hooks.php:22
82
- #: wpf-includes/wpf-hooks.php:1838
83
  msgid "Settings"
84
  msgstr ""
85
 
86
- #: wpf-admin/admin.php:28 wpf-includes/wpf-hooks.php:1847
87
  #: wpf-includes/wpf-phrases.php:729
88
  msgid "Tools"
89
  msgstr ""
90
 
91
- #: wpf-admin/admin.php:29 wpf-includes/wpf-hooks.php:1856
92
  msgid "Moderation"
93
  msgstr ""
94
 
95
- #: wpf-admin/admin.php:30 wpf-admin/dashboard.php:148 wpf-admin/member.php:10
96
- #: wpf-admin/options.php:18 wpf-includes/wpf-hooks.php:1865
 
97
  #: wpf-includes/wpf-phrases.php:178
98
  msgid "Members"
99
  msgstr ""
100
 
101
- #: wpf-admin/admin.php:31 wpf-admin/usergroup.php:8
102
- #: wpf-includes/wpf-hooks.php:1874
103
  msgid "Usergroups"
104
  msgstr ""
105
 
106
- #: wpf-admin/admin.php:32 wpf-includes/wpf-hooks.php:1890
107
  #: wpf-includes/wpf-phrases.php:604
108
  msgid "Phrases"
109
  msgstr ""
110
 
111
- #: wpf-admin/admin.php:33 wpf-includes/wpf-hooks.php:1906
112
  #: wpf-includes/wpf-phrases.php:605
113
  msgid "Themes"
114
  msgstr ""
115
 
116
  #: wpf-admin/admin.php:34 wpf-admin/options.php:24
117
- #: wpf-includes/wpf-hooks.php:1915 wpf-includes/wpf-phrases.php:25
118
  msgid "Addons"
119
  msgstr ""
120
 
@@ -171,94 +173,188 @@ msgstr ""
171
  msgid "Server Information"
172
  msgstr ""
173
 
174
- #: wpf-admin/dashboard.php:109 wpf-includes/wpf-phrases.php:46
175
  msgid "Available"
176
  msgstr ""
177
 
178
- #: wpf-admin/dashboard.php:109 wpf-includes/wpf-phrases.php:208
179
- msgid "Not available"
 
 
180
  msgstr ""
181
 
182
- #: wpf-admin/dashboard.php:130 wpf-includes/wpf-phrases.php:49
183
  msgid "Board Statistic"
184
  msgstr ""
185
 
186
- #: wpf-admin/dashboard.php:140 wpf-admin/options-tabs/posts.php:17
187
- #: wpf-admin/options-tabs/styles.php:22 wpf-includes/class-forums.php:663
188
  #: wpf-includes/wpf-phrases.php:338
189
  msgid "Topics"
190
  msgstr ""
191
 
192
- #: wpf-admin/dashboard.php:144 wpf-admin/options-tabs/posts.php:18
193
- #: wpf-includes/class-forums.php:663 wpf-includes/wpf-phrases.php:232
194
  msgid "Posts"
195
  msgstr ""
196
 
197
- #: wpf-admin/dashboard.php:152 wpf-includes/wpf-phrases.php:179
198
  msgid "Members Online"
199
  msgstr ""
200
 
201
- #: wpf-admin/dashboard.php:162
202
  msgid "Avatars Size"
203
  msgstr ""
204
 
205
- #: wpf-admin/dashboard.php:166
206
  msgid "Default Attachments Size"
207
  msgstr ""
208
 
209
- #: wpf-admin/dashboard.php:172
210
  msgid "Advanced Attachments"
211
  msgstr ""
212
 
213
- #: wpf-admin/dashboard.php:173
214
  msgid "file(s)"
215
  msgstr ""
216
 
217
- #: wpf-admin/dashboard.php:176
218
  msgid "Advanced Attachments Size"
219
  msgstr ""
220
 
221
- #: wpf-admin/dashboard.php:181
222
  msgid "Total Size"
223
  msgstr ""
224
 
225
- #: wpf-admin/dashboard.php:189 wpf-includes/wpf-phrases.php:615
226
  msgid "Forum Maintenance"
227
  msgstr ""
228
 
229
- #: wpf-admin/dashboard.php:191
230
  msgid ""
231
  "This process may take a few seconds or dozens of minutes, please be patient "
232
  "and don't close this page. If you got 500 Server Error please don't worry, "
233
  "the data updating process is still working in MySQL server."
234
  msgstr ""
235
 
236
- #: wpf-admin/dashboard.php:200
237
  msgid "Delete All Caches"
238
  msgstr ""
239
 
240
- #: wpf-admin/dashboard.php:201 wpf-includes/wpf-phrases.php:617
241
  msgid "Update Forums Statistic"
242
  msgstr ""
243
 
244
- #: wpf-admin/dashboard.php:202 wpf-includes/wpf-phrases.php:618
 
 
 
 
245
  msgid "Update Users Statistic"
246
  msgstr ""
247
 
248
- #: wpf-admin/dashboard.php:203 wpf-includes/wpf-phrases.php:619
249
  msgid "Delete Phrase Cache"
250
  msgstr ""
251
 
252
- #: wpf-admin/dashboard.php:204 wpf-includes/wpf-phrases.php:640
253
  msgid "Delete User Cache"
254
  msgstr ""
255
 
256
- #: wpf-admin/forum.php:13 wpf-includes/functions.php:791
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
257
  #: wpf-includes/wpf-phrases.php:301
258
  msgid "Show on screen"
259
  msgstr ""
260
 
261
- #: wpf-admin/forum.php:15 wpf-admin/forum.php:129
262
  #: wpf-includes/wpf-phrases.php:113
263
  msgid "Forum Options"
264
  msgstr ""
@@ -283,7 +379,7 @@ msgstr ""
283
  msgid "Number of Columns"
284
  msgstr ""
285
 
286
- #: wpf-admin/forum.php:32 wpf-includes/functions.php:805
287
  #: wpf-includes/wpf-phrases.php:274
288
  msgid "Screen Options"
289
  msgstr ""
@@ -292,27 +388,51 @@ msgstr ""
292
  msgid "Categories and Forums"
293
  msgstr ""
294
 
295
- #: wpf-admin/forum.php:44 wpf-admin/options-tabs/general.php:75
296
  #: wpf-admin/themes.php:10 wpf-admin/usergroup.php:8
297
  #: wpf-includes/wpf-phrases.php:20
298
  msgid "Add New"
299
  msgstr ""
300
 
301
- #: wpf-admin/forum.php:55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
302
  msgid "Important Tips"
303
  msgstr ""
304
 
305
- #: wpf-admin/forum.php:56 wpf-includes/wpf-phrases.php:225
306
  msgid "Please drag and drop forum panels to set parent-child hierarchy."
307
  msgstr ""
308
 
309
- #: wpf-admin/forum.php:57
310
  msgid ""
311
  "If a category (blue panels) does not have forums (grey panels) it will not "
312
  "be displayed on front-end. Each category should contain at least one forum."
313
  msgstr ""
314
 
315
- #: wpf-admin/forum.php:58
316
  msgid ""
317
  "Forums can be displayed with different layouts (Extended, Simplified, Q&A), "
318
  "just edit the top (blue panels) category and set the layout you want. Child "
@@ -320,116 +440,120 @@ msgid ""
320
  "have a different layout."
321
  msgstr ""
322
 
323
- #: wpf-admin/forum.php:74 wpf-includes/wpf-phrases.php:272
324
  msgid "Save forums order and hierarchy"
325
  msgstr ""
326
 
327
- #: wpf-admin/forum.php:111 wpf-includes/wpf-phrases.php:87
328
  msgid "Enter forum title here"
329
  msgstr ""
330
 
331
- #: wpf-admin/forum.php:116 wpf-includes/wpf-phrases.php:86
332
  msgid "Enter description here . . ."
333
  msgstr ""
334
 
335
- #: wpf-admin/forum.php:117 wpf-includes/wpf-phrases.php:329
336
  msgid ""
337
  "This is a forum description. This content will be displayed under forum "
338
  "title on the forum list."
339
  msgstr ""
340
 
341
- #: wpf-admin/forum.php:132 wpf-includes/wpf-phrases.php:221
342
  msgid "Parent Forum"
343
  msgstr ""
344
 
345
- #: wpf-admin/forum.php:135 wpf-includes/wpf-phrases.php:204
346
  msgid "No parent"
347
  msgstr ""
348
 
349
- #: wpf-admin/forum.php:140 wpf-includes/wpf-phrases.php:346
350
  msgid "Use as Category"
351
  msgstr ""
352
 
353
- #: wpf-admin/forum.php:142 wpf-includes/wpf-phrases.php:52
354
  msgid "Category Layout"
355
  msgstr ""
356
 
357
- #: wpf-admin/forum.php:150 wpf-includes/wpf-phrases.php:202
358
  msgid "No layout found."
359
  msgstr ""
360
 
361
- #: wpf-admin/forum.php:159 wpf-admin/forum.php:166
362
  #: wpf-includes/wpf-phrases.php:234
363
  msgid "Publish"
364
  msgstr ""
365
 
366
- #: wpf-admin/forum.php:163 wpf-includes/wpf-phrases.php:37
367
  msgid "Are you sure you want to delete this forum?"
368
  msgstr ""
369
 
370
- #: wpf-admin/forum.php:163 wpf-admin/themes.php:73
371
- #: wpf-admin/tools-tabs/antispam.php:302 wpf-admin/usergroup.php:36
372
- #: wpf-admin/usergroup.php:212 wpf-includes/wpf-hooks.php:1143
373
  #: wpf-includes/wpf-phrases.php:66
374
  msgid "Delete"
375
  msgstr ""
376
 
377
- #: wpf-admin/forum.php:164 wpf-admin/usergroup.php:38
378
- #: wpf-includes/class-forums.php:669 wpf-includes/wpf-phrases.php:355
379
  msgid "View"
380
  msgstr ""
381
 
382
- #: wpf-admin/forum.php:191 wpf-includes/wpf-phrases.php:118
 
 
 
 
383
  msgid "Forum Slug"
384
  msgstr ""
385
 
386
- #: wpf-admin/forum.php:194 wpf-includes/wpf-phrases.php:322
387
  msgid ""
388
  "The \"slug\" is the URL-friendly version of the name. It is usually all "
389
  "lowercase and contains only letters, numbers, and hyphens."
390
  msgstr ""
391
 
392
- #: wpf-admin/forum.php:200
393
  msgid "Forum Icon"
394
  msgstr ""
395
 
396
- #: wpf-admin/forum.php:203
397
  msgid "Font-awesome Icon"
398
  msgstr ""
399
 
400
- #: wpf-admin/forum.php:205
401
  msgid "You can find all icons"
402
  msgstr ""
403
 
404
- #: wpf-admin/forum.php:205
405
  msgid "here"
406
  msgstr ""
407
 
408
- #: wpf-admin/forum.php:205
409
  msgid ""
410
  "Make sure you insert a class of font-awesome icon, it should start with fa- "
411
  "prefix like &quot;fas fa-comments&quot;."
412
  msgstr ""
413
 
414
- #: wpf-admin/forum.php:212 wpf-includes/wpf-phrases.php:116
415
  msgid "Forum SEO"
416
  msgstr ""
417
 
418
- #: wpf-admin/forum.php:215 wpf-includes/wpf-phrases.php:184
419
  msgid "Meta Description"
420
  msgstr ""
421
 
422
- #: wpf-admin/forum.php:244 wpf-includes/wpf-phrases.php:328
423
  msgid "This action will also delete all sub-forums, topics and replies."
424
  msgstr ""
425
 
426
- #: wpf-admin/forum.php:252 wpf-includes/wpf-phrases.php:137
427
  msgid ""
428
  "If you want to delete this forum and keep its sub-forums, topics and "
429
  "replies, please select a new target forum in dropdown below"
430
  msgstr ""
431
 
432
- #: wpf-admin/forum.php:261 wpf-includes/wpf-phrases.php:26
433
  msgid ""
434
  "All sub-forums, topics and replies will be attached to selected forum. "
435
  "Layout will be inherited from this forum."
@@ -443,60 +567,68 @@ msgstr ""
443
  msgid "Add New Forum Access"
444
  msgstr ""
445
 
446
- #: wpf-admin/options-tabs/accesses.php:18 wpf-includes/wpf-phrases.php:15
447
  msgid "Access names"
448
  msgstr ""
449
 
450
- #: wpf-admin/options-tabs/accesses.php:31
451
- #: wpf-admin/options-tabs/accesses.php:32
452
- #: wpf-admin/options-tabs/accesses.php:33
 
 
 
 
 
 
 
 
453
  msgid "This access is usually used for "
454
  msgstr ""
455
 
456
- #: wpf-admin/options-tabs/accesses.php:31
457
  msgid "Guests"
458
  msgstr ""
459
 
460
- #: wpf-admin/options-tabs/accesses.php:31
461
- #: wpf-admin/options-tabs/accesses.php:32
462
- #: wpf-admin/options-tabs/accesses.php:33
463
  msgid "usergroup"
464
  msgstr ""
465
 
466
- #: wpf-admin/options-tabs/accesses.php:32 wpf-includes/wpf-phrases.php:627
467
  msgid "Registered"
468
  msgstr ""
469
 
470
- #: wpf-admin/options-tabs/accesses.php:33 wpf-includes/wpf-phrases.php:625
471
  msgid "Admin"
472
  msgstr ""
473
 
474
- #: wpf-admin/options-tabs/accesses.php:37 wpf-includes/class-forums.php:665
475
- #: wpf-includes/functions.php:601 wpf-includes/wpf-phrases.php:381
476
  msgid "edit"
477
  msgstr ""
478
 
479
- #: wpf-admin/options-tabs/accesses.php:39 wpf-includes/wpf-phrases.php:39
480
  msgid ""
481
  "Are you sure you want to remove this access set? Usergroups which attached "
482
  "to this access will lost all forum permissions."
483
  msgstr ""
484
 
485
- #: wpf-admin/options-tabs/accesses.php:39 wpf-includes/class-forums.php:667
486
- #: wpf-includes/functions.php:619 wpf-includes/functions.php:629
487
  #: wpf-includes/wpf-phrases.php:380
488
  msgid "delete"
489
  msgstr ""
490
 
491
- #: wpf-admin/options-tabs/accesses.php:54 wpf-includes/wpf-phrases.php:14
492
  msgid "Access name"
493
  msgstr ""
494
 
495
- #: wpf-admin/options-tabs/accesses.php:73 wpf-includes/wpf-phrases.php:270
496
  msgid "Save"
497
  msgstr ""
498
 
499
- #: wpf-admin/options-tabs/accesses.php:73 wpf-includes/wpf-phrases.php:343
500
  msgid "Update"
501
  msgstr ""
502
 
@@ -534,7 +666,7 @@ msgstr ""
534
  #: wpf-admin/options-tabs/api.php:37 wpf-admin/options-tabs/api.php:49
535
  #: wpf-admin/options-tabs/api.php:60 wpf-admin/options-tabs/api.php:71
536
  #: wpf-admin/options-tabs/api.php:140 wpf-admin/options-tabs/api.php:147
537
- #: wpf-admin/options-tabs/members.php:87 wpf-admin/tools-tabs/legal.php:48
538
  #: wpf-admin/tools-tabs/legal.php:60 wpf-admin/tools-tabs/legal.php:82
539
  #: wpf-admin/tools-tabs/legal.php:117 wpf-admin/tools-tabs/legal.php:129
540
  #: wpf-admin/tools-tabs/legal.php:148
@@ -544,7 +676,7 @@ msgstr ""
544
  #: wpf-admin/options-tabs/api.php:38 wpf-admin/options-tabs/api.php:50
545
  #: wpf-admin/options-tabs/api.php:61 wpf-admin/options-tabs/api.php:72
546
  #: wpf-admin/options-tabs/api.php:141 wpf-admin/options-tabs/api.php:148
547
- #: wpf-admin/options-tabs/members.php:88 wpf-admin/tools-tabs/legal.php:49
548
  #: wpf-admin/tools-tabs/legal.php:61 wpf-admin/tools-tabs/legal.php:83
549
  #: wpf-admin/tools-tabs/legal.php:118 wpf-admin/tools-tabs/legal.php:130
550
  #: wpf-admin/tools-tabs/legal.php:149
@@ -686,11 +818,11 @@ msgid ""
686
  msgstr ""
687
 
688
  #: wpf-admin/options-tabs/api.php:245 wpf-admin/options-tabs/emails.php:132
689
- #: wpf-admin/options-tabs/features.php:85 wpf-admin/options-tabs/forums.php:16
690
- #: wpf-admin/options-tabs/general.php:82 wpf-admin/options-tabs/members.php:174
691
  #: wpf-admin/options-tabs/posts.php:88 wpf-admin/options-tabs/styles.php:93
692
  #: wpf-admin/tools-tabs/antispam.php:343 wpf-admin/tools-tabs/cleanup.php:49
693
- #: wpf-admin/tools-tabs/legal.php:179 wpf-admin/tools-tabs/misc.php:37
694
  #: wpf-includes/wpf-phrases.php:344
695
  msgid "Update Options"
696
  msgstr ""
@@ -724,7 +856,7 @@ msgid ""
724
  msgstr ""
725
 
726
  #: wpf-admin/options-tabs/emails.php:33 wpf-admin/options-tabs/emails.php:45
727
- #: wpf-admin/options-tabs/emails.php:116 wpf-admin/options-tabs/features.php:73
728
  #: wpf-admin/tools-tabs/antispam.php:31 wpf-admin/tools-tabs/antispam.php:40
729
  #: wpf-admin/tools-tabs/antispam.php:49 wpf-admin/tools-tabs/antispam.php:150
730
  #: wpf-admin/tools-tabs/antispam.php:159 wpf-admin/tools-tabs/antispam.php:169
@@ -736,7 +868,7 @@ msgid "Yes"
736
  msgstr ""
737
 
738
  #: wpf-admin/options-tabs/emails.php:34 wpf-admin/options-tabs/emails.php:46
739
- #: wpf-admin/options-tabs/emails.php:117 wpf-admin/options-tabs/features.php:75
740
  #: wpf-admin/tools-tabs/antispam.php:32 wpf-admin/tools-tabs/antispam.php:41
741
  #: wpf-admin/tools-tabs/antispam.php:50 wpf-admin/tools-tabs/antispam.php:151
742
  #: wpf-admin/tools-tabs/antispam.php:160 wpf-admin/tools-tabs/antispam.php:170
@@ -1005,88 +1137,129 @@ msgid "Replace Forum Profile with BuddyPress Profile"
1005
  msgstr ""
1006
 
1007
  #: wpf-admin/options-tabs/features.php:43
 
1008
  msgid "Replaces wpForo Member Profile page with BuddyPress Profile Page."
1009
  msgstr ""
1010
 
1011
- #: wpf-admin/options-tabs/features.php:44 wpf-includes/wpf-phrases.php:82
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1012
  msgid "Enable wpForo Font-Awesome Lib"
1013
  msgstr ""
1014
 
1015
- #: wpf-admin/options-tabs/features.php:45 wpf-includes/wpf-phrases.php:85
1016
  msgid "Enable Output Buffer"
1017
  msgstr ""
1018
 
1019
- #: wpf-admin/options-tabs/features.php:45 wpf-includes/wpf-phrases.php:330
1020
  msgid ""
1021
  "This feature is useful if you're adding content before or after [wpforo] "
1022
  "shortcode in page content. Also it useful if forum is loaded before website "
1023
  "header, on top of the front-end."
1024
  msgstr ""
1025
 
1026
- #: wpf-admin/options-tabs/features.php:46
1027
  msgid "Enable WordPress Date/Time Format"
1028
  msgstr ""
1029
 
1030
- #: wpf-admin/options-tabs/features.php:46 wpf-includes/wpf-phrases.php:602
1031
  msgid ""
1032
  "You can manage WordPress date and time format in WordPress Settings > "
1033
  "General admin page."
1034
  msgstr ""
1035
 
1036
- #: wpf-admin/options-tabs/features.php:47 wpf-includes/wpf-phrases.php:613
1037
  msgid "Enable Subscription Confirmation"
1038
  msgstr ""
1039
 
1040
- #: wpf-admin/options-tabs/features.php:47 wpf-includes/wpf-phrases.php:614
1041
  msgid "Forum and Topic subscription with double opt-in/confirmation system."
1042
  msgstr ""
1043
 
1044
- #: wpf-admin/options-tabs/features.php:48
1045
  msgid "Topic subscription option on post editor"
1046
  msgstr ""
1047
 
1048
- #: wpf-admin/options-tabs/features.php:48
1049
  msgid ""
1050
  "This option adds topic subscription checkbox next to new topic and post "
1051
  "submit button."
1052
  msgstr ""
1053
 
1054
- #: wpf-admin/options-tabs/features.php:49
1055
  msgid "Topic subscription option on post editor - checked/enabled"
1056
  msgstr ""
1057
 
1058
- #: wpf-admin/options-tabs/features.php:49
1059
  msgid ""
1060
  "Enable this option if you want the topic subscription checkbox to be checked "
1061
  "by default."
1062
  msgstr ""
1063
 
1064
- #: wpf-admin/options-tabs/features.php:50 wpf-includes/wpf-phrases.php:641
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1065
  msgid "Insert Forum Attachments to Media Library"
1066
  msgstr ""
1067
 
1068
- #: wpf-admin/options-tabs/features.php:50 wpf-includes/wpf-phrases.php:642
1069
  msgid ""
1070
  "Enable this option to be able manage forum attachments in Dashboard > Media "
1071
  "> Library admin page."
1072
  msgstr ""
1073
 
1074
- #: wpf-admin/options-tabs/features.php:51 wpf-includes/wpf-phrases.php:606
1075
  msgid "Enable Debug Mode"
1076
  msgstr ""
1077
 
1078
- #: wpf-admin/options-tabs/features.php:51 wpf-includes/wpf-phrases.php:607
1079
  msgid ""
1080
  "If you got some issue with wpForo, please enable this option before asking "
1081
  "for support, this outputs hidden important information to help us debug your "
1082
  "issue."
1083
  msgstr ""
1084
 
1085
- #: wpf-admin/options-tabs/features.php:52 wpf-includes/wpf-phrases.php:134
1086
  msgid "Help wpForo to grow, show plugin info"
1087
  msgstr ""
1088
 
1089
- #: wpf-admin/options-tabs/features.php:52 wpf-includes/wpf-phrases.php:226
1090
  msgid ""
1091
  "Please enable this option to help wpForo get more popularity as your thank "
1092
  "to the hard work we do for you totally free. This option adds a very small "
@@ -1094,16 +1267,16 @@ msgid ""
1094
  "of forum solution you use."
1095
  msgstr ""
1096
 
1097
- #: wpf-admin/options-tabs/features.php:70
1098
  msgid "Sitewide"
1099
  msgstr ""
1100
 
1101
- #: wpf-admin/options-tabs/features.php:71 wpf-includes/wpf-phrases.php:101
1102
- #: wpforo.php:198
1103
  msgid "Forum"
1104
  msgstr ""
1105
 
1106
- #: wpf-admin/options-tabs/features.php:76
1107
  msgid "Thank you!"
1108
  msgstr ""
1109
 
@@ -1111,59 +1284,70 @@ msgstr ""
1111
  msgid "Forum Base URL"
1112
  msgstr ""
1113
 
1114
- #: wpf-admin/options-tabs/general.php:24 wpf-includes/wpf-phrases.php:651
 
 
 
 
 
 
 
 
 
 
 
1115
  msgid "Turn WordPress to wpForo"
1116
  msgstr ""
1117
 
1118
- #: wpf-admin/options-tabs/general.php:25
1119
  msgid ""
1120
  "This option will disable WordPress on front-end. Only forum pages and "
1121
  "excluded post/pages will be available. wpForo will look like as a stand-"
1122
  "alone forum."
1123
  msgstr ""
1124
 
1125
- #: wpf-admin/options-tabs/general.php:28
1126
  msgid "Exclude page URLs"
1127
  msgstr ""
1128
 
1129
- #: wpf-admin/options-tabs/general.php:28
1130
  msgid "one URL per line"
1131
  msgstr ""
1132
 
1133
- #: wpf-admin/options-tabs/general.php:38
1134
  msgid "Visit Forum"
1135
  msgstr ""
1136
 
1137
- #: wpf-admin/options-tabs/general.php:41
1138
  msgid ""
1139
  "wpForo PageID doesn't exist. Forums will not be loaded, please read this"
1140
  msgstr ""
1141
 
1142
- #: wpf-admin/options-tabs/general.php:41
1143
  msgid "support topic"
1144
  msgstr ""
1145
 
1146
- #: wpf-admin/options-tabs/general.php:43
1147
  msgid "Forum Page ID"
1148
  msgstr ""
1149
 
1150
- #: wpf-admin/options-tabs/general.php:48 wpf-includes/wpf-phrases.php:121
1151
  msgid "Forum Title"
1152
  msgstr ""
1153
 
1154
- #: wpf-admin/options-tabs/general.php:52 wpf-includes/wpf-phrases.php:108
1155
  msgid "Forum Description"
1156
  msgstr ""
1157
 
1158
- #: wpf-admin/options-tabs/general.php:57 wpf-includes/wpf-phrases.php:64
1159
  msgid "Dashboard Menu Position"
1160
  msgstr ""
1161
 
1162
- #: wpf-admin/options-tabs/general.php:58 wpf-includes/wpf-phrases.php:323
1163
  msgid "The position in the menu order wpForo should appear."
1164
  msgstr ""
1165
 
1166
- #: wpf-admin/options-tabs/general.php:59 wpf-includes/wpf-phrases.php:348
1167
  msgid ""
1168
  "Use greater than 5 - below Posts, 10 - below Media, 15 - below Links, 20 - "
1169
  "below Pages, 25 - below comments, 60 - below first separator, 65 - below "
@@ -1171,15 +1355,15 @@ msgid ""
1171
  "below second separator"
1172
  msgstr ""
1173
 
1174
- #: wpf-admin/options-tabs/general.php:63
1175
  msgid "More info"
1176
  msgstr ""
1177
 
1178
- #: wpf-admin/options-tabs/general.php:68 wpf-includes/wpf-phrases.php:110
1179
- msgid "Forum Language"
1180
  msgstr ""
1181
 
1182
- #: wpf-admin/options-tabs/general.php:69
1183
  msgid ""
1184
  "This option is only related to XML language files. You should upload a "
1185
  "translation XML file to have a new language option in this drop-down. If you "
@@ -1187,11 +1371,11 @@ msgid ""
1187
  "Dashboard > Settings admin page to load according translation for wpForo."
1188
  msgstr ""
1189
 
1190
- #: wpf-admin/options-tabs/general.php:94 wpf-includes/wpf-phrases.php:144
1191
  msgid "Language XML file"
1192
  msgstr ""
1193
 
1194
- #: wpf-admin/options-tabs/general.php:103 wpf-includes/wpf-phrases.php:22
1195
  msgid "Add New Language"
1196
  msgstr ""
1197
 
@@ -1205,27 +1389,31 @@ msgstr ""
1205
  msgid "minutes"
1206
  msgstr ""
1207
 
1208
- #: wpf-admin/options-tabs/members.php:20 wpf-includes/wpf-phrases.php:180
 
 
 
 
1209
  msgid "Members URL structure"
1210
  msgstr ""
1211
 
1212
- #: wpf-admin/options-tabs/members.php:29 wpf-includes/wpf-phrases.php:701
1213
  msgid "Members Search Type"
1214
  msgstr ""
1215
 
1216
- #: wpf-admin/options-tabs/members.php:32 wpf-includes/wpf-phrases.php:275
1217
  msgid "Search"
1218
  msgstr ""
1219
 
1220
- #: wpf-admin/options-tabs/members.php:33
1221
  msgid "Filter"
1222
  msgstr ""
1223
 
1224
- #: wpf-admin/options-tabs/members.php:39 wpf-includes/wpf-phrases.php:62
1225
  msgid "Custom Authorization URLs"
1226
  msgstr ""
1227
 
1228
- #: wpf-admin/options-tabs/members.php:41
1229
  msgid ""
1230
  "Use this option only if you have set other pages for authorization. \n"
1231
  " wpForo doesn't change its own URLs, these options "
@@ -1234,126 +1422,126 @@ msgid ""
1234
  "Member plugin you can set these values:"
1235
  msgstr ""
1236
 
1237
- #: wpf-admin/options-tabs/members.php:44 wpf-admin/options-tabs/members.php:50
1238
  #: wpf-includes/wpf-phrases.php:162
1239
  msgid "Login URL"
1240
  msgstr ""
1241
 
1242
- #: wpf-admin/options-tabs/members.php:45 wpf-admin/options-tabs/members.php:51
1243
  #: wpf-includes/wpf-phrases.php:252
1244
  msgid "Register URL"
1245
  msgstr ""
1246
 
1247
- #: wpf-admin/options-tabs/members.php:52 wpf-includes/wpf-phrases.php:164
1248
  msgid "Lost Password URL"
1249
  msgstr ""
1250
 
1251
- #: wpf-admin/options-tabs/members.php:58
1252
  msgid "Custom Redirection URLs after following actions"
1253
  msgstr ""
1254
 
1255
- #: wpf-admin/options-tabs/members.php:60
1256
  msgid "For member profile, account and subscription pages use following URLs:"
1257
  msgstr ""
1258
 
1259
- #: wpf-admin/options-tabs/members.php:72
1260
  msgid "Redirect after login"
1261
  msgstr ""
1262
 
1263
- #: wpf-admin/options-tabs/members.php:73
1264
  msgid "Redirect after registration"
1265
  msgstr ""
1266
 
1267
- #: wpf-admin/options-tabs/members.php:74
1268
  msgid "Redirect after subscription confirmation"
1269
  msgstr ""
1270
 
1271
- #: wpf-admin/options-tabs/members.php:80 wpf-includes/wpf-phrases.php:175
1272
  msgid "Member Reputation and Titles"
1273
  msgstr ""
1274
 
1275
- #: wpf-admin/options-tabs/members.php:84
1276
  msgid "Member Custom Titles"
1277
  msgstr ""
1278
 
1279
- #: wpf-admin/options-tabs/members.php:93
1280
  msgid "Member Custom Title by default"
1281
  msgstr ""
1282
 
1283
- #: wpf-admin/options-tabs/members.php:103 wpf-includes/wpf-phrases.php:247
1284
  msgid "Rating Level"
1285
  msgstr ""
1286
 
1287
- #: wpf-admin/options-tabs/members.php:104 wpf-includes/wpf-phrases.php:185
1288
  msgid "Min Number of Posts"
1289
  msgstr ""
1290
 
1291
- #: wpf-admin/options-tabs/members.php:105 wpf-includes/wpf-phrases.php:176
1292
  msgid "Member Title"
1293
  msgstr ""
1294
 
1295
- #: wpf-admin/options-tabs/members.php:106 wpf-includes/wpf-phrases.php:293
1296
  msgid "Short Badge"
1297
  msgstr ""
1298
 
1299
- #: wpf-admin/options-tabs/members.php:107 wpf-includes/wpf-phrases.php:128
1300
  msgid "Full Badge"
1301
  msgstr ""
1302
 
1303
- #: wpf-admin/options-tabs/members.php:108 wpf-includes/wpf-phrases.php:245
1304
  msgid "Rating Color"
1305
  msgstr ""
1306
 
1307
- #: wpf-admin/options-tabs/members.php:109 wpf-includes/wpf-phrases.php:246
1308
  msgid "Rating Icon"
1309
  msgstr ""
1310
 
1311
- #: wpf-admin/options-tabs/members.php:109 wpf-includes/wpf-phrases.php:187
1312
  msgid "More"
1313
  msgstr ""
1314
 
1315
- #: wpf-admin/options-tabs/members.php:114 wpf-includes/wpf-phrases.php:158
1316
  msgid "Level"
1317
  msgstr ""
1318
 
1319
- #: wpf-admin/options-tabs/members.php:115 wpf-includes/wpf-phrases.php:211
1320
  msgid "Number of Posts"
1321
  msgstr ""
1322
 
1323
- #: wpf-admin/options-tabs/members.php:116 wpf-includes/wpf-phrases.php:63
1324
  msgid "Custom Title"
1325
  msgstr ""
1326
 
1327
- #: wpf-admin/options-tabs/members.php:119 wpf-admin/usergroup.php:23
1328
  #: wpf-includes/wpf-phrases.php:56
1329
  msgid "Color"
1330
  msgstr ""
1331
 
1332
- #: wpf-admin/options-tabs/members.php:120 wpf-includes/wpf-phrases.php:48
1333
  msgid "Badge Icon"
1334
  msgstr ""
1335
 
1336
- #: wpf-admin/options-tabs/members.php:126
1337
  msgid "Enable Reputation Titles for selected usergroups"
1338
  msgstr ""
1339
 
1340
- #: wpf-admin/options-tabs/members.php:127
1341
  msgid ""
1342
  "This option depends on \"Enable Member Rating Titles\" parent option, witch "
1343
  "located in wpForo Settings > Features Tab"
1344
  msgstr ""
1345
 
1346
- #: wpf-admin/options-tabs/members.php:140
1347
  msgid "Enable Reputation Badges for selected usergroups"
1348
  msgstr ""
1349
 
1350
- #: wpf-admin/options-tabs/members.php:141
1351
  msgid ""
1352
  "This option depends on \"Enable Member Rating\" parent option, witch located "
1353
  "in wpForo Settings > Features Tab"
1354
  msgstr ""
1355
 
1356
- #: wpf-admin/options-tabs/members.php:154
1357
  msgid "Display Usergroup under Post Author Avatar"
1358
  msgstr ""
1359
 
@@ -1453,8 +1641,8 @@ msgstr ""
1453
  msgid "Forum Color Styles"
1454
  msgstr ""
1455
 
1456
- #: wpf-admin/options-tabs/styles.php:43 wpf-admin/tools-tabs/legal.php:15
1457
- msgid "Documentation"
1458
  msgstr ""
1459
 
1460
  #: wpf-admin/options.php:8 wpf-includes/wpf-phrases.php:117
@@ -1834,6 +2022,10 @@ msgstr ""
1834
  msgid "Forum Privacy Policy and GDPR compliant"
1835
  msgstr ""
1836
 
 
 
 
 
1837
  #: wpf-admin/tools-tabs/legal.php:18
1838
  msgid ""
1839
  "The General Data Protection Regulation (GDPR) (Regulation (EU) 2016/679) is "
@@ -2047,6 +2239,57 @@ msgid ""
2047
  "you do not want to be indexed one per line in the textarea bellow."
2048
  msgstr ""
2049
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2050
  #: wpf-admin/tools.php:8
2051
  msgid "Forum Tools"
2052
  msgstr ""
@@ -2063,186 +2306,280 @@ msgstr ""
2063
  msgid "Misc"
2064
  msgstr ""
2065
 
2066
- #: wpf-admin/usergroup.php:18
2067
- msgid "Usergroup id"
2068
  msgstr ""
2069
 
2070
- #: wpf-admin/usergroup.php:19 wpf-admin/usergroup.php:44
2071
- #: wpf-admin/usergroup.php:87
2072
- msgid "Usergroup Name"
 
 
 
 
 
2073
  msgstr ""
2074
 
2075
- #: wpf-admin/usergroup.php:20
2076
- msgid "Users Count"
2077
  msgstr ""
2078
 
2079
- #: wpf-admin/usergroup.php:21
2080
- msgid "New Users Default Group"
2081
  msgstr ""
2082
 
2083
- #: wpf-admin/usergroup.php:22
2084
  msgid "Default Access"
2085
  msgstr ""
2086
 
2087
- #: wpf-admin/usergroup.php:34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2088
  msgid "Edit this usergroup"
2089
  msgstr ""
2090
 
2091
- #: wpf-admin/usergroup.php:34 wpf-includes/wpf-phrases.php:73
2092
  msgid "Edit"
2093
  msgstr ""
2094
 
2095
- #: wpf-admin/usergroup.php:36
2096
  msgid "Delete this usergroup"
2097
  msgstr ""
2098
 
2099
- #: wpf-admin/usergroup.php:38
2100
  msgid "View users list in this usergroup"
2101
  msgstr ""
2102
 
2103
- #: wpf-admin/usergroup.php:50
2104
- msgid "Count of users in this usergroup"
2105
  msgstr ""
2106
 
2107
- #: wpf-admin/usergroup.php:54
2108
  msgid "is Default"
2109
  msgstr ""
2110
 
2111
- #: wpf-admin/usergroup.php:57
2112
- msgid "DO NOT set this option on higher level user groups !!!"
2113
  msgstr ""
2114
 
2115
- #: wpf-admin/usergroup.php:57
2116
  msgid "Set as Default"
2117
  msgstr ""
2118
 
2119
- #: wpf-admin/usergroup.php:65
2120
  msgid "default (#15)"
2121
  msgstr ""
2122
 
2123
- #: wpf-admin/usergroup.php:87 wpf-includes/wpf-phrases.php:133
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2124
  msgid "Guest"
2125
  msgstr ""
2126
 
2127
- #: wpf-admin/usergroup.php:102
2128
  msgid "Usergroup Color"
2129
  msgstr ""
2130
 
2131
- #: wpf-admin/usergroup.php:103
2132
  msgid "use default link color"
2133
  msgstr ""
2134
 
2135
- #: wpf-admin/usergroup.php:124
2136
- msgid "WordPress User Role"
2137
- msgstr ""
2138
-
2139
- #: wpf-admin/usergroup.php:133
2140
  msgid "Default Forum Access"
2141
  msgstr ""
2142
 
2143
- #: wpf-admin/usergroup.php:141
2144
  msgid ""
2145
  "This is only used when a new Usergroup is created, it automatically gets the "
2146
  "selected Forum Access in all forums."
2147
  msgstr ""
2148
 
2149
- #: wpf-admin/usergroup.php:145
2150
  msgid "Display on Members List"
2151
  msgstr ""
2152
 
2153
- #: wpf-admin/usergroup.php:164 wpf-includes/wpf-phrases.php:374
 
 
 
 
2154
  msgid "add"
2155
  msgstr ""
2156
 
2157
- #: wpf-admin/usergroup.php:164
2158
  msgid "save"
2159
  msgstr ""
2160
 
2161
- #: wpf-admin/usergroup.php:185
2162
  msgid "Delete Chosen Usergroup And Users"
2163
  msgstr ""
2164
 
2165
- #: wpf-admin/usergroup.php:195
2166
  msgid "Delete Chosen Usergroup And Join Users To Other Usergroup"
2167
  msgstr ""
2168
 
2169
- #: wpf-admin/usergroup.php:207
2170
  msgid "Users will be join this usergroup"
2171
  msgstr ""
2172
 
2173
- #: wpf-includes/class-api.php:201
2174
  msgid "Please login into Facebook and then click connect button again"
2175
  msgstr ""
2176
 
2177
- #: wpf-includes/class-api.php:228
2178
  msgid ""
2179
  "Your email is required to be able authorize you here. Please try loging "
2180
  "again. "
2181
  msgstr ""
2182
 
2183
- #: wpf-includes/class-api.php:233
2184
  msgid "Invalid User"
2185
  msgstr ""
2186
 
2187
- #: wpf-includes/class-api.php:243 wpf-includes/wpf-phrases.php:639
2188
  msgid "User registration is disabled"
2189
  msgstr ""
2190
 
2191
- #: wpf-includes/class-forums.php:664
2192
  msgid "Add a new Subforum"
2193
  msgstr ""
2194
 
2195
- #: wpf-includes/class-forums.php:664
2196
  msgid "Add a new Forum in this Category"
2197
  msgstr ""
2198
 
2199
- #: wpf-includes/class-members.php:240
2200
  msgid "<strong>ERROR</strong>: Please enter a username."
2201
  msgstr ""
2202
 
2203
- #: wpf-includes/class-members.php:244
2204
  msgid ""
2205
  "<strong>ERROR</strong>: This username is invalid because it uses illegal "
2206
  "characters. Please enter a valid username."
2207
  msgstr ""
2208
 
2209
- #: wpf-includes/class-members.php:253
2210
  msgid ""
2211
  "<strong>ERROR</strong>: This username is already registered. Please choose "
2212
  "another one."
2213
  msgstr ""
2214
 
2215
- #: wpf-includes/class-members.php:257
2216
  msgid "<strong>ERROR</strong>: Sorry, that username is not allowed."
2217
  msgstr ""
2218
 
2219
- #: wpf-includes/class-members.php:261
2220
  msgid "<strong>ERROR</strong>: Please type your email address."
2221
  msgstr ""
2222
 
2223
- #: wpf-includes/class-members.php:265
2224
  msgid "<strong>ERROR</strong>: The email address isn&#8217;t correct."
2225
  msgstr ""
2226
 
2227
- #: wpf-includes/class-members.php:270
2228
  msgid ""
2229
  "<strong>ERROR</strong>: This email is already registered, please choose "
2230
  "another one."
2231
  msgstr ""
2232
 
2233
- #: wpf-includes/class-members.php:1312
2234
  msgid "What should be done with wpForo content owned by this user?"
2235
  msgstr ""
2236
 
2237
- #: wpf-includes/class-members.php:1314
2238
  msgid "What should be done with wpForo content owned by these users?"
2239
  msgstr ""
2240
 
2241
- #: wpf-includes/class-members.php:1318
2242
  msgid "Delete all wpForo content."
2243
  msgstr ""
2244
 
2245
- #: wpf-includes/class-members.php:1320
2246
  msgid "Attribute all content to:"
2247
  msgstr ""
2248
 
@@ -2252,10 +2589,6 @@ msgid ""
2252
  "Please moderate suspected files in Forums &gt; Tools &gt; Antispam Tab."
2253
  msgstr ""
2254
 
2255
- #: wpf-includes/class-notices.php:118 wpf-includes/wpf-phrases.php:69
2256
- msgid "Dismiss this notice."
2257
- msgstr ""
2258
-
2259
  #: wpf-includes/class-notices.php:155
2260
  msgid "New Addons for Your Forum!"
2261
  msgstr ""
@@ -2302,41 +2635,41 @@ msgstr ""
2302
  msgid "Open link in a new tab"
2303
  msgstr ""
2304
 
2305
- #: wpf-includes/class-template.php:1428 wpf-includes/wpf-phrases.php:327
2306
  msgid "Theme file not readable"
2307
  msgstr ""
2308
 
2309
- #: wpf-includes/functions-installation.php:618
2310
  msgid "Start Profile Synchronization"
2311
  msgstr ""
2312
 
2313
- #: wpf-includes/functions-installation.php:618
2314
  msgid "Continue Synchronization"
2315
  msgstr ""
2316
 
2317
- #: wpf-includes/functions-installation.php:621
2318
  msgid ""
2319
  "This process may take a few seconds or dozens of minutes, please be patient "
2320
  "and don't close this page."
2321
  msgstr ""
2322
 
2323
- #: wpf-includes/functions-installation.php:622
2324
  msgid ""
2325
  "You can permanently disable this message in Dashboard > Forums > Features "
2326
  "admin page."
2327
  msgstr ""
2328
 
2329
- #: wpf-includes/functions-installation.php:624
2330
  msgid "wpForo Forum Installation | "
2331
  msgstr ""
2332
 
2333
- #: wpf-includes/functions-installation.php:625
2334
  msgid ""
2335
  "Forum users' profile data are not synchronized yet, this step is required! "
2336
  "Please click the button below to complete installation."
2337
  msgstr ""
2338
 
2339
- #: wpf-includes/functions-installation.php:636
2340
  msgid ""
2341
  "This process may take a few seconds or dozens of minutes, please be patient "
2342
  "and don't close this page. Database backup is not required. If you got 500 "
@@ -2344,15 +2677,15 @@ msgid ""
2344
  "in MySQL server."
2345
  msgstr ""
2346
 
2347
- #: wpf-includes/functions-installation.php:637
2348
  msgid "Updater Database"
2349
  msgstr ""
2350
 
2351
- #: wpf-includes/functions-installation.php:638
2352
  msgid "wpForo - Update Database "
2353
  msgstr ""
2354
 
2355
- #: wpf-includes/functions-installation.php:639
2356
  msgid "Please click the button below to complete wpForo update."
2357
  msgstr ""
2358
 
@@ -2422,138 +2755,138 @@ msgstr ""
2422
  msgid "Display with Avatars"
2423
  msgstr ""
2424
 
2425
- #: wpf-includes/functions.php:366
2426
  msgid "Unapproved"
2427
  msgstr ""
2428
 
2429
- #: wpf-includes/functions.php:367
2430
  msgid "Published"
2431
  msgstr ""
2432
 
2433
- #: wpf-includes/functions.php:376 wpf-includes/wpf-phrases.php:598
2434
  msgid "Active"
2435
  msgstr ""
2436
 
2437
- #: wpf-includes/functions.php:377
2438
  msgid "Banned"
2439
  msgstr ""
2440
 
2441
- #: wpf-includes/functions.php:390 wpf-includes/functions.php:692
2442
  #: wpf-includes/wpf-phrases.php:50
2443
  msgid "Bulk Actions"
2444
  msgstr ""
2445
 
2446
- #: wpf-includes/functions.php:395 wpf-includes/functions.php:796
2447
  #: wpf-includes/wpf-phrases.php:36
2448
  msgid "Apply"
2449
  msgstr ""
2450
 
2451
- #: wpf-includes/functions.php:404 wpf-includes/wpf-phrases.php:300
2452
  msgid "Show all forums"
2453
  msgstr ""
2454
 
2455
- #: wpf-includes/functions.php:417 wpf-includes/wpf-phrases.php:350
2456
  msgid "filter by group"
2457
  msgstr ""
2458
 
2459
- #: wpf-includes/functions.php:429
2460
  msgid "filter by status"
2461
  msgstr ""
2462
 
2463
- #: wpf-includes/functions.php:445
2464
  msgid "filter by package"
2465
  msgstr ""
2466
 
2467
- #: wpf-includes/functions.php:474
2468
  msgid "filter by user"
2469
  msgstr ""
2470
 
2471
- #: wpf-includes/functions.php:494 wpf-includes/functions.php:700
2472
  #: wpf-includes/wpf-phrases.php:385
2473
  msgid "item"
2474
  msgstr ""
2475
 
2476
- #: wpf-includes/functions.php:527 wpf-includes/functions.php:543
2477
  #: wpf-includes/wpf-phrases.php:284
2478
  msgid "Select All"
2479
  msgstr ""
2480
 
2481
- #: wpf-includes/functions.php:532 wpf-includes/functions.php:548
2482
  msgid "Type"
2483
  msgstr ""
2484
 
2485
- #: wpf-includes/functions.php:605 wpf-includes/wpf-phrases.php:383
2486
  msgid "edit user"
2487
  msgstr ""
2488
 
2489
- #: wpf-includes/functions.php:609 wpf-includes/wpf-phrases.php:382
2490
  msgid "edit profile"
2491
  msgstr ""
2492
 
2493
- #: wpf-includes/functions.php:614
2494
  msgid "unban user"
2495
  msgstr ""
2496
 
2497
- #: wpf-includes/functions.php:614
2498
  msgid "ban user"
2499
  msgstr ""
2500
 
2501
- #: wpf-includes/functions.php:614
2502
  msgid "Are you sure, you want to unban this user?"
2503
  msgstr ""
2504
 
2505
- #: wpf-includes/functions.php:614
2506
  msgid "Are you sure, you want to ban this user?"
2507
  msgstr ""
2508
 
2509
- #: wpf-includes/functions.php:619 wpf-includes/functions.php:629
2510
  #: wpf-includes/wpf-phrases.php:67
2511
  msgid "Delete this item"
2512
  msgstr ""
2513
 
2514
- #: wpf-includes/functions.php:619 wpf-includes/functions.php:629
2515
  #: wpf-includes/wpf-phrases.php:41
2516
  msgid "Are you sure you want to DELETE this item?"
2517
  msgstr ""
2518
 
2519
- #: wpf-includes/functions.php:624
2520
  msgid "unapprove this item"
2521
  msgstr ""
2522
 
2523
- #: wpf-includes/functions.php:624
2524
  msgid "Approve this item"
2525
  msgstr ""
2526
 
2527
- #: wpf-includes/functions.php:624 wpf-includes/wpf-phrases.php:686
2528
  msgid "unapprove"
2529
  msgstr ""
2530
 
2531
- #: wpf-includes/functions.php:624 wpf-includes/wpf-phrases.php:685
2532
  msgid "approve"
2533
  msgstr ""
2534
 
2535
- #: wpf-includes/functions.php:646 wpf-includes/functions.php:647
2536
  #: wpf-includes/wpf-phrases.php:404
2537
  msgid "view"
2538
  msgstr ""
2539
 
2540
- #: wpf-includes/functions.php:671
2541
  msgid "Topic"
2542
  msgstr ""
2543
 
2544
- #: wpf-includes/functions.php:671
2545
  msgid "Post"
2546
  msgstr ""
2547
 
2548
- #: wpf-includes/functions.php:684 wpf-includes/wpf-phrases.php:200
2549
  msgid "No items found"
2550
  msgstr ""
2551
 
2552
- #: wpf-includes/functions.php:795 wpf-includes/wpf-phrases.php:141
2553
  msgid "Items"
2554
  msgstr ""
2555
 
2556
- #: wpf-includes/functions.php:1183
2557
  #, php-format
2558
  msgid "Could not write file %s"
2559
  msgstr ""
@@ -2562,15 +2895,15 @@ msgstr ""
2562
  msgid "Search Forums..."
2563
  msgstr ""
2564
 
2565
- #: wpf-includes/integration/buddypress.php:78
2566
  msgid "Topics Started"
2567
  msgstr ""
2568
 
2569
- #: wpf-includes/integration/buddypress.php:89
2570
  msgid "Replies Created"
2571
  msgstr ""
2572
 
2573
- #: wpf-includes/integration/buddypress.php:100
2574
  msgid "Liked Posts"
2575
  msgstr ""
2576
 
@@ -2578,33 +2911,53 @@ msgstr ""
2578
  msgid "Subscriptions"
2579
  msgstr ""
2580
 
2581
- #: wpf-includes/integration/buddypress.php:527
2582
  msgid "Topic reply"
2583
  msgstr ""
2584
 
2585
- #: wpf-includes/integration/buddypress.php:530
2586
  #, php-format
2587
  msgid "You have %d new replies"
2588
  msgstr ""
2589
 
2590
- #: wpf-includes/integration/buddypress.php:534
2591
  #, php-format
2592
  msgid "You have %d new reply to %2$s from %3$s"
2593
  msgstr ""
2594
 
2595
- #: wpf-includes/integration/buddypress.php:536
2596
  #, php-format
2597
  msgid "You have %d new reply to %s"
2598
  msgstr ""
2599
 
2600
- #: wpf-includes/integration/buddypress.php:691
2601
  msgid "Are you sure you wanted to do that?"
2602
  msgstr ""
2603
 
2604
- #: wpf-includes/integration/buddypress.php:695
2605
  msgid "You do not have permission to mark notifications for that user."
2606
  msgstr ""
2607
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2608
  #: wpf-includes/wpf-hooks.php:20 wpf-includes/wpf-phrases.php:136
2609
  msgid ""
2610
  "IMPORTANT! Uninstall is not a simple deactivation action. This action will "
@@ -2619,69 +2972,106 @@ msgstr ""
2619
  msgid "Uninstall"
2620
  msgstr ""
2621
 
2622
- #: wpf-includes/wpf-hooks.php:1142
2623
  msgid "Move"
2624
  msgstr ""
2625
 
2626
- #: wpf-includes/wpf-hooks.php:1177
2627
  msgid "Clear"
2628
  msgstr ""
2629
 
2630
- #: wpf-includes/wpf-hooks.php:1177
2631
- msgid "Default"
2632
  msgstr ""
2633
 
2634
- #: wpf-includes/wpf-hooks.php:1177
2635
- msgid "Select Color"
2636
  msgstr ""
2637
 
2638
- #: wpf-includes/wpf-hooks.php:1200
2639
  msgid ""
2640
  "IMPORTANT: wpForo can't work with default permalink, please change permalink "
2641
  "structure"
2642
  msgstr ""
2643
 
2644
- #: wpf-includes/wpf-hooks.php:1219 wpf-includes/wpf-phrases.php:412
2645
- msgid "wpForo Usergroup"
2646
  msgstr ""
2647
 
2648
- #: wpf-includes/wpf-hooks.php:1227 wpf-includes/wpf-phrases.php:411
2649
- msgid "wpForo User Timezone"
 
 
 
 
 
 
 
 
 
 
 
 
2650
  msgstr ""
2651
 
2652
- #: wpf-includes/wpf-hooks.php:1506 wpf-includes/wpf-hooks.php:1601
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2653
  msgid "Please Moderate: "
2654
  msgstr ""
2655
 
2656
- #: wpf-includes/wpf-hooks.php:1507
2657
  msgid ""
2658
  "This topic is currently unapproved. You can approve topics in Dashboard "
2659
  "&raquo; Forums &raquo; Moderation admin page."
2660
  msgstr ""
2661
 
2662
- #: wpf-includes/wpf-hooks.php:1602
2663
  msgid ""
2664
  "This post is currently unapproved. You can approve posts in Dashboard "
2665
  "&raquo; Forums &raquo; Moderation admin page."
2666
  msgstr ""
2667
 
2668
- #: wpf-includes/wpf-hooks.php:1783 wpf-includes/wpf-hooks.php:1829
2669
  msgid "New Forum"
2670
  msgstr ""
2671
 
2672
- #: wpf-includes/wpf-hooks.php:1791
2673
  msgid "New User Group"
2674
  msgstr ""
2675
 
2676
- #: wpf-includes/wpf-hooks.php:1799 wpf-includes/wpf-hooks.php:1897
2677
  msgid "New Phrase"
2678
  msgstr ""
2679
 
2680
- #: wpf-includes/wpf-hooks.php:1814
 
 
 
 
2681
  msgid "Community"
2682
  msgstr ""
2683
 
2684
- #: wpf-includes/wpf-hooks.php:1881
 
 
 
 
2685
  msgid "New Usergroup"
2686
  msgstr ""
2687
 
@@ -2861,8 +3251,8 @@ msgstr ""
2861
  msgid "Forum Admin Email Addresses"
2862
  msgstr ""
2863
 
2864
- #: wpf-includes/wpf-phrases.php:109
2865
- msgid "Forum Home"
2866
  msgstr ""
2867
 
2868
  #: wpf-includes/wpf-phrases.php:111
@@ -3072,6 +3462,10 @@ msgstr ""
3072
  msgid "No topics were found here"
3073
  msgstr ""
3074
 
 
 
 
 
3075
  #: wpf-includes/wpf-phrases.php:214
3076
  msgid "Occupation"
3077
  msgstr ""
@@ -3576,6 +3970,14 @@ msgstr ""
3576
  msgid "wpForo Navigation"
3577
  msgstr ""
3578
 
 
 
 
 
 
 
 
 
3579
  #: wpf-includes/wpf-phrases.php:414
3580
  msgid "{number}B"
3581
  msgstr ""
@@ -3854,7 +4256,7 @@ msgid "Subscribe options successfully updated, but previous value not changed"
3854
  msgstr ""
3855
 
3856
  #: wpf-includes/wpf-phrases.php:488
3857
- msgid "Success! Thank you Dear Friend"
3858
  msgstr ""
3859
 
3860
  #: wpf-includes/wpf-phrases.php:489
@@ -4474,7 +4876,7 @@ msgstr ""
4474
  msgid "Done!"
4475
  msgstr ""
4476
 
4477
- #: wpf-includes/wpf-phrases.php:671
4478
  msgid "You are not allowed to attach this file type"
4479
  msgstr ""
4480
 
@@ -4490,10 +4892,6 @@ msgstr ""
4490
  msgid "Submit"
4491
  msgstr ""
4492
 
4493
- #: wpf-includes/wpf-phrases.php:677
4494
- msgid "Usergroup"
4495
- msgstr ""
4496
-
4497
  #: wpf-includes/wpf-phrases.php:678
4498
  msgid "Rating Title"
4499
  msgstr ""
@@ -4550,10 +4948,6 @@ msgstr ""
4550
  msgid "Reset Result"
4551
  msgstr ""
4552
 
4553
- #: wpf-includes/wpf-phrases.php:702
4554
- msgid "Recent Posts"
4555
- msgstr ""
4556
-
4557
  #: wpf-includes/wpf-phrases.php:703
4558
  msgid "No posts were found here"
4559
  msgstr ""
@@ -4735,6 +5129,184 @@ msgid ""
4735
  "old URL of this topic will no longer be available."
4736
  msgstr ""
4737
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4738
  #: wpf-themes/classic/functions.php:39
4739
  msgid "Extended Layout - Recent topics"
4740
  msgstr ""
@@ -4788,53 +5360,53 @@ msgid ""
4788
  "post area."
4789
  msgstr ""
4790
 
4791
- #: wpforo.php:199
4792
  msgid "Discussion Board"
4793
  msgstr ""
4794
 
4795
- #: wpforo.php:660
4796
  msgid ""
4797
  "Allows to embed hundreds of video, social network, audio and photo content "
4798
  "providers in forum topics and posts."
4799
  msgstr ""
4800
 
4801
- #: wpforo.php:661
4802
  msgid ""
4803
  "wpForo Polls is a complete addon to help forum members create, vote and "
4804
  "manage polls effectively. Comes with poll specific permissions and settings."
4805
  msgstr ""
4806
 
4807
- #: wpforo.php:662
4808
  msgid ""
4809
  "Awards myCRED points for forum activity. Integrates myCRED Badges and Ranks. "
4810
  "Converts wpForo topic and posts, likes to myCRED points."
4811
  msgstr ""
4812
 
4813
- #: wpforo.php:663
4814
  msgid ""
4815
  "Advanced user profile builder system. Allows to add new fields and manage "
4816
  "profile page. Creates custom Registration, Account, Member Search forms."
4817
  msgstr ""
4818
 
4819
- #: wpforo.php:664
4820
  msgid ""
4821
  "Adds an advanced file attachment system to forum topics and posts. AJAX "
4822
  "powered media uploading and displaying system with user specific library."
4823
  msgstr ""
4824
 
4825
- #: wpforo.php:665
4826
  msgid ""
4827
  "Provides a safe way to communicate directly with other members. Messages are "
4828
  "private and can only be viewed by conversation participants."
4829
  msgstr ""
4830
 
4831
- #: wpforo.php:666
4832
  msgid ""
4833
  "Blog to Forum and Forum to Blog content synchronization. Blog posts with "
4834
  "Forum topics and Blog comments with Forum replies."
4835
  msgstr ""
4836
 
4837
- #: wpforo.php:667
4838
  msgid ""
4839
  "Ads Manager is a powerful yet simple advertisement management system, that "
4840
  "allows you to add adverting banners between forums, topics and posts."
5
  msgstr ""
6
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
7
  "Project-Id-Version: Forum - wpForo\n"
8
+ "POT-Creation-Date: 2018-07-09 16:16+0300\n"
9
  "PO-Revision-Date: 2016-06-28 21:09+0400\n"
10
  "Last-Translator: \n"
11
  "Language-Team: \n"
69
  msgid "Dashboard"
70
  msgstr ""
71
 
72
+ #: wpf-admin/admin.php:24 wpf-admin/admin.php:26 wpf-admin/dashboard.php:137
73
  #: wpf-admin/options-tabs/api.php:83 wpf-admin/options-tabs/styles.php:16
74
+ #: wpf-admin/options.php:15 wpf-admin/tools-tabs/misc.php:92
75
+ #: wpf-includes/integration/buddypress.php:11
76
  #: wpf-includes/integration/buddypress.php:57
77
+ #: wpf-includes/integration/buddypress.php:129 wpf-includes/wpf-hooks.php:1901
78
  #: wpf-includes/wpf-phrases.php:123
79
  msgid "Forums"
80
  msgstr ""
81
 
82
  #: wpf-admin/admin.php:27 wpf-includes/wpf-hooks.php:22
83
+ #: wpf-includes/wpf-hooks.php:1917
84
  msgid "Settings"
85
  msgstr ""
86
 
87
+ #: wpf-admin/admin.php:28 wpf-includes/wpf-hooks.php:1926
88
  #: wpf-includes/wpf-phrases.php:729
89
  msgid "Tools"
90
  msgstr ""
91
 
92
+ #: wpf-admin/admin.php:29 wpf-includes/wpf-hooks.php:1935
93
  msgid "Moderation"
94
  msgstr ""
95
 
96
+ #: wpf-admin/admin.php:30 wpf-admin/dashboard.php:149 wpf-admin/member.php:10
97
+ #: wpf-admin/options.php:18 wpf-admin/tools-tabs/misc.php:108
98
+ #: wpf-admin/usergroup.php:31 wpf-includes/wpf-hooks.php:1944
99
  #: wpf-includes/wpf-phrases.php:178
100
  msgid "Members"
101
  msgstr ""
102
 
103
+ #: wpf-admin/admin.php:31 wpf-admin/usergroup.php:8 wpf-admin/usergroup.php:155
104
+ #: wpf-includes/wpf-hooks.php:1953
105
  msgid "Usergroups"
106
  msgstr ""
107
 
108
+ #: wpf-admin/admin.php:32 wpf-includes/wpf-hooks.php:1969
109
  #: wpf-includes/wpf-phrases.php:604
110
  msgid "Phrases"
111
  msgstr ""
112
 
113
+ #: wpf-admin/admin.php:33 wpf-includes/wpf-hooks.php:1985
114
  #: wpf-includes/wpf-phrases.php:605
115
  msgid "Themes"
116
  msgstr ""
117
 
118
  #: wpf-admin/admin.php:34 wpf-admin/options.php:24
119
+ #: wpf-includes/wpf-hooks.php:1994 wpf-includes/wpf-phrases.php:25
120
  msgid "Addons"
121
  msgstr ""
122
 
173
  msgid "Server Information"
174
  msgstr ""
175
 
176
+ #: wpf-admin/dashboard.php:110 wpf-includes/wpf-phrases.php:46
177
  msgid "Available"
178
  msgstr ""
179
 
180
+ #: wpf-admin/dashboard.php:110
181
+ msgid ""
182
+ "The setTimestamp() method of PHP DateTime class is not available. Please "
183
+ "make sure you use PHP 5.4 and higher version on your hosting service."
184
  msgstr ""
185
 
186
+ #: wpf-admin/dashboard.php:131 wpf-includes/wpf-phrases.php:49
187
  msgid "Board Statistic"
188
  msgstr ""
189
 
190
+ #: wpf-admin/dashboard.php:141 wpf-admin/options-tabs/posts.php:17
191
+ #: wpf-admin/options-tabs/styles.php:22 wpf-includes/class-forums.php:665
192
  #: wpf-includes/wpf-phrases.php:338
193
  msgid "Topics"
194
  msgstr ""
195
 
196
+ #: wpf-admin/dashboard.php:145 wpf-admin/options-tabs/posts.php:18
197
+ #: wpf-includes/class-forums.php:665 wpf-includes/wpf-phrases.php:232
198
  msgid "Posts"
199
  msgstr ""
200
 
201
+ #: wpf-admin/dashboard.php:153 wpf-includes/wpf-phrases.php:179
202
  msgid "Members Online"
203
  msgstr ""
204
 
205
+ #: wpf-admin/dashboard.php:163
206
  msgid "Avatars Size"
207
  msgstr ""
208
 
209
+ #: wpf-admin/dashboard.php:167
210
  msgid "Default Attachments Size"
211
  msgstr ""
212
 
213
+ #: wpf-admin/dashboard.php:173
214
  msgid "Advanced Attachments"
215
  msgstr ""
216
 
217
+ #: wpf-admin/dashboard.php:174
218
  msgid "file(s)"
219
  msgstr ""
220
 
221
+ #: wpf-admin/dashboard.php:177
222
  msgid "Advanced Attachments Size"
223
  msgstr ""
224
 
225
+ #: wpf-admin/dashboard.php:182
226
  msgid "Total Size"
227
  msgstr ""
228
 
229
+ #: wpf-admin/dashboard.php:190 wpf-includes/wpf-phrases.php:615
230
  msgid "Forum Maintenance"
231
  msgstr ""
232
 
233
+ #: wpf-admin/dashboard.php:192
234
  msgid ""
235
  "This process may take a few seconds or dozens of minutes, please be patient "
236
  "and don't close this page. If you got 500 Server Error please don't worry, "
237
  "the data updating process is still working in MySQL server."
238
  msgstr ""
239
 
240
+ #: wpf-admin/dashboard.php:203
241
  msgid "Delete All Caches"
242
  msgstr ""
243
 
244
+ #: wpf-admin/dashboard.php:204 wpf-includes/wpf-phrases.php:617
245
  msgid "Update Forums Statistic"
246
  msgstr ""
247
 
248
+ #: wpf-admin/dashboard.php:205
249
+ msgid "Update Topics Statistic"
250
+ msgstr ""
251
+
252
+ #: wpf-admin/dashboard.php:206 wpf-includes/wpf-phrases.php:618
253
  msgid "Update Users Statistic"
254
  msgstr ""
255
 
256
+ #: wpf-admin/dashboard.php:207 wpf-includes/wpf-phrases.php:619
257
  msgid "Delete Phrase Cache"
258
  msgstr ""
259
 
260
+ #: wpf-admin/dashboard.php:208 wpf-includes/wpf-phrases.php:640
261
  msgid "Delete User Cache"
262
  msgstr ""
263
 
264
+ #: wpf-admin/dashboard.php:209
265
+ msgid "Synch User Profiles"
266
+ msgstr ""
267
+
268
+ #: wpf-admin/deactivation-dialog.php:9
269
+ msgid "Plugin Usage Feedback"
270
+ msgstr ""
271
+
272
+ #: wpf-admin/deactivation-dialog.php:18
273
+ msgid ""
274
+ "Please let us know why you are deactivating. Choosing one of the options "
275
+ "below you will help us make it better for you and for other users."
276
+ msgstr ""
277
+
278
+ #: wpf-admin/deactivation-dialog.php:24
279
+ msgid "I'll reactivate it later"
280
+ msgstr ""
281
+
282
+ #: wpf-admin/deactivation-dialog.php:28
283
+ msgid "The plugin is not working"
284
+ msgstr ""
285
+
286
+ #: wpf-admin/deactivation-dialog.php:29
287
+ msgid "What kind of problems do you have?"
288
+ msgstr ""
289
+
290
+ #: wpf-admin/deactivation-dialog.php:33
291
+ msgid "It's not what I was looking for"
292
+ msgstr ""
293
+
294
+ #: wpf-admin/deactivation-dialog.php:37
295
+ msgid "I couldn't understand how to make it work"
296
+ msgstr ""
297
+
298
+ #: wpf-admin/deactivation-dialog.php:38 wpf-admin/deactivation-dialog.php:43
299
+ msgid "What type of features you want to be in the plugin?"
300
+ msgstr ""
301
+
302
+ #: wpf-admin/deactivation-dialog.php:42
303
+ msgid "The plugin is great, but I need specific features"
304
+ msgstr ""
305
+
306
+ #: wpf-admin/deactivation-dialog.php:47
307
+ msgid "I didn't like plugin design"
308
+ msgstr ""
309
+
310
+ #: wpf-admin/deactivation-dialog.php:48
311
+ msgid "What part of design you don't like or want to change?"
312
+ msgstr ""
313
+
314
+ #: wpf-admin/deactivation-dialog.php:52
315
+ msgid "The plugin works very slow"
316
+ msgstr ""
317
+
318
+ #: wpf-admin/deactivation-dialog.php:53
319
+ msgid ""
320
+ "Could you please describe which features of the plugin slows down your "
321
+ "website?"
322
+ msgstr ""
323
+
324
+ #: wpf-admin/deactivation-dialog.php:57
325
+ msgid "I found a better plugin"
326
+ msgstr ""
327
+
328
+ #: wpf-admin/deactivation-dialog.php:58
329
+ msgid "Please provide a plugin name or URL"
330
+ msgstr ""
331
+
332
+ #: wpf-admin/deactivation-dialog.php:62
333
+ msgid "Other"
334
+ msgstr ""
335
+
336
+ #: wpf-admin/deactivation-dialog.php:63 wpf-includes/wpf-hooks.php:1173
337
+ msgid "Please provide more information"
338
+ msgstr ""
339
+
340
+ #: wpf-admin/deactivation-dialog.php:67
341
+ msgid "Dismiss and never show again"
342
+ msgstr ""
343
+
344
+ #: wpf-admin/deactivation-dialog.php:68
345
+ msgid "Submit &amp; Deactivate"
346
+ msgstr ""
347
+
348
+ #: wpf-admin/deactivation-dialog.php:71
349
+ msgid "Thank you for your feedback!"
350
+ msgstr ""
351
+
352
+ #: wpf-admin/forum.php:13 wpf-includes/functions.php:803
353
  #: wpf-includes/wpf-phrases.php:301
354
  msgid "Show on screen"
355
  msgstr ""
356
 
357
+ #: wpf-admin/forum.php:15 wpf-admin/forum.php:130
358
  #: wpf-includes/wpf-phrases.php:113
359
  msgid "Forum Options"
360
  msgstr ""
379
  msgid "Number of Columns"
380
  msgstr ""
381
 
382
+ #: wpf-admin/forum.php:32 wpf-includes/functions.php:817
383
  #: wpf-includes/wpf-phrases.php:274
384
  msgid "Screen Options"
385
  msgstr ""
388
  msgid "Categories and Forums"
389
  msgstr ""
390
 
391
+ #: wpf-admin/forum.php:44 wpf-admin/options-tabs/general.php:76
392
  #: wpf-admin/themes.php:10 wpf-admin/usergroup.php:8
393
  #: wpf-includes/wpf-phrases.php:20
394
  msgid "Add New"
395
  msgstr ""
396
 
397
+ #: wpf-admin/forum.php:54 wpf-admin/forum.php:130 wpf-admin/forum.php:176
398
+ #: wpf-admin/forum.php:192 wpf-admin/forum.php:201
399
+ #: wpf-admin/options-tabs/accesses.php:19 wpf-admin/options-tabs/emails.php:12
400
+ #: wpf-admin/options-tabs/emails.php:16 wpf-admin/options-tabs/emails.php:21
401
+ #: wpf-admin/options-tabs/emails.php:28 wpf-admin/options-tabs/emails.php:40
402
+ #: wpf-admin/options-tabs/emails.php:52 wpf-admin/options-tabs/features.php:68
403
+ #: wpf-admin/options-tabs/general.php:15 wpf-admin/options-tabs/general.php:25
404
+ #: wpf-admin/options-tabs/general.php:49 wpf-admin/options-tabs/general.php:53
405
+ #: wpf-admin/options-tabs/general.php:58 wpf-admin/options-tabs/general.php:69
406
+ #: wpf-admin/options-tabs/members.php:13 wpf-admin/options-tabs/members.php:27
407
+ #: wpf-admin/options-tabs/members.php:46 wpf-admin/options-tabs/members.php:87
408
+ #: wpf-admin/options-tabs/posts.php:23 wpf-admin/options-tabs/posts.php:28
409
+ #: wpf-admin/options-tabs/posts.php:35 wpf-admin/options-tabs/posts.php:41
410
+ #: wpf-admin/options-tabs/posts.php:46 wpf-admin/options-tabs/posts.php:53
411
+ #: wpf-admin/options-tabs/posts.php:61 wpf-admin/options-tabs/posts.php:77
412
+ #: wpf-admin/options-tabs/styles.php:43 wpf-admin/usergroup.php:28
413
+ #: wpf-admin/usergroup.php:30 wpf-admin/usergroup.php:243
414
+ #: wpf-themes/classic/functions.php:39 wpf-themes/classic/functions.php:48
415
+ #: wpf-themes/classic/functions.php:55 wpf-themes/classic/functions.php:69
416
+ #: wpf-themes/classic/functions.php:78 wpf-themes/classic/functions.php:85
417
+ #: wpf-themes/classic/functions.php:107 wpf-themes/classic/functions.php:117
418
+ msgid "Read the documentation"
419
+ msgstr ""
420
+
421
+ #: wpf-admin/forum.php:56
422
  msgid "Important Tips"
423
  msgstr ""
424
 
425
+ #: wpf-admin/forum.php:57 wpf-includes/wpf-phrases.php:225
426
  msgid "Please drag and drop forum panels to set parent-child hierarchy."
427
  msgstr ""
428
 
429
+ #: wpf-admin/forum.php:58
430
  msgid ""
431
  "If a category (blue panels) does not have forums (grey panels) it will not "
432
  "be displayed on front-end. Each category should contain at least one forum."
433
  msgstr ""
434
 
435
+ #: wpf-admin/forum.php:59
436
  msgid ""
437
  "Forums can be displayed with different layouts (Extended, Simplified, Q&A), "
438
  "just edit the top (blue panels) category and set the layout you want. Child "
440
  "have a different layout."
441
  msgstr ""
442
 
443
+ #: wpf-admin/forum.php:75 wpf-includes/wpf-phrases.php:272
444
  msgid "Save forums order and hierarchy"
445
  msgstr ""
446
 
447
+ #: wpf-admin/forum.php:112 wpf-includes/wpf-phrases.php:87
448
  msgid "Enter forum title here"
449
  msgstr ""
450
 
451
+ #: wpf-admin/forum.php:117 wpf-includes/wpf-phrases.php:86
452
  msgid "Enter description here . . ."
453
  msgstr ""
454
 
455
+ #: wpf-admin/forum.php:118 wpf-includes/wpf-phrases.php:329
456
  msgid ""
457
  "This is a forum description. This content will be displayed under forum "
458
  "title on the forum list."
459
  msgstr ""
460
 
461
+ #: wpf-admin/forum.php:133 wpf-includes/wpf-phrases.php:221
462
  msgid "Parent Forum"
463
  msgstr ""
464
 
465
+ #: wpf-admin/forum.php:136 wpf-includes/wpf-phrases.php:204
466
  msgid "No parent"
467
  msgstr ""
468
 
469
+ #: wpf-admin/forum.php:141 wpf-includes/wpf-phrases.php:346
470
  msgid "Use as Category"
471
  msgstr ""
472
 
473
+ #: wpf-admin/forum.php:143 wpf-includes/wpf-phrases.php:52
474
  msgid "Category Layout"
475
  msgstr ""
476
 
477
+ #: wpf-admin/forum.php:151 wpf-includes/wpf-phrases.php:202
478
  msgid "No layout found."
479
  msgstr ""
480
 
481
+ #: wpf-admin/forum.php:160 wpf-admin/forum.php:167
482
  #: wpf-includes/wpf-phrases.php:234
483
  msgid "Publish"
484
  msgstr ""
485
 
486
+ #: wpf-admin/forum.php:164 wpf-includes/wpf-phrases.php:37
487
  msgid "Are you sure you want to delete this forum?"
488
  msgstr ""
489
 
490
+ #: wpf-admin/forum.php:164 wpf-admin/themes.php:73
491
+ #: wpf-admin/tools-tabs/antispam.php:302 wpf-admin/usergroup.php:70
492
+ #: wpf-admin/usergroup.php:375 wpf-includes/wpf-hooks.php:1121
493
  #: wpf-includes/wpf-phrases.php:66
494
  msgid "Delete"
495
  msgstr ""
496
 
497
+ #: wpf-admin/forum.php:165 wpf-admin/usergroup.php:72
498
+ #: wpf-includes/class-forums.php:671 wpf-includes/wpf-phrases.php:355
499
  msgid "View"
500
  msgstr ""
501
 
502
+ #: wpf-admin/forum.php:176
503
+ msgid "Forum Permissions"
504
+ msgstr ""
505
+
506
+ #: wpf-admin/forum.php:192 wpf-includes/wpf-phrases.php:118
507
  msgid "Forum Slug"
508
  msgstr ""
509
 
510
+ #: wpf-admin/forum.php:195 wpf-includes/wpf-phrases.php:322
511
  msgid ""
512
  "The \"slug\" is the URL-friendly version of the name. It is usually all "
513
  "lowercase and contains only letters, numbers, and hyphens."
514
  msgstr ""
515
 
516
+ #: wpf-admin/forum.php:201
517
  msgid "Forum Icon"
518
  msgstr ""
519
 
520
+ #: wpf-admin/forum.php:204
521
  msgid "Font-awesome Icon"
522
  msgstr ""
523
 
524
+ #: wpf-admin/forum.php:206
525
  msgid "You can find all icons"
526
  msgstr ""
527
 
528
+ #: wpf-admin/forum.php:206
529
  msgid "here"
530
  msgstr ""
531
 
532
+ #: wpf-admin/forum.php:206
533
  msgid ""
534
  "Make sure you insert a class of font-awesome icon, it should start with fa- "
535
  "prefix like &quot;fas fa-comments&quot;."
536
  msgstr ""
537
 
538
+ #: wpf-admin/forum.php:213 wpf-includes/wpf-phrases.php:116
539
  msgid "Forum SEO"
540
  msgstr ""
541
 
542
+ #: wpf-admin/forum.php:216 wpf-includes/wpf-phrases.php:184
543
  msgid "Meta Description"
544
  msgstr ""
545
 
546
+ #: wpf-admin/forum.php:245 wpf-includes/wpf-phrases.php:328
547
  msgid "This action will also delete all sub-forums, topics and replies."
548
  msgstr ""
549
 
550
+ #: wpf-admin/forum.php:253 wpf-includes/wpf-phrases.php:137
551
  msgid ""
552
  "If you want to delete this forum and keep its sub-forums, topics and "
553
  "replies, please select a new target forum in dropdown below"
554
  msgstr ""
555
 
556
+ #: wpf-admin/forum.php:262 wpf-includes/wpf-phrases.php:26
557
  msgid ""
558
  "All sub-forums, topics and replies will be attached to selected forum. "
559
  "Layout will be inherited from this forum."
567
  msgid "Add New Forum Access"
568
  msgstr ""
569
 
570
+ #: wpf-admin/options-tabs/accesses.php:19 wpf-includes/wpf-phrases.php:15
571
  msgid "Access names"
572
  msgstr ""
573
 
574
+ #: wpf-admin/options-tabs/accesses.php:20
575
+ msgid ""
576
+ "Forum Accesses are designed to do a Forum specific user permission control. "
577
+ "These are set of permissions which are attached to certain Usergeoup in each "
578
+ "forum. Thus users can have different permissions in different forums based "
579
+ "on their Usergroup."
580
+ msgstr ""
581
+
582
+ #: wpf-admin/options-tabs/accesses.php:34
583
+ #: wpf-admin/options-tabs/accesses.php:35
584
+ #: wpf-admin/options-tabs/accesses.php:36
585
  msgid "This access is usually used for "
586
  msgstr ""
587
 
588
+ #: wpf-admin/options-tabs/accesses.php:34
589
  msgid "Guests"
590
  msgstr ""
591
 
592
+ #: wpf-admin/options-tabs/accesses.php:34
593
+ #: wpf-admin/options-tabs/accesses.php:35
594
+ #: wpf-admin/options-tabs/accesses.php:36
595
  msgid "usergroup"
596
  msgstr ""
597
 
598
+ #: wpf-admin/options-tabs/accesses.php:35 wpf-includes/wpf-phrases.php:627
599
  msgid "Registered"
600
  msgstr ""
601
 
602
+ #: wpf-admin/options-tabs/accesses.php:36 wpf-includes/wpf-phrases.php:625
603
  msgid "Admin"
604
  msgstr ""
605
 
606
+ #: wpf-admin/options-tabs/accesses.php:40 wpf-includes/class-forums.php:667
607
+ #: wpf-includes/functions.php:613 wpf-includes/wpf-phrases.php:381
608
  msgid "edit"
609
  msgstr ""
610
 
611
+ #: wpf-admin/options-tabs/accesses.php:42 wpf-includes/wpf-phrases.php:39
612
  msgid ""
613
  "Are you sure you want to remove this access set? Usergroups which attached "
614
  "to this access will lost all forum permissions."
615
  msgstr ""
616
 
617
+ #: wpf-admin/options-tabs/accesses.php:42 wpf-includes/class-forums.php:669
618
+ #: wpf-includes/functions.php:631 wpf-includes/functions.php:641
619
  #: wpf-includes/wpf-phrases.php:380
620
  msgid "delete"
621
  msgstr ""
622
 
623
+ #: wpf-admin/options-tabs/accesses.php:57 wpf-includes/wpf-phrases.php:14
624
  msgid "Access name"
625
  msgstr ""
626
 
627
+ #: wpf-admin/options-tabs/accesses.php:76 wpf-includes/wpf-phrases.php:270
628
  msgid "Save"
629
  msgstr ""
630
 
631
+ #: wpf-admin/options-tabs/accesses.php:76 wpf-includes/wpf-phrases.php:343
632
  msgid "Update"
633
  msgstr ""
634
 
666
  #: wpf-admin/options-tabs/api.php:37 wpf-admin/options-tabs/api.php:49
667
  #: wpf-admin/options-tabs/api.php:60 wpf-admin/options-tabs/api.php:71
668
  #: wpf-admin/options-tabs/api.php:140 wpf-admin/options-tabs/api.php:147
669
+ #: wpf-admin/options-tabs/members.php:94 wpf-admin/tools-tabs/legal.php:48
670
  #: wpf-admin/tools-tabs/legal.php:60 wpf-admin/tools-tabs/legal.php:82
671
  #: wpf-admin/tools-tabs/legal.php:117 wpf-admin/tools-tabs/legal.php:129
672
  #: wpf-admin/tools-tabs/legal.php:148
676
  #: wpf-admin/options-tabs/api.php:38 wpf-admin/options-tabs/api.php:50
677
  #: wpf-admin/options-tabs/api.php:61 wpf-admin/options-tabs/api.php:72
678
  #: wpf-admin/options-tabs/api.php:141 wpf-admin/options-tabs/api.php:148
679
+ #: wpf-admin/options-tabs/members.php:95 wpf-admin/tools-tabs/legal.php:49
680
  #: wpf-admin/tools-tabs/legal.php:61 wpf-admin/tools-tabs/legal.php:83
681
  #: wpf-admin/tools-tabs/legal.php:118 wpf-admin/tools-tabs/legal.php:130
682
  #: wpf-admin/tools-tabs/legal.php:149
818
  msgstr ""
819
 
820
  #: wpf-admin/options-tabs/api.php:245 wpf-admin/options-tabs/emails.php:132
821
+ #: wpf-admin/options-tabs/features.php:89 wpf-admin/options-tabs/forums.php:16
822
+ #: wpf-admin/options-tabs/general.php:83 wpf-admin/options-tabs/members.php:181
823
  #: wpf-admin/options-tabs/posts.php:88 wpf-admin/options-tabs/styles.php:93
824
  #: wpf-admin/tools-tabs/antispam.php:343 wpf-admin/tools-tabs/cleanup.php:49
825
+ #: wpf-admin/tools-tabs/legal.php:179 wpf-admin/tools-tabs/misc.php:134
826
  #: wpf-includes/wpf-phrases.php:344
827
  msgid "Update Options"
828
  msgstr ""
856
  msgstr ""
857
 
858
  #: wpf-admin/options-tabs/emails.php:33 wpf-admin/options-tabs/emails.php:45
859
+ #: wpf-admin/options-tabs/emails.php:116 wpf-admin/options-tabs/features.php:77
860
  #: wpf-admin/tools-tabs/antispam.php:31 wpf-admin/tools-tabs/antispam.php:40
861
  #: wpf-admin/tools-tabs/antispam.php:49 wpf-admin/tools-tabs/antispam.php:150
862
  #: wpf-admin/tools-tabs/antispam.php:159 wpf-admin/tools-tabs/antispam.php:169
868
  msgstr ""
869
 
870
  #: wpf-admin/options-tabs/emails.php:34 wpf-admin/options-tabs/emails.php:46
871
+ #: wpf-admin/options-tabs/emails.php:117 wpf-admin/options-tabs/features.php:79
872
  #: wpf-admin/tools-tabs/antispam.php:32 wpf-admin/tools-tabs/antispam.php:41
873
  #: wpf-admin/tools-tabs/antispam.php:50 wpf-admin/tools-tabs/antispam.php:151
874
  #: wpf-admin/tools-tabs/antispam.php:160 wpf-admin/tools-tabs/antispam.php:170
1137
  msgstr ""
1138
 
1139
  #: wpf-admin/options-tabs/features.php:43
1140
+ #: wpf-admin/options-tabs/features.php:46
1141
  msgid "Replaces wpForo Member Profile page with BuddyPress Profile Page."
1142
  msgstr ""
1143
 
1144
+ #: wpf-admin/options-tabs/features.php:44
1145
+ msgid "Ultimate Member Notification Integration"
1146
+ msgstr ""
1147
+
1148
+ #: wpf-admin/options-tabs/features.php:44
1149
+ msgid ""
1150
+ "Creates notification on new forum reply in Ultimate Member Real-time "
1151
+ "Notification system."
1152
+ msgstr ""
1153
+
1154
+ #: wpf-admin/options-tabs/features.php:45
1155
+ msgid "Ultimate Member Profile Forum Tab Integration"
1156
+ msgstr ""
1157
+
1158
+ #: wpf-admin/options-tabs/features.php:45
1159
+ msgid ""
1160
+ "Adds \"Forums\" tab with \"Created Topics\", \"Posted Replies\", \"Liked "
1161
+ "Posts\" and \"Subscriptions\" sub-tabs to Ultimate Member Profile page."
1162
+ msgstr ""
1163
+
1164
+ #: wpf-admin/options-tabs/features.php:46
1165
+ msgid "Replace Forum Profile with Ultimate Member Profile"
1166
+ msgstr ""
1167
+
1168
+ #: wpf-admin/options-tabs/features.php:47 wpf-includes/wpf-phrases.php:82
1169
  msgid "Enable wpForo Font-Awesome Lib"
1170
  msgstr ""
1171
 
1172
+ #: wpf-admin/options-tabs/features.php:48 wpf-includes/wpf-phrases.php:85
1173
  msgid "Enable Output Buffer"
1174
  msgstr ""
1175
 
1176
+ #: wpf-admin/options-tabs/features.php:48 wpf-includes/wpf-phrases.php:330
1177
  msgid ""
1178
  "This feature is useful if you're adding content before or after [wpforo] "
1179
  "shortcode in page content. Also it useful if forum is loaded before website "
1180
  "header, on top of the front-end."
1181
  msgstr ""
1182
 
1183
+ #: wpf-admin/options-tabs/features.php:49
1184
  msgid "Enable WordPress Date/Time Format"
1185
  msgstr ""
1186
 
1187
+ #: wpf-admin/options-tabs/features.php:49 wpf-includes/wpf-phrases.php:602
1188
  msgid ""
1189
  "You can manage WordPress date and time format in WordPress Settings > "
1190
  "General admin page."
1191
  msgstr ""
1192
 
1193
+ #: wpf-admin/options-tabs/features.php:50 wpf-includes/wpf-phrases.php:613
1194
  msgid "Enable Subscription Confirmation"
1195
  msgstr ""
1196
 
1197
+ #: wpf-admin/options-tabs/features.php:50 wpf-includes/wpf-phrases.php:614
1198
  msgid "Forum and Topic subscription with double opt-in/confirmation system."
1199
  msgstr ""
1200
 
1201
+ #: wpf-admin/options-tabs/features.php:51
1202
  msgid "Topic subscription option on post editor"
1203
  msgstr ""
1204
 
1205
+ #: wpf-admin/options-tabs/features.php:51
1206
  msgid ""
1207
  "This option adds topic subscription checkbox next to new topic and post "
1208
  "submit button."
1209
  msgstr ""
1210
 
1211
+ #: wpf-admin/options-tabs/features.php:52
1212
  msgid "Topic subscription option on post editor - checked/enabled"
1213
  msgstr ""
1214
 
1215
+ #: wpf-admin/options-tabs/features.php:52
1216
  msgid ""
1217
  "Enable this option if you want the topic subscription checkbox to be checked "
1218
  "by default."
1219
  msgstr ""
1220
 
1221
+ #: wpf-admin/options-tabs/features.php:53
1222
+ msgid "Role-Usergroup Synchronization"
1223
+ msgstr ""
1224
+
1225
+ #: wpf-admin/options-tabs/features.php:53
1226
+ msgid ""
1227
+ "Keep enabled this option to synch WordPress User Roles with Forum "
1228
+ "Usergroups. This connection allows to automatically change Usergroup of a "
1229
+ "user when his/her User Role is changed by administrators or by membership "
1230
+ "plugins. In other words this option allows to manage Usergroups based on "
1231
+ "Users Roles, thus you can directly control users forum accesses based on "
1232
+ "Users Roles. If this option is turned off, User Roles don't have any "
1233
+ "affection to users forum accesses, they are only controlled by forum "
1234
+ "Usergroups."
1235
+ msgstr ""
1236
+
1237
+ #: wpf-admin/options-tabs/features.php:54 wpf-includes/wpf-phrases.php:641
1238
  msgid "Insert Forum Attachments to Media Library"
1239
  msgstr ""
1240
 
1241
+ #: wpf-admin/options-tabs/features.php:54 wpf-includes/wpf-phrases.php:642
1242
  msgid ""
1243
  "Enable this option to be able manage forum attachments in Dashboard > Media "
1244
  "> Library admin page."
1245
  msgstr ""
1246
 
1247
+ #: wpf-admin/options-tabs/features.php:55 wpf-includes/wpf-phrases.php:606
1248
  msgid "Enable Debug Mode"
1249
  msgstr ""
1250
 
1251
+ #: wpf-admin/options-tabs/features.php:55 wpf-includes/wpf-phrases.php:607
1252
  msgid ""
1253
  "If you got some issue with wpForo, please enable this option before asking "
1254
  "for support, this outputs hidden important information to help us debug your "
1255
  "issue."
1256
  msgstr ""
1257
 
1258
+ #: wpf-admin/options-tabs/features.php:56 wpf-includes/wpf-phrases.php:134
1259
  msgid "Help wpForo to grow, show plugin info"
1260
  msgstr ""
1261
 
1262
+ #: wpf-admin/options-tabs/features.php:56 wpf-includes/wpf-phrases.php:226
1263
  msgid ""
1264
  "Please enable this option to help wpForo get more popularity as your thank "
1265
  "to the hard work we do for you totally free. This option adds a very small "
1267
  "of forum solution you use."
1268
  msgstr ""
1269
 
1270
+ #: wpf-admin/options-tabs/features.php:74
1271
  msgid "Sitewide"
1272
  msgstr ""
1273
 
1274
+ #: wpf-admin/options-tabs/features.php:75 wpf-includes/wpf-phrases.php:101
1275
+ #: wpforo.php:246
1276
  msgid "Forum"
1277
  msgstr ""
1278
 
1279
+ #: wpf-admin/options-tabs/features.php:80
1280
  msgid "Thank you!"
1281
  msgstr ""
1282
 
1284
  msgid "Forum Base URL"
1285
  msgstr ""
1286
 
1287
+ #: wpf-admin/options-tabs/general.php:16
1288
+ msgid ""
1289
+ "If you want to set forum on home page, please do not use the \"Turn "
1290
+ "WordPress to wpForo\" option. The correct instruction can be found in "
1291
+ "documentation here"
1292
+ msgstr ""
1293
+
1294
+ #: wpf-admin/options-tabs/general.php:16
1295
+ msgid "Set Forum on Home Page"
1296
+ msgstr ""
1297
+
1298
+ #: wpf-admin/options-tabs/general.php:25 wpf-includes/wpf-phrases.php:651
1299
  msgid "Turn WordPress to wpForo"
1300
  msgstr ""
1301
 
1302
+ #: wpf-admin/options-tabs/general.php:26
1303
  msgid ""
1304
  "This option will disable WordPress on front-end. Only forum pages and "
1305
  "excluded post/pages will be available. wpForo will look like as a stand-"
1306
  "alone forum."
1307
  msgstr ""
1308
 
1309
+ #: wpf-admin/options-tabs/general.php:29
1310
  msgid "Exclude page URLs"
1311
  msgstr ""
1312
 
1313
+ #: wpf-admin/options-tabs/general.php:29
1314
  msgid "one URL per line"
1315
  msgstr ""
1316
 
1317
+ #: wpf-admin/options-tabs/general.php:39
1318
  msgid "Visit Forum"
1319
  msgstr ""
1320
 
1321
+ #: wpf-admin/options-tabs/general.php:42
1322
  msgid ""
1323
  "wpForo PageID doesn't exist. Forums will not be loaded, please read this"
1324
  msgstr ""
1325
 
1326
+ #: wpf-admin/options-tabs/general.php:42
1327
  msgid "support topic"
1328
  msgstr ""
1329
 
1330
+ #: wpf-admin/options-tabs/general.php:44
1331
  msgid "Forum Page ID"
1332
  msgstr ""
1333
 
1334
+ #: wpf-admin/options-tabs/general.php:49 wpf-includes/wpf-phrases.php:121
1335
  msgid "Forum Title"
1336
  msgstr ""
1337
 
1338
+ #: wpf-admin/options-tabs/general.php:53 wpf-includes/wpf-phrases.php:108
1339
  msgid "Forum Description"
1340
  msgstr ""
1341
 
1342
+ #: wpf-admin/options-tabs/general.php:58 wpf-includes/wpf-phrases.php:64
1343
  msgid "Dashboard Menu Position"
1344
  msgstr ""
1345
 
1346
+ #: wpf-admin/options-tabs/general.php:59 wpf-includes/wpf-phrases.php:323
1347
  msgid "The position in the menu order wpForo should appear."
1348
  msgstr ""
1349
 
1350
+ #: wpf-admin/options-tabs/general.php:60 wpf-includes/wpf-phrases.php:348
1351
  msgid ""
1352
  "Use greater than 5 - below Posts, 10 - below Media, 15 - below Links, 20 - "
1353
  "below Pages, 25 - below comments, 60 - below first separator, 65 - below "
1355
  "below second separator"
1356
  msgstr ""
1357
 
1358
+ #: wpf-admin/options-tabs/general.php:64
1359
  msgid "More info"
1360
  msgstr ""
1361
 
1362
+ #: wpf-admin/options-tabs/general.php:69
1363
+ msgid "XML Based Language"
1364
  msgstr ""
1365
 
1366
+ #: wpf-admin/options-tabs/general.php:70
1367
  msgid ""
1368
  "This option is only related to XML language files. You should upload a "
1369
  "translation XML file to have a new language option in this drop-down. If you "
1371
  "Dashboard > Settings admin page to load according translation for wpForo."
1372
  msgstr ""
1373
 
1374
+ #: wpf-admin/options-tabs/general.php:95 wpf-includes/wpf-phrases.php:144
1375
  msgid "Language XML file"
1376
  msgstr ""
1377
 
1378
+ #: wpf-admin/options-tabs/general.php:104 wpf-includes/wpf-phrases.php:22
1379
  msgid "Add New Language"
1380
  msgstr ""
1381
 
1389
  msgid "minutes"
1390
  msgstr ""
1391
 
1392
+ #: wpf-admin/options-tabs/members.php:20
1393
+ msgid "Number of Members per Page"
1394
+ msgstr ""
1395
+
1396
+ #: wpf-admin/options-tabs/members.php:27 wpf-includes/wpf-phrases.php:180
1397
  msgid "Members URL structure"
1398
  msgstr ""
1399
 
1400
+ #: wpf-admin/options-tabs/members.php:36 wpf-includes/wpf-phrases.php:701
1401
  msgid "Members Search Type"
1402
  msgstr ""
1403
 
1404
+ #: wpf-admin/options-tabs/members.php:39 wpf-includes/wpf-phrases.php:275
1405
  msgid "Search"
1406
  msgstr ""
1407
 
1408
+ #: wpf-admin/options-tabs/members.php:40
1409
  msgid "Filter"
1410
  msgstr ""
1411
 
1412
+ #: wpf-admin/options-tabs/members.php:46 wpf-includes/wpf-phrases.php:62
1413
  msgid "Custom Authorization URLs"
1414
  msgstr ""
1415
 
1416
+ #: wpf-admin/options-tabs/members.php:48
1417
  msgid ""
1418
  "Use this option only if you have set other pages for authorization. \n"
1419
  " wpForo doesn't change its own URLs, these options "
1422
  "Member plugin you can set these values:"
1423
  msgstr ""
1424
 
1425
+ #: wpf-admin/options-tabs/members.php:51 wpf-admin/options-tabs/members.php:57
1426
  #: wpf-includes/wpf-phrases.php:162
1427
  msgid "Login URL"
1428
  msgstr ""
1429
 
1430
+ #: wpf-admin/options-tabs/members.php:52 wpf-admin/options-tabs/members.php:58
1431
  #: wpf-includes/wpf-phrases.php:252
1432
  msgid "Register URL"
1433
  msgstr ""
1434
 
1435
+ #: wpf-admin/options-tabs/members.php:59 wpf-includes/wpf-phrases.php:164
1436
  msgid "Lost Password URL"
1437
  msgstr ""
1438
 
1439
+ #: wpf-admin/options-tabs/members.php:65
1440
  msgid "Custom Redirection URLs after following actions"
1441
  msgstr ""
1442
 
1443
+ #: wpf-admin/options-tabs/members.php:67
1444
  msgid "For member profile, account and subscription pages use following URLs:"
1445
  msgstr ""
1446
 
1447
+ #: wpf-admin/options-tabs/members.php:79
1448
  msgid "Redirect after login"
1449
  msgstr ""
1450
 
1451
+ #: wpf-admin/options-tabs/members.php:80
1452
  msgid "Redirect after registration"
1453
  msgstr ""
1454
 
1455
+ #: wpf-admin/options-tabs/members.php:81
1456
  msgid "Redirect after subscription confirmation"
1457
  msgstr ""
1458
 
1459
+ #: wpf-admin/options-tabs/members.php:87 wpf-includes/wpf-phrases.php:175
1460
  msgid "Member Reputation and Titles"
1461
  msgstr ""
1462
 
1463
+ #: wpf-admin/options-tabs/members.php:91
1464
  msgid "Member Custom Titles"
1465
  msgstr ""
1466
 
1467
+ #: wpf-admin/options-tabs/members.php:100
1468
  msgid "Member Custom Title by default"
1469
  msgstr ""
1470
 
1471
+ #: wpf-admin/options-tabs/members.php:110 wpf-includes/wpf-phrases.php:247
1472
  msgid "Rating Level"
1473
  msgstr ""
1474
 
1475
+ #: wpf-admin/options-tabs/members.php:111 wpf-includes/wpf-phrases.php:185
1476
  msgid "Min Number of Posts"
1477
  msgstr ""
1478
 
1479
+ #: wpf-admin/options-tabs/members.php:112 wpf-includes/wpf-phrases.php:176
1480
  msgid "Member Title"
1481
  msgstr ""
1482
 
1483
+ #: wpf-admin/options-tabs/members.php:113 wpf-includes/wpf-phrases.php:293
1484
  msgid "Short Badge"
1485
  msgstr ""
1486
 
1487
+ #: wpf-admin/options-tabs/members.php:114 wpf-includes/wpf-phrases.php:128
1488
  msgid "Full Badge"
1489
  msgstr ""
1490
 
1491
+ #: wpf-admin/options-tabs/members.php:115 wpf-includes/wpf-phrases.php:245
1492
  msgid "Rating Color"
1493
  msgstr ""
1494
 
1495
+ #: wpf-admin/options-tabs/members.php:116 wpf-includes/wpf-phrases.php:246
1496
  msgid "Rating Icon"
1497
  msgstr ""
1498
 
1499
+ #: wpf-admin/options-tabs/members.php:116 wpf-includes/wpf-phrases.php:187
1500
  msgid "More"
1501
  msgstr ""
1502
 
1503
+ #: wpf-admin/options-tabs/members.php:121 wpf-includes/wpf-phrases.php:158
1504
  msgid "Level"
1505
  msgstr ""
1506
 
1507
+ #: wpf-admin/options-tabs/members.php:122 wpf-includes/wpf-phrases.php:211
1508
  msgid "Number of Posts"
1509
  msgstr ""
1510
 
1511
+ #: wpf-admin/options-tabs/members.php:123 wpf-includes/wpf-phrases.php:63
1512
  msgid "Custom Title"
1513
  msgstr ""
1514
 
1515
+ #: wpf-admin/options-tabs/members.php:126 wpf-admin/usergroup.php:34
1516
  #: wpf-includes/wpf-phrases.php:56
1517
  msgid "Color"
1518
  msgstr ""
1519
 
1520
+ #: wpf-admin/options-tabs/members.php:127 wpf-includes/wpf-phrases.php:48
1521
  msgid "Badge Icon"
1522
  msgstr ""
1523
 
1524
+ #: wpf-admin/options-tabs/members.php:133
1525
  msgid "Enable Reputation Titles for selected usergroups"
1526
  msgstr ""
1527
 
1528
+ #: wpf-admin/options-tabs/members.php:134
1529
  msgid ""
1530
  "This option depends on \"Enable Member Rating Titles\" parent option, witch "
1531
  "located in wpForo Settings > Features Tab"
1532
  msgstr ""
1533
 
1534
+ #: wpf-admin/options-tabs/members.php:147
1535
  msgid "Enable Reputation Badges for selected usergroups"
1536
  msgstr ""
1537
 
1538
+ #: wpf-admin/options-tabs/members.php:148
1539
  msgid ""
1540
  "This option depends on \"Enable Member Rating\" parent option, witch located "
1541
  "in wpForo Settings > Features Tab"
1542
  msgstr ""
1543
 
1544
+ #: wpf-admin/options-tabs/members.php:161
1545
  msgid "Display Usergroup under Post Author Avatar"
1546
  msgstr ""
1547
 
1641
  msgid "Forum Color Styles"
1642
  msgstr ""
1643
 
1644
+ #: wpf-admin/options-tabs/styles.php:43
1645
+ msgid "Colors Documentation"
1646
  msgstr ""
1647
 
1648
  #: wpf-admin/options.php:8 wpf-includes/wpf-phrases.php:117
2022
  msgid "Forum Privacy Policy and GDPR compliant"
2023
  msgstr ""
2024
 
2025
+ #: wpf-admin/tools-tabs/legal.php:15
2026
+ msgid "Documentation"
2027
+ msgstr ""
2028
+
2029
  #: wpf-admin/tools-tabs/legal.php:18
2030
  msgid ""
2031
  "The General Data Protection Regulation (GDPR) (Regulation (EU) 2016/679) is "
2239
  "you do not want to be indexed one per line in the textarea bellow."
2240
  msgstr ""
2241
 
2242
+ #: wpf-admin/tools-tabs/misc.php:37
2243
+ msgid "Admin Note"
2244
+ msgstr ""
2245
+
2246
+ #: wpf-admin/tools-tabs/misc.php:45
2247
+ msgid "Admin message on forum front page"
2248
+ msgstr ""
2249
+
2250
+ #: wpf-admin/tools-tabs/misc.php:46
2251
+ msgid ""
2252
+ "If you have something important to say on forum front page, you can use this "
2253
+ "editor. The text will be displayed under forum breadcrumb menu, above forum "
2254
+ "and topic titles."
2255
+ msgstr ""
2256
+
2257
+ #: wpf-admin/tools-tabs/misc.php:64
2258
+ msgid "Display for Usergroups"
2259
+ msgstr ""
2260
+
2261
+ #: wpf-admin/tools-tabs/misc.php:86
2262
+ msgid "Display on forum pages"
2263
+ msgstr ""
2264
+
2265
+ #: wpf-admin/tools-tabs/misc.php:96
2266
+ msgid "Forum (topic list)"
2267
+ msgstr ""
2268
+
2269
+ #: wpf-admin/tools-tabs/misc.php:100
2270
+ msgid "Topic (post list)"
2271
+ msgstr ""
2272
+
2273
+ #: wpf-admin/tools-tabs/misc.php:104 wpf-includes/wpf-phrases.php:702
2274
+ msgid "Recent Posts"
2275
+ msgstr ""
2276
+
2277
+ #: wpf-admin/tools-tabs/misc.php:112
2278
+ msgid "Profile Home"
2279
+ msgstr ""
2280
+
2281
+ #: wpf-admin/tools-tabs/misc.php:116
2282
+ msgid "Profile Account"
2283
+ msgstr ""
2284
+
2285
+ #: wpf-admin/tools-tabs/misc.php:120
2286
+ msgid "Profile Activity"
2287
+ msgstr ""
2288
+
2289
+ #: wpf-admin/tools-tabs/misc.php:124
2290
+ msgid "Profile Subscriptions"
2291
+ msgstr ""
2292
+
2293
  #: wpf-admin/tools.php:8
2294
  msgid "Forum Tools"
2295
  msgstr ""
2306
  msgid "Misc"
2307
  msgstr ""
2308
 
2309
+ #: wpf-admin/usergroup.php:12
2310
+ msgid "Role-Usergroup synchronization is complete!"
2311
  msgstr ""
2312
 
2313
+ #: wpf-admin/usergroup.php:14 wpf-admin/usergroup.php:16
2314
+ #: wpf-includes/class-notices.php:118 wpf-includes/wpf-phrases.php:69
2315
+ msgid "Dismiss this notice."
2316
+ msgstr ""
2317
+
2318
+ #: wpf-admin/usergroup.php:28 wpf-admin/usergroup.php:154
2319
+ #: wpf-admin/usergroup.php:282
2320
+ msgid "User Role"
2321
  msgstr ""
2322
 
2323
+ #: wpf-admin/usergroup.php:30 wpf-includes/wpf-phrases.php:677
2324
+ msgid "Usergroup"
2325
  msgstr ""
2326
 
2327
+ #: wpf-admin/usergroup.php:32 wpf-includes/wpf-hooks.php:1155
2328
+ msgid "Default"
2329
  msgstr ""
2330
 
2331
+ #: wpf-admin/usergroup.php:33
2332
  msgid "Default Access"
2333
  msgstr ""
2334
 
2335
+ #: wpf-admin/usergroup.php:35
2336
+ msgid "ID"
2337
+ msgstr ""
2338
+
2339
+ #: wpf-admin/usergroup.php:46 wpf-admin/usergroup.php:167
2340
+ msgid "View Users"
2341
+ msgstr ""
2342
+
2343
+ #: wpf-admin/usergroup.php:63 wpf-admin/usergroup.php:242
2344
+ msgid "Usergroup Name"
2345
+ msgstr ""
2346
+
2347
+ #: wpf-admin/usergroup.php:65
2348
+ msgid "Also used as Secondary Usergroup"
2349
+ msgstr ""
2350
+
2351
+ #: wpf-admin/usergroup.php:68
2352
  msgid "Edit this usergroup"
2353
  msgstr ""
2354
 
2355
+ #: wpf-admin/usergroup.php:68 wpf-includes/wpf-phrases.php:73
2356
  msgid "Edit"
2357
  msgstr ""
2358
 
2359
+ #: wpf-admin/usergroup.php:70
2360
  msgid "Delete this usergroup"
2361
  msgstr ""
2362
 
2363
+ #: wpf-admin/usergroup.php:72
2364
  msgid "View users list in this usergroup"
2365
  msgstr ""
2366
 
2367
+ #: wpf-admin/usergroup.php:77
2368
+ msgid "The number of forum members with this usergroup. Click to view members."
2369
  msgstr ""
2370
 
2371
+ #: wpf-admin/usergroup.php:82
2372
  msgid "is Default"
2373
  msgstr ""
2374
 
2375
+ #: wpf-admin/usergroup.php:85
2376
+ msgid "Users get the Default Usergroup on registration"
2377
  msgstr ""
2378
 
2379
+ #: wpf-admin/usergroup.php:85
2380
  msgid "Set as Default"
2381
  msgstr ""
2382
 
2383
+ #: wpf-admin/usergroup.php:93
2384
  msgid "default (#15)"
2385
  msgstr ""
2386
 
2387
+ #: wpf-admin/usergroup.php:105
2388
+ msgid "Synchronize Users Usergroups and Roles"
2389
+ msgstr ""
2390
+
2391
+ #: wpf-admin/usergroup.php:106
2392
+ msgid "Synchronize"
2393
+ msgstr ""
2394
+
2395
+ #: wpf-admin/usergroup.php:136
2396
+ msgid "Note:"
2397
+ msgstr ""
2398
+
2399
+ #: wpf-admin/usergroup.php:137
2400
+ #, php-format
2401
+ msgid ""
2402
+ "The [Synchronize] button changes all users Usergroups according to the users "
2403
+ "Roles. For example, if you select \"Contributor\" Role for \"Registered\" "
2404
+ "Usergroup, all users with \"Contributor\" Role will get \"Registered\" "
2405
+ "Usergroup in forum. The synchronization process may take a few seconds or "
2406
+ "dozens of minutes, it depends on the number of users. Please be patient, "
2407
+ "don't close this page and wait until the progress counter says "
2408
+ "100% completed."
2409
+ msgstr ""
2410
+
2411
+ #: wpf-admin/usergroup.php:146
2412
+ msgid "User Roles"
2413
+ msgstr ""
2414
+
2415
+ #: wpf-admin/usergroup.php:148
2416
+ msgid ""
2417
+ "In the table above (Usergroups) you can see the list of all available forum "
2418
+ "Usergroups. The first column of this table displays selected User Roles "
2419
+ "which are synched with certain Usergroup. However some User Roles are still "
2420
+ "not synced with any Usergroup of your forum. You can find not-synced User "
2421
+ "Roles in the table below (User Roles). If you use any of these not-synced "
2422
+ "User Roles and you want to grant some forum accesses to users of these User "
2423
+ "Roles you should create new Usergroups for each of them. Once new Usergroup "
2424
+ "is created, you should use the [Synchronize] button in the table above to "
2425
+ "synchronize User Roles with new Usergroups."
2426
+ msgstr ""
2427
+
2428
+ #: wpf-admin/usergroup.php:153
2429
+ msgid "Role Name"
2430
+ msgstr ""
2431
+
2432
+ #: wpf-admin/usergroup.php:156
2433
+ msgid "Users"
2434
+ msgstr ""
2435
+
2436
+ #: wpf-admin/usergroup.php:157
2437
+ msgid "Status"
2438
+ msgstr ""
2439
+
2440
+ #: wpf-admin/usergroup.php:171
2441
+ msgid "Add Usergroup to synch"
2442
+ msgstr ""
2443
+
2444
+ #: wpf-admin/usergroup.php:173
2445
+ msgid "Not Synched"
2446
+ msgstr ""
2447
+
2448
+ #: wpf-admin/usergroup.php:174
2449
+ msgid "One User Role cannot be synched with multiple Usergroups."
2450
+ msgstr ""
2451
+
2452
+ #: wpf-admin/usergroup.php:176
2453
+ msgid "Synched"
2454
+ msgstr ""
2455
+
2456
+ #: wpf-admin/usergroup.php:213
2457
+ msgid "Complete!"
2458
+ msgstr ""
2459
+
2460
+ #: wpf-admin/usergroup.php:242 wpf-includes/wpf-phrases.php:133
2461
  msgid "Guest"
2462
  msgstr ""
2463
 
2464
+ #: wpf-admin/usergroup.php:258
2465
  msgid "Usergroup Color"
2466
  msgstr ""
2467
 
2468
+ #: wpf-admin/usergroup.php:259
2469
  msgid "use default link color"
2470
  msgstr ""
2471
 
2472
+ #: wpf-admin/usergroup.php:291
 
 
 
 
2473
  msgid "Default Forum Access"
2474
  msgstr ""
2475
 
2476
+ #: wpf-admin/usergroup.php:299
2477
  msgid ""
2478
  "This is only used when a new Usergroup is created, it automatically gets the "
2479
  "selected Forum Access in all forums."
2480
  msgstr ""
2481
 
2482
+ #: wpf-admin/usergroup.php:303
2483
  msgid "Display on Members List"
2484
  msgstr ""
2485
 
2486
+ #: wpf-admin/usergroup.php:307
2487
+ msgid "Can be also used as Secondary Usergroup"
2488
+ msgstr ""
2489
+
2490
+ #: wpf-admin/usergroup.php:327 wpf-includes/wpf-phrases.php:374
2491
  msgid "add"
2492
  msgstr ""
2493
 
2494
+ #: wpf-admin/usergroup.php:327
2495
  msgid "save"
2496
  msgstr ""
2497
 
2498
+ #: wpf-admin/usergroup.php:348
2499
  msgid "Delete Chosen Usergroup And Users"
2500
  msgstr ""
2501
 
2502
+ #: wpf-admin/usergroup.php:358
2503
  msgid "Delete Chosen Usergroup And Join Users To Other Usergroup"
2504
  msgstr ""
2505
 
2506
+ #: wpf-admin/usergroup.php:370
2507
  msgid "Users will be join this usergroup"
2508
  msgstr ""
2509
 
2510
+ #: wpf-includes/class-api.php:203
2511
  msgid "Please login into Facebook and then click connect button again"
2512
  msgstr ""
2513
 
2514
+ #: wpf-includes/class-api.php:230
2515
  msgid ""
2516
  "Your email is required to be able authorize you here. Please try loging "
2517
  "again. "
2518
  msgstr ""
2519
 
2520
+ #: wpf-includes/class-api.php:235
2521
  msgid "Invalid User"
2522
  msgstr ""
2523
 
2524
+ #: wpf-includes/class-api.php:245 wpf-includes/wpf-phrases.php:639
2525
  msgid "User registration is disabled"
2526
  msgstr ""
2527
 
2528
+ #: wpf-includes/class-forums.php:666
2529
  msgid "Add a new Subforum"
2530
  msgstr ""
2531
 
2532
+ #: wpf-includes/class-forums.php:666
2533
  msgid "Add a new Forum in this Category"
2534
  msgstr ""
2535
 
2536
+ #: wpf-includes/class-members.php:137
2537
  msgid "<strong>ERROR</strong>: Please enter a username."
2538
  msgstr ""
2539
 
2540
+ #: wpf-includes/class-members.php:142
2541
  msgid ""
2542
  "<strong>ERROR</strong>: This username is invalid because it uses illegal "
2543
  "characters. Please enter a valid username."
2544
  msgstr ""
2545
 
2546
+ #: wpf-includes/class-members.php:153
2547
  msgid ""
2548
  "<strong>ERROR</strong>: This username is already registered. Please choose "
2549
  "another one."
2550
  msgstr ""
2551
 
2552
+ #: wpf-includes/class-members.php:158
2553
  msgid "<strong>ERROR</strong>: Sorry, that username is not allowed."
2554
  msgstr ""
2555
 
2556
+ #: wpf-includes/class-members.php:163
2557
  msgid "<strong>ERROR</strong>: Please type your email address."
2558
  msgstr ""
2559
 
2560
+ #: wpf-includes/class-members.php:168
2561
  msgid "<strong>ERROR</strong>: The email address isn&#8217;t correct."
2562
  msgstr ""
2563
 
2564
+ #: wpf-includes/class-members.php:174
2565
  msgid ""
2566
  "<strong>ERROR</strong>: This email is already registered, please choose "
2567
  "another one."
2568
  msgstr ""
2569
 
2570
+ #: wpf-includes/class-members.php:1801
2571
  msgid "What should be done with wpForo content owned by this user?"
2572
  msgstr ""
2573
 
2574
+ #: wpf-includes/class-members.php:1803
2575
  msgid "What should be done with wpForo content owned by these users?"
2576
  msgstr ""
2577
 
2578
+ #: wpf-includes/class-members.php:1807
2579
  msgid "Delete all wpForo content."
2580
  msgstr ""
2581
 
2582
+ #: wpf-includes/class-members.php:1809
2583
  msgid "Attribute all content to:"
2584
  msgstr ""
2585
 
2589
  "Please moderate suspected files in Forums &gt; Tools &gt; Antispam Tab."
2590
  msgstr ""
2591
 
 
 
 
 
2592
  #: wpf-includes/class-notices.php:155
2593
  msgid "New Addons for Your Forum!"
2594
  msgstr ""
2635
  msgid "Open link in a new tab"
2636
  msgstr ""
2637
 
2638
+ #: wpf-includes/class-template.php:1454 wpf-includes/wpf-phrases.php:327
2639
  msgid "Theme file not readable"
2640
  msgstr ""
2641
 
2642
+ #: wpf-includes/functions-installation.php:663
2643
  msgid "Start Profile Synchronization"
2644
  msgstr ""
2645
 
2646
+ #: wpf-includes/functions-installation.php:663
2647
  msgid "Continue Synchronization"
2648
  msgstr ""
2649
 
2650
+ #: wpf-includes/functions-installation.php:666
2651
  msgid ""
2652
  "This process may take a few seconds or dozens of minutes, please be patient "
2653
  "and don't close this page."
2654
  msgstr ""
2655
 
2656
+ #: wpf-includes/functions-installation.php:667
2657
  msgid ""
2658
  "You can permanently disable this message in Dashboard > Forums > Features "
2659
  "admin page."
2660
  msgstr ""
2661
 
2662
+ #: wpf-includes/functions-installation.php:669
2663
  msgid "wpForo Forum Installation | "
2664
  msgstr ""
2665
 
2666
+ #: wpf-includes/functions-installation.php:670
2667
  msgid ""
2668
  "Forum users' profile data are not synchronized yet, this step is required! "
2669
  "Please click the button below to complete installation."
2670
  msgstr ""
2671
 
2672
+ #: wpf-includes/functions-installation.php:681
2673
  msgid ""
2674
  "This process may take a few seconds or dozens of minutes, please be patient "
2675
  "and don't close this page. Database backup is not required. If you got 500 "
2677
  "in MySQL server."
2678
  msgstr ""
2679
 
2680
+ #: wpf-includes/functions-installation.php:682
2681
  msgid "Updater Database"
2682
  msgstr ""
2683
 
2684
+ #: wpf-includes/functions-installation.php:683
2685
  msgid "wpForo - Update Database "
2686
  msgstr ""
2687
 
2688
+ #: wpf-includes/functions-installation.php:684
2689
  msgid "Please click the button below to complete wpForo update."
2690
  msgstr ""
2691
 
2755
  msgid "Display with Avatars"
2756
  msgstr ""
2757
 
2758
+ #: wpf-includes/functions.php:378
2759
  msgid "Unapproved"
2760
  msgstr ""
2761
 
2762
+ #: wpf-includes/functions.php:379
2763
  msgid "Published"
2764
  msgstr ""
2765
 
2766
+ #: wpf-includes/functions.php:388 wpf-includes/wpf-phrases.php:598
2767
  msgid "Active"
2768
  msgstr ""
2769
 
2770
+ #: wpf-includes/functions.php:389
2771
  msgid "Banned"
2772
  msgstr ""
2773
 
2774
+ #: wpf-includes/functions.php:402 wpf-includes/functions.php:704
2775
  #: wpf-includes/wpf-phrases.php:50
2776
  msgid "Bulk Actions"
2777
  msgstr ""
2778
 
2779
+ #: wpf-includes/functions.php:407 wpf-includes/functions.php:808
2780
  #: wpf-includes/wpf-phrases.php:36
2781
  msgid "Apply"
2782
  msgstr ""
2783
 
2784
+ #: wpf-includes/functions.php:416 wpf-includes/wpf-phrases.php:300
2785
  msgid "Show all forums"
2786
  msgstr ""
2787
 
2788
+ #: wpf-includes/functions.php:429 wpf-includes/wpf-phrases.php:350
2789
  msgid "filter by group"
2790
  msgstr ""
2791
 
2792
+ #: wpf-includes/functions.php:441
2793
  msgid "filter by status"
2794
  msgstr ""
2795
 
2796
+ #: wpf-includes/functions.php:457
2797
  msgid "filter by package"
2798
  msgstr ""
2799
 
2800
+ #: wpf-includes/functions.php:486
2801
  msgid "filter by user"
2802
  msgstr ""
2803
 
2804
+ #: wpf-includes/functions.php:506 wpf-includes/functions.php:712
2805
  #: wpf-includes/wpf-phrases.php:385
2806
  msgid "item"
2807
  msgstr ""
2808
 
2809
+ #: wpf-includes/functions.php:539 wpf-includes/functions.php:555
2810
  #: wpf-includes/wpf-phrases.php:284
2811
  msgid "Select All"
2812
  msgstr ""
2813
 
2814
+ #: wpf-includes/functions.php:544 wpf-includes/functions.php:560
2815
  msgid "Type"
2816
  msgstr ""
2817
 
2818
+ #: wpf-includes/functions.php:617 wpf-includes/wpf-phrases.php:383
2819
  msgid "edit user"
2820
  msgstr ""
2821
 
2822
+ #: wpf-includes/functions.php:621 wpf-includes/wpf-phrases.php:382
2823
  msgid "edit profile"
2824
  msgstr ""
2825
 
2826
+ #: wpf-includes/functions.php:626
2827
  msgid "unban user"
2828
  msgstr ""
2829
 
2830
+ #: wpf-includes/functions.php:626
2831
  msgid "ban user"
2832
  msgstr ""
2833
 
2834
+ #: wpf-includes/functions.php:626
2835
  msgid "Are you sure, you want to unban this user?"
2836
  msgstr ""
2837
 
2838
+ #: wpf-includes/functions.php:626
2839
  msgid "Are you sure, you want to ban this user?"
2840
  msgstr ""
2841
 
2842
+ #: wpf-includes/functions.php:631 wpf-includes/functions.php:641
2843
  #: wpf-includes/wpf-phrases.php:67
2844
  msgid "Delete this item"
2845
  msgstr ""
2846
 
2847
+ #: wpf-includes/functions.php:631 wpf-includes/functions.php:641
2848
  #: wpf-includes/wpf-phrases.php:41
2849
  msgid "Are you sure you want to DELETE this item?"
2850
  msgstr ""
2851
 
2852
+ #: wpf-includes/functions.php:636
2853
  msgid "unapprove this item"
2854
  msgstr ""
2855
 
2856
+ #: wpf-includes/functions.php:636
2857
  msgid "Approve this item"
2858
  msgstr ""
2859
 
2860
+ #: wpf-includes/functions.php:636 wpf-includes/wpf-phrases.php:686
2861
  msgid "unapprove"
2862
  msgstr ""
2863
 
2864
+ #: wpf-includes/functions.php:636 wpf-includes/wpf-phrases.php:685
2865
  msgid "approve"
2866
  msgstr ""
2867
 
2868
+ #: wpf-includes/functions.php:658 wpf-includes/functions.php:659
2869
  #: wpf-includes/wpf-phrases.php:404
2870
  msgid "view"
2871
  msgstr ""
2872
 
2873
+ #: wpf-includes/functions.php:683
2874
  msgid "Topic"
2875
  msgstr ""
2876
 
2877
+ #: wpf-includes/functions.php:683
2878
  msgid "Post"
2879
  msgstr ""
2880
 
2881
+ #: wpf-includes/functions.php:696 wpf-includes/wpf-phrases.php:200
2882
  msgid "No items found"
2883
  msgstr ""
2884
 
2885
+ #: wpf-includes/functions.php:807 wpf-includes/wpf-phrases.php:141
2886
  msgid "Items"
2887
  msgstr ""
2888
 
2889
+ #: wpf-includes/functions.php:1238
2890
  #, php-format
2891
  msgid "Could not write file %s"
2892
  msgstr ""
2895
  msgid "Search Forums..."
2896
  msgstr ""
2897
 
2898
+ #: wpf-includes/integration/buddypress.php:78 wpf-includes/wpf-phrases.php:789
2899
  msgid "Topics Started"
2900
  msgstr ""
2901
 
2902
+ #: wpf-includes/integration/buddypress.php:89 wpf-includes/wpf-phrases.php:790
2903
  msgid "Replies Created"
2904
  msgstr ""
2905
 
2906
+ #: wpf-includes/integration/buddypress.php:100 wpf-includes/wpf-phrases.php:791
2907
  msgid "Liked Posts"
2908
  msgstr ""
2909
 
2911
  msgid "Subscriptions"
2912
  msgstr ""
2913
 
2914
+ #: wpf-includes/integration/buddypress.php:524
2915
  msgid "Topic reply"
2916
  msgstr ""
2917
 
2918
+ #: wpf-includes/integration/buddypress.php:527
2919
  #, php-format
2920
  msgid "You have %d new replies"
2921
  msgstr ""
2922
 
2923
+ #: wpf-includes/integration/buddypress.php:531
2924
  #, php-format
2925
  msgid "You have %d new reply to %2$s from %3$s"
2926
  msgstr ""
2927
 
2928
+ #: wpf-includes/integration/buddypress.php:533
2929
  #, php-format
2930
  msgid "You have %d new reply to %s"
2931
  msgstr ""
2932
 
2933
+ #: wpf-includes/integration/buddypress.php:690
2934
  msgid "Are you sure you wanted to do that?"
2935
  msgstr ""
2936
 
2937
+ #: wpf-includes/integration/buddypress.php:694
2938
  msgid "You do not have permission to mark notifications for that user."
2939
  msgstr ""
2940
 
2941
+ #: wpf-includes/integration/ultimate-member.php:22
2942
+ #: wpf-includes/integration/ultimate-member.php:59
2943
+ msgid "User leaves a reply to wpForo topic"
2944
+ msgstr ""
2945
+
2946
+ #: wpf-includes/integration/ultimate-member.php:24
2947
+ #: wpf-includes/integration/ultimate-member.php:61
2948
+ msgid "When a member replies to one of my forum topics"
2949
+ msgstr ""
2950
+
2951
+ #: wpf-includes/integration/ultimate-member.php:27
2952
+ #: wpf-includes/integration/ultimate-member.php:64
2953
+ msgid "User replied to wpForo post"
2954
+ msgstr ""
2955
+
2956
+ #: wpf-includes/integration/ultimate-member.php:29
2957
+ #: wpf-includes/integration/ultimate-member.php:66
2958
+ msgid "When a member replies to one of my post in forum topics"
2959
+ msgstr ""
2960
+
2961
  #: wpf-includes/wpf-hooks.php:20 wpf-includes/wpf-phrases.php:136
2962
  msgid ""
2963
  "IMPORTANT! Uninstall is not a simple deactivation action. This action will "
2972
  msgid "Uninstall"
2973
  msgstr ""
2974
 
2975
+ #: wpf-includes/wpf-hooks.php:1120
2976
  msgid "Move"
2977
  msgstr ""
2978
 
2979
+ #: wpf-includes/wpf-hooks.php:1155
2980
  msgid "Clear"
2981
  msgstr ""
2982
 
2983
+ #: wpf-includes/wpf-hooks.php:1155
2984
+ msgid "Select Color"
2985
  msgstr ""
2986
 
2987
+ #: wpf-includes/wpf-hooks.php:1172
2988
+ msgid "Please check one of reasons before sending feedback!"
2989
  msgstr ""
2990
 
2991
+ #: wpf-includes/wpf-hooks.php:1189
2992
  msgid ""
2993
  "IMPORTANT: wpForo can't work with default permalink, please change permalink "
2994
  "structure"
2995
  msgstr ""
2996
 
2997
+ #: wpf-includes/wpf-hooks.php:1211
2998
+ msgid "Forum Profile Fields - wpForo"
2999
  msgstr ""
3000
 
3001
+ #: wpf-includes/wpf-hooks.php:1219
3002
+ msgid "Forum - Usergroup"
3003
+ msgstr ""
3004
+
3005
+ #: wpf-includes/wpf-hooks.php:1224
3006
+ #, php-format
3007
+ msgid ""
3008
+ "Forum Usergroups are synched with User Roles based on the %s. When you "
3009
+ "change this user Role the Usergroup is automatically changed according to "
3010
+ "that table."
3011
+ msgstr ""
3012
+
3013
+ #: wpf-includes/wpf-hooks.php:1234
3014
+ msgid "Role-Usergroup Synchronization is Turned ON!"
3015
  msgstr ""
3016
 
3017
+ #: wpf-includes/wpf-hooks.php:1235
3018
+ msgid ""
3019
+ "This user Usergroup is automatically changed according to current Role. If "
3020
+ "you want to disable Role-Usergroup synchronization and manage Usergroups and "
3021
+ "User Roles independently, please navigate to <b>Forums > Settings > "
3022
+ "Features</b> admin page and disable \"Role-Usergroup Synchronization\" "
3023
+ "option."
3024
+ msgstr ""
3025
+
3026
+ #: wpf-includes/wpf-hooks.php:1246
3027
+ msgid "Forum - Secondary Usergroups"
3028
+ msgstr ""
3029
+
3030
+ #: wpf-includes/wpf-hooks.php:1267
3031
+ msgid "Forum - User Timezone"
3032
+ msgstr ""
3033
+
3034
+ #: wpf-includes/wpf-hooks.php:1564 wpf-includes/wpf-hooks.php:1663
3035
  msgid "Please Moderate: "
3036
  msgstr ""
3037
 
3038
+ #: wpf-includes/wpf-hooks.php:1565
3039
  msgid ""
3040
  "This topic is currently unapproved. You can approve topics in Dashboard "
3041
  "&raquo; Forums &raquo; Moderation admin page."
3042
  msgstr ""
3043
 
3044
+ #: wpf-includes/wpf-hooks.php:1664
3045
  msgid ""
3046
  "This post is currently unapproved. You can approve posts in Dashboard "
3047
  "&raquo; Forums &raquo; Moderation admin page."
3048
  msgstr ""
3049
 
3050
+ #: wpf-includes/wpf-hooks.php:1845 wpf-includes/wpf-hooks.php:1908
3051
  msgid "New Forum"
3052
  msgstr ""
3053
 
3054
+ #: wpf-includes/wpf-hooks.php:1853
3055
  msgid "New User Group"
3056
  msgstr ""
3057
 
3058
+ #: wpf-includes/wpf-hooks.php:1861 wpf-includes/wpf-hooks.php:1976
3059
  msgid "New Phrase"
3060
  msgstr ""
3061
 
3062
+ #: wpf-includes/wpf-hooks.php:1869 wpf-includes/wpf-phrases.php:109
3063
+ msgid "Forum Home"
3064
+ msgstr ""
3065
+
3066
+ #: wpf-includes/wpf-hooks.php:1884
3067
  msgid "Community"
3068
  msgstr ""
3069
 
3070
+ #: wpf-includes/wpf-hooks.php:1891
3071
+ msgid "Forum Dashboard"
3072
+ msgstr ""
3073
+
3074
+ #: wpf-includes/wpf-hooks.php:1960
3075
  msgid "New Usergroup"
3076
  msgstr ""
3077
 
3251
  msgid "Forum Admin Email Addresses"
3252
  msgstr ""
3253
 
3254
+ #: wpf-includes/wpf-phrases.php:110
3255
+ msgid "Forum Language"
3256
  msgstr ""
3257
 
3258
  #: wpf-includes/wpf-phrases.php:111
3462
  msgid "No topics were found here"
3463
  msgstr ""
3464
 
3465
+ #: wpf-includes/wpf-phrases.php:208
3466
+ msgid "Not available"
3467
+ msgstr ""
3468
+
3469
  #: wpf-includes/wpf-phrases.php:214
3470
  msgid "Occupation"
3471
  msgstr ""
3970
  msgid "wpForo Navigation"
3971
  msgstr ""
3972
 
3973
+ #: wpf-includes/wpf-phrases.php:411
3974
+ msgid "wpForo User Timezone"
3975
+ msgstr ""
3976
+
3977
+ #: wpf-includes/wpf-phrases.php:412
3978
+ msgid "wpForo Usergroup"
3979
+ msgstr ""
3980
+
3981
  #: wpf-includes/wpf-phrases.php:414
3982
  msgid "{number}B"
3983
  msgstr ""
4256
  msgstr ""
4257
 
4258
  #: wpf-includes/wpf-phrases.php:488
4259
+ msgid "Success!"
4260
  msgstr ""
4261
 
4262
  #: wpf-includes/wpf-phrases.php:489
4876
  msgid "Done!"
4877
  msgstr ""
4878
 
4879
+ #: wpf-includes/wpf-phrases.php:671 wpf-includes/wpf-phrases.php:775
4880
  msgid "You are not allowed to attach this file type"
4881
  msgstr ""
4882
 
4892
  msgid "Submit"
4893
  msgstr ""
4894
 
 
 
 
 
4895
  #: wpf-includes/wpf-phrases.php:678
4896
  msgid "Rating Title"
4897
  msgstr ""
4948
  msgid "Reset Result"
4949
  msgstr ""
4950
 
 
 
 
 
4951
  #: wpf-includes/wpf-phrases.php:703
4952
  msgid "No posts were found here"
4953
  msgstr ""
5129
  "old URL of this topic will no longer be available."
5130
  msgstr ""
5131
 
5132
+ #: wpf-includes/wpf-phrases.php:751
5133
+ msgid "No data submitted"
5134
+ msgstr ""
5135
+
5136
+ #: wpf-includes/wpf-phrases.php:752
5137
+ msgid "User profile fields not found"
5138
+ msgstr ""
5139
+
5140
+ #: wpf-includes/wpf-phrases.php:753
5141
+ msgid "field is required"
5142
+ msgstr ""
5143
+
5144
+ #: wpf-includes/wpf-phrases.php:754
5145
+ #, php-format
5146
+ msgid "field value must be at least %d"
5147
+ msgstr ""
5148
+
5149
+ #: wpf-includes/wpf-phrases.php:755
5150
+ #, php-format
5151
+ msgid "field value cannot be greater than %d"
5152
+ msgstr ""
5153
+
5154
+ #: wpf-includes/wpf-phrases.php:756
5155
+ #, php-format
5156
+ msgid "field length must be at least %d characters"
5157
+ msgstr ""
5158
+
5159
+ #: wpf-includes/wpf-phrases.php:757
5160
+ #, php-format
5161
+ msgid "field length can not be greater than %d characters"
5162
+ msgstr ""
5163
+
5164
+ #: wpf-includes/wpf-phrases.php:758
5165
+ msgid "field value is not a valid URL"
5166
+ msgstr ""
5167
+
5168
+ #: wpf-includes/wpf-phrases.php:759
5169
+ msgid "file type is not detected"
5170
+ msgstr ""
5171
+
5172
+ #: wpf-includes/wpf-phrases.php:760
5173
+ #, php-format
5174
+ msgid "file type %s is not allowed"
5175
+ msgstr ""
5176
+
5177
+ #: wpf-includes/wpf-phrases.php:761
5178
+ msgid "file is too large"
5179
+ msgstr ""
5180
+
5181
+ #: wpf-includes/wpf-phrases.php:762
5182
+ msgid "Success! Please check your mail for confirmation."
5183
+ msgstr ""
5184
+
5185
+ #: wpf-includes/wpf-phrases.php:763
5186
+ #, php-format
5187
+ msgid "Username length must be between %d characters and %d characters."
5188
+ msgstr ""
5189
+
5190
+ #: wpf-includes/wpf-phrases.php:764
5191
+ msgid "User registration is disabled."
5192
+ msgstr ""
5193
+
5194
+ #: wpf-includes/wpf-phrases.php:765
5195
+ msgid "Avatar image is too big maximum allowed size is 2MB"
5196
+ msgstr ""
5197
+
5198
+ #: wpf-includes/wpf-phrases.php:766
5199
+ msgid "One of the selected Usergroups cannot be set as Secondary"
5200
+ msgstr ""
5201
+
5202
+ #: wpf-includes/wpf-phrases.php:767
5203
+ msgid "The selected Usergroup is not found in allowed list"
5204
+ msgstr ""
5205
+
5206
+ #: wpf-includes/wpf-phrases.php:768
5207
+ msgid "The selected Usergroup cannot be set"
5208
+ msgstr ""
5209
+
5210
+ #: wpf-includes/wpf-phrases.php:769
5211
+ msgid "Admin and Moderator Usergroups are not permitted"
5212
+ msgstr ""
5213
+
5214
+ #: wpf-includes/wpf-phrases.php:770
5215
+ msgid "You have no permission to edit Usergroup field"
5216
+ msgstr ""
5217
+
5218
+ #: wpf-includes/wpf-phrases.php:771
5219
+ msgid "This nickname is already in use. Please insert another."
5220
+ msgstr ""
5221
+
5222
+ #: wpf-includes/wpf-phrases.php:772
5223
+ msgid "Nickname validation failed"
5224
+ msgstr ""
5225
+
5226
+ #: wpf-includes/wpf-phrases.php:773
5227
+ msgid "Numerical nicknames are not allowed. Please insert another."
5228
+ msgstr ""
5229
+
5230
+ #: wpf-includes/wpf-phrases.php:774
5231
+ #, php-format
5232
+ msgid "Maximum allowed file size is %s MB"
5233
+ msgstr ""
5234
+
5235
+ #: wpf-includes/wpf-phrases.php:776
5236
+ msgid "This email address is already registered. Please insert another"
5237
+ msgstr ""
5238
+
5239
+ #: wpf-includes/wpf-phrases.php:777
5240
+ #, php-format
5241
+ msgid "Allowed file types: %s"
5242
+ msgstr ""
5243
+
5244
+ #: wpf-includes/wpf-phrases.php:778
5245
+ msgid "Form name not found"
5246
+ msgstr ""
5247
+
5248
+ #: wpf-includes/wpf-phrases.php:779
5249
+ msgid "Form template not found"
5250
+ msgstr ""
5251
+
5252
+ #: wpf-includes/wpf-phrases.php:780
5253
+ msgid "Profile updated successfully"
5254
+ msgstr ""
5255
+
5256
+ #: wpf-includes/wpf-phrases.php:781
5257
+ msgid "User data update failed"
5258
+ msgstr ""
5259
+
5260
+ #: wpf-includes/wpf-phrases.php:782
5261
+ msgid "User profile update failed"
5262
+ msgstr ""
5263
+
5264
+ #: wpf-includes/wpf-phrases.php:783
5265
+ msgid "User custom field update failed"
5266
+ msgstr ""
5267
+
5268
+ #: wpf-includes/wpf-phrases.php:784
5269
+ msgid "Sorry, there was an error uploading attached file"
5270
+ msgstr ""
5271
+
5272
+ #: wpf-includes/wpf-phrases.php:785
5273
+ msgid "Edit Topic"
5274
+ msgstr ""
5275
+
5276
+ #: wpf-includes/wpf-phrases.php:786
5277
+ #, php-format
5278
+ msgid "This topic was modified %s by %s"
5279
+ msgstr ""
5280
+
5281
+ #: wpf-includes/wpf-phrases.php:787
5282
+ msgid "Edit Post"
5283
+ msgstr ""
5284
+
5285
+ #: wpf-includes/wpf-phrases.php:788
5286
+ #, php-format
5287
+ msgid "This post was modified %s by %s"
5288
+ msgstr ""
5289
+
5290
+ #: wpf-includes/wpf-phrases.php:792
5291
+ msgid "Topic link"
5292
+ msgstr ""
5293
+
5294
+ #: wpf-includes/wpf-phrases.php:793
5295
+ msgid "Forum Topics Started"
5296
+ msgstr ""
5297
+
5298
+ #: wpf-includes/wpf-phrases.php:794
5299
+ msgid "Forum Replies Created"
5300
+ msgstr ""
5301
+
5302
+ #: wpf-includes/wpf-phrases.php:795
5303
+ msgid "Liked Forum Posts"
5304
+ msgstr ""
5305
+
5306
+ #: wpf-includes/wpf-phrases.php:796
5307
+ msgid "Forum Subscriptions"
5308
+ msgstr ""
5309
+
5310
  #: wpf-themes/classic/functions.php:39
5311
  msgid "Extended Layout - Recent topics"
5312
  msgstr ""
5360
  "post area."
5361
  msgstr ""
5362
 
5363
+ #: wpforo.php:247
5364
  msgid "Discussion Board"
5365
  msgstr ""
5366
 
5367
+ #: wpforo.php:756
5368
  msgid ""
5369
  "Allows to embed hundreds of video, social network, audio and photo content "
5370
  "providers in forum topics and posts."
5371
  msgstr ""
5372
 
5373
+ #: wpforo.php:757
5374
  msgid ""
5375
  "wpForo Polls is a complete addon to help forum members create, vote and "
5376
  "manage polls effectively. Comes with poll specific permissions and settings."
5377
  msgstr ""
5378
 
5379
+ #: wpforo.php:758
5380
  msgid ""
5381
  "Awards myCRED points for forum activity. Integrates myCRED Badges and Ranks. "
5382
  "Converts wpForo topic and posts, likes to myCRED points."
5383
  msgstr ""
5384
 
5385
+ #: wpforo.php:759
5386
  msgid ""
5387
  "Advanced user profile builder system. Allows to add new fields and manage "
5388
  "profile page. Creates custom Registration, Account, Member Search forms."
5389
  msgstr ""
5390
 
5391
+ #: wpforo.php:760
5392
  msgid ""
5393
  "Adds an advanced file attachment system to forum topics and posts. AJAX "
5394
  "powered media uploading and displaying system with user specific library."
5395
  msgstr ""
5396
 
5397
+ #: wpforo.php:761
5398
  msgid ""
5399
  "Provides a safe way to communicate directly with other members. Messages are "
5400
  "private and can only be viewed by conversation participants."
5401
  msgstr ""
5402
 
5403
+ #: wpforo.php:762
5404
  msgid ""
5405
  "Blog to Forum and Forum to Blog content synchronization. Blog posts with "
5406
  "Forum topics and Blog comments with Forum replies."
5407
  msgstr ""
5408
 
5409
+ #: wpforo.php:763
5410
  msgid ""
5411
  "Ads Manager is a powerful yet simple advertisement management system, that "
5412
  "allows you to add adverting banners between forums, topics and posts."
wpf-themes/classic/.gitignore DELETED
@@ -1 +0,0 @@
1
- colors.css
 
wpf-themes/classic/colors.css ADDED
@@ -0,0 +1,503 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* wpForo Dynamic CSS Document */
2
+
3
+ #wpforo-wrap { color: #333333; background: #ffffff }
4
+ #wpforo-wrap .wpforo-subforum i{ color:#999999; }
5
+ #wpforo-wrap #footer { background:#e6e6e6;}
6
+ #wpforo-wrap .wpf-p-error { background-color: #e6e6e6; color: #333333; }
7
+ #wpforo-wrap .wpf-res-menu { color: #ffffff; }
8
+ #wpforo-wrap #wpforo-menu { background-color:#555555; }
9
+ #wpforo-wrap #wpforo-menu li { border-right:#777777 1px solid; }
10
+ #wpforo-wrap #wpforo-menu li a { color: #ffffff; }
11
+
12
+ #wpforo-wrap .wpforo-active,
13
+ #wpforo-wrap #wpforo-menu li:hover,
14
+ #wpforo-wrap #wpforo-menu .current-menu-ancestor,
15
+ #wpforo-wrap #wpforo-menu .current-menu-parent,
16
+ #wpforo-wrap #wpforo-menu .current_page_item { background-color: #43a6df!important; }
17
+
18
+ #wpforo-load { color: #43a6df; }
19
+ #wpforo-load i{ color: #43a6df!important; }
20
+
21
+ #wpforo-wrap .wpf-search input[type="text"]{ color: #555555; background: transparent; }
22
+ #wpforo-wrap .wpf-search input[type="text"]:focus{ background: #f5f5f5; }
23
+ #wpforo-wrap .wpf-search i{ color: #43a6df; }
24
+
25
+ #wpforo-wrap #wpforo-poweredby{ background-color:#555555; color: #ffffff; }
26
+ #wpforo-wrap #wpforo-title{ color:#333333;}
27
+ #wpforo-wrap #wpforo-description{color:#555555;border-bottom:1px solid #cccccc;}
28
+
29
+ #wpforo-wrap a { color: #3f7796; }
30
+ #wpforo-wrap a:visited { color: #3f7796; }
31
+ #wpforo-wrap a:hover{ color: #659fbe;}
32
+ #wpforo-wrap a:active { color: #659fbe; }
33
+
34
+ #wpforo-wrap .wpflink { color: #3f7796; }
35
+ #wpforo-wrap .wpflink:hover { color: #659fbe; }
36
+
37
+ #wpforo-wrap pre { border:#e6e6e6 1px solid; background:#dff4ff; }
38
+
39
+ .wpfcl-a{ color:#659fbe!important; }
40
+ .wpfbg-a{ background-color:#659fbe!important; }
41
+ .wpfcl-b{ color:#43a6df!important; }
42
+ .wpfbg-b{ background-color:#43a6df!important; }
43
+ .wpfcl-0{ color:#999999!important; }
44
+ .wpfbg-0{ background-color:#999999!important; }
45
+ .wpfcl-1{ color:#555555!important; }
46
+ .wpfbg-1{ background-color:#555555!important; }
47
+ .wpfcl-2{ color:#777777!important; }
48
+ .wpfbg-2{ background-color:#777777!important; }
49
+ .wpfcl-3{ color:#ffffff!important; }
50
+ .wpfbg-3{ background-color:#ffffff!important; }
51
+ .wpfcl-4{ color:#72ccfc!important;}
52
+ .wpfbg-4{ background-color:#72ccfc!important; }
53
+ .wpfcl-5{ color:#ff812d!important; }
54
+ .wpfbg-5{ background-color:#ff812d!important; }
55
+ .wpfcl-6{ color:#0099cc!important; }
56
+ .wpfbg-6{ background-color:#0099cc!important; }
57
+ .wpfcl-7{ color:#e6e6e6!important; }
58
+ .wpfbg-7{ background-color:#e6e6e6!important; }
59
+ .wpfcl-8{ color:#4dca5c!important; }
60
+ .wpfbg-8{ background-color:#4dca5c!important; }
61
+ .wpfcl-9{ color:#f5f5f5!important; }
62
+ .wpfbg-9{ background-color:#f5f5f5!important; }
63
+
64
+ #wpforo-wrap .author-rating { border: 1px solid #e6e6e6; background: #f5f5f5; }
65
+ #wpforo-wrap .wpf-author-nicename{ color:#777777;}
66
+ #wpforo-wrap .wpforo-admin-note{ border: 1px solid #e6e6e6; background: #ffffff; }
67
+
68
+ #wpforo-wrap .wpf-breadcrumb .wpf-root{ border-left:1px solid #666666; }
69
+ #wpforo-wrap .wpf-breadcrumb a.wpf-end { background: transparent!important; }
70
+ #wpforo-wrap .wpf-breadcrumb a.wpf-end:hover{ background: transparent!important; }
71
+ #wpforo-wrap .wpf-breadcrumb a { color:#666666; background: #ffffff;}
72
+ #wpforo-wrap .wpf-breadcrumb a:hover{ background:#f5f5f5; }
73
+ #wpforo-wrap .wpf-breadcrumb a:hover:after { background:#f5f5f5; }
74
+ #wpforo-wrap .wpf-breadcrumb a.active{ background:#f5f5f5; color:#4a8eb3; }
75
+ #wpforo-wrap .wpf-breadcrumb a.active:after { background:#f5f5f5; }
76
+ #wpforo-wrap .wpf-breadcrumb a:after { background: #ffffff; }
77
+ #wpforo-wrap .wpf-breadcrumb a.active:after { background: #f5f5f5; }
78
+
79
+ #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content img{ border:#e6e6e6 1px solid; background:#ffffff; }
80
+ #wpforo-wrap .wpforo-post .wpf-right blockquote{ border:#999999 1px dotted; background:#e6e6e6; }
81
+ #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-code{ border:#e6e6e6 1px solid; background:#e6e6e6; }
82
+ #wpforo-wrap .wpforo-post .wpf-right code{ border:#e6e6e6 1px solid; background:#e6e6e6; }
83
+ #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-code-title{ border-bottom:#e6e6e6 1px solid;}
84
+ #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-attachments{ border:#ffffff 1px dotted; }
85
+ #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-attachments img{border:#e6e6e6 2px solid; background:#ffffff; }
86
+ #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-signature{ border-top:#659fbe 1px dotted; color:#777777;}
87
+ #wpforo-wrap .wpforo-post .wpf-left .wpforo-membertoggle i{ color:#3f7796;}
88
+ #wpforo-wrap .wpforo-post .wpf-mod-message{color:#ff812d}
89
+
90
+ #wpforo-wrap .wpforo-topic-badges{ background-color:#f5f5f5; }
91
+
92
+ #wpforo-wrap .wpfl-1 .wpforo-category{ background-color: #43a6df; border-bottom:#cccccc 1px solid; }
93
+ #wpforo-wrap .wpfl-1 .cat-title{ color:#ffffff; }
94
+ #wpforo-wrap .wpfl-1 .cat-stat-posts { color:#ffffff; }
95
+ #wpforo-wrap .wpfl-1 .cat-stat-topics {color:#ffffff; }
96
+ #wpforo-wrap .wpfl-1 .forum-wrap{ border-top:#cccccc 1px solid; }
97
+ #wpforo-wrap .wpfl-1 .wpforo-forum{ background-color:#f5f5f5; }
98
+ #wpforo-wrap .wpfl-1 .wpforo-forum-description{color:#777777; }
99
+ #wpforo-wrap .wpfl-1 .wpforo-subforum{ border-top:#dadada 1px dotted; }
100
+ #wpforo-wrap .wpfl-1 .wpforo-forum-footer{ color:#999999; }
101
+ #wpforo-wrap .wpfl-1 .wpforo-last-topics{ background-color:#ffffff; }
102
+ #wpforo-wrap .wpfl-1 .wpforo-last-topics-tab{ color:#555555; }
103
+ #wpforo-wrap .wpfl-1 .wpforo-last-topics-list{ color:#555555; border-bottom:#cccccc 0px solid; }
104
+
105
+ #wpforo-wrap .wpfl-1 .wpforo-topic-head{ background-color: #43a6df; border-bottom:#cccccc 1px solid; }
106
+ #wpforo-wrap .wpfl-1 .head-title{ color:#ffffff; }
107
+ #wpforo-wrap .wpfl-1 .head-stat-posts { color:#ffffff; }
108
+ #wpforo-wrap .wpfl-1 .head-stat-views { color:#ffffff; }
109
+ #wpforo-wrap .wpfl-1 .topic-wrap{ border-top:#cccccc 1px solid; }
110
+ #wpforo-wrap .wpfl-1 .wpforo-topic{ background-color:#f5f5f5; }
111
+ #wpforo-wrap .wpfl-1 .wpforo-topic-info{ color:#555555; }
112
+ #wpforo-wrap .wpfl-1 .wpforo-topic-stat-posts{ color:#555555; }
113
+ #wpforo-wrap .wpfl-1 .wpforo-topic-stat-views{ color:#555555; }
114
+ #wpforo-wrap .wpfl-1 .wpforo-last-posts{ background-color:#ffffff; }
115
+ #wpforo-wrap .wpfl-1 .wpforo-last-posts-tab{ color:#555555; }
116
+ #wpforo-wrap .wpfl-1 .wpforo-last-posts-list{ color:#555555; border-bottom:#cccccc 0px solid; }
117
+
118
+ #wpforo-wrap .wpfl-1 .post-wrap{ border-top:none; border-bottom:#e6e6e6 3px solid; }
119
+ #wpforo-wrap .wpfl-1 .wpforo-post-head{ background-color: #43a6df; border-bottom:#cccccc 1px solid; }
120
+ #wpforo-wrap .wpfl-1 .wpforo-post{ background-color:#f5f5f5; }
121
+ #wpforo-wrap .wpfl-1 .wpforo-post .wpf-right .wpforo-post-content-top{ border-bottom:1px solid #e6e6e6; }
122
+ #wpforo-wrap .wpfl-1 .wpforo-post .wpf-left .avatar{ background:#ffffff; border:#e6e6e6 2px solid; }
123
+ #wpforo-wrap .wpfl-1 .wpforo-post .wpf-left .author-rating{ border:1px solid #e6e6e6; background:#f5f5f5; }
124
+ #wpforo-wrap .wpfl-1 .wpforo-post .bottom { border-top:#e6e6e6 1px solid; }
125
+ #wpforo-wrap .wpfl-1 .wpforo-post .bottom .bleft a{ color:#ff812d; }
126
+
127
+ #wpforo-wrap .wpfl-2 .wpforo-category{ background-color: #43a6df; border-bottom:#cccccc 1px solid; }
128
+ #wpforo-wrap .wpfl-2 .cat-title{ color:#ffffff; }
129
+ #wpforo-wrap .wpfl-2 .cat-lastpostinfo{ color:#ffffff; }
130
+ #wpforo-wrap .wpfl-2 .forum-wrap{ border-top:#cccccc 1px solid; }
131
+ #wpforo-wrap .wpfl-2 .wpforo-forum{ background-color:#f5f5f5;}
132
+ #wpforo-wrap .wpfl-2 .wpforo-forum-icon{ color:#555555; }
133
+ #wpforo-wrap .wpfl-2 .wpforo-forum-info{ color:#555555; }
134
+ #wpforo-wrap .wpfl-2 .wpforo-subforum{ border-top:#dadada 1px dotted;}
135
+ #wpforo-wrap .wpfl-2 .wpforo-forum-stat{ color:#ff812d; }
136
+ #wpforo-wrap .wpfl-2 .wpforo-last-post{ color:#555555; }
137
+ #wpforo-wrap .wpfl-2 .wpforo-last-post-avatar{ color:#555555 }
138
+ #wpforo-wrap .wpfl-2 .wpforo-last-post-avatar img{ background:#ffffff; border:1px solid #cccccc; }
139
+
140
+ #wpforo-wrap .wpfl-2 .wpforo-topic-head{ background-color: #43a6df; border-bottom:#cccccc 1px solid; }
141
+ #wpforo-wrap .wpfl-2 .head-title{ color:#ffffff;}
142
+ #wpforo-wrap .wpfl-2 .head-stat-posts { color:#ffffff; }
143
+ #wpforo-wrap .wpfl-2 .head-stat-views { color:#ffffff; }
144
+ #wpforo-wrap .wpfl-2 .head-stat-lastpost { color:#ffffff; }
145
+ #wpforo-wrap .wpfl-2 .topic-wrap{ border-top:#cccccc 1px solid; }
146
+ #wpforo-wrap .wpfl-2 .wpforo-topic{ background-color:#f5f5f5; }
147
+ #wpforo-wrap .wpfl-2 .wpforo-topic-avatar{color:#555555; }
148
+ #wpforo-wrap .wpfl-2 .wpforo-topic-avatar img{ background:#ffffff; border:1px solid #cccccc; }
149
+ #wpforo-wrap .wpfl-2 .wpforo-topic-info{ color:#555555; }
150
+ #wpforo-wrap .wpfl-2 .wpforo-topic-stat-posts{ color:#555555;}
151
+ #wpforo-wrap .wpfl-2 .wpforo-topic-stat-views{ color:#555555;}
152
+ #wpforo-wrap .wpfl-2 .wpforo-topic-stat-lastpost{ color:#555555;}
153
+
154
+ #wpforo-wrap .wpfl-2 .post-wrap{ border-top:#e6e6e6 1px solid; }
155
+ #wpforo-wrap .wpfl-2 .wpforo-post-head{ background-color: #43a6df; border-bottom:#cccccc 1px solid; }
156
+ #wpforo-wrap .wpfl-2 .wpforo-post{ background-color:#ffffff; }
157
+ #wpforo-wrap .wpfl-2 .wpforo-post .wpf-right{ background:#f5f5f5; }
158
+ #wpforo-wrap .wpfl-2 .wpforo-post .wpf-right .wpforo-post-content-bottom{ border-top:#ffffff 1px solid; background:#ffffff; }
159
+ #wpforo-wrap .wpfl-2 .wpforo-post .wpf-left .avatar{ background:#ffffff; border:#e6e6e6 2px solid; }
160
+ #wpforo-wrap .wpfl-2 .wpforo-post .wpf-right .wpforo-post-content-bottom .cbleft a{color:#ff812d;}
161
+
162
+ #wpforo-wrap .wpfl-3 .wpforo-category{ background-color: #43a6df;border-bottom:#cccccc 1px solid; }
163
+ #wpforo-wrap .wpfl-3 .cat-title{ color:#ffffff; }
164
+ #wpforo-wrap .wpfl-3 .cat-stat-posts { color:#ffffff; }
165
+ #wpforo-wrap .wpfl-3 .cat-stat-answers { color:#ffffff; }
166
+ #wpforo-wrap .wpfl-3 .cat-stat-questions { color:#ffffff; }
167
+ #wpforo-wrap .wpfl-3 .forum-wrap{ border-top:#cccccc 1px solid; }
168
+ #wpforo-wrap .wpfl-3 .wpforo-forum{ background-color:#f5f5f5; }
169
+ #wpforo-wrap .wpfl-3 .wpforo-forum-icon{ color:#555555; }
170
+ #wpforo-wrap .wpfl-3 .wpforo-forum-info{ color:#555555; }
171
+ #wpforo-wrap .wpfl-3 .wpforo-subforum{ border-top:#dadada 1px dotted; }
172
+ #wpforo-wrap .wpfl-3 .wpforo-forum-footer{ color:#999999; }
173
+ #wpforo-wrap .wpfl-3 .wpforo-forum-stat-posts{color:#555555;}
174
+ #wpforo-wrap .wpfl-3 .wpforo-forum-stat-answers{ color:#555555; }
175
+ #wpforo-wrap .wpfl-3 .wpforo-forum-stat-questions{color:#555555;}
176
+ #wpforo-wrap .wpfl-3 .wpforo-last-topics{ background-color:#ffffff; }
177
+ #wpforo-wrap .wpfl-3 .wpforo-last-topics-tab{ color:#555555; }
178
+ #wpforo-wrap .wpfl-3 .wpforo-last-topics-list{ color:#555555; border-bottom:#cccccc 0px solid; }
179
+ #wpforo-wrap .wpfl-3 .wpforo-last-topic-posts{ background:#f5f5f5; }
180
+ #wpforo-wrap .wpfl-3 .wpforo-last-topic .votes{ background:#f5f5f5; }
181
+ #wpforo-wrap .wpfl-3 .wpforo-last-topic .answers{ background:#f5f5f5; }
182
+ #wpforo-wrap .wpfl-3 .wpforo-last-topic .views{background:#f5f5f5; }
183
+
184
+ #wpforo-wrap .wpfl-3 .wpforo-topic-head{ background-color: #43a6df; border-bottom:#cccccc 2px solid; }
185
+ #wpforo-wrap .wpfl-3 .head-title{ color:#ffffff; }
186
+ #wpforo-wrap .wpfl-3 .head-stat-posts { color:#ffffff; }
187
+ #wpforo-wrap .wpfl-3 .head-stat-lastpost { color:#ffffff; }
188
+ #wpforo-wrap .wpfl-3 .topic-wrap{ border-top:#ffffff 1px solid; border-bottom:#e6e6e6 1px solid; }
189
+ #wpforo-wrap .wpfl-3 .wpforo-topic{ background-color:#f5f5f5; }
190
+ #wpforo-wrap .wpfl-3 .wpforo-topic-avatar{ color:#555555; }
191
+ #wpforo-wrap .wpfl-3 .wpforo-topic-avatar img{ background:#ffffff; border:1px solid #cccccc; }
192
+ #wpforo-wrap .wpfl-3 .wpforo-topic-info{ color:#555555; }
193
+ #wpforo-wrap .wpfl-3 .wpforo-topic-stat-lastpost{ color:#555555; }
194
+ #wpforo-wrap .wpfl-3 .wpforo-topic-status .votes{ background:#f5f5f5; }
195
+ #wpforo-wrap .wpfl-3 .wpforo-topic-status .answers{ background:#f5f5f5; }
196
+ #wpforo-wrap .wpfl-3 .wpforo-topic .views{ background:#f5f5f5; }
197
+ #wpforo-wrap .wpfl-3 .wpforo-topic .count{border-right:1px solid #e6e6e6; border-top:1px solid #e6e6e6;border-left:1px solid #e6e6e6;}
198
+ #wpforo-wrap .wpfl-3 .wpforo-topic .wpforo-label{border-right:1px solid #e6e6e6; border-bottom:1px solid #e6e6e6;border-left:1px solid #e6e6e6;}
199
+
200
+ #wpforo-wrap .wpfl-3 .post-wrap{ border-top:#e6e6e6 1px solid; }
201
+ #wpforo-wrap .wpfl-3 .wpforo-post-head{ background-color: #43a6df; border-bottom:#cccccc 1px solid; }
202
+ #wpforo-wrap .wpfl-3 .wpforo-post{ background-color:#ffffff; }
203
+ #wpforo-wrap .wpfl-3 .wpforo-post .wpf-left .wpf-toggle-answer{ color:#00a636; }
204
+ #wpforo-wrap .wpfl-3 .wpforo-post .wpf-left .wpf-toggle-not-answer{ color:#999999!important; }
205
+ #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right{ background:#f5f5f5; }
206
+ #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .wpforo-post-content-top{ border-bottom:1px dotted #e6e6e6; }
207
+ #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .wpforo-post-tool-bar{ border-top:1px dotted #e6e6e6; }
208
+ #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .wpforo-post-signature-content{ border-top:#659fbe 1px dotted; }
209
+ #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .wpforo-post-author-data-content{ border:#ffffff 1px solid; background:#dff4ff;}
210
+ #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .wpforo-post-author-data .avatar{ background:#ffffff; border:1px solid #cccccc; }
211
+ #wpforo-wrap .wpfl-3 .wpforo-comment{ background-color:#ffffff; }
212
+ #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right{ background:#f5f5f5; }
213
+
214
+ #wpforo-wrap .wpforo-profile-wrap .wpf-profile-plugin-menu .wpf-pp-menu .wpf-pp-menu-item{background:#ffffff; color: #777777; }
215
+ #wpforo-wrap .wpforo-profile-wrap .wpf-profile-plugin-menu .wpf-pp-menu .wpf-pp-menu-item:hover{background:#ffffff; color: #43a6df;}
216
+ #wpforo-wrap .wpforo-profile-wrap .wpf-profile-plugin-menu #wpf-pp-forum-menu .wpf-pp-menu-item{color:#43a6df; border-right:1px solid #43a6df;}
217
+ #wpforo-wrap .wpf-profile-section{color: #666666;}
218
+ #wpforo-wrap .wpf-profile-section .wpf-profile-section-head{border-bottom:1px solid #dadada;}
219
+ #wpforo-wrap .wpforo-profile-wrap .wpforo-profile-label{ border-bottom:#ffffff 1px solid; }
220
+ #wpforo-wrap .wpforo-profile-wrap .wpforo-profile-field{ border-bottom:#ffffff 1px solid; }
221
+ #wpforo-wrap .wpforo-profile-wrap .wpforo-profile-field input[type="file"],
222
+ #wpforo-wrap .wpforo-profile-wrap .wpforo-profile-field input[type="password"],
223
+ #wpforo-wrap .wpforo-profile-wrap .wpforo-profile-field input[type="text"],
224
+ #wpforo-wrap .wpforo-profile-wrap .wpforo-profile-field select,
225
+ #wpforo-wrap .wpforo-profile-wrap .wpforo-profile-field textarea { color:#555555; }
226
+ #wpforo-wrap .wpforo-profile-wrap .h-left{ }
227
+ #wpforo-wrap .wpforo-profile-wrap .profile-display-name{ color:#3f7796; }
228
+ #wpforo-wrap .wpforo-profile-wrap .profile-stat-data{ color:#3f7796; }
229
+ #wpforo-wrap .wpforo-profile-wrap .profile-stat-data-item{ color:#3f7796;}
230
+ #wpforo-wrap .wpforo-profile-wrap .profile-rating-bar-wrap{background:#ffffff;}
231
+ #wpforo-wrap .wpforo-profile-wrap .profile-rating-bar-wrap .rating-bar-cell{color:#ffffff;}
232
+
233
+ #wpforo-wrap .wpforo-profile-wrap .h-bottom{ border-bottom: 2px solid #777777;}
234
+ #wpforo-wrap .wpforo-profile-wrap .h-bottom .wpf-profile-menu:hover{ background: #f5f5f5; color:#555555;}
235
+ #wpforo-wrap .wpforo-profile-wrap .h-bottom .wpf-profile-menu{ background-color:#777777; border-right:#ffffff 1px solid; color:#ffffff; }
236
+
237
+ #wpforo-wrap .wpforo-profile-head .wpforo-active,
238
+ #wpforo-wrap .wpforo-profile-head #wpforo-menu a:hover,
239
+ #wpforo-wrap .wpforo-profile-head #wpforo-menu .current-menu-ancestor,
240
+ #wpforo-wrap .wpforo-profile-head #wpforo-menu .current-menu-parent,
241
+ #wpforo-wrap .wpforo-profile-head #wpforo-menu .current_page_item { background-color: #f5f5f5!important; color:#555555!important;}
242
+
243
+ #wpforo-wrap .wpforo-profile-wrap .h-left .avatar{ background-color:#ffffff; border: 2px solid #cccccc; }
244
+ #wpforo-wrap .wpforo-profile-wrap .wpf-username{ color:#0099cc; }
245
+ #wpforo-wrap .wpforo-profile-wrap .h-header .wpfy {background-color:#ffffff;}
246
+ #wpforo-wrap .wpforo-profile-wrap .wpforo-profile-home .wpf-field-name-about .wpf-label-wrap{border-bottom:1px dotted #cccccc;}
247
+ #wpforo-wrap .wpforo-profile-wrap .wpforo-profile-home .wpf-field{ border-top: 1px solid #e6e6e6;}
248
+
249
+ #wpforo-wrap .wpforo-activity-content .activity-icon{ border-right:2px solid #ffffff; }
250
+ #wpforo-wrap .wpforo-sbn-content .sbn-icon{ border-right:2px solid #ffffff; }
251
+ #wpforo-wrap .wpforo-sbn-content .wpf-sbs-bulk-options{background: #ffffff; border: 1px solid #dadada; border-left: 1px solid #dadada; }
252
+ #wpforo-wrap .wpforo-sbn-content .wpf-sbs-bulk-options ul li{border-bottom: 1px dotted #cccccc;}
253
+ #wpforo-wrap .wpforo-sbn-content .wpf-sbs-bulk-options .wpf-sbs-cat{background: #f5f5f5;}
254
+ #wpforo-wrap .wpforo-sbn-content .wpf-sbs-bulk div{border-bottom: 1px dotted #999999;}
255
+ #wpforo-wrap .wpforo-sbn-content .wpf-sbs-bulk-options .wpf-sbs-checkbox{color: #555555;}
256
+
257
+
258
+ #wpforo-wrap input[type="text"], #wpforo-wrap input[type="password"], #wpforo-wrap input[type="email"], #wpforo-wrap textarea, #wpforo-wrap select { border: 1px solid #dadada; color: #777777; box-shadow: inset 0px 1px 4px #e6e6e6; -moz-box-shadow: inset 0px 1px 4px #e6e6e6; -webkit-box-shadow: inset 0px 1px 4px #e6e6e6; }
259
+ #wpforo-wrap input[type="submit"],#wpforo-wrap input[type="reset"],#wpforo-wrap input[type="reset"], #wpforo-wrap input[type="button"]{ background:#43a6df; color:#ffffff; border: 1px solid #0099cc; }
260
+ #wpforo-wrap input[type="submit"]:hover,#wpforo-wrap input[type="reset"]:hover{ background:#0099cc; }
261
+ #wpforo-wrap input[type="button"]:hover{ background:#0099cc; }
262
+ #wpforo-wrap .wpf-button{ background:#43a6df; color:#ffffff!important; border: 1px solid #0099cc; }
263
+ #wpforo-wrap .wpf-button:hover{ background:#0099cc; }
264
+
265
+ #wpforo-wrap #wpf-topic-create{ border: solid #dadada 1px; }
266
+ #wpforo-wrap .wpf-topic-create .wp-editor-tools{ border-bottom:1px #dadada solid; }
267
+ #wpforo-wrap .wpf-topic-create .wp-editor-tabs a.switch-tmce{ border: 1px #dadada solid; }
268
+ #wpforo-wrap .wpf-topic-create .wp-editor-tabs a.switch-html{ border: 1px #dadada solid; }
269
+ #wpforo-wrap .wpf-topic-create .quicktags-toolbar input[type="button"] { background:#43a6df; color:#ffffff; }
270
+ #wpforo-wrap .wpf-topic-create .quicktags-toolbar input[type="button"]:hover{ background:#0099cc!important; }
271
+
272
+ #wpforo-wrap #wpf-post-create{ border: solid #dadada 1px; }
273
+ #wpforo-wrap .wpf-post-create .wp-editor-tools{ border-bottom:1px #dadada solid; }
274
+ #wpforo-wrap .wpf-post-create .wp-editor-tabs a.switch-tmce{ border: 1px #dadada solid; }
275
+ #wpforo-wrap .wpf-post-create .wp-editor-tabs a.switch-html{ border: 1px #dadada solid; }
276
+ #wpforo-wrap .wpf-post-create .quicktags-toolbar input[type="button"] { background:#43a6df; color:#ffffff; }
277
+ #wpforo-wrap .wpf-post-create .quicktags-toolbar input[type="button"]:hover{ background:#0099cc!important; }
278
+
279
+ #wpforo-wrap .wpforo-members-wrap .wpforo-members-content { border:#e6e6e6 1px solid; }
280
+ #wpforo-wrap .wpforo-members-wrap td.wpf-members-search { border-bottom:1px solid #e6e6e6; }
281
+ #wpforo-wrap .wpforo-members-wrap td.wpf-members-avatar { border-right:2px solid #ffffff; }
282
+ #wpforo-wrap .wpforo-members-wrap td.wpf-members-regdate-head{ border-bottom:1px solid #e6e6e6; }
283
+ #wpforo-wrap .wpforo-members-wrap td.wpf-members-foot { border-top:1px solid #e6e6e6; }
284
+
285
+ #wpforo-wrap .wpforo-register-wrap .wpforo-register-content { border-top:#43a6df 1px solid; border-bottom:#cccccc 1px solid; padding: 40px 1%; }
286
+ #wpforo-wrap .wpforo-register-wrap .wpforo-register-content h3{color:#555555}
287
+ #wpforo-wrap .wpforo-login-wrap .wpforo-login-content { border-top:#43a6df 1px solid; border-bottom:#cccccc 1px solid; padding: 40px 1%; }
288
+ #wpforo-wrap .wpforo-login-wrap .wpforo-login-content .wpforo-login-table{ padding:1%; }
289
+ #wpforo-wrap .wpforo-login-wrap .wpforo-login-content .wpforo-login-table .wpf-field{border-bottom:none;}
290
+ #wpforo-wrap .wpforo-login-wrap .wpforo-login-content h3{color:#555555}
291
+
292
+ #wpforo-wrap .wpforo-404-wrap .wpforo-404-content { border-top:#e6e6e6 1px solid; border-bottom:#e6e6e6 1px solid; }
293
+ #wpforo-wrap .wpforo-404-wrap .wpf-search-box { border:#cccccc 1px dashed; }
294
+
295
+ #wpforo-wrap #wpforo-search-title { color:#333333; }
296
+ #wpforo-wrap .wpforo-search-wrap .wpf-search-bar{ background:#f5f5f5; border:#e6e6e6 1px solid; }
297
+ #wpforo-wrap .wpforo-search-wrap .wpf-search-bar .wpfltd{ border-bottom:1px dotted #ffffff; }
298
+ #wpforo-wrap .wpforo-search-wrap .wpf-search-bar .wpfrtd{ border-bottom:1px dotted #ffffff; }
299
+ #wpforo-wrap .wpforo-search-wrap .wpforo-search-content { border-bottom:#e6e6e6 1px solid; }
300
+ #wpforo-wrap .wpforo-search-wrap .wpforo-search-content .wpf-htr{ background-color:#43a6df; color:#ffffff; }
301
+ #wpforo-wrap .wpforo-search-wrap .wpforo-search-content .wpf-ttr{ background:#f5f5f5 }
302
+ #wpforo-wrap .wpforo-search-wrap .wpforo-search-content td.wpf-shead-icon{ border-right:1px solid #ffffff;}
303
+ #wpforo-wrap .wpforo-search-wrap .wpforo-search-content td.wpf-spost-icon { border-right:1px solid #ffffff;}
304
+
305
+ #wpforo-wrap #wpforo-recent-title { color:#333333; }
306
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar{ background:#f5f5f5; border:#e6e6e6 1px solid; }
307
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar .wpfltd{ border-bottom:1px dotted #ffffff; }
308
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar .wpfrtd{ border-bottom:1px dotted #ffffff; }
309
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content { border-bottom:#e6e6e6 1px solid; }
310
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content .wpf-htr{ background-color:#43a6df; color:#ffffff; }
311
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content .wpf-ttr{ background:#f5f5f5 }
312
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-shead-icon{ border-right:1px solid #ffffff;}
313
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-spost-icon { border-right:1px solid #ffffff;}
314
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-stext{color:#666666}
315
+
316
+ #wpforo-wrap .wpf-action{ color: #3f7796; }
317
+ #wpforo-wrap .wpf-action:hover{ cursor: pointer; color: #659fbe; }
318
+ #wpforo-wrap .wpf-action.wpforo-tools{ color: #ffffff; }
319
+ #wpforo-wrap .wpf-action.wpforo-tools:hover{ cursor: pointer; /*color: #dff4ff;*/ }
320
+
321
+ #wpforo-wrap .wpf-navi .wpf-navi-wrap .wpf-page-info{ color:#666666; }
322
+ #wpforo-wrap .wpf-navi .wpf-navi-wrap .wpf-prev-button{ background:#43a6df; color:#ffffff; border: 1px solid #0099cc; }
323
+ #wpforo-wrap .wpf-navi .wpf-navi-wrap .wpf-next-button{ background:#43a6df; color:#ffffff; border: 1px solid #0099cc; }
324
+
325
+ #wpforo-wrap #wpforo-stat-header{ background-color:#555555; color: #ffffff; border-bottom: 2px solid #cccccc;}
326
+ #wpforo-wrap #wpforo-stat-body{ border:#e6e6e6 1px solid; background:#f5f5f5; }
327
+ #wpforo-wrap #wpforo-stat-body .wpf-stat-data{ }
328
+ #wpforo-wrap #wpforo-stat-body .wpf-stat-item{border-right:1px solid #e6e6e6;}
329
+ #wpforo-wrap #wpforo-stat-body .wpf-stat-item i{color:#777777;}
330
+ #wpforo-wrap #wpforo-stat-body .wpf-stat-item .wpf-stat-value{color:#777777;}
331
+ #wpforo-wrap #wpforo-stat-body .wpf-stat-item .wpf-stat-label{border-top:1px dotted #cccccc; color:#777777;}
332
+ #wpforo-wrap #wpforo-stat-body .wpf-last-info i{color:#777777;}
333
+
334
+ #wpforo-wrap .widget-title { border-bottom:2px solid #e6e6e6;}
335
+ #wpforo-wrap .wpforo-widget-wrap .wpforo-widget-content li{ border-bottom:1px dotted #cccccc; }
336
+
337
+ .ui-dialog { z-index: 999998 !important; }
338
+ .wpf-video{ margin: 10px !important; }
339
+
340
+ .ui-dialog .ui-widget-header{ background-color: #43a6df!important; border-bottom:#cccccc 1px solid!important; }
341
+ .ui-dialog .ui-widget-header span.ui-dialog-title{ color: #ffffff !important; }
342
+ .ui-widget input[type="submit"]:hover{ background:#0099cc; }
343
+ .ui-widget input[type="submit"]{ background:#43a6df; color:#ffffff; border: 1px solid #0099cc; }
344
+
345
+ #wpforo-wrap .wpforo-topic-badges i.fa,
346
+ #wpforo-wrap .wpforo-topic-badges i.fas,
347
+ #wpforo-wrap .wpforo-topic-badges i.fab,
348
+ #wpforo-wrap .wpforo-topic-badges i.far,
349
+ #wpforo-wrap .wpforo-topic-badges i.fal { color: #43a6df; }
350
+
351
+ #wpf-msg-box a{color:#ffffff;}
352
+ #wpf-msg-box a:hover{color:#e6e6e6;}
353
+ #wpf-msg-box > p{color:#ffffff!important;background-color:#43a6df;background:-moz-linear-gradient(#43a6df);background:-o-linear-gradient(#43a6df);background:linear-gradient(#43a6df);}
354
+ #wpf-msg-box > p:after{border-color:transparent #43a6df;}
355
+
356
+ #wpf-msg-box > p.error{background-color:#f46464;background:-moz-linear-gradient(#f46464);background:-o-linear-gradient(#f46464);background:linear-gradient(#f46464);}
357
+ #wpf-msg-box > p.error:after{border-color:transparent #f46464;}
358
+ #wpf-msg-box > p.success{background-color:#00a636;background:-moz-linear-gradient(#00a636);background:-o-linear-gradient(#00a636);background:linear-gradient(#00a636);}
359
+ #wpf-msg-box > p.success:after{border-color:transparent #00a636;}
360
+
361
+ #wpforo-wrap .wpf-field { border-bottom: 1px solid #ffffff;}
362
+ #wpforo-wrap .wpf-field .wpf-label i{ color: #777777; }
363
+ #wpforo-wrap .wpf-field .wpf-field-wrap i{ color: #777777; }
364
+
365
+ #wpforo-wrap .wpf-field {border-bottom: 1px solid #ffffff;}
366
+ #wpforo-wrap .wpf-field .wpf-field-cl{ clear:both;}
367
+ #wpforo-wrap .wpf-field input {max-width: 100%;}
368
+ #wpforo-wrap .wpf-field input[type="text"],
369
+ #wpforo-wrap .wpf-field input[type="password"],
370
+ #wpforo-wrap .wpf-field input[type="email"],
371
+ #wpforo-wrap .wpf-field input[type="date"],
372
+ #wpforo-wrap .wpf-field input[type="number"],
373
+ #wpforo-wrap .wpf-field input[type="url"],
374
+ #wpforo-wrap .wpf-field input[type="tel"],
375
+ #wpforo-wrap .wpf-field textarea,
376
+ #wpforo-wrap .wpf-field select{ background-color: #fefefe; box-shadow: 0px 0px 2px 1px #E6E6E6;}
377
+ #wpforo-wrap .wpf-field input::-webkit-input-placeholder, #wpforo-wrap .wpf-field textarea::-webkit-input-placeholder { color: #999999;}
378
+ #wpforo-wrap .wpf-field input::-moz-placeholder, #wpforo-wrap .wpf-field textarea::-moz-placeholder {color: #999999;}
379
+ #wpforo-wrap .wpf-field input:-ms-input-placeholder, #wpforo-wrap .wpf-field textarea:-ms-input-placeholder {color: #999999;}
380
+ #wpforo-wrap .wpf-field input:-moz-placeholder, #wpforo-wrap .wpf-field textarea:-moz-placeholder {color: #999999;}
381
+ #wpforo-wrap .wpf-field input[type="text"]:focus, #wpforo-wrap .wpf-field input[type="password"]:focus, #wpforo-wrap .wpf-field input[type="email"]:focus,#wpforo-wrap .wpf-field input[type="date"]:focus,#wpforo-wrap .wpf-field input[type="number"]:focus,#wpforo-wrap .wpf-field input[type="url"]:focus,#wpforo-wrap .wpf-field input[type="tel"]:focus,#wpforo-wrap .wpf-field textarea:focus,
382
+ #wpforo-wrap .wpf-field select:focus{ background-color:#feffe5; box-shadow: 0px 0px 10px 0px #777777; }
383
+ #wpforo-wrap .wpf-field .wpf-label i{ padding-right:5px; width:25px;}
384
+ #wpforo-wrap .wpf-field .wpf-field-wrap i{}
385
+ #wpforo-wrap .wpf-field .wpf-field-required-icon{color: #ff812d;}
386
+
387
+ #wpforo-wrap .wpf-table .wpfw-1 .wpf-field:nth-child(even) {background-color: #eeeeee;}
388
+
389
+ #wpforo-wrap .wpf-tools {background: #f5f5f5; border-bottom:#e6e6e6 3px solid; outline:3px solid #ffffff;}
390
+ #wpforo-wrap .wpf-tools .wpf-tool-tabs .wpf-tool-tab{ border-bottom-color: #999999; }
391
+ #wpforo-wrap .wpf-tools .wpf-tool-tabs .wpf-tool-tab.wpf-tt-active{ border-top-color: #43a6df; color:#43a6df; }
392
+ #wpforo-wrap .wpf-tools .wpf-tool h3{ color: #e6e6e6}
393
+ #wpforo-wrap .wpf-tools .wpf-tool .wpf-tool-desc{ color: #999999;}
394
+ #wpforo-wrap .wpf-tools .wpf-tool li input[type="text"]{background: #ffffff;}
395
+ #wpforo-wrap .wpf-tools .wpf-tool .wpf-split-posts{background: #ffffff; border: 1px solid #dadada; border-left: 3px solid #dadada; }
396
+ #wpforo-wrap .wpf-tools .wpf-tool .wpf-split-posts ul li{border-bottom: 1px dotted #cccccc;}
397
+ #wpforo-wrap .wpf-tools .wpf-tool li input[type="text"]::placeholder {color: #cccccc; opacity: 1;}
398
+ #wpforo-wrap .wpf-tools .wpf-tool li input[type="text"]:-ms-input-placeholder {color: #cccccc;}
399
+ #wpforo-wrap .wpf-tools .wpf-tool li input[type="text"]::-ms-input-placeholder {color: #cccccc;}
400
+
401
+ #wpforo-wrap .wpf-sb-1{color:#cccccc;background-color:#f5f5f5;}
402
+ #wpforo-wrap .wpf-sb-2{color:#43a6df;background-color:#f5f5f5;}
403
+ #wpforo-wrap .wpf-sb-3{color:#cccccc;background-color:transparent;}
404
+ #wpforo-wrap .wpf-sb-4{color:#43a6df;background-color:transparent;}
405
+ #wpforo-wrap .wpf-sb .wpf-sb-buttons i{color: #cccccc;}
406
+ #wpforo-wrap .wpf-sb .wpf-sb-toggle .wpfsa{color:#43a6df!important;}
407
+ #wpforo-wrap .wpfl-1 .wpf-sb-right.wpf-sb-1,
408
+ #wpforo-wrap .wpfl-1 .wpf-sb-right.wpf-sb-2{border:1px solid #e6e6e6;}
409
+ #wpforo-wrap .wpfl-2 .wpf-sb-right, #wpforo-wrap .wpfl-3 .wpf-sb-right{ border-top:1px solid #e6e6e6;}
410
+ #wpforo-wrap .wpfl-2 .wpf-sb-left, #wpforo-wrap .wpfl-3 .wpf-sb-left{ background-color:transparent;}
411
+ #wpforo-wrap .wpf-sb.wpf-sb-top .wpf-sb-buttons{border-left: 1px dotted #3f7796;}
412
+ [dir="rtl"] #wpforo-wrap .wpf-sb.wpf-sb-top .wpf-sb-buttons{border-right: 1px dotted #3f7796; border-left:none;}
413
+ #wpforo-wrap .wpf-sb.wpf-sb-top.sb-tt-expanded .wpf-sb-buttons i{color:#3f7796;}
414
+ #wpforo-wrap .wpf-sbtn {color: #555555;}
415
+ #wpforo-wrap .wpf-sbtn .wpf-sbtn-title i{color: #999999;}
416
+ #wpforo-wrap .wpf-sbtn.wpf-sb-style-grey .wpf-sb-button{background: #aaaaaa; color: #ffffff; }
417
+ #wpforo-wrap .wpf-sbtn.wpf-sb-style-grey .wpf-sb-button.wpf-sb-icon{background: transparent; color: #777777; border: 1px solid #bbbbbb;}
418
+ #wpforo-wrap .wpf-sb .wpf-fb .wpfsa, #wpforo-wrap .wpf-sb .wpf-fb i:hover{ color: #4267b2!important;}
419
+ #wpforo-wrap .wpf-sb .wpf-tw .wpfsa, #wpforo-wrap .wpf-sb .wpf-tw i:hover{ color: #1DA1F2!important;}
420
+ #wpforo-wrap .wpf-sb .wpf-gg .wpfsa, #wpforo-wrap .wpf-sb .wpf-gg i:hover{ color: #DB4437!important;}
421
+ #wpforo-wrap .wpf-sb .wpf-vk .wpfsa, #wpforo-wrap .wpf-sb .wpf-vk i:hover{ color: #4A76A8!important;}
422
+ #wpforo-wrap .wpf-sb .wpf-ok .wpfsa, #wpforo-wrap .wpf-sb .wpf-ok i:hover{ color: #EE8208!important;}
423
+ #wpforo-wrap .wpf-sbtn .wpf-sb-button.wpf-fb:hover{ background-color: #4267b2; border-color: #4267b2; color: #fff;}
424
+ #wpforo-wrap .wpf-sbtn .wpf-sb-button.wpf-tw:hover{ background-color: #1DA1F2; border-color: #1DA1F2; color: #fff;}
425
+ #wpforo-wrap .wpf-sbtn .wpf-sb-button.wpf-gg:hover{ background-color: #DB4437; border-color: #DB4437; color: #fff;}
426
+ #wpforo-wrap .wpf-sbtn .wpf-sb-button.wpf-vk:hover{ background-color: #4A76A8; border-color: #4A76A8; color: #fff;}
427
+ #wpforo-wrap .wpf-sbtn .wpf-sb-button.wpf-ok:hover{ background-color: #EE8208; border-color: #EE8208; color: #fff;}
428
+ #wpforo-wrap .wpf-sbtn.wpf-sb-style-colored .wpf-sb-button.wpf-fb{ background-color: #4267b2; border-color: #4267b2; color: #fff;}
429
+ #wpforo-wrap .wpf-sbtn.wpf-sb-style-colored .wpf-sb-button.wpf-tw{ background-color: #1DA1F2; border-color: #1DA1F2; color: #fff;}
430
+ #wpforo-wrap .wpf-sbtn.wpf-sb-style-colored .wpf-sb-button.wpf-gg{ background-color: #DB4437; border-color: #DB4437; color: #fff;}
431
+ #wpforo-wrap .wpf-sbtn.wpf-sb-style-colored .wpf-sb-button.wpf-vk{ background-color: #4A76A8; border-color: #4A76A8; color: #fff;}
432
+ #wpforo-wrap .wpf-sbtn.wpf-sb-style-colored .wpf-sb-button.wpf-ok{ background-color: #EE8208; border-color: #EE8208; color: #fff;}
433
+
434
+
435
+ @media screen and (max-width:600px) {
436
+ #wpforo-wrap #wpforo-menu .wpf-menu{background-color:#555555;}
437
+ #wpforo-wrap .wpfl-1 .wpforo-post .wpf-right .wpforo-post-content-top{border-top: 1px solid #e6e6e6; }
438
+ }
439
+
440
+ #wpforo-wrap.wpf-dark { color: #3f7796; }
441
+ #wpforo-wrap.wpf-dark .wpfcl-3{ color:#3f7796!important; }
442
+ #wpforo-wrap.wpf-dark .wpfcl-1{ color:#3f7796!important; }
443
+ #wpforo-wrap.wpf-dark .wpf-action{ color: #3f7796; }
444
+ #wpforo-wrap.wpf-dark .wpforo-post .wpf-right .wpforo-post-content p{ color:#3f7796!important; }
445
+ #wpforo-wrap.wpf-dark #wpforo-menu li a { color: #3f7796; }
446
+ #wpforo-wrap.wpf-dark .wpfl-2 .head-stat-lastpost, #wpforo-wrap.wpf-dark .wpfl-3 .head-stat-lastpost{ color: #3f7796; }
447
+ #wpforo-wrap.wpf-dark .wpfl-2 .wpforo-last-post{ color: #3f7796; }
448
+ #wpforo-wrap.wpf-dark .wpfl-2 .wpforo-topic-stat-lastpost, #wpforo-wrap.wpf-dark .wpfl-3 .wpforo-topic-stat-lastpost{ color: #3f7796; }
449
+ #wpforo-wrap.wpf-dark .wpfl-2 .wpforo-forum-description, #wpforo-wrap.wpf-dark .wpfl-3 .wpforo-forum-description{ color: #3f7796; }
450
+ #wpforo-wrap.wpf-dark .wpfl-1 .cat-title, #wpforo-wrap.wpf-dark .wpfl-2 .cat-title, #wpforo-wrap.wpf-dark .wpfl-3 .cat-title{ color:#3f7796; }
451
+ #wpforo-wrap.wpf-dark .wpfl-1 .wpforo-category div, #wpforo-wrap.wpf-dark .wpfl-2 .wpforo-category div, #wpforo-wrap.wpf-dark .wpfl-3 .wpforo-category div{ color:#3f7796; }
452
+ #wpforo-wrap.wpf-dark .wpfl-1 .wpforo-last-topic-date, #wpforo-wrap.wpf-dark .wpfl-2 .wpforo-last-topic-date, #wpforo-wrap.wpf-dark .wpfl-3 .wpforo-last-topic-date{ color:#3f7796; }
453
+ #wpforo-wrap.wpf-dark .wpfl-1 .wpforo-topic-stat-posts, #wpforo-wrap.wpf-dark .wpfl-1 .wpforo-topic-stat-views{ color:#3f7796; }
454
+ #wpforo-wrap.wpf-dark .wpfl-2 .wpforo-topic-stat-posts, #wpforo-wrap.wpf-dark .wpfl-2 .wpforo-topic-stat-views{ color:#3f7796; }
455
+ #wpforo-wrap.wpf-dark .wpfl-3 .wpforo-topic-stat-posts, #wpforo-wrap.wpf-dark .wpfl-3 .wpforo-topic-stat-views{ color:#3f7796; }
456
+ #wpforo-wrap.wpf-dark .wpfl-1 .wpforo-last-post-date, #wpforo-wrap.wpf-dark .wpfl-2 .wpforo-last-post-date, #wpforo-wrap.wpf-dark .wpfl-3 .wpforo-last-post-date{ color:#3f7796; }
457
+ #wpforo-wrap.wpf-dark .wpfl-1 .head-title, #wpforo-wrap.wpf-dark .wpfl-2 .head-title, #wpforo-wrap.wpf-dark .wpfl-3 .head-title{ color:#3f7796; }
458
+ #wpforo-wrap.wpf-dark .wpfl-1 .head-stat-posts, #wpforo-wrap.wpf-dark .wpfl-2 .head-stat-posts, #wpforo-wrap.wpf-dark .wpfl-3 .head-stat-posts{ color:#3f7796; }
459
+ #wpforo-wrap.wpf-dark .wpfl-1 .head-stat-views, #wpforo-wrap.wpf-dark .wpfl-2 .head-stat-views, #wpforo-wrap.wpf-dark .wpfl-3 .head-stat-views{ color:#3f7796; }
460
+ #wpforo-wrap.wpf-dark .wpfl-1 .wpforo-post .wpf-left, #wpforo-wrap.wpf-dark .wpfl-2 .wpforo-post .wpf-left, #wpforo-wrap.wpf-dark .wpfl-3 .wpforo-post .wpf-left{ color:#3f7796; }
461
+ #wpforo-wrap .wpfl-1 .wpforo-post .wpf-right .wpforo-post-content-top, #wpforo-wrap .wpfl-2 .wpforo-post .wpf-right .wpforo-post-content-top, #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .wpforo-post-content-top{ color:#3f7796; }
462
+ #wpforo-wrap .wpfl-3 .wpforo-forum-stat-questions, #wpforo-wrap .wpfl-3 .wpforo-forum-stat-answers, #wpforo-wrap .wpfl-3 .wpforo-forum-stat-posts{ color:#3f7796; }
463
+ #wpforo-wrap.wpf-dark #wpforo-stat-header{ color: #3f7796; border-bottom: 1px solid #cccccc;}
464
+ #wpforo-wrap.wpf-dark #wpforo-stat-body .wpf-last-info p.wpf-topic-icons{border-top: 1px dotted #cccccc;}
465
+ #wpforo-wrap.wpf-dark .wpf-button{ color:#3f7796!important; }
466
+ #wpforo-wrap.wpf-dark .wpf-topic-create .wpf-subject{background-color:#333333}
467
+ #wpforo-wrap.wpf-dark #wpf-topic-create{background-color:#f5f5f5}
468
+ #wpforo-wrap.wpf-dark #wpf-topic-create div.mce-toolbar-grp{background-color:#f5f5f5}
469
+ #wpforo-wrap.wpf-dark .wpf-post-create .wpf-subject{background-color:#333333}
470
+ #wpforo-wrap.wpf-dark #wpf-post-create{background-color:#f5f5f5}
471
+ #wpforo-wrap.wpf-dark #wpf-post-create div.mce-toolbar-grp{background-color:#f5f5f5}
472
+ #wpforo-wrap.wpf-dark input[type="submit"], #wpforo-wrap.wpf-dark input[type="button"]{color:#3f7796!important;}
473
+ #wpforo-wrap.wpf-dark input[type="text"], #wpforo-wrap.wpf-dark input[type="search"], #wpforo-wrap.wpf-dark input[type="email"], #wpforo-wrap.wpf-dark input[type="date"], #wpforo-wrap.wpf-dark input[type="number"], #wpforo-wrap.wpf-dark input[type="url"], #wpforo-wrap.wpf-dark input[type="tel"], #wpforo-wrap.wpf-dark input[type="password"], #wpforo-wrap.wpf-dark input[type="email"], #wpforo-wrap.wpf-dark textarea, #wpforo-wrap.wpf-dark select{color:#555555;background-color:#333333;}
474
+ #wpforo-wrap.wpf-dark input[type="text"].wpf-search-field{background-color:transparent; color:#3f7796; }
475
+ #wpforo-wrap.wpf-dark .wpf-field input::-webkit-input-placeholder, #wpforo-wrap.wpf-dark .wpf-field textarea::-webkit-input-placeholder { color: #cccccc;}
476
+ #wpforo-wrap.wpf-dark .wpf-field input::-moz-placeholder, #wpforo-wrap.wpf-dark .wpf-field textarea::-moz-placeholder {color: #cccccc;}
477
+ #wpforo-wrap.wpf-dark .wpf-field input:-ms-input-placeholder, #wpforo-wrap.wpf-dark .wpf-field textarea:-ms-input-placeholder {color: #cccccc;}
478
+ #wpforo-wrap.wpf-dark .wpf-field input:-moz-placeholder, #wpforo-wrap.wpf-dark .wpf-field textarea:-moz-placeholder {color: #cccccc;}
479
+ #wpforo-wrap.wpf-dark #wpforo-stat-body{border:none;}
480
+ #wpforo-wrap.wpf-dark .wpforo-members-content table tr{ background-color:#f5f5f5!important; }
481
+ #wpforo-wrap.wpf-dark .wpforo-profile-wrap .profile-rating-bar-wrap{background:none;}
482
+ #wpforo-wrap.wpf-dark .wpforo-profile-wrap .wpforo-profile-head{border:none;}
483
+ #wpforo-wrap.wpf-dark .wpf-field:nth-child(even) {background-color: #f5f5f5;}
484
+ #wpforo-wrap.wpf-dark .wpf-field .wpf-field-wrap { color:#777777}
485
+ #wpforo-wrap.wpf-dark .wpf-field .wpf-field-wrap i{ color:#cccccc}
486
+ #wpforo-wrap.wpf-dark .wpf-table .wpfw-1 .wpf-field:nth-child(even) {background-color: #cccccc;}
487
+ #wpforo-wrap .wpforo-login-wrap .wpforo-table .wpfw-1 .wpf-field:nth-child(even){background-color: transparent;}
488
+ #wpforo-wrap.wpf-dark .wpforo-profile-head .wpforo-active { color:#FFFFFF!important;}
489
+ #wpforo-wrap.wpf-dark. wpf-profile-section .wpf-statbox .wpf-statbox-value{color:#777777}
490
+ #wpforo-wrap.wpf-dark #wpf-post-create {border: none;}
491
+ #wpforo-wrap.wpf-dark #wpf-topic-create {border: none;}
492
+ #wpforo-wrap.wpf-dark #wpforo-description{color:#777777}
493
+ #wpforo-wrap.wpf-dark .wpforo-login-wrap .wpforo-login-table{background-color: transparent;}
494
+ #wpforo-wrap.wpf-dark .wpforo-login-wrap .wpforo-login-content > h3, #wpforo-wrap .wpforo-register-wrap .wpforo-register-content > h3{color:#777777}
495
+ #wpforo-wrap.wpf-dark .wpf-tools .wpf-tool .wpf-split-posts{background: #666666; border:none; }
496
+ #wpforo-wrap.wpf-dark .wpf-tools .wpf-tool .wpf-split-posts ul li{border-bottom: 1px dotted #333333;}
497
+ #wpforo-wrap.wpf-dark .wpf-tools .wpf-tool li input[type="text"]{background: #dadada;}
498
+ #wpforo-wrap.wpf-dark .wpf-sbtn .wpf-sbtn-title{ color: #777777}
499
+ #wpforo-wrap.wpf-dark .wpf-sbtn.wpf-sb-style-grey .wpf-sb-button {background: #666666;}
500
+
501
+ #wpforo-wrap {
502
+ font-size: 13px; width: 100%; padding:10px 20px; margin:0px;
503
+ }
wpf-themes/classic/functions.php CHANGED
@@ -36,7 +36,7 @@ function wpforo_classic_forum_options(){
36
  if(!isset(WPF()->forum->options['layout_extended_intro_topics_count'])) WPF()->forum->options['layout_extended_intro_topics_count'] = 3;
37
  ?>
38
  <tr>
39
- <th><label><?php _e('Extended Layout - Recent topics','wpforo'); ?>:</label></th>
40
  <td>
41
  <div class="wpf-switch-field">
42
  <input id="show-tte" type="radio" name="wpforo_forum_options[layout_extended_intro_topics_toggle]" value="1" <?php wpfo_check(WPF()->forum->options['layout_extended_intro_topics_toggle'], 1); ?>/><label for="show-tte"><?php _e('Expanded','wpforo'); ?></label> &nbsp;
@@ -45,14 +45,14 @@ function wpforo_classic_forum_options(){
45
  </td>
46
  </tr>
47
  <tr>
48
- <th><label for="tdcs"><?php _e('Extended Layout - Number of Recent topics','wpforo'); ?>:</label></th>
49
  <td>
50
  <input id="tdcs" name="wpforo_forum_options[layout_extended_intro_topics_count]" type="number" min="0" value="<?php wpfo( WPF()->forum->options['layout_extended_intro_topics_count'] ) ?>" class="wpf-field-small" />
51
  </td>
52
  </tr>
53
  <tr>
54
  <th>
55
- <label for="tdcs"><?php _e('Extended Layout - Recent topic length','wpforo'); ?>:</label>
56
  <p class="wpf-info"><?php _e('Set this option value 0 if you want to show the whole title in recent topic area.','wpforo'); ?></p>
57
  </th>
58
  <td>
@@ -66,7 +66,7 @@ function wpforo_classic_forum_options(){
66
  if(!isset(WPF()->forum->options['layout_qa_intro_topics_count'])) WPF()->forum->options['layout_qa_intro_topics_count'] = 3;
67
  ?>
68
  <tr>
69
- <th><label><?php _e('Q&A layout - Recent topics','wpforo'); ?>:</label></th>
70
  <td>
71
  <div class="wpf-switch-field">
72
  <input id="show-ttq" type="radio" name="wpforo_forum_options[layout_qa_intro_topics_toggle]" value="1" <?php wpfo_check(WPF()->forum->options['layout_qa_intro_topics_toggle'], 1); ?>/><label for="show-ttq"><?php _e('Expanded','wpforo'); ?></label> &nbsp;
@@ -75,14 +75,14 @@ function wpforo_classic_forum_options(){
75
  </td>
76
  </tr>
77
  <tr>
78
- <th><label for="tdcq"><?php _e('Q&A Layout - Number of Recent topics','wpforo'); ?>:</label></th>
79
  <td>
80
  <input id="tdcq" name="wpforo_forum_options[layout_qa_intro_topics_count]" type="number" min="0" value="<?php wpfo( WPF()->forum->options['layout_qa_intro_topics_count'] ) ?>" class="wpf-field-small" />
81
  </td>
82
  </tr>
83
  <tr>
84
  <th>
85
- <label for="tdcq"><?php _e('Q&A Layout - Recent topic length','wpforo'); ?>:</label>
86
  <p class="wpf-info"><?php _e('Set this option value 0 if you want to show the whole title in recent topic area.','wpforo'); ?></p>
87
  </th>
88
  <td>
@@ -104,7 +104,7 @@ function wpforo_classic_post_options(){
104
  if(!isset(WPF()->post->options['layout_extended_intro_posts_count'])) WPF()->post->options['layout_extended_intro_posts_count'] = 4;
105
  ?>
106
  <tr>
107
- <th><label><?php _e('Extended Layout - Recent posts','wpforo'); ?></label></th>
108
  <td>
109
  <div class="wpf-switch-field">
110
  <input id="show-tte" type="radio" name="wpforo_post_options[layout_extended_intro_posts_toggle]" value="1" <?php wpfo_check(WPF()->post->options['layout_extended_intro_posts_toggle'], 1); ?>/><label for="show-tte"><?php _e('Expanded','wpforo'); ?></label> &nbsp;
@@ -114,7 +114,7 @@ function wpforo_classic_post_options(){
114
  </tr>
115
  <tr>
116
  <th>
117
- <label for="tdcs"><?php _e('Extended Layout - Number of Recent posts','wpforo'); ?></label>
118
  <p class="wpf-info"><?php _e('Set this option value 0 if you want to show all posts in recent posts area.','wpforo'); ?></p>
119
  </th>
120
  <td>
@@ -151,8 +151,14 @@ add_filter('wpforo_reply_form_head', 'wpforo_classic_reply_form_head', 1, 2);
151
 
152
  function wpforo_classic_reply_form_field_title($string, $args){
153
  if( WPF()->tpl->layout_exists(3) ){
 
154
  if( $args['layout'] == 3 ){
155
- $string = preg_replace('|[^\:]+\:|is', wpforo_phrase('Answer to', false, 'default') . ':', $string);
 
 
 
 
 
156
  }
157
  }
158
  return $string;
36
  if(!isset(WPF()->forum->options['layout_extended_intro_topics_count'])) WPF()->forum->options['layout_extended_intro_topics_count'] = 3;
37
  ?>
38
  <tr>
39
+ <th><label><?php _e('Extended Layout - Recent topics','wpforo'); ?> <a href="https://wpforo.com/docs/root/categories-and-forums/forum-layouts/extended-layout/" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label></th>
40
  <td>
41
  <div class="wpf-switch-field">
42
  <input id="show-tte" type="radio" name="wpforo_forum_options[layout_extended_intro_topics_toggle]" value="1" <?php wpfo_check(WPF()->forum->options['layout_extended_intro_topics_toggle'], 1); ?>/><label for="show-tte"><?php _e('Expanded','wpforo'); ?></label> &nbsp;
45
  </td>
46
  </tr>
47
  <tr>
48
+ <th><label for="tdcs"><?php _e('Extended Layout - Number of Recent topics','wpforo'); ?> <a href="https://wpforo.com/docs/root/categories-and-forums/forum-layouts/extended-layout/" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label></th>
49
  <td>
50
  <input id="tdcs" name="wpforo_forum_options[layout_extended_intro_topics_count]" type="number" min="0" value="<?php wpfo( WPF()->forum->options['layout_extended_intro_topics_count'] ) ?>" class="wpf-field-small" />
51
  </td>
52
  </tr>
53
  <tr>
54
  <th>
55
+ <label for="tdcs"><?php _e('Extended Layout - Recent topic length','wpforo'); ?> <a href="https://wpforo.com/docs/root/categories-and-forums/forum-layouts/extended-layout/" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label>
56
  <p class="wpf-info"><?php _e('Set this option value 0 if you want to show the whole title in recent topic area.','wpforo'); ?></p>
57
  </th>
58
  <td>
66
  if(!isset(WPF()->forum->options['layout_qa_intro_topics_count'])) WPF()->forum->options['layout_qa_intro_topics_count'] = 3;
67
  ?>
68
  <tr>
69
+ <th><label><?php _e('Q&A layout - Recent topics','wpforo'); ?> <a href="https://wpforo.com/docs/root/categories-and-forums/forum-layouts/question-answer-layout/" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label></th>
70
  <td>
71
  <div class="wpf-switch-field">
72
  <input id="show-ttq" type="radio" name="wpforo_forum_options[layout_qa_intro_topics_toggle]" value="1" <?php wpfo_check(WPF()->forum->options['layout_qa_intro_topics_toggle'], 1); ?>/><label for="show-ttq"><?php _e('Expanded','wpforo'); ?></label> &nbsp;
75
  </td>
76
  </tr>
77
  <tr>
78
+ <th><label for="tdcq"><?php _e('Q&A Layout - Number of Recent topics','wpforo'); ?> <a href="https://wpforo.com/docs/root/categories-and-forums/forum-layouts/question-answer-layout/" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label></th>
79
  <td>
80
  <input id="tdcq" name="wpforo_forum_options[layout_qa_intro_topics_count]" type="number" min="0" value="<?php wpfo( WPF()->forum->options['layout_qa_intro_topics_count'] ) ?>" class="wpf-field-small" />
81
  </td>
82
  </tr>
83
  <tr>
84
  <th>
85
+ <label for="tdcq"><?php _e('Q&A Layout - Recent topic length','wpforo'); ?> <a href="https://wpforo.com/docs/root/categories-and-forums/forum-layouts/question-answer-layout/" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label>
86
  <p class="wpf-info"><?php _e('Set this option value 0 if you want to show the whole title in recent topic area.','wpforo'); ?></p>
87
  </th>
88
  <td>
104
  if(!isset(WPF()->post->options['layout_extended_intro_posts_count'])) WPF()->post->options['layout_extended_intro_posts_count'] = 4;
105
  ?>
106
  <tr>
107
+ <th><label><?php _e('Extended Layout - Recent posts','wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/topic-post-settings/" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label></th>
108
  <td>
109
  <div class="wpf-switch-field">
110
  <input id="show-tte" type="radio" name="wpforo_post_options[layout_extended_intro_posts_toggle]" value="1" <?php wpfo_check(WPF()->post->options['layout_extended_intro_posts_toggle'], 1); ?>/><label for="show-tte"><?php _e('Expanded','wpforo'); ?></label> &nbsp;
114
  </tr>
115
  <tr>
116
  <th>
117
+ <label for="tdcs"><?php _e('Extended Layout - Number of Recent posts','wpforo'); ?> <a href="https://wpforo.com/docs/root/wpforo-settings/topic-post-settings/" title="<?php _e('Read the documentation', 'wpforo') ?>" target="_blank"><i class="far fa-question-circle"></i></a></label></label>
118
  <p class="wpf-info"><?php _e('Set this option value 0 if you want to show all posts in recent posts area.','wpforo'); ?></p>
119
  </th>
120
  <td>
151
 
152
  function wpforo_classic_reply_form_field_title($string, $args){
153
  if( WPF()->tpl->layout_exists(3) ){
154
+ $can_answer = true;
155
  if( $args['layout'] == 3 ){
156
+ if( wpfval($args, 'topicid') ){
157
+ $can_answer = WPF()->topic->can_answer( $args['topicid'] );
158
+ }
159
+ if( $can_answer ){
160
+ $string = preg_replace('|[^\:]+\:|is', wpforo_phrase('Answer to', false, 'default') . ':', $string);
161
+ }
162
  }
163
  }
164
  return $string;
wpf-themes/classic/index.php CHANGED
@@ -54,8 +54,8 @@
54
  $users_include = apply_filters('wpforo_member_search_users_include', $users_include);
55
  }
56
  $args = array(
57
- 'offset' => ($paged - 1) * WPF()->post->options['posts_per_page'],
58
- 'row_count' => WPF()->post->options['posts_per_page'],
59
  'orderby' => 'posts',
60
  'order' => 'DESC',
61
  'groupids' => WPF()->usergroup->get_visible_usergroup_ids()
54
  $users_include = apply_filters('wpforo_member_search_users_include', $users_include);
55
  }
56
  $args = array(
57
+ 'offset' => ($paged - 1) * WPF()->member->options['members_per_page'],
58
+ 'row_count' => WPF()->member->options['members_per_page'],
59
  'orderby' => 'posts',
60
  'order' => 'DESC',
61
  'groupids' => WPF()->usergroup->get_visible_usergroup_ids()
wpf-themes/classic/integration/ultimate-member/style-rtl.css ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * wpForo RTL Style for Ultimate Member Integration
3
+ * @Since: 1.5.0
4
+ * @package: Classic
5
+ */
6
+
7
+ .um-profile .um-profile-body.foro{ max-width: 94%!important; margin: 0px auto; }
8
+ .um-profile .wpforo-activity { padding: 0px; }
9
+ .um-profile .wpforo-activity h3.wpf-activity-head{ font-size: 18px; font-weight: 500; padding: 0px; margin: 10px 0px; }
10
+ .um-profile .wpforo-activity table,
11
+ .um-profile .wpforo-activity td,
12
+ .um-profile .wpforo-activity th,
13
+ .um-profile .wpforo-activity td a,
14
+ .um-profile .wpforo-activity td a,
15
+ .um-profile .wpforo-activity th p,
16
+ .um-profile .wpforo-activity td p{margin: 0;padding: 0;border: 0; vertical-align: baseline; font-size: 14px; text-decoration: none; box-shadow:none;}
17
+ .um-profile .wpforo-activity td .dashicons-admin-comments,
18
+ .um-profile .wpforo-activity td .dashicons-format-chat,
19
+ .um-profile .wpforo-activity td .dashicons-thumbs-up,
20
+ .um-profile .wpforo-activity td .dashicons-category{font-size: 20px; line-height: 20px; color: #888888; vertical-align: middle; margin: 0px 0px 0px 3px;}
21
+ .um-profile .wpforo-activity td .dashicons-thumbs-up{line-height: 14px;}
22
+ .um-profile .wpforo-activity td .dashicons-category{line-height: 15px;}
23
+ .um-profile .wpforo-activity table{ padding-top: 10px; }
24
+ .um-profile .wpforo-activity table td{ padding: 15px 10px 10px 10px; border-bottom: 1px solid #ddd; font-size: 14px; line-height: 18px;}
25
+ .um-profile .wpforo-activity table td:first-child{padding-right:20px;}
26
+ .um-profile .wpforo-activity table td:last-child{padding-left:20px;}
27
+ .um-profile .wpforo-activity tr:nth-child(even) {background-color: transparent}
28
+ .um-profile .wpforo-activity tr:nth-child(odd) {background-color: #F9F9F9;}
29
+ .um-profile .wpforo-activity .wpf-item-title{font-size:14px; line-height: 20px;}
30
+ .um-profile .wpforo-activity .wpf-activity-title p{ margin: 3px 0px 3px 0px;}
31
+ .um-profile .wpforo-activity .wpf-activity-foot{ text-align: left; border-bottom: 1px solid #ddd; display: inline-block; float: left;}
32
+ .um-profile .wpforo-activity .wpf-activity-posts{font-size: 14px; text-transform: lowercase;}
33
+ .um-profile .wpforo-activity .wpf-activity-date{font-size: 14px; text-transform: lowercase; text-align: left;}
34
+ .um-profile .wpforo-activity .wpf-activity-unsb{text-align: left;}
35
+ .um-profile .wpforo-activity .wpf-post-excerpt{ width: 100%; font-size: 11px; line-height: 18px; padding: 2px 0px;}
36
+ .um-profile .wpforo-activity .wpf-activity-users{ vertical-align: middle;}
37
+ .um-profile .wpforo-activity .wpf-activity-users a{display: inline-block;}
38
+ .um-profile .wpforo-activity .wpf-activity-users img{ max-width: 30px; margin-left: 5px; line-height: 26px; background-color: #ffffff; padding: 1px; border: 1px solid #cccccc;}
39
+ .um-profile .wpforo-activity .wpf-activity-users span{ display: inline-block; line-height: 16px; }
40
+ .um-profile #wpforo-topics.wpforo-activity .wpf-activity-title{ width: 40%;}
41
+ .um-profile #wpforo-posts.wpforo-activity .wpf-activity-title{ width: 60%;}
42
+ .um-profile #wpforo-liked-posts.wpforo-activity .wpf-activity-title{ width: 60%;}
43
+ .um-profile #wpforo-topics.wpforo-activity table td{ vertical-align: middle;}
44
+ .um-profile .wpforo-activity .wpf-navi {margin:15px 0px;}
45
+ .um-profile .wpforo-activity .wpf-navi.wpf-navi-topic-top{margin-top:-25px;}
46
+ .um-profile .wpforo-activity .wpf-navi.wpf-navi-post-top{margin-top:-25px;}
47
+ .um-profile .wpforo-activity .wpf-navi .wpf-navi-wrap{white-space:nowrap; text-align:left;}
48
+ .um-profile .wpforo-activity .wpf-navi .wpf-navi-wrap .wpf-page-info{font-size:14px; line-height:16px; font-weight:normal; padding-left:5px;}
49
+ .um-profile .wpforo-activity .wpf-navi .wpf-navi-wrap .wpf-prev-button{padding:4px 15px; color:#fff; font-size:14px; cursor:pointer; line-height: 16px; background-color: #888888;}
50
+ .um-profile .wpforo-activity .wpf-navi .wpf-navi-wrap .wpf-next-button{padding:4px 15px; color:#fff; font-size:14px; cursor:pointer; line-height: 16px; background-color: #888888;}
51
+ .um-profile .wpforo-activity .wpf-navi .wpf-navi-wrap i.fa-chevron-left{font-size:10px;}
52
+ .um-profile .wpforo-activity .wpf-navi .wpf-navi-wrap i.fa-chevron-right{font-size:10px;}
53
+ .um-profile .wpforo-activity .wpf-navi select.wpf-navi-dropdown {appearance: none; width: auto; -webkit-appearance: none; -moz-appearance: none; font-size: 15px; line-height: 20px; padding: 2px 10px !important; margin: 0px 2px 0px 1px; cursor: pointer; border: 1px solid #999;}
54
+ .um-profile .wpforo-activity i{ display: inline-block; -webkit-font-smoothing: antialiased; font-family: dashicons; text-decoration: inherit; font-weight: 400; font-style: normal; -moz-transition: color .1s ease-in 0; -webkit-transition: color .1s ease-in 0; text-align: center;}
55
+ .um-profile .wpforo-activity i.fas.fa-chevron-left:before{content: "\f341";}
56
+ .um-profile .wpforo-activity i.fas.fa-chevron-right:before{content: "\f345";}
57
+ @media screen and (max-width:800px) {
58
+ .um-profile .um-profile-body.foro{ max-width: 99%!important; }
59
+ .um-profile .wpforo-activity th{display:block; text-align: right!important; padding: 10px!important; float: none; box-sizing: border-box; width: 100% !important; max-width: 100% !important; border-bottom: none!important;}
60
+ .um-profile .wpforo-activity td{display:block; text-align: right!important; padding: 10px!important;float: none; box-sizing: border-box; width: 100% !important; max-width: 100% !important; border-bottom: none!important;}
61
+ .um-profile .wpforo-activity table tr td:first-child{ padding-top:20px!important;}
62
+ .um-profile .wpforo-activity table tr td:last-child{ border-bottom: 1px solid #cccccc!important;}
63
+ }
wpf-themes/classic/integration/ultimate-member/style.css ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /*
2
+ * wpForo Style for Ultimate Member Integration
3
+ * @since: 1.5.0
4
+ * @package: Classic
5
+ */
6
+
7
+ .um-profile .um-profile-body.foro{ max-width: 94%!important; margin: 0px auto; }
8
+ .um-profile .wpforo-activity { padding: 0px; }
9
+ .um-profile .wpforo-activity h3.wpf-activity-head{ font-size: 18px; font-weight: 500; padding: 0px; margin: 10px 0px; }
10
+ .um-profile .wpforo-activity table,
11
+ .um-profile .wpforo-activity td,
12
+ .um-profile .wpforo-activity th,
13
+ .um-profile .wpforo-activity td a,
14
+ .um-profile .wpforo-activity td a,
15
+ .um-profile .wpforo-activity th p,
16
+ .um-profile .wpforo-activity td p{margin: 0;padding: 0;border: 0; vertical-align: baseline; font-size: 14px; text-decoration: none; box-shadow:none;}
17
+ .um-profile .wpforo-activity td .dashicons-admin-comments,
18
+ .um-profile .wpforo-activity td .dashicons-format-chat,
19
+ .um-profile .wpforo-activity td .dashicons-thumbs-up,
20
+ .um-profile .wpforo-activity td .dashicons-category{font-size: 20px; line-height: 20px; color: #888888; vertical-align: middle; margin: 0px 3px 0px 0px;}
21
+ .um-profile .wpforo-activity td .dashicons-thumbs-up{line-height: 14px;}
22
+ .um-profile .wpforo-activity td .dashicons-category{line-height: 15px;}
23
+ .um-profile .wpforo-activity table{ padding-top: 10px; }
24
+ .um-profile .wpforo-activity table td{ padding: 15px 10px 10px 10px; border-bottom: 1px solid #ddd; font-size: 14px; line-height: 18px;}
25
+ .um-profile .wpforo-activity table td:first-child{padding-left:20px;}
26
+ .um-profile .wpforo-activity table td:last-child{padding-right:20px;}
27
+ .um-profile .wpforo-activity tr:nth-child(even) {background-color: transparent}
28
+ .um-profile .wpforo-activity tr:nth-child(odd) {background-color: #F9F9F9;}
29
+ .um-profile .wpforo-activity .wpf-item-title{font-size:14px; line-height: 20px;}
30
+ .um-profile .wpforo-activity .wpf-activity-title p{ margin: 3px 0px 3px 0px;}
31
+ .um-profile .wpforo-activity .wpf-activity-foot{ text-align: right; border-bottom: 1px solid #ddd; display: inline-block; float: right;}
32
+ .um-profile .wpforo-activity .wpf-activity-posts{font-size: 14px; text-transform: lowercase;}
33
+ .um-profile .wpforo-activity .wpf-activity-date{font-size: 14px; text-transform: lowercase; text-align: right;}
34
+ .um-profile .wpforo-activity .wpf-activity-unsb{text-align: right;}
35
+ .um-profile .wpforo-activity .wpf-post-excerpt{ width: 100%; font-size: 11px; line-height: 18px; padding: 2px 0px;}
36
+ .um-profile .wpforo-activity .wpf-activity-users{ vertical-align: middle;}
37
+ .um-profile .wpforo-activity .wpf-activity-users a{display: inline-block;}
38
+ .um-profile .wpforo-activity .wpf-activity-users img{ max-width: 30px; margin-right: 5px; line-height: 26px; background-color: #ffffff; padding: 1px; border: 1px solid #cccccc;}
39
+ .um-profile .wpforo-activity .wpf-activity-users span{ display: inline-block; line-height: 16px; }
40
+ .um-profile #wpforo-topics.wpforo-activity .wpf-activity-title{ width: 40%;}
41
+ .um-profile #wpforo-posts.wpforo-activity .wpf-activity-title{ width: 60%;}
42
+ .um-profile #wpforo-liked-posts.wpforo-activity .wpf-activity-title{ width: 60%;}
43
+ .um-profile #wpforo-topics.wpforo-activity table td{ vertical-align: middle;}
44
+ .um-profile .wpforo-activity .wpf-navi {margin:15px 0px;}
45
+ .um-profile .wpforo-activity .wpf-navi.wpf-navi-topic-top{margin-top:-25px;}
46
+ .um-profile .wpforo-activity .wpf-navi.wpf-navi-post-top{margin-top:-25px;}
47
+ .um-profile .wpforo-activity .wpf-navi .wpf-navi-wrap{white-space:nowrap; text-align:right;}
48
+ .um-profile .wpforo-activity .wpf-navi .wpf-navi-wrap .wpf-page-info{font-size:14px; line-height:16px; font-weight:normal; padding-right:5px;}
49
+ .um-profile .wpforo-activity .wpf-navi .wpf-navi-wrap .wpf-prev-button{padding:4px 15px; color:#fff; font-size:14px; cursor:pointer; line-height: 16px; background-color: #888888;}
50
+ .um-profile .wpforo-activity .wpf-navi .wpf-navi-wrap .wpf-next-button{padding:4px 15px; color:#fff; font-size:14px; cursor:pointer; line-height: 16px; background-color: #888888;}
51
+ .um-profile .wpforo-activity .wpf-navi .wpf-navi-wrap i.fa-chevron-left{font-size:10px;}
52
+ .um-profile .wpforo-activity .wpf-navi .wpf-navi-wrap i.fa-chevron-right{font-size:10px;}
53
+ .um-profile .wpforo-activity .wpf-navi select.wpf-navi-dropdown {appearance: none; width: auto; -webkit-appearance: none; -moz-appearance: none; font-size: 15px; line-height: 20px; padding: 2px 10px !important; margin: 0px 1px 0px 2px; cursor: pointer; border: 1px solid #999;}
54
+ .um-profile .wpforo-activity i{ display: inline-block; -webkit-font-smoothing: antialiased; font-family: dashicons; text-decoration: inherit; font-weight: 400; font-style: normal; -moz-transition: color .1s ease-in 0; -webkit-transition: color .1s ease-in 0; text-align: center;}
55
+ .um-profile .wpforo-activity i.fas.fa-chevron-left:before{content: "\f341";}
56
+ .um-profile .wpforo-activity i.fas.fa-chevron-right:before{content: "\f345";}
57
+ @media screen and (max-width:800px) {
58
+ .um-profile .um-profile-body.foro{ max-width: 99%!important; }
59
+ .um-profile .wpforo-activity th{display:block; text-align: left!important; padding: 10px!important; float: none; box-sizing: border-box; width: 100% !important; max-width: 100% !important; border-bottom: none!important;}
60
+ .um-profile .wpforo-activity td{display:block; text-align: left!important; padding: 10px!important;float: none; box-sizing: border-box; width: 100% !important; max-width: 100% !important; border-bottom: none!important;}
61
+ .um-profile .wpforo-activity table tr td:first-child{ padding-top:20px!important;}
62
+ .um-profile .wpforo-activity table tr td:last-child{ border-bottom: 1px solid #cccccc!important;}
63
+ }
wpf-themes/classic/profile-account.php CHANGED
@@ -4,7 +4,7 @@
4
  ?>
5
  <div class="wpforo-profile-account wpfbg-9">
6
 
7
- <?php if( $ID == WPF()->current_userid || ( WPF()->perm->usergroup_can('em') && WPF()->perm->user_can_manage_user( WPF()->current_userid, $ID ) ) ) :
8
  $fields = wpforo_account_fields();
9
  ?>
10
 
@@ -16,7 +16,7 @@
16
  <input type="hidden" name="member[userid]" value="<?php echo esc_attr($ID) ?>"/>
17
  <input type="hidden" name="member[username]" value="<?php echo esc_attr($user_login) ?>"/>
18
  <div class="wpf-table">
19
-
20
  <?php wpforo_fields( $fields ); ?>
21
 
22
  <div class="wpf-tr">
4
  ?>
5
  <div class="wpforo-profile-account wpfbg-9">
6
 
7
+ <?php if( $ID == WPF()->current_userid || ( WPF()->perm->usergroup_can('em') && WPF()->perm->user_can_manage_user( WPF()->current_userid, $ID ) ) ) :
8
  $fields = wpforo_account_fields();
9
  ?>
10
 
16
  <input type="hidden" name="member[userid]" value="<?php echo esc_attr($ID) ?>"/>
17
  <input type="hidden" name="member[username]" value="<?php echo esc_attr($user_login) ?>"/>
18
  <div class="wpf-table">
19
+
20
  <?php wpforo_fields( $fields ); ?>
21
 
22
  <div class="wpf-tr">
wpf-themes/classic/register.php CHANGED
@@ -13,7 +13,7 @@
13
  <div class="wpforo-register-content">
14
  <h3><?php wpforo_phrase('Join us today!') ?></h3>
15
  <div class="wpf-table wpforo-register-table wpfbg-9" style="padding-bottom:0px;">
16
-
17
  <?php wpforo_fields( $fields ); ?>
18
 
19
  <div class="wpf-tr">
13
  <div class="wpforo-register-content">
14
  <h3><?php wpforo_phrase('Join us today!') ?></h3>
15
  <div class="wpf-table wpforo-register-table wpfbg-9" style="padding-bottom:0px;">
16
+
17
  <?php wpforo_fields( $fields ); ?>
18
 
19
  <div class="wpf-tr">
wpf-themes/classic/style-rtl.css CHANGED
@@ -12,6 +12,9 @@ RTL Style of Classic Theme
12
  #wpforo-wrap * {box-sizing: border-box; box-shadow:none; color:inherit;}
13
  #wpforo-wrap html, #wpforo-wrap body, #wpforo-wrap div, #wpforo-wrap span, #wpforo-wrap applet, #wpforo-wrap object, #wpforo-wrap iframe, #wpforo-wrap h1, #wpforo-wrap h2, #wpforo-wrap h3, #wpforo-wrap h4, #wpforo-wrap h5, #wpforo-wrap h6, #wpforo-wrap p, #wpforo-wrap blockquote, #wpforo-wrap pre, #wpforo-wrap a, #wpforo-wrap abbr, #wpforo-wrap acronym, #wpforo-wrap address, #wpforo-wrap big, #wpforo-wrap cite, #wpforo-wrap code, #wpforo-wrap del, #wpforo-wrap dfn, #wpforo-wrap em, #wpforo-wrap img, #wpforo-wrap ins, #wpforo-wrap kbd, #wpforo-wrap q, #wpforo-wrap s, #wpforo-wrap samp, #wpforo-wrap small, #wpforo-wrap strike, #wpforo-wrap sub, #wpforo-wrap sup, #wpforo-wrap tt, #wpforo-wrap var, #wpforo-wrap b, #wpforo-wrap u, #wpforo-wrap i, #wpforo-wrap center, #wpforo-wrap dl, #wpforo-wrap dt, #wpforo-wrap dd, #wpforo-wrap ol, #wpforo-wrap ul, #wpforo-wrap li, #wpforo-wrap fieldset, #wpforo-wrap form, #wpforo-wrap label, #wpforo-wrap legend, #wpforo-wrap table, #wpforo-wrap caption, #wpforo-wrap tbody, #wpforo-wrap tfoot, #wpforo-wrap thead, #wpforo-wrap tr, #wpforo-wrap th, #wpforo-wrap td, #wpforo-wrap article, #wpforo-wrap aside, #wpforo-wrap canvas, #wpforo-wrap details, #wpforo-wrap embed, #wpforo-wrap figure, #wpforo-wrap figcaption, #wpforo-wrap footer, #wpforo-wrap header, #wpforo-wrap hgroup, #wpforo-wrap menu, #wpforo-wrap nav, #wpforo-wrap output, #wpforo-wrap ruby, #wpforo-wrap section, #wpforo-wrap summary, #wpforo-wrap time, #wpforo-wrap mark, #wpforo-wrap audio, #wpforo-wrap video {margin: 0;padding: 0;border: 0;font-size: 100%;vertical-align: baseline;}
14
  #wpforo-wrap strong{ font-weight:bold; }
 
 
 
15
  #wpforo-wrap .wpforo-post-content blockquote{ clear: none;}
16
  #wpforo-wrap ol,
17
  #wpforo-wrap ul,
@@ -158,8 +161,8 @@ RTL Style of Classic Theme
158
  /************* wpForo Post Content Style ************/
159
  /****************************************************/
160
  #wpforo-wrap .post-wrap{position: relative;}
161
- #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content{padding:10px 10px 10px 30px; min-height:130px; font-size:14px; line-height:18px;word-wrap: break-word;}
162
- #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content p{font-size:14px; line-height:20px; padding:0px; margin:0px; margin-bottom:10px;}
163
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content img{max-width:100%; max-height:500px; margin:2px;}
164
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content .emoji{font-size:20px;}
165
  #wpforo-wrap .wpforo-post .wpf-right blockquote{display:block; margin:5px 0px 15px 0px; width:90%; padding:10px; font-size:13px;}
@@ -169,7 +172,8 @@ RTL Style of Classic Theme
169
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-code-title{font-size:12px; margin-bottom:10px; padding:0px 2px 5px 2px; font-weight:bold;}
170
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-attachments{padding:10px 10px 7px 10px; margin:20px 0px 5px 0px; width:90%;}
171
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-attachments img{max-width:100%; height:80px; padding:2px;}
172
- #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-signature{width:90%; padding:7px 2px; font-size:13px; line-height:18px; margin: 0 10px 0 0;}
 
173
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-signature p{font-size:12px; line-height:16px; margin:0; padding:2px 0px;}
174
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-signature img {max-height: 200px; max-width: 100%; width: auto;}
175
  #wpforo-wrap .wpforo-post .wpf-right ol,
@@ -205,9 +209,12 @@ RTL Style of Classic Theme
205
  #wpforo-wrap .wpforo-post-content .wpf-video, #wpforo-wrap .wpforo-post-content .wpf-video iframe{max-width: 98%;}
206
  #wpforo-wrap .wpf-member-title{ display:block; cursor:default; }
207
  #wpforo-wrap .wpf-member-title.wpfut{ display:inline-block!important; font-size:11px; line-height:15px; padding:2px 15px; margin:5px auto; border:1px solid #dddddd;}
208
-
209
  #wpforo-wrap .wpf_forum_unread, #wpforo-wrap .wpf_forum_unread a{ font-weight:bold; }
210
  #wpforo-wrap .wpf_topic_unread, #wpforo-wrap .wpf_topic_unread a{ font-weight:bold; font-size:98%; }
 
 
 
 
211
 
212
  /****************************************************/
213
  /********* wpForo Layout 1 (Extended Layout) ********/
@@ -271,7 +278,6 @@ RTL Style of Classic Theme
271
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-left{float: right; padding: 20px 1px 10px; text-align: center; width: 160px;}
272
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-right{margin-right: 162px;}
273
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-right .wpforo-post-content-top{text-align:left; padding:5px 0 5px 10px; margin-right:10px; height:30px;}
274
- #wpforo-wrap .wpfl-1 .wpforo-post .wpf-right .wpf-post-edited{ font-size:12px; padding-top:15px; font-style:italic; padding:10px 10px 0px 10px;}
275
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-left .avatar{width:80px; max-height:80px; padding:2px; float:none; display:inline-block;}
276
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-left .author-avatar{display:block; width:100%; float:none;max-height: 80px; max-width: 80px; margin:0px auto;}
277
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-left .author-name{font-size:14px; text-align:center; font-weight:600; padding:5px 0px 0px 0px; margin-right:-10px;}
@@ -342,7 +348,6 @@ RTL Style of Classic Theme
342
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-right .wpforo-post-content-bottom{text-align:left; font-size:12px; padding:5px 10px 5px 5px; margin-top:10px;}
343
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-right .wpforo-post-content-bottom .cbleft{float:right; text-align:right;}
344
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-right .wpforo-post-content-bottom .cbright{}
345
- #wpforo-wrap .wpfl-2 .wpforo-post .wpf-right .wpf-post-edited{ font-size:12px; padding-top:15px; font-style:italic; padding:10px 0px 0px 0px;}
346
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-left .avatar{width:110px; height:110px; padding:2px; border-radius:50%;}
347
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-left .author-avatar{display:block; width:100%; float:none;max-height: 110px; max-width: 110px; margin:0px auto;}
348
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-left .author-name{font-size:13px; text-align:center; font-weight:bold; padding:5px 0px 0px 0px;}
@@ -446,7 +451,6 @@ RTL Style of Classic Theme
446
  #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .author-stat-item i{padding-left:5px;}
447
  #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .author-rating-full{ min-width:auto; padding:0px; font-size:14px; line-height:14px;}
448
  #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .wpf-answer-button, #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .wpf-add-comment-button{display:inline-block; padding:3px 0px 3px 15px; text-align:left; margin:1px 0px 10px 0px; cursor:pointer; font-size:14px;}
449
- #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .wpf-post-edited{ font-size:12px; padding-top:15px; font-style:italic; padding:10px 0px 0px 0px;}
450
  #wpforo-wrap .wpfl-3 .comment-wrap{margin-bottom:1px; margin-top:6px;}
451
  #wpforo-wrap .wpfl-3 .wpforo-comment{padding: 1px;}
452
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpforo-comment-action-links .wpf-action{ margin:1px 5px;}
@@ -454,10 +458,9 @@ RTL Style of Classic Theme
454
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-left .wpf-comment-icon {font-size:20px; text-align:center; padding-right:35px;}
455
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right{margin-right:92px;}
456
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right .wpforo-comment-content{padding:10px 20px;}
457
- #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right .wpforo-comment-content p{line-height:18px; font-size:14px;}
458
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right .wpforo-comment-action-links{text-align:left; font-size:11px; clear:both;}
459
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right .wpforo-comment-footer{padding:4px 0px 2px 0px; display:block;}
460
- #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right .wpf-post-edited{ font-size:12px; padding-top:15px; font-style:italic; padding:10px 0px 0px 0px; float:left;}
461
  #wpforo-wrap .wpfl-3 .wpf-positive{font-size:28px; cursor: pointer;}
462
  #wpforo-wrap .wpfl-3 .wpf-negative{font-size:28px; cursor: pointer;}
463
  #wpforo-wrap .wpfl-3 .wpf-vote-number{font-size:28px; line-height:30px;}
@@ -496,7 +499,7 @@ RTL Style of Classic Theme
496
  #wpforo-wrap .wpforo-profile-wrap .h-header .wpf-profile-img-wrap{display:inline-block; float:right}
497
  #wpforo-wrap .wpforo-profile-wrap .h-header .wpf-profile-data-wrap{float:right}
498
  #wpforo-wrap .wpforo-profile-wrap .h-picture{float:none;text-align:center;padding:0px 0px 0px 0px;line-height:0px;display:inline-block;}
499
- #wpforo-wrap .wpforo-profile-wrap .h-picture .avatar{background: #fefefe; border: 3px solid #eeeeee; border-radius: 10px; box-shadow: 0 0 5px 3px #aaaaaa; display: inline-block; height: auto; margin: 0; max-height: 160px; max-width: 160px; padding: 0;}
500
  #wpforo-wrap .wpforo-profile-wrap .h-header-info{padding:0px;display:block;vertical-align:top;}
501
  #wpforo-wrap .wpforo-profile-wrap .h-left{float:right; text-align:right; padding:0px; line-height:0px; display:inline-block;}
502
  #wpforo-wrap .wpforo-profile-wrap .h-left .avatar{padding:2px; height:auto; display:inline-block; margin:0px; border-radius:50%; max-width:150px; max-height:150px;}
@@ -865,10 +868,12 @@ RTL Style of Classic Theme
865
  #wpforo-wrap .wpf-field input[type="url"],
866
  #wpforo-wrap .wpf-field input[type="tel"],
867
  #wpforo-wrap .wpf-field input[type="search"],
 
868
  #wpforo-wrap .wpf-field textarea,
869
  #wpforo-wrap .wpf-field select{ width:99%; max-width:99%; margin: 2px; outline: 0 none; padding: 4px 28px 4px 4px; font-size: 13px; line-height: 21px; border:1px solid #cccccc; background-color: #fefefe; box-shadow: 0px 0px 2px 1px #E6E6E6; height: auto;}
870
  #wpforo-wrap .wpf-field select{ width:100%; max-width:300px;}
871
  #wpforo-wrap .wpf-field textarea{ padding: 10px 30px 2px 10px; }
 
872
  #wpforo-wrap .wpf-field-wrap {position: relative;}
873
  #wpforo-wrap .wpf-field-wrap .wpf-field-icon {position: absolute; right: 10px; top:10px;}
874
  #wpforo-wrap .wpf-field-type-textarea .wpf-field-wrap .wpf-field-icon {right: 12px; top:15px;}
@@ -1109,6 +1114,7 @@ RTL Style of Classic Theme
1109
  #wpforo-wrap .wpf-button{padding:5px 5px!important; font-size:13px; line-height: 14px;}
1110
  #wpforo-wrap .wpf-head-bar-left #wpforo-title{font-size: 17px;margin: 7px 0 10px;}
1111
  #wpforo-wrap .wpforo-feed{ float:none; display:block; padding-top:5px;}
 
1112
 
1113
  #wpforo-wrap .wpf-breadcrumb a{display:none;}
1114
  #wpforo-wrap .wpf-breadcrumb a:first-child {display: inline-block!important;}
12
  #wpforo-wrap * {box-sizing: border-box; box-shadow:none; color:inherit;}
13
  #wpforo-wrap html, #wpforo-wrap body, #wpforo-wrap div, #wpforo-wrap span, #wpforo-wrap applet, #wpforo-wrap object, #wpforo-wrap iframe, #wpforo-wrap h1, #wpforo-wrap h2, #wpforo-wrap h3, #wpforo-wrap h4, #wpforo-wrap h5, #wpforo-wrap h6, #wpforo-wrap p, #wpforo-wrap blockquote, #wpforo-wrap pre, #wpforo-wrap a, #wpforo-wrap abbr, #wpforo-wrap acronym, #wpforo-wrap address, #wpforo-wrap big, #wpforo-wrap cite, #wpforo-wrap code, #wpforo-wrap del, #wpforo-wrap dfn, #wpforo-wrap em, #wpforo-wrap img, #wpforo-wrap ins, #wpforo-wrap kbd, #wpforo-wrap q, #wpforo-wrap s, #wpforo-wrap samp, #wpforo-wrap small, #wpforo-wrap strike, #wpforo-wrap sub, #wpforo-wrap sup, #wpforo-wrap tt, #wpforo-wrap var, #wpforo-wrap b, #wpforo-wrap u, #wpforo-wrap i, #wpforo-wrap center, #wpforo-wrap dl, #wpforo-wrap dt, #wpforo-wrap dd, #wpforo-wrap ol, #wpforo-wrap ul, #wpforo-wrap li, #wpforo-wrap fieldset, #wpforo-wrap form, #wpforo-wrap label, #wpforo-wrap legend, #wpforo-wrap table, #wpforo-wrap caption, #wpforo-wrap tbody, #wpforo-wrap tfoot, #wpforo-wrap thead, #wpforo-wrap tr, #wpforo-wrap th, #wpforo-wrap td, #wpforo-wrap article, #wpforo-wrap aside, #wpforo-wrap canvas, #wpforo-wrap details, #wpforo-wrap embed, #wpforo-wrap figure, #wpforo-wrap figcaption, #wpforo-wrap footer, #wpforo-wrap header, #wpforo-wrap hgroup, #wpforo-wrap menu, #wpforo-wrap nav, #wpforo-wrap output, #wpforo-wrap ruby, #wpforo-wrap section, #wpforo-wrap summary, #wpforo-wrap time, #wpforo-wrap mark, #wpforo-wrap audio, #wpforo-wrap video {margin: 0;padding: 0;border: 0;font-size: 100%;vertical-align: baseline;}
14
  #wpforo-wrap strong{ font-weight:bold; }
15
+ #wpforo-wrap .wpforo-admin-note .aligncenter{clear: both;display: block;margin: 0 auto 1.75em;}
16
+ #wpforo-wrap .wpforo-admin-note .alignright{float: left; margin: 0.375em 1.75em 1.75em 0 ;}
17
+ #wpforo-wrap .wpforo-admin-note .alignleft{float: right; margin: 0.375em 0 1.75em 1.75em ;}
18
  #wpforo-wrap .wpforo-post-content blockquote{ clear: none;}
19
  #wpforo-wrap ol,
20
  #wpforo-wrap ul,
161
  /************* wpForo Post Content Style ************/
162
  /****************************************************/
163
  #wpforo-wrap .post-wrap{position: relative;}
164
+ #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content{padding:10px 10px 10px 30px; min-height:130px; font-size:14px; word-wrap: break-word;}
165
+ #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content p{font-size:14px; padding:0px; margin:0px; margin-bottom:10px;}
166
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content img{max-width:100%; max-height:500px; margin:2px;}
167
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content .emoji{font-size:20px;}
168
  #wpforo-wrap .wpforo-post .wpf-right blockquote{display:block; margin:5px 0px 15px 0px; width:90%; padding:10px; font-size:13px;}
172
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-code-title{font-size:12px; margin-bottom:10px; padding:0px 2px 5px 2px; font-weight:bold;}
173
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-attachments{padding:10px 10px 7px 10px; margin:20px 0px 5px 0px; width:90%;}
174
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-attachments img{max-width:100%; height:80px; padding:2px;}
175
+ #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-signature{width:90%; padding:10px 2px; font-size:13px; line-height:18px; margin: 10px 0 0 0px;}
176
+ #wpforo-wrap .wpfl-1 .wpforo-post .wpf-right .wpforo-post-signature{ margin: 10px 10px 0 0; }
177
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-signature p{font-size:12px; line-height:16px; margin:0; padding:2px 0px;}
178
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-signature img {max-height: 200px; max-width: 100%; width: auto;}
179
  #wpforo-wrap .wpforo-post .wpf-right ol,
209
  #wpforo-wrap .wpforo-post-content .wpf-video, #wpforo-wrap .wpforo-post-content .wpf-video iframe{max-width: 98%;}
210
  #wpforo-wrap .wpf-member-title{ display:block; cursor:default; }
211
  #wpforo-wrap .wpf-member-title.wpfut{ display:inline-block!important; font-size:11px; line-height:15px; padding:2px 15px; margin:5px auto; border:1px solid #dddddd;}
 
212
  #wpforo-wrap .wpf_forum_unread, #wpforo-wrap .wpf_forum_unread a{ font-weight:bold; }
213
  #wpforo-wrap .wpf_topic_unread, #wpforo-wrap .wpf_topic_unread a{ font-weight:bold; font-size:98%; }
214
+ #wpforo-wrap .wpf-post-edit-wrap{ border-top: 1px dotted #aaaaaa; padding: 10px 0px; margin: 20px 10px 20px; width: 90%; }
215
+ #wpforo-wrap .wpfl-2 .wpf-post-edit-wrap, #wpforo-wrap .wpfl-3 .wpf-post-edit-wrap{ margin: 20px 0px 20px; }
216
+ #wpforo-wrap .wpf-post-edit-wrap .wpf-post-edited{font-size:11px; font-style:italic; padding:0px;}
217
+ #wpforo-wrap .wpf-post-edit-wrap .wpf-post-edited i{ padding: 0px 2px 0px 5px;}
218
 
219
  /****************************************************/
220
  /********* wpForo Layout 1 (Extended Layout) ********/
278
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-left{float: right; padding: 20px 1px 10px; text-align: center; width: 160px;}
279
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-right{margin-right: 162px;}
280
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-right .wpforo-post-content-top{text-align:left; padding:5px 0 5px 10px; margin-right:10px; height:30px;}
 
281
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-left .avatar{width:80px; max-height:80px; padding:2px; float:none; display:inline-block;}
282
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-left .author-avatar{display:block; width:100%; float:none;max-height: 80px; max-width: 80px; margin:0px auto;}
283
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-left .author-name{font-size:14px; text-align:center; font-weight:600; padding:5px 0px 0px 0px; margin-right:-10px;}
348
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-right .wpforo-post-content-bottom{text-align:left; font-size:12px; padding:5px 10px 5px 5px; margin-top:10px;}
349
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-right .wpforo-post-content-bottom .cbleft{float:right; text-align:right;}
350
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-right .wpforo-post-content-bottom .cbright{}
 
351
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-left .avatar{width:110px; height:110px; padding:2px; border-radius:50%;}
352
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-left .author-avatar{display:block; width:100%; float:none;max-height: 110px; max-width: 110px; margin:0px auto;}
353
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-left .author-name{font-size:13px; text-align:center; font-weight:bold; padding:5px 0px 0px 0px;}
451
  #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .author-stat-item i{padding-left:5px;}
452
  #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .author-rating-full{ min-width:auto; padding:0px; font-size:14px; line-height:14px;}
453
  #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .wpf-answer-button, #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .wpf-add-comment-button{display:inline-block; padding:3px 0px 3px 15px; text-align:left; margin:1px 0px 10px 0px; cursor:pointer; font-size:14px;}
 
454
  #wpforo-wrap .wpfl-3 .comment-wrap{margin-bottom:1px; margin-top:6px;}
455
  #wpforo-wrap .wpfl-3 .wpforo-comment{padding: 1px;}
456
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpforo-comment-action-links .wpf-action{ margin:1px 5px;}
458
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-left .wpf-comment-icon {font-size:20px; text-align:center; padding-right:35px;}
459
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right{margin-right:92px;}
460
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right .wpforo-comment-content{padding:10px 20px;}
461
+ #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right .wpforo-comment-content p{font-size:14px;}
462
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right .wpforo-comment-action-links{text-align:left; font-size:11px; clear:both;}
463
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right .wpforo-comment-footer{padding:4px 0px 2px 0px; display:block;}
 
464
  #wpforo-wrap .wpfl-3 .wpf-positive{font-size:28px; cursor: pointer;}
465
  #wpforo-wrap .wpfl-3 .wpf-negative{font-size:28px; cursor: pointer;}
466
  #wpforo-wrap .wpfl-3 .wpf-vote-number{font-size:28px; line-height:30px;}
499
  #wpforo-wrap .wpforo-profile-wrap .h-header .wpf-profile-img-wrap{display:inline-block; float:right}
500
  #wpforo-wrap .wpforo-profile-wrap .h-header .wpf-profile-data-wrap{float:right}
501
  #wpforo-wrap .wpforo-profile-wrap .h-picture{float:none;text-align:center;padding:0px 0px 0px 0px;line-height:0px;display:inline-block;}
502
+ #wpforo-wrap .wpforo-profile-wrap .h-picture .avatar{background: #fefefe; border: 3px solid #eeeeee; border-radius: 0px; box-shadow: 0 0 5px 3px #aaaaaa; display: inline-block; height: auto; margin: 0; max-height: 160px; max-width: 160px; padding: 0;}
503
  #wpforo-wrap .wpforo-profile-wrap .h-header-info{padding:0px;display:block;vertical-align:top;}
504
  #wpforo-wrap .wpforo-profile-wrap .h-left{float:right; text-align:right; padding:0px; line-height:0px; display:inline-block;}
505
  #wpforo-wrap .wpforo-profile-wrap .h-left .avatar{padding:2px; height:auto; display:inline-block; margin:0px; border-radius:50%; max-width:150px; max-height:150px;}
868
  #wpforo-wrap .wpf-field input[type="url"],
869
  #wpforo-wrap .wpf-field input[type="tel"],
870
  #wpforo-wrap .wpf-field input[type="search"],
871
+ #wpforo-wrap .wpf-field input[type="color"],
872
  #wpforo-wrap .wpf-field textarea,
873
  #wpforo-wrap .wpf-field select{ width:99%; max-width:99%; margin: 2px; outline: 0 none; padding: 4px 28px 4px 4px; font-size: 13px; line-height: 21px; border:1px solid #cccccc; background-color: #fefefe; box-shadow: 0px 0px 2px 1px #E6E6E6; height: auto;}
874
  #wpforo-wrap .wpf-field select{ width:100%; max-width:300px;}
875
  #wpforo-wrap .wpf-field textarea{ padding: 10px 30px 2px 10px; }
876
+ #wpforo-wrap .wpf-field input[type="color"]{ height: 30px;}
877
  #wpforo-wrap .wpf-field-wrap {position: relative;}
878
  #wpforo-wrap .wpf-field-wrap .wpf-field-icon {position: absolute; right: 10px; top:10px;}
879
  #wpforo-wrap .wpf-field-type-textarea .wpf-field-wrap .wpf-field-icon {right: 12px; top:15px;}
1114
  #wpforo-wrap .wpf-button{padding:5px 5px!important; font-size:13px; line-height: 14px;}
1115
  #wpforo-wrap .wpf-head-bar-left #wpforo-title{font-size: 17px;margin: 7px 0 10px;}
1116
  #wpforo-wrap .wpforo-feed{ float:none; display:block; padding-top:5px;}
1117
+ #wpforo-wrap .wpforo-admin-note{margin: 5px auto 20px auto; padding: 20px; font-size: 14px; box-shadow: inset 0px 0px 20px 5px rgba(240,240,240,0.6);}
1118
 
1119
  #wpforo-wrap .wpf-breadcrumb a{display:none;}
1120
  #wpforo-wrap .wpf-breadcrumb a:first-child {display: inline-block!important;}
wpf-themes/classic/style.css CHANGED
@@ -16,6 +16,9 @@ Author: gVectors Team
16
  #wpforo-wrap * {box-sizing: border-box; box-shadow:none; color:inherit;}
17
  #wpforo-wrap html, #wpforo-wrap body, #wpforo-wrap div, #wpforo-wrap span, #wpforo-wrap applet, #wpforo-wrap object, #wpforo-wrap iframe, #wpforo-wrap h1, #wpforo-wrap h2, #wpforo-wrap h3, #wpforo-wrap h4, #wpforo-wrap h5, #wpforo-wrap h6, #wpforo-wrap p, #wpforo-wrap blockquote, #wpforo-wrap pre, #wpforo-wrap a, #wpforo-wrap abbr, #wpforo-wrap acronym, #wpforo-wrap address, #wpforo-wrap big, #wpforo-wrap cite, #wpforo-wrap code, #wpforo-wrap del, #wpforo-wrap dfn, #wpforo-wrap em, #wpforo-wrap img, #wpforo-wrap ins, #wpforo-wrap kbd, #wpforo-wrap q, #wpforo-wrap s, #wpforo-wrap samp, #wpforo-wrap small, #wpforo-wrap strike, #wpforo-wrap sub, #wpforo-wrap sup, #wpforo-wrap tt, #wpforo-wrap var, #wpforo-wrap b, #wpforo-wrap u, #wpforo-wrap i, #wpforo-wrap center, #wpforo-wrap dl, #wpforo-wrap dt, #wpforo-wrap dd, #wpforo-wrap ol, #wpforo-wrap ul, #wpforo-wrap li, #wpforo-wrap fieldset, #wpforo-wrap form, #wpforo-wrap label, #wpforo-wrap legend, #wpforo-wrap table, #wpforo-wrap caption, #wpforo-wrap tbody, #wpforo-wrap tfoot, #wpforo-wrap thead, #wpforo-wrap tr, #wpforo-wrap th, #wpforo-wrap td, #wpforo-wrap article, #wpforo-wrap aside, #wpforo-wrap canvas, #wpforo-wrap details, #wpforo-wrap embed, #wpforo-wrap figure, #wpforo-wrap figcaption, #wpforo-wrap footer, #wpforo-wrap header, #wpforo-wrap hgroup, #wpforo-wrap menu, #wpforo-wrap nav, #wpforo-wrap output, #wpforo-wrap ruby, #wpforo-wrap section, #wpforo-wrap summary, #wpforo-wrap time, #wpforo-wrap mark, #wpforo-wrap audio, #wpforo-wrap video {margin: 0;padding: 0;border: 0;font-size: 100%;vertical-align: baseline;}
18
  #wpforo-wrap strong{ font-weight:bold; }
 
 
 
19
  #wpforo-wrap .wpforo-post-content blockquote{ clear: none;}
20
  #wpforo-wrap ol,
21
  #wpforo-wrap ul,
@@ -61,6 +64,7 @@ Author: gVectors Team
61
  #wpforo-wrap .wpf-action.wpforo-tools i{margin-right:4px;}
62
  #wpforo-wrap .wpf-vsep{ display:inline-block; padding:0px 5px;}
63
  #wpforo-wrap .wpforo-feed{float:right;font-size:12px;}
 
64
 
65
  #wpforo-wrap .wpforo-text ol,
66
  #wpforo-wrap .wpforo-text ol li {list-style:decimal; margin: 2px 15px;}
@@ -163,8 +167,8 @@ Author: gVectors Team
163
  /************* wpForo Post Content Style ************/
164
  /****************************************************/
165
  #wpforo-wrap .post-wrap{position: relative;}
166
- #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content{padding:10px 30px 10px 10px; min-height:130px; font-size:14px; line-height:18px;word-wrap: break-word;}
167
- #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content p{font-size:14px; line-height:20px; padding:0px; margin:0px; margin-bottom:10px;}
168
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content img{max-width:100%; max-height:500px; margin:2px;}
169
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content .emoji{font-size:20px;}
170
  #wpforo-wrap .wpforo-post .wpf-right blockquote{display:block; margin:5px 0px 15px 0px; width:90%; padding:10px; font-size:13px;}
@@ -174,7 +178,8 @@ Author: gVectors Team
174
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-code-title{font-size:12px; margin-bottom:10px; padding:0px 2px 5px 2px; font-weight:bold;}
175
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-attachments{padding:10px 10px 7px 10px; margin:20px 0px 5px 0px; width:90%;}
176
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-attachments img{max-width:100%; height:80px; padding:2px;}
177
- #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-signature{width:90%; padding:7px 2px; font-size:13px; line-height:18px; margin: 0 0 0 10px;}
 
178
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-signature p{font-size:12px; line-height:16px; margin:0; padding:2px 0px;}
179
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-signature img {max-height: 200px; max-width: 100%; width: auto;}
180
  #wpforo-wrap .wpforo-post .wpf-right ol,
@@ -210,9 +215,13 @@ Author: gVectors Team
210
  #wpforo-wrap .wpforo-post-content .wpf-video, #wpforo-wrap .wpforo-post-content .wpf-video iframe{max-width: 98%;}
211
  #wpforo-wrap .wpf-member-title{ display:block; cursor:default; }
212
  #wpforo-wrap .wpf-member-title.wpfut{ display:inline-block!important; font-size:11px; line-height:15px; padding:2px 15px; margin:5px auto; border:1px solid #dddddd;}
213
-
214
  #wpforo-wrap .wpf_forum_unread, #wpforo-wrap .wpf_forum_unread a{ font-weight:bold; }
215
  #wpforo-wrap .wpf_topic_unread, #wpforo-wrap .wpf_topic_unread a{ font-weight:bold; font-size:98%; }
 
 
 
 
 
216
 
217
  /****************************************************/
218
  /********* wpForo Layout 1 (Extended Layout) ********/
@@ -276,7 +285,6 @@ Author: gVectors Team
276
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-left{float: left; padding: 20px 1px 10px; text-align: center; width: 160px;}
277
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-right{margin-left: 162px;}
278
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-right .wpforo-post-content-top{text-align:right; padding:5px 10px 5px 0; margin-left:10px; height:30px;}
279
- #wpforo-wrap .wpfl-1 .wpforo-post .wpf-right .wpf-post-edited{ font-size:12px; padding-top:15px; font-style:italic; padding:10px 10px 0px 10px;}
280
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-left .avatar{width:80px; max-height:80px; padding:2px; float:none; display:inline-block;}
281
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-left .author-avatar{display:block; width:100%; float:none;max-height: 80px; max-width: 80px; margin:0px auto;}
282
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-left .author-name{font-size:14px; text-align:center; font-weight:600; padding:5px 0px 0px 0px; margin-left:-10px;}
@@ -347,7 +355,6 @@ Author: gVectors Team
347
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-right .wpforo-post-content-bottom{text-align:right; font-size:12px; padding:5px 5px 5px 10px; margin-top:10px;}
348
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-right .wpforo-post-content-bottom .cbleft{float:left; text-align:left;}
349
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-right .wpforo-post-content-bottom .cbright{}
350
- #wpforo-wrap .wpfl-2 .wpforo-post .wpf-right .wpf-post-edited{ font-size:12px; padding-top:15px; font-style:italic; padding:10px 0px 0px 0px;}
351
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-left .avatar{width:110px; height:110px; padding:2px; border-radius:50%;}
352
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-left .author-avatar{display:block; width:100%; float:none;max-height: 110px; max-width: 110px; margin:0px auto;}
353
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-left .author-name{font-size:13px; text-align:center; font-weight:bold; padding:5px 0px 0px 0px;}
@@ -451,7 +458,6 @@ Author: gVectors Team
451
  #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .author-stat-item i{padding-right:5px;}
452
  #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .author-rating-full{ min-width:auto; padding:0px; font-size:14px; line-height:14px;}
453
  #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .wpf-answer-button, #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .wpf-add-comment-button{display:inline-block; padding:3px 15px 3px 0px; text-align:right; margin:1px 0px 10px 0px; cursor:pointer; font-size:14px;}
454
- #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .wpf-post-edited{ font-size:12px; padding-top:15px; font-style:italic; padding:10px 0px 0px 0px;}
455
  #wpforo-wrap .wpfl-3 .comment-wrap{margin-bottom:1px; margin-top:6px;}
456
  #wpforo-wrap .wpfl-3 .wpforo-comment{padding: 1px;}
457
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpforo-comment-action-links .wpf-action{ margin:1px 5px;}
@@ -459,10 +465,9 @@ Author: gVectors Team
459
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-left .wpf-comment-icon {font-size:20px; text-align:center; padding-left:35px;}
460
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right{margin-left:92px;}
461
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right .wpforo-comment-content{padding:10px 20px;}
462
- #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right .wpforo-comment-content p{line-height:18px; font-size:14px;}
463
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right .wpforo-comment-action-links{text-align:right; font-size:11px; clear:both;}
464
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right .wpforo-comment-footer{padding:4px 0px 2px 0px; display:block;}
465
- #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right .wpf-post-edited{ font-size:12px; padding-top:15px; font-style:italic; padding:10px 0px 0px 0px; float:right;}
466
  #wpforo-wrap .wpfl-3 .wpf-positive{font-size:28px; cursor: pointer;}
467
  #wpforo-wrap .wpfl-3 .wpf-negative{font-size:28px; cursor: pointer;}
468
  #wpforo-wrap .wpfl-3 .wpf-vote-number{font-size:28px; line-height:30px;}
@@ -501,7 +506,7 @@ Author: gVectors Team
501
  #wpforo-wrap .wpforo-profile-wrap .h-header .wpf-profile-img-wrap{display:inline-block; float:left}
502
  #wpforo-wrap .wpforo-profile-wrap .h-header .wpf-profile-data-wrap{float:left}
503
  #wpforo-wrap .wpforo-profile-wrap .h-picture{float:none;text-align:center;padding:0px 0px 0px 0px;line-height:0px;display:inline-block;}
504
- #wpforo-wrap .wpforo-profile-wrap .h-picture .avatar{background: #fefefe; border: 3px solid #eeeeee; border-radius: 10px; box-shadow: 0 0 5px 3px #aaaaaa; display: inline-block; height: auto; margin: 0; max-height: 160px; max-width: 160px; padding: 0;}
505
  #wpforo-wrap .wpforo-profile-wrap .h-header-info{padding:0px;display:block;vertical-align:top;}
506
  #wpforo-wrap .wpforo-profile-wrap .h-left{float:left; text-align:left; padding:0px; line-height:0px; display:inline-block;}
507
  #wpforo-wrap .wpforo-profile-wrap .h-left .avatar{padding:2px; height:auto; display:inline-block; margin:0px; border-radius:50%; max-width:150px; max-height:150px;}
@@ -868,10 +873,12 @@ Author: gVectors Team
868
  #wpforo-wrap .wpf-field input[type="url"],
869
  #wpforo-wrap .wpf-field input[type="tel"],
870
  #wpforo-wrap .wpf-field input[type="search"],
 
871
  #wpforo-wrap .wpf-field textarea,
872
  #wpforo-wrap .wpf-field select{ width:99%; max-width:99%; margin: 2px; outline: 0 none; padding: 4px 4px 4px 28px; font-size: 13px; line-height: 21px; border:1px solid #cccccc; background-color: #fefefe; box-shadow: 0px 0px 2px 1px #E6E6E6; height: auto;}
873
  #wpforo-wrap .wpf-field select{ width:100%; max-width:300px;}
874
  #wpforo-wrap .wpf-field textarea{ padding: 10px 10px 2px 30px; }
 
875
  #wpforo-wrap .wpf-field-wrap {position: relative;}
876
  #wpforo-wrap .wpf-field-wrap .wpf-field-icon {position: absolute; left: 10px; top:10px;}
877
  #wpforo-wrap .wpf-field-type-textarea .wpf-field-wrap .wpf-field-icon {left: 12px; top:15px;}
16
  #wpforo-wrap * {box-sizing: border-box; box-shadow:none; color:inherit;}
17
  #wpforo-wrap html, #wpforo-wrap body, #wpforo-wrap div, #wpforo-wrap span, #wpforo-wrap applet, #wpforo-wrap object, #wpforo-wrap iframe, #wpforo-wrap h1, #wpforo-wrap h2, #wpforo-wrap h3, #wpforo-wrap h4, #wpforo-wrap h5, #wpforo-wrap h6, #wpforo-wrap p, #wpforo-wrap blockquote, #wpforo-wrap pre, #wpforo-wrap a, #wpforo-wrap abbr, #wpforo-wrap acronym, #wpforo-wrap address, #wpforo-wrap big, #wpforo-wrap cite, #wpforo-wrap code, #wpforo-wrap del, #wpforo-wrap dfn, #wpforo-wrap em, #wpforo-wrap img, #wpforo-wrap ins, #wpforo-wrap kbd, #wpforo-wrap q, #wpforo-wrap s, #wpforo-wrap samp, #wpforo-wrap small, #wpforo-wrap strike, #wpforo-wrap sub, #wpforo-wrap sup, #wpforo-wrap tt, #wpforo-wrap var, #wpforo-wrap b, #wpforo-wrap u, #wpforo-wrap i, #wpforo-wrap center, #wpforo-wrap dl, #wpforo-wrap dt, #wpforo-wrap dd, #wpforo-wrap ol, #wpforo-wrap ul, #wpforo-wrap li, #wpforo-wrap fieldset, #wpforo-wrap form, #wpforo-wrap label, #wpforo-wrap legend, #wpforo-wrap table, #wpforo-wrap caption, #wpforo-wrap tbody, #wpforo-wrap tfoot, #wpforo-wrap thead, #wpforo-wrap tr, #wpforo-wrap th, #wpforo-wrap td, #wpforo-wrap article, #wpforo-wrap aside, #wpforo-wrap canvas, #wpforo-wrap details, #wpforo-wrap embed, #wpforo-wrap figure, #wpforo-wrap figcaption, #wpforo-wrap footer, #wpforo-wrap header, #wpforo-wrap hgroup, #wpforo-wrap menu, #wpforo-wrap nav, #wpforo-wrap output, #wpforo-wrap ruby, #wpforo-wrap section, #wpforo-wrap summary, #wpforo-wrap time, #wpforo-wrap mark, #wpforo-wrap audio, #wpforo-wrap video {margin: 0;padding: 0;border: 0;font-size: 100%;vertical-align: baseline;}
18
  #wpforo-wrap strong{ font-weight:bold; }
19
+ #wpforo-wrap .wpforo-admin-note .aligncenter{clear: both; display: block; margin: 0 auto 1.75em;}
20
+ #wpforo-wrap .wpforo-admin-note .alignright {float: right; margin: 0.375em 0 1.75em 1.75em;}
21
+ #wpforo-wrap .wpforo-admin-note .alignleft {float: left;margin: 0.375em 1.75em 1.75em 0;}
22
  #wpforo-wrap .wpforo-post-content blockquote{ clear: none;}
23
  #wpforo-wrap ol,
24
  #wpforo-wrap ul,
64
  #wpforo-wrap .wpf-action.wpforo-tools i{margin-right:4px;}
65
  #wpforo-wrap .wpf-vsep{ display:inline-block; padding:0px 5px;}
66
  #wpforo-wrap .wpforo-feed{float:right;font-size:12px;}
67
+ #wpforo-wrap .wpforo-admin-note{margin: 5px auto 20px auto; padding: 20px; font-size: 14px; box-shadow: inset 0px 0px 20px 5px rgba(240,240,240,0.6);}
68
 
69
  #wpforo-wrap .wpforo-text ol,
70
  #wpforo-wrap .wpforo-text ol li {list-style:decimal; margin: 2px 15px;}
167
  /************* wpForo Post Content Style ************/
168
  /****************************************************/
169
  #wpforo-wrap .post-wrap{position: relative;}
170
+ #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content{padding:10px 30px 10px 10px; min-height:130px; font-size:14px; word-wrap: break-word;}
171
+ #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content p{font-size:14px; padding:0px; margin:0px; margin-bottom:10px;}
172
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content img{max-width:100%; max-height:500px; margin:2px;}
173
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content .emoji{font-size:20px;}
174
  #wpforo-wrap .wpforo-post .wpf-right blockquote{display:block; margin:5px 0px 15px 0px; width:90%; padding:10px; font-size:13px;}
178
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-code-title{font-size:12px; margin-bottom:10px; padding:0px 2px 5px 2px; font-weight:bold;}
179
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-attachments{padding:10px 10px 7px 10px; margin:20px 0px 5px 0px; width:90%;}
180
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-attachments img{max-width:100%; height:80px; padding:2px;}
181
+ #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-signature{width:90%; padding:10px 2px; font-size:13px; line-height:18px; margin: 10px 0 0 0px;}
182
+ #wpforo-wrap .wpfl-1 .wpforo-post .wpf-right .wpforo-post-signature{ margin: 10px 0 0 10px; }
183
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-signature p{font-size:12px; line-height:16px; margin:0; padding:2px 0px;}
184
  #wpforo-wrap .wpforo-post .wpf-right .wpforo-post-signature img {max-height: 200px; max-width: 100%; width: auto;}
185
  #wpforo-wrap .wpforo-post .wpf-right ol,
215
  #wpforo-wrap .wpforo-post-content .wpf-video, #wpforo-wrap .wpforo-post-content .wpf-video iframe{max-width: 98%;}
216
  #wpforo-wrap .wpf-member-title{ display:block; cursor:default; }
217
  #wpforo-wrap .wpf-member-title.wpfut{ display:inline-block!important; font-size:11px; line-height:15px; padding:2px 15px; margin:5px auto; border:1px solid #dddddd;}
 
218
  #wpforo-wrap .wpf_forum_unread, #wpforo-wrap .wpf_forum_unread a{ font-weight:bold; }
219
  #wpforo-wrap .wpf_topic_unread, #wpforo-wrap .wpf_topic_unread a{ font-weight:bold; font-size:98%; }
220
+ #wpforo-wrap .wpf-post-edit-wrap{ border-top: 1px dotted #aaaaaa; padding: 10px 0px; margin: 20px 10px 20px; width: 90%; }
221
+ #wpforo-wrap .wpfl-2 .wpf-post-edit-wrap, #wpforo-wrap .wpfl-3 .wpf-post-edit-wrap{ margin: 20px 0px 20px; }
222
+ #wpforo-wrap .wpf-post-edit-wrap .wpf-post-edited{font-size:11px; font-style:italic; padding:0px;}
223
+ #wpforo-wrap .wpf-post-edit-wrap .wpf-post-edited i{ padding: 0px 5px 0px 2px;}
224
+
225
 
226
  /****************************************************/
227
  /********* wpForo Layout 1 (Extended Layout) ********/
285
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-left{float: left; padding: 20px 1px 10px; text-align: center; width: 160px;}
286
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-right{margin-left: 162px;}
287
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-right .wpforo-post-content-top{text-align:right; padding:5px 10px 5px 0; margin-left:10px; height:30px;}
 
288
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-left .avatar{width:80px; max-height:80px; padding:2px; float:none; display:inline-block;}
289
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-left .author-avatar{display:block; width:100%; float:none;max-height: 80px; max-width: 80px; margin:0px auto;}
290
  #wpforo-wrap .wpfl-1 .wpforo-post .wpf-left .author-name{font-size:14px; text-align:center; font-weight:600; padding:5px 0px 0px 0px; margin-left:-10px;}
355
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-right .wpforo-post-content-bottom{text-align:right; font-size:12px; padding:5px 5px 5px 10px; margin-top:10px;}
356
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-right .wpforo-post-content-bottom .cbleft{float:left; text-align:left;}
357
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-right .wpforo-post-content-bottom .cbright{}
 
358
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-left .avatar{width:110px; height:110px; padding:2px; border-radius:50%;}
359
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-left .author-avatar{display:block; width:100%; float:none;max-height: 110px; max-width: 110px; margin:0px auto;}
360
  #wpforo-wrap .wpfl-2 .wpforo-post .wpf-left .author-name{font-size:13px; text-align:center; font-weight:bold; padding:5px 0px 0px 0px;}
458
  #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .author-stat-item i{padding-right:5px;}
459
  #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .author-rating-full{ min-width:auto; padding:0px; font-size:14px; line-height:14px;}
460
  #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .wpf-answer-button, #wpforo-wrap .wpfl-3 .wpforo-post .wpf-right .wpf-add-comment-button{display:inline-block; padding:3px 15px 3px 0px; text-align:right; margin:1px 0px 10px 0px; cursor:pointer; font-size:14px;}
 
461
  #wpforo-wrap .wpfl-3 .comment-wrap{margin-bottom:1px; margin-top:6px;}
462
  #wpforo-wrap .wpfl-3 .wpforo-comment{padding: 1px;}
463
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpforo-comment-action-links .wpf-action{ margin:1px 5px;}
465
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-left .wpf-comment-icon {font-size:20px; text-align:center; padding-left:35px;}
466
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right{margin-left:92px;}
467
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right .wpforo-comment-content{padding:10px 20px;}
468
+ #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right .wpforo-comment-content p{font-size:14px;}
469
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right .wpforo-comment-action-links{text-align:right; font-size:11px; clear:both;}
470
  #wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right .wpforo-comment-footer{padding:4px 0px 2px 0px; display:block;}
 
471
  #wpforo-wrap .wpfl-3 .wpf-positive{font-size:28px; cursor: pointer;}
472
  #wpforo-wrap .wpfl-3 .wpf-negative{font-size:28px; cursor: pointer;}
473
  #wpforo-wrap .wpfl-3 .wpf-vote-number{font-size:28px; line-height:30px;}
506
  #wpforo-wrap .wpforo-profile-wrap .h-header .wpf-profile-img-wrap{display:inline-block; float:left}
507
  #wpforo-wrap .wpforo-profile-wrap .h-header .wpf-profile-data-wrap{float:left}
508
  #wpforo-wrap .wpforo-profile-wrap .h-picture{float:none;text-align:center;padding:0px 0px 0px 0px;line-height:0px;display:inline-block;}
509
+ #wpforo-wrap .wpforo-profile-wrap .h-picture .avatar{background: #fefefe; border: 3px solid #eeeeee; border-radius: 0px; box-shadow: 0 0 5px 3px #aaaaaa; display: inline-block; height: auto; margin: 0; max-height: 160px; max-width: 160px; padding: 0;}
510
  #wpforo-wrap .wpforo-profile-wrap .h-header-info{padding:0px;display:block;vertical-align:top;}
511
  #wpforo-wrap .wpforo-profile-wrap .h-left{float:left; text-align:left; padding:0px; line-height:0px; display:inline-block;}
512
  #wpforo-wrap .wpforo-profile-wrap .h-left .avatar{padding:2px; height:auto; display:inline-block; margin:0px; border-radius:50%; max-width:150px; max-height:150px;}
873
  #wpforo-wrap .wpf-field input[type="url"],
874
  #wpforo-wrap .wpf-field input[type="tel"],
875
  #wpforo-wrap .wpf-field input[type="search"],
876
+ #wpforo-wrap .wpf-field input[type="color"],
877
  #wpforo-wrap .wpf-field textarea,
878
  #wpforo-wrap .wpf-field select{ width:99%; max-width:99%; margin: 2px; outline: 0 none; padding: 4px 4px 4px 28px; font-size: 13px; line-height: 21px; border:1px solid #cccccc; background-color: #fefefe; box-shadow: 0px 0px 2px 1px #E6E6E6; height: auto;}
879
  #wpforo-wrap .wpf-field select{ width:100%; max-width:300px;}
880
  #wpforo-wrap .wpf-field textarea{ padding: 10px 10px 2px 30px; }
881
+ #wpforo-wrap .wpf-field input[type="color"]{ height: 30px;}
882
  #wpforo-wrap .wpf-field-wrap {position: relative;}
883
  #wpforo-wrap .wpf-field-wrap .wpf-field-icon {position: absolute; left: 10px; top:10px;}
884
  #wpforo-wrap .wpf-field-type-textarea .wpf-field-wrap .wpf-field-icon {left: 12px; top:15px;}
wpf-themes/classic/styles/css.php CHANGED
@@ -74,6 +74,7 @@ $css = '/* wpForo Dynamic CSS Document */
74
 
75
  #wpforo-wrap .author-rating { border: 1px solid '. $WPFCOLOR_8 .'; background: '. $WPFCOLOR_9 .'; }
76
  #wpforo-wrap .wpf-author-nicename{ color:'. $WPFCOLOR_5 .';}
 
77
 
78
  #wpforo-wrap .wpf-breadcrumb .wpf-root{ border-left:1px solid '. $WPFCOLOR_4 .'; }
79
  #wpforo-wrap .wpf-breadcrumb a.wpf-end { background: transparent!important; }
74
 
75
  #wpforo-wrap .author-rating { border: 1px solid '. $WPFCOLOR_8 .'; background: '. $WPFCOLOR_9 .'; }
76
  #wpforo-wrap .wpf-author-nicename{ color:'. $WPFCOLOR_5 .';}
77
+ #wpforo-wrap .wpforo-admin-note{ border: 1px solid '. $WPFCOLOR_8 .'; background: '. $WPFCOLOR_1 .'; }
78
 
79
  #wpforo-wrap .wpf-breadcrumb .wpf-root{ border-left:1px solid '. $WPFCOLOR_4 .'; }
80
  #wpforo-wrap .wpf-breadcrumb a.wpf-end { background: transparent!important; }
wpforo.php CHANGED
@@ -5,14 +5,14 @@
5
  * Description: WordPress Forum plugin. wpForo is a full-fledged forum solution for your community. Comes with multiple modern forum layouts.
6
  * Author: gVectors Team (A. Chakhoyan, R. Hovhannisyan)
7
  * Author URI: https://gvectors.com/
8
- * Version: 1.4.13
9
  * Text Domain: wpforo
10
  * Domain Path: /wpf-languages
11
  */
12
 
13
  //Exit if accessed directly
14
  if( !defined( 'ABSPATH' ) ) exit;
15
- if( !defined( 'WPFORO_VERSION' ) ) define('WPFORO_VERSION', '1.4.13');
16
 
17
  function wpforo_load_plugin_textdomain() { load_plugin_textdomain( 'wpforo', FALSE, basename( dirname( __FILE__ ) ) . '/wpf-languages/' ); }
18
  add_action( 'plugins_loaded', 'wpforo_load_plugin_textdomain' );
@@ -35,7 +35,7 @@ if( !class_exists( 'wpForo' ) ) {
35
  public $tables;
36
  public $blog_prefix;
37
  private $prefix = "wpforo_";
38
- private $_tables = array( 'accesses', 'forums', 'languages', 'likes', 'phrases', 'posts', 'profiles',
39
  'subscribes', 'topics', 'usergroups', 'views', 'visits', 'votes' );
40
 
41
  public $db;
@@ -43,11 +43,13 @@ if( !class_exists( 'wpForo' ) ) {
43
  public $current_url;
44
  public $current_object;
45
  public $menu = array();
46
- public $form = array();
47
  public $default;
48
 
 
49
  public $current_user = array();
50
  public $current_user_groupid = 4;
 
51
  public $current_userid = 0;
52
  public $current_username = '';
53
  public $current_user_email = '';
@@ -82,7 +84,9 @@ if( !class_exists( 'wpForo' ) ) {
82
  public $notice;
83
  public $api;
84
  public $feed;
 
85
  public $moderation;
 
86
  public $add;
87
 
88
  public $member_tpls;
@@ -118,9 +122,11 @@ if( !class_exists( 'wpForo' ) ) {
118
  $this->sbscrb = new wpForoSubscribe();
119
  $this->tpl = new wpForoTemplate();
120
  $this->notice = new wpForoNotices();
121
- $this->api = new wpForoAPI();
122
  $this->feed = new wpForoFeed();
 
123
  $this->moderation = new wpForoModeration();
 
124
  $this->add = new stdClass(); // Integrations
125
  }
126
 
@@ -165,7 +171,9 @@ if( !class_exists( 'wpForo' ) ) {
165
  include( WPFORO_DIR . '/wpf-includes/class-notices.php' );
166
  include( WPFORO_DIR . '/wpf-includes/class-api.php' );
167
  include( WPFORO_DIR . '/wpf-includes/class-feed.php' );
 
168
  include( WPFORO_DIR . '/wpf-includes/class-moderation.php' );
 
169
  }
170
 
171
  public function admin_init(){
@@ -192,6 +200,7 @@ if( !class_exists( 'wpForo' ) ) {
192
  $this->moderation->init();
193
  $this->tpl->init();
194
  $this->api->hooks();
 
195
  }
196
 
197
  public function init_shortcode_page(){
@@ -271,11 +280,15 @@ if( !class_exists( 'wpForo' ) ) {
271
  'seo-profile' => 1,
272
  'rss-feed' => 1,
273
  'font-awesome' => 1,
274
- 'user-synch' => 0,
275
  'bp_profile' => 0,
276
  'bp_activity' => 1,
277
  'bp_notification' => 1,
278
  'bp_forum_tab' => 1,
 
 
 
 
 
279
  'output-buffer' => 1,
280
  'wp-date-format' => 0,
281
  'subscribe_conf' => 1,
@@ -320,7 +333,10 @@ if( !class_exists( 'wpForo' ) ) {
320
 
321
  $this->default->tools_misc = array(
322
  'dofollow' => '',
323
- 'noindex' => ''
 
 
 
324
  );
325
 
326
  $this->default->tools_legal = array(
@@ -420,8 +436,9 @@ if( !class_exists( 'wpForo' ) ) {
420
  $stats['posts'] = $this->post->get_count();
421
  $stats['members'] = $this->member->get_count();
422
  $stats['online_members_count'] = $this->member->online_members_count();
 
423
 
424
- $posts = $this->topic->get_topics(array('orderby' => 'modified', 'order' => 'DESC', 'row_count' => 20, 'private' => 0, 'status' => 0, 'permgroup' => 4 ));
425
  $first = key($posts);
426
  if ( isset($posts[$first]) && !empty($posts[$first]) && $this->perm->forum_can('vf', $posts[$first]['forumid'], 4) ) {
427
  $stats['last_post_title'] = $posts[$first]['title'];
@@ -659,7 +676,7 @@ if( !class_exists( 'wpForo' ) ) {
659
  $current_object['topic'] = $topic;
660
  $current_object['topicid'] = $topic['topicid'];
661
  $current_object['og_text'] = ( wpfval($topic, 'title') ? $topic['title'] : '' );
662
- }elseif( $this->current_object['status'] == 'unapproved' && !is_user_logged_in() ){
663
  wp_redirect( wpforo_login_url() );
664
  exit();
665
  }else{
@@ -675,6 +692,46 @@ if( !class_exists( 'wpForo' ) ) {
675
  public function is_installed(){
676
  return (bool) get_option('wpforo_version');
677
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
678
  }
679
 
680
  /**
5
  * Description: WordPress Forum plugin. wpForo is a full-fledged forum solution for your community. Comes with multiple modern forum layouts.
6
  * Author: gVectors Team (A. Chakhoyan, R. Hovhannisyan)
7
  * Author URI: https://gvectors.com/
8
+ * Version: 1.5.0
9
  * Text Domain: wpforo
10
  * Domain Path: /wpf-languages
11
  */
12
 
13
  //Exit if accessed directly
14
  if( !defined( 'ABSPATH' ) ) exit;
15
+ if( !defined( 'WPFORO_VERSION' ) ) define('WPFORO_VERSION', '1.5.0');
16
 
17
  function wpforo_load_plugin_textdomain() { load_plugin_textdomain( 'wpforo', FALSE, basename( dirname( __FILE__ ) ) . '/wpf-languages/' ); }
18
  add_action( 'plugins_loaded', 'wpforo_load_plugin_textdomain' );
35
  public $tables;
36
  public $blog_prefix;
37
  private $prefix = "wpforo_";
38
+ private $_tables = array( 'accesses', 'activity', 'forums', 'languages', 'likes', 'phrases', 'posts', 'profiles',
39
  'subscribes', 'topics', 'usergroups', 'views', 'visits', 'votes' );
40
 
41
  public $db;
43
  public $current_url;
44
  public $current_object;
45
  public $menu = array();
46
+ public $data = array();
47
  public $default;
48
 
49
+ public $wp_current_user = array();
50
  public $current_user = array();
51
  public $current_user_groupid = 4;
52
+ public $current_user_secondary_groupids = '';
53
  public $current_userid = 0;
54
  public $current_username = '';
55
  public $current_user_email = '';
84
  public $notice;
85
  public $api;
86
  public $feed;
87
+ public $form;
88
  public $moderation;
89
+ public $activity;
90
  public $add;
91
 
92
  public $member_tpls;
122
  $this->sbscrb = new wpForoSubscribe();
123
  $this->tpl = new wpForoTemplate();
124
  $this->notice = new wpForoNotices();
125
+ $this->api = new wpForoAPI();
126
  $this->feed = new wpForoFeed();
127
+ $this->form = new wpForoForm();
128
  $this->moderation = new wpForoModeration();
129
+ $this->activity = new wpForoActivity();
130
  $this->add = new stdClass(); // Integrations
131
  }
132
 
171
  include( WPFORO_DIR . '/wpf-includes/class-notices.php' );
172
  include( WPFORO_DIR . '/wpf-includes/class-api.php' );
173
  include( WPFORO_DIR . '/wpf-includes/class-feed.php' );
174
+ include( WPFORO_DIR . '/wpf-includes/class-forms.php' );
175
  include( WPFORO_DIR . '/wpf-includes/class-moderation.php' );
176
+ include( WPFORO_DIR . '/wpf-includes/class-activity.php' );
177
  }
178
 
179
  public function admin_init(){
200
  $this->moderation->init();
201
  $this->tpl->init();
202
  $this->api->hooks();
203
+ add_action('wp_ajax_wpforo_deactivate', array($this, 'deactivate'));
204
  }
205
 
206
  public function init_shortcode_page(){
280
  'seo-profile' => 1,
281
  'rss-feed' => 1,
282
  'font-awesome' => 1,
 
283
  'bp_profile' => 0,
284
  'bp_activity' => 1,
285
  'bp_notification' => 1,
286
  'bp_forum_tab' => 1,
287
+ 'um_profile' => 0,
288
+ 'um_forum_tab' => 0,
289
+ 'um_notification' => 0,
290
+ 'user-synch' => 0,
291
+ 'role-synch' => 1,
292
  'output-buffer' => 1,
293
  'wp-date-format' => 0,
294
  'subscribe_conf' => 1,
333
 
334
  $this->default->tools_misc = array(
335
  'dofollow' => '',
336
+ 'noindex' => '',
337
+ 'admin_note' => '',
338
+ 'admin_note_groups' => array( 1, 2, 3, 4, 5 ),
339
+ 'admin_note_pages' => array('forum')
340
  );
341
 
342
  $this->default->tools_legal = array(
436
  $stats['posts'] = $this->post->get_count();
437
  $stats['members'] = $this->member->get_count();
438
  $stats['online_members_count'] = $this->member->online_members_count();
439
+ $row_count = apply_filters('wpforo_get_statistic_row_count', 20);
440
 
441
+ $posts = $this->topic->get_topics(array('orderby' => 'modified', 'order' => 'DESC', 'row_count' => $row_count, 'private' => 0, 'status' => 0, 'permgroup' => 4 ));
442
  $first = key($posts);
443
  if ( isset($posts[$first]) && !empty($posts[$first]) && $this->perm->forum_can('vf', $posts[$first]['forumid'], 4) ) {
444
  $stats['last_post_title'] = $posts[$first]['title'];
676
  $current_object['topic'] = $topic;
677
  $current_object['topicid'] = $topic['topicid'];
678
  $current_object['og_text'] = ( wpfval($topic, 'title') ? $topic['title'] : '' );
679
+ }elseif( wpfkey($this->current_object, 'status') && $this->current_object['status'] == 'unapproved' && !is_user_logged_in() ){
680
  wp_redirect( wpforo_login_url() );
681
  exit();
682
  }else{
692
  public function is_installed(){
693
  return (bool) get_option('wpforo_version');
694
  }
695
+
696
+ public function deactivate(){
697
+ $response = array('code' => 0);
698
+ $json = filter_input(INPUT_POST, 'deactivateData');
699
+ if ($json) {
700
+ parse_str($json, $data);
701
+
702
+ $blogTitle = get_option('blogname');
703
+ $to = 'feedback@wpforo.com';
704
+ $subject = '[wpForo Feedback - ' . WPFORO_VERSION . ']';
705
+ $headers = array();
706
+ $contentType = 'text/html';
707
+ $fromName = apply_filters('wp_mail_from_name', $blogTitle);
708
+ $fromName = html_entity_decode($fromName, ENT_QUOTES);
709
+ $siteUrl = get_site_url();
710
+ $parsedUrl = parse_url($siteUrl);
711
+ $domain = isset($parsedUrl['host']) ? $parsedUrl['host'] : '';
712
+ $fromEmail = 'no-reply@' . $domain;
713
+ $headers[] = "Content-Type: $contentType; charset=UTF-8";
714
+ $headers[] = "From: " . $fromName . " <" . $fromEmail . "> \r\n";
715
+ $message = "Dismiss and never show again";
716
+
717
+ if(isset($data['never_show']) && ($v = intval($data['never_show']))){
718
+ update_option('wpforo_deactivation_dialog_never_show', $v);
719
+ $response['code'] = 'dismiss_and_deactivate';
720
+ }elseif(isset($data['deactivation_reason']) && ($reason = trim($data['deactivation_reason']))){
721
+ $subject .= ' - ' . $reason;
722
+ $message = "<strong>Deactivation reason:</strong> " . $reason . "\r\n" . "<br/>";
723
+ if (isset($data['deactivation_reason_desc']) && ($reasonDesc = trim($data['deactivation_reason_desc']))) {
724
+ $message .= "<strong>Deactivation reason description:</strong> " . $reasonDesc . "\r\n" . "<br/>";
725
+ }
726
+ $subject = html_entity_decode($subject, ENT_QUOTES);
727
+ $message = html_entity_decode($message, ENT_QUOTES);
728
+ $response['code'] = 'send_and_deactivate';
729
+ }
730
+
731
+ wp_mail($to, $subject, $message, $headers);
732
+ }
733
+ wp_die(json_encode($response));
734
+ }
735
  }
736
 
737
  /**