wpForo Forum - Version 1.4.3

Version Description

| 09.12.2017 =

wpForo v1.4.3 Release Summary

IMPORTANT: If you have customized wpforo template files in WordPress active theme's /wpforo/ folder, please remove those before updating to 1.4.3 version. wpForo 1.4.3 doesn't support old template files.

  • Added: Boosted forum core. Works many folds faster. Forum OOP optimization.
  • Added: Facebook Login on Forum Login and Registration page
  • Added: Facebook API options in Settings > API's admin page.
  • Added: Emoji selector on topic/post editor toolbar
  • Added: Forum Usergroup colors
  • Added: Option to Disable User Custom Titles
  • Added: Option to manage recent topic and post text length in Extended Layout
  • Added: Multi-section popup notification for forum actions
  • Added: Forum members mentioning with @nicename
  • Added: User mentioning email customization options
  • Added: Allow change vote in Q&A forum layout
  • Added: Usergroup permissions for profile activity and subscriptions pages
  • Added: Better no-indexing control for forum login/register pages
  • Added: Forums > Tools > Misc | Option to set "dofollow" external domains
  • Added: Forums > Tools > Misc | Option to set noindex forum certain forum pages
  • Added: Do not count Categories in Forum Statistic
  • Added: Forum information in Profile Activity list
  • New Addon: wpForo Polls
  • New Addon: wpForo MyCRED Integration
  • Fixed Bug: Problem with private replies (not private on some servers)
  • Fixed Bug: Cannot disable forum User Synchronization message
  • Fixed Bug: Private last post on forum stat. Stat cache/reset issues.
  • Fixed Bug: Avatar and Header image not changed (cache problem)
  • Fixed Bug: Color / Style UX issues (cannot add color code, color number doc)
  • Fixed Bug: Profile fields background and font colors on dark style
  • Fixed Bug: Profile links disappeared (UM, BP, Woo)
  • Fixed Bug: Non-translate-able forum phrases in JS.
  • Fixed Bug: PHP Notices / Errors in RSS Feed
  • Fixed Bug: Online users statistic
  • Fixed Bug: Corrections of some phrases
  • Fixed Bug: RTL issues

NOTE: IF YOU UPDATE FROM 1.4.x

  • After wpForo update, if you see a message "wpForo - Update Database". Please click on [Update Database] button to complete update process. This is a data synchronization action, it doesn't delete forum data.
  • To load your customized colors please refresh forum front-end page twice.
  • If you have a Cache Plugin, please delete all caches after wpForo update.
  • If you use CDN and found some issue please purge it.

NOTE: IF YOU UPDATE FROM OLDER VERSIONS

  • If you have a customized copy of wpForo forum template files in your WP theme /wpforo/ folder please update them. wpForo 1.4.0 requires new forum template files.
  • If you see style issues after update, please refresh forum page twice or do Ctrl+F5 on forum front-end to load new styles.
  • If you have wpForo addons, please update them right after wpForo forum update. Don't update them before wpForo forum update.
  • In case you update forum and you have a large database, please make your forum faster using this instruction...
Download this release

Release Info

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

Code changes from version 1.4.2 to 1.4.3

Files changed (90) hide show
  1. readme.txt +105 -43
  2. wpf-admin/addons.php +2 -2
  3. wpf-admin/admin.php +20 -33
  4. wpf-admin/css/admin.css +1 -1
  5. wpf-admin/dashboard.php +7 -8
  6. wpf-admin/forum.php +10 -10
  7. wpf-admin/member.php +10 -10
  8. wpf-admin/moderation.php +2 -2
  9. wpf-admin/options-tabs/accesses.php +3 -3
  10. wpf-admin/options-tabs/api.php +95 -0
  11. wpf-admin/options-tabs/emails.php +128 -105
  12. wpf-admin/options-tabs/features.php +6 -6
  13. wpf-admin/options-tabs/forums.php +1 -1
  14. wpf-admin/options-tabs/general.php +13 -13
  15. wpf-admin/options-tabs/members.php +31 -22
  16. wpf-admin/options-tabs/posts.php +11 -11
  17. wpf-admin/options-tabs/styles.php +12 -12
  18. wpf-admin/options.php +7 -3
  19. wpf-admin/phrase.php +2 -2
  20. wpf-admin/themes.php +6 -6
  21. wpf-admin/tools-tabs/antispam.php +14 -14
  22. wpf-admin/tools-tabs/cleanup.php +5 -5
  23. wpf-admin/tools-tabs/misc.php +39 -0
  24. wpf-admin/tools.php +6 -2
  25. wpf-admin/usergroup.php +36 -8
  26. wpf-admin/xml/english.xml +4 -0
  27. wpf-assets/addons/mycred/header-off.png +0 -0
  28. wpf-assets/addons/mycred/header.png +0 -0
  29. wpf-assets/addons/polls/header-off.png +0 -0
  30. wpf-assets/addons/polls/header.png +0 -0
  31. wpf-assets/images/loading.gif +0 -0
  32. wpf-assets/images/sn/fb-m.jpg +0 -0
  33. wpf-assets/js/ajax.js +11 -6
  34. wpf-assets/js/frontend.js +12 -15
  35. wpf-assets/js/snfb.js +8 -0
  36. wpf-assets/js/tinymce-emoji.js +582 -0
  37. wpf-includes/class-api.php +172 -0
  38. wpf-includes/class-cache.php +12 -15
  39. wpf-includes/class-feed.php +9 -13
  40. wpf-includes/class-forums.php +107 -106
  41. wpf-includes/class-members.php +313 -327
  42. wpf-includes/class-moderation.php +44 -49
  43. wpf-includes/class-notices.php +89 -96
  44. wpf-includes/class-permissions.php +52 -54
  45. wpf-includes/class-phrases.php +36 -41
  46. wpf-includes/class-posts.php +118 -130
  47. wpf-includes/class-subscribes.php +29 -27
  48. wpf-includes/class-template.php +134 -115
  49. wpf-includes/class-topics.php +142 -135
  50. wpf-includes/class-usergroups.php +46 -41
  51. wpf-includes/functions-installation.php +134 -84
  52. wpf-includes/functions-template.php +127 -143
  53. wpf-includes/functions.php +173 -116
  54. wpf-includes/install-sql.php +40 -33
  55. wpf-includes/wpf-actions.php +161 -136
  56. wpf-includes/wpf-hooks.php +433 -401
  57. wpf-includes/wpf-phrases.php +10 -6
  58. wpf-languages/wpforo-he_IL.mo +0 -0
  59. wpf-languages/wpforo-he_IL.po +3830 -3298
  60. wpf-languages/wpforo.pot +549 -300
  61. wpf-themes/classic/colors.css +21 -12
  62. wpf-themes/classic/footer.php +7 -7
  63. wpf-themes/classic/functions.php +58 -35
  64. wpf-themes/classic/header.php +9 -9
  65. wpf-themes/classic/index.php +46 -45
  66. wpf-themes/classic/layouts/1/forum.php +8 -8
  67. wpf-themes/classic/layouts/1/post.php +12 -13
  68. wpf-themes/classic/layouts/1/topic.php +7 -7
  69. wpf-themes/classic/layouts/2/forum.php +7 -7
  70. wpf-themes/classic/layouts/2/post.php +13 -12
  71. wpf-themes/classic/layouts/2/topic.php +8 -6
  72. wpf-themes/classic/layouts/3/forum.php +8 -8
  73. wpf-themes/classic/layouts/3/post.php +23 -24
  74. wpf-themes/classic/layouts/3/topic.php +4 -4
  75. wpf-themes/classic/login.php +50 -32
  76. wpf-themes/classic/members.php +14 -17
  77. wpf-themes/classic/profile-account.php +2 -2
  78. wpf-themes/classic/profile-activity.php +14 -4
  79. wpf-themes/classic/profile-home.php +6 -6
  80. wpf-themes/classic/profile-subscriptions.php +7 -7
  81. wpf-themes/classic/profile.php +25 -23
  82. wpf-themes/classic/recent.php +18 -12
  83. wpf-themes/classic/register.php +12 -5
  84. wpf-themes/classic/search.php +8 -8
  85. wpf-themes/classic/style-rtl.css +27 -20
  86. wpf-themes/classic/style.css +65 -23
  87. wpf-themes/classic/styles/css.php +21 -12
  88. wpf-themes/classic/widgets-rtl.css +9 -0
  89. wpf-themes/classic/widgets.css +9 -0
  90. wpforo.php +186 -97
readme.txt CHANGED
@@ -1,18 +1,24 @@
1
- === wpForo Forum ===
2
Contributors: gVectors Team
3
Tags: forums, forum, forum plugin, community, discussion, WordPress forum plugin
4
Requires at least: 4.1
5
Tested up to: 4.9
6
- Stable tag: 1.4.2
7
License: GPLv2 or later
8
License URI: https://www.gnu.org/licenses/gpl-2.0.html
9
10
- First professional forum plugin for WordPress. Full-fledged forum solution with modern and mobile responsive design. Take your forum to next level!
11
12
== Description ==
13
14
The Best WordPress forum plugin made by [gVectors Team](https://gvectors.com/). Everything you need to run an efficient and professional community. Powerful and beautiful forum with unique features.
15
16
Support Forum and Demo: [https://wpforo.com/community/](https://wpforo.com/community/)
17
Forum Documentation: [https://wpforo.com/documentation/](https://wpforo.com/documentation/)
18
@@ -20,11 +26,8 @@ Forum Documentation: [https://wpforo.com/documentation/](https://wpforo.com/docu
20
= Forums can be displayed with three different layouts =
21
22
1. [**Extended Layout:**](https://wpforo.com/docs/categories-and-forums/forum-layouts/extended-layout/)
23
- Classic forum layout with an unique feature to show one level deeper information. You can see latest topics of each forum on Forum List and latest posts of each topic on Topic List.
24
2. [**Simplified Layout:**](https://wpforo.com/docs/categories-and-forums/forum-layouts/simplified-layout/)
25
- Light, modern and beautiful forum layout with topic and post author avatars on forum and topic lists.
26
3. [**Question and Answer Layout:**](https://wpforo.com/docs/categories-and-forums/forum-layouts/question-answer-layout/)
27
- Complete Question & Answers discussion board for professional support and for communities similar to Stack Overflow. Perfect platform for users to ask and answer questions, and, through membership and active participation, to vote up or down.
28
29
= Available Translations =
30
@@ -64,15 +67,9 @@ Complete Question & Answers discussion board for professional support and for co
64
* WordPress .MO/.PO translation files.
65
* Easy to migrate with [Go2wpForo](https://wpforo.com/community/migrate-to-wpforo-from-other-forum-plugins/migrate-to-wpforo-go2wpforo-tool/) tool.
66
67
68
- = wpForo Addons =
69
-
70
- * | [wpForo - Embeds](https://gvectors.com/product/wpforo-embeds/)
71
- * | [wpForo - Ads Manager](https://gvectors.com/product/wpforo-ad-manager/)
72
- * | [wpForo - Private Messages](https://gvectors.com/product/wpforo-private-messages/)
73
- * | [wpForo - User Cutom Fields](https://gvectors.com/product/wpforo-user-custom-fields/)
74
- * | [wpForo - Blog Cross Posting](https://gvectors.com/product/wpforo-cross-posting/)
75
- * | [wpForo - Advanced Attachments](https://gvectors.com/product/wpforo-advanced-attachments/)
76
77
78
== Installation ==
@@ -85,29 +82,55 @@ Complete Question & Answers discussion board for professional support and for co
85
86
== Frequently Asked Questions ==
87
88
- = Getting Started =
89
90
91
- 1. **Forum Page:** wpForo creates a page with `/community/` slug. If this slug is used you'll have `/community-2/` or `/community-3/` slug. You can find the correct one in Forums > Settings > General Tab. Make sure you use WordPress permalinks. wpForo doesn't work with default `?p=1` URL structure.
92
93
- 2. **Change Forum Page:**
94
- https://wpforo.com/docs/root/getting-started/forum-page/change-forum-page/
95
96
- 3. **Forum Menu:**
97
- https://wpforo.com/docs/root/getting-started/forum-menu/
98
99
- 4. **Forum Sidebar and Widgets:**
100
- https://wpforo.com/docs/root/getting-started/forum-sidebar-and-widgets/
101
102
- 5. **Forum Management:** https://wpforo.com/docs/root/categories-and-forums/forum-manager/
103
104
- 6. **Forum Style & Colors:**
105
- https://wpforo.com/docs/root/wpforo-settings/style-settings/
106
107
- 7. **wpForo Forum Shortcodes**
108
- https://wpforo.com/community/faq/wpforo-shortcodes/
109
110
- wpForo Support Forum: <https://wpforo.com/community/>
111
112
== Screenshots ==
113
@@ -131,6 +154,60 @@ wpForo Support Forum: <https://wpforo.com/community/>
131
132
== Changelog ==
133
134
= 1.4.2 | 22.10.2017 =
135
136
[wpForo v1.4.2 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-4-2-is-released/)
@@ -144,21 +221,6 @@ wpForo Support Forum: <https://wpforo.com/community/>
144
* Fixed Bug: Login/Register pop-up window when guest clicks on Add Topic button
145
146
147
- NOTE: IF YOU UPDATE FROM 1.4.1
148
-
149
- - After wpForo update, you'll see a message "wpForo - Update Database". Please click on [Update Database] button to complete update process. This is a data synchronization action, it doesn't delete forum data.
150
- - To load your customized colors please refresh forum front-end page twice.
151
- - If you have a Cache Plugin, please delete all caches after wpForo update.
152
- - If you use CDN and found some issue please purge it.
153
-
154
- NOTE: IF YOU UPDATE FROM OLDER VERSIONS
155
-
156
- - If you have a customized copy of wpForo forum template files in your WP theme /wpforo/ folder please update them. wpForo 1.4.0 requires new forum template files.
157
- - If you see style issues after update, please refresh forum page twice or do Ctrl+F5 on forum front-end to load new styles.
158
- - If you have wpForo addons, please update them right after wpForo forum update. Don't update them before wpForo forum update.
159
- - In case you update forum and you have a large database, please make your forum faster [using this instruction...](https://wpforo.com/community/faq/forum-is-slow/)
160
-
161
-
162
= 1.4.1 | 12.10.2017 =
163
164
[wpForo v1.4.1 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-4-1-is-released/)
1
+ === Forums - wpForo ===
2
Contributors: gVectors Team
3
Tags: forums, forum, forum plugin, community, discussion, WordPress forum plugin
4
Requires at least: 4.1
5
Tested up to: 4.9
6
+ Stable tag: 1.4.3
7
+ Requires PHP: 5.5 and higher
8
License: GPLv2 or later
9
License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
11
+ Number one forum plugin for WordPress. Full-fledged forum solution with modern and mobile responsive design. Take your forum to next level!
12
13
== Description ==
14
15
The Best WordPress forum plugin made by [gVectors Team](https://gvectors.com/). Everything you need to run an efficient and professional community. Powerful and beautiful forum with unique features.
16
17
+ Just 5 minutes Installation and Configuration
18
+ 1. Activate wpForo and find forum on yoursite.com/community/ page
19
+ 2. Create new Forums in Dashboard > Forums > Forums admin page
20
+ 3. If the default colors don't fit your theme, navigate to Dashboard > Forums > Settings > Styles admin page and change forum color style.
21
+
22
Support Forum and Demo: [https://wpforo.com/community/](https://wpforo.com/community/)
23
Forum Documentation: [https://wpforo.com/documentation/](https://wpforo.com/documentation/)
24
26
= Forums can be displayed with three different layouts =
27
28
1. [**Extended Layout:**](https://wpforo.com/docs/categories-and-forums/forum-layouts/extended-layout/)
29
2. [**Simplified Layout:**](https://wpforo.com/docs/categories-and-forums/forum-layouts/simplified-layout/)
30
3. [**Question and Answer Layout:**](https://wpforo.com/docs/categories-and-forums/forum-layouts/question-answer-layout/)
31
32
= Available Translations =
33
67
* WordPress .MO/.PO translation files.
68
* Easy to migrate with [Go2wpForo](https://wpforo.com/community/migrate-to-wpforo-from-other-forum-plugins/migrate-to-wpforo-go2wpforo-tool/) tool.
69
70
+ = Need more features? =
71
72
+ Find wpForo forum plugin adons on [gVectors Team website...](https://gvectors.com/product-category/wpforo/)
73
74
75
== Installation ==
82
83
== Frequently Asked Questions ==
84
85
+ = Getting Started - Forum Page =
86
+
87
+ **Forum Page** - wpForo creates a forum page with `/community/` slug. Forum URL can be changed in Dashboard > Forums > Settings > General Tab. Make sure you use WordPress permalinks. wpForo forums don't work with default `?p=1` URL structure. Forum page only contains [wpforo] forum shortcode. [Forum doc >](https://wpforo.com/docs/root/getting-started/forum-page/)
88
+
89
+ = Forum Menu =
90
+
91
+ **Forum Menu** - wpForo forum menu is a regular WordPress menu. In Dashboard > Appearance > Menu admin page wpForo forum creates new navigation menu (forum top menu bar) called "wpForo Navigation (wpForo Menu)". Forum menu is attached to wpForo Menu location. [Forum doc >](https://wpforo.com/docs/root/getting-started/forum-menu/)
92
+
93
+ = Forum Sidebar =
94
+
95
+ **Forum Sidebar and Widgets** - wpForo forum comes with own right (RTL left) sidebar and widgets (Recent Forum Topics, Recent Forum Posts, Forum Search, Forum Online Users). [Forum doc >](https://wpforo.com/docs/root/getting-started/forum-sidebar-and-widgets/)
96
+
97
+ = Forum Layouts =
98
+
99
+ **Forum Layouts** - wpForo Forums has Forum Layouts and allows to create hybrid forums. wpForo theme has built in multi-layout system. Each forum section (category with forums and subForums) can be displayed with different forum layout. [Forum doc >](https://wpforo.com/docs/root/categories-and-forums/forum-layouts/)
100
+
101
+ = Forum Manager =
102
+
103
+ **Forum Manager** - You can add new category, forum or subForum in Dashboard > Forums > Forums admin page. The Forum add / Forum edit / Forum Delete / Forum Hierarchy cn be managed on the same admin page. [Forum doc >](https://wpforo.com/docs/root/categories-and-forums/forum-manager/)
104
105
+ = Forum Shortcodes =
106
107
+ **Forum Shortcodes** - Started from version 1.0.0 you can use wpForo shortcodes. [Forum doc >](https://wpforo.com/docs/root/getting-started/forum-page/wpforo-shortcodes/)
108
109
+ = Forum Styles =
110
111
+ **Forum Styles** - Please navigate to Dashboard > Forums > Settings > Styles admin page. Here you can find wpForo forum front-end colors and styles. You can choose forum colors: default (blue), red, green, orange, grey, dark. You can select forum color set or customize each color manually. [Forum doc >](https://wpforo.com/docs/root/wpforo-settings/style-settings/)
112
113
+ = Forum Member =
114
115
+ **Forum Member** - Forum Members are the same WordPress users. wpForo forums is fully integrated with WordPress. It comes with own Forum Login and Forum Registration page. Users get an advanced Forum Profile. You can manage all members in Dashboard > Forums > Members admin page. [Forum doc >](https://wpforo.com/docs/root/members/member-manager/)
116
117
+ = Forum Reputation =
118
+
119
+ **Forum Member Badges and Reputation** - wpForo forum has a simple yet powerful user reputation system. Currently it based on number of forum posts. [Forum doc >](https://wpforo.com/docs/root/members/member-reputation/)
120
+
121
+ = Forum Accesses =
122
+
123
+ **Forum Access and Permissions** - Forum Accesses are different sets of forum permissions (CAN's) designed to help forum admins control (allow/restrict) Users' actions in each forum. [Forum doc >](https://wpforo.com/docs/root/wpforo-settings/forum-accesses/)
124
+
125
+ = Forum Usergroups =
126
+
127
+ **Forum Usergroups and Permissions** - In order to have an extended forum user permission system with full control over all forum user actions, wpForo comes with own Forum Usergroup system. [Forum doc >](https://wpforo.com/docs/root/members/usergroups-and-permissions/)
128
+
129
+ = Forum Translation =
130
+
131
+ **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. [Forum doc >](https://wpforo.com/docs/root/translation/how-to-translate/)
132
133
134
135
== Screenshots ==
136
154
155
== Changelog ==
156
157
+ = 1.4.3 | 09.12.2017 =
158
+
159
+ [wpForo v1.4.3 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-4-3-is-released/)
160
+
161
+ IMPORTANT: If you have customized wpforo template files in WordPress active theme's /wpforo/ folder, please remove those before updating to 1.4.3 version. wpForo 1.4.3 doesn't support old template files.
162
+
163
+ * Added: Boosted forum core. Works many folds faster. Forum OOP optimization.
164
+ * Added: Facebook Login on Forum Login and Registration page
165
+ * Added: Facebook API options in Settings > API's admin page.
166
+ * Added: Emoji selector on topic/post editor toolbar
167
+ * Added: Forum Usergroup colors
168
+ * Added: Option to Disable User Custom Titles
169
+ * Added: Option to manage recent topic and post text length in Extended Layout
170
+ * Added: Multi-section popup notification for forum actions
171
+ * Added: Forum members mentioning with @nicename
172
+ * Added: User mentioning email customization options
173
+ * Added: Allow change vote in Q&A forum layout
174
+ * Added: Usergroup permissions for profile activity and subscriptions pages
175
+ * Added: Better no-indexing control for forum login/register pages
176
+ * Added: Forums > Tools > Misc | Option to set "dofollow" external domains
177
+ * Added: Forums > Tools > Misc | Option to set noindex forum certain forum pages
178
+ * Added: Do not count Categories in Forum Statistic
179
+ * Added: Forum information in Profile Activity list
180
+ * New Addon: [wpForo Polls](https://gvectors.com/product/wpforo-polls/)
181
+ * New Addon: [wpForo MyCRED Integration](https://gvectors.com/product/wpforo-mycred/)
182
+ * Fixed Bug: Problem with private replies (not private on some servers)
183
+ * Fixed Bug: Cannot disable forum User Synchronization message
184
+ * Fixed Bug: Private last post on forum stat. Stat cache/reset issues.
185
+ * Fixed Bug: Avatar and Header image not changed (cache problem)
186
+ * Fixed Bug: Color / Style UX issues (cannot add color code, color number doc)
187
+ * Fixed Bug: Profile fields background and font colors on dark style
188
+ * Fixed Bug: Profile links disappeared (UM, BP, Woo)
189
+ * Fixed Bug: Non-translate-able forum phrases in JS.
190
+ * Fixed Bug: PHP Notices / Errors in RSS Feed
191
+ * Fixed Bug: Online users statistic
192
+ * Fixed Bug: Corrections of some phrases
193
+ * Fixed Bug: RTL issues
194
+
195
+
196
+ NOTE: IF YOU UPDATE FROM 1.4.x
197
+
198
+ - After wpForo update, if you see a message "wpForo - Update Database". Please click on [Update Database] button to complete update process. This is a data synchronization action, it doesn't delete forum data.
199
+ - To load your customized colors please refresh forum front-end page twice.
200
+ - If you have a Cache Plugin, please delete all caches after wpForo update.
201
+ - If you use CDN and found some issue please purge it.
202
+
203
+ NOTE: IF YOU UPDATE FROM OLDER VERSIONS
204
+
205
+ - If you have a customized copy of wpForo forum template files in your WP theme /wpforo/ folder please update them. wpForo 1.4.0 requires new forum template files.
206
+ - If you see style issues after update, please refresh forum page twice or do Ctrl+F5 on forum front-end to load new styles.
207
+ - If you have wpForo addons, please update them right after wpForo forum update. Don't update them before wpForo forum update.
208
+ - In case you update forum and you have a large database, please make your forum faster [using this instruction...](https://wpforo.com/community/faq/forum-is-slow/)
209
+
210
+
211
= 1.4.2 | 22.10.2017 =
212
213
[wpForo v1.4.2 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-4-2-is-released/)
221
* Fixed Bug: Login/Register pop-up window when guest clicks on Add Topic button
222
223
224
= 1.4.1 | 12.10.2017 =
225
226
[wpForo v1.4.1 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-4-1-is-released/)
wpf-admin/addons.php CHANGED
@@ -3,7 +3,7 @@
3
if( !defined( 'ABSPATH' ) ) exit;
4
if( !current_user_can('administrator') ) exit;
5
6
- $wpforo->notice->refreshAddonPage(); $wpforo->notice->dismissAddonNoteOnPage();
7
8
?>
9
@@ -38,7 +38,7 @@
38
<br style="clear:both">
39
<div class="wpforo-addons-wrapper">
40
<?php
41
- foreach ($wpforo->addons as $key => $addon) {
42
$installed = (class_exists($addon['class'])) ? true : false;
43
?>
44
<div class="wpforo-addon-block">
3
if( !defined( 'ABSPATH' ) ) exit;
4
if( !current_user_can('administrator') ) exit;
5
6
+ WPF()->notice->refreshAddonPage(); WPF()->notice->dismissAddonNoteOnPage();
7
8
?>
9
38
<br style="clear:both">
39
<div class="wpforo-addons-wrapper">
40
<?php
41
+ foreach (WPF()->addons as $key => $addon) {
42
$installed = (class_exists($addon['class'])) ? true : false;
43
?>
44
<div class="wpforo-addon-block">
wpf-admin/admin.php CHANGED
@@ -4,92 +4,79 @@
4
if( !defined( 'ABSPATH' ) ) exit;
5
6
function wpforo_add_menu(){
7
- global $wpforo;
8
-
9
- $wpforo->moderation->spam_attachment();
10
11
$all_count = 0;
12
- $mod_count = $wpforo->post->unapproved_count(); $mod_count_num = intval($mod_count);
13
$mod_count = ( $mod_count ) ? ' <span class="awaiting-mod count-1"><span class="pending-count">' . intval($mod_count) . '</span></span> ' : '' ;
14
- $ban_count = $wpforo->member->banned_count(); $ban_count_num = intval($ban_count);
15
$ban_count = ( $ban_count ) ? ' <span class="awaiting-mod count-1"><span class="pending-count">' . intval($ban_count) . '</span></span> ' : '' ;
16
$all_count = $mod_count_num + $ban_count_num;
17
$all_count = ( $all_count ) ? ' <span class="awaiting-mod count-1"><span class="pending-count">' . intval($all_count) . '</span></span> ' : '' ;
18
19
- $position = ( isset($wpforo->general_options['menu_position']) && $wpforo->general_options['menu_position'] > 0 ) ? $wpforo->general_options['menu_position'] : 23;
20
- if( $wpforo->current_user_groupid == 1 ||
21
- $wpforo->current_user_groupid == 2 ||
22
- $wpforo->perm->usergroup_can('vm') ||
23
- ( $wpforo->perm->usergroup_can('cf') &&
24
- $wpforo->perm->usergroup_can('ef') &&
25
- $wpforo->perm->usergroup_can('df') )
26
) add_menu_page(__('Dashboard', 'wpforo'), __('Forums', 'wpforo') . $all_count , 'read', 'wpforo-community', 'wpforo_toplevel_page', 'dashicons-format-chat', $position);
27
- if( $wpforo->current_user_groupid == 1 || $wpforo->current_user_groupid == 2 ) add_submenu_page('wpforo-community', __('Dashboard', 'wpforo'), __('Dashboard', 'wpforo'), 'read', 'wpforo-community', 'wpforo_toplevel_page' );
28
- if( $wpforo->perm->usergroup_can('cf') && $wpforo->perm->usergroup_can('ef') && $wpforo->perm->usergroup_can('df') ) add_submenu_page('wpforo-community', __('Forums', 'wpforo'), __('Forums', 'wpforo'), 'read', 'wpforo-forums', 'wpforo_forum_menu');
29
- if( $wpforo->current_user_groupid == 1 ) add_submenu_page('wpforo-community', __('Settings', 'wpforo'), __('Settings', 'wpforo'), 'read', 'wpforo-settings', 'wpforo_settings');
30
- if( $wpforo->current_user_groupid == 1 ) add_submenu_page('wpforo-community', __('Tools', 'wpforo'), __('Tools', 'wpforo'), 'read', 'wpforo-tools', 'wpforo_tools');
31
- if( $wpforo->perm->usergroup_can('aum') ) add_submenu_page('wpforo-community', __('Moderation', 'wpforo'), __('Moderation' , 'wpforo') . $mod_count, 'read', 'wpforo-moderations', 'wpforo_moderations');
32
- if( $wpforo->perm->usergroup_can('vm') ) add_submenu_page('wpforo-community', __('Members', 'wpforo'), __('Members', 'wpforo') . $ban_count, 'read', 'wpforo-members', 'wpforo_member_menu');
33
- if( $wpforo->current_user_groupid == 1 ) add_submenu_page('wpforo-community', __('Usergroups', 'wpforo'), __('Usergroups', 'wpforo'), 'read', 'wpforo-usergroups', 'wpforo_usergroups_menu');
34
- if( $wpforo->current_user_groupid == 1 ) add_submenu_page('wpforo-community', __('Phrases', 'wpforo'), __('Phrases', 'wpforo'), 'read', 'wpforo-phrases', 'wpforo_phrases');
35
- if( $wpforo->current_user_groupid == 1 ) add_submenu_page('wpforo-community', __('Themes', 'wpforo'), __('Themes', 'wpforo'), 'read', 'wpforo-themes', 'wpforo_themes');
36
- if( $wpforo->current_user_groupid == 1 ) add_submenu_page('wpforo-community', __('Addons', 'wpforo'), __('Addons', 'wpforo'), 'read', 'wpforo-addons', 'wpforo_addons');
37
//exit();
38
}
39
add_action('admin_menu', 'wpforo_add_menu', 39);
40
41
function wpforo_toplevel_page(){
42
- global $wpforo;
43
require( WPFORO_DIR . '/wpf-admin/dashboard.php' );
44
}
45
46
function wpforo_forum_menu(){
47
- global $wpforo;
48
require( WPFORO_DIR . '/wpf-admin/forum.php' );
49
}
50
51
function wpforo_member_menu(){
52
- global $wpforo;
53
require( WPFORO_DIR . '/wpf-admin/member.php' );
54
}
55
56
function wpforo_usergroups_menu(){
57
- global $wpforo;
58
require( WPFORO_DIR . '/wpf-admin/usergroup.php' );
59
}
60
61
function wpforo_settings(){
62
- global $wpforo, $wpdb;
63
require( WPFORO_DIR . '/wpf-admin/options.php' );
64
}
65
66
function wpforo_themes(){
67
- global $wpforo;
68
require( WPFORO_DIR . '/wpf-admin/themes.php' );
69
}
70
71
function wpforo_phrases(){
72
- global $wpforo;
73
require( WPFORO_DIR . '/wpf-admin/phrase.php' );
74
}
75
76
function wpforo_integrations(){
77
- global $wpforo;
78
require( WPFORO_DIR . '/wpf-admin/integration.php' );
79
}
80
81
function wpforo_addons(){
82
- global $wpforo;
83
require( WPFORO_DIR . '/wpf-admin/addons.php' );
84
}
85
86
function wpforo_tools(){
87
- global $wpforo;
88
require( WPFORO_DIR . '/wpf-admin/tools.php' );
89
}
90
91
function wpforo_moderations(){
92
- global $wpforo;
93
require( WPFORO_DIR . '/wpf-admin/moderation.php' );
94
}
95
?>
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);
13
$ban_count = ( $ban_count ) ? ' <span class="awaiting-mod count-1"><span class="pending-count">' . intval($ban_count) . '</span></span> ' : '' ;
14
$all_count = $mod_count_num + $ban_count_num;
15
$all_count = ( $all_count ) ? ' <span class="awaiting-mod count-1"><span class="pending-count">' . intval($all_count) . '</span></span> ' : '' ;
16
17
+ $position = ( isset(WPF()->general_options['menu_position']) && WPF()->general_options['menu_position'] > 0 ) ? WPF()->general_options['menu_position'] : 23;
18
+ if( WPF()->current_user_groupid == 1 ||
19
+ WPF()->current_user_groupid == 2 ||
20
+ WPF()->perm->usergroup_can('vm') ||
21
+ ( WPF()->perm->usergroup_can('cf') &&
22
+ WPF()->perm->usergroup_can('ef') &&
23
+ WPF()->perm->usergroup_can('df') )
24
) add_menu_page(__('Dashboard', 'wpforo'), __('Forums', 'wpforo') . $all_count , 'read', 'wpforo-community', 'wpforo_toplevel_page', 'dashicons-format-chat', $position);
25
+ if( WPF()->current_user_groupid == 1 || WPF()->current_user_groupid == 2 ) add_submenu_page('wpforo-community', __('Dashboard', 'wpforo'), __('Dashboard', 'wpforo'), 'read', 'wpforo-community', 'wpforo_toplevel_page' );
26
+ if( WPF()->perm->usergroup_can('cf') && WPF()->perm->usergroup_can('ef') && WPF()->perm->usergroup_can('df') ) add_submenu_page('wpforo-community', __('Forums', 'wpforo'), __('Forums', 'wpforo'), 'read', 'wpforo-forums', 'wpforo_forum_menu');
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
39
function wpforo_toplevel_page(){
40
require( WPFORO_DIR . '/wpf-admin/dashboard.php' );
41
}
42
43
function wpforo_forum_menu(){
44
require( WPFORO_DIR . '/wpf-admin/forum.php' );
45
}
46
47
function wpforo_member_menu(){
48
require( WPFORO_DIR . '/wpf-admin/member.php' );
49
}
50
51
function wpforo_usergroups_menu(){
52
require( WPFORO_DIR . '/wpf-admin/usergroup.php' );
53
}
54
55
function wpforo_settings(){
56
require( WPFORO_DIR . '/wpf-admin/options.php' );
57
}
58
59
function wpforo_themes(){
60
require( WPFORO_DIR . '/wpf-admin/themes.php' );
61
}
62
63
function wpforo_phrases(){
64
require( WPFORO_DIR . '/wpf-admin/phrase.php' );
65
}
66
67
function wpforo_integrations(){
68
require( WPFORO_DIR . '/wpf-admin/integration.php' );
69
}
70
71
function wpforo_addons(){
72
require( WPFORO_DIR . '/wpf-admin/addons.php' );
73
}
74
75
function wpforo_tools(){
76
require( WPFORO_DIR . '/wpf-admin/tools.php' );
77
}
78
79
function wpforo_moderations(){
80
require( WPFORO_DIR . '/wpf-admin/moderation.php' );
81
}
82
?>
wpf-admin/css/admin.css CHANGED
@@ -182,7 +182,7 @@
182
/**************************/
183
184
.wpforo-style-color-wrapper{ width:130px; float:left; }
185
- .wpforo-style-field{ height:29px;}
186
.wpforo-style-field input{}
187
.wp-picker-container input.wp-color-picker[type="text"]{ vertical-align:top; }
188
.wpforo-style-color{ display:block; color:#333333; font-weight:bold; text-align:center; float:left; width:23px; padding:0px 5px; margin-right:5px; border:#CCCCCC 1px solid; text-align:center; }
182
/**************************/
183
184
.wpforo-style-color-wrapper{ width:130px; float:left; }
185
+ .wpforo-style-field{ height:auto; min-height:31px;}
186
.wpforo-style-field input{}
187
.wp-picker-container input.wp-color-picker[type="text"]{ vertical-align:top; }
188
.wpforo-style-color{ display:block; color:#333333; font-weight:bold; text-align:center; float:left; width:23px; padding:0px 5px; margin-right:5px; border:#CCCCCC 1px solid; text-align:center; }
wpf-admin/dashboard.php CHANGED
@@ -1,13 +1,11 @@
1
<?php
2
// Exit if accessed directly
3
if( !defined( 'ABSPATH' ) ) exit;
4
-
5
- global $wpforo;
6
?>
7
8
<div id="wpf-admin-wrap" class="wrap">
9
<h1 style="padding:30px 0px 10px 0px;"><?php _e('wpForo Dashboard', 'wpforo'); ?></h1>
10
- <?php $wpforo->notice->show(FALSE) ?>
11
12
13
<div id="dashboard-widgets-wrap" style="padding-top:10px;">
@@ -93,7 +91,7 @@
93
</tr>
94
<tr class="wpf-dw-tr">
95
<td class="wpf-dw-td">MySQL Version</td>
96
- <td class="wpf-dw-td-value"><?php echo $wpforo->db->db_version(); ?></td>
97
</tr>
98
<tr class="wpf-dw-tr">
99
<td class="wpf-dw-td">PHP Max Post Size</td>
@@ -111,12 +109,13 @@
111
<td class="wpf-dw-td">PHP DateTime Class</td>
112
<td class="wpf-dw-td-value"><?php echo (class_exists('DateTime') && class_exists('DateTimeZone')) ? '<span class="wpf-green">' . __('Available', 'wpforo') . '</span>' : '<span class="wpf-red">' . __('Not available', 'wpforo') . '</span> | <a href="http://php.net/manual/en/datetime.installation.php" target="_blank">more info&raquo;</a>'; ?> </td>
113
</tr>
114
</table>
115
</div>
116
</div>
117
</div><!-- widget / postbox -->
118
119
- <?php do_action( 'wpforo_dashboard_widgets_col1', $wpforo ); ?>
120
121
</div><!-- normal-sortables -->
122
</div><!-- wpforo_postbox_container -->
@@ -133,7 +132,7 @@
133
<div class="inside">
134
<div class="main">
135
<table style="width:98%; margin:0px auto; text-align:left;">
136
- <?php $statistic = $wpforo->statistic(); ?>
137
<tr class="wpf-dw-tr">
138
<td class="wpf-dw-td"><?php _e('Forums', 'wpforo'); ?></td>
139
<td class="wpf-dw-td-value"><?php echo intval($statistic['forums']) ?></td>
@@ -213,7 +212,7 @@
213
</div>
214
</div><!-- widget / postbox -->
215
216
- <?php do_action( 'wpforo_dashboard_widgets_col2', $wpforo ); ?>
217
218
</div><!-- normal-sortables -->
219
</div><!-- wpforo_postbox_container -->
@@ -222,7 +221,7 @@
222
<div class="postbox-container" id="postbox-container-3">
223
<div class="meta-box-sortables ui-sortable" id="normal-sortables">
224
225
- <?php do_action( 'wpforo_dashboard_widgets_col3', $wpforo ); ?>
226
227
</div><!-- normal-sortables -->
228
</div><!-- wpforo_postbox_container -->
1
<?php
2
// Exit if accessed directly
3
if( !defined( 'ABSPATH' ) ) exit;
4
?>
5
6
<div id="wpf-admin-wrap" class="wrap">
7
<h1 style="padding:30px 0px 10px 0px;"><?php _e('wpForo Dashboard', 'wpforo'); ?></h1>
8
+ <?php WPF()->notice->show(FALSE) ?>
9
10
11
<div id="dashboard-widgets-wrap" style="padding-top:10px;">
91
</tr>
92
<tr class="wpf-dw-tr">
93
<td class="wpf-dw-td">MySQL Version</td>
94
+ <td class="wpf-dw-td-value"><?php echo WPF()->db->db_version(); ?></td>
95
</tr>
96
<tr class="wpf-dw-tr">
97
<td class="wpf-dw-td">PHP Max Post Size</td>
109
<td class="wpf-dw-td">PHP DateTime Class</td>
110
<td class="wpf-dw-td-value"><?php echo (class_exists('DateTime') && class_exists('DateTimeZone')) ? '<span class="wpf-green">' . __('Available', 'wpforo') . '</span>' : '<span class="wpf-red">' . __('Not available', 'wpforo') . '</span> | <a href="http://php.net/manual/en/datetime.installation.php" target="_blank">more info&raquo;</a>'; ?> </td>
111
</tr>
112
+ <?php do_action('wpforo_dashboard_widget_server') ?>
113
</table>
114
</div>
115
</div>
116
</div><!-- widget / postbox -->
117
118
+ <?php do_action('wpforo_dashboard_widgets_col1'); ?>
119
120
</div><!-- normal-sortables -->
121
</div><!-- wpforo_postbox_container -->
132
<div class="inside">
133
<div class="main">
134
<table style="width:98%; margin:0px auto; text-align:left;">
135
+ <?php $statistic = WPF()->statistic(); ?>
136
<tr class="wpf-dw-tr">
137
<td class="wpf-dw-td"><?php _e('Forums', 'wpforo'); ?></td>
138
<td class="wpf-dw-td-value"><?php echo intval($statistic['forums']) ?></td>
212
</div>
213
</div><!-- widget / postbox -->
214
215
+ <?php do_action( 'wpforo_dashboard_widgets_col2', WPF() ); ?>
216
217
</div><!-- normal-sortables -->
218
</div><!-- wpforo_postbox_container -->
221
<div class="postbox-container" id="postbox-container-3">
222
<div class="meta-box-sortables ui-sortable" id="normal-sortables">
223
224
+ <?php do_action( 'wpforo_dashboard_widgets_col3', WPF() ); ?>
225
226
</div><!-- normal-sortables -->
227
</div><!-- wpforo_postbox_container -->
wpf-admin/forum.php CHANGED
@@ -44,11 +44,11 @@
44
<a href="<?php echo admin_url( 'admin.php?page=wpforo-forums&action=add' ) ?>" class="add-new-h2"><?php _e('Add New', 'wpforo'); ?></a>
45
</h2>
46
47
- <?php $wpforo->notice->show(FALSE) ?>
48
49
<!-- Forum Hierarchy -->
50
<?php if( !isset($_GET['action'])) : ?>
51
- <?php if($wpforo->perm->usergroup_can('ef')): ?>
52
53
<div class="wpf-info-bar" style="line-height: 1em; clear:both; padding: 5px 30px; font-size:15px; display:block; box-shadow:none; margin: 20px 0 10px 0; font-style: italic; background: #FFFFC6; width:90%;">
54
<ul style="list-style-type: disc; line-height:18px;">
@@ -66,7 +66,7 @@
66
<div id="post-body">
67
<ul id="menu-to-edit" class="menu">
68
69
- <?php $wpforo->forum->tree('drag_menu'); ?>
70
71
</ul>
72
</div><br />
@@ -85,8 +85,8 @@
85
<br style="clear: both;"/>
86
<!-- Forum Add || Edit -->
87
<?php if( ( isset($_GET['action']) && $_GET['action'] == 'add' ) || ( isset($_GET['action']) && $_GET['action'] == 'edit' ) ) : ?>
88
- <?php if($wpforo->perm->usergroup_can('cf')): ?>
89
- <?php if(isset($_GET['id'])) $data = $wpforo->forum->get_forum( array('forumid' => $_GET['id']) ); ?>
90
<div id="poststuff">
91
<form name="forum" action="" method="post">
92
<?php wp_nonce_field( 'wpforo-forum-addedit' ); ?>
@@ -123,7 +123,7 @@
123
<p>
124
<select id="parent" name="forum[parentid]" class="postform" <?php echo (isset($data['is_cat']) && $data['is_cat'] == 1 ? 'disabled' : '') ?>>
125
<option value="0"><?php _e('No parent', 'wpforo'); ?></option>
126
- <?php $wpforo->forum->tree('select_box'); ?>
127
</select>
128
</p>
129
<p class="form-field">
@@ -131,10 +131,10 @@
131
</p>
132
<p><strong><?php _e('Category Layout', 'wpforo'); ?></strong></p>
133
<p>
134
- <?php $layouts = $wpforo->tpl->find_layouts( WPFORO_THEME ); ?>
135
<?php if(!empty($layouts)): ?>
136
<select id="cat_layout" name="forum[cat_layout]" class="postform" <?php $data['cat_layout'] = ( isset($data['cat_layout']) ? $data['cat_layout'] : 1 ); echo ( isset($data['is_cat']) && $data['is_cat'] == 1 ? '' : 'disabled="TRUE"' ); ?> >
137
- <?php $wpforo->tpl->show_layout_selectbox($data['cat_layout']); ?>
138
</select>
139
<?php else: ?>
140
<p><?php _e('No layout found.', 'wpforo'); ?></p>
@@ -165,7 +165,7 @@
165
<h3 class="hndle"><span>Forum Permissions</span></h3>
166
<div class="inside">
167
<table>
168
- <?php $wpforo->forum->permissions(); ?>
169
</table>
170
</div>
171
</div>
@@ -289,7 +289,7 @@
289
<tr>
290
<td colspan="2">
291
<select id="forum_select" name="forum[mergeid]" class="postform" disabled="" >
292
- <?php $wpforo->forum->tree('select_box', false); ?>
293
</select>
294
<p><?php _e('All sub-forums, topics and replies will be attached to selected forum. Layout will be inherited from this forum.', 'wpforo'); ?></p>
295
</td>
44
<a href="<?php echo admin_url( 'admin.php?page=wpforo-forums&action=add' ) ?>" class="add-new-h2"><?php _e('Add New', 'wpforo'); ?></a>
45
</h2>
46
47
+ <?php WPF()->notice->show(FALSE) ?>
48
49
<!-- Forum Hierarchy -->
50
<?php if( !isset($_GET['action'])) : ?>
51
+ <?php if(WPF()->perm->usergroup_can('ef')): ?>
52
53
<div class="wpf-info-bar" style="line-height: 1em; clear:both; padding: 5px 30px; font-size:15px; display:block; box-shadow:none; margin: 20px 0 10px 0; font-style: italic; background: #FFFFC6; width:90%;">
54
<ul style="list-style-type: disc; line-height:18px;">
66
<div id="post-body">
67
<ul id="menu-to-edit" class="menu">
68
69
+ <?php WPF()->forum->tree('drag_menu'); ?>
70
71
</ul>
72
</div><br />
85
<br style="clear: both;"/>
86
<!-- Forum Add || Edit -->
87
<?php if( ( isset($_GET['action']) && $_GET['action'] == 'add' ) || ( isset($_GET['action']) && $_GET['action'] == 'edit' ) ) : ?>
88
+ <?php if(WPF()->perm->usergroup_can('cf')): ?>
89
+ <?php if(isset($_GET['id'])) $data = WPF()->forum->get_forum( array('forumid' => $_GET['id']) ); ?>
90
<div id="poststuff">
91
<form name="forum" action="" method="post">
92
<?php wp_nonce_field( 'wpforo-forum-addedit' ); ?>
123
<p>
124
<select id="parent" name="forum[parentid]" class="postform" <?php echo (isset($data['is_cat']) && $data['is_cat'] == 1 ? 'disabled' : '') ?>>
125
<option value="0"><?php _e('No parent', 'wpforo'); ?></option>
126
+ <?php WPF()->forum->tree('select_box'); ?>
127
</select>
128
</p>
129
<p class="form-field">
131
</p>
132
<p><strong><?php _e('Category Layout', 'wpforo'); ?></strong></p>
133
<p>
134
+ <?php $layouts = WPF()->tpl->find_layouts( WPFORO_THEME ); ?>
135
<?php if(!empty($layouts)): ?>
136
<select id="cat_layout" name="forum[cat_layout]" class="postform" <?php $data['cat_layout'] = ( isset($data['cat_layout']) ? $data['cat_layout'] : 1 ); echo ( isset($data['is_cat']) && $data['is_cat'] == 1 ? '' : 'disabled="TRUE"' ); ?> >
137
+ <?php WPF()->tpl->show_layout_selectbox($data['cat_layout']); ?>
138
</select>
139
<?php else: ?>
140
<p><?php _e('No layout found.', 'wpforo'); ?></p>
165
<h3 class="hndle"><span>Forum Permissions</span></h3>
166
<div class="inside">
167
<table>
168
+ <?php WPF()->forum->permissions(); ?>
169
</table>
170
</div>
171
</div>
289
<tr>
290
<td colspan="2">
291
<select id="forum_select" name="forum[mergeid]" class="postform" disabled="" >
292
+ <?php WPF()->forum->tree('select_box', false); ?>
293
</select>
294
<p><?php _e('All sub-forums, topics and replies will be attached to selected forum. Layout will be inherited from this forum.', 'wpforo'); ?></p>
295
</td>
wpf-admin/member.php CHANGED
@@ -1,49 +1,49 @@
1
<?php
2
// Exit if accessed directly
3
if( !defined( 'ABSPATH' ) ) exit;
4
- if( !$wpforo->perm->usergroup_can('vm') ) exit;
5
?>
6
7
<div id="wpf-admin-wrap" class="wrap">
8
<?php wpforo_screen_option() ?>
9
<div id="icon-users" class="icon32"><br></div>
10
<h2 style="padding:30px 0px 0px 0px;line-height: 20px; margin-bottom:15px;"><?php _e('Members', 'wpforo'); ?></h2>
11
- <?php $wpforo->notice->show(FALSE) ?>
12
<?php if(!isset( $_GET['action'] ) || ( isset( $_GET['action']) && $_GET['action'] == -1 ) ) : ?>
13
<?php
14
$fields[] = 'display_name';
15
$search_fields[] = 'title';
16
$search_fields[] = 'display_name';
17
$filter_fields = array();
18
- if($wpforo->perm->usergroup_can('vmu')){
19
$fields[] = 'user_login';
20
$search_fields[] = 'user_login';
21
}
22
- if($wpforo->perm->usergroup_can('vmm')){
23
$fields[] = 'user_email';
24
$search_fields[] = 'user_email';
25
}
26
- if($wpforo->perm->usergroup_can('vmg')){
27
$fields[] = 'groupid';
28
$filter_fields[] = 'groupid';
29
}
30
- if( $wpforo->perm->usergroup_can('bm') ){
31
$fields[] = 'status';
32
$filter_fields[] = 'status';
33
}
34
$fields[] = 'last_login';
35
$fields[] = 'posts';
36
- if($wpforo->perm->usergroup_can('vms')){
37
$search_fields[] = 'signature';
38
}
39
$actions = array('button');
40
- if( $wpforo->perm->usergroup_can('em') ) $actions = array('edit_user', 'edit_profile');
41
- if( $wpforo->perm->usergroup_can('bm') ){
42
$actions[] = 'ban';
43
$bulk_actions[] = 'ban';
44
$bulk_actions[] = 'unban';
45
}
46
- if( $wpforo->perm->usergroup_can('dm') ){
47
$actions[] = 'user_delete';
48
$bulk_actions[] = 'del';
49
}
1
<?php
2
// Exit if accessed directly
3
if( !defined( 'ABSPATH' ) ) exit;
4
+ if( !WPF()->perm->usergroup_can('vm') ) exit;
5
?>
6
7
<div id="wpf-admin-wrap" class="wrap">
8
<?php wpforo_screen_option() ?>
9
<div id="icon-users" class="icon32"><br></div>
10
<h2 style="padding:30px 0px 0px 0px;line-height: 20px; margin-bottom:15px;"><?php _e('Members', 'wpforo'); ?></h2>
11
+ <?php WPF()->notice->show(FALSE) ?>
12
<?php if(!isset( $_GET['action'] ) || ( isset( $_GET['action']) && $_GET['action'] == -1 ) ) : ?>
13
<?php
14
$fields[] = 'display_name';
15
$search_fields[] = 'title';
16
$search_fields[] = 'display_name';
17
$filter_fields = array();
18
+ if(WPF()->perm->usergroup_can('vmu')){
19
$fields[] = 'user_login';
20
$search_fields[] = 'user_login';
21
}
22
+ if(WPF()->perm->usergroup_can('vmm')){
23
$fields[] = 'user_email';
24
$search_fields[] = 'user_email';
25
}
26
+ if(WPF()->perm->usergroup_can('vmg')){
27
$fields[] = 'groupid';
28
$filter_fields[] = 'groupid';
29
}
30
+ if( WPF()->perm->usergroup_can('bm') ){
31
$fields[] = 'status';
32
$filter_fields[] = 'status';
33
}
34
$fields[] = 'last_login';
35
$fields[] = 'posts';
36
+ if(WPF()->perm->usergroup_can('vms')){
37
$search_fields[] = 'signature';
38
}
39
$actions = array('button');
40
+ if( WPF()->perm->usergroup_can('em') ) $actions = array('edit_user', 'edit_profile');
41
+ if( WPF()->perm->usergroup_can('bm') ){
42
$actions[] = 'ban';
43
$bulk_actions[] = 'ban';
44
$bulk_actions[] = 'unban';
45
}
46
+ if( WPF()->perm->usergroup_can('dm') ){
47
$actions[] = 'user_delete';
48
$bulk_actions[] = 'del';
49
}
wpf-admin/moderation.php CHANGED
@@ -1,14 +1,14 @@
1
<?php
2
// Exit if accessed directly
3
if( !defined( 'ABSPATH' ) ) exit;
4
- if( !$wpforo->perm->usergroup_can('aum') ) exit;
5
?>
6
7
<div id="wpf-admin-wrap" class="wrap" style="margin-top: 0px">
8
<?php wpforo_screen_option() ?>
9
<div id="icon-users" class="icon32"><br></div>
10
<h2 style="padding:30px 0px 0px 0px;line-height: 20px; margin-bottom:15px;"><?php _e('Topic and Post Moderation', 'wpforo'); ?></h2>
11
- <?php $wpforo->notice->show(FALSE) ?>
12
<?php
13
if( !((isset($_GET['action']) && $_GET['action'] != '-1') || (isset($_GET['action2']) && $_GET['action2'] != '-1')) ){
14
$fields = array( 'title', 'is_first_post', 'userid', 'created' );
1
<?php
2
// Exit if accessed directly
3
if( !defined( 'ABSPATH' ) ) exit;
4
+ if( !WPF()->perm->usergroup_can('aum') ) exit;
5
?>
6
7
<div id="wpf-admin-wrap" class="wrap" style="margin-top: 0px">
8
<?php wpforo_screen_option() ?>
9
<div id="icon-users" class="icon32"><br></div>
10
<h2 style="padding:30px 0px 0px 0px;line-height: 20px; margin-bottom:15px;"><?php _e('Topic and Post Moderation', 'wpforo'); ?></h2>
11
+ <?php WPF()->notice->show(FALSE) ?>
12
<?php
13
if( !((isset($_GET['action']) && $_GET['action'] != '-1') || (isset($_GET['action2']) && $_GET['action2'] != '-1')) ){
14
$fields = array( 'title', 'is_first_post', 'userid', 'created' );
wpf-admin/options-tabs/accesses.php CHANGED
@@ -5,7 +5,7 @@
5
?>
6
7
<?php if( !isset($_GET['action']) ): ?>
8
- <?php $accesses = $wpforo->perm->get_accesses() ?>
9
<h2 style="margin-top:0px; margin-bottom:20px;"><a href="?page=wpforo-settings&tab=accesses&action=add" class="add-new-h2"><?php _e('Add New Forum Access', 'wpforo'); ?></a></h2>
10
<table id="usergroup_table" class="wp-list-table widefat fixed posts" cellspacing="0">
11
<thead>
@@ -47,13 +47,13 @@
47
<input type="hidden" name="access[action]" value="<?php echo ( $_GET['action'] == 'add' ? 'add' : 'edit' ) ?>" />
48
<input type="hidden" name="access[key]" value="<?php echo ( isset($_GET['access']) ? esc_attr(sanitize_text_field($_GET['access'])) : '' ) ?>" />
49
<label class="wpf-label-big"><?php _e('Access name', 'wpforo'); ?></label>
50
- <?php if( isset( $_GET['access'] ) ){ $access = $wpforo->perm->get_access( $_GET['access'] );} ?>
51
<input name="access[name]" type="text" size="40" required="TRUE" value="<?php echo ( $_GET['action'] == 'edit' ? esc_attr($access['title']) : '') ?>" style="background:#FDFDFD; width:30%; min-width:320px;">
52
<p>&nbsp;</p>
53
54
<?php
55
$access_key = ( isset( $_GET['access'] ) ? $_GET['access'] : 0 );
56
- $cans = $wpforo->perm->forum_cans_form( $access_key ); ?>
57
<?php $n = 0; foreach( $cans as $can => $data ): ?>
58
<?php if( $n%4 == 0 ): ?>
59
</table>
5
?>
6
7
<?php if( !isset($_GET['action']) ): ?>
8
+ <?php $accesses = WPF()->perm->get_accesses() ?>
9
<h2 style="margin-top:0px; margin-bottom:20px;"><a href="?page=wpforo-settings&tab=accesses&action=add" class="add-new-h2"><?php _e('Add New Forum Access', 'wpforo'); ?></a></h2>
10
<table id="usergroup_table" class="wp-list-table widefat fixed posts" cellspacing="0">
11
<thead>
47
<input type="hidden" name="access[action]" value="<?php echo ( $_GET['action'] == 'add' ? 'add' : 'edit' ) ?>" />
48
<input type="hidden" name="access[key]" value="<?php echo ( isset($_GET['access']) ? esc_attr(sanitize_text_field($_GET['access'])) : '' ) ?>" />
49
<label class="wpf-label-big"><?php _e('Access name', 'wpforo'); ?></label>
50
+ <?php if( isset( $_GET['access'] ) ){ $access = WPF()->perm->get_access( $_GET['access'] );} ?>
51
<input name="access[name]" type="text" size="40" required="TRUE" value="<?php echo ( $_GET['action'] == 'edit' ? esc_attr($access['title']) : '') ?>" style="background:#FDFDFD; width:30%; min-width:320px;">
52
<p>&nbsp;</p>
53
54
<?php
55
$access_key = ( isset( $_GET['access'] ) ? $_GET['access'] : 0 );
56
+ $cans = WPF()->perm->forum_cans_form( $access_key ); ?>
57
<?php $n = 0; foreach( $cans as $can => $data ): ?>
58
<?php if( $n%4 == 0 ): ?>
59
</table>
wpf-admin/options-tabs/api.php ADDED
@@ -0,0 +1,95 @@
1
+ <?php
2
+ // Exit if accessed directly
3
+ if( !defined( 'ABSPATH' ) ) exit;
4
+ if( !current_user_can('administrator') ) exit;
5
+ ?>
6
+
7
+ <form action="" method="POST" class="validate">
8
+ <?php wp_nonce_field( 'wpforo-settings-api' ); ?>
9
+ <table class="wpforo_settings_table">
10
+ <tbody>
11
+ <?php do_action('wpforo_settings_api_top'); ?>
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>
19
+ </tr>
20
+ <tr>
21
+ <th style="padding-top:15px;">
22
+ <label><?php _e('Facebook API Configuration', 'wpforo'); ?></label>
23
+ <p class="wpf-info"><?php _e('In order to get an App ID and Secret Key from Facebook, you’ll need to register a new application. Don’t worry – its very easy, and your application doesn\'t need to do anything. We only need the keys.', 'wpforo'); ?> <a href="https://wpforo.com/community/faq/how-to-get-facebook-app-id-and-secret-key/" target="_blank"><?php _e('Please follow to this instruction', 'wpforo'); ?> &raquo;</a></p>
24
+ </th>
25
+ <td style="padding-top:15px;">
26
+ <input name="wpforo_api_options[fb_api_id]" placeholder="<?php _e('App ID', 'wpforo'); ?>" type="text" value="<?php echo trim(WPF()->api->options['fb_api_id']); ?>"/>&nbsp; <?php _e('App ID', 'wpforo'); ?><br />
27
+ <input name="wpforo_api_options[fb_api_secret]" placeholder="<?php _e('App Secret', 'wpforo'); ?>" type="text" value="<?php echo trim(WPF()->api->options['fb_api_secret']); ?>"/>&nbsp; <?php _e('App Secret', 'wpforo'); ?>
28
+ </td>
29
+ </tr>
30
+ <tr>
31
+ <th>
32
+ <label><?php _e('Facebook Login', 'wpforo'); ?></label>
33
+ <p class="wpf-info"><?php _e('Adds Facebook Login button on Registration and Login pages.') ?></p>
34
+ </th>
35
+ <td>
36
+ <div class="wpf-switch-field">
37
+ <input type="radio" value="1" name="wpforo_api_options[fb_login]" id="fb_login_1" <?php wpfo_check(WPF()->api->options['fb_login'], 1); ?>><label for="fb_login_1"><?php _e('Enable', 'wpforo'); ?></label> &nbsp;
38
+ <input type="radio" value="0" name="wpforo_api_options[fb_login]" id="fb_login_0" <?php wpfo_check(WPF()->api->options['fb_login'], 0); ?>><label for="fb_login_0"><?php _e('Disable', 'wpforo'); ?></label>
39
+ </div>
40
+ </td>
41
+ </tr>
42
+ <tr>
43
+ <th>
44
+ <label><?php _e('Facebook SDK for JavaScript', 'wpforo'); ?></label>
45
+ <p class="wpf-info"><?php _e('Facebook API connection script (sharing, login, cross-posting...)') ?></p>
46
+ </th>
47
+ <td>
48
+ <div class="wpf-switch-field">
49
+ <input type="radio" value="1" name="wpforo_api_options[fb_load_sdk]" id="fb_load_sdk_1" <?php wpfo_check(WPF()->api->options['fb_load_sdk'], 1); ?>><label for="fb_load_sdk_1"><?php _e('Enable', 'wpforo'); ?></label> &nbsp;
50
+ <input type="radio" value="0" name="wpforo_api_options[fb_load_sdk]" id="fb_load_sdk_0" <?php wpfo_check(WPF()->api->options['fb_load_sdk'], 0); ?>><label for="fb_load_sdk_0"><?php _e('Disable', 'wpforo'); ?></label>
51
+ </div>
52
+ </td>
53
+ </tr>
54
+ <tr>
55
+ <th>
56
+ <label><?php _e('Facebook Login button on User Login page', 'wpforo'); ?></label>
57
+ </th>
58
+ <td>
59
+ <div class="wpf-switch-field">
60
+ <input type="radio" value="1" name="wpforo_api_options[fb_lb_on_lp]" id="fb_lb_on_lp_1" <?php wpfo_check(WPF()->api->options['fb_lb_on_lp'], 1); ?>><label for="fb_lb_on_lp_1"><?php _e('Enable', 'wpforo'); ?></label> &nbsp;
61
+ <input type="radio" value="0" name="wpforo_api_options[fb_lb_on_lp]" id="fb_lb_on_lp_0" <?php wpfo_check(WPF()->api->options['fb_lb_on_lp'], 0); ?>><label for="fb_lb_on_lp_0"><?php _e('Disable', 'wpforo'); ?></label>
62
+ </div>
63
+ </td>
64
+ </tr>
65
+ <tr>
66
+ <th>
67
+ <label><?php _e('Facebook Login button on User Registration page', 'wpforo'); ?></label>
68
+ </th>
69
+ <td>
70
+ <div class="wpf-switch-field">
71
+ <input type="radio" value="1" name="wpforo_api_options[fb_lb_on_rp]" id="fb_lb_on_rp_1" <?php wpfo_check(WPF()->api->options['fb_lb_on_rp'], 1); ?>><label for="fb_lb_on_rp_1"><?php _e('Enable', 'wpforo'); ?></label> &nbsp;
72
+ <input type="radio" value="0" name="wpforo_api_options[fb_lb_on_rp]" id="fb_lb_on_rp_0" <?php wpfo_check(WPF()->api->options['fb_lb_on_rp'], 0); ?>><label for="fb_lb_on_rp_0"><?php _e('Disable', 'wpforo'); ?></label>
73
+ </div>
74
+ </td>
75
+ </tr>
76
+ <tr>
77
+ <th>
78
+ <label><?php _e('Redirect to this page after success login', 'wpforo'); ?></label>
79
+ </th>
80
+ <td>
81
+ <div class="wpf-switch-field">
82
+ <input type="radio" value="profile" name="wpforo_api_options[fb_redirect]" id="fb_redirect_2" <?php wpfo_check(WPF()->api->options['fb_redirect'], 'profile'); ?>><label for="fb_redirect_2">&nbsp;<?php _e('Profile', 'wpforo'); ?>&nbsp;</label>
83
+ <input type="radio" value="home" name="wpforo_api_options[fb_redirect]" id="fb_redirect_1" <?php wpfo_check(WPF()->api->options['fb_redirect'], 'home'); ?>><label for="fb_redirect_1">&nbsp;<?php _e('Forums', 'wpforo'); ?>&nbsp;</label> &nbsp;
84
+ <input type="radio" value="custom" name="wpforo_api_options[fb_redirect]" id="fb_redirect_3" <?php wpfo_check(WPF()->api->options['fb_redirect'], 'custom'); ?>><label for="fb_redirect_3">&nbsp;<?php _e('Custom', 'wpforo'); ?>&nbsp;</label> &nbsp;
85
+ </div>
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>
92
+ <div class="wpforo_settings_foot">
93
+ <input type="submit" class="button button-primary" value="<?php _e('Update Options', 'wpforo'); ?>" />
94
+ </div>
95
+ </form>
wpf-admin/options-tabs/emails.php CHANGED
@@ -4,108 +4,131 @@
4
if( !current_user_can('administrator') ) exit;
5
?>
6
7
-
8
- <form action="" method="POST" class="validate">
9
- <?php wp_nonce_field( 'wpforo-settings-emails' ); ?>
10
- <table class="wpforo_settings_table">
11
- <tbody>
12
- <tr>
13
- <th style="width:40%"><label><?php _e('FROM Name', 'wpforo'); ?>:</label></th>
14
- <td><input name="wpforo_subscribe_options[from_name]" type="text" value="<?php wpfo($wpforo->sbscrb->options['from_name']); ?>" required></td>
15
- </tr>
16
- <tr>
17
- <th><label><?php _e('FROM Email Address', 'wpforo'); ?>:</label></th>
18
- <td><input name="wpforo_subscribe_options[from_email]" type="text" value="<?php wpfo($wpforo->sbscrb->options['from_email']); ?>" required /></td>
19
- </tr>
20
- <tr>
21
- <th>
22
- <label><?php _e('Forum Admins email addresses', 'wpforo'); ?>:</label>
23
- <p class="wpf-info"><?php _e('Comma separated email addresses of forum administrators to get forum notifications. For example post report messages.', 'wpforo') ?></p>
24
- </th>
25
- <td><input name="wpforo_subscribe_options[admin_emails]" type="text" value="<?php wpfo($wpforo->sbscrb->options['admin_emails']); ?>" required /></td>
26
- </tr>
27
- <tr>
28
- <th>
29
- <label><?php _e('Notify Admins via email on new Topic', 'wpforo'); ?>:</label>
30
- <p class="wpf-info"><?php _e('Send Notification emails to all email addresses (comma separated ) of forum administrators when a new Topic is created.', 'wpforo') ?></p>
31
- </th>
32
- <td>
33
- <div class="wpf-switch-field">
34
- <input type="radio" value="1" name="wpforo_subscribe_options[new_topic_notify]" id="wpf_new_topic_notify_1" <?php wpfo_check($wpforo->sbscrb->options['new_topic_notify'], 1); ?>><label for="wpf_new_topic_notify_1"><?php _e('Yes', 'wpforo'); ?></label> &nbsp;
35
- <input type="radio" value="0" name="wpforo_subscribe_options[new_topic_notify]" id="wpf_new_topic_notify_0" <?php wpfo_check($wpforo->sbscrb->options['new_topic_notify'], 0); ?>><label for="wpf_new_topic_notify_0"><?php _e('No', 'wpforo'); ?></label>
36
- </div>
37
- </td>
38
- </tr>
39
- <tr>
40
- <th>
41
- <label><?php _e('Notify Admins via email on new Post', 'wpforo'); ?>:</label>
42
- <p class="wpf-info"><?php _e('Send Notification emails to all email addresses (comma separated ) of forum administrators when a new Reply is created.', 'wpforo') ?></p>
43
- </th>
44
- <td>
45
- <div class="wpf-switch-field">
46
- <input type="radio" value="1" name="wpforo_subscribe_options[new_reply_notify]" id="wpf_new_reply_notify_1" <?php wpfo_check($wpforo->sbscrb->options['new_reply_notify'], 1); ?>><label for="wpf_new_reply_notify_1"><?php _e('Yes', 'wpforo'); ?></label> &nbsp;
47
- <input type="radio" value="0" name="wpforo_subscribe_options[new_reply_notify]" id="wpf_new_reply_notify_0" <?php wpfo_check($wpforo->sbscrb->options['new_reply_notify'], 0); ?>><label for="wpf_new_reply_notify_0"><?php _e('No', 'wpforo'); ?></label>
48
- </div>
49
- </td>
50
- </tr>
51
- <tr>
52
- <td colspan="2" style="border-bottom:2px solid #ddd;">
53
- <h3 style="font-weight:400; padding:10px 0px 0px 0px; margin:0px;"><?php _e('Subscription Emails', 'wpforo'); ?></h3>
54
- </td>
55
- </tr>
56
- <tr>
57
- <th><label><?php _e('Subscribe confirmation email subject', 'wpforo'); ?>:</label></th>
58
- <td><input name="wpforo_subscribe_options[confirmation_email_subject]" type="text" value="<?php wpfo($wpforo->sbscrb->options['confirmation_email_subject']); ?>" required></td>
59
- </tr>
60
- <tr>
61
- <th><label><?php _e('Subscribe confirmation email message', 'wpforo'); ?>:</label></th>
62
- <td><textarea style="height:190px;" name="wpforo_subscribe_options[confirmation_email_message]" required><?php wpfo($wpforo->sbscrb->options['confirmation_email_message'], true, 'esc_textarea'); ?></textarea></td>
63
- </tr>
64
- <tr>
65
- <th><label><?php _e('New topic notification email subject', 'wpforo'); ?>:</label></th>
66
- <td><input name="wpforo_subscribe_options[new_topic_notification_email_subject]" type="text" value="<?php wpfo($wpforo->sbscrb->options['new_topic_notification_email_subject']); ?>" required></td>
67
- </tr>
68
- <tr>
69
- <th><label><?php _e('New topic notification email message', 'wpforo'); ?>:</label></th>
70
- <td><textarea style="height:190px;" name="wpforo_subscribe_options[new_topic_notification_email_message]" required><?php wpfo($wpforo->sbscrb->options['new_topic_notification_email_message'], true, 'esc_textarea'); ?></textarea></td>
71
- </tr>
72
- <tr>
73
- <th><label><?php _e('New reply notification email subject', 'wpforo'); ?>:</label></th>
74
- <td><input name="wpforo_subscribe_options[new_post_notification_email_subject]" type="text" value="<?php wpfo($wpforo->sbscrb->options['new_post_notification_email_subject']); ?>" required></td>
75
- </tr>
76
- <tr>
77
- <th><label><?php _e('New reply notification email message', 'wpforo'); ?>:</label></th>
78
- <td><textarea style="height:190px;" name="wpforo_subscribe_options[new_post_notification_email_message]" required><?php wpfo($wpforo->sbscrb->options['new_post_notification_email_message'], true, 'esc_textarea'); ?></textarea></td>
79
- </tr>
80
- <tr>
81
- <td colspan="2" style="border-bottom:2px solid #ddd;">
82
- <h3 style="font-weight:400; padding:10px 0px 0px 0px; margin:0px;"><?php _e('Post Reporting Emails', 'wpforo'); ?></h3>
83
- <p class="wpf-info"><?php _e('This message comes from post reporting pop-up form.', 'wpforo') ?></p>
84
- </td>
85
- </tr>
86
- <tr>
87
- <th>
88
- <label><?php _e('Report message subject', 'wpforo'); ?>:</label>
89
- </th>
90
- <td><input name="wpforo_subscribe_options[report_email_subject]" type="text" value="<?php wpfo($wpforo->sbscrb->options['report_email_subject']); ?>" required></td>
91
- </tr>
92
- <tr>
93
- <th><label><?php _e('Report message body', 'wpforo'); ?>:</label></th>
94
- <td><textarea style="height:190px;" name="wpforo_subscribe_options[report_email_message]" required><?php wpfo($wpforo->sbscrb->options['report_email_message'], true, 'esc_textarea'); ?></textarea></td>
95
- </tr>
96
- <tr>
97
- <td colspan="2" style="border-bottom:2px solid #ddd;">
98
- <h3 style="font-weight:400; padding:10px 0px 0px 0px; margin:0px;"><?php _e('Reset Password Emails', 'wpforo'); ?></h3>
99
- <p class="wpf-info"><?php _e('This message comes from Reset Password form.', 'wpforo') ?></p>
100
- </td>
101
- </tr>
102
- <tr>
103
- <th><label><?php _e('Reset Password message body', 'wpforo'); ?>:</label></th>
104
- <td><textarea style="height:190px;" name="wpforo_subscribe_options[reset_password_email_message]" required><?php wpfo($wpforo->sbscrb->options['reset_password_email_message'], true, 'esc_textarea'); ?></textarea></td>
105
- </tr>
106
- </tbody>
107
- </table>
108
- <div class="wpforo_settings_foot">
109
- <input type="submit" class="button button-primary" value="<?php _e('Update Options', 'wpforo'); ?>" />
110
- </div>
111
- </form>
4
if( !current_user_can('administrator') ) exit;
5
?>
6
7
+ <form action="" method="POST" class="validate">
8
+ <?php wp_nonce_field( 'wpforo-settings-emails' ); ?>
9
+ <table class="wpforo_settings_table">
10
+ <tbody>
11
+ <tr>
12
+ <th style="width:40%"><label for="from_name"><?php _e('FROM Name', 'wpforo'); ?>:</label></th>
13
+ <td><input id="from_name" name="wpforo_subscribe_options[from_name]" type="text" value="<?php wpfo(WPF()->sbscrb->options['from_name']); ?>" required></td>
14
+ </tr>
15
+ <tr>
16
+ <th><label for="from_email"><?php _e('FROM Email Address', 'wpforo'); ?>:</label></th>
17
+ <td><input id="from_email" name="wpforo_subscribe_options[from_email]" type="text" value="<?php wpfo(WPF()->sbscrb->options['from_email']); ?>" required /></td>
18
+ </tr>
19
+ <tr>
20
+ <th>
21
+ <label for="admin_emails"><?php _e('Forum Admins email addresses', 'wpforo'); ?>:</label>
22
+ <p class="wpf-info"><?php _e('Comma separated email addresses of forum administrators to get forum notifications. For example post report messages.', 'wpforo') ?></p>
23
+ </th>
24
+ <td><input id="admin_emails" name="wpforo_subscribe_options[admin_emails]" type="text" value="<?php wpfo(WPF()->sbscrb->options['admin_emails']); ?>" required /></td>
25
+ </tr>
26
+ <tr>
27
+ <th>
28
+ <label><?php _e('Notify Admins via email on new Topic', 'wpforo'); ?>:</label>
29
+ <p class="wpf-info"><?php _e('Send Notification emails to all email addresses (comma separated ) of forum administrators when a new Topic is created.', 'wpforo') ?></p>
30
+ </th>
31
+ <td>
32
+ <div class="wpf-switch-field">
33
+ <input type="radio" value="1" name="wpforo_subscribe_options[new_topic_notify]" id="wpf_new_topic_notify_1" <?php wpfo_check(WPF()->sbscrb->options['new_topic_notify'], 1); ?>><label for="wpf_new_topic_notify_1"><?php _e('Yes', 'wpforo'); ?></label> &nbsp;
34
+ <input type="radio" value="0" name="wpforo_subscribe_options[new_topic_notify]" id="wpf_new_topic_notify_0" <?php wpfo_check(WPF()->sbscrb->options['new_topic_notify'], 0); ?>><label for="wpf_new_topic_notify_0"><?php _e('No', 'wpforo'); ?></label>
35
+ </div>
36
+ </td>
37
+ </tr>
38
+ <tr>
39
+ <th>
40
+ <label><?php _e('Notify Admins via email on new Post', 'wpforo'); ?>:</label>
41
+ <p class="wpf-info"><?php _e('Send Notification emails to all email addresses (comma separated ) of forum administrators when a new Reply is created.', 'wpforo') ?></p>
42
+ </th>
43
+ <td>
44
+ <div class="wpf-switch-field">
45
+ <input type="radio" value="1" name="wpforo_subscribe_options[new_reply_notify]" id="wpf_new_reply_notify_1" <?php wpfo_check(WPF()->sbscrb->options['new_reply_notify'], 1); ?>><label for="wpf_new_reply_notify_1"><?php _e('Yes', 'wpforo'); ?></label> &nbsp;
46
+ <input type="radio" value="0" name="wpforo_subscribe_options[new_reply_notify]" id="wpf_new_reply_notify_0" <?php wpfo_check(WPF()->sbscrb->options['new_reply_notify'], 0); ?>><label for="wpf_new_reply_notify_0"><?php _e('No', 'wpforo'); ?></label>
47
+ </div>
48
+ </td>
49
+ </tr>
50
+ <tr>
51
+ <td colspan="2" style="border-bottom:2px solid #ddd;">
52
+ <h3 style="font-weight:400; padding:10px 0 0 0; margin:0;"><?php _e('Subscription Emails', 'wpforo'); ?></h3>
53
+ </td>
54
+ </tr>
55
+ <tr>
56
+ <th><label for="confirmation_email_subject"><?php _e('Subscribe confirmation email subject', 'wpforo'); ?>:</label></th>
57
+ <td><input id="confirmation_email_subject" name="wpforo_subscribe_options[confirmation_email_subject]" type="text" value="<?php wpfo(WPF()->sbscrb->options['confirmation_email_subject']); ?>" required></td>
58
+ </tr>
59
+ <tr>
60
+ <th><label for="confirmation_email_message"><?php _e('Subscribe confirmation email message', 'wpforo'); ?>:</label></th>
61
+ <td><textarea id="confirmation_email_message" style="height:190px;" name="wpforo_subscribe_options[confirmation_email_message]" required><?php wpfo(WPF()->sbscrb->options['confirmation_email_message'], true, 'esc_textarea'); ?></textarea></td>
62
+ </tr>
63
+ <tr>
64
+ <th><label for="new_topic_notification_email_subject"><?php _e('New topic notification email subject', 'wpforo'); ?>:</label></th>
65
+ <td><input id="new_topic_notification_email_subject" name="wpforo_subscribe_options[new_topic_notification_email_subject]" type="text" value="<?php wpfo(WPF()->sbscrb->options['new_topic_notification_email_subject']); ?>" required></td>
66
+ </tr>
67
+ <tr>
68
+ <th><label for="new_topic_notification_email_message"><?php _e('New topic notification email message', 'wpforo'); ?>:</label></th>
69
+ <td><textarea id="new_topic_notification_email_message" style="height:190px;" name="wpforo_subscribe_options[new_topic_notification_email_message]" required><?php wpfo(WPF()->sbscrb->options['new_topic_notification_email_message'], true, 'esc_textarea'); ?></textarea></td>
70
+ </tr>
71
+ <tr>
72
+ <th><label for="new_post_notification_email_subject"><?php _e('New reply notification email subject', 'wpforo'); ?>:</label></th>
73
+ <td><input id="new_post_notification_email_subject" name="wpforo_subscribe_options[new_post_notification_email_subject]" type="text" value="<?php wpfo(WPF()->sbscrb->options['new_post_notification_email_subject']); ?>" required></td>
74
+ </tr>
75
+ <tr>
76
+ <th><label for="new_post_notification_email_message"><?php _e('New reply notification email message', 'wpforo'); ?>:</label></th>
77
+ <td><textarea id="new_post_notification_email_message" style="height:190px;" name="wpforo_subscribe_options[new_post_notification_email_message]" required><?php wpfo(WPF()->sbscrb->options['new_post_notification_email_message'], true, 'esc_textarea'); ?></textarea></td>
78
+ </tr>
79
+ <tr>
80
+ <td colspan="2" style="border-bottom:2px solid #ddd;">
81
+ <h3 style="font-weight:400; padding:10px 0 0 0; margin:0;"><?php _e('Post Reporting Emails', 'wpforo'); ?></h3>
82
+ <p class="wpf-info"><?php _e('This message comes from post reporting pop-up form.', 'wpforo') ?></p>
83
+ </td>
84
+ </tr>
85
+ <tr>
86
+ <th>
87
+ <label for="report_email_subject"><?php _e('Report message subject', 'wpforo'); ?>:</label>
88
+ </th>
89
+ <td><input id="report_email_subject" name="wpforo_subscribe_options[report_email_subject]" type="text" value="<?php wpfo(WPF()->sbscrb->options['report_email_subject']); ?>" required></td>
90
+ </tr>
91
+ <tr>
92
+ <th><label for="report_email_message"><?php _e('Report message body', 'wpforo'); ?>:</label></th>
93
+ <td><textarea id="report_email_message" style="height:190px;" name="wpforo_subscribe_options[report_email_message]" required><?php wpfo(WPF()->sbscrb->options['report_email_message'], true, 'esc_textarea'); ?></textarea></td>
94
+ </tr>
95
+ <tr>
96
+ <td colspan="2" style="border-bottom:2px solid #ddd;">
97
+ <h3 style="font-weight:400; padding:10px 0 0 0; margin:0;"><?php _e('Reset Password Emails', 'wpforo'); ?></h3>
98
+ <p class="wpf-info"><?php _e('This message comes from Reset Password form.', 'wpforo') ?></p>
99
+ </td>
100
+ </tr>
101
+ <tr>
102
+ <th><label for="reset_password_email_message"><?php _e('Reset Password message body', 'wpforo'); ?>:</label></th>
103
+ <td><textarea id="reset_password_email_message" style="height:190px;" name="wpforo_subscribe_options[reset_password_email_message]" required><?php wpfo(WPF()->sbscrb->options['reset_password_email_message'], true, 'esc_textarea'); ?></textarea></td>
104
+ </tr>
105
+ <tr>
106
+ <td colspan="2" style="border-bottom:2px solid #ddd;">
107
+ <h3 style="font-weight:400; padding:10px 0 0 0; margin:0;"><?php _e('User Mentioning Email', 'wpforo'); ?></h3>
108
+ </td>
109
+ </tr>
110
+ <tr>
111
+ <th>
112
+ <label><?php _e('Enable Email Notification', 'wpforo'); ?>:</label>
113
+ </th>
114
+ <td>
115
+ <div class="wpf-switch-field">
116
+ <input type="radio" value="1" name="wpforo_subscribe_options[user_mention_notify]" id="user_mention_notify_1" <?php wpfo_check(WPF()->sbscrb->options['user_mention_notify'], 1); ?>><label for="user_mention_notify_1"><?php _e('Yes', 'wpforo'); ?></label> &nbsp;
117
+ <input type="radio" value="0" name="wpforo_subscribe_options[user_mention_notify]" id="user_mention_notify_0" <?php wpfo_check(WPF()->sbscrb->options['user_mention_notify'], 0); ?>><label for="user_mention_notify_0"><?php _e('No', 'wpforo'); ?></label>
118
+ </div>
119
+ </td>
120
+ </tr>
121
+ <tr>
122
+ <th><label for="user_mention_email_subject"><?php _e('User Mention message subject', 'wpforo'); ?>:</label></th>
123
+ <td><input id="user_mention_email_subject" name="wpforo_subscribe_options[user_mention_email_subject]" type="text" value="<?php wpfo(WPF()->sbscrb->options['user_mention_email_subject']); ?>" required></td>
124
+ </tr>
125
+ <tr>
126
+ <th><label for="user_mention_email_message"><?php _e('User Mention message body', 'wpforo'); ?>:</label></th>
127
+ <td><textarea id="user_mention_email_message" style="height:190px;" name="wpforo_subscribe_options[user_mention_email_message]" required><?php wpfo(WPF()->sbscrb->options['user_mention_email_message'], true, 'esc_textarea'); ?></textarea></td>
128
+ </tr>
129
+ </tbody>
130
+ </table>
131
+ <div class="wpforo_settings_foot">
132
+ <input type="submit" class="button button-primary" value="<?php _e('Update Options', 'wpforo'); ?>" />
133
+ </div>
134
+ </form>
wpf-admin/options-tabs/features.php CHANGED
@@ -17,8 +17,8 @@ $options = array(
17
'comment-author-link' => array( 'label' => __('Replace Comment Author Link to Forum Profile', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0 ),
18
'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') ),
19
'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') ),
20
- 'register-url' => array( 'label' => __('Replace Registration Page URL to Forum URL', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0 ),
21
- 'login-url' => array( 'label' => __('Replace Login Page URL to Forum URL', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0 ),
22
'resetpass-url' => array( 'label' => __('Replace WP Reset Password URL to Forum reset password page', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1 ),
23
'replace-avatar' => array( 'label' => __('Replace Author Avatar with Forum Profile Avatar', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
24
'avatars' => array( 'label' => __('Enable Avatars', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
@@ -52,7 +52,7 @@ $options = array(
52
<table class="wpforo_settings_table">
53
<tbody>
54
<?php foreach($options as $key => $option): ?>
55
- <?php if( !isset($wpforo->features[$key]) ){ $wpforo->features[$key] = ''; } ?>
56
<tr>
57
<th>
58
<label><?php echo esc_html($option['label']); ?></label>
@@ -60,14 +60,14 @@ $options = array(
60
</th>
61
<td>
62
<div class="wpf-switch-field">
63
- <input type="radio" value="1" name="wpforo_features[<?php echo esc_attr($key); ?>]" id="wpf_<?php echo esc_attr($key); ?>_1" <?php wpfo_check($wpforo->features[$key], 1); ?>><label for="wpf_<?php echo esc_attr($key); ?>_1"><?php _e('Yes', 'wpforo'); ?></label> &nbsp;
64
- <input type="radio" value="0" name="wpforo_features[<?php echo esc_attr($key); ?>]" id="wpf_<?php echo esc_attr($key); ?>_0" <?php wpfo_check($wpforo->features[$key], 0); ?>><label for="wpf_<?php echo esc_attr($key); ?>_0"><?php _e('No', 'wpforo'); ?></label>
65
<?php if($key == 'copyright') echo '<span style="color:#009900; font-weight:400; font-size:14px;">&nbsp;Thank you!</span>'; ?>
66
</div>
67
</td>
68
</tr>
69
<?php endforeach; ?>
70
- <?php do_action( 'wpforo_settings_theme', $wpforo ); ?>
71
</tbody>
72
</table>
73
<div class="wpforo_settings_foot">
17
'comment-author-link' => array( 'label' => __('Replace Comment Author Link to Forum Profile', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0 ),
18
'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') ),
19
'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') ),
20
+ 'register-url' => array( 'label' => __('Replace Registration Page URL to Forum Registration Page URL', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0 ),
21
+ 'login-url' => array( 'label' => __('Replace Login Page URL to Forum Login Page URL', 'wpforo'), 'type' => '', 'required' => '', 'value' => 0 ),
22
'resetpass-url' => array( 'label' => __('Replace WP Reset Password URL to Forum reset password page', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1 ),
23
'replace-avatar' => array( 'label' => __('Replace Author Avatar with Forum Profile Avatar', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
24
'avatars' => array( 'label' => __('Enable Avatars', 'wpforo'), 'type' => '', 'required' => '', 'value' => 1),
52
<table class="wpforo_settings_table">
53
<tbody>
54
<?php foreach($options as $key => $option): ?>
55
+ <?php if( !isset(WPF()->features[$key]) ){ WPF()->features[$key] = ''; } ?>
56
<tr>
57
<th>
58
<label><?php echo esc_html($option['label']); ?></label>
60
</th>
61
<td>
62
<div class="wpf-switch-field">
63
+ <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;
64
+ <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>
65
<?php if($key == 'copyright') echo '<span style="color:#009900; font-weight:400; font-size:14px;">&nbsp;Thank you!</span>'; ?>
66
</div>
67
</td>
68
</tr>
69
<?php endforeach; ?>
70
+ <?php do_action('wpforo_settings_theme'); ?>
71
</tbody>
72
</table>
73
<div class="wpforo_settings_foot">
wpf-admin/options-tabs/forums.php CHANGED
@@ -9,7 +9,7 @@
9
<?php wp_nonce_field( 'wpforo-settings-forums' ); ?>
10
<table class="wpforo_settings_table">
11
<tbody>
12
- <?php do_action( 'wpforo_settings_forums', $wpforo ); ?>
13
</tbody>
14
</table>
15
<div class="wpforo_settings_foot">
9
<?php wp_nonce_field( 'wpforo-settings-forums' ); ?>
10
<table class="wpforo_settings_table">
11
<tbody>
12
+ <?php do_action('wpforo_settings_forums'); ?>
13
</tbody>
14
</table>
15
<div class="wpforo_settings_foot">
wpf-admin/options-tabs/general.php CHANGED
@@ -15,16 +15,16 @@
15
<label for="wpforourl"><?php _e('Forum Base URL', 'wpforo'); ?></label>
16
</th>
17
<td align="left">
18
- <?php if(!$wpforo->use_home_url): ?>
19
<span style="font-size:14px;"><?php echo esc_url( home_url('/') ) ?></span>
20
- <input required id="wpforourl" type="text" name="wpforo_url" value="<?php echo esc_attr( urldecode( $wpforo->permastruct ) ) ?>" style="width:47%;"/>/<br>
21
<?php endif; ?>
22
<label for="wpforo_use_home_url">
23
- <input id="wpforo_use_home_url" type="checkbox" name="wpforo_use_home_url" value="1" <?php echo ($wpforo->use_home_url ? 'checked' : '') ?>/>
24
<?php _e('Turn WordPress to wpForo', 'wpforo') ?>
25
<p class="wpf-info"><?php _e('This option will disable WordPress on front-end. Only forum pages and excluded post/pages will be available. wpForo will look like as a stand-alone forum.', 'wpforo') ?></p>
26
</label>
27
- <?php if($wpforo->use_home_url): ?>
28
<label for="wpforo_excld_urls"><b style="font-weight: bold;">* <?php _e('Exclude page URLs', 'wpforo') ?></b> <span class="wpf-info">(<?php _e('one URL per line', 'wpforo') ?>)</span></label><br/>
29
<textarea id="wpforo_excld_urls"
30
style="font-size: 11px;"
@@ -32,25 +32,25 @@
32
cols="30"
33
name="wpforo_excld_urls"
34
placeholder="<?php echo esc_url( home_url('/') ) ?>sample-page/&#10;<?php echo esc_url( home_url('/') ) ?>hello-world/&#10; ..."
35
- ><?php echo esc_textarea( $wpforo->excld_urls ) ?></textarea>
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 = $wpforo->db->get_var("SELECT `ID` FROM `{$wpforo->db->prefix}posts` WHERE `ID` = ".intval($wpforo->pageid)." AND `post_content` LIKE '%[wpforo%' AND `post_status` LIKE 'publish' AND `post_type` IN('post', 'page')"); ?>
40
- <?php if( !$wpforo->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/">' . __('suppor topic', 'wpforo') . '&raquo;</a>' . '</span>'; ?>
42
<?php else: ?>
43
- <?php _e('Forum Page ID', 'wpforo'); ?>: <?php echo $wpforo->pageid; ?>
44
<?php endif; ?>
45
</td>
46
</tr>
47
<tr>
48
<th><label for="forum_title"><?php _e('Forum Title', 'wpforo'); ?></label></th>
49
- <td><input id="forum_title" type="text" name="wpforo_general_options[title]" value="<?php if(isset($wpforo->general_options['title'])) wpfo( $wpforo->general_options['title'] ); ?>" required></td>
50
</tr>
51
<tr>
52
<th><label for="forum_description"><?php _e('Forum Description', 'wpforo'); ?></label></th>
53
- <td><input id="forum_description" type="text" name="wpforo_general_options[description]" value="<?php if(isset($wpforo->general_options['description'])) wpfo( $wpforo->general_options['description'] ); ?>" required></td>
54
</tr>
55
<tr>
56
<th>
@@ -59,7 +59,7 @@
59
<p class="wpf-info" style="font-size:11px; line-height:14px;"><?php _e('Use greater than 5 - below Posts, 10 - below Media, 15 - below Links, 20 - below Pages, 25 - below comments, 60 - below first separator, 65 - below Plugins, 70 - below Users, 75 - below Tools, 80 - below Settings, 100 - below second separator', 'wpforo'); ?></p>
60
</th>
61
<td>
62
- <input type="number" name="wpforo_general_options[menu_position]" value="<?php if(!isset($wpforo->general_options['menu_position'])) $wpforo->general_options['menu_position'] = 23; wpfo($wpforo->general_options['menu_position']); ?>"/>&nbsp;
63
<a href="https://developer.wordpress.org/reference/functions/add_menu_page/" target="_blank" style="text-decoration:none;">More info &raquo;</a>
64
</td>
65
</tr>
@@ -70,12 +70,12 @@
70
</th>
71
<td>
72
<select id="langid" name="wpforo_general_options[lang]" style="float:left;">
73
- <?php $wpforo->phrase->show_lang_list() ?>
74
</select>
75
<h2 style="margin: 0;padding: 0;float: left;"><a href="<?php echo admin_url( 'admin.php?page=wpforo-settings&tab=general&action=newlang' ) ?>" class="add-new-h2"><?php _e('Add New', 'wpforo'); ?></a></h2>
76
</td>
77
</tr>
78
- <?php do_action( 'wpforo_settings_general', $wpforo ); ?>
79
</tbody>
80
</table>
81
<div class="wpforo_settings_foot">
15
<label for="wpforourl"><?php _e('Forum Base URL', 'wpforo'); ?></label>
16
</th>
17
<td align="left">
18
+ <?php if(!WPF()->use_home_url): ?>
19
<span style="font-size:14px;"><?php echo esc_url( home_url('/') ) ?></span>
20
+ <input required id="wpforourl" type="text" name="wpforo_url" value="<?php echo esc_attr( urldecode( WPF()->permastruct ) ) ?>" style="width:47%;"/>/<br>
21
<?php endif; ?>
22
<label for="wpforo_use_home_url">
23
+ <input id="wpforo_use_home_url" type="checkbox" name="wpforo_use_home_url" value="1" <?php echo (WPF()->use_home_url ? 'checked' : '') ?>/>
24
<?php _e('Turn WordPress to wpForo', 'wpforo') ?>
25
<p class="wpf-info"><?php _e('This option will disable WordPress on front-end. Only forum pages and excluded post/pages will be available. wpForo will look like as a stand-alone forum.', 'wpforo') ?></p>
26
</label>
27
+ <?php if(WPF()->use_home_url): ?>
28
<label for="wpforo_excld_urls"><b style="font-weight: bold;">* <?php _e('Exclude page URLs', 'wpforo') ?></b> <span class="wpf-info">(<?php _e('one URL per line', 'wpforo') ?>)</span></label><br/>
29
<textarea id="wpforo_excld_urls"
30
style="font-size: 11px;"
32
cols="30"
33
name="wpforo_excld_urls"
34
placeholder="<?php echo esc_url( home_url('/') ) ?>sample-page/&#10;<?php echo esc_url( home_url('/') ) ?>hello-world/&#10; ..."
35
+ ><?php echo esc_textarea( WPF()->excld_urls ) ?></textarea>
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/">' . __('suppor topic', 'wpforo') . '&raquo;</a>' . '</span>'; ?>
42
<?php else: ?>
43
+ <?php _e('Forum Page ID', 'wpforo'); ?>: <?php echo WPF()->pageid; ?>
44
<?php endif; ?>
45
</td>
46
</tr>
47
<tr>
48
<th><label for="forum_title"><?php _e('Forum Title', 'wpforo'); ?></label></th>
49
+ <td><input id="forum_title" type="text" name="wpforo_general_options[title]" value="<?php if(isset(WPF()->general_options['title'])) wpfo( WPF()->general_options['title'] ); ?>" required></td>
50
</tr>
51
<tr>
52
<th><label for="forum_description"><?php _e('Forum Description', 'wpforo'); ?></label></th>
53
+ <td><input id="forum_description" type="text" name="wpforo_general_options[description]" value="<?php if(isset(WPF()->general_options['description'])) wpfo( WPF()->general_options['description'] ); ?>" required></td>
54
</tr>
55
<tr>
56
<th>
59
<p class="wpf-info" style="font-size:11px; line-height:14px;"><?php _e('Use greater than 5 - below Posts, 10 - below Media, 15 - below Links, 20 - below Pages, 25 - below comments, 60 - below first separator, 65 - below Plugins, 70 - below Users, 75 - below Tools, 80 - below Settings, 100 - below second separator', 'wpforo'); ?></p>
60
</th>
61
<td>
62
+ <input type="number" name="wpforo_general_options[menu_position]" value="<?php if(!isset(WPF()->general_options['menu_position'])) WPF()->general_options['menu_position'] = 23; wpfo(WPF()->general_options['menu_position']); ?>"/>&nbsp;
63
<a href="https://developer.wordpress.org/reference/functions/add_menu_page/" target="_blank" style="text-decoration:none;">More info &raquo;</a>
64
</td>
65
</tr>
70
</th>
71
<td>
72
<select id="langid" name="wpforo_general_options[lang]" style="float:left;">
73
+ <?php WPF()->phrase->show_lang_list() ?>
74
</select>
75
<h2 style="margin: 0;padding: 0;float: left;"><a href="<?php echo admin_url( 'admin.php?page=wpforo-settings&tab=general&action=newlang' ) ?>" class="add-new-h2"><?php _e('Add New', 'wpforo'); ?></a></h2>
76
</td>
77
</tr>
78
+ <?php do_action( 'wpforo_settings_general'); ?>
79
</tbody>
80
</table>
81
<div class="wpforo_settings_foot">
wpf-admin/options-tabs/members.php CHANGED
@@ -8,11 +8,11 @@
8
<?php wp_nonce_field( 'wpforo-settings-members' ); ?>
9
<table class="wpforo_settings_table">
10
<tbody>
11
- <?php do_action( 'wpforo_settings_members_top', $wpforo ); ?>
12
<tr>
13
<th><label><?php _e('Online status timeout', 'wpforo'); ?>:</label></th>
14
<td>
15
- <?php $online_timeout = wpfo($wpforo->member->options['online_status_timeout'], false) ?>
16
<input name="wpforo_member_options[online_status_timeout]" type="number" min="1" value="<?php echo intval($online_timeout / 60 ) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo'); ?>
17
</td>
18
</tr>
@@ -20,7 +20,7 @@
20
<th><label><?php _e('Members URL structure', 'wpforo'); ?>:</label></th>
21
<td>
22
<?php $opt_id_attr = ''; $opt_nicename_attr = ''; ?>
23
- <?php if( wpfo($wpforo->member->options['url_structure'], false) == 'id' ){ $opt_id_attr = 'checked="checked"'; }else{ $opt_nicename_attr = 'checked="checked"'; } ?>
24
<input id="id" type="radio" name="wpforo_member_options[url_structure]" value="id" <?php echo $opt_id_attr ?>/><label style="color: gray" for="id"><?php echo wpforo_home_url() ?>profile/<b style="color: #4093bf">USER_ID</b>/</label><br/>
25
<input id="nicename" type="radio" name="wpforo_member_options[url_structure]" value="nicename" <?php echo $opt_nicename_attr ?>/><label style="color: gray" for="nicename"><?php echo wpforo_home_url() ?>profile/<b style="color: #4093bf">USER_NICENAME</b>/</label>
26
</td>
@@ -29,8 +29,8 @@
29
<th><label><?php _e('Members Search Type', 'wpforo'); ?>:</label></label></th>
30
<td>
31
<div class="wpf-switch-field">
32
- <input type="radio" value="search" name="wpforo_member_options[search_type]" id="wpf_new_topic_notify_search" <?php wpfo_check($wpforo->member->options['search_type'], 'search'); ?>><label for="wpf_new_topic_notify_search"><?php _e('Search', 'wpforo'); ?></label> &nbsp;
33
- <input type="radio" value="filter" name="wpforo_member_options[search_type]" id="wpf_new_topic_notify_filter" <?php wpfo_check($wpforo->member->options['search_type'], 'filter'); ?>><label for="wpf_new_topic_notify_filter"><?php _e('Filter', 'wpforo'); ?></label>
34
</div>
35
</td>
36
</tr>
@@ -47,9 +47,9 @@
47
</th>
48
<td>
49
<ul>
50
- <li><?php echo trim(get_bloginfo('url'),'/'); ?><input style="width:30%;padding: 3px 10px 3px 3px; vertical-align:middle; font-size:13px" type="text" name="wpforo_member_options[login_url]" value="<?php wpfo($wpforo->member->options['login_url']) ?>" /> &nbsp;<label style="font-size:13px"><?php _e('Login URL', 'wpforo') ?></label></li>
51
- <li><?php echo trim(get_bloginfo('url'),'/'); ?><input style="width:30%;padding: 3px 10px 3px 3px; vertical-align:middle; font-size:13px" type="text" name="wpforo_member_options[register_url]" value="<?php wpfo($wpforo->member->options['register_url']) ?>" /> &nbsp;<label style="font-size:13px"><?php _e('Register URL', 'wpforo') ?></label></li>
52
- <li><?php echo trim(get_bloginfo('url'),'/'); ?><input style="width:30%;padding: 3px 10px 3px 3px; vertical-align:middle; font-size:13px" type="text" name="wpforo_member_options[lost_password_url]" value="<?php wpfo($wpforo->member->options['lost_password_url']) ?>" /> &nbsp;<label style="font-size:13px"><?php _e('Lost Password URL', 'wpforo') ?></label></li>
53
</ul>
54
</td>
55
</tr>
@@ -59,9 +59,18 @@
59
</th>
60
</tr>
61
<tr>
62
- <th><label><?php _e('Default title', 'wpforo'); ?>:</label></th>
63
<td>
64
- <input class="wpf-field-small" type="text" name="wpforo_member_options[default_title]" value="<?php wpfo($wpforo->member->options['default_title']) ?>" />
65
</td>
66
</tr>
67
<tr>
@@ -77,19 +86,19 @@
77
<th style="text-align:center;width:10%;"><?php _e('Rating Color', 'wpforo'); ?></th>
78
<th style="width:20%;"><?php _e('Rating Icon', 'wpforo'); ?> | <a href="http://fontawesome.io/icons/" target="_blank" style="text-decoration:none;"><?php _e('More', 'wpforo'); ?>&raquo;</a></th>
79
</tr>
80
- <?php $levels = $wpforo->member->levels(); ?>
81
<?php foreach( $levels as $level ): ?>
82
<tr>
83
<td><h4><?php _e('Level', 'wpforo'); ?> <?php echo esc_html($level) ?></h4></td>
84
- <td><input type="number" value="<?php echo $wpforo->member->rating($level, 'points') ?>" name="wpforo_member_options[rating][<?php echo esc_attr($level) ?>][points]" placeholder="<?php _e('Number of Posts', 'wpforo'); ?>"></td>
85
- <td style="text-align:center;"><input type="text" value="<?php echo $wpforo->member->rating($level, 'title') ?>" name="wpforo_member_options[rating][<?php echo esc_attr($level) ?>][title]" placeholder="<?php _e('Custom Title', 'wpforo'); ?>"></td>
86
- <td style="text-align:center;"><div class="wpf-badge-short wpf-badge-level-<?php echo esc_attr($level) ?>" style="background-color:<?php echo $wpforo->member->rating($level, 'color') ?>;"><?php echo $wpforo->member->rating_badge($level, 'short'); ?></div></td>
87
- <td style="text-align:center;"><div class="wpf-badge-full wpf-badge-level-<?php echo esc_attr($level) ?>" style="color:<?php echo $wpforo->member->rating($level, 'color') ?>;"><?php echo $wpforo->member->rating_badge($level, 'full'); ?></div></td>
88
- <td style="text-align:center;"><input type="color" value="<?php echo $wpforo->member->rating($level, 'color') ?>" name="wpforo_member_options[rating][<?php echo esc_attr($level) ?>][color]" placeholder="<?php _e('Color', 'wpforo'); ?>"></td>
89
- <td><input type="text" value="<?php echo $wpforo->member->rating($level, 'icon') ?>" name="wpforo_member_options[rating][<?php echo esc_attr($level) ?>][icon]" placeholder="<?php _e('Badge Icon', 'wpforo'); ?>"></td>
90
</tr>
91
<?php endforeach; ?>
92
- <?php $ugroups = $wpforo->usergroup->usergroup_list_data(); ?>
93
<tr>
94
<td colspan="3">
95
<label style="text-transform:none;font-size: 14px; font-weight: 500; line-height:20px; padding:0px;"><?php _e('Enable Reputation Titles for selected usergroups', 'wpforo'); ?></label>
@@ -98,7 +107,7 @@
98
<td colspan="4">
99
<?php
100
foreach($ugroups as $ugroup){
101
- $value = ( isset($wpforo->member->options['rating_title_ug'][$ugroup['groupid']]) ) ? $wpforo->member->options['rating_title_ug'][$ugroup['groupid']] : 0;
102
echo '<label style="display:inline-block; text-align:center;"><input name="wpforo_member_options[rating_title_ug]['.intval($ugroup['groupid']).']" value="1" type="checkbox" ' . wpfo_check(1, $value, 'checked', false) . ' /> '.esc_html($ugroup['name']).'</label>';
103
}
104
?>
@@ -112,7 +121,7 @@
112
<td colspan="4">
113
<?php
114
foreach($ugroups as $ugroup){
115
- $value = ( isset($wpforo->member->options['rating_badge_ug'][$ugroup['groupid']]) ) ? $wpforo->member->options['rating_badge_ug'][$ugroup['groupid']] : 0;
116
echo '<label style="display:inline-block; text-align:center;"><input name="wpforo_member_options[rating_badge_ug]['.intval($ugroup['groupid']).']" value="1" type="checkbox" ' . wpfo_check(1, $value, 'checked', false) . ' /> '.esc_html($ugroup['name']).'</label>';
117
}
118
?>
@@ -125,7 +134,7 @@
125
<td colspan="4">
126
<?php
127
foreach($ugroups as $ugroup){
128
- $value = ( isset($wpforo->member->options['title_usergroup'][$ugroup['groupid']]) ) ? $wpforo->member->options['title_usergroup'][$ugroup['groupid']] : 0;
129
echo '<label style="display:inline-block; text-align:center;"><input name="wpforo_member_options[title_usergroup]['.intval($ugroup['groupid']).']" value="1" type="checkbox" ' . wpfo_check(1, $value, 'checked', false) . ' /> '.esc_html($ugroup['name']).'</label>';
130
}
131
?>
@@ -136,7 +145,7 @@
136
137
</td>
138
</tr>
139
- <?php do_action( 'wpforo_settings_members_bottom', $wpforo ); ?>
140
</tbody>
141
</table>
142
<div class="wpforo_settings_foot">
8
<?php wp_nonce_field( 'wpforo-settings-members' ); ?>
9
<table class="wpforo_settings_table">
10
<tbody>
11
+ <?php do_action('wpforo_settings_members_top'); ?>
12
<tr>
13
<th><label><?php _e('Online status timeout', 'wpforo'); ?>:</label></th>
14
<td>
15
+ <?php $online_timeout = wpfo(WPF()->member->options['online_status_timeout'], false) ?>
16
<input name="wpforo_member_options[online_status_timeout]" type="number" min="1" value="<?php echo intval($online_timeout / 60 ) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo'); ?>
17
</td>
18
</tr>
20
<th><label><?php _e('Members URL structure', 'wpforo'); ?>:</label></th>
21
<td>
22
<?php $opt_id_attr = ''; $opt_nicename_attr = ''; ?>
23
+ <?php if( wpfo(WPF()->member->options['url_structure'], false) == 'id' ){ $opt_id_attr = 'checked="checked"'; }else{ $opt_nicename_attr = 'checked="checked"'; } ?>
24
<input id="id" type="radio" name="wpforo_member_options[url_structure]" value="id" <?php echo $opt_id_attr ?>/><label style="color: gray" for="id"><?php echo wpforo_home_url() ?>profile/<b style="color: #4093bf">USER_ID</b>/</label><br/>
25
<input id="nicename" type="radio" name="wpforo_member_options[url_structure]" value="nicename" <?php echo $opt_nicename_attr ?>/><label style="color: gray" for="nicename"><?php echo wpforo_home_url() ?>profile/<b style="color: #4093bf">USER_NICENAME</b>/</label>
26
</td>
29
<th><label><?php _e('Members Search Type', 'wpforo'); ?>:</label></label></th>
30
<td>
31
<div class="wpf-switch-field">
32
+ <input type="radio" value="search" name="wpforo_member_options[search_type]" id="wpf_new_topic_notify_search" <?php wpfo_check(WPF()->member->options['search_type'], 'search'); ?>><label for="wpf_new_topic_notify_search"><?php _e('Search', 'wpforo'); ?></label> &nbsp;
33
+ <input type="radio" value="filter" name="wpforo_member_options[search_type]" id="wpf_new_topic_notify_filter" <?php wpfo_check(WPF()->member->options['search_type'], 'filter'); ?>><label for="wpf_new_topic_notify_filter"><?php _e('Filter', 'wpforo'); ?></label>
34
</div>
35
</td>
36
</tr>
47
</th>
48
<td>
49
<ul>
50
+ <li><?php echo trim(get_bloginfo('url'),'/'); ?><input style="width:30%;padding: 3px 10px 3px 3px; vertical-align:middle; font-size:13px" type="text" name="wpforo_member_options[login_url]" value="<?php wpfo(WPF()->member->options['login_url']) ?>" /> &nbsp;<label style="font-size:13px"><?php _e('Login URL', 'wpforo') ?></label></li>
51
+ <li><?php echo trim(get_bloginfo('url'),'/'); ?><input style="width:30%;padding: 3px 10px 3px 3px; vertical-align:middle; font-size:13px" type="text" name="wpforo_member_options[register_url]" value="<?php wpfo(WPF()->member->options['register_url']) ?>" /> &nbsp;<label style="font-size:13px"><?php _e('Register URL', 'wpforo') ?></label></li>
52
+ <li><?php echo trim(get_bloginfo('url'),'/'); ?><input style="width:30%;padding: 3px 10px 3px 3px; vertical-align:middle; font-size:13px" type="text" name="wpforo_member_options[lost_password_url]" value="<?php wpfo(WPF()->member->options['lost_password_url']) ?>" /> &nbsp;<label style="font-size:13px"><?php _e('Lost Password URL', 'wpforo') ?></label></li>
53
</ul>
54
</td>
55
</tr>
59
</th>
60
</tr>
61
<tr>
62
+ <th><label><?php _e('Member Custom Titles', 'wpforo'); ?>:</label></th>
63
<td>
64
+ <div class="wpf-switch-field">
65
+ <input type="radio" value="1" name="wpforo_member_options[custom_title_is_on]" id="custom_title_is_on_1" <?php wpfo_check(WPF()->member->options['custom_title_is_on'], 1); ?>><label for="custom_title_is_on_1"><?php _e('Enable', 'wpforo'); ?></label> &nbsp;
66
+ <input type="radio" value="0" name="wpforo_member_options[custom_title_is_on]" id="custom_title_is_on_0" <?php wpfo_check(WPF()->member->options['custom_title_is_on'], 0); ?>><label for="custom_title_is_on_0"><?php _e('Disable', 'wpforo'); ?></label>
67
+ </div>
68
+ </td>
69
+ </tr>
70
+ <tr>
71
+ <th><label><?php _e('Member Custom Title by default', 'wpforo'); ?>:</label></th>
72
+ <td>
73
+ <input class="wpf-field-small" type="text" name="wpforo_member_options[default_title]" value="<?php wpfo(WPF()->member->options['default_title']) ?>" />
74
</td>
75
</tr>
76
<tr>
86
<th style="text-align:center;width:10%;"><?php _e('Rating Color', 'wpforo'); ?></th>
87
<th style="width:20%;"><?php _e('Rating Icon', 'wpforo'); ?> | <a href="http://fontawesome.io/icons/" target="_blank" style="text-decoration:none;"><?php _e('More', 'wpforo'); ?>&raquo;</a></th>
88
</tr>
89
+ <?php $levels = WPF()->member->levels(); ?>
90
<?php foreach( $levels as $level ): ?>
91
<tr>
92
<td><h4><?php _e('Level', 'wpforo'); ?> <?php echo esc_html($level) ?></h4></td>
93
+ <td><input type="number" value="<?php echo WPF()->member->rating($level, 'points') ?>" name="wpforo_member_options[rating][<?php echo esc_attr($level) ?>][points]" placeholder="<?php _e('Number of Posts', 'wpforo'); ?>"></td>
94
+ <td style="text-align:center;"><input type="text" value="<?php echo WPF()->member->rating($level, 'title') ?>" name="wpforo_member_options[rating][<?php echo esc_attr($level) ?>][title]" placeholder="<?php _e('Custom Title', 'wpforo'); ?>"></td>
95
+ <td style="text-align:center;"><div class="wpf-badge-short wpf-badge-level-<?php echo esc_attr($level) ?>" style="background-color:<?php echo WPF()->member->rating($level, 'color') ?>;"><?php echo WPF()->member->rating_badge($level, 'short'); ?></div></td>
96
+ <td style="text-align:center;"><div class="wpf-badge-full wpf-badge-level-<?php echo esc_attr($level) ?>" style="color:<?php echo WPF()->member->rating($level, 'color') ?>;"><?php echo WPF()->member->rating_badge($level, 'full'); ?></div></td>
97
+ <td style="text-align:center;"><input type="color" value="<?php echo WPF()->member->rating($level, 'color') ?>" name="wpforo_member_options[rating][<?php echo esc_attr($level) ?>][color]" placeholder="<?php _e('Color', 'wpforo'); ?>"></td>
98
+ <td><input type="text" value="<?php echo WPF()->member->rating($level, 'icon') ?>" name="wpforo_member_options[rating][<?php echo esc_attr($level) ?>][icon]" placeholder="<?php _e('Badge Icon', 'wpforo'); ?>"></td>
99
</tr>
100
<?php endforeach; ?>
101
+ <?php $ugroups = WPF()->usergroup->usergroup_list_data(); ?>
102
<tr>
103
<td colspan="3">
104
<label style="text-transform:none;font-size: 14px; font-weight: 500; line-height:20px; padding:0px;"><?php _e('Enable Reputation Titles for selected usergroups', 'wpforo'); ?></label>
107
<td colspan="4">
108
<?php
109
foreach($ugroups as $ugroup){
110
+ $value = ( isset(WPF()->member->options['rating_title_ug'][$ugroup['groupid']]) ) ? WPF()->member->options['rating_title_ug'][$ugroup['groupid']] : 0;
111
echo '<label style="display:inline-block; text-align:center;"><input name="wpforo_member_options[rating_title_ug]['.intval($ugroup['groupid']).']" value="1" type="checkbox" ' . wpfo_check(1, $value, 'checked', false) . ' /> '.esc_html($ugroup['name']).'</label>';
112
}
113
?>
121
<td colspan="4">
122
<?php
123
foreach($ugroups as $ugroup){
124
+ $value = ( isset(WPF()->member->options['rating_badge_ug'][$ugroup['groupid']]) ) ? WPF()->member->options['rating_badge_ug'][$ugroup['groupid']] : 0;
125
echo '<label style="display:inline-block; text-align:center;"><input name="wpforo_member_options[rating_badge_ug]['.intval($ugroup['groupid']).']" value="1" type="checkbox" ' . wpfo_check(1, $value, 'checked', false) . ' /> '.esc_html($ugroup['name']).'</label>';
126
}
127
?>
134
<td colspan="4">
135
<?php
136
foreach($ugroups as $ugroup){
137
+ $value = ( isset(WPF()->member->options['title_usergroup'][$ugroup['groupid']]) ) ? WPF()->member->options['title_usergroup'][$ugroup['groupid']] : 0;
138
echo '<label style="display:inline-block; text-align:center;"><input name="wpforo_member_options[title_usergroup]['.intval($ugroup['groupid']).']" value="1" type="checkbox" ' . wpfo_check(1, $value, 'checked', false) . ' /> '.esc_html($ugroup['name']).'</label>';
139
}
140
?>
145
146
</td>
147
</tr>
148
+ <?php do_action('wpforo_settings_members_bottom'); ?>
149
</tbody>
150
</table>
151
<div class="wpforo_settings_foot">
wpf-admin/options-tabs/posts.php CHANGED
@@ -4,35 +4,35 @@
4
if( !current_user_can('administrator') ) exit;
5
?>
6
7
- <?php if(!isset($wpforo->post->options['max_upload_size'])){ $upload_max_filesize = @ini_get('upload_max_filesize'); $upload_max_filesize = wpforo_human_size_to_bytes($upload_max_filesize); if( !$upload_max_filesize || $upload_max_filesize > 10485760 ) $upload_max_filesize = 10485760; $wpforo->post->options['max_upload_size'] = $upload_max_filesize; } ?>
8
<form action="" method="POST" class="validate">
9
<?php wp_nonce_field( 'wpforo-settings-posts' ); ?>
10
<table class="wpforo_settings_table">
11
<tbody>
12
- <?php do_action( 'wpforo_settings_post_top', $wpforo ); ?>
13
<tr>
14
<th><label for="topics_per_page"><?php _e('Number of Topics per Page', 'wpforo'); ?></label></th>
15
- <td><input id="topics_per_page" type="number" min="1" name="wpforo_post_options[topics_per_page]" value="<?php wpfo($wpforo->post->options['topics_per_page']) ?>" class="wpf-field-small" /></td>
16
</tr>
17
<tr>
18
<th><label for="eot_durr"><?php _e('Allow Edit Own Topic for', 'wpforo'); ?></label></th>
19
- <td><input id="eot_durr" type="number" min="1" name="wpforo_post_options[eot_durr]" value="<?php wpfo($wpforo->post->options['eot_durr']/60) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo') ?></td>
20
</tr>
21
<tr>
22
<th><label for="dot_durr"><?php _e('Allow Delete Own Topic for', 'wpforo'); ?></label></th>
23
- <td><input id="dot_durr" type="number" min="1" name="wpforo_post_options[dot_durr]" value="<?php wpfo($wpforo->post->options['dot_durr']/60) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo') ?></td>
24
</tr>
25
<tr>
26
<th><label for="posts_per_page"><?php _e('Number of Posts per Page', 'wpforo'); ?></label></th>
27
- <td><input id="posts_per_page" type="number" min="1" name="wpforo_post_options[posts_per_page]" value="<?php wpfo($wpforo->post->options['posts_per_page']) ?>" class="wpf-field-small" /></td>
28
</tr>
29
<tr>
30
<th><label for="eor_durr"><?php _e('Allow Edit Own Post for', 'wpforo'); ?></label></th>
31
- <td><input id="eor_durr" type="number" min="1" name="wpforo_post_options[eor_durr]" value="<?php wpfo($wpforo->post->options['eor_durr']/60) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo') ?></td>
32
</tr>
33
<tr>
34
<th><label for="dor_durr"><?php _e('Allow Delete Own post for', 'wpforo'); ?></label></th>
35
- <td><input id="dor_durr" type="number" min="1" name="wpforo_post_options[dor_durr]" value="<?php wpfo($wpforo->post->options['dor_durr']/60) ?>" class="wpf-field-small" />&nbsp; <?php _e('minutes', 'wpforo') ?></td>
36
</tr>
37
38
<tr>
@@ -41,7 +41,7 @@
41
<p class="wpf-info"><?php _e('You can not set this value more than "upload_max_filesize" and "post_max_size". If you want to increase server parameters please contact to your hosting service support.', 'wpforo'); ?></p>
42
</th>
43
<td>
44
- <input type="number" min="1" name="wpforo_post_options[max_upload_size]" value="<?php echo wpforo_print_size($wpforo->post->options['max_upload_size'], false) ?>" class="wpf-field-small" />&nbsp; <?php _e('MB', 'wpforo') ?>
45
<p class="wpf-info">
46
<?php
47
_e('Server "upload_max_filesize" is '); echo ini_get('upload_max_filesize') . '<br/>';
@@ -57,10 +57,10 @@
57
<p class="wpf-info"><?php _e('This message will be displayed when a non-permitted forum member clicks on attached file link in topic and posts.', 'wpforo'); ?></p>
58
</th>
59
<td>
60
- <textarea name="wpforo_post_options[attach_cant_view_msg]"><?php echo esc_textarea( ( !empty( $wpforo->post->options['attach_cant_view_msg'] ) ? $wpforo->post->options['attach_cant_view_msg'] : '' ) ) ?></textarea>
61
</td>
62
</tr>
63
- <?php do_action( 'wpforo_settings_post_bottom', $wpforo ); ?>
64
</tbody>
65
</table>
66
<div class="wpforo_settings_foot">
4
if( !current_user_can('administrator') ) exit;
5
?>
6
7
+ <?php if(!isset(WPF()->post->options['max_upload_size'])){ $upload_max_filesize = @ini_get('upload_max_filesize'); $upload_max_filesize = wpforo_human_size_to_bytes($upload_max_filesize); if( !$upload_max_filesize || $upload_max_filesize > 10485760 ) $upload_max_filesize = 10485760; WPF()->post->options['max_upload_size'] = $upload_max_filesize; } ?>
8
<form action="" method="POST" class="validate">
9
<?php wp_nonce_field( 'wpforo-settings-posts' ); ?>
10
<table class="wpforo_settings_table">
11
<tbody>
12
+ <?php do_action( 'wpforo_settings_post_top'); ?>
13
<tr>
14
<th><label for="topics_per_page"><?php _e('Number of Topics per Page', 'wpforo'); ?></label></th>
15
+ <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>
16
</tr>
17
<tr>
18
<th><label for="eot_durr"><?php _e('Allow Edit Own Topic for', 'wpforo'); ?></label></th>
19
+ <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>
20
</tr>
21
<tr>
22
<th><label for="dot_durr"><?php _e('Allow Delete Own Topic for', 'wpforo'); ?></label></th>
23
+ <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>
24
</tr>
25
<tr>
26
<th><label for="posts_per_page"><?php _e('Number of Posts per Page', 'wpforo'); ?></label></th>
27
+ <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>
28
</tr>
29
<tr>
30
<th><label for="eor_durr"><?php _e('Allow Edit Own Post for', 'wpforo'); ?></label></th>
31
+ <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>
32
</tr>
33
<tr>
34
<th><label for="dor_durr"><?php _e('Allow Delete Own post for', 'wpforo'); ?></label></th>
35
+ <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>
36
</tr>
37
38
<tr>
41
<p class="wpf-info"><?php _e('You can not set this value more than "upload_max_filesize" and "post_max_size". If you want to increase server parameters please contact to your hosting service support.', 'wpforo'); ?></p>
42
</th>
43
<td>
44
+ <input type="number" min="1" name="wpforo_post_options[max_upload_size]" value="<?php echo wpforo_print_size(WPF()->post->options['max_upload_size'], false) ?>" class="wpf-field-small" />&nbsp; <?php _e('MB', 'wpforo') ?>
45
<p class="wpf-info">
46
<?php
47
_e('Server "upload_max_filesize" is '); echo ini_get('upload_max_filesize') . '<br/>';
57
<p class="wpf-info"><?php _e('This message will be displayed when a non-permitted forum member clicks on attached file link in topic and posts.', 'wpforo'); ?></p>
58
</th>
59
<td>
60
+ <textarea name="wpforo_post_options[attach_cant_view_msg]"><?php echo esc_textarea( ( !empty( WPF()->post->options['attach_cant_view_msg'] ) ? WPF()->post->options['attach_cant_view_msg'] : '' ) ) ?></textarea>
61
</td>
62
</tr>
63
+ <?php do_action('wpforo_settings_post_bottom'); ?>
64
</tbody>
65
</table>
66
<div class="wpforo_settings_foot">
wpf-admin/options-tabs/styles.php CHANGED
@@ -15,19 +15,19 @@
15
<label style="display:inline-block; text-align:center; font-size:14px;">
16
<span><?php _e('Forums','wpforo'); ?>:</span>
17
<select name="wpforo_style_options[font_size_forum]" style="min-width:80px;">
18
- <?php for( $a=11; $a < 28; $a++ ): ?><option value="<?php echo intval($a) ?>" <?php wpfo_check( $wpforo->tpl->style['font_size_forum'], $a, 'selected') ?>><?php echo intval($a); ?>px</option><?php endfor; ?>
19
</select>
20
</label> &nbsp;
21
<label style="display:inline-block; text-align:center; font-size:14px;">
22
<span><?php _e('Topics','wpforo'); ?>:</span>
23
<select name="wpforo_style_options[font_size_topic]" style="min-width:80px;">
24
- <?php for( $a=11; $a < 28; $a++ ): ?><option value="<?php echo intval($a) ?>" <?php wpfo_check( $wpforo->tpl->style['font_size_topic'], $a, 'selected') ?>><?php echo intval($a); ?>px</option><?php endfor; ?>
25
</select>
26
</label> &nbsp;
27
<label style="display:inline-block; text-align:center; font-size:14px;">
28
<span><?php _e('Post Content','wpforo'); ?>:</span>
29
<select name="wpforo_style_options[font_size_post_content]" style="min-width:80px;">
30
- <?php for( $a=11; $a < 28; $a++ ): ?><option value="<?php echo intval($a) ?>" <?php wpfo_check( $wpforo->tpl->style['font_size_post_content'], $a, 'selected') ?>><?php echo intval($a); ?>px</option><?php endfor; ?>
31
</select>
32
</label>
33
</td>
@@ -35,12 +35,12 @@
35
<tr>
36
<th style="width:30%;"><label><?php _e('Custom CSS Code', 'wpforo'); ?>:</label></th>
37
<td>
38
- <textarea name="wpforo_style_options[custom_css]" style="width:90%; height:130px; font-family:Consolas, 'Andale Mono', 'Lucida Console'; color:#666666; background:#fdfdfd;"><?php echo esc_textarea(stripslashes($wpforo->tpl->style['custom_css'])); ?></textarea>
39
</td>
40
</tr>
41
</tbody>
42
</table>
43
- <h3 style="margin:0px 20px 0px 20px; padding:10px 0px; border-bottom:3px solid #F5F5F5;"><?php _e('Forum Color Styles', 'wpforo'); ?></h3>
44
<table style="width:95%; border:none; padding:5px; margin-left:10px; margin-top:15px;">
45
<tbody>
46
<tr class="form-field form-required">
@@ -51,28 +51,28 @@
51
#<div style="clear:both;"></div>
52
</td>
53
</tr>
54
- <?php foreach( $wpforo->tpl->options['styles']['default'] as $color_key => $color_value ): ?>
55
<tr>
56
<td>
57
- <div style="line-height:29px; font-size:14px; font-weight:bold;"><?php wpfo($color_key); ?></div>
58
</td>
59
</tr>
60
<?php endforeach; ?>
61
</table>
62
- <?php foreach( $wpforo->tpl->options['styles'] as $style => $colors ): ?>
63
- <table class="wpforo-style-color-wrapper" style="border-right:2px solid #eee; margin-right:10px; padding-left:5px; <?php echo ( $style == $wpforo->tpl->options['style'] ) ? 'background: #E8FFE5; width: 200px; text-align: center;' : 'background: transparent'; ?>">
64
<tr>
65
<td>
66
- <div style="float:left; text-align:center; width:27px;"><input style="margin:0px;" <?php if( $style == $wpforo->tpl->options['style'] ) echo ' checked="checked"'; ?> type="radio" name="wpforo_theme_options[style]" value="<?php wpfo($style) ?>" id="wpforo_stle_<?php wpfo($style) ?>" /></div>
67
<div style="text-transform:uppercase; text-align:left;float:left; font-weight:bold; font-size:14px;"><label for="wpforo_stle_<?php wpfo($style) ?>">&nbsp;<?php wpfo($style) ?></label></div>
68
<div style="clear:both;"></div>
69
</td>
70
</tr>
71
<?php foreach( $colors as $color_key => $color_value ): ?>
72
<tr>
73
- <td>
74
<div class="wpforo-style-field">
75
- <?php if( $style == $wpforo->tpl->options['style'] ): ?>
76
<input class="wpforo-color-field" name="wpforo_theme_options[styles][<?php wpfo($style) ?>][<?php wpfo($color_key); ?>]" type="text" value="<?php wpfo(strtoupper($color_value)); ?>" title="<?php wpfo(strtoupper($color_value)); ?>" />
77
<?php else: ?>
78
<input style="width:90%;height: 22.5px; box-sizing:border-box; padding:0px;" name="wpforo_theme_options[styles][<?php wpfo($style) ?>][<?php wpfo($color_key); ?>]" type="color" value="<?php wpfo(strtoupper($color_value)); ?>" title="<?php wpfo(strtoupper($color_value)); ?>" />
15
<label style="display:inline-block; text-align:center; font-size:14px;">
16
<span><?php _e('Forums','wpforo'); ?>:</span>
17
<select name="wpforo_style_options[font_size_forum]" style="min-width:80px;">
18
+ <?php for( $a=11; $a < 28; $a++ ): ?><option value="<?php echo intval($a) ?>" <?php wpfo_check( WPF()->tpl->style['font_size_forum'], $a, 'selected') ?>><?php echo intval($a); ?>px</option><?php endfor; ?>
19
</select>
20
</label> &nbsp;
21
<label style="display:inline-block; text-align:center; font-size:14px;">
22
<span><?php _e('Topics','wpforo'); ?>:</span>
23
<select name="wpforo_style_options[font_size_topic]" style="min-width:80px;">
24
+ <?php for( $a=11; $a < 28; $a++ ): ?><option value="<?php echo intval($a) ?>" <?php wpfo_check( WPF()->tpl->style['font_size_topic'], $a, 'selected') ?>><?php echo intval($a); ?>px</option><?php endfor; ?>
25
</select>
26
</label> &nbsp;
27
<label style="display:inline-block; text-align:center; font-size:14px;">
28
<span><?php _e('Post Content','wpforo'); ?>:</span>
29
<select name="wpforo_style_options[font_size_post_content]" style="min-width:80px;">
30
+ <?php for( $a=11; $a < 28; $a++ ): ?><option value="<?php echo intval($a) ?>" <?php wpfo_check( WPF()->tpl->style['font_size_post_content'], $a, 'selected') ?>><?php echo intval($a); ?>px</option><?php endfor; ?>
31
</select>
32
</label>
33
</td>
35
<tr>
36
<th style="width:30%;"><label><?php _e('Custom CSS Code', 'wpforo'); ?>:</label></th>
37
<td>
38
+ <textarea name="wpforo_style_options[custom_css]" style="width:90%; height:130px; font-family:Consolas, 'Andale Mono', 'Lucida Console'; color:#666666; background:#fdfdfd;"><?php echo esc_textarea(stripslashes(WPF()->tpl->style['custom_css'])); ?></textarea>
39
</td>
40
</tr>
41
</tbody>
42
</table>
43
+ <h3 style="margin:0px 20px 0px 20px; padding:10px 0px; border-bottom:3px solid #F5F5F5;"><?php _e('Forum Color Styles', 'wpforo'); ?> &nbsp;|&nbsp; <a href="https://wpforo.com/docs/root/forum-themes/theme-styles/" target="_blank" style="font-size:13px; text-decoration:none;"><?php _e('Documentation', 'wpforo'); ?> &raquo;</a></h3>
44
<table style="width:95%; border:none; padding:5px; margin-left:10px; margin-top:15px;">
45
<tbody>
46
<tr class="form-field form-required">
51
#<div style="clear:both;"></div>
52
</td>
53
</tr>
54
+ <?php foreach( WPF()->tpl->options['styles']['default'] as $color_key => $color_value ): ?>
55
<tr>
56
<td>
57
+ <div style="line-height:31px; min-height:32px; font-size:14px; font-weight:bold;"><?php wpfo($color_key); ?></div>
58
</td>
59
</tr>
60
<?php endforeach; ?>
61
</table>
62
+ <?php foreach( WPF()->tpl->options['styles'] as $style => $colors ): ?>
63
+ <table class="wpforo-style-color-wrapper" style="border-right:2px solid #eee; margin-right:10px; padding-left:5px; <?php echo ( $style == WPF()->tpl->options['style'] ) ? 'background: #E8FFE5; width: 200px; text-align: center;' : 'background: transparent'; ?>">
64
<tr>
65
<td>
66
+ <div style="float:left; text-align:center; width:27px;"><input style="margin:0px;" <?php if( $style == WPF()->tpl->options['style'] ) echo ' checked="checked"'; ?> type="radio" name="wpforo_theme_options[style]" value="<?php wpfo($style) ?>" id="wpforo_stle_<?php wpfo($style) ?>" /></div>
67
<div style="text-transform:uppercase; text-align:left;float:left; font-weight:bold; font-size:14px;"><label for="wpforo_stle_<?php wpfo($style) ?>">&nbsp;<?php wpfo($style) ?></label></div>
68
<div style="clear:both;"></div>
69
</td>
70
</tr>
71
<?php foreach( $colors as $color_key => $color_value ): ?>
72
<tr>
73
+ <td style="border-bottom:1px solid #ddd;">
74
<div class="wpforo-style-field">
75
+ <?php if( $style == WPF()->tpl->options['style'] ): ?>
76
<input class="wpforo-color-field" name="wpforo_theme_options[styles][<?php wpfo($style) ?>][<?php wpfo($color_key); ?>]" type="text" value="<?php wpfo(strtoupper($color_value)); ?>" title="<?php wpfo(strtoupper($color_value)); ?>" />
77
<?php else: ?>
78
<input style="width:90%;height: 22.5px; box-sizing:border-box; padding:0px;" name="wpforo_theme_options[styles][<?php wpfo($style) ?>][<?php wpfo($color_key); ?>]" type="color" value="<?php wpfo(strtoupper($color_value)); ?>" title="<?php wpfo(strtoupper($color_value)); ?>" />
wpf-admin/options.php CHANGED
@@ -6,7 +6,7 @@
6
7
<?php $plugins = true; ?>
8
<div id="icon-tools" class="icon32"><br></div><div class="wrap"><h2 style="padding:20px 0px 30px 0px;line-height: 20px;"><?php _e('Forum Settings') ?></h2></div>
9
- <?php $wpforo->notice->show(FALSE) ?>
10
<?php do_action('wpforo_settings_page_top') ?>
11
<div id="wpf-admin-wrap" class="wrap"><div id="icon-users" class="icon32"><br /></div>
12
<?php
@@ -17,9 +17,10 @@
17
'posts' => __('Topics &amp; Posts', 'wpforo'),
18
'members' => __('Members', 'wpforo'),
19
'emails' => __('Emails', 'wpforo'),
20
- 'features' => __('Features', 'wpforo')
21
);
22
- if( !empty( $wpforo->tpl->options['styles'] ) ) $tabs['styles'] = __('Styles', 'wpforo');
23
if( $plugins ) $tabs['plugins'] = __('Addons', 'wpforo');
24
wpforo_admin_options_tabs( $tabs, ( isset($_GET['tab']) ? $_GET['tab'] : 'general' ) );
25
?>
@@ -48,6 +49,9 @@
48
case 'emails':
49
include( 'options-tabs/emails.php' );
50
break;
51
case 'plugins':
52
include( 'options-tabs/plugins.php' );
53
break;
6
7
<?php $plugins = true; ?>
8
<div id="icon-tools" class="icon32"><br></div><div class="wrap"><h2 style="padding:20px 0px 30px 0px;line-height: 20px;"><?php _e('Forum Settings') ?></h2></div>
9
+ <?php WPF()->notice->show(FALSE) ?>
10
<?php do_action('wpforo_settings_page_top') ?>
11
<div id="wpf-admin-wrap" class="wrap"><div id="icon-users" class="icon32"><br /></div>
12
<?php
17
'posts' => __('Topics &amp; Posts', 'wpforo'),
18
'members' => __('Members', 'wpforo'),
19
'emails' => __('Emails', 'wpforo'),
20
+ 'features' => __('Features', 'wpforo'),
21
);
22
+ if( !empty( WPF()->tpl->options['styles'] ) ) $tabs['styles'] = __('Styles', 'wpforo');
23
+ $tabs['api'] = __('API\'s', 'wpforo');
24
if( $plugins ) $tabs['plugins'] = __('Addons', 'wpforo');
25
wpforo_admin_options_tabs( $tabs, ( isset($_GET['tab']) ? $_GET['tab'] : 'general' ) );
26
?>
49
case 'emails':
50
include( 'options-tabs/emails.php' );
51
break;
52
+ case 'api':
53
+ include( 'options-tabs/api.php' );
54
+ break;
55
case 'plugins':
56
include( 'options-tabs/plugins.php' );
57
break;
wpf-admin/phrase.php CHANGED
@@ -8,7 +8,7 @@
8
<?php wpforo_screen_option() ?>
9
<div id="icon-users" class="icon32"><br></div>
10
<h2 style="padding:30px 0px 0px 0px;line-height: 20px; margin-bottom:15px;"><?php _e('Front-end Phrases', 'wpforo'); ?> &nbsp;<a href="<?php echo admin_url( 'admin.php?page=wpforo-phrases&action=add' ) ?>" class="add-new-h2"><?php wpforo_phrase('add_new') ?></a></h2>
11
- <?php $wpforo->notice->show(FALSE) ?>
12
<?php
13
if( !((isset($_GET['action']) && $_GET['action'] != '-1') || (isset($_GET['action2']) && $_GET['action2'] != '-1')) ){
14
$fields = array( 'phrase_key', 'phrase_value', 'package' );
@@ -26,7 +26,7 @@
26
<?php foreach($phrase_ids as $phraseid) : ?>
27
<tr class="form-field form-required">
28
<th scope="row">
29
- <?php $data = $wpforo->phrase->get_wpforo_phrase($phraseid); ?>
30
<label for="phrase"> <?php wpforo_phrase('phrase_key'); ?>
31
<span class="description">(<?php echo esc_html($data['phrase_key']); ?>)</span></label>
32
</th>
8
<?php wpforo_screen_option() ?>
9
<div id="icon-users" class="icon32"><br></div>
10
<h2 style="padding:30px 0px 0px 0px;line-height: 20px; margin-bottom:15px;"><?php _e('Front-end Phrases', 'wpforo'); ?> &nbsp;<a href="<?php echo admin_url( 'admin.php?page=wpforo-phrases&action=add' ) ?>" class="add-new-h2"><?php wpforo_phrase('add_new') ?></a></h2>
11
+ <?php WPF()->notice->show(FALSE) ?>
12
<?php
13
if( !((isset($_GET['action']) && $_GET['action'] != '-1') || (isset($_GET['action2']) && $_GET['action2'] != '-1')) ){
14
$fields = array( 'phrase_key', 'phrase_value', 'package' );
26
<?php foreach($phrase_ids as $phraseid) : ?>
27
<tr class="form-field form-required">
28
<th scope="row">
29
+ <?php $data = WPF()->phrase->get_wpforo_phrase($phraseid); ?>
30
<label for="phrase"> <?php wpforo_phrase('phrase_key'); ?>
31
<span class="description">(<?php echo esc_html($data['phrase_key']); ?>)</span></label>
32
</th>
wpf-admin/themes.php CHANGED
@@ -9,7 +9,7 @@
9
<?php _e('Forum Themes', 'wpforo'); ?>
10
<a href="<?php echo admin_url( 'admin.php?page=wpforo-themes&action=add' ) ?>" class="add-new-h2" style="margin-left:10px; display:none;"><?php _e('Add New', 'wpforo'); ?></a>
11
</h2>
12
- <?php $wpforo->notice->show(FALSE) ?>
13
14
<div style="box-shadow:none; margin:25px 0px 20px 0px;" class="wpf-info-bar">
15
<p style="font-size:13px; padding:0px; margin:10px;">
@@ -26,16 +26,16 @@
26
</div>
27
28
<?php
29
- $themes = $wpforo->tpl->find_themes();
30
$theme_count = count($themes);
31
- $wpforo->tpl->theme;
32
if(!empty($themes)):
33
foreach( $themes as $main_file => $theme ):
34
$theme_folder = trim(basename(dirname($main_file)), '/');
35
$theme_url = WPFORO_THEME_URL . '/' . $theme_folder;
36
- $layouts = $wpforo->tpl->find_themes('/'.$theme_folder.'/layouts', 'php', 'layout');
37
- $styles = $wpforo->tpl->find_styles( $theme_folder );
38
- $is_active = ( $wpforo->tpl->theme == $theme_folder ) ? true : false;
39
$theme_archive = get_option( 'wpforo_theme_archive_' . $theme_folder );
40
$has_archive = (!empty($theme_archive)) ? true : false;
41
?>
9
<?php _e('Forum Themes', 'wpforo'); ?>
10
<a href="<?php echo admin_url( 'admin.php?page=wpforo-themes&action=add' ) ?>" class="add-new-h2" style="margin-left:10px; display:none;"><?php _e('Add New', 'wpforo'); ?></a>
11
</h2>
12
+ <?php WPF()->notice->show(FALSE) ?>
13
14
<div style="box-shadow:none; margin:25px 0px 20px 0px;" class="wpf-info-bar">
15
<p style="font-size:13px; padding:0px; margin:10px;">
26
</div>
27
28
<?php
29
+ $themes = WPF()->tpl->find_themes();
30
$theme_count = count($themes);
31
+ WPF()->tpl->theme;
32
if(!empty($themes)):
33
foreach( $themes as $main_file => $theme ):
34
$theme_folder = trim(basename(dirname($main_file)), '/');
35
$theme_url = WPFORO_THEME_URL . '/' . $theme_folder;
36
+ $layouts = WPF()->tpl->find_themes('/'.$theme_folder.'/layouts', 'php', 'layout');
37
+ $styles = WPF()->tpl->find_styles( $theme_folder );
38
+ $is_active = ( WPF()->tpl->theme == $theme_folder ) ? true : false;
39
$theme_archive = get_option( 'wpforo_theme_archive_' . $theme_folder );
40
$has_archive = (!empty($theme_archive)) ? true : false;
41
?>
wpf-admin/tools-tabs/antispam.php CHANGED
@@ -28,8 +28,8 @@
28
<th><label><?php _e('Enable wpForo Spam Control','wpforo'); ?>:</label></th>
29
<td>
30
<div class="wpf-switch-field">
31
- <input id="spam_filter_yes" type="radio" name="wpforo_tools_antispam[spam_filter]" value="1" <?php wpfo_check($wpforo->tools_antispam['spam_filter'], 1); ?>/><label for="spam_filter_yes"><?php _e('Yes','wpforo'); ?></label> &nbsp;
32
- <input id="spam_filter_no" type="radio" name="wpforo_tools_antispam[spam_filter]" value="0" <?php wpfo_check($wpforo->tools_antispam['spam_filter'], 0); ?>/><label for="spam_filter_no"><?php _e('No','wpforo'); ?></label>
33
</div>
34
</td>
35
</tr>
@@ -37,8 +37,8 @@
37
<th><label><?php _e('Ban user when spam is suspicted','wpforo'); ?>:</label></th>
38
<td>
39
<div class="wpf-switch-field">
40
- <input id="spam_user_ban_yes" type="radio" name="wpforo_tools_antispam[spam_user_ban]" value="1" <?php wpfo_check($wpforo->tools_antispam['spam_user_ban'], 1); ?>/><label for="spam_user_ban_yes"><?php _e('Yes','wpforo'); ?></label> &nbsp;
41
- <input id="spam_user_ban_no" type="radio" name="wpforo_tools_antispam[spam_user_ban]" value="0" <?php wpfo_check($wpforo->tools_antispam['spam_user_ban'], 0); ?>/><label for="spam_user_ban_no"><?php _e('No','wpforo'); ?></label>
42
</div>
43
</td>
44
</tr>
@@ -46,18 +46,18 @@
46
<th><label><?php _e('Notify via email when new user is banned','wpforo'); ?>:</label></th>
47
<td>
48
<div class="wpf-switch-field">
49
- <input id="spam_user_ban_notification_yes" type="radio" name="wpforo_tools_antispam[spam_user_ban_notification]" value="1" <?php wpfo_check($wpforo->tools_antispam['spam_user_ban_notification'], 1); ?>/><label for="spam_user_ban_notification_yes"><?php _e('Yes','wpforo'); ?></label> &nbsp;
50
- <input id="spam_user_ban_notification_no" type="radio" name="wpforo_tools_antispam[spam_user_ban_notification]" value="0" <?php wpfo_check($wpforo->tools_antispam['spam_user_ban_notification'], 0); ?>/><label for="spam_user_ban_notification_no"><?php _e('No','wpforo'); ?></label>
51
</div>
52
</td>
53
</tr>
54
<tr>
55
<th><label ><?php _e('Spam Suspicion Level for Topics', 'wpforo'); ?></label></th>
56
- <td><input type="number" min="0" max="100" name="wpforo_tools_antispam[spam_filter_level_topic]" value="<?php wpfo($wpforo->tools_antispam['spam_filter_level_topic']) ?>" class="wpf-field" /></td>
57
</tr>
58
<tr>
59
<th><label ><?php _e('Spam Suspicion Level for Posts', 'wpforo'); ?></label></th>
60
- <td><input type="number" min="0" max="100" name="wpforo_tools_antispam[spam_filter_level_post]" value="<?php wpfo($wpforo->tools_antispam['spam_filter_level_post']) ?>" class="wpf-field" /></td>
61
</tr>
62
<?php if (class_exists('Akismet')): ?>
63
<tr>
@@ -80,20 +80,20 @@
80
<th style="width:65%;">
81
<label ><?php _e('User is New (under hard spam control) during', 'wpforo'); ?></label>
82
</th>
83
- <td><?php _e('first', 'wpforo'); ?> <input type="number" min="0" name="wpforo_tools_antispam[new_user_max_posts]" value="<?php wpfo($wpforo->tools_antispam['new_user_max_posts']) ?>" class="wpf-field" style="width:50px;" /> <?php _e('posts', 'wpforo'); ?></td>
84
</tr>
85
<tr>
86
<th style="width:65%;"><label ><?php _e('Min number of posts to be able attach files', 'wpforo'); ?></label></th>
87
- <td><input type="number" min="0" name="wpforo_tools_antispam[min_number_post_to_attach]" value="<?php wpfo($wpforo->tools_antispam['min_number_post_to_attach']) ?>" class="wpf-field" style="max-width:80px;" /></td>
88
</tr>
89
<tr>
90
<th><label><?php _e('Min number of posts to be able post links', 'wpforo'); ?></label></th>
91
- <td><input type="number" min="0" name="wpforo_tools_antispam[min_number_post_to_link]" value="<?php wpfo($wpforo->tools_antispam['min_number_post_to_link']) ?>" class="wpf-field" style="max-width:80px;" /></td>
92
</tr>
93
<tr>
94
<th colspan="2">
95
<label><?php _e('Do not allow to attach files with following extensions:', 'wpforo'); ?></label>
96
- <textarea name="wpforo_tools_antispam[limited_file_ext]" style="width:100%; height:60px; margin-top:10px; color:#666666; background:#fdfdfd;"><?php echo esc_textarea(stripslashes($wpforo->tools_antispam['limited_file_ext'])); ?></textarea></td>
97
</tr>
98
</tbody>
99
</table>
@@ -122,14 +122,14 @@
122
$level = 0; $color ='';
123
$file = $default_attachments_dir . '/' . $filename;
124
$extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
125
- if( !$level = $wpforo->moderation->spam_file($filename) ) continue;
126
if( $level == 2 ) $color = 'style="color:#EE9900;"';
127
if( $level == 3 ) $color = 'style="color:#FF0000;"';
128
if( $level == 4 ) $color = 'style="color:#BB0000;"';
129
?>
130
<tr>
131
<td class="wpf-spam-item" <?php echo $color; ?> title="<?php echo $upload_dir['baseurl'] .'/wpforo/default_attachments/'. $filename ?>">
132
- <?php if( $wpforo->moderation->spam_file($filename, 'file-open') ): ?>
133
<a href="<?php echo $upload_dir['baseurl'] .'/wpforo/default_attachments/'. $filename ?>" target="_blank" <?php echo $color ?>><?php echo wpforo_text($filename, 50, false); ?></a>
134
<?php else: ?>
135
<?php echo $filename; ?>
28
<th><label><?php _e('Enable wpForo Spam Control','wpforo'); ?>:</label></th>
29
<td>
30
<div class="wpf-switch-field">
31
+ <input id="spam_filter_yes" type="radio" name="wpforo_tools_antispam[spam_filter]" value="1" <?php wpfo_check(WPF()->tools_antispam['spam_filter'], 1); ?>/><label for="spam_filter_yes"><?php _e('Yes','wpforo'); ?></label> &nbsp;
32
+ <input id="spam_filter_no" type="radio" name="wpforo_tools_antispam[spam_filter]" value="0" <?php wpfo_check(WPF()->tools_antispam['spam_filter'], 0); ?>/><label for="spam_filter_no"><?php _e('No','wpforo'); ?></label>
33
</div>
34
</td>
35
</tr>
37
<th><label><?php _e('Ban user when spam is suspicted','wpforo'); ?>:</label></th>
38
<td>
39
<div class="wpf-switch-field">
40
+ <input id="spam_user_ban_yes" type="radio" name="wpforo_tools_antispam[spam_user_ban]" value="1" <?php wpfo_check(WPF()->tools_antispam['spam_user_ban'], 1); ?>/><label for="spam_user_ban_yes"><?php _e('Yes','wpforo'); ?></label> &nbsp;
41
+ <input id="spam_user_ban_no" type="radio" name="wpforo_tools_antispam[spam_user_ban]" value="0" <?php wpfo_check(WPF()->tools_antispam['spam_user_ban'], 0); ?>/><label for="spam_user_ban_no"><?php _e('No','wpforo'); ?></label>
42
</div>
43
</td>
44
</tr>
46
<th><label><?php _e('Notify via email when new user is banned','wpforo'); ?>:</label></th>
47
<td>
48
<div class="wpf-switch-field">
49
+ <input id="spam_user_ban_notification_yes" type="radio" name="wpforo_tools_antispam[spam_user_ban_notification]" value="1" <?php wpfo_check(WPF()->tools_antispam['spam_user_ban_notification'], 1); ?>/><label for="spam_user_ban_notification_yes"><?php _e('Yes','wpforo'); ?></label> &nbsp;
50
+ <input id="spam_user_ban_notification_no" type="radio" name="wpforo_tools_antispam[spam_user_ban_notification]" value="0" <?php wpfo_check(WPF()->tools_antispam['spam_user_ban_notification'], 0); ?>/><label for="spam_user_ban_notification_no"><?php _e('No','wpforo'); ?></label>
51
</div>
52
</td>
53
</tr>
54
<tr>
55
<th><label ><?php _e('Spam Suspicion Level for Topics', 'wpforo'); ?></label></th>
56
+ <td><input type="number" min="0" max="100" name="wpforo_tools_antispam[spam_filter_level_topic]" value="<?php wpfo(WPF()->tools_antispam['spam_filter_level_topic']) ?>" class="wpf-field" /></td>
57
</tr>
58
<tr>
59
<th><label ><?php _e('Spam Suspicion Level for Posts', 'wpforo'); ?></label></th>
60
+ <td><input type="number" min="0" max="100" name="wpforo_tools_antispam[spam_filter_level_post]" value="<?php wpfo(WPF()->tools_antispam['spam_filter_level_post']) ?>" class="wpf-field" /></td>
61
</tr>
62
<?php if (class_exists('Akismet')): ?>
63
<tr>
80
<th style="width:65%;">
81
<label ><?php _e('User is New (under hard spam control) during', 'wpforo'); ?></label>
82
</th>
83
+ <td><?php _e('first', 'wpforo'); ?> <input type="number" min="0" name="wpforo_tools_antispam[new_user_max_posts]" value="<?php wpfo(WPF()->tools_antispam['new_user_max_posts']) ?>" class="wpf-field" style="width:50px;" /> <?php _e('posts', 'wpforo'); ?></td>
84
</tr>
85
<tr>
86
<th style="width:65%;"><label ><?php _e('Min number of posts to be able attach files', 'wpforo'); ?></label></th>
87
+ <td><input type="number" min="0" name="wpforo_tools_antispam[min_number_post_to_attach]" value="<?php wpfo(WPF()->tools_antispam['min_number_post_to_attach']) ?>" class="wpf-field" style="max-width:80px;" /></td>
88
</tr>
89
<tr>
90
<th><label><?php _e('Min number of posts to be able post links', 'wpforo'); ?></label></th>
91
+ <td><input type="number" min="0" name="wpforo_tools_antispam[min_number_post_to_link]" value="<?php wpfo(WPF()->tools_antispam['min_number_post_to_link']) ?>" class="wpf-field" style="max-width:80px;" /></td>
92
</tr>
93
<tr>
94
<th colspan="2">
95
<label><?php _e('Do not allow to attach files with following extensions:', 'wpforo'); ?></label>
96
+ <textarea name="wpforo_tools_antispam[limited_file_ext]" style="width:100%; height:60px; margin-top:10px; color:#666666; background:#fdfdfd;"><?php echo esc_textarea(stripslashes(WPF()->tools_antispam['limited_file_ext'])); ?></textarea></td>
97
</tr>
98
</tbody>
99
</table>
122
$level = 0; $color ='';
123
$file = $default_attachments_dir . '/' . $filename;
124
$extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
125
+ if( !$level = WPF()->moderation->spam_file($filename) ) continue;
126
if( $level == 2 ) $color = 'style="color:#EE9900;"';
127
if( $level == 3 ) $color = 'style="color:#FF0000;"';
128
if( $level == 4 ) $color = 'style="color:#BB0000;"';
129
?>
130
<tr>
131
<td class="wpf-spam-item" <?php echo $color; ?> title="<?php echo $upload_dir['baseurl'] .'/wpforo/default_attachments/'. $filename ?>">
132
+ <?php if( WPF()->moderation->spam_file($filename, 'file-open') ): ?>
133
<a href="<?php echo $upload_dir['baseurl'] .'/wpforo/default_attachments/'. $filename ?>" target="_blank" <?php echo $color ?>><?php echo wpforo_text($filename, 50, false); ?></a>
134
<?php else: ?>
135
<?php echo $filename; ?>
wpf-admin/tools-tabs/cleanup.php CHANGED
@@ -17,16 +17,16 @@
17
<tbody>
18
<tr>
19
<th><label><?php _e('Inactive users who have been registered more than', 'wpforo'); ?></label></th>
20
- <td><input type="number" min="0" max="100" name="wpforo_tools_cleanup[user_reg_days_ago]" value="<?php wpfo($wpforo->tools_cleanup['user_reg_days_ago']) ?>" class="wpf-field" style="width:70px;"/> <span style="white-space:nowrap;"><?php _e('days ago', 'wpforo'); ?></span></td>
21
</tr>
22
- <?php $ugroups = $wpforo->usergroup->usergroup_list_data(); ?>
23
<tr>
24
<td colspan="2">
25
<label style="display:inline-block; border-bottom:1px solid #ccc; padding:0px 50px 5px 10px; margin-bottom:5px;"> <?php _e('Filter by Usergroups', 'wpforo'); ?></label><br>
26
<?php
27
foreach($ugroups as $ugroup){
28
if( $ugroup['groupid'] == 4 ) continue;
29
- $value = ( isset($wpforo->tools_cleanup['usergroup'][$ugroup['groupid']]) ) ? $wpforo->tools_cleanup['usergroup'][$ugroup['groupid']] : 0;
30
echo '<label style="display:inline-block; width:23%; text-align:center;"><input name="wpforo_tools_cleanup[usergroup]['.intval($ugroup['groupid']).']" value="1" type="checkbox" ' . wpfo_check(1, $value, 'checked', false) . ' style="font-size: 12px; height: 24px; width: 100%;" /> '.esc_html($ugroup['name']).'</label>';
31
}
32
?>
@@ -36,8 +36,8 @@
36
<th><label><?php _e('Enable Auto-cleanup of inactive users', 'wpforo'); ?></label></th>
37
<td>
38
<div class="wpf-switch-field">
39
- <input id="auto_cleanup_users_yes" type="radio" name="wpforo_tools_cleanup[auto_cleanup_users]" value="1" <?php wpfo_check($wpforo->tools_cleanup['auto_cleanup_users'], 1); ?>/><label for="auto_cleanup_users_yes"><?php _e('Yes','wpforo'); ?></label> &nbsp;
40
- <input id="auto_cleanup_users_no" type="radio" name="wpforo_tools_cleanup[auto_cleanup_users]" value="0" <?php wpfo_check($wpforo->tools_cleanup['auto_cleanup_users'], 0); ?>/><label for="auto_cleanup_users_no"><?php _e('No','wpforo'); ?></label>
41
</div>
42
</td>
43
</tr>
17
<tbody>
18
<tr>
19
<th><label><?php _e('Inactive users who have been registered more than', 'wpforo'); ?></label></th>
20
+ <td><input type="number" min="0" max="100" name="wpforo_tools_cleanup[user_reg_days_ago]" value="<?php wpfo(WPF()->tools_cleanup['user_reg_days_ago']) ?>" class="wpf-field" style="width:70px;"/> <span style="white-space:nowrap;"><?php _e('days ago', 'wpforo'); ?></span></td>
21
</tr>
22
+ <?php $ugroups = WPF()->usergroup->usergroup_list_data(); ?>
23
<tr>
24
<td colspan="2">
25
<label style="display:inline-block; border-bottom:1px solid #ccc; padding:0px 50px 5px 10px; margin-bottom:5px;"> <?php _e('Filter by Usergroups', 'wpforo'); ?></label><br>
26
<?php
27
foreach($ugroups as $ugroup){
28
if( $ugroup['groupid'] == 4 ) continue;
29
+ $value = ( isset(WPF()->tools_cleanup['usergroup'][$ugroup['groupid']]) ) ? WPF()->tools_cleanup['usergroup'][$ugroup['groupid']] : 0;
30
echo '<label style="display:inline-block; width:23%; text-align:center;"><input name="wpforo_tools_cleanup[usergroup]['.intval($ugroup['groupid']).']" value="1" type="checkbox" ' . wpfo_check(1, $value, 'checked', false) . ' style="font-size: 12px; height: 24px; width: 100%;" /> '.esc_html($ugroup['name']).'</label>';
31
}
32
?>
36
<th><label><?php _e('Enable Auto-cleanup of inactive users', 'wpforo'); ?></label></th>
37
<td>
38
<div class="wpf-switch-field">
39
+ <input id="auto_cleanup_users_yes" type="radio" name="wpforo_tools_cleanup[auto_cleanup_users]" value="1" <?php wpfo_check(WPF()->tools_cleanup['auto_cleanup_users'], 1); ?>/><label for="auto_cleanup_users_yes"><?php _e('Yes','wpforo'); ?></label> &nbsp;
40
+ <input id="auto_cleanup_users_no" type="radio" name="wpforo_tools_cleanup[auto_cleanup_users]" value="0" <?php wpfo_check(WPF()->tools_cleanup['auto_cleanup_users'], 0); ?>/><label for="auto_cleanup_users_no"><?php _e('No','wpforo'); ?></label>
41
</div>
42
</td>
43
</tr>
wpf-admin/tools-tabs/misc.php ADDED
@@ -0,0 +1,39 @@
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-misc' ); ?>
9
+ <div class="wpf-tool-box" style="width:60%;">
10
+ <h3><?php _e('SEO Tools', 'wpforo'); ?>
11
+ <p class="wpf-info"><?php _e('', 'wpforo'); ?></p>
12
+ </h3>
13
+ <div style="margin-top:10px; clear:both;">
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>
34
+ </div>
35
+ </div>
36
+ <div class="wpforo_settings_foot" style="clear:both; margin-top:20px;">
37
+ <input type="submit" class="button button-primary" value="<?php _e('Update Options', 'wpforo'); ?>" />
38
+ </div>
39
+ </form>
wpf-admin/tools.php CHANGED
@@ -6,13 +6,14 @@
6
7
<?php $plugins = true; ?>
8
<div class="wrap"><h2 style="padding:0px 0px 30px 0px;line-height: 20px;"><?php _e('Forum Tools') ?></h2></div>
9
- <?php $wpforo->notice->show(FALSE) ?>
10
<?php do_action('wpforo_tools_page_top') ?>
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
);
17
wpforo_admin_tools_tabs( $tabs, ( isset($_GET['tab']) ? $_GET['tab'] : 'antispam' ) );
18
?>
@@ -24,6 +25,9 @@
24
case 'cleanup':
25
$includefile = 'tools-tabs/cleanup.php';
26
break;
27
}
28
}
29
include_once($includefile);
6
7
<?php $plugins = true; ?>
8
<div class="wrap"><h2 style="padding:0px 0px 30px 0px;line-height: 20px;"><?php _e('Forum Tools') ?></h2></div>
9
+ <?php WPF()->notice->show(FALSE) ?>
10
<?php do_action('wpforo_tools_page_top') ?>
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' ) );
19
?>
25
case 'cleanup':
26
$includefile = 'tools-tabs/cleanup.php';
27
break;
28
+ case 'misc':
29
+ $includefile = 'tools-tabs/misc.php';
30
+ break;
31
}
32
}
33
include_once($includefile);
wpf-admin/usergroup.php CHANGED
@@ -6,7 +6,7 @@
6
7
<div id="wpf-admin-wrap" class="wrap"><div id="icon-users" class="icon32"><br /></div>
8
<h2 style="padding:30px 0px 10px 0px;line-height: 20px;"><?php _e( 'Usergroups', 'wpforo') ?> <a href="<?php echo admin_url( 'admin.php?page=wpforo-usergroups&action=add' ) ?>" class="add-new-h2"><?php _e( 'Add New', 'wpforo') ?></a></h2>
9
- <?php $wpforo->notice->show(FALSE) ?>
10
11
<!-- ############################################################### Usergroup Main Form -->
12
@@ -19,10 +19,12 @@
19
<th scope="col" id="title" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'Usergroup Name', 'wpforo') ?></span></th>
20
<th scope="col" id="count" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'Users Count', 'wpforo') ?></span></th>
21
<th scope="col" id="default" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'New Users Default Group', 'wpforo') ?></span></th>
22
</tr>
23
</thead>
24
<tbody id="the-list">
25
- <?php $ugroups = $wpforo->usergroup->usergroup_list_data(); ?>
26
<?php foreach( $ugroups as $key => $ugroup ) : ?>
27
<?php $bgcolor = ( $key % 2 ) ? '#FFFFFF' : '#FCFCFC' ; ?>
28
<tr id="usergroup-<?php echo intval($ugroup['groupid']) ?>" class="format-standard hentry alternate iedit" valign="top">
@@ -49,13 +51,19 @@
49
</td>
50
<td class="column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; padding-left:20px; background:<?php echo esc_html($bgcolor) ?>;">
51
<strong style="color: #00a636">
52
- <?php if( $ugroup['groupid'] == $wpforo->usergroup->default_groupid ) :
53
_e( 'is Default', 'wpforo' );
54
else : ?>
55
<a class="row-title" href="<?php echo admin_url('admin.php?page=wpforo-usergroups&default=' . intval($ugroup['groupid'])) ?>" title="<?php _e('DO NOT set this option on higher level user groups !!!', 'wpforo') ?>"><?php _e('Set as Default', 'wpforo') ?></a>
56
<?php endif ?>
57
</strong>
58
</td>
59
</tr>
60
<?php endforeach; ?>
61
</tbody>
@@ -79,15 +87,35 @@
79
<?php _e( 'Usergroup Name', 'wpforo'); if( isset($_GET['gid']) && $_GET['gid'] == 4 ) echo '<span>: ' . __('Guest', 'wpforo') . '</span><br><br>'; ?>
80
<?php
81
if(isset( $_GET['gid'] )){
82
- $group = $wpforo->usergroup->get_usergroup($_GET['gid']);
83
$group_name = $group['name'];
84
}else{
85
$group = array();
86
$group_name = '';
87
}
88
?>
89
</div>
90
- <input name="usergroup[name]" <?php echo ( isset($_GET['gid']) && $_GET['gid'] == 4 ) ? 'type="hidden"' : 'type="text"'; ?> value="<?php echo esc_attr($group_name) ?>" required="TRUE" style="background:#FDFDFD; min-width:320px; display:block;"/>