wpForo Forum - Version 1.4.8

Version Description

Download this release

Release Info

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

Code changes from version 1.4.7 to 1.4.8

Files changed (79) hide show
  1. readme.txt +58 -3
  2. wpf-admin/admin.php +3 -4
  3. wpf-admin/dashboard.php +1 -1
  4. wpf-admin/html/privacy-policy-gdpr.html +114 -0
  5. wpf-admin/html/simple-forum-rules.html +9 -0
  6. wpf-admin/options-tabs/api.php +153 -1
  7. wpf-admin/options-tabs/features.php +42 -34
  8. wpf-admin/options-tabs/general.php +1 -1
  9. wpf-admin/options-tabs/posts.php +20 -8
  10. wpf-admin/tools-tabs/antispam.php +46 -2
  11. wpf-admin/tools-tabs/legal.php +181 -0
  12. wpf-admin/tools-tabs/misc.php +4 -4
  13. wpf-admin/tools.php +8 -4
  14. wpf-admin/xml/english.xml +45 -1
  15. wpf-assets/images/sn/fb-m.png +0 -0
  16. wpf-assets/images/sn/gg-m.png +0 -0
  17. wpf-assets/images/sn/location-1.png +0 -0
  18. wpf-assets/images/sn/location-2.png +0 -0
  19. wpf-assets/images/sn/location-3.png +0 -0
  20. wpf-assets/images/sn/location-4.png +0 -0
  21. wpf-assets/images/sn/location-5.png +0 -0
  22. wpf-assets/images/sn/location-6.png +0 -0
  23. wpf-assets/images/sn/ok-m.png +0 -0
  24. wpf-assets/images/sn/share-m.png +0 -0
  25. wpf-assets/images/sn/toggle-1.png +0 -0
  26. wpf-assets/images/sn/toggle-2.png +0 -0
  27. wpf-assets/images/sn/toggle-3.png +0 -0
  28. wpf-assets/images/sn/toggle-4.png +0 -0
  29. wpf-assets/images/sn/tw-m.png +0 -0
  30. wpf-assets/images/sn/vk-m.png +0 -0
  31. wpf-assets/js/frontend.js +74 -0
  32. wpf-includes/class-api.php +379 -48
  33. wpf-includes/class-cache.php +21 -6
  34. wpf-includes/class-feed.php +18 -2
  35. wpf-includes/class-forums.php +81 -54
  36. wpf-includes/class-members.php +89 -63
  37. wpf-includes/class-moderation.php +14 -10
  38. wpf-includes/class-permissions.php +6 -6
  39. wpf-includes/class-phrases.php +10 -10
  40. wpf-includes/class-posts.php +136 -46
  41. wpf-includes/class-subscribes.php +104 -12
  42. wpf-includes/class-template.php +165 -108
  43. wpf-includes/class-topics.php +102 -74
  44. wpf-includes/class-usergroups.php +14 -14
  45. wpf-includes/functions-installation.php +652 -642
  46. wpf-includes/functions-integration.php +19 -85
  47. wpf-includes/functions-template.php +217 -20
  48. wpf-includes/functions.php +186 -86
  49. wpf-includes/install-sql.php +16 -14
  50. wpf-includes/integration/buddypress.php +742 -0
  51. wpf-includes/integration/legal.php +215 -0
  52. wpf-includes/wpf-actions.php +29 -6
  53. wpf-includes/wpf-hooks.php +124 -82
  54. wpf-includes/wpf-phrases.php +2 -2
  55. wpf-languages/wpforo-da_DK.mo +0 -0
  56. wpf-languages/wpforo-da_DK.po +4690 -0
  57. wpf-languages/wpforo-lt_LT.mo +0 -0
  58. wpf-languages/wpforo-lt_LT.po +4713 -0
  59. wpf-languages/wpforo-pt_BR.mo +0 -0
  60. wpf-languages/wpforo-pt_BR.po +3808 -2914
  61. wpf-languages/wpforo.pot +654 -227
  62. wpf-themes/classic/colors.css +45 -1
  63. wpf-themes/classic/footer.php +4 -11
  64. wpf-themes/classic/header.php +7 -5
  65. wpf-themes/classic/index.php +4 -2
  66. wpf-themes/classic/integration/buddypress/style-rtl.css +60 -0
  67. wpf-themes/classic/integration/buddypress/style.css +60 -0
  68. wpf-themes/classic/layouts/1/post.php +14 -4
  69. wpf-themes/classic/layouts/2/forum.php +1 -1
  70. wpf-themes/classic/layouts/2/post.php +13 -5
  71. wpf-themes/classic/layouts/3/post.php +11 -5
  72. wpf-themes/classic/profile-account.php +6 -5
  73. wpf-themes/classic/profile-subscriptions.php +5 -1
  74. wpf-themes/classic/recent.php +2 -2
  75. wpf-themes/classic/register.php +2 -3
  76. wpf-themes/classic/style-rtl.css +129 -2
  77. wpf-themes/classic/style.css +131 -4
  78. wpf-themes/classic/styles/css.php +45 -1
  79. wpforo.php +56 -7
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.7
7
Requires PHP: 5.4 and higher
8
License: GPLv2 or later
9
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -24,6 +24,7 @@ wpForo Forums is the best WordPress forum plugin. Full-fledged yet easy and ligh
24
25
Support Forum and Demo: [https://wpforo.com/community/](https://wpforo.com/community/)
26
Forum Documentation: [https://wpforo.com/documentation/](https://wpforo.com/documentation/)
27
28
29
= Multi-layout WordPress Forum Plugin =
@@ -34,7 +35,7 @@ Forum Documentation: [https://wpforo.com/documentation/](https://wpforo.com/docu
34
35
= Available Forum Translations =
36
37
- **Czech** , **Dutch**, **French**, **French**, **German**, **Hebrew**, **Japanese**, **Persian**, **Portuguese**, **Polish**, **Russian**, **Spanish** , **Spanish** , **Swedish**, **Korean**.
38
39
= FORUM FEATURES =
40
@@ -53,7 +54,10 @@ Forum Documentation: [https://wpforo.com/documentation/](https://wpforo.com/docu
53
* Built-in, powerful forum Usergroup system.
54
* Forum Access sets per Usergroup per Forum.
55
* Forum Phrase System for quick translation.
56
- * WordPress .MO/.PO translation files.
57
* Easy to migrate with [Go2wpForo](https://wpforo.com/community/migrate-to-wpforo-from-other-forum-plugins/migrate-to-wpforo-go2wpforo-tool/) tool.
58
59
= Need more forum features? =
@@ -120,6 +124,10 @@ Find wpForo forum plugin addons on [gVectors Team website...](https://gvectors.c
120
121
**Forum Translation** - wpForo forum can be translated using PO/MO files or you can do a quick translation using wpForo Forum Phrase system in Dashboard > Forums > Phrases admin page.
122
123
124
125
== Screenshots ==
@@ -144,6 +152,53 @@ Find wpForo forum plugin addons on [gVectors Team website...](https://gvectors.c
144
145
== Changelog ==
146
147
= wpForo Forum 1.4.6 / 1.4.7 | 09.03.2018 =
148
149
[wpForo v1.4.7 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-4-7-is-released/)
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.8
7
Requires PHP: 5.4 and higher
8
License: GPLv2 or later
9
License URI: https://www.gnu.org/licenses/gpl-2.0.html
24
25
Support Forum and Demo: [https://wpforo.com/community/](https://wpforo.com/community/)
26
Forum Documentation: [https://wpforo.com/documentation/](https://wpforo.com/documentation/)
27
+ GDPR Compliance: [https://wpforo.com/gdpr/](https://wpforo.com/gdpr/)
28
29
30
= Multi-layout WordPress Forum Plugin =
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
54
* Built-in, powerful forum Usergroup system.
55
* Forum Access sets per Usergroup per Forum.
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? =
124
125
**Forum Translation** - wpForo forum can be translated using PO/MO files or you can do a quick translation using wpForo Forum Phrase system in Dashboard > Forums > Phrases admin page.
126
127
+ = Forum GDPR Compliance - Tools and options to comply to GDPR =
128
+
129
+ **Forum GDPR Compliance** - wpForo has almost all forum specific tools and functions to comply your forum to GDPR. Please navigate to Forums > Tools > Privacy & Rules admin page and go through all instructions and options.
130
+
131
132
133
== Screenshots ==
152
153
== Changelog ==
154
155
+ = wpForo Forum 1.4.8 | 30.04.2018 =
156
+
157
+ [wpForo v1.4.8 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-4-8-is-released/)
158
+
159
+ * Added: GDPR Compliance / [Doc](https://wpforo.com/docs/root/gdpr/right-to-be-informed/)
160
+ * Added: GDPR | Checkbox - Accept Forum Privacy Policy
161
+ * Added: GDPR | Checkbox - Accept Website Privacy Policy
162
+ * Added: GDPR | Checkbox - Accept Email confirmation
163
+ * Added: GDPR | Checkbox - Accept Forum Rules
164
+ * Added: GDPR | Checkbox - Accept Facebook Login processing
165
+ * Added: GDPR | Forum Privacy Policy Template
166
+ * Added: GDPR | Forum Rules Template
167
+ * Added: GDPR | Manage Cookies
168
+ * Added: GDPR | Button to contact forum admin
169
+ * Added: GDPR | Checkboxes on registration page
170
+ * Added: GDPR | Checkboxes on guest posting editors
171
+ * Added: Share Buttons
172
+ * Added: Share | Post specific share buttons (3 locations)
173
+ * Added: Share | General share buttons (2 locations)
174
+ * Added: Share | Different share button style and type
175
+ * Added: BuddyPress Integration
176
+ * Added: BuddyPress | Forums Menu
177
+ * Added: BuddyPress | Profile Tab Forums > Create forum topics,
178
+ * Added: BuddyPress | Profile Tab Forums > Posted forum replies,
179
+ * Added: BuddyPress | Profile Tab Forums > Liked Posts,
180
+ * Added: BuddyPress | Profile Tab Forums > Subscriptions,
181
+ * Added: BuddyPress | Notification Integration,
182
+ * Added: BuddyPress | Update Activity on post status changing,
183
+ * Added: Forum Subscription Manager in My Profile > Subscriptions page,
184
+ * Added: Recent Topics Widget (order by updated date, posts, views),
185
+ * Added: Option to enable new HTML tags in post content,
186
+ * Added: Options to disable file scanning, exclude file extensions,
187
+ * Added: Allow /* extension in nofollow list of SEO Tools
188
+ * Added: Danish Translation ( da_DK ), many thanks to Tom
189
+ * Fixed Bug: reCAPTCHA Bug, can't login when WP forms are disabled
190
+ * Fixed Bug: Removed "iframe" tag in post content by default
191
+ * Fixed Bug: Q&A Layout, problem with counting of answers
192
+ * Fixed Bug: Simplified Layout, last posted guest avatar issue
193
+ * Fixed Bug: - Choose - option for required dropdown filed
194
+ * Fixed Bug: Database error related to users table on Multisite
195
+ * Fixed Bug: Problem with Usergroup field on Account page
196
+ * Fixed Bug: URL type of user avatar doesn't work
197
+ * Fixed Bug: Fully disable Forum RSS Feed
198
+ * Fixed Bug: Private forum last post info in forum statistic
199
+ * Fixed Bug: Subforum topic doesn't update parent forums information
200
+ * Fixed Bug: Yoast Deprecated function
201
+
202
= wpForo Forum 1.4.6 / 1.4.7 | 09.03.2018 =
203
204
[wpForo v1.4.7 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-4-7-is-released/)
wpf-admin/admin.php CHANGED
@@ -4,9 +4,9 @@
4
if( !defined( 'ABSPATH' ) ) exit;
5
6
function wpforo_add_menu(){
7
- WPF()->moderation->spam_attachment();
8
9
- $all_count = 0;
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);
@@ -27,12 +27,11 @@
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');
34
if( WPF()->current_user_groupid == 1 ) add_submenu_page('wpforo-community', __('Addons', 'wpforo'), __('Addons', 'wpforo'), 'read', 'wpforo-addons', 'wpforo_addons');
35
- //exit();
36
}
37
add_action('admin_menu', 'wpforo_add_menu', 39);
38
4
if( !defined( 'ABSPATH' ) ) exit;
5
6
function wpforo_add_menu(){
7
+
8
+ if( WPF()->tools_antispam['spam_file_scanner'] ) WPF()->moderation->spam_attachment();
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);
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');
34
if( WPF()->current_user_groupid == 1 ) add_submenu_page('wpforo-community', __('Addons', 'wpforo'), __('Addons', 'wpforo'), 'read', 'wpforo-addons', 'wpforo_addons');
35
}
36
add_action('admin_menu', 'wpforo_add_menu', 39);
37
wpf-admin/dashboard.php CHANGED
@@ -24,7 +24,7 @@
24
<div class="inside">
25
<div class="main" style="padding:5px 15px 15px 15px;">
26
<div style="float:left; vertical-align:top; width:calc(100% - 300px);;">
27
- <p style="font-size:30px; margin:0px 0px 10px 0px; font-family:Constantia, 'Lucida Bright', 'DejaVu Serif', Georgia, serif"><?php _e('Welcome to wpForo', 'wpforo'); echo esc_html(WPFORO_VERSION) ?></p>
28
<p style="margin:0px; font-size:14px;font-family:'Lucida Bright', 'DejaVu Serif', Georgia, serif">
29
<?php _e('Thank you for using wpForo! wpForo is a professional bulletin board for WorPress, and the only forum software which comes with Multi-layout template system.
30
The "Extended", "Simplified" and "Question &amp Answer" layouts fit almost all type of discussions needs. You can use wpForo for small and extremely large communities.
24
<div class="inside">
25
<div class="main" style="padding:5px 15px 15px 15px;">
26
<div style="float:left; vertical-align:top; width:calc(100% - 300px);;">
27
+ <p style="font-size:30px; margin:0px 0px 10px 0px; font-family:Constantia, 'Lucida Bright', 'DejaVu Serif', Georgia, serif"><?php _e('Welcome to wpForo', 'wpforo'); echo ' ' . esc_html(WPFORO_VERSION) ?></p>
28
<p style="margin:0px; font-size:14px;font-family:'Lucida Bright', 'DejaVu Serif', Georgia, serif">
29
<?php _e('Thank you for using wpForo! wpForo is a professional bulletin board for WorPress, and the only forum software which comes with Multi-layout template system.
30
The "Extended", "Simplified" and "Question &amp Answer" layouts fit almost all type of discussions needs. You can use wpForo for small and extremely large communities.
wpf-admin/html/privacy-policy-gdpr.html ADDED
@@ -0,0 +1,114 @@
1
+ <h1>- Forum Privacy Policy -</h1>
2
+ <span style="color: #808080; font-size: 16px; font-weight: normal; line-height: 30px;">---- TEMPLATE <span style="font-size: 12px;">(remove this after editing and approving the content)</span> ---</span>
3
+
4
+ In this Privacy Policy, "we", "us" and "our" refers to: [forum-name].
5
+
6
+ This is privacy policy sets out how [forum-name] uses and protects any information that you provide, whilst using [forum-name] products and services. This only includes [forum-name] ( [forum-url] ) . [forum-name] may change this policy as and when necessary. We will provide a more prominent notice (including email notification of privacy policy changes).
7
+ <h2>1. What information we collect about you and how we use this information</h2>
8
+ <h3>1.1 Account and Profile Information</h3>
9
+ You don’t have to create an account to use this forum, such as searching and viewing public member profiles, forums, topics and posts. If you do choose to create an account, you must provide us with some personal data so that we can provide our services to you. This includes a display name (for example, "John Doe"), nickname (for example, @john-doe) a username (for example, johnxdoe), a password, and an email address. Your display name and nickname is always public, but you can use either your real name or a pseudonym. After the registration your account display name, nickname and username are the same. We recommend to change display name and nickname to keep the username private and secure. You can change those in your account editing page.
10
+
11
+ Once you registered and created an account, you also have the option of adding these public information:
12
+ <ul>
13
+ <li>Member Title</li>
14
+ <li>Avatar</li>
15
+ <li>Biography (About Me)</li>
16
+ <li>Website</li>
17
+ <li>Occupation</li>
18
+ <li>Signature</li>
19
+ <li>Social Network Account addresses</li>
20
+ <li>Location (Country)</li>
21
+ <li>Timezon</li>
22
+ <li>And other details to your profile information to be displayed in our community.</li>
23
+ </ul>
24
+ Additionally, whilst using the [forum-name] the following information may be collected (not public):
25
+ <ul>
26
+ <li>Internet Protocol (IP) address (not public)</li>
27
+ <li>Geographical location</li>
28
+ <li>Browser type and version (not public)</li>
29
+ <li>Operating system (not public)</li>
30
+ <li>Referral source (not public)</li>
31
+ <li>Length of visit, page views, website navigation and any other related browsing activity</li>
32
+ </ul>
33
+ Most activity on [forum-name] is public, including your profile information mentioned above. You also may choose to publish your location in your profile. Information posted about you by other people who use our forum may also be public. For example, other people may mention you using @nickname in posts.
34
+
35
+ You are responsible for your topics, posts and other information you provide through our services, and you should think carefully about what you make public, especially if it is sensitive information.
36
+
37
+ You may choose to register connecting your account to accounts on another service (e.g. Facebook login), and that other service may send us information about your account on that service. We use the information we receive to provide you features like cross-posting or cross-service authentication, and to operate our community. We create new account in our community for you based on your third party account information you share.
38
+ <h3>1.2 Contact Information</h3>
39
+ We use your contact information, such as your email address, to authenticate your account and keep it - and our services - secure, and to help prevent spam, fraud, and abuse. We also use contact information to personalize our services, enable certain account features for example, for login verification, reset password, to send you information about our community and notify on new replies to your subscribed forums and topics. You can also unsubscribe from any email notifications.
40
+
41
+ If you email us, we will keep the content of your message, your email address, and your contact information to respond to your request.
42
+ <h3>1.3 Private Messages and Non-Public Communications</h3>
43
+ We provide certain features that let you communicate more privately or control who sees your content. For example if forum admin is enabled, you can check the "Set Topic Private" checkbox when you create a topic or click on the "Private" button of your topic first post, or use the Private Messages to have non-public conversations. In these cases we will store and process your communications and information related to them. This includes message content, images, information about whom you have communicated with and when to better understand the use of our community, to protect the safety and review the reported messages. We share the content of your Private Messages with the people you’ve sent them to; we do not use them to serve you ads. When you use features like Private Messages to communicate, remember that recipients have their own copy of your communications on [forum-name] - even if you delete your copy of those messages from your account - which they may duplicate, store, or re-share.
44
+ <h3>1.4 Cookies</h3>
45
+ A cookie is a small piece of data that is stored on your computer or mobile device. Like many websites, we use cookies and similar technologies to collect additional website usage data and to operate our community. Cookies are not required for many parts of our community such as searching and looking at public profiles. Although most web browsers automatically accept cookies, many browsers’ settings can be set to decline cookies or alert you when a website is attempting to place a cookie on your computer. However, some of our community features may not function properly if you disable cookies. We do not support the Do Not Track browser option. You can learn more about how we use cookies and similar technologies here.
46
+
47
+ <strong>We use cookies for the following purposes</strong>
48
+
49
+ 1.4.1 Authentication - we use cookies to identify you when you visit our community. When you create a topic or post a reply as guest (not registered user) we store your name and email address in cookies. We use this information to detect current visitor content (topics, posts) and display it to you even if the content is under moderation (not approved by moderators). The name is used to display as topic/post author name. Also we store your name and email in cookies to keep filled these fields when you post a new reply or create a new topic (you don't heave to fill these information every time you post a content). We recommend don't use guest posting option on non-personal devices, or at least delete browser cookies when you leave it.
50
+
51
+ 1.4.2 Status - we use cookies to help us to determine if you are logged into our website.
52
+
53
+ 1.4.3 Security - we use cookies as an element of the security measures used to protect user accounts, including preventing fraudulent use of login credentials, and to protect our website and services generally.
54
+
55
+ <strong>Cookies used by our service providers</strong>
56
+
57
+ 1.4.4 Our service providers use cookies and those cookies may be stored on your computer when you visit our website.
58
+
59
+ 1.4.5 We use Google Analytics to analyse the use of our website. Google Analytics gathers information about website use by means of cookies. The information gathered relating to our website is used to create reports about the use of our website. Google's privacy policy is available at: <a href="https://www.google.com/policies/privacy/">https://www.google.com/policies/privacy/</a> .
60
+
61
+ 1.4.6 We publish Google AdSense interest-based advertisements on our website. These are tailored by Google to reflect your interests. We publish Google AdSense advertisements on our website. To determine your interests, Google will track your behaviour on our website and on other websites across the web using cookies. This behaviour tracking allows Google to tailor the advertisements that you see on other websites to reflect your interests (but we do not publish interest-based advertisements on our website). You can view, delete or add interest categories associated with your browser by visiting: <a href="https://adssettings.google.com">https://adssettings.google.com</a>. You can also opt out of the AdSense partner network cookie using those settings or using the Network Advertising Initiative's multi-cookie opt-out mechanism at: <a href="http://optout.networkadvertising.org">http://optout.networkadvertising.org</a>. However, these opt-out mechanisms themselves use cookies, and if you clear the cookies from your browser your opt-out will not be maintained. To ensure that an opt-out is maintained in respect of a particular browser, you may wish to consider using the Google browser plug-ins available at: <a href="https://support.google.com/ads/answer/7395996">https://support.google.com/ads/answer/7395996</a>.
62
+ <h3>1.5 Log Data</h3>
63
+ We receive information when you view content on or otherwise interact with our community, which we refer to as "Log Data," even if you have not created an account. For example, when you visit our websites, sign into our community, interact with our email notifications, we may receive information about you. This Log Data includes information such as your IP address, browser type, operating system, the referring web page, pages visited, location, your mobile carrier, device information (including device and application IDs), search terms, and cookie information. We use Log Data to operate our services and ensure their secure, reliable, and robust performance. We use information you provide to us and data we receive, including Log Data and data from third parties, to make inferences like what topics you may be interested in and what languages you speak. This helps us better design our services for you and personalize the content we show you.
64
+ <h2>2. Information We Share and Disclos</h2>
65
+ <h3>2.1 How we share information we collect</h3>
66
+ You should be aware that any information you provide on our community - including profile information associated with the account you use to post the information - may be read, collected, and used by any member of the public who accesses these websites. Your posts and certain profile information may remain even after you terminate your account. We urge you to consider the sensitivity of any information you input into these Services. To request removal of your information from publicly accessible websites operated by us, please <strong>contact us</strong>. In some cases, we may not be able to remove your information, in which case we will let you know if we are unable to and why.
67
+ <h3>2.2 Sharing with third parties</h3>
68
+ <strong>2.2.1 Service Providers:</strong> We share information with third parties that help us operate, provide, improve, integrate, customize, support and market our services. We work with third-party service providers to provide website and application development, hosting, maintenance, backup, storage, virtual infrastructure, payment processing, analysis and other services for us, which may require them to access or use information about you. If a service provider needs to access information about you to perform services on our behalf, they do so under close instruction from us, including policies and procedures designed to protect your information.
69
+
70
+ Our administrators may choose to add new functionality or change the behavior of the community by installing third party apps within the community. Doing so may give third-party apps access to your account and information about you like your name and email address, and any content you choose to use in connection with those apps. Third-party app policies and procedures are not controlled by us, and this privacy policy does not cover how third-party apps use your information. We encourage you to review the privacy policies of third parties before connecting to or using their applications or services to learn more about their privacy and information handling practices. If you object to information about you being shared with these third parties, please uninstall the contact us and let us know as soon as possible. Below are the third party services we use on our community:
71
+ <ul>
72
+ <li>Akismet (by Automattic Inc.) - Spam fighting service that protects millions of WordPress sites. Automattic Privacy Policy: <a href="https://automattic.com/privacy/" target="_blank" rel="noopener noreferrer">https://automattic.com/privacy/</a></li>
73
+ <li>reCAPTCHA (by Google) - Protects internet users from spam and abuse wherever they go. Google Privacy Policy: <a href="https://policies.google.com/privacy" target="_blank" rel="noopener noreferrer">https://policies.google.com/privacy</a></li>
74
+ </ul>
75
+ <strong>2.2.2 Links to Third Party Sites:</strong> Our community may include links that direct you to other websites or services whose privacy practices may differ from ours. If you submit information to any of those third party sites, your information is governed by their privacy policies, not this one. We encourage you to carefully read the privacy policy of any website you visit.
76
+
77
+ <strong>2.2.3 Social Media Widgets:</strong> The Services may include links that direct you to other websites or services whose privacy practices may differ from ours. Your use of and any information you submit to any of those third-party sites is governed by their privacy policies, not this one.
78
+
79
+ <strong>2.2.4 Third-Party Widgets:</strong> Some of our Services contain widgets and social media features, such as the Facebook "share" or Twitter "tweet" buttons. These widgets and features collect your IP address, which page you are visiting on the Services, and may set a cookie to enable the feature to function properly. Widgets and social media features are either hosted by a third party or hosted directly on our Services. Your interactions with these features are governed by the privacy policy of the company providing it.
80
+ <h3>2.3 Law, Harm, and the Public Interest</h3>
81
+ Notwithstanding anything to the contrary in this Privacy Policy or controls we may otherwise offer to you, we may preserve, use, or disclose your personal data if we believe that it is reasonably necessary to comply with a law, regulation, legal process, or governmental request; to protect the safety of any person; to protect the safety or integrity of our platform, including to help prevent spam, abuse, or malicious actors on our services, or to explain why we have removed content or accounts from our services; to address fraud, security, or technical issues; or to protect our rights or property or the rights or property of those who use our services. However, nothing in this Privacy Policy is intended to limit any legal defenses or objections that you may have to a third party’s, including a government’s, request to disclose your personal data.
82
+ <h3>2.4 Non-Personal Information</h3>
83
+ We share or disclose non-personal data, such as aggregated information like the community statistic (online users, visitors, current viewers of a topic, etc...), the number of people who clicked on a particular link (number of topic views) or voted on a poll in a topic (even if only one did).
84
+ <h2>3. How to access and control your information</h2>
85
+ <h3>3.1 Accessing or Rectifying Your Personal Data</h3>
86
+ You have the right to request a copy of your information, to object to our use of your information. If you have registered an account on our community, we provide you with tools and account settings to access, correct, delete, or modify the personal data you provided to us and associated with your account. You can request for downloading your account information, including your created content (posts). You also can request correction, deletion, or modification of your personal data.
87
+
88
+ Your request and choices may be limited in certain cases: for example, if fulfilling your request would reveal information about another person, or if you ask to delete information which we or your administrator are permitted by law or have compelling legitimate interests to keep. Where you have asked us to share data with third parties, for example, by installing third-party apps, you will need to contact those third-party service providers directly to have your information deleted or otherwise restricted.
89
+ <h3>3.2 Deletion Your Personal Data</h3>
90
+ You can request for your account deletion. This will include personal data, profile data, created content, logs, etc... Cookies should be deleted from your side. Almost all browsers have an option to delete cookies.
91
+
92
+ Keep in mind that search engines and other third parties may still retain copies of your public information, like your profile information, even after we/you have deleted the information from our community.
93
+ <h3>3.3 Restrict Processing</h3>
94
+ <strong>3.3.1 Request that we stop using your information</strong>: In some cases, you may ask us to stop accessing, storing, using and otherwise processing your information where you believe we don't have the appropriate rights to do so. For example, if you believe a community account was created for you without your permission or you are no longer an active user, you can request that we delete your account (contact us). Where you gave us consent to use your information for a limited purpose, you can contact us to withdraw that consent, but this will not affect any processing that has already taken place at the time. You can also opt-out of our use of your information for marketing purposes by contacting us. When you make such requests, we may need time to investigate and facilitate your request. If there is delay or dispute as to whether we have the right to continue using your information, we will restrict any further use of your information until the request is honored or the dispute is resolved, provided your administrator does not object (where applicable). If you object to information about you being shared with a third-party app, please disable the app or contact your administrator to do so.
95
+
96
+ <strong>3.3.2 Opt out of communications</strong>: You may opt out of receiving email notifications related to your subscribed forums and posts or promotional communications from us by using the unsubscribe link within each email, updating your subscription settings in My Profile &gt; Subscription page, or by contacting us as provided below to have your contact information removed from our promotional email list or registration database.
97
+ <h3>3.4 Data portability</h3>
98
+ Data portability is the ability to obtain some of your information in a format you can keep in your devices or share with other communities. Depending on the context, this applies to some of your information, but not to all of your information. Should you request it, we will provide you with an electronic file of your basic account information and the information you create on the spaces you under your sole control, like your topics (only with your posts), your replies in other topics, private messages and conversations (only with your messages), etc...
99
+ <h2>4. How we store and secure information we collect</h2>
100
+ We use data hosting service providers to host the information we collect, and we use technical measures to secure your data. While we implement safeguards designed to protect your information, no security system is impenetrable and due to the inherent nature of the Internet, we cannot guarantee that data, during transmission through the Internet or while stored on our systems or otherwise in our care, is absolutely safe from intrusion by others.
101
+ <h2>5. Children and Our Community</h2>
102
+ Our community is not directed to children, and you may not use our services if you are under the age of 13. You must also be old enough to consent to the processing of your personal data in your country (in some countries we may allow your parent or guardian to do so on your behalf).
103
+ <h2>6. Online Privacy Policy Only</h2>
104
+ This online privacy policy applies only to information collected through our website and not to information collected offline.
105
+ <h2>7. Your Consent To This Policy</h2>
106
+ By using our site, you consent to our Privacy Policy.
107
+ <h2>8. Changes To This Privacy Policy</h2>
108
+ We may update our Privacy Policy from time to time. We will notify you of any changes by posting the new Privacy Policy on this page.
109
+
110
+ We will let you know via email and/or a prominent notice on our Service, prior to the change becoming effective and update the "effective date" at the top of this Privacy Policy.
111
+
112
+ You are advised to review this Privacy Policy periodically for any changes. Changes to this Privacy Policy are effective when they are posted on this page.
113
+ <h2>9. Contact Us</h2>
114
+ If you have any questions about this Privacy Policy, please contact us or open public or private topic in our community.
wpf-admin/html/simple-forum-rules.html ADDED
@@ -0,0 +1,9 @@
1
+ <h2>Forum Rules</h2>
2
+ <ol>
3
+ <li>No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.</li>
4
+ <li>Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.</li>
5
+ <li>Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.</li>
6
+ <li>Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.</li>
7
+ <li>Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.</li>
8
+ <li>Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.</li>
9
+ </ol>
wpf-admin/options-tabs/api.php CHANGED
@@ -12,7 +12,7 @@
12
<tr>
13
<td colspan="2" style="border-bottom:3px solid #395598;">
14
<h3 style="font-weight:600; padding:0px 0px 0px 0px; margin:0px; text-align:right; color:#666666;">
15
- <div style="float:left; height:25px; line-height:25px;"><img src="<?php echo WPFORO_URL . '/wpf-assets/images/sn/fb-m.jpg' ?>" align="middle" /></div>
16
Facebook API &nbsp;
17
</h3>
18
</td>
@@ -86,6 +86,158 @@
86
<input style="margin-top:10px; padding:3px 5px; font-size:13px; width:48%;" name="wpforo_api_options[fb_redirect_url]" placeholder="<?php _e('Custom URL, e.g.: http://example.com/my-page/', 'wpforo'); ?>" type="text" value="<?php echo trim(WPF()->api->options['fb_redirect_url']); ?>"/>&nbsp; <?php _e('Custom URL', 'wpforo'); ?>
87
</td>
88
</tr>
89
<?php do_action('wpforo_settings_api_bottom'); ?>
90
</tbody>
91
</table>
12
<tr>
13
<td colspan="2" style="border-bottom:3px solid #395598;">
14
<h3 style="font-weight:600; padding:0px 0px 0px 0px; margin:0px; text-align:right; color:#666666;">
15
+ <div style="float:left; height:30px; line-height:25px;"><img src="<?php echo WPFORO_URL . '/wpf-assets/images/sn/fb-m.png' ?>" align="middle" style="height: 100%"/></div>
16
Facebook API &nbsp;
17
</h3>
18
</td>
86
<input style="margin-top:10px; padding:3px 5px; font-size:13px; width:48%;" name="wpforo_api_options[fb_redirect_url]" placeholder="<?php _e('Custom URL, e.g.: http://example.com/my-page/', 'wpforo'); ?>" type="text" value="<?php echo trim(WPF()->api->options['fb_redirect_url']); ?>"/>&nbsp; <?php _e('Custom URL', 'wpforo'); ?>
87
</td>
88
</tr>
89
+ <tr>
90
+ <td colspan="2" style="border-bottom:3px solid #00C000;">
91
+ <h3 style="font-weight:600; padding:0px 0px 0px 0px; margin:0px; text-align:right; color:#666666;">
92
+ <div style="float:left; height:30px; line-height:25px;"><img src="<?php echo WPFORO_URL . '/wpf-assets/images/sn/share-m.png' ?>" align="middle" style="height: 100%" /></div>
93
+ Share Buttons &nbsp;
94
+ </h3>
95
+ </td>
96
+ </tr>
97
+ <tr>
98
+ <td colspan="2" style="padding: 2px"></td>
99
+ </tr>
100
+ <tr>
101
+ <th>
102
+ <label><?php _e('Active Share Buttons', 'wpforo'); ?></label>
103
+ <p class="wpf-info"><?php _e('Check the checkbox below share options to activate. <b>Please note, that the Facebook share button cannot be activated without Facebook API ID.</b> Please follow to the "Facebook API Configuration" option instruction above and fill the API ID field in order to activate Facebook Share button.', 'wpforo'); ?></p>
104
+ </th>
105
+ <td>
106
+ <?php $_sb = WPF()->api->options['sb']; ?>
107
+ <input type="hidden" name="wpforo_api_options[sb][x]" value="1">
108
+ <div style="float: left; width: 40px; text-align: center; background: #3B5A9A; padding: 1px 18px 3px 18px; margin: 10px 5px; margin-left: 0;">
109
+ <label for="sb_fb"><img src="<?php echo WPFORO_URL . '/wpf-assets/images/sn/fb-m.png' ?>" align="middle" style="width: 30px" /></label><br>
110
+ <input id="sb_fb" type="checkbox" name="wpforo_api_options[sb][fb]" value="1" <?php if(isset($_sb['fb']) && $_sb['fb'] ) echo 'checked'; ?> <?php if(!WPF()->api->options['fb_api_id']) echo 'disabled'; ?>/>
111
+ </div>
112
+ <div style="float: left; width: 40px; text-align: center; background: #00A3F5; padding: 1px 18px 3px 18px; margin: 10px 5px;">
113
+ <label for="sb_tw"><img src="<?php echo WPFORO_URL . '/wpf-assets/images/sn/tw-m.png' ?>" align="middle" style="width: 30px" /></label><br>
114
+ &nbsp;<input id="sb_tw" type="checkbox" name="wpforo_api_options[sb][tw]" value="1" <?php if(isset($_sb['tw']) && $_sb['tw'] ) echo 'checked'; ?> />
115
+ </div>
116
+ <div style="float: left; width: 40px; text-align: center; background: #FF492D; padding: 1px 18px 3px 18px; margin: 10px 5px;">
117
+ <label for="sb_gg"><img src="<?php echo WPFORO_URL . '/wpf-assets/images/sn/gg-m.png' ?>" align="middle" style="width: 30px" /></label><br>
118
+ &nbsp;<input id="sb_gg" type="checkbox" name="wpforo_api_options[sb][gg]" value="1" <?php if(isset($_sb['gg']) && $_sb['gg'] ) echo 'checked'; ?> />
119
+ </div>
120
+ <div style="float: left; width: 40px; text-align: center; background: #2D76A6; padding: 1px 18px 3px 18px; margin: 10px 5px;">
121
+ <label for="sb_vk"><img src="<?php echo WPFORO_URL . '/wpf-assets/images/sn/vk-m.png' ?>" align="middle" style="width: 30px" /></label><br>
122
+ &nbsp;&nbsp;<input id="sb_vk" type="checkbox" name="wpforo_api_options[sb][vk]" value="1" <?php if(isset($_sb['vk']) && $_sb['vk'] ) echo 'checked'; ?> />
123
+ </div>
124
+ <div style="float: left; width: 40px; text-align: center; background: #FF7800; padding: 1px 18px 3px 18px; margin: 10px 5px;">
125
+ <label for="sb_ok"><img src="<?php echo WPFORO_URL . '/wpf-assets/images/sn/ok-m.png' ?>" align="middle" style="width: 30px" /></label><br>
126
+ &nbsp;&nbsp;<input id="sb_ok" type="checkbox" name="wpforo_api_options[sb][ok]" value="1" <?php if(isset($_sb['ok']) && $_sb['ok'] ) echo 'checked'; ?> />
127
+ </div>
128
+ <div style="clear: both;"></div>
129
+ </td>
130
+ </tr>
131
+ <tr>
132
+ <th style="padding-top:5px;">
133
+ <label><?php _e('Enable Share Buttons', 'wpforo'); ?></label>
134
+ <p class="wpf-info"></p>
135
+ </th>
136
+ <td style="padding-top:10px; margin-right: 5px;">
137
+ <div style="float: left;">
138
+ <p style="margin: 0px; font-size: 14px;"><?php _e('General Share Buttons', 'wpforo'); ?></p>
139
+ <div class="wpf-switch-field" style="margin-top: 10px; margin-right: 5px;">
140
+ <input type="radio" value="1" name="wpforo_api_options[sb_on]" id="sb_on_2" <?php wpfo_check(WPF()->api->options['sb_on'], 1); ?>><label for="sb_on_2" style="width: 100px;">&nbsp;<?php _e('Enable', 'wpforo'); ?>&nbsp;</label> &nbsp;
141
+ <input type="radio" value="0" name="wpforo_api_options[sb_on]" id="sb_on_1" <?php wpfo_check(WPF()->api->options['sb_on'], 0); ?>><label for="sb_on_1" style="width: 100px;">&nbsp;<?php _e('Disable', 'wpforo'); ?>&nbsp;</label>
142
+ </div>
143
+ </div>
144
+ <div style="float: left; margin-left: 10px;">
145
+ <p style="margin: 0px; font-size: 14px;"><?php _e('Post Sharing Toggle', 'wpforo'); ?></p>
146
+ <div class="wpf-switch-field" style="margin-top: 10px; margin-bottom: 5px;">
147
+ <input type="radio" value="1" name="wpforo_api_options[sb_toggle_on]" id="sb_toggle_on_2" <?php wpfo_check(WPF()->api->options['sb_toggle_on'], 1); ?>><label for="sb_toggle_on_2" style="width: 100px;">&nbsp;<?php _e('Enable', 'wpforo'); ?>&nbsp;</label> &nbsp;
148
+ <input type="radio" value="0" name="wpforo_api_options[sb_toggle_on]" id="sb_toggle_on_1" <?php wpfo_check(WPF()->api->options['sb_toggle_on'], 0); ?>><label for="sb_toggle_on_1" style="width: 100px;">&nbsp;<?php _e('Disable', 'wpforo'); ?>&nbsp;</label>
149
+ </div>
150
+ </div>
151
+ <div style="clear: both;"></div>
152
+ </td>
153
+ </tr>
154
+ <tr>
155
+ <th style="padding-top:5px;">
156
+ <label><?php _e('General Share Buttons', 'wpforo'); ?></label>
157
+ <p class="wpf-info"><?php _e('General share buttons are forum and topic sharing buttons. They are located on the top and the bottom of each page. You can manage location of these buttons using "Share Buttons Location" options bellow.', 'wpforo'); ?></p>
158
+ </th>
159
+ <td style="padding-top:20px;">
160
+ <div class="wpf-switch-field" style="margin-bottom: 12px;">
161
+ <input type="radio" value="grey" name="wpforo_api_options[sb_style]" id="sb_style_1" <?php wpfo_check(WPF()->api->options['sb_style'], 'grey'); ?>><label for="sb_style_1" style="width: 100px;">&nbsp;<?php _e('Grey', 'wpforo'); ?>&nbsp;</label> &nbsp;
162
+ <input type="radio" value="colored" name="wpforo_api_options[sb_style]" id="sb_style_2" <?php wpfo_check(WPF()->api->options['sb_style'], 'colored'); ?>><label for="sb_style_2" style="width: 100px;">&nbsp;<?php _e('Colored', 'wpforo'); ?>&nbsp;</label> &nbsp;
163
+ </div>
164
+ <div class="wpf-switch-field">
165
+ <input type="radio" value="icon" name="wpforo_api_options[sb_type]" id="sb_type_2" <?php wpfo_check(WPF()->api->options['sb_type'], 'icon'); ?>><label for="sb_type_2" style="width: 100px;">&nbsp;<?php _e('Icon', 'wpforo'); ?>&nbsp;</label>
166
+ <input type="radio" value="button" name="wpforo_api_options[sb_type]" id="sb_type_1" <?php wpfo_check(WPF()->api->options['sb_type'], 'button'); ?>><label for="sb_type_1" style="width: 100px;">&nbsp;<?php _e('Button', 'wpforo'); ?>&nbsp;</label> &nbsp;
167
+ <input type="radio" value="button_count" name="wpforo_api_options[sb_type]" id="sb_type_3" <?php wpfo_check(WPF()->api->options['sb_type'], 'button_count'); ?>><label for="sb_type_3" style="width: 150px;">&nbsp;<?php _e('Button &amp; Count', 'wpforo'); ?>&nbsp;</label> &nbsp;
168
+ </div>
169
+ </td>
170
+ </tr>
171
+ <tr>
172
+ <th style="padding-top:5px;">
173
+ <label><?php _e('Post Sharing Toggle', 'wpforo'); ?></label>
174
+ <p class="wpf-info"><?php _e('Post sharing toggle allows you to share posts individually. You can see post sharing toggles on the left, right side or in top bar of each post. The toggle blue color is the current primary color (#12) of your forum style. For example, if you use the red forum style, the color of all share toggles will be red. This doesn\'t affect share button colors. They are always grey with original colors on mouse hover.', 'wpforo'); ?></p>
175
+ </th>
176
+ <td style="padding-top:5px;">
177
+ <div style="float: left; background: #fff; width: 75px; text-align: center; padding: 1px 18px 3px 18px; margin: 10px 5px 10px 0px; border: 1px solid #ddd;">
178
+ <label for="sb_toggle_1"><img src="<?php echo WPFORO_URL . '/wpf-assets/images/sn/toggle-1.png' ?>" align="middle"/></label><br>
179
+ &nbsp;&nbsp;<input id="sb_toggle_1" type="radio" name="wpforo_api_options[sb_toggle]" value="1" <?php wpfo_check(WPF()->api->options['sb_toggle'], 1); ?> />
180
+ </div>
181
+ <div style="float: left; background: #fff; width: 75px; text-align: center; padding: 1px 18px 3px 18px; margin: 10px 5px; border: 1px solid #ddd;">
182
+ <label for="sb_toggle_2"><img src="<?php echo WPFORO_URL . '/wpf-assets/images/sn/toggle-2.png' ?>" align="middle"/></label><br>
183
+ &nbsp;&nbsp;<input id="sb_toggle_2" type="radio" name="wpforo_api_options[sb_toggle]" value="2" <?php wpfo_check(WPF()->api->options['sb_toggle'], 2); ?> />
184
+ </div>
185
+ <div style="float: left; background: #fff; width: 75px; text-align: center; padding: 1px 18px 3px 18px; margin: 10px 5px; border: 1px solid #ddd;">
186
+ <label for="sb_toggle_3"><img src="<?php echo WPFORO_URL . '/wpf-assets/images/sn/toggle-3.png' ?>" align="middle"/></label><br>
187
+ &nbsp;&nbsp;<input id="sb_toggle_3" type="radio" name="wpforo_api_options[sb_toggle]" value="3" <?php wpfo_check(WPF()->api->options['sb_toggle'], 3); ?> />
188
+ </div>
189
+ <div style="float: left; background: #fff; width: 75px; text-align: center; padding: 1px 18px 3px 18px; margin: 10px 5px; border: 1px solid #ddd;">
190
+ <label for="sb_toggle_4"><img src="<?php echo WPFORO_URL . '/wpf-assets/images/sn/toggle-4.png' ?>" align="middle"/></label><br>
191
+ &nbsp;&nbsp;<input id="sb_toggle_4" type="radio" name="wpforo_api_options[sb_toggle]" value="4" <?php wpfo_check(WPF()->api->options['sb_toggle'], 4); ?> />
192
+ </div>
193
+ <div style="clear: both;"></div>
194
+ <div class="wpf-switch-field" style="margin-top: 10px; margin-bottom: 5px;">
195
+ <input type="radio" value="collapsed" name="wpforo_api_options[sb_toggle_type]" id="sb_toggle_type_2" <?php wpfo_check(WPF()->api->options['sb_toggle_type'], 'collapsed'); ?>><label for="sb_toggle_type_2" style="width: 100px;">&nbsp;<?php _e('Collapsed', 'wpforo'); ?>&nbsp;</label> &nbsp;
196
+ <input type="radio" value="expanded" name="wpforo_api_options[sb_toggle_type]" id="sb_toggle_type_1" <?php wpfo_check(WPF()->api->options['sb_toggle_type'], 'expanded'); ?>><label for="sb_toggle_type_1" style="width: 100px;">&nbsp;<?php _e('Expanded', 'wpforo'); ?>&nbsp;</label>
197
+ </div>
198
+ <div class="wpf-switch-field" style="margin-top: 12px; margin-bottom: 5px;">
199
+ <input type="radio" value="mixed" name="wpforo_api_options[sb_icon]" id="sb_sb_icon_3" <?php wpfo_check(WPF()->api->options['sb_icon'], 'mixed'); ?>><label for="sb_sb_icon_3" style="width: 100px;"><?php _e('Mixed', 'wpforo'); ?>&nbsp;</label>
200
+ <input type="radio" value="figure" name="wpforo_api_options[sb_icon]" id="sb_sb_icon_1" <?php wpfo_check(WPF()->api->options['sb_icon'], 'figure'); ?>><label for="sb_sb_icon_1" style="width: 100px;">&nbsp;<i class="fab fa-facebook-f" style="font-size: 13px;"></i> &nbsp;<?php _e('Figure', 'wpforo'); ?>&nbsp;</label>
201
+ <input type="radio" value="square" name="wpforo_api_options[sb_icon]" id="sb_sb_icon_2" <?php wpfo_check(WPF()->api->options['sb_icon'], 'square'); ?>><label for="sb_sb_icon_2" style="width: 100px;">&nbsp;<i class="fab fa-facebook-square" style="font-size: 14px;"></i> &nbsp;<?php _e('Square', 'wpforo'); ?>&nbsp;</label> &nbsp;
202
+ </div>
203
+ </td>
204
+ </tr>
205
+ <tr>
206
+ <th style="padding-top:15px;" colspan="2">
207
+ <label><?php _e('Share Button Locations', 'wpforo'); ?></label>
208
+ <p class="wpf-info" style="margin-bottom: 5px;"><?php _e('The post sharing toggle can be displayed either on the left side or on the top of each post. The general share buttons can be displayed on both (top and bottom) locations.', 'wpforo'); ?></p>
209
+ <?php $_lc = WPF()->api->options['sb_location']; ?>
210
+ <input type="hidden" name="wpforo_api_options[sb_location][x]" value="1">
211
+ <div style="padding-right: 10px; display: inline-block; width: auto; border-right: 1px solid #ccc; ">
212
+ <p style="text-align: center; margin: 0px; font-weight: normal; font-size: 14px;"><?php _e('General Share Buttons', 'wpforo'); ?></p>
213
+ <div style="float: left; background: #fff; display: inline-block; text-align: center; padding: 1px 5px 3px 5px; margin: 10px 5px 10px 0px;">
214
+ <label for="sb_location_4"><img src="<?php echo WPFORO_URL . '/wpf-assets/images/sn/location-3.png' ?>" align="middle" style="width: 180px"/></label><br>
215
+ &nbsp;&nbsp;<input id="sb_location_4" type="checkbox" name="wpforo_api_options[sb_location][top]" value="1" <?php if(isset($_lc['top']) && $_lc['top'] ) echo 'checked'; ?>/>
216
+ </div>
217
+ <div style="float: left; background: #fff; display: inline-block; text-align: center; padding: 1px 5px 3px 5px; margin: 10px 5px 10px 0px;">
218
+ <label for="sb_location_5"><img src="<?php echo WPFORO_URL . '/wpf-assets/images/sn/location-5.png' ?>" align="middle" style="width: 180px"/></label><br>
219
+ &nbsp;&nbsp;<input id="sb_location_5" type="checkbox" name="wpforo_api_options[sb_location][bottom]" value="1" <?php if(isset($_lc['bottom']) && $_lc['bottom'] ) echo 'checked'; ?>/>
220
+ </div>
221
+ <div style="clear: both;"></div>
222
+ </div>
223
+ <div style="padding-left: 10px; display: inline-block; width: auto;">
224
+ <p style="text-align: center; margin: 0px; font-weight: normal; font-size: 14px;"><?php _e('Post Sharing Toggle', 'wpforo'); ?></p>
225
+ <div style="float: left; background: #fff; display: inline-block; text-align: center; padding: 1px 5px 3px 5px; margin: 10px 5px 10px 0px;">
226
+ <label for="sb_location_1"><img src="<?php echo WPFORO_URL . '/wpf-assets/images/sn/location-1.png' ?>" align="middle" style="width: 180px"/></label><br>
227
+ &nbsp;&nbsp;<input id="sb_location_1" type="radio" name="wpforo_api_options[sb_location_toggle]" value="left" <?php wpfo_check(WPF()->api->options['sb_location_toggle'], 'left'); ?> />
228
+ </div>
229
+ <div style="float: left; background: #fff; display: inline-block; text-align: center; padding: 1px 5px 3px 5px; margin: 10px 5px 10px 0px;">
230
+ <label for="sb_location_3"><img src="<?php echo WPFORO_URL . '/wpf-assets/images/sn/location-6.png' ?>" align="middle" style="width: 180px"/></label><br>
231
+ &nbsp;&nbsp;<input id="sb_location_3" type="radio" name="wpforo_api_options[sb_location_toggle]" value="right" <?php wpfo_check(WPF()->api->options['sb_location_toggle'], 'right'); ?> />
232
+ </div>
233
+ <div style="float: left; background: #fff; display: inline-block; text-align: center; padding: 1px 5px 3px 5px; margin: 10px 5px 10px 0px;">
234
+ <label for="sb_location_2"><img src="<?php echo WPFORO_URL . '/wpf-assets/images/sn/location-2.png' ?>" align="middle" style="width: 180px"/></label><br>
235
+ &nbsp;&nbsp;<input id="sb_location_2" type="radio" name="wpforo_api_options[sb_location_toggle]" value="top" <?php wpfo_check(WPF()->api->options['sb_location_toggle'], 'top'); ?> />
236
+ </div>
237
+ <div style="clear: both;"></div>
238
+ </div>
239
+ </td>
240
+ </tr>
241
<?php do_action('wpforo_settings_api_bottom'); ?>
242
</tbody>
243
</table>
wpf-admin/options-tabs/features.php CHANGED
@@ -6,40 +6,43 @@
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
- 'font-awesome' => array( 'label' => __('Enable wpForo Font-Awesome Lib', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
40
'user-synch' => array( 'label' => __('Turn Off User Syncing Note', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
41
- 'bp_activity' => array( 'label' => __('Enable BuddyPress Activity Integration', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('If you use BuddyPress plugin, this option will post members activities (new topic, new reply, post like) to BuddyPress Profile Activity page.', 'wpforo')),
42
- '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')),
43
'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')),
44
'subscribe_conf' => array( 'label' => __('Enable Subscription Confirmation', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('Forum and Topic subscription with double opt-in/confirmation system.', 'wpforo') ),
45
'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') ),
@@ -63,7 +66,12 @@ $options = array(
63
</th>
64
<td>
65
<div class="wpf-switch-field">
66
- <input type="radio" value="1" name="wpforo_features[<?php echo esc_attr($key); ?>]" id="wpf_<?php echo esc_attr($key); ?>_1" <?php wpfo_check(WPF()->features[$key], 1); ?>><label for="wpf_<?php echo esc_attr($key); ?>_1"><?php _e('Yes', 'wpforo'); ?></label> &nbsp;
67
<input type="radio" value="0" name="wpforo_features[<?php echo esc_attr($key); ?>]" id="wpf_<?php echo esc_attr($key); ?>_0" <?php wpfo_check(WPF()->features[$key], 0); ?>><label for="wpf_<?php echo esc_attr($key); ?>_0"><?php _e('No', 'wpforo'); ?></label>
68
<?php if($key == 'copyright') echo '<span style="color:#009900; font-weight:400; font-size:14px;">&nbsp;'. __('Thank you!', 'wpforo') . '</span>'; ?>
69
</div>
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),
40
+ 'bp_activity' => array( 'label' => __('BuddyPress Activity Integration', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1, 'description' => __('Posts members activity (new topic, new reply, post like) to BuddyPress Profile Activity page.', 'wpforo')),
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') ),
66
</th>
67
<td>
68
<div class="wpf-switch-field">
69
+ <?php if( $key == 'font-awesome' ) : ?>
70
+ <input type="radio" value="2" name="wpforo_features[<?php echo esc_attr($key); ?>]" id="wpf_<?php echo esc_attr($key); ?>_2" <?php wpfo_check(WPF()->features[$key], 2); ?>><label for="wpf_<?php echo esc_attr($key); ?>_2"><?php _e('Sitewide', 'wpforo'); ?></label> &nbsp;
71
+ <input type="radio" value="1" name="wpforo_features[<?php echo esc_attr($key); ?>]" id="wpf_<?php echo esc_attr($key); ?>_1" <?php wpfo_check(WPF()->features[$key], 1); ?>><label for="wpf_<?php echo esc_attr($key); ?>_1"><?php _e('Forum', 'wpforo'); ?></label> &nbsp;
72
+ <?php else : ?>
73
+ <input type="radio" value="1" name="wpforo_features[<?php echo esc_attr($key); ?>]" id="wpf_<?php echo esc_attr($key); ?>_1" <?php wpfo_check(WPF()->features[$key], 1); ?>><label for="wpf_<?php echo esc_attr($key); ?>_1"><?php _e('Yes', 'wpforo'); ?></label> &nbsp;
74
+ <?php endif; ?>
75
<input type="radio" value="0" name="wpforo_features[<?php echo esc_attr($key); ?>]" id="wpf_<?php echo esc_attr($key); ?>_0" <?php wpfo_check(WPF()->features[$key], 0); ?>><label for="wpf_<?php echo esc_attr($key); ?>_0"><?php _e('No', 'wpforo'); ?></label>
76
<?php if($key == 'copyright') echo '<span style="color:#009900; font-weight:400; font-size:14px;">&nbsp;'. __('Thank you!', 'wpforo') . '</span>'; ?>
77
</div>
wpf-admin/options-tabs/general.php CHANGED
@@ -36,7 +36,7 @@
36
<br/>
37
<?php endif; ?>
38
<a href="<?php echo wpforo_home_url() ?>" target="_blank"><?php _e('Visit Forum', 'wpforo') ?></a> |
39
- <?php $page_id = WPF()->db->get_var("SELECT `ID` FROM `".WPF()->db->prefix."posts` WHERE `ID` = ".intval(WPF()->pageid)." AND `post_content` LIKE '%[wpforo%' AND `post_status` LIKE 'publish' AND `post_type` IN('post', 'page')"); ?>
40
<?php if( !WPF()->pageid || !$page_id ): ?>
41
<?php echo '<span style="color:#DD0000">' . __('wpForo PageID doesn\'t exist. Forums will not be loaded, please read this') . ' <a href="http://wpforo.com/community/faq/how-to-add-forum-pageid/">' . __('support topic', 'wpforo') . '&raquo;</a>' . '</span>'; ?>
42
<?php else: ?>
36
<br/>
37
<?php endif; ?>
38
<a href="<?php echo wpforo_home_url() ?>" target="_blank"><?php _e('Visit Forum', 'wpforo') ?></a> |
39
+ <?php $page_id = WPF()->db->get_var("SELECT `ID` FROM `".WPF()->db->posts."` WHERE `ID` = ".intval(WPF()->pageid)." AND `post_content` LIKE '%[wpforo%' AND `post_status` LIKE 'publish' AND `post_type` IN('post', 'page')"); ?>
40
<?php if( !WPF()->pageid || !$page_id ): ?>
41
<?php echo '<span style="color:#DD0000">' . __('wpForo PageID doesn\'t exist. Forums will not be loaded, please read this') . ' <a href="http://wpforo.com/community/faq/how-to-add-forum-pageid/">' . __('support topic', 'wpforo') . '&raquo;</a>' . '</span>'; ?>
42
<?php else: ?>
wpf-admin/options-tabs/posts.php CHANGED
@@ -24,24 +24,36 @@
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><label for="eot_durr"><?php _e('Allow Edit Own Topic for', 'wpforo'); ?></label></th>
28
- <td><input id="eot_durr" type="number" min="1" 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>
29
</tr>
30
<tr>
31
- <th><label for="dot_durr"><?php _e('Allow Delete Own Topic for', 'wpforo'); ?></label></th>
32
- <td><input id="dot_durr" type="number" min="1" 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>
33
</tr>
34
<tr>
35
<th><label for="posts_per_page"><?php _e('Number of Posts per Page', 'wpforo'); ?></label></th>
36
<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>
37
</tr>
38
<tr>
39
- <th><label for="eor_durr"><?php _e('Allow Edit Own Post for', 'wpforo'); ?></label></th>
40
- <td><input id="eor_durr" type="number" min="1" 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>
41
</tr>
42
<tr>
43
- <th><label for="dor_durr"><?php _e('Allow Delete Own post for', 'wpforo'); ?></label></th>
44
- <td><input id="dor_durr" type="number" min="1" 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>
45
</tr>
46
47
<tr>
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>
57
</tr>
58
59
<tr>
wpf-admin/tools-tabs/antispam.php CHANGED
@@ -99,7 +99,9 @@
99
</table>
100
</div>
101
</div>
102
-
103
<div class="wpf-tool-box wpf-spam-attach right-box" style="max-height: inherit;">
104
<h3>
105
<?php _e('Google reCAPTCHA', 'wpforo'); ?>
@@ -218,6 +220,29 @@
218
</table>
219
</div>
220
</div>
221
<div class="wpf-tool-box wpf-spam-attach left-box" id="spam-files">
222
<?php
223
$site = get_bloginfo('url');
@@ -228,12 +253,31 @@
228
<?php _e('Possible Spam Attachments', 'wpforo'); ?>
229
<p class="wpf-info"><?php _e('This tool is designed to find attachment which have been uploaded by spammers. The tool checks most common spammer filenames and suggest to delete but you should check one by one and make sure those are spam files before deleting.', 'wpforo'); ?></p>
230
</h3>
231
<div class="wpf-spam-attach-dir"><?php _e('Directory', 'wpforo'); ?>: <?php echo str_replace($site, '', $upload_dir['baseurl']); ?>/wpforo/default_attachments/&nbsp;</div>
232
<div style="margin-top:10px; clear:both;">
233
<table width="100%" border="0" cellspacing="0" cellpadding="0">
234
<tbody>
235
<?php
236
- if(is_dir($default_attachments_dir)):
237
if ($handle = opendir($default_attachments_dir)):
238
while (false !== ($filename = readdir($handle))):
239
if( $filename == '.' || $filename == '..') continue;
99
</table>
100
</div>
101
</div>
102
+
103
+
104
+
105
<div class="wpf-tool-box wpf-spam-attach right-box" style="max-height: inherit;">
106
<h3>
107
<?php _e('Google reCAPTCHA', 'wpforo'); ?>
220
</table>
221
</div>
222
</div>
223
+
224
+ <div class="wpf-tool-box wpf-spam-attach left-box" style="max-height: inherit;">
225
+ <h3>
226
+ <?php _e('Post Content', 'wpforo'); ?>
227
+ <p class="wpf-info"><?php _e('Options to control and filter post content', 'wpforo'); ?></p>
228
+ </h3>
229
+ <div style="margin-top:0px; clear:both;">
230
+ <table style="width:100%;">
231
+ <tbody>
232
+ <tr>
233
+ <td>
234
+ <label style="padding-bottom:5px; display:block;"><strong><?php _e('Allow extra HTML tags', 'wpforo'); ?>:</strong></label>
235
+ <p class="wpf-info"><?php _e('By default wpForo allows all secure HTML tags in post content. Allowing a new HTML tag may affect your forum security. For example the &lt;iframe&gt; and &lt;script&gt; HTML tags may be used by spammers and hackers to load 3rd party ads and viruses to forum.', 'wpforo'); ?></p>
236
+ <p class="wpf-info" style="font-style: normal; line-height: 22px;"><?php _e('Example of adding a new HTML tags: ', 'wpforo'); ?><code>b, em, p, code, style, a(href title), img(src alt title), embed(src width height) ...</code></p>
237
+ <br>
238
+ <textarea name="wpforo_tools_antispam[html]" style="font-size: 13px; display:block; width:100%; height:120px;" placeholder="example.com" /><?php wpfo(WPF()->tools_antispam['html']) ?></textarea></td>
239
+ </td>
240
+ </tr>
241
+ </tbody>
242
+ </table>
243
+ </div>
244
+ </div>
245
+
246
<div class="wpf-tool-box wpf-spam-attach left-box" id="spam-files">
247
<?php
248
$site = get_bloginfo('url');
253
<?php _e('Possible Spam Attachments', 'wpforo'); ?>
254
<p class="wpf-info"><?php _e('This tool is designed to find attachment which have been uploaded by spammers. The tool checks most common spammer filenames and suggest to delete but you should check one by one and make sure those are spam files before deleting.', 'wpforo'); ?></p>
255
</h3>
256
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
257
+ <tbody>
258
+ <tr>
259
+ <th style="width:50%; padding: 15px 0px;"><label><?php _e('Enable File Scanner','wpforo'); ?>:</label></th>
260
+ <td style=" padding: 10px 0px 5px 0px;">
261
+ <div class="wpf-switch-field">
262
+ <input id="spam_file_scanner_yes" type="radio" name="wpforo_tools_antispam[spam_file_scanner]" value="1" <?php wpfo_check(WPF()->tools_antispam['spam_file_scanner'], 1); ?>/><label for="spam_file_scanner_yes"><?php _e('Yes','wpforo'); ?></label> &nbsp;
263
+ <input id="spam_file_scanner_no" type="radio" name="wpforo_tools_antispam[spam_file_scanner]" value="0" <?php wpfo_check(WPF()->tools_antispam['spam_file_scanner'], 0); ?>/><label for="spam_file_scanner_no"><?php _e('No','wpforo'); ?></label>
264
+ </div>
265
+ </td>
266
+ </tr>
267
+ <tr>
268
+ <td colspan="2" style="width:50%;">
269
+ <label style="padding-bottom:5px; display:block;"><strong><?php _e('Exclude file extensions', 'wpforo'); ?>:</strong></label>
270
+ <textarea name="wpforo_tools_antispam[exclude_file_ext]" style="font-size: 13px; display:block; width:100%; height:60px;" placeholder="example.com" /><?php wpfo(WPF()->tools_antispam['exclude_file_ext']) ?></textarea></td>
271
+ </td>
272
+ </tr>
273
+ </tbody>
274
+ </table>
275
<div class="wpf-spam-attach-dir"><?php _e('Directory', 'wpforo'); ?>: <?php echo str_replace($site, '', $upload_dir['baseurl']); ?>/wpforo/default_attachments/&nbsp;</div>
276
<div style="margin-top:10px; clear:both;">
277
<table width="100%" border="0" cellspacing="0" cellpadding="0">
278
<tbody>
279
<?php
280
+ if( is_dir($default_attachments_dir) && WPF()->tools_antispam['spam_file_scanner'] ):
281
if ($handle = opendir($default_attachments_dir)):
282
while (false !== ($filename = readdir($handle))):
283
if( $filename == '.' || $filename == '..') continue;
wpf-admin/tools-tabs/legal.php ADDED
@@ -0,0 +1,181 @@
1
+ <?php
2
+ // Exit if accessed directly
3
+ if( !defined( 'ABSPATH' ) ) exit;
4
+ if( !current_user_can('administrator') ) exit;
5
+ ?>
6
+
7
+ <form action="" method="POST" class="validate">
8
+ <?php wp_nonce_field( 'wpforo-tools-legal' ); ?>
9
+ <table class="wpforo_settings_table">
10
+ <tbody>
11
+ <tr></tr>
12
+ <tr>
13
+ <td colspan="2" style="border-bottom:3px solid #43A6DF; padding-top: 20px; padding-bottom: 15px;">
14
+ <h3 style="font-weight:600; padding:0px 0px 5px 0px; margin:0px; color:#666666; font-size: 18px;">
15
+ <?php _e('Forum Privacy Policy and GDPR compliant', 'wpforo') ?> &nbsp;|&nbsp; <a href="https://wpforo.com/docs/root/gdpr/" rel="noreferrer" style="text-decoration: none; font-weight: normal;" target="_blank"><?php _e('Documentation', 'wpforo'); ?></a>
16
+ </h3>
17
+ <p class="wpf-info">
18
+ <?php _e('The General Data Protection Regulation (GDPR) (Regulation (EU) 2016/679) is a regulation by which the European Parliament, the Council of the European Union and the European Commission intend to strengthen and unify data protection for all individuals within the European Union (EU). After four years of preparation and debate the GDPR was finally approved by the EU Parliament on 14 April 2016. Enforcement date: 25 May 2018 - at which time those organizations in non-compliance may face heavy fines. More info at', 'wpforo'); ?>
19
+ <a href="https://www.eugdpr.org/key-changes.html" title="<?php _e('GDPR Key Changes', 'wpforo') ?>" target="_blank" rel="noreferrer">GDPR Portal</a>
20
+ </p>
21
+ </td>
22
+ </tr>
23
+ <tr>
24
+ <th style="padding-top: 10px; ">
25
+ <label><?php _e('Contact Information', 'wpforo'); ?></label>
26
+ <p class="wpf-info">
27
+ <?php _e('According to the GDPR, all users should have an option to contact website administrator in following cases:', 'wpforo'); ?>
28
+ <ul class="wpf-info" style="list-style: disc; padding: 5px 0px 0px 0px; margin: 0px 20px; line-height: 14px;">
29
+ <li><?php _e('Obtain personal data and created content') ?></li>
30
+ <li><?php _e('Delete account with created content') ?></li>
31
+ <li><?php _e('Report user data access and control issue') ?></li>
32
+ <li><?php _e('Report user rights violation') ?></li>
33
+ </ul>
34
+ </p>
35
+ </th>
36
+ <td style="padding-top:35px;">
37
+ <input name="wpforo_tools_legal[contact_page_url]" placeholder="<?php _e('URL to - Contact Us - page', 'wpforo'); ?>" type="text" value="<?php echo trim(WPF()->tools_legal['contact_page_url']); ?>" style="width: 80%; margin-bottom: 10px;"/>&nbsp;
38
+ <br><?php _e('Please insert a page URL, where user can find a contact form or an information to contact the forum administrator.', 'wpforo'); ?><br />
39
+ </td>
40
+ </tr>
41
+ <tr>
42
+ <th style="padding-top: 10px;">
43
+ <label><?php _e('Checkbox: I Accept Website Terms and Privacy Policy', 'wpforo'); ?></label>
44
+ <p class="wpf-info"><?php _e('If this option is enabled, users must accept forum Terms and Privacy Policy by checking the required checkbox on registration form to be able create a forum account. The checkbox label can be managed in Forums > Phrases admin page.', 'wpforo'); ?></p>
45
+ </th>
46
+ <td>
47
+ <div class="wpf-switch-field" style="padding-top: 30px;">
48
+ <input type="radio" value="1" name="wpforo_tools_legal[checkbox_terms_privacy]" id="checkbox_terms_privacy_1" <?php wpfo_check(WPF()->tools_legal['checkbox_terms_privacy'], 1); ?>><label for="checkbox_terms_privacy_1"><?php _e('Enable', 'wpforo'); ?></label> &nbsp;
49
+ <input type="radio" value="0" name="wpforo_tools_legal[checkbox_terms_privacy]" id="checkbox_terms_privacy_0" <?php wpfo_check(WPF()->tools_legal['checkbox_terms_privacy'], 0); ?>><label for="checkbox_terms_privacy_0"><?php _e('Disable', 'wpforo'); ?></label>
50
+ </div>
51
+ </td>
52
+ </tr>
53
+ <tr>
54
+ <th style="padding-top: 10px; ">
55
+ <label><?php _e('Checkbox: I Agree to Receive an Email Confirmation', 'wpforo'); ?></label>
56
+ <p class="wpf-info"><?php _e('If this option is enabled, users must agree to receive an email confirmation with a link to set a password by checking the required checkbox on registration form to be able create a forum account. The checkbox label can be managed in Forums > Phrases admin page.', 'wpforo'); ?></p>
57
+ </th>
58
+ <td>
59
+ <div class="wpf-switch-field" style="padding-top: 30px;">
60
+ <input type="radio" value="1" name="wpforo_tools_legal[checkbox_email_password]" id="checkbox_email_password_1" <?php wpfo_check(WPF()->tools_legal['checkbox_email_password'], 1); ?>><label for="checkbox_email_password_1"><?php _e('Enable', 'wpforo'); ?></label> &nbsp;
61
+ <input type="radio" value="0" name="wpforo_tools_legal[checkbox_email_password]" id="checkbox_email_password_0" <?php wpfo_check(WPF()->tools_legal['checkbox_email_password'], 0); ?>><label for="checkbox_email_password_0"><?php _e('Disable', 'wpforo'); ?></label>
62
+ </div>
63
+ </td>
64
+ </tr>
65
+ <tr>
66
+ <th style="padding-top: 10px; ">
67
+ <label><?php _e('Website Terms and Privacy Policy Pages', 'wpforo'); ?></label>
68
+ <p class="wpf-info"><?php _e('Please insert URLs to your website Terms and Privacy Policy pages. Links to these pages will be included in registration form checkbox label (I\'m agree with website terms and privacy policy) and in Forum Privacy Policy. The forum Privacy Policy does not cover your whole website, it is just an extension of your website main Privacy Policy. Thus it should be linked to according pages.', 'wpforo'); ?></p>
69
+ </th>
70
+ <td style="padding-top:35px;">
71
+ <input name="wpforo_tools_legal[page_terms]" placeholder="<?php _e('URL to Website Terms page', 'wpforo'); ?>" type="text" value="<?php echo trim(WPF()->tools_legal['page_terms']); ?>" style="width: 50%; margin-bottom: 10px;"/>&nbsp; <?php _e('Terms Page URL', 'wpforo'); ?><br />
72
+ <input name="wpforo_tools_legal[page_privacy]" placeholder="<?php _e('URL to Website Privacy Policy page', 'wpforo'); ?>" type="text" value="<?php echo trim(WPF()->tools_legal['page_privacy']); ?>" style="width: 50%; margin-bottom: 5px;"/>&nbsp; <?php _e('Privacy Policy Page URL', 'wpforo'); ?>
73
+ </td>
74
+ </tr>
75
+ <tr>
76
+ <th style="padding-top: 10px;">
77
+ <label><?php _e('Checkbox: I Agree to Forum Privacy Policy', 'wpforo'); ?></label>
78
+ <p class="wpf-info"><?php _e('If this option is enabled, users must accept forum Terms and Privacy Policy by checking the required checkbox on registration form to be able create a forum account. The checkbox label can be managed in Forums > Phrases admin page.', 'wpforo'); ?></p>
79
+ </th>
80
+ <td>
81
+ <div class="wpf-switch-field" style="padding-top: 30px;">
82
+ <input type="radio" value="1" name="wpforo_tools_legal[checkbox_forum_privacy]" id="checkbox_forum_privacy_1" <?php wpfo_check(WPF()->tools_legal['checkbox_forum_privacy'], 1); ?>><label for="checkbox_forum_privacy_1"><?php _e('Enable', 'wpforo'); ?></label> &nbsp;
83
+ <input type="radio" value="0" name="wpforo_tools_legal[checkbox_forum_privacy]" id="checkbox_forum_privacy_0" <?php wpfo_check(WPF()->tools_legal['checkbox_forum_privacy'], 0); ?>><label for="checkbox_forum_privacy_0"><?php _e('Disable', 'wpforo'); ?></label>
84
+ </div>
85
+ </td>
86
+ </tr>
87
+ <tr>
88
+ <th style="padding-top: 10px;" colspan="2">
89
+ <label><?php _e('Forum Privacy Policy with GDPR compliant Template', 'wpforo'); ?></label>
90
+ <p class="wpf-info"><?php _e('This is an example of forum Privacy Policy with GDPR compliant. It adapted to wpForo plugin functions and features. <u>In case you enable this privacy policy template you become responsible for the content of this template.</u> Please read this text carefully and make sure it suits your community Privacy Policy. If it doesn\'t, you should edit this text and adapt it to your community rules. This template includes shortcodes [forum-name] and [forum-url]. They are automatically replaced on registration page with current forum details. Don\'t forget to add an information about your organization, location and contacting ways (page, email, phone, etc...). Also if you have a separate privacy policy page for website please add a link to that page.', 'wpforo'); ?></p>
91
+ <div style="margin-top: ">
92
+ <?php
93
+ $value = WPF()->tools_legal['forum_privacy_text'];
94
+ if(is_null($value)){
95
+ $file = WPFORO_DIR . '/wpf-admin/html/privacy-policy-gdpr.html';
96
+ $value = wpforo_get_file_content( $file );
97
+ }
98
+ $args = array(
99
+ 'teeny' => false,
100
+ 'media_buttons' => false,
101
+ 'textarea_rows' => '12',
102
+ 'tinymce' => true,
103
+ 'quicktags' => array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' ),
104
+ 'textarea_name' => 'wpforo_tools_legal[forum_privacy_text]',
105
+ );
106
+ wp_editor( wp_unslash($value), 'wpforo_tools_legal_forum_privacy_text', $args ); ?>
107
+ </div>
108
+ </td>
109
+ </tr>
110
+ <tr>
111
+ <th style="padding-top: 20px;">
112
+ <label><?php _e('Checkbox: I Agree to create a forum account on Facebook Login', 'wpforo'); ?></label>
113
+ <p class="wpf-info"><?php _e('If this option is enabled, the Facebook Login button becomes not-clickable until user accept automatic account creation process based on his/her Facebook public profile information. This checkbox and appropriate information will be displayed with Facebook Login button to comply with the GDPR', 'wpforo'); ?> <a href="https://gdpr-info.eu/art-22-gdpr/" target="_blank" rel="noreferrer">(Article 22)</a> <br><?php wpforo_phrase('The note text and the label of this checkbox can be managed in Forums > Phrases admin page. Search the label phrase, click on edit button and change it.') ?></p>
114
+ </th>
115
+ <td>
116
+ <div class="wpf-switch-field" style="padding-top: 40px;">
117
+ <input type="radio" value="1" name="wpforo_tools_legal[checkbox_fb_login]" id="checkbox_fb_login_1" <?php wpfo_check(WPF()->tools_legal['checkbox_fb_login'], 1); ?>><label for="checkbox_fb_login_1"><?php _e('Enable', 'wpforo'); ?></label> &nbsp;
118
+ <input type="radio" value="0" name="wpforo_tools_legal[checkbox_fb_login]" id="checkbox_fb_login_0" <?php wpfo_check(WPF()->tools_legal['checkbox_fb_login'], 0); ?>><label for="checkbox_fb_login_0"><?php _e('Disable', 'wpforo'); ?></label>
119
+ </div>
120
+ </td>
121
+ </tr>
122
+ <tr>
123
+ <th style="padding-top: 20px;">
124
+ <label><?php _e('Forum Cookies', 'wpforo'); ?></label>
125
+ <p class="wpf-info"><?php _e('Please note, that this option is only related to wpForo cookies. This doesn\'t disable WordPress and other plugins cookies. wpForo stores a small amount of data in cookies, it used to track visited forums and topics (bold and normal titles). Also when a guest (not registered user) creates a topic or post a reply, wpForo stores guest name and email address in cookies. wpForo uses this information to detect current guest content (topics, posts) and display it to the guest even if the content is under moderation (not approved by moderators). Also wpForo stores guest name and email in cookies to keep filled these fields when he/she posts a new reply or creates a new topic.', 'wpforo'); ?> </p>
126
+ </th>
127
+ <td>
128
+ <div class="wpf-switch-field" style="padding-top: 40px;">
129
+ <input type="radio" value="1" name="wpforo_tools_legal[cookies]" id="cookies_1" <?php wpfo_check(WPF()->tools_legal['cookies'], 1); ?>><label for="cookies_1"><?php _e('Enable', 'wpforo'); ?></label> &nbsp;
130
+ <input type="radio" value="0" name="wpforo_tools_legal[cookies]" id="cookies_0" <?php wpfo_check(WPF()->tools_legal['cookies'], 0); ?>><label for="cookies_0"><?php _e('Disable', 'wpforo'); ?></label>
131
+ </div>
132
+ </td>
133
+ </tr>
134
+ <tr>
135
+ <td colspan="2" style="border-bottom:3px solid #43A6DF; padding-top: 30px;">
136
+ <h3 style="font-weight:600; padding:0px 0px 0px 0px; margin:0px; color:#666666; font-size: 18px;">
137
+ <?php _e('Forum Rules', 'wpforo') ?>
138
+ </h3>
139
+ </td>
140
+ </tr>
141
+ <tr>
142
+ <th style="padding-top: 10px;">
143
+ <label><?php _e('Checkbox: I Accept Forum Rules', 'wpforo'); ?></label>
144
+ <p class="wpf-info"><?php _e('If this option is enabled, users must accept forum rules by checking the required checkbox on registration form to be able create a forum account. The label text of this checkbox can be managed in Forums > Phrases admin page. Search the label phrase, click on edit button and change it.', 'wpforo'); ?></p>
145
+ </th>
146
+ <td>
147
+ <div class="wpf-switch-field" style="padding-top: 30px;">
148
+ <input type="radio" value="1" name="wpforo_tools_legal[rules_checkbox]" id="rules_checkbox_1" <?php wpfo_check(WPF()->tools_legal['rules_checkbox'], 1); ?>><label for="rules_checkbox_1"><?php _e('Enable', 'wpforo'); ?></label> &nbsp;
149
+ <input type="radio" value="0" name="wpforo_tools_legal[rules_checkbox]" id="rules_checkbox_0" <?php wpfo_check(WPF()->tools_legal['rules_checkbox'], 0); ?>><label for="rules_checkbox_0"><?php _e('Disable', 'wpforo'); ?></label>
150
+ </div>
151
+ </td>
152
+ </tr>
153
+ <tr>
154
+ <th style="padding-top: 10px;" colspan="2">
155
+ <label><?php _e('Forum Rules Text', 'wpforo'); ?></label>
156
+ <p class="wpf-info"><?php _e('This is a basic example of forum rules provided by', 'wpforo'); ?> <a href="https://www.wikihow.com/Sample/Forum-Rules" target="_blank" title="Sample Forum Rules" rel="noreferrer">wikihow.com</a> . <?php _e('You should edit this text and adapt it to your community rules.', 'wpforo'); ?></p>
157
+ <div style="margin-top: ">
158
+ <?php
159
+ $value = WPF()->tools_legal['rules_text'];
160
+ if(is_null($value)){
161
+ $file = WPFORO_DIR . '/wpf-admin/html/simple-forum-rules.html';
162
+ $value = wpforo_get_file_content( $file );
163
+ }
164
+ $args = array(
165
+ 'teeny' => false,
166
+ 'media_buttons' => false,
167
+ 'textarea_rows' => '8',
168
+ 'tinymce' => true,
169
+ 'quicktags' => array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' ),
170
+ 'textarea_name' => 'wpforo_tools_legal[rules_text]',
171
+ );
172
+ wp_editor( wp_unslash($value), 'wpforo_tools_legal_rules_text', $args ); ?>
173
+ </div>
174
+ </td>
175
+ </tr>
176
+ </tbody>
177
+ </table>
178
+ <div class="wpforo_settings_foot" style="clear:both; margin-top:20px;">
179
+ <input type="submit" class="button button-primary" value="<?php _e('Update Options', 'wpforo'); ?>" />
180
+ </div>
181
+ </form>
wpf-admin/tools-tabs/misc.php CHANGED
@@ -14,20 +14,20 @@
14
<table style="width:100%;">
15
<tbody style="padding:10px;">
16
<tr>
17
- <th colspan="2">
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>
22
- </th>
23
</tr>
24
<tr>
25
- <th colspan="2">
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>
30
- </th>
31
</tr>
32
</tbody>
33
</table>
14
<table style="width:100%;">
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>
22
+ </td>
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>
30
+ </td>
31
</tr>
32
</tbody>
33
</table>
wpf-admin/tools.php CHANGED
@@ -11,8 +11,9 @@
11
<div id="wpf-admin-wrap" class="wrap"><div id="icon-users" class="icon32"><br /></div>
12
<?php
13
$tabs = array(
14
- 'antispam' => __('Antispam', 'wpforo'),
15
- 'cleanup' => __('Cleanup', 'wpforo'),
16
'misc' => __('Misc', 'wpforo'),
17
);
18
wpforo_admin_tools_tabs( $tabs, ( isset($_GET['tab']) ? $_GET['tab'] : 'antispam' ) );
@@ -22,8 +23,11 @@
22
$includefile = 'tools-tabs/antispam.php';
23
if(!empty($_GET['tab'])){
24
switch($_GET['tab']){
25
- case 'cleanup':
26
- $includefile = 'tools-tabs/cleanup.php';
27
break;
28
case 'misc':
29
$includefile = 'tools-tabs/misc.php';
11
<div id="wpf-admin-wrap" class="wrap"><div id="icon-users" class="icon32"><br /></div>
12
<?php
13
$tabs = array(
14
+ 'antispam' => __('Antispam', 'wpforo'),
15
+ 'legal' => __('Privacy &amp; Rules', 'wpforo'),
16
+ //'cleanup' => __('Cleanup', 'wpforo'),
17
'misc' => __('Misc', 'wpforo'),
18
);
19
wpforo_admin_tools_tabs( $tabs, ( isset($_GET['tab']) ? $_GET['tab'] : 'antispam' ) );
23
$includefile = 'tools-tabs/antispam.php';
24
if(!empty($_GET['tab'])){
25
switch($_GET['tab']){
26
+ case 'legal':
27
+ $includefile = 'tools-tabs/legal.php';
28
+ break;
29
+ //case 'cleanup':
30
+ //$includefile = 'tools-tabs/cleanup.php';
31
break;
32
case 'misc':
33
$includefile = 'tools-tabs/misc.php';
wpf-admin/xml/english.xml CHANGED
@@ -418,7 +418,7 @@
418
<phrase name="Reset Password"><![CDATA[Reset Password]]></phrase>
419
<phrase name="Forgot Your Password?"><![CDATA[Forgot Your Password?]]></phrase>
420
<phrase name="%s created a new topic %s"><![CDATA[%s created a new topic %s]]></phrase>
421
- <phrase name="%s posted in topic %s"><![CDATA[%s posted in topic %s]]></phrase>
422
<phrase name="%s liked forum post %s"><![CDATA[%s liked forum post %s]]></phrase>
423
<phrase name="Read more"><![CDATA[Read more]]></phrase>
424
<phrase name="Forum topic"><![CDATA[Forum topic]]></phrase>
@@ -444,4 +444,48 @@
444
<phrase name="Split"><![CDATA[Split]]></phrase>
445
<phrase name="Move Reply"><![CDATA[Move Reply]]></phrase>
446
<phrase name="This action changes topic URL. Once the topic is moved to other forum the old URL of this topic will no longer be available."><![CDATA[This action changes topic URL. Once the topic is moved to other forum the old URL of this topic will no longer be available.]]></phrase>
447
</language>
418
<phrase name="Reset Password"><![CDATA[Reset Password]]></phrase>
419
<phrase name="Forgot Your Password?"><![CDATA[Forgot Your Password?]]></phrase>
420
<phrase name="%s created a new topic %s"><![CDATA[%s created a new topic %s]]></phrase>
421
+ <phrase name="%s replied to the topic %s"><![CDATA[%s replied to the topic %s]]></phrase>
422
<phrase name="%s liked forum post %s"><![CDATA[%s liked forum post %s]]></phrase>
423
<phrase name="Read more"><![CDATA[Read more]]></phrase>
424
<phrase name="Forum topic"><![CDATA[Forum topic]]></phrase>
444
<phrase name="Split"><![CDATA[Split]]></phrase>
445
<phrase name="Move Reply"><![CDATA[Move Reply]]></phrase>
446
<phrase name="This action changes topic URL. Once the topic is moved to other forum the old URL of this topic will no longer be available."><![CDATA[This action changes topic URL. Once the topic is moved to other forum the old URL of this topic will no longer be available.]]></phrase>
447
+ <phrase name="The time to edit this topic is expired"><![CDATA[The time to edit this topic is expired]]></phrase>
448
+ <phrase name="The time to delete this topic is expired."><![CDATA[The time to delete this topic is expired. Please contact to forum administrator to delete it.]]></phrase>
449
+ <phrase name="The time to edit this post is expired."><![CDATA[The time to edit this post is expired.]]></phrase>
450
+ <phrase name="The time to delete this post is expired."><![CDATA[The time to delete this post is expired.]]></phrase>
451
+ <phrase name="Please contact to forum administrator to delete it."><![CDATA[Please contact to forum administrator to delete it.]]></phrase>
452
+ <phrase name="Please contact to forum administrator to edit it."><![CDATA[Please contact to forum administrator to edit it.]]></phrase>
453
+ <phrase name="Read more about Facebook public_profile properties."><![CDATA[Read more about Facebook public_profile properties.]]></phrase>
454
+ <phrase name="forum privacy policy"><![CDATA[forum privacy policy]]></phrase>
455
+ <phrase name="I have read and agree to the %s."><![CDATA[I have read and agree to the %s.]]></phrase>
456
+ <phrase name="Click to open forum privacy policy below"><![CDATA[Click to open forum privacy policy below]]></phrase>
457
+ <phrase name="I agree"><![CDATA[I agree]]></phrase>
458
+ <phrase name="I do not agree. Take me away from here."><![CDATA[I do not agree. Take me away from here.]]></phrase>
459
+ <phrase name="forum rules"><![CDATA[forum rules]]></phrase>
460
+ <phrase name="I have read and agree to abide by the %s."><![CDATA[I have read and agree to abide by the %s.]]></phrase>
461
+ <phrase name="Click to open forum rules below"><![CDATA[Click to open forum rules below]]></phrase>
462
+ <phrase name="I agree to these rules"><![CDATA[I agree to these rules]]></phrase>
463
+ <phrase name="I do not agree to these rules. Take me away from here."><![CDATA[I do not agree to these rules. Take me away from here.]]></phrase>
464
+ <phrase name="the website"><![CDATA[the website]]></phrase>
465
+ <phrase name="I have read and agree to the"><![CDATA[I have read and agree to the]]></phrase>
466
+ <phrase name="I have read and agree to %s privacy policy. For more information, please check our privacy policy, where you'll get more info on where, how and why we store your data."><![CDATA[I have read and agree to %s privacy policy. For more information, please check our privacy policy, where you'll get more info on where, how and why we store your data.]]></phrase>
467
+ <phrase name="Terms"><![CDATA[Terms]]></phrase>
468
+ <phrase name="Privacy Policy"><![CDATA[Privacy Policy]]></phrase>
469
+ <phrase name="and"><![CDATA[and]]></phrase>
470
+ <phrase name="I agree to receive an email confirmation with a link to set a password."><![CDATA[I agree to receive an email confirmation with a link to set a password.]]></phrase>
471
+ <phrase name="Contact Us"><![CDATA[Contact Us]]></phrase>
472
+ <phrase name="Contact the forum administrator"><![CDATA[Contact the forum administrator]]></phrase>
473
+ <phrase name="Share:"><![CDATA[Share:]]></phrase>
474
+ <phrase name="Share"><![CDATA[Share]]></phrase>
475
+ <phrase name="Share this post"><![CDATA[Share this post]]></phrase>
476
+ <phrase name="When you login first time using Facebook Login button, we collect your account %s information shared by Facebook, based on your privacy settings. We also get your email address to automatically create a forum account for you. Once your account is created, you'll be logged-in to this account and you'll receive a confirmation email."><![CDATA[When you login first time using Facebook Login button, we collect your account %s information shared by Facebook, based on your privacy settings. We also get your email address to automatically create a forum account for you. Once your account is created, you'll be logged-in to this account and you'll receive a confirmation email.]]></phrase>
477
+ <phrase name="I allow to create an account based on my Facebook public profile information and send confirmation email."><![CDATA[I allow to create an account based on my Facebook public profile information and send confirmation email.]]></phrase>
478
+ <phrase name="Facebook Login Information"><![CDATA[Facebook Login Information]]></phrase>
479
+ <phrase name="Share to Facebook"><![CDATA[Share to Facebook]]></phrase>
480
+ <phrase name="Tweet this post"><![CDATA[Tweet this post]]></phrase>
481
+ <phrase name="Tweet"><![CDATA[Tweet]]></phrase>
482
+ <phrase name="Share to Google+"><![CDATA[Share to Google+]]></phrase>
483
+ <phrase name="Share to VK"><![CDATA[Share to VK]]></phrase>
484
+ <phrase name="Share to OK"><![CDATA[Share to OK]]></phrase>
485
+ <phrase name="Update Subscriptions"><![CDATA[Update Subscriptions]]></phrase>
486
+ <phrase name="Subscribe to all new topics and posts"><![CDATA[Subscribe to all new topics and posts]]></phrase>
487
+ <phrase name="Subscribe to all new topics"><![CDATA[Subscribe to all new topics]]></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
</language>
wpf-assets/images/sn/fb-m.png ADDED
Binary file
wpf-assets/images/sn/gg-m.png ADDED
Binary file
wpf-assets/images/sn/location-1.png ADDED
Binary file
wpf-assets/images/sn/location-2.png ADDED
Binary file
wpf-assets/images/sn/location-3.png ADDED
Binary file
wpf-assets/images/sn/location-4.png ADDED
Binary file
wpf-assets/images/sn/location-5.png ADDED
Binary file
wpf-assets/images/sn/location-6.png ADDED
Binary file
wpf-assets/images/sn/ok-m.png ADDED
Binary file
wpf-assets/images/sn/share-m.png ADDED
Binary file
wpf-assets/images/sn/toggle-1.png ADDED
Binary file
wpf-assets/images/sn/toggle-2.png ADDED
Binary file
wpf-assets/images/sn/toggle-3.png ADDED
Binary file
wpf-assets/images/sn/toggle-4.png ADDED
Binary file
wpf-assets/images/sn/tw-m.png ADDED
Binary file
wpf-assets/images/sn/vk-m.png ADDED
Binary file
wpf-assets/js/frontend.js CHANGED
@@ -261,3 +261,77 @@ jQuery(document).ready(function($){
261
});
262
263
});
261
});
262
263
});
264
+
265
+
266
+ jQuery(document).ready(function($){
267
+
268
+ //Facebook Share Buttons
269
+ $(document).on('click','.wpf-fb', function(){
270
+ var item_url = $(this).data('wpfurl');
271
+ var item_quote = $(this).parents('.post-wrap').find('.wpforo-post-content').text();
272
+ FB.ui({
273
+ method: 'share',
274
+ href: item_url,
275
+ quote: item_quote,
276
+ hashtag: null,
277
+ }, function (response) {});
278
+ });
279
+
280
+ //Share Buttons Toggle
281
+ $('.wpf-sb').mouseover(function(){
282
+ $(this).find(".wpf-sb-toggle").find("i").addClass("wpfsa");
283
+ $(this).find(".wpf-sb-buttons").show();
284
+ }).mouseout(function() {
285
+ $(this).find(".wpf-sb-toggle").find("i").removeClass("wpfsa");
286
+ $(this).find(".wpf-sb-buttons").hide();
287
+ });
288
+ $('.wpf-sb-toggle').mouseover(function(){
289
+ $(this).next().filter('.wpf-sb-buttons').parent().find("i").addClass("wpfsa");
290
+ }).mouseout(function() {
291
+ $(this).next().filter('.wpf-sb-buttons').parent().find("i").removeClass("wpfsa");
292
+ });
293
+
294
+ //Forum Rules
295
+ $("#wpf-open-rules").click(function(){
296
+ $(".wpforo-legal-rules").toggle();
297
+ return false;
298
+ });
299
+ $(document).on('click','#wpflegal-rules-yes', function(){
300
+ $('#wpflegal_rules').prop('checked', true);
301
+ $('#wpflegal-rules-not').removeClass('wpflb-active-not');
302
+ $(this).addClass('wpflb-active-yes');
303
+ setTimeout(function(){ $(".wpforo-legal-rules").slideToggle( "slow" ); }, 500);
304
+ });
305
+ $(document).on('click','#wpflegal-rules-not', function(){
306
+ $('#wpflegal_rules').prop('checked', false);
307
+ $('#wpflegal-rules-yes').removeClass('wpflb-active-yes');
308
+ $(this).addClass('wpflb-active-not');
309
+ });
310
+
311
+ //Forum Privacy Buttons
312
+ $("#wpf-open-privacy").click(function(){
313
+ $(".wpforo-legal-privacy").toggle();
314
+ return false;
315
+ });
316
+ $(document).on('click','#wpflegal-privacy-yes', function(){
317
+ $('#wpflegal_privacy').prop('checked', true);
318
+ $('#wpflegal-privacy-not').removeClass('wpflb-active-not');
319
+ $(this).addClass('wpflb-active-yes');
320
+ setTimeout(function(){ $(".wpforo-legal-privacy").slideToggle( "slow" ); }, 500);
321
+ });
322
+ $(document).on('click','#wpflegal-privacy-not', function(){
323
+ $('#wpflegal_privacy').prop('checked', false);
324
+ $('#wpflegal-privacy-yes').removeClass('wpflb-active-yes');
325
+ $(this).addClass('wpflb-active-not');
326
+ });
327
+
328
+ //Facebook Login Button
329
+ $('#wpflegal_fblogin').on('click', function() {
330
+ if( $(this).is(':checked') ){
331
+ $('.wpforo_fb-button').attr('style','pointer-events:auto; opacity:1;');
332
+ } else{
333
+ $('.wpforo_fb-button').attr('style','pointer-events: none; opacity:0.6;');
334
+ }
335
+ });
336
+
337
+ });
wpf-includes/class-api.php CHANGED
@@ -6,14 +6,17 @@ class wpForoAPI{
6
private $default;
7
public $options;
8
public $locale = 'en_US';
9
- public $locales = array( 'af_ZA', 'ar_AR', 'az_AZ', 'be_BY', 'bg_BG', 'bn_IN', 'bs_BA', 'ca_ES', 'cs_CZ', 'cy_GB', 'da_DK', 'de_DE', 'el_GR', 'en_US',
10
- 'en_GB', 'eo_EO', 'es_ES', 'es_LA', 'et_EE', 'eu_ES', 'fa_IR', 'fb_LT', 'fi_FI', 'fo_FO', 'fr_FR', 'fr_CA', 'fy_NL', 'ga_IE',
11
- 'gl_ES', 'he_IL', 'hi_IN', 'hr_HR', 'hu_HU', 'hy_AM', 'id_ID', 'is_IS', 'it_IT', 'ja_JP', 'ka_GE', 'km_KH', 'ko_KR', 'ku_TR',
12
- 'la_VA', 'lt_LT', 'lv_LV', 'mk_MK', 'ml_IN', 'ms_MY', 'nb_NO', 'ne_NP', 'nl_NL', 'nn_NO', 'pa_IN', 'pl_PL', 'ps_AF', 'pt_PT',
13
- 'pt_BR', 'ro_RO', 'ru_RU', 'sk_SK', 'sl_SI', 'sq_AL', 'sr_RS', 'sv_SE', 'sw_KE', 'ta_IN', 'te_IN', 'th_TH', 'tl_PH', 'tr_TR',
14
- 'uk_UA', 'vi_VN', 'zh_CN', 'zh_HK', 'zh_TW' );
15
16
-
17
public function __construct(){
18
$this->init_defaults();
19
$this->init_options();
@@ -26,10 +29,25 @@ class wpForoAPI{
26
'fb_api_secret' => '',
27
'fb_login' => 0,
28
'fb_load_sdk' => 1,
29
'fb_lb_on_lp' => 1,
30
'fb_lb_on_rp' => 1,
31
'fb_redirect' => 'profile',
32
- 'fb_redirect_url' => ''
33
);
34
}
35
@@ -40,39 +58,57 @@ class wpForoAPI{
40
public function hooks(){
41
42
$template = WPF()->current_object['template'];
43
-
44
###############################################################################
45
- ############### Facebook API ##################################################
46
###############################################################################
47
48
if(!is_user_logged_in()){
49
if( $this->options['fb_login'] ){
50
if( $template == 'login' || $template == 'register' ){
51
add_action('wp_enqueue_scripts', array($this, 'fb_enqueue'));
52
- if( $this->options['fb_load_sdk'] ){
53
- add_action('wpforo_bottom_hook', array($this, 'fb_login_scripts'));
54
- }
55
- }
56
- if( $this->options['fb_lb_on_lp'] ){
57
- add_action('wpforo_login_form_end', array($this, 'fb_login_button'));
58
- }
59
- if( $this->options['fb_lb_on_rp'] ){
60
- add_action('wpforo_register_form_end', array($this, 'fb_login_button'));
61
}
62
add_action('wp_ajax_wpforo_facebook_auth', array($this, 'fb_auth'));
63
add_action('wp_ajax_nopriv_wpforo_facebook_auth', array($this, 'fb_auth'));
64
}
65
}
66
-
67
###############################################################################
68
############### reCAPTCHA API #################################################
69
###############################################################################
70
-
71
$site_key = WPF()->tools_antispam['rc_site_key'];
72
$secret_key = WPF()->tools_antispam['rc_secret_key'];
73
-
74
if( !is_user_logged_in() && $site_key && $secret_key ){
75
-
76
$rc_reg_form = WPF()->tools_antispam['rc_reg_form'];
77
$rc_login_form = WPF()->tools_antispam['rc_login_form'];
78
$rc_lostpass_form = WPF()->tools_antispam['rc_lostpass_form'];
@@ -111,26 +147,53 @@ class wpForoAPI{
111
if( $rc_wpf_lostpass_form && $template == 'lostpassword' ) add_action('lostpassword_form', array( $this, 'rc_widget'));
112
113
//Load reCAPTCHA API and Widget for Topic and Post Editor
114
- if( $template == 'forum' || $template == 'topic' || $template == 'post' ){
115
add_action('wp_enqueue_scripts', array($this, 'rc_enqueue'));
116
add_action('wpforo_verify_form_end', array($this, 'rc_verify'));
117
- add_action('wpforo_topic_form_extra_fields_after', array($this, 'rc_widget'));
118
- add_action('wpforo_reply_form_extra_fields_after', array($this, 'rc_widget'));
119
}
120
}
121
122
###############################################################################
123
}
124
-
125
- public function fb_local(){
126
- $wplocal = get_locale();
127
- if( in_array($wplocal, $this->locales) ){
128
- return $wplocal;
129
- }
130
- else{
131
- return $this->locale;
132
- }
133
- }
134
135
public function fb_enqueue() {
136
$app_id = $this->options['fb_api_id'];
@@ -143,18 +206,18 @@ class wpForoAPI{
143
144
public function fb_auth(){
145
146
- $app_version = '2.10';
147
$app_secret = $this->options['fb_api_secret'];
148
check_ajax_referer( 'wpforo-fb-nonce', 'security' );
149
$fb_token = isset( $_POST['fb_response']['authResponse']['accessToken'] ) ? $_POST['fb_response']['authResponse']['accessToken'] : '';
150
- $fb_url = add_query_arg( array( 'fields' => 'id,first_name,last_name,email,link,about,locale,birthday', 'access_token' => $fb_token ), 'https://graph.facebook.com/v' . $app_version . '/' . $_POST['fb_response']['authResponse']['userID'] );
151
152
###################################################################################################################
153
// Verifying Graph API Calls with appsecret_proof
154
// Graph API calls can be made from clients or from your server on behalf of clients.
155
// Calls from a server can be better secured by adding a parameter called appsecret_proof.
156
// https://developers.facebook.com/docs/graph-api/securing-requests/
157
- if( !$app_secret ) {
158
$appsecret_proof = hash_hmac('sha256', $fb_token, trim($app_secret) );
159
$fb_url = add_query_arg( array( 'appsecret_proof' => $appsecret_proof ), $fb_url );
160
}
@@ -216,23 +279,259 @@ class wpForoAPI{
216
}
217
}
218
219
- public function fb_login_scripts(){
220
- ?>
221
- <!-- wpForo FB Login start -->
222
- <script type='text/javascript' > function statusChangeCallback(response){ if (response.status === 'connected') {} else if (response.status === 'not_authorized') {} else {}} function checkLoginState() { FB.getLoginStatus(function(response) { statusChangeCallback(response); }); } window.fbAsyncInit = function(){ FB.init({ appId : '<?php echo trim($this->options['fb_api_id']) ?>', cookie : true, xfbml : true, status : false, version : 'v2.10' }); FB.getLoginStatus(function(response) {statusChangeCallback(response);}); }; (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/<?php echo $this->fb_local() ?>/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script>
223
- <!-- wpForo FB Login end -->
224
- <?php
225
}
226
227
public function fb_login_button(){
228
?>
229
- <div class="wpforo_fb-button wpforo-fb-login-wrap" data-redirect="<?php echo $this->fb_redirect() ?>" data-fb_nonce="<?php echo wp_create_nonce( 'wpforo-fb-nonce' ) ?>">
230
<div class="fb-login-button" data-max-rows="1" onlogin="wpforo_fb_check_auth" data-size="medium" data-button-type="login_with" data-show-faces="false" data-auth-type="rerequest" data-auto-logout-link="false" data-use-continue-as="true" data-scope="email,public_profile"></div>
231
<img data-no-lazy="1" src="<?php echo WPFORO_URL . '/wpf-assets/images/loading.gif'; ?>" class="wpforo_fb-spinner" style="display:none"/>
232
</div>
233
<?php
234
}
235
-
236
public function rc_enqueue() {
237
$theme = WPF()->tools_antispam['rc_theme'];
238
$site_key = WPF()->tools_antispam['rc_site_key'];
@@ -286,6 +585,14 @@ class wpForoAPI{
286
}
287
288
public function rc_verify() {
289
$result = $this->rc_check();
290
if ( $result == 'success' ) {
291
return true;
@@ -297,7 +604,15 @@ class wpForoAPI{
297
}
298
299
public function rc_verify_wp_login( $user ) {
300
- if ( !isset($_POST['log']) && !isset($_POST['pwd'])) return $user;
301
$errors = is_wp_error($user) ? $user : new WP_Error();
302
$result = $this->rc_check();
303
if( $result != 'success' ) {
@@ -311,6 +626,14 @@ class wpForoAPI{
311
312
public function rc_verify_wp_register( $errors = '' ){
313
if ( !is_wp_error($errors) ) $errors = new WP_Error();
314
$result = $this->rc_check();
315
if( $result != 'success' ) {
316
$errors->add('wpforo-recaptcha-error', $result);
@@ -320,6 +643,14 @@ class wpForoAPI{
320
321
public function rc_verify_wp_lostpassword( $errors = '' ){
322
if ( !is_wp_error($errors) ) $errors = new WP_Error();
323
$result = $this->rc_check();
324
if( $result != 'success' ) {
325
if ( isset($_POST['wc_reset_password']) && isset($_POST['_wp_http_referer']) ) {
6
private $default;
7
public $options;
8
public $locale = 'en_US';
9
+ public $locale_iso = 'en';
10
+ public $fb_local = array( 'af_ZA', 'ar_AR', 'az_AZ', 'be_BY', 'bg_BG', 'bn_IN', 'bs_BA', 'ca_ES', 'cs_CZ', 'cy_GB', 'da_DK', 'de_DE', 'el_GR', 'en_US',
11
+ 'en_GB', 'eo_EO', 'es_ES', 'es_LA', 'et_EE', 'eu_ES', 'fa_IR', 'fb_LT', 'fi_FI', 'fo_FO', 'fr_FR', 'fr_CA', 'fy_NL', 'ga_IE',
12
+ 'gl_ES', 'he_IL', 'hi_IN', 'hr_HR', 'hu_HU', 'hy_AM', 'id_ID', 'is_IS', 'it_IT', 'ja_JP', 'ka_GE', 'km_KH', 'ko_KR', 'ku_TR',
13
+ 'la_VA', 'lt_LT', 'lv_LV', 'mk_MK', 'ml_IN', 'ms_MY', 'nb_NO', 'ne_NP', 'nl_NL', 'nn_NO', 'pa_IN', 'pl_PL', 'ps_AF', 'pt_PT',
14
+ 'pt_BR', 'ro_RO', 'ru_RU', 'sk_SK', 'sl_SI', 'sq_AL', 'sr_RS', 'sv_SE', 'sw_KE', 'ta_IN', 'te_IN', 'th_TH', 'tl_PH', 'tr_TR',
15
+ 'uk_UA', 'vi_VN', 'zh_CN', 'zh_HK', 'zh_TW' );
16
+ public $tw_local = array( 'en', 'ar', 'bn', 'cs', 'da', 'de', 'el', 'es', 'fa', 'fi', 'fil', 'fr', 'he', 'hi', 'hu', 'id', 'it', 'ja', 'ko', 'msa', 'nl',
17
+ 'no', 'pl', 'pt', 'ro', 'ru', 'sv', 'th', 'tr', 'uk', 'ur', 'vi', 'zh-cn', 'zh-tw');
18
+ public $ok_local = array( "ru", "en", "uk", "hy", "mo", "ro", "kk", "uz", "az", "tr");
19
20
public function __construct(){
21
$this->init_defaults();
22
$this->init_options();
29
'fb_api_secret' => '',
30
'fb_login' => 0,
31
'fb_load_sdk' => 1,
32
+ 'fb_sdk_version' => 'v2.10',
33
'fb_lb_on_lp' => 1,
34
'fb_lb_on_rp' => 1,
35
'fb_redirect' => 'profile',
36
+ 'fb_redirect_url' => '',
37
+ 'tw_load_wjs' => 1,
38
+ 'gg_load_js' => 1,
39
+ 'vk_load_js' => 1,
40
+ 'ok_load_js' => 1,
41
+ 'sb_on' => 1,
42
+ 'sb_toggle_on' => 1,
43
+ 'sb' => array('fb' => 1, 'tw' => 1, 'gg' => 1, 'vk' => 0, 'ok' => 0),
44
+ 'sb_icon' => 'mixed',
45
+ 'sb_type' => 'icon',
46
+ 'sb_style' => 'grey',
47
+ 'sb_toggle' => 4,
48
+ 'sb_location_toggle' => 'top',
49
+ 'sb_toggle_type' => 'collapsed',
50
+ 'sb_location' => array('top' => 0, 'bottom' => 1),
51
);
52
}
53
58
public function hooks(){
59
60
$template = WPF()->current_object['template'];
61
+
62
###############################################################################
63
+ ############### Facebook & Twitter API ########################################
64
###############################################################################
65
66
if(!is_user_logged_in()){
67
if( $this->options['fb_login'] ){
68
if( $template == 'login' || $template == 'register' ){
69
add_action('wp_enqueue_scripts', array($this, 'fb_enqueue'));
70
+ add_action('wpforo_bottom_hook', array($this, 'fb_login_sdk'), 9);
71
}
72
+ if( $this->options['fb_api_id'] && $this->options['fb_api_secret'] ){
73
+ if( $this->options['fb_lb_on_lp'] ){
74
+ add_action('wpforo_login_form_end', array($this, 'fb_login_button'));
75
+ }
76
+ if( $this->options['fb_lb_on_rp'] ){
77
+ add_action('wpforo_register_form_end', array($this, 'fb_login_button'));
78
+ }
79
+ }
80
add_action('wp_ajax_wpforo_facebook_auth', array($this, 'fb_auth'));
81
add_action('wp_ajax_nopriv_wpforo_facebook_auth', array($this, 'fb_auth'));
82
}
83
}
84
+
85
+ if( is_wpforo_page() ){
86
+ if( $this->options['fb_load_sdk'] ){
87
+ add_action('wpforo_bottom_hook', array($this, 'fb_sdk'), 10);
88
+ }
89
+ if( $this->options['tw_load_wjs'] && wpfval($this->options, 'sb', 'tw') ){
90
+ add_action('wpforo_top_hook', array($this, 'tw_wjs'), 11);
91
+ }
92
+ if( $this->options['gg_load_js'] && wpfval($this->options, 'sb', 'gg') ){
93
+ add_action('wpforo_top_hook', array($this, 'gg_js'), 12);
94
+ }
95
+ if( $this->options['vk_load_js'] && wpfval($this->options, 'sb', 'vk') ){
96
+ add_action('wpforo_top_hook', array($this, 'vk_js'), 13);
97
+ }
98
+ if( $this->options['ok_load_js'] && wpfval($this->options, 'sb', 'ok') ){
99
+ add_action('wpforo_top_hook', array($this, 'ok_js'), 14);
100
+ }
101
+ }
102
+
103
###############################################################################
104
############### reCAPTCHA API #################################################
105
###############################################################################
106
+
107
$site_key = WPF()->tools_antispam['rc_site_key'];
108
$secret_key = WPF()->tools_antispam['rc_secret_key'];
109
+
110
if( !is_user_logged_in() && $site_key && $secret_key ){
111
+
112
$rc_reg_form = WPF()->tools_antispam['rc_reg_form'];
113
$rc_login_form = WPF()->tools_antispam['rc_login_form'];
114
$rc_lostpass_form = WPF()->tools_antispam['rc_lostpass_form'];
147
if( $rc_wpf_lostpass_form && $template == 'lostpassword' ) add_action('lostpassword_form', array( $this, 'rc_widget'));
148
149
//Load reCAPTCHA API and Widget for Topic and Post Editor
150
+ if( $template == 'forum' || $template == 'topic' || $template == 'post' ){
151
add_action('wp_enqueue_scripts', array($this, 'rc_enqueue'));
152
add_action('wpforo_verify_form_end', array($this, 'rc_verify'));
153
+ if( $rc_topic_editor ) add_action('wpforo_topic_form_extra_fields_after', array($this, 'rc_widget'));
154
+ if( $rc_post_editor ) add_action('wpforo_reply_form_extra_fields_after', array($this, 'rc_widget'));
155
}
156
}
157
158
###############################################################################
159
}
160
+
161
+ public function local( $api ){
162
+
163
+ $wplocal = get_locale();
164
+ $wplocal_iso = substr($wplocal, 0, 2);
165
+
166
+ if( $api == 'fb' ){
167
+ if( in_array($wplocal, $this->fb_local) ){
168
+ return $wplocal;
169
+ }
170
+ else{
171
+ return $this->locale;
172
+ }
173
+ }
174
+ elseif( $api == 'tw' ){
175
+ if( in_array($wplocal_iso, $this->tw_local) ){
176
+ return $wplocal_iso;
177
+ }
178
+ else{
179
+ return $this->locale_iso;
180
+ }
181
+ }
182
+ elseif( $api == 'gg' ){
183
+ return $wplocal_iso;
184
+ }
185
+ elseif( $api == 'vk' ){
186
+ return $wplocal_iso;
187
+ }
188
+ elseif( $api == 'ok' ){
189
+ if( in_array($wplocal_iso, $this->ok_local) ){
190
+ return $wplocal_iso;
191
+ }
192
+ else{
193
+ return $this->locale_iso;
194
+ }
195
+ }
196
+ }
197
198
public function fb_enqueue() {
199
$app_id = $this->options['fb_api_id'];
206
207
public function fb_auth(){
208
209
+ $app_version = 'v2.10';
210
$app_secret = $this->options['fb_api_secret'];
211
check_ajax_referer( 'wpforo-fb-nonce', 'security' );
212
$fb_token = isset( $_POST['fb_response']['authResponse']['accessToken'] ) ? $_POST['fb_response']['authResponse']['accessToken'] : '';
213
+ $fb_url = add_query_arg( array( 'fields' => 'id,first_name,last_name,email,link,about,locale,birthday', 'access_token' => $fb_token ), 'https://graph.facebook.com/' . $app_version . '/' . $_POST['fb_response']['authResponse']['userID'] );
214
215
###################################################################################################################
216
// Verifying Graph API Calls with appsecret_proof
217
// Graph API calls can be made from clients or from your server on behalf of clients.
218
// Calls from a server can be better secured by adding a parameter called appsecret_proof.
219
// https://developers.facebook.com/docs/graph-api/securing-requests/
220
+ if( $app_secret ) {
221
$appsecret_proof = hash_hmac('sha256', $fb_token, trim($app_secret) );
222
$fb_url = add_query_arg( array( 'appsecret_proof' => $appsecret_proof ), $fb_url );
223
}
279
}
280
}
281
282
+ public function fb_sdk(){
283
+ ?>
284
+ <div id="fb-root"></div>
285
+ <script type='text/javascript' >(function(d, s, id) {var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/<?php echo $this->local('fb') ?>/sdk.js#xfbml=1&version=<?php echo $this->options['fb_sdk_version'] ?>&appId=<?php echo $this->options['fb_api_id']?>&autoLogAppEvents=1"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>
286
+ <?php
287
}
288
+
289
+ public function fb_login_sdk(){
290
+ ?>
291
+ <script type='text/javascript'>function statusChangeCallback(response){ if (response.status === 'connected') {} else if (response.status === 'not_authorized') {} else {}} function checkLoginState() { FB.getLoginStatus(function(response) { statusChangeCallback(response); });} window.fbAsyncInit = function(){ FB.init({ appId : '<?php echo trim($this->options['fb_api_id']) ?>', cookie : <?php echo ( WPF()->tools_legal['cookies'] ) ? 'true' : 'false'; ?>, xfbml : true, status : false, version : '<?php echo $this->options['fb_sdk_version'] ?>' }); FB.getLoginStatus(function(response) {statusChangeCallback(response);}); };</script>
292
+ <?php
293
+ }
294
295
public function fb_login_button(){
296
+ $checkbox = WPF()->tools_legal['checkbox_fb_login'];
297
+ $public_profile = '<a href="https://developers.facebook.com/docs/facebook-login/permissions#reference-public_profile" target="_blank" rel="nofollow" title="' . wpforo_phrase('Read more about Facebook public_profile properties.', false) . '">public_profile</a>';
298
?>
299
+ <?php if( $checkbox ): ?>
300
+ <div class="wpforo-fb-info">
301
+ <span class="wpforo-fb-info-title">
302
+ <i class="fas fa-info-circle wpfcl-5" aria-hidden="true" style="font-size:16px;"></i> &nbsp;<?php wpforo_phrase('Facebook Login Information'); ?>
303
+ </span>
304
+ <span class="wpforo-fb-info-text">
305
+ <?php echo sprintf( wpforo_phrase('When you login first time using Facebook Login button, we collect your account %s information shared by Facebook, based on your privacy settings. We also get your email address to automatically create a forum account for you. Once your account is created, you\'ll be logged-in to this account and you\'ll receive a confirmation email.', false ), $public_profile); ?>
306
+ </span>
307
+ <label class="wpforo-legal-checkbox wpflegal-fblogin">
308
+ <input id="wpflegal_fblogin" name="legal[agree-fb-login]" value="1" type="checkbox"> &nbsp;
309
+ <span><?php wpforo_phrase('I allow to create an account and send confirmation email.'); ?></span>
310
+ </label>
311
+ </div>
312
+ <?php endif; ?>
313
+ <div class="wpforo_fb-button wpforo-fb-login-wrap" data-redirect="<?php echo $this->fb_redirect() ?>" data-fb_nonce="<?php echo wp_create_nonce( 'wpforo-fb-nonce' ) ?>" <?php if( $checkbox ) echo 'style="pointer-events: none; opacity:0.6;"'; ?>>
314
<div class="fb-login-button" data-max-rows="1" onlogin="wpforo_fb_check_auth" data-size="medium" data-button-type="login_with" data-show-faces="false" data-auth-type="rerequest" data-auto-logout-link="false" data-use-continue-as="true" data-scope="email,public_profile"></div>
315
<img data-no-lazy="1" src="<?php echo WPFORO_URL . '/wpf-assets/images/loading.gif'; ?>" class="wpforo_fb-spinner" style="display:none"/>
316
</div>
317
<?php
318
}
319
+
320
+ public function fb_share_button( $url = '', $type = 'custom', $text = '' ){
321
+ if( !wpfval($this->options, 'sb', 'fb') || !wpfval($this->options, 'fb_api_id') ) return;
322
+ $url = ( $url ) ? $url : WPF()->current_url;
323
+ $text = ( $text ) ? $text : wpfval(WPF()->current_object,'og_text');
324
+ if( $type == 'custom' ){
325
+ ?>
326
+ <span class="wpforo-share-button wpf-fb" data-wpfurl="<?php echo $url ?>" title="<?php wpforo_phrase('Share to Facebook'); ?>">
327
+ <?php if( $this->options['sb_icon'] == 'figure' ): ?>
328
+ <i class="fab fa-facebook-f" aria-hidden="true"></i>
329
+ <?php elseif( $this->options['sb_icon'] == 'square' ): ?>
330
+ <i class="fab fa-facebook-square" aria-hidden="true"></i>
331
+ <?php else: ?>
332
+ <i class="fab fa-facebook" aria-hidden="true"></i>
333
+ <?php endif; ?>
334
+ </span>
335
+ <?php
336
+ }
337
+ else{
338
+ ?>
339
+ <div class="wpf-sbw wpf-sbw-fb">
340
+ <?php if($this->options['sb_type'] == 'button_count'): ?>
341
+ <div class="fb-share-button" data-href="<?php echo esc_url($url) ?>" data-layout="button_count" data-size="small" data-mobile-iframe="true">
342
+ <a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=<?php echo urlencode($url) ?>" class="fb-xfbml-parse-ignore"><?php wpforo_phrase('Share'); ?></a>
343
+ </div>
344
+ <?php elseif($this->options['sb_type'] == 'button'): ?>
345
+ <span class="wpf-sb-button wpf-fb" data-wpfurl="<?php echo esc_url($url) ?>">
346
+ <i class="fab fa-facebook-f" aria-hidden="true"></i> <span><?php echo wpforo_phrase('Share') ?></span>
347
+ </span>
348
+ <?php else: ?>
349
+ <span class="wpf-sb-button wpf-sb-icon wpf-fb" data-wpfurl="<?php echo esc_url($url) ?>">
350
+ <i class="fab fa-facebook-f" aria-hidden="true"></i>
351
+ </span>
352
+ <?php endif; ?>
353
+ </div>
354
+ <?php
355
+ }
356
+ }
357
+
358
+ public function tw_wjs(){
359
+ ?>
360
+ <script type="text/javascript">window.twttr = (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0], t = window.twttr || {}; if (d.getElementById(id)) return t; js = d.createElement(s); js.id = id; js.src = "https://platform.twitter.com/widgets.js"; fjs.parentNode.insertBefore(js, fjs); t._e = []; t.ready = function(f) { t._e.push(f); }; return t;}(document, "script", "twitter-wjs"));</script>
361
+ <?php
362
+ }
363
+
364
+ public function tw_share_button( $url = '', $type = 'custom', $text = '' ){
365
+ if( !wpfval($this->options, 'sb', 'tw') ) return;
366
+ $url = ( $url ) ? $url : WPF()->current_url;
367
+ $n_url = strlen($url); $n_text = 280 - $n_url;
368
+ $text = ( $text ) ? $text : wpfval(WPF()->current_object,'og_text');
369
+ $text = urlencode( wpforo_text( strip_shortcodes( strip_tags($text) ), $n_text, false) );
370
+ if( $type == 'custom' ){ ?>
371
+ <a class="wpforo-share-button wpf-tw" href="https://twitter.com/intent/tweet?text=<?php echo $text ?>&url=<?php echo urlencode($url) ?>" title="<?php wpforo_phrase('Tweet this post'); ?>">
372
+ <?php if( $this->options['sb_icon'] == 'figure' ): ?>
373
+ <i class="fab fa-twitter" aria-hidden="true"></i>
374
+ <?php elseif( $this->options['sb_icon'] == 'square' ): ?>
375
+ <i class="fab fa-twitter-square" aria-hidden="true"></i>
376
+ <?php else: ?>
377
+ <i class="fab fa-twitter" aria-hidden="true"></i>
378
+ <?php endif; ?>
379
+ </a>
380
+ <?php
381
+ }
382
+ else{ ?>
383
+ <div class="wpf-sbw wpf-sbw-tw">
384
+ <?php if($this->options['sb_type'] == 'button_count'): ?>
385
+ <a href="https://twitter.com/share?ref_src=twsrc%5Etfw" class="twitter-share-button" data-lang="<?php $this->local('tw') ?>" data-show-count="true"><?php wpforo_phrase('Tweet'); ?></a>
386
+ <?php elseif($this->options['sb_type'] == 'button'): ?>
387
+ <a class="wpf-sb-button wpf-tw" href="https://twitter.com/intent/tweet?text=<?php echo $text ?>&url=<?php echo urlencode($url) ?>">
388
+ <i class="fab fa-twitter" aria-hidden="true"></i> <span><?php echo wpforo_phrase('Tweet') ?></span>
389
+ </a>
390
+ <?php else: ?>
391
+ <a class="wpf-sb-button wpf-sb-icon wpf-tw" href="https://twitter.com/intent/tweet?text=<?php echo $text ?>&url=<?php echo urlencode($url) ?>">
392
+ <i class="fab fa-twitter" aria-hidden="true"></i>
393
+ </a>
394
+ <?php endif; ?>
395
+ </div>
396
+ <?php
397
+ }
398
+ }
399
+
400
+ public function gg_js(){
401
+ ?>
402
+ <script src="https://apis.google.com/js/platform.js" async defer></script>
403
+ <?php
404
+ }
405
+
406
+ public function gg_share_button( $url = '', $type = 'custom', $text = '' ){
407
+ if( !wpfval($this->options, 'sb', 'gg') ) return;
408
+ $url = ( $url ) ? $url : WPF()->current_url;
409
+ $text = ( $text ) ? $text : wpfval(WPF()->current_object,'og_text');
410
+ if( $type == 'custom' ){ ?>
411
+ <a class="wpforo-share-button wpf-gg" href="//plus.google.com/share?app=110&amp;url=<?php echo urlencode($url) ?>" target="_blank" onclick="window.open(this.href,'','scrollbars=1,resizable=1,width=400,height=620');return false;" title="<?php wpforo_phrase('Share to Google+'); ?>">
412
+ <?php if( $this->options['sb_icon'] == 'figure' ): ?>
413
+ <i class="fab fa-google-plus-g" aria-hidden="true"></i>
414
+ <?php elseif( $this->options['sb_icon'] == 'square' ): ?>
415
+ <i class="fab fa-google-plus-square" aria-hidden="true"></i>
416
+ <?php else: ?>
417
+ <i class="fab fa-google-plus" aria-hidden="true"></i>
418
+ <?php endif; ?>
419
+ </a>
420
+ <?php
421
+ }
422
+ else{ ?>
423
+ <div class="wpf-sbw wpf-sbw-gg">
424
+ <?php if($this->options['sb_type'] == 'button_count'): ?>
425
+ <div class="g-plus" data-action="share" data-annotation="bubble"></div>
426
+ <?php elseif($this->options['sb_type'] == 'button'): ?>
427
+ <a class="wpf-sb-button wpf-gg" href="//plus.google.com/share?app=110&amp;url=<?php echo urlencode($url) ?>" target="_blank" onclick="window.open(this.href,'','scrollbars=1,resizable=1,width=400,height=620');return false;">
428
+ <i class="fab fa-google-plus-g" aria-hidden="true"></i> <span><?php echo wpforo_phrase('Share') ?></span>
429
+ </a>
430
+ <?php else: ?>
431
+ <a class="wpf-sb-button wpf-sb-icon wpf-gg" href="//plus.google.com/share?app=110&amp;url=<?php echo urlencode($url) ?>" target="_blank" onclick="window.open(this.href,'','scrollbars=1,resizable=1,width=400,height=620');return false;">
432
+ <i class="fab fa-google-plus-g" aria-hidden="true"></i>
433
+ </a>
434
+ <?php endif; ?>
435
+ </div>
436
+ <?php
437
+ }
438
+ }
439
+
440
+ public function vk_js(){
441
+ ?>
442
+ <script type="text/javascript" src="https://vk.com/js/api/share.js?95" charset="windows-1251"></script>
443
+ <?php
444
+ }
445
+
446
+ public function vk_share_button( $url = '', $type = 'custom', $text = '' ){
447
+ if( !wpfval($this->options, 'sb', 'vk') ) return;
448
+ $url = ( $url ) ? $url : WPF()->current_url;
449
+ $text = ( $text ) ? $text : wpfval(WPF()->current_object,'og_text');
450
+ $text = urlencode( wpforo_text( strip_shortcodes( strip_tags($text) ), 1000, false) );
451
+ if( $type == 'custom' ){ ?>
452
+ <a class="wpforo-share-button wpf-vk" onclick="return VK.Share.click(0, this);" href="https://vk.com/share.php?url=<?php echo urlencode($url) ?>&description=<?php echo $text ?>" title="<?php wpforo_phrase('Share to VK'); ?>" target="_blank">
453
+ <i class="fab fa-vk" aria-hidden="true"></i>
454
+ </a>
455
+ <?php
456
+ }
457
+ else{ ?>
458
+ <div class="wpf-sbw wpf-sbw-vk">
459
+ <?php if($this->options['sb_type'] == 'button_count'): ?>
460
+ <script type="text/javascript">document.write(VK.Share.button(false,{type: "round", text: "<?php wpforo_phrase('Share'); ?>"}));</script>
461
+ <?php elseif($this->options['sb_type'] == 'button'): ?>
462
+ <a class="wpf-sb-button wpf-vk" onclick="return VK.Share.click(0, this);" href="https://vk.com/share.php?url=<?php echo urlencode($url) ?>&description=<?php echo $text ?>" target="_blank">
463
+ <i class="fab fa-vk" aria-hidden="true"></i> <span><?php echo wpforo_phrase('Share') ?></span>
464
+ </a>
465
+ <?php else: ?>
466
+ <a class="wpf-sb-button wpf-sb-icon wpf-vk" onclick="return VK.Share.click(0, this);" href="https://vk.com/share.php?url=<?php echo urlencode($url) ?>&description=<?php echo $text ?>" target="_blank">
467
+ <i class="fab fa-vk" aria-hidden="true"></i>
468
+ </a>
469
+ <?php endif; ?>
470
+ </div>
471
+ <?php
472
+ }
473
+ }
474
+
475
+ public function ok_js(){
476
+
477
+ }
478
+
479
+ public function ok_share_button( $url = '', $type = 'custom', $text = '' ){
480
+ if( !wpfval($this->options, 'sb', 'ok') ) return;
481
+ $url = ( $url ) ? $url : WPF()->current_url;
482
+ if( preg_match('|\#post-(\d+)|s', $url, $a) ){ $pid = ( isset($a[1]) ) ? intval($a[1]) : mt_rand(100000, 999999); } else{ $pid = mt_rand(100000, 999999); }
483
+ $text = ( $text ) ? $text : wpfval(WPF()->current_object,'og_text');
484
+ $text = wpforo_text( strip_shortcodes( strip_tags($text) ), 1000, false);
485
+ if( $type == 'custom' ){ ?>
486
+ <a class="wpforo-share-button wpf-ok" href="https://connect.ok.ru/offer?url=<?php echo urlencode( $url ) ?>&description=<?php echo urlencode($text) ?>" title="<?php wpforo_phrase('Share to OK'); ?>" target="_blank" >
487
+ <?php if( $this->options['sb_icon'] == 'figure' ): ?>
488
+ <i class="fab fa-odnoklassniki" aria-hidden="true"></i>
489
+ <?php elseif( $this->options['sb_icon'] == 'square' ): ?>
490
+ <i class="fab fa-odnoklassniki-square" aria-hidden="true"></i>
491
+ <?php else: ?>
492
+ <i class="fab fa-odnoklassniki-square" aria-hidden="true"></i>
493
+ <?php endif; ?>
494
+ </a>
495
+ <?php
496
+ }
497
+ else{ ?>
498
+ <div class="wpf-sbw wpf-sbw-ok">
499
+ <?php if($this->options['sb_type'] == 'button_count'): ?>
500
+ <div id="<?php echo 'wpfokb_' . $pid ?>"></div>
501
+ <script>
502
+ !function (d, id, did, st, title, description, image) { var js = d.createElement("script"); js.src = "https://connect.ok.ru/connect.js"; js.onload = js.onreadystatechange = function () { if (!this.readyState || this.readyState == "loaded" || this.readyState == "complete") { if (!this.executed) { this.executed = true; setTimeout(function () { OK.CONNECT.insertShareWidget(id,did,st, title, description, image); }, 0); }}}; d.documentElement.appendChild(js);
503
+ }(document,"<?php echo 'wpfokb_' . $pid ?>","<?php echo esc_attr( $url ) ?>",'{"sz":20,"st":"straight","ck":2,"lang":"<?php echo $this->local('ok') ?>"}',"","","");
504
+ </script>
505
+ <?php elseif($this->options['sb_type'] == 'button'): ?>
506
+ <a class="wpf-sb-button wpf-ok" href="https://connect.ok.ru/offer?url=<?php echo urlencode( $url ) ?>&description=<?php echo urlencode($text) ?>" title="<?php wpforo_phrase('Share to OK'); ?>" target="_blank" >
507
+ <i class="fab fa-odnoklassniki" aria-hidden="true"></i> <span><?php echo wpforo_phrase('Share') ?></span>
508
+ </a>
509
+ <?php else: ?>
510
+ <a class="wpf-sb-button wpf-sb-icon wpf-ok" href="https://connect.ok.ru/offer?url=<?php echo urlencode( $url ) ?>&description=<?php echo urlencode($text) ?>" title="<?php wpforo_phrase('Share to OK'); ?>" target="_blank" >
511
+ <i class="fab fa-odnoklassniki" aria-hidden="true"></i>
512
+ </a>
513
+ <?php endif; ?>
514
+ </div>
515
+ <?php
516
+ }
517
+ }
518
+
519
+ public function share_toggle( $url = '', $text = '', $type = 'custom' ){
520
+ WPF()->api->fb_share_button($url, $type, $text);
521
+ WPF()->api->tw_share_button($url, $type, $text);
522
+ WPF()->api->gg_share_button($url, $type, $text);
523
+ WPF()->api->vk_share_button($url, $type, $text);
524
+ WPF()->api->ok_share_button($url, $type, $text);
525
+ }
526
+
527
+ public function share_buttons( $url = '', $type = 'default', $text = '' ){
528
+ WPF()->api->fb_share_button($url, $type, $text);
529
+ WPF()->api->tw_share_button($url, $type, $text);
530
+ WPF()->api->gg_share_button($url, $type, $text);
531
+ WPF()->api->vk_share_button($url, $type, $text);
532
+ WPF()->api->ok_share_button($url, $type, $text);
533
+ }
534
+
535
public function rc_enqueue() {
536
$theme = WPF()->tools_antispam['rc_theme'];
537
$site_key = WPF()->tools_antispam['rc_site_key'];
585
}
586
587
public function rc_verify() {
588
+ if( !WPF()->tools_antispam['rc_post_editor'] || !WPF()->tools_antispam['rc_topic_editor'] ){
589
+ if( wpfval($_POST, 'post','save') && !WPF()->tools_antispam['rc_post_editor'] ){
590
+ return true;
591
+ }
592
+ elseif( wpfval($_POST, 'topic', 'save') && !WPF()->tools_antispam['rc_topic_editor'] ){
593
+ return true;
594
+ }
595
+ }
596
$result = $this->rc_check();
597
if ( $result == 'success' ) {
598
return true;
604
}
605
606
public function rc_verify_wp_login( $user ) {
607
+ if ( !isset($_POST['log']) && !isset($_POST['pwd'])) return $user;
608
+ if( !WPF()->tools_antispam['rc_login_form'] || !WPF()->tools_antispam['rc_wpf_login_form'] ){
609
+ if( !wpfval($_POST, 'wpforologin') && !WPF()->tools_antispam['rc_login_form'] ){
610
+ return $user;
611
+ }
612
+ elseif( wpfval($_POST, 'wpforologin') && !WPF()->tools_antispam['rc_wpf_login_form'] ){
613
+ return $user;
614
+ }
615
+ }
616
$errors = is_wp_error($user) ? $user : new WP_Error();
617
$result = $this->rc_check();
618
if( $result != 'success' ) {
626
627
public function rc_verify_wp_register( $errors = '' ){
628
if ( !is_wp_error($errors) ) $errors = new WP_Error();
629
+ if( !WPF()->tools_antispam['rc_reg_form'] || !WPF()->tools_antispam['rc_wpf_reg_form'] ){
630
+ if( !wpfval($_POST, 'wpfreg') && !WPF()->tools_antispam['rc_reg_form'] ){
631
+ return $errors;
632
+ }
633
+ elseif( wpfval($_POST, 'wpfreg') && !WPF()->tools_antispam['rc_wpf_reg_form'] ){
634
+ return $errors;
635
+ }
636
+ }
637
$result = $this->rc_check();
638
if( $result != 'success' ) {
639
$errors->add('wpforo-recaptcha-error', $result);
643
644
public function rc_verify_wp_lostpassword( $errors = '' ){
645
if ( !is_wp_error($errors) ) $errors = new WP_Error();
646
+ if( !WPF()->tools_antispam['rc_lostpass_form'] || !WPF()->tools_antispam['rc_wpf_lostpass_form'] ){
647
+ if( !wpfval($_POST, 'wpfororp') && !WPF()->tools_antispam['rc_lostpass_form'] ){
648
+ return;
649
+ }
650
+ elseif( wpfval($_POST, 'wpfororp') && !WPF()->tools_antispam['rc_wpf_lostpass_form'] ){
651
+ return;
652
+ }
653
+ }
654
$result = $this->rc_check();
655
if( $result != 'success' ) {
656
if ( isset($_POST['wc_reset_password']) && isset($_POST['_wp_http_referer']) ) {
wpf-includes/class-cache.php CHANGED
@@ -20,8 +20,8 @@ class wpForoCache{
20
$this->dir = $cache_dir;
21
$this->lang = get_locale();
22
}
23
-
24
- public function get_key( $type = 'html' ){
25
if($type == 'html'){
26
$ug = WPF()->current_user_groupid;
27
return md5( preg_replace('|(.+)\#.+?$|is', '$1', $_SERVER['REQUEST_URI']) . $ug );
@@ -64,9 +64,9 @@ class wpForoCache{
64
}
65
}
66
67
- public function get( $key, $type = 'loop' ){
68
69
- $template = WPF()->current_object['template'];
70
$loop_templates = array('forum', 'topic', 'post');
71
if( $type == 'loop' && $template ){
72
if( $this->exists($key, $template) ){
@@ -152,7 +152,17 @@ class wpForoCache{
152
}
153
}
154
}
155
-
156
public function filter( $html = '' ){
157
//exit();
158
$html = preg_replace('|<div[\s\t]*id=\"wpf\-msg\-box\"|is', '<div style="display:none;"', $html);
@@ -202,6 +212,7 @@ class wpForoCache{
202
$postid = (isset($item['first_postid']) && $item['first_postid']) ? $item['first_postid'] : 0;
203
if( $postid ) $file = $this->dir . '/item/post/' . $postid . '_' . $this->lang; $this->clean_file( $file );
204
}
205
}
206
elseif( $template == 'post' || $template == 'post-soft' ){
207
$id = isset($id) ? $id : $postid;
@@ -217,6 +228,7 @@ class wpForoCache{
217
if( $id ){
218
$file = $this->dir . '/item/post/' . $id . '_' . $this->lang; $this->clean_file( $file );
219
}
220
}
221
elseif( $template == 'user' ){
222
//no cache//
@@ -280,5 +292,8 @@ class wpForoCache{
280
$this->clean_files( $directory );
281
}
282
}
283
-
284
}
20
$this->dir = $cache_dir;
21
$this->lang = get_locale();
22
}
23
+
24
+ public function get_key( $type = 'html' ){
25
if($type == 'html'){
26
$ug = WPF()->current_user_groupid;
27
return md5( preg_replace('|(.+)\#.+?$|is', '$1', $_SERVER['REQUEST_URI']) . $ug );
64
}
65
}
66
67
+ public function get( $key, $type = 'loop', $template = NULL ){
68
69
+ $template = ( $template ) ? $template : WPF()->current_object['template'];
70
$loop_templates = array('forum', 'topic', 'post');
71
if( $type == 'loop' && $template ){
72
if( $this->exists($key, $template) ){
152