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 | wpForo Forum |
Version | 1.4.3 |
Comparing to | |
See all releases |
Code changes from version 1.4.2 to 1.4.3
- readme.txt +105 -43
- wpf-admin/addons.php +2 -2
- wpf-admin/admin.php +20 -33
- wpf-admin/css/admin.css +1 -1
- wpf-admin/dashboard.php +7 -8
- wpf-admin/forum.php +10 -10
- wpf-admin/member.php +10 -10
- wpf-admin/moderation.php +2 -2
- wpf-admin/options-tabs/accesses.php +3 -3
- wpf-admin/options-tabs/api.php +95 -0
- wpf-admin/options-tabs/emails.php +128 -105
- wpf-admin/options-tabs/features.php +6 -6
- wpf-admin/options-tabs/forums.php +1 -1
- wpf-admin/options-tabs/general.php +13 -13
- wpf-admin/options-tabs/members.php +31 -22
- wpf-admin/options-tabs/posts.php +11 -11
- wpf-admin/options-tabs/styles.php +12 -12
- wpf-admin/options.php +7 -3
- wpf-admin/phrase.php +2 -2
- wpf-admin/themes.php +6 -6
- wpf-admin/tools-tabs/antispam.php +14 -14
- wpf-admin/tools-tabs/cleanup.php +5 -5
- wpf-admin/tools-tabs/misc.php +39 -0
- wpf-admin/tools.php +6 -2
- wpf-admin/usergroup.php +36 -8
- wpf-admin/xml/english.xml +4 -0
- wpf-assets/addons/mycred/header-off.png +0 -0
- wpf-assets/addons/mycred/header.png +0 -0
- wpf-assets/addons/polls/header-off.png +0 -0
- wpf-assets/addons/polls/header.png +0 -0
- wpf-assets/images/loading.gif +0 -0
- wpf-assets/images/sn/fb-m.jpg +0 -0
- wpf-assets/js/ajax.js +11 -6
- wpf-assets/js/frontend.js +12 -15
- wpf-assets/js/snfb.js +8 -0
- wpf-assets/js/tinymce-emoji.js +582 -0
- wpf-includes/class-api.php +172 -0
- wpf-includes/class-cache.php +12 -15
- wpf-includes/class-feed.php +9 -13
- wpf-includes/class-forums.php +107 -106
- wpf-includes/class-members.php +313 -327
- wpf-includes/class-moderation.php +44 -49
- wpf-includes/class-notices.php +89 -96
- wpf-includes/class-permissions.php +52 -54
- wpf-includes/class-phrases.php +36 -41
- wpf-includes/class-posts.php +118 -130
- wpf-includes/class-subscribes.php +29 -27
- wpf-includes/class-template.php +134 -115
- wpf-includes/class-topics.php +142 -135
- wpf-includes/class-usergroups.php +46 -41
- wpf-includes/functions-installation.php +134 -84
- wpf-includes/functions-template.php +127 -143
- wpf-includes/functions.php +173 -116
- wpf-includes/install-sql.php +40 -33
- wpf-includes/wpf-actions.php +161 -136
- wpf-includes/wpf-hooks.php +433 -401
- wpf-includes/wpf-phrases.php +10 -6
- wpf-languages/wpforo-he_IL.mo +0 -0
- wpf-languages/wpforo-he_IL.po +3830 -3298
- wpf-languages/wpforo.pot +549 -300
- wpf-themes/classic/colors.css +21 -12
- wpf-themes/classic/footer.php +7 -7
- wpf-themes/classic/functions.php +58 -35
- wpf-themes/classic/header.php +9 -9
- wpf-themes/classic/index.php +46 -45
- wpf-themes/classic/layouts/1/forum.php +8 -8
- wpf-themes/classic/layouts/1/post.php +12 -13
- wpf-themes/classic/layouts/1/topic.php +7 -7
- wpf-themes/classic/layouts/2/forum.php +7 -7
- wpf-themes/classic/layouts/2/post.php +13 -12
- wpf-themes/classic/layouts/2/topic.php +8 -6
- wpf-themes/classic/layouts/3/forum.php +8 -8
- wpf-themes/classic/layouts/3/post.php +23 -24
- wpf-themes/classic/layouts/3/topic.php +1 -1
readme.txt
CHANGED
@@ -1,18 +1,24 @@
|
|
1 |
-
=== 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.
|
|
|
7 |
License: GPLv2 or later
|
8 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
10 |
-
|
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 |
-
|
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 |
-
|
92 |
|
93 |
-
|
94 |
-
https://wpforo.com/docs/root/getting-started/forum-page/change-forum-page/
|
95 |
|
96 |
-
|
97 |
-
https://wpforo.com/docs/root/getting-started/forum-menu/
|
98 |
|
99 |
-
|
100 |
-
https://wpforo.com/docs/root/getting-started/forum-sidebar-and-widgets/
|
101 |
|
102 |
-
|
103 |
|
104 |
-
|
105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
-
|
7 |
|
8 |
?>
|
9 |
|
@@ -38,7 +38,7 @@
|
|
38 |
<br style="clear:both">
|
39 |
<div class="wpforo-addons-wrapper">
|
40 |
<?php
|
41 |
-
foreach (
|
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 |
-
|
8 |
-
|
9 |
-
$wpforo->moderation->spam_attachment();
|
10 |
|
11 |
$all_count = 0;
|
12 |
-
$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 =
|
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(
|
20 |
-
if(
|
21 |
-
|
22 |
-
|
23 |
-
(
|
24 |
-
|
25 |
-
|
26 |
) add_menu_page(__('Dashboard', 'wpforo'), __('Forums', 'wpforo') . $all_count , 'read', 'wpforo-community', 'wpforo_toplevel_page', 'dashicons-format-chat', $position);
|
27 |
-
if(
|
28 |
-
if(
|
29 |
-
if(
|
30 |
-
if(
|
31 |
-
if(
|
32 |
-
if(
|
33 |
-
if(
|
34 |
-
if(
|
35 |
-
if(
|
36 |
-
if(
|
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:
|
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
|
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
|
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»</a>'; ?> </td>
|
113 |
</tr>
|
|
|
114 |
</table>
|
115 |
</div>
|
116 |
</div>
|
117 |
</div><!-- widget / postbox -->
|
118 |
|
119 |
-
<?php do_action(
|
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 =
|
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',
|
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',
|
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»</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
|
48 |
|
49 |
<!-- Forum Hierarchy -->
|
50 |
<?php if( !isset($_GET['action'])) : ?>
|
51 |
-
<?php if(
|
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
|
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(
|
89 |
-
<?php if(isset($_GET['id'])) $data =
|
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
|
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 =
|
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
|
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
|
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
|
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(
|
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
|
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(
|
19 |
$fields[] = 'user_login';
|
20 |
$search_fields[] = 'user_login';
|
21 |
}
|
22 |
-
if(
|
23 |
$fields[] = 'user_email';
|
24 |
$search_fields[] = 'user_email';
|
25 |
}
|
26 |
-
if(
|
27 |
$fields[] = 'groupid';
|
28 |
$filter_fields[] = 'groupid';
|
29 |
}
|
30 |
-
if(
|
31 |
$fields[] = 'status';
|
32 |
$filter_fields[] = 'status';
|
33 |
}
|
34 |
$fields[] = 'last_login';
|
35 |
$fields[] = 'posts';
|
36 |
-
if(
|
37 |
$search_fields[] = 'signature';
|
38 |
}
|
39 |
$actions = array('button');
|
40 |
-
if(
|
41 |
-
if(
|
42 |
$actions[] = 'ban';
|
43 |
$bulk_actions[] = 'ban';
|
44 |
$bulk_actions[] = 'unban';
|
45 |
}
|
46 |
-
if(
|
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(
|
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
|
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 =
|
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 =
|
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> </p>
|
53 |
|
54 |
<?php
|
55 |
$access_key = ( isset( $_GET['access'] ) ? $_GET['access'] : 0 );
|
56 |
-
$cans =
|
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> </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
|
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'); ?> »</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']); ?>"/> <?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']); ?>"/> <?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>
|
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>
|
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>
|
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>
|
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"> <?php _e('Profile', 'wpforo'); ?> </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"> <?php _e('Forums', 'wpforo'); ?> </label>
|
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"> <?php _e('Custom', 'wpforo'); ?> </label>
|
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']); ?>"/> <?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 |
-
|
9 |
-
|
10 |
-
<
|
11 |
-
<
|
12 |
-
<
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
<
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
<
|
21 |
-
<
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
<
|
28 |
-
<
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
<
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
<
|
40 |
-
<
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
<
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
<
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
<
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
<
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
<
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
<
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
<
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
<
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
<
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
<
|
87 |
-
<
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
<
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
<
|
97 |
-
<
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
<
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>
|
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>
|
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>
|
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(
|
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(
|
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(
|
65 |
<?php if($key == 'copyright') echo '<span style="color:#009900; font-weight:400; font-size:14px;"> Thank you!</span>'; ?>
|
66 |
</div>
|
67 |
</td>
|
68 |
</tr>
|
69 |
<?php endforeach; ?>
|
70 |
-
<?php do_action(
|
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>
|
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;"> 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(
|
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(
|
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(
|
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 (
|
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(
|
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/ <?php echo esc_url( home_url('/') ) ?>hello-world/ ..."
|
35 |
-
><?php echo esc_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 =
|
40 |
-
<?php if(
|
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') . '»</a>' . '</span>'; ?>
|
42 |
<?php else: ?>
|
43 |
-
<?php _e('Forum Page ID', 'wpforo'); ?>: <?php echo
|
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(
|
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(
|
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(
|
63 |
<a href="https://developer.wordpress.org/reference/functions/add_menu_page/" target="_blank" style="text-decoration:none;">More info »</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
|
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">
|
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/ <?php echo esc_url( home_url('/') ) ?>hello-world/ ..."
|
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') . '»</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']); ?>"/>
|
63 |
<a href="https://developer.wordpress.org/reference/functions/add_menu_page/" target="_blank" style="text-decoration:none;">More info »</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(
|
12 |
<tr>
|
13 |
<th><label><?php _e('Online status timeout', 'wpforo'); ?>:</label></th>
|
14 |
<td>
|
15 |
-
<?php $online_timeout = wpfo(
|
16 |
<input name="wpforo_member_options[online_status_timeout]" type="number" min="1" value="<?php echo intval($online_timeout / 60 ) ?>" class="wpf-field-small" /> <?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(
|
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(
|
33 |
-
<input type="radio" value="filter" name="wpforo_member_options[search_type]" id="wpf_new_topic_notify_filter" <?php wpfo_check(
|
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(
|
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(
|
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(
|
53 |
</ul>
|
54 |
</td>
|
55 |
</tr>
|
@@ -59,9 +59,18 @@
|
|
59 |
</th>
|
60 |
</tr>
|
61 |
<tr>
|
62 |
-
<th><label><?php _e('
|
63 |
<td>
|
64 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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'); ?>»</a></th>
|
79 |
</tr>
|
80 |
-
<?php $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
|
85 |
-
<td style="text-align:center;"><input type="text" value="<?php echo
|
86 |
-
<td style="text-align:center;"><div class="wpf-badge-short wpf-badge-level-<?php echo esc_attr($level) ?>" style="background-color:<?php echo
|
87 |
-
<td style="text-align:center;"><div class="wpf-badge-full wpf-badge-level-<?php echo esc_attr($level) ?>" style="color:<?php echo
|
88 |
-
<td style="text-align:center;"><input type="color" value="<?php echo
|
89 |
-
<td><input type="text" value="<?php echo
|
90 |
</tr>
|
91 |
<?php endforeach; ?>
|
92 |
-
<?php $ugroups =
|
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(
|
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(
|
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(
|
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(
|
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" /> <?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>
|
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']) ?>" /> <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']) ?>" /> <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']) ?>" /> <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>
|
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'); ?>»</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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
61 |
</td>
|
62 |
</tr>
|
63 |
-
<?php do_action(
|
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" /> <?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" /> <?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" /> <?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" /> <?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" /> <?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(
|
19 |
</select>
|
20 |
</label>
|
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(
|
25 |
</select>
|
26 |
</label>
|
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(
|
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(
|
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');
|
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(
|
55 |
<tr>
|
56 |
<td>
|
57 |
-
<div style="line-height:
|
58 |
</td>
|
59 |
</tr>
|
60 |
<?php endforeach; ?>
|
61 |
</table>
|
62 |
-
<?php foreach(
|
63 |
-
<table class="wpforo-style-color-wrapper" style="border-right:2px solid #eee; margin-right:10px; padding-left:5px; <?php echo ( $style ==
|
64 |
<tr>
|
65 |
<td>
|
66 |
-
<div style="float:left; text-align:center; width:27px;"><input style="margin:0px;" <?php if( $style ==
|
67 |
<div style="text-transform:uppercase; text-align:left;float:left; font-weight:bold; font-size:14px;"><label for="wpforo_stle_<?php wpfo($style) ?>"> <?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 ==
|
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>
|
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>
|
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'); ?> | <a href="https://wpforo.com/docs/root/forum-themes/theme-styles/" target="_blank" style="font-size:13px; text-decoration:none;"><?php _e('Documentation', 'wpforo'); ?> »</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) ?>"> <?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
|
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 & Posts', 'wpforo'),
|
18 |
'members' => __('Members', 'wpforo'),
|
19 |
'emails' => __('Emails', 'wpforo'),
|
20 |
-
'features' => __('Features', 'wpforo')
|
21 |
);
|
22 |
-
if( !empty(
|
|
|
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 & 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'); ?> <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
|
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 =
|
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'); ?> <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
|
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 =
|
30 |
$theme_count = count($themes);
|
31 |
-
|
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 =
|
37 |
-
$styles =
|
38 |
-
$is_active = (
|
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(
|
32 |
-
<input id="spam_filter_no" type="radio" name="wpforo_tools_antispam[spam_filter]" value="0" <?php wpfo_check(
|
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(
|
41 |
-
<input id="spam_user_ban_no" type="radio" name="wpforo_tools_antispam[spam_user_ban]" value="0" <?php wpfo_check(
|
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(
|
50 |
-
<input id="spam_user_ban_notification_no" type="radio" name="wpforo_tools_antispam[spam_user_ban_notification]" value="0" <?php wpfo_check(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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(
|
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 =
|
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(
|
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>
|
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>
|
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>
|
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(
|
21 |
</tr>
|
22 |
-
<?php $ugroups =
|
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(
|
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(
|
40 |
-
<input id="auto_cleanup_users_no" type="radio" name="wpforo_tools_cleanup[auto_cleanup_users]" value="0" <?php wpfo_check(
|
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>
|
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
|
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
|
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 =
|
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'] ==
|
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 =
|
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;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
</div>
|
92 |
<?php if( isset($_GET['gid']) && $_GET['gid'] == 4 ): ?>
|
93 |
<input type="hidden" name="usergroup[role]" value="" />
|
@@ -104,7 +132,7 @@
|
|
104 |
<div style="display:block; float:left; width:40%;">
|
105 |
<div class="wpf-label-big"><?php _e('Default Forum Access', 'wpforo') ?></div>
|
106 |
<select name="usergroup[access]" style="background:#FDFDFD; display:block;">
|
107 |
-
<?php $accesses =
|
108 |
<?php foreach( $accesses as $accesse ): ?>
|
109 |
<option value="<?php echo esc_attr($accesse['access']) ?>" <?php if( $accesse['access'] == 'standard' ) echo ' selected="selected"'; ?>><?php echo esc_html($accesse['title']) ?></option>
|
110 |
<?php endforeach ?>
|
@@ -117,7 +145,7 @@
|
|
117 |
<div style="clear:both;"></div>
|
118 |
</div>
|
119 |
|
120 |
-
<?php $cans =
|
121 |
<?php $n = 0; foreach( $cans as $can => $data ) : ?>
|
122 |
<?php if( $n%4 == 0 ): ?>
|
123 |
</table>
|
@@ -171,7 +199,7 @@
|
|
171 |
<tr>
|
172 |
<td>
|
173 |
<select id="ug_select" name="usergroup[mergeid]" class="postform" >
|
174 |
-
<?php
|
175 |
</select>
|
176 |
<p><?php _e( 'Users will be join this usergroup', 'wpforo') ?></p>
|
177 |
</td>
|
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 WPF()->notice->show(FALSE) ?>
|
10 |
|
11 |
<!-- ############################################################### Usergroup Main Form -->
|
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 |
+
<th scope="col" id="access" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'Default Access', 'wpforo') ?></span></th>
|
23 |
+
<th scope="col" id="color" class="manage-column column-title" style="padding:10px; font-size:14px; padding-left:15px; font-weight:bold;"><span><?php _e( 'Color', 'wpforo') ?></span></th>
|
24 |
</tr>
|
25 |
</thead>
|
26 |
<tbody id="the-list">
|
27 |
+
<?php $ugroups = WPF()->usergroup->usergroup_list_data(); ?>
|
28 |
<?php foreach( $ugroups as $key => $ugroup ) : ?>
|
29 |
<?php $bgcolor = ( $key % 2 ) ? '#FFFFFF' : '#FCFCFC' ; ?>
|
30 |
<tr id="usergroup-<?php echo intval($ugroup['groupid']) ?>" class="format-standard hentry alternate iedit" valign="top">
|
51 |
</td>
|
52 |
<td class="column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; padding-left:20px; background:<?php echo esc_html($bgcolor) ?>;">
|
53 |
<strong style="color: #00a636">
|
54 |
+
<?php if( $ugroup['groupid'] == WPF()->usergroup->default_groupid ) :
|
55 |
_e( 'is Default', 'wpforo' );
|
56 |
else : ?>
|
57 |
<a class="row-title" href="<?php echo admin_url('admin.php?page=wpforo-usergroups&default=' . intval($ugroup['groupid'])) ?>" title="<?php _e('DO NOT set this option on higher level user groups !!!', 'wpforo') ?>"><?php _e('Set as Default', 'wpforo') ?></a>
|
58 |
<?php endif ?>
|
59 |
</strong>
|
60 |
</td>
|
61 |
+
<td class="column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; padding-left:20px; background:<?php echo esc_html($bgcolor) ?>;">
|
62 |
+
<strong><?php echo $ugroup['access'] ?></strong>
|
63 |
+
</td>
|
64 |
+
<td class="column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; padding-left:20px; background:<?php echo esc_html($bgcolor) ?>;">
|
65 |
+
<strong><?php if(!isset($ugroup['color']) || !$ugroup['color']): ?><?php _e( 'default (#15)', 'wpforo') ?><?php else: ?><input type="color" value="<?php echo $ugroup['color'] ?>" disabled /><?php endif; ?></strong>
|
66 |
+
</td>
|
67 |
</tr>
|
68 |
<?php endforeach; ?>
|
69 |
</tbody>
|
87 |
<?php _e( 'Usergroup Name', 'wpforo'); if( isset($_GET['gid']) && $_GET['gid'] == 4 ) echo '<span>: ' . __('Guest', 'wpforo') . '</span><br><br>'; ?>
|
88 |
<?php
|
89 |
if(isset( $_GET['gid'] )){
|
90 |
+
$group = WPF()->usergroup->get_usergroup($_GET['gid']);
|
91 |
$group_name = $group['name'];
|
92 |
+
$group_color = $group['color'];
|
93 |
}else{
|
94 |
$group = array();
|
95 |
$group_name = '';
|
96 |
+
$group_color = '';
|
97 |
}
|
98 |
?>
|
99 |
</div>
|
100 |
+
<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;"/>
|
101 |
+
<div style="display:inline-block; margin-top:10px;">
|
102 |
+
<label for="wpf_usergroup_color" style="display:inline-block;"><?php _e('Usergroup Color', 'wpforo') ?>: </label>
|
103 |
+
<input id="wpf_usergroup_color" style="display:inline-block; vertical-align:middle; width:100px;" type="color" name="usergroup[color]" onchange="" value="<?php echo $group_color ?>"> <input id="wpf_usergroup_colorx" style="display:inline-block; vertical-align:middle; width:100px; padding:1px 5px;" type="text" name="usergroup[colorx]" value="<?php echo $group_color ?>"><label style="text-align:right; display:block;"><?php _e('use default link color', 'wpforo'); ?> <input type="checkbox" name="wpfugc" value="default" <?php if(!$group_color): ?> checked="checked"<?php endif; ?> /></label>
|
104 |
+
<script>
|
105 |
+
(function($) {
|
106 |
+
var $foo = $('#wpf_usergroup_color');
|
107 |
+
var $bar = $('#wpf_usergroup_colorx');
|
108 |
+
function onChange() { $bar.val($foo.val()); };
|
109 |
+
$('#wpf_usergroup_color') .change(onChange) .keyup(onChange);
|
110 |
+
})(jQuery);
|
111 |
+
(function($) {
|
112 |
+
var $foo = $('#wpf_usergroup_colorx');
|
113 |
+
var $bar = $('#wpf_usergroup_color');
|
114 |
+
function onChange() { $bar.val($foo.val()); };
|
115 |
+
$('#wpf_usergroup_colorx') .change(onChange) .keyup(onChange);
|
116 |
+
})(jQuery);
|
117 |
+
</script>
|
118 |
+
</div>
|
119 |
</div>
|
120 |
<?php if( isset($_GET['gid']) && $_GET['gid'] == 4 ): ?>
|
121 |
<input type="hidden" name="usergroup[role]" value="" />
|
132 |
<div style="display:block; float:left; width:40%;">
|
133 |
<div class="wpf-label-big"><?php _e('Default Forum Access', 'wpforo') ?></div>
|
134 |
<select name="usergroup[access]" style="background:#FDFDFD; display:block;">
|
135 |
+
<?php $accesses = WPF()->perm->get_accesses(); ?>
|
136 |
<?php foreach( $accesses as $accesse ): ?>
|
137 |
<option value="<?php echo esc_attr($accesse['access']) ?>" <?php if( $accesse['access'] == 'standard' ) echo ' selected="selected"'; ?>><?php echo esc_html($accesse['title']) ?></option>
|
138 |
<?php endforeach ?>
|
145 |
<div style="clear:both;"></div>
|
146 |
</div>
|
147 |
|
148 |
+
<?php $cans = WPF()->perm->usergroup_cans_form( ( isset($_GET['gid'] ) ? $_GET['gid'] : FALSE ) ); ?>
|
149 |
<?php $n = 0; foreach( $cans as $can => $data ) : ?>
|
150 |
<?php if( $n%4 == 0 ): ?>
|
151 |
</table>
|
199 |
<tr>
|
200 |
<td>
|
201 |
<select id="ug_select" name="usergroup[mergeid]" class="postform" >
|
202 |
+
<?php WPF()->usergroup->show_selectbox() ?>
|
203 |
</select>
|
204 |
<p><?php _e( 'Users will be join this usergroup', 'wpforo') ?></p>
|
205 |
</td>
|
wpf-admin/xml/english.xml
CHANGED
@@ -399,4 +399,8 @@
|
|
399 |
<phrase name="Reset Result"><![CDATA[Reset Result]]></phrase>
|
400 |
<phrase name="Recently Added"><![CDATA[Recent Posts]]></phrase>
|
401 |
<phrase name="No posts were found here"><![CDATA[No posts were found here]]></phrase>
|
|
|
|
|
|
|
|
|
402 |
</language>
|
399 |
<phrase name="Reset Result"><![CDATA[Reset Result]]></phrase>
|
400 |
<phrase name="Recently Added"><![CDATA[Recent Posts]]></phrase>
|
401 |
<phrase name="No posts were found here"><![CDATA[No posts were found here]]></phrase>
|
402 |
+
<phrase name="forum link"><![CDATA[forum link]]></phrase>
|
403 |
+
<phrase name="in forum"><![CDATA[in forum]]></phrase>
|
404 |
+
<phrase name="After registration you will receive an email confirmation with a link to set a new password"><![CDATA[After registration you will receive an email confirmation with a link to set a new password]]></phrase>
|
405 |
+
<phrase name="You can mention a person using @nicename in post content to send that person an email message. When you post a topic or reply, forum sends an email message to the user letting them know that they have been mentioned on the post."><![CDATA[You can mention a person using @nicename in post content to send that person an email message. When you post a topic or reply, forum sends an email message to the user letting them know that they have been mentioned on the post.]]></phrase>
|
406 |
</language>
|
wpf-assets/addons/mycred/header-off.png
ADDED
Binary file
|
wpf-assets/addons/mycred/header.png
ADDED
Binary file
|
wpf-assets/addons/polls/header-off.png
ADDED
Binary file
|
wpf-assets/addons/polls/header.png
ADDED
Binary file
|
wpf-assets/images/loading.gif
ADDED
Binary file
|
wpf-assets/images/sn/fb-m.jpg
ADDED
Binary file
|
wpf-assets/js/ajax.js
CHANGED
@@ -83,8 +83,8 @@ jQuery(document).ready(function($){
|
|
83 |
console.log(e);
|
84 |
}
|
85 |
if( response.stat == 1 ){
|
86 |
-
|
87 |
-
|
88 |
}
|
89 |
$('#wpforo-load').invisible();
|
90 |
wpforo_notice_show(response.notice);
|
@@ -113,8 +113,8 @@ jQuery(document).ready(function($){
|
|
113 |
console.log(e);
|
114 |
}
|
115 |
if(response.stat == 1){
|
116 |
-
count =
|
117 |
-
$( '#wpfvote-num-' + postid ).
|
118 |
}
|
119 |
$('#wpforo-load').invisible();
|
120 |
wpforo_notice_show(response.notice);
|
@@ -180,7 +180,9 @@ jQuery(document).ready(function($){
|
|
180 |
// Quote
|
181 |
$(".wpforo-quote").click(function(){
|
182 |
$("#wpf-msg-box").hide(); $('#wpforo-load').visible();
|
183 |
-
|
|
|
|
|
184 |
var postid_value = $(this).attr('id');
|
185 |
var postid = postid_value.replace("wpfquotepost", "");
|
186 |
$.ajax({
|
@@ -530,7 +532,10 @@ jQuery(document).ready(function($){
|
|
530 |
// Edit
|
531 |
$(document).on('click','.wpforo-edit', function(){
|
532 |
$("#wpf-msg-box").hide(); $('#wpforo-load').visible();
|
533 |
-
|
|
|
|
|
|
|
534 |
var postid_value = $(this).attr('id');
|
535 |
var is_topic = postid_value.indexOf("topic");
|
536 |
|
83 |
console.log(e);
|
84 |
}
|
85 |
if( response.stat == 1 ){
|
86 |
+
count = $( '#wpfvote-num-' + postid ).text();
|
87 |
+
$( '#wpfvote-num-' + postid ).text( ++count ).fadeIn();
|
88 |
}
|
89 |
$('#wpforo-load').invisible();
|
90 |
wpforo_notice_show(response.notice);
|
113 |
console.log(e);
|
114 |
}
|
115 |
if(response.stat == 1){
|
116 |
+
count = $( '#wpfvote-num-' + postid ).text();
|
117 |
+
$( '#wpfvote-num-' + postid ).text( --count ).fadeIn();
|
118 |
}
|
119 |
$('#wpforo-load').invisible();
|
120 |
wpforo_notice_show(response.notice);
|
180 |
// Quote
|
181 |
$(".wpforo-quote").click(function(){
|
182 |
$("#wpf-msg-box").hide(); $('#wpforo-load').visible();
|
183 |
+
phrase = wpforo_phrase('Reply with quote');
|
184 |
+
phrase = phrase.charAt(0).toUpperCase() + phrase.slice(1);
|
185 |
+
$("#wpf-reply-form-title").html( phrase );
|
186 |
var postid_value = $(this).attr('id');
|
187 |
var postid = postid_value.replace("wpfquotepost", "");
|
188 |
$.ajax({
|
532 |
// Edit
|
533 |
$(document).on('click','.wpforo-edit', function(){
|
534 |
$("#wpf-msg-box").hide(); $('#wpforo-load').visible();
|
535 |
+
|
536 |
+
var phrase = wpforo_phrase('Edit post');
|
537 |
+
phrase = phrase.charAt(0).toUpperCase() + phrase.slice(1);
|
538 |
+
$("#wpf-reply-form-title").html( phrase );
|
539 |
var postid_value = $(this).attr('id');
|
540 |
var is_topic = postid_value.indexOf("topic");
|
541 |
|
wpf-assets/js/frontend.js
CHANGED
@@ -13,20 +13,17 @@ jQuery.fn.visibilityToggle = function() {
|
|
13 |
};
|
14 |
|
15 |
function wpforo_notice_show(notice){
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
jQuery("#wpf-msg-box
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
}
|
28 |
-
setTimeout(function(){ jQuery("#wpf-msg-box").hide(); }, dur);
|
29 |
-
}
|
30 |
}
|
31 |
|
32 |
function wpforo_phrase(phrase_key){
|
@@ -61,7 +58,7 @@ jQuery(document).ready(function($){
|
|
61 |
});
|
62 |
|
63 |
$(document).on('click','#wpf-msg-box', function(){
|
64 |
-
$(
|
65 |
});
|
66 |
|
67 |
/* Home page loyouts toipcs toglle */
|
13 |
};
|
14 |
|
15 |
function wpforo_notice_show(notice){
|
16 |
+
if( notice === undefined || notice == '' ) return;
|
17 |
+
|
18 |
+
var n = notice.search(/<p(?:\s[^<>]*?)?>/i);
|
19 |
+
if( n < 0 ) notice = '<p>' + notice + '</p>';
|
20 |
+
|
21 |
+
var msg_box = jQuery("#wpf-msg-box");
|
22 |
+
msg_box.hide();
|
23 |
+
msg_box.html(notice);
|
24 |
+
msg_box.show(150).delay(1000);
|
25 |
+
setTimeout(function(){ jQuery("#wpf-msg-box > p.error").remove(); }, 6500);
|
26 |
+
setTimeout(function(){ jQuery("#wpf-msg-box > p.success").remove(); }, 2500);
|
|
|
|
|
|
|
27 |
}
|
28 |
|
29 |
function wpforo_phrase(phrase_key){
|
58 |
});
|
59 |
|
60 |
$(document).on('click','#wpf-msg-box', function(){
|
61 |
+
$(this).hide();
|
62 |
});
|
63 |
|
64 |
/* Home page loyouts toipcs toglle */
|
wpf-assets/js/snfb.js
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
/*
|
2 |
+
* Facebook Login with the Facebook SDK for JavaScript enables people to sign into forum and ebsite with their Facebook credentials.
|
3 |
+
* https://developers.facebook.com/docs/facebook-login/web
|
4 |
+
*/
|
5 |
+
window.WPFFB={};function wpforo_fb_check_auth(){window.FB.getLoginStatus(function(response){WPFFB.handleResponse(response)})}(function($){'use strict';WPFFB.renderFinish=function(){$('.wpforo_fb-spinner').hide()}
|
6 |
+
WPFFB.handleResponse=function(response){var button=$('.wpforo_fb-button'),$form_obj=button.parents('form')||!1,$redirect_to=$form_obj.find('input[name="redirect_to"]').val()||button.data('redirect'),running=!1;if(response.status=='connected'&&!running){running=!0;var fb_response=response;$('.wpforo_fb-spinner').fadeIn();$('.fb-login-button').hide();$.ajax({data:{action:"wpforo_facebook_auth",fb_response:fb_response,security:button.data('fb_nonce')},global:!1,type:"POST",url:wpforo_fb.ajaxurl,success:function(data){if(data&&data.success){if(data.redirect&&data.redirect.length){location.href=data.redirect}else if($redirect_to.length){location.href=$redirect_to}else{location.href=wpforo_fb.site_url}}else if(data&&data.error){$('.wpforo_fb-spinner').hide();$('.fb-login-button').show();if($form_obj.length){$form_obj.append('<div class="wpforo_fb_error">'+data.error+'</div>')}else{$('<div class="wpforo_fb_error">'+data.error+'</div>').insertAfter(button)}
|
7 |
+
FB.api("/"+data.fb.id+"/permissions","DELETE",function(response){if(response&&!response.error){}})}},error:function(data){$('.wpforo_fb-spinner').hide();$('.fb-login-button').show();$form_obj.append('<div class="wpforo_fb_error">'+data+'</div>')}})}else{button.removeClass('wpforo_fb-loading');if(navigator.userAgent.match('CriOS'))
|
8 |
+
window.open('https://www.facebook.com/dialog/oauth?client_id='+wpforo_fb.appId+'&redirect_uri='+document.location.href+'&scope='+wpforo_fb.scopes,'',null)}}})(jQuery)
|
wpf-assets/js/tinymce-emoji.js
ADDED
@@ -0,0 +1,582 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
var emojis = [{
|
2 |
+
"codes": ["1F600"],
|
3 |
+
"status": "fully-qualified",
|
4 |
+
"emoji": "😀",
|
5 |
+
"name": "grinning face"
|
6 |
+
}, {
|
7 |
+
"codes": ["1F923"],
|
8 |
+
"status": "fully-qualified",
|
9 |
+
"emoji": "🤣",
|
10 |
+
"name": "rolling on the floor laughing"
|
11 |
+
}, {
|
12 |
+
"codes": ["1F606"],
|
13 |
+
"status": "fully-qualified",
|
14 |
+
"emoji": "😆",
|
15 |
+
"name": "grinning squinting face"
|
16 |
+
}, {
|
17 |
+
"codes": ["1F609"],
|
18 |
+
"status": "fully-qualified",
|
19 |
+
"emoji": "😉",
|
20 |
+
"name": "winking face"
|
21 |
+
}, {
|
22 |
+
"codes": ["1F60A"],
|
23 |
+
"status": "fully-qualified",
|
24 |
+
"emoji": "😊",
|
25 |
+
"name": "smiling face with smiling eyes"
|
26 |
+
}, {
|
27 |
+
"codes": ["1F60B"],
|
28 |
+
"status": "fully-qualified",
|
29 |
+
"emoji": "😋",
|
30 |
+
"name": "face savoring food"
|
31 |
+
}, {
|
32 |
+
"codes": ["1F60E"],
|
33 |
+
"status": "fully-qualified",
|
34 |
+
"emoji": "😎",
|
35 |
+
"name": "smiling face with sunglasses"
|
36 |
+
}, {
|
37 |
+
"codes": ["1F60D"],
|
38 |
+
"status": "fully-qualified",
|
39 |
+
"emoji": "😍",
|
40 |
+
"name": "smiling face with heart-eyes"
|
41 |
+
}, {
|
42 |
+
"codes": ["1F618"],
|
43 |
+
"status": "fully-qualified",
|
44 |
+
"emoji": "😘",
|
45 |
+
"name": "face blowing a kiss"
|
46 |
+
}, {
|
47 |
+
"codes": ["1F642"],
|
48 |
+
"status": "fully-qualified",
|
49 |
+
"emoji": "🙂",
|
50 |
+
"name": "slightly smiling face"
|
51 |
+
}, {
|
52 |
+
"codes": ["1F917"],
|
53 |
+
"status": "fully-qualified",
|
54 |
+
"emoji": "🤗",
|
55 |
+
"name": "hugging face"
|
56 |
+
}, {
|
57 |
+
"codes": ["1F929"],
|
58 |
+
"status": "fully-qualified",
|
59 |
+
"emoji": "🤩",
|
60 |
+
"name": "star-struck"
|
61 |
+
}, {
|
62 |
+
"codes": ["1F914"],
|
63 |
+
"status": "fully-qualified",
|
64 |
+
"emoji": "🤔",
|
65 |
+
"name": "thinking face"
|
66 |
+
}, {
|
67 |
+
"codes": ["1F928"],
|
68 |
+
"status": "fully-qualified",
|
69 |
+
"emoji": "🤨",
|
70 |
+
"name": "face with raised eyebrow"
|
71 |
+
}, {
|
72 |
+
"codes": ["1F610"],
|
73 |
+
"status": "fully-qualified",
|
74 |
+
"emoji": "😐",
|
75 |
+
"name": "neutral face"
|
76 |
+
}, {
|
77 |
+
"codes": ["1F611"],
|
78 |
+
"status": "fully-qualified",
|
79 |
+
"emoji": "😑",
|
80 |
+
"name": "expressionless face"
|
81 |
+
}, {
|
82 |
+
"codes": ["1F636"],
|
83 |
+
"status": "fully-qualified",
|
84 |
+
"emoji": "😶",
|
85 |
+
"name": "face without mouth"
|
86 |
+
}, {
|
87 |
+
"codes": ["1F644"],
|
88 |
+
"status": "fully-qualified",
|
89 |
+
"emoji": "🙄",
|
90 |
+
"name": "face with rolling eyes"
|
91 |
+
}, {
|
92 |
+
"codes": ["1F60F"],
|
93 |
+
"status": "fully-qualified",
|
94 |
+
"emoji": "😏",
|
95 |
+
"name": "smirking face"
|
96 |
+
}, {
|
97 |
+
"codes": ["1F623"],
|
98 |
+
"status": "fully-qualified",
|
99 |
+
"emoji": "😣",
|
100 |
+
"name": "persevering face"
|
101 |
+
}, {
|
102 |
+
"codes": ["1F625"],
|
103 |
+
"status": "fully-qualified",
|
104 |
+
"emoji": "😥",
|
105 |
+
"name": "sad but relieved face"
|
106 |
+
}, {
|
107 |
+
"codes": ["1F62E"],
|
108 |
+
"status": "fully-qualified",
|
109 |
+
"emoji": "😮",
|
110 |
+
"name": "face with open mouth"
|
111 |
+
}, {
|
112 |
+
"codes": ["1F910"],
|
113 |
+
"status": "fully-qualified",
|
114 |
+
"emoji": "🤐",
|
115 |
+
"name": "zipper-mouth face"
|
116 |
+
}, {
|
117 |
+
"codes": ["1F62F"],
|
118 |
+
"status": "fully-qualified",
|
119 |
+
"emoji": "😯",
|
120 |
+
"name": "hushed face"
|
121 |
+
}, {
|
122 |
+
"codes": ["1F62A"],
|
123 |
+
"status": "fully-qualified",
|
124 |
+
"emoji": "😪",
|
125 |
+
"name": "sleepy face"
|
126 |
+
}, {
|
127 |
+
"codes": ["1F62B"],
|
128 |
+
"status": "fully-qualified",
|
129 |
+
"emoji": "😫",
|
130 |
+
"name": "tired face"
|
131 |
+
}, {
|
132 |
+
"codes": ["1F634"],
|
133 |
+
"status": "fully-qualified",
|
134 |
+
"emoji": "😴",
|
135 |
+
"name": "sleeping face"
|
136 |
+
}, {
|
137 |
+
"codes": ["1F60C"],
|
138 |
+
"status": "fully-qualified",
|
139 |
+
"emoji": "😌",
|
140 |
+
"name": "relieved face"
|
141 |
+
}, {
|
142 |
+
"codes": ["1F61B"],
|
143 |
+
"status": "fully-qualified",
|
144 |
+
"emoji": "😛",
|
145 |
+
"name": "face with tongue"
|
146 |
+
}, {
|
147 |
+
"codes": ["1F61C"],
|
148 |
+
"status": "fully-qualified",
|
149 |
+
"emoji": "😜",
|
150 |
+
"name": "winking face with tongue"
|
151 |
+
}, {
|
152 |
+
"codes": ["1F61D"],
|
153 |
+
"status": "fully-qualified",
|
154 |
+
"emoji": "😝",
|
155 |
+
"name": "squinting face with tongue"
|
156 |
+
}, {
|
157 |
+
"codes": ["1F924"],
|
158 |
+
"status": "fully-qualified",
|
159 |
+
"emoji": "🤤",
|
160 |
+
"name": "drooling face"
|
161 |
+
}, {
|
162 |
+
"codes": ["1F612"],
|
163 |
+
"status": "fully-qualified",
|
164 |
+
"emoji": "😒",
|
165 |
+
"name": "unamused face"
|
166 |
+
}, {
|
167 |
+
"codes": ["1F613"],
|
168 |
+
"status": "fully-qualified",
|
169 |
+
"emoji": "😓",
|
170 |
+
"name": "downcast face with sweat"
|
171 |
+
}, {
|
172 |
+
"codes": ["1F614"],
|
173 |
+
"status": "fully-qualified",
|
174 |
+
"emoji": "😔",
|
175 |
+
"name": "pensive face"
|
176 |
+
}, {
|
177 |
+
"codes": ["1F615"],
|
178 |
+
"status": "fully-qualified",
|
179 |
+
"emoji": "😕",
|
180 |
+
"name": "confused face"
|
181 |
+
}, {
|
182 |
+
"codes": ["1F643"],
|
183 |
+
"status": "fully-qualified",
|
184 |
+
"emoji": "🙃",
|
185 |
+
"name": "upside-down face"
|
186 |
+
}, {
|
187 |
+
"codes": ["1F911"],
|
188 |
+
"status": "fully-qualified",
|
189 |
+
"emoji": "🤑",
|
190 |
+
"name": "money-mouth face"
|
191 |
+
}, {
|
192 |
+
"codes": ["1F632"],
|
193 |
+
"status": "fully-qualified",
|
194 |
+
"emoji": "😲",
|
195 |
+
"name": "astonished face"
|
196 |
+
}, {
|
197 |
+
"codes": ["2639", "FE0F"],
|
198 |
+
"status": "fully-qualified",
|
199 |
+
"emoji": "☹️",
|
200 |
+
"name": "frowning face"
|
201 |
+
}, {
|
202 |
+
"codes": ["2639"],
|
203 |
+
"status": "non-fully-qualified",
|
204 |
+
"emoji": "☹",
|
205 |
+
"name": "frowning face"
|
206 |
+
}, {
|
207 |
+
"codes": ["1F641"],
|
208 |
+
"status": "fully-qualified",
|
209 |
+
"emoji": "🙁",
|
210 |
+
"name": "slightly frowning face"
|
211 |
+
}, {
|
212 |
+
"codes": ["1F616"],
|
213 |
+
"status": "fully-qualified",
|
214 |
+
"emoji": "😖",
|
215 |
+
"name": "confounded face"
|
216 |
+
}, {
|
217 |
+
"codes": ["1F61E"],
|
218 |
+
"status": "fully-qualified",
|
219 |
+
"emoji": "😞",
|
220 |
+
"name": "disappointed face"
|
221 |
+
}, {
|
222 |
+
"codes": ["1F61F"],
|
223 |
+
"status": "fully-qualified",
|
224 |
+
"emoji": "😟",
|
225 |
+
"name": "worried face"
|
226 |
+
}, {
|
227 |
+
"codes": ["1F624"],
|
228 |
+
"status": "fully-qualified",
|
229 |
+
"emoji": "😤",
|
230 |
+
"name": "face with steam from nose"
|
231 |
+
}, {
|
232 |
+
"codes": ["1F622"],
|
233 |
+
"status": "fully-qualified",
|
234 |
+
"emoji": "😢",
|
235 |
+
"name": "crying face"
|
236 |
+
}, {
|
237 |
+
"codes": ["1F62D"],
|
238 |
+
"status": "fully-qualified",
|
239 |
+
"emoji": "😭",
|
240 |
+
"name": "loudly crying face"
|
241 |
+
}, {
|
242 |
+
"codes": ["1F626"],
|
243 |
+
"status": "fully-qualified",
|
244 |
+
"emoji": "😦",
|
245 |
+
"name": "frowning face with open mouth"
|
246 |
+
}, {
|
247 |
+
"codes": ["1F627"],
|
248 |
+
"status": "fully-qualified",
|
249 |
+
"emoji": "😧",
|
250 |
+
"name": "anguished face"
|
251 |
+
}, {
|
252 |
+
"codes": ["1F628"],
|
253 |
+
"status": "fully-qualified",
|
254 |
+
"emoji": "😨",
|
255 |
+
"name": "fearful face"
|
256 |
+
}, {
|
257 |
+
"codes": ["1F629"],
|
258 |
+
"status": "fully-qualified",
|
259 |
+
"emoji": "😩",
|
260 |
+
"name": "weary face"
|
261 |
+
}, {
|
262 |
+
"codes": ["1F92F"],
|
263 |
+
"status": "fully-qualified",
|
264 |
+
"emoji": "🤯",
|
265 |
+
"name": "exploding head"
|
266 |
+
}, {
|
267 |
+
"codes": ["1F62C"],
|
268 |
+
"status": "fully-qualified",
|
269 |
+
"emoji": "😬",
|
270 |
+
"name": "grimacing face"
|
271 |
+
}, {
|
272 |
+
"codes": ["1F630"],
|
273 |
+
"status": "fully-qualified",
|
274 |
+
"emoji": "😰",
|
275 |
+
"name": "anxious face with sweat"
|
276 |
+
}, {
|
277 |
+
"codes": ["1F631"],
|
278 |
+
"status": "fully-qualified",
|
279 |
+
"emoji": "😱",
|
280 |
+
"name": "face screaming in fear"
|
281 |
+
}, {
|
282 |
+
"codes": ["1F633"],
|
283 |
+
"status": "fully-qualified",
|
284 |
+
"emoji": "😳",
|
285 |
+
"name": "flushed face"
|
286 |
+
}, {
|
287 |
+
"codes": ["1F92A"],
|
288 |
+
"status": "fully-qualified",
|
289 |
+
"emoji": "🤪",
|
290 |
+
"name": "crazy face"
|
291 |
+
}, {
|
292 |
+
"codes": ["1F635"],
|
293 |
+
"status": "fully-qualified",
|
294 |
+
"emoji": "😵",
|
295 |
+
"name": "dizzy face"
|
296 |
+
}, {
|
297 |
+
"codes": ["1F621"],
|
298 |
+
"status": "fully-qualified",
|
299 |
+
"emoji": "😡",
|
300 |
+
"name": "pouting face"
|
301 |
+
}, {
|
302 |
+
"codes": ["1F620"],
|
303 |
+
"status": "fully-qualified",
|
304 |
+
"emoji": "😠",
|
305 |
+
"name": "angry face"
|
306 |
+
}, {
|
307 |
+
"codes": ["1F92C"],
|
308 |
+
"status": "fully-qualified",
|
309 |
+
"emoji": "🤬",
|
310 |
+
"name": "face with symbols on mouth"
|
311 |
+
}, {
|
312 |
+
"codes": ["1F637"],
|
313 |
+
"status": "fully-qualified",
|
314 |
+
"emoji": "😷",
|
315 |
+
"name": "face with medical mask"
|
316 |
+
}, {
|
317 |
+
"codes": ["1F912"],
|
318 |
+
"status": "fully-qualified",
|
319 |
+
"emoji": "🤒",
|
320 |
+
"name": "face with thermometer"
|
321 |
+
}, {
|
322 |
+
"codes": ["1F915"],
|
323 |
+
"status": "fully-qualified",
|
324 |
+
"emoji": "🤕",
|
325 |
+
"name": "face with head-bandage"
|
326 |
+
}, {
|
327 |
+
"codes": ["1F922"],
|
328 |
+
"status": "fully-qualified",
|
329 |
+
"emoji": "🤢",
|
330 |
+
"name": "nauseated face"
|
331 |
+
}, {
|
332 |
+
"codes": ["1F92E"],
|
333 |
+
"status": "fully-qualified",
|
334 |
+
"emoji": "🤮",
|
335 |
+
"name": "face vomiting"
|
336 |
+
}, {
|
337 |
+
"codes": ["1F927"],
|
338 |
+
"status": "fully-qualified",
|
339 |
+
"emoji": "🤧",
|
340 |
+
"name": "sneezing face"
|
341 |
+
}, {
|
342 |
+
"codes": ["1F607"],
|
343 |
+
"status": "fully-qualified",
|
344 |
+
"emoji": "😇",
|
345 |
+
"name": "smiling face with halo"
|
346 |
+
}, {
|
347 |
+
"codes": ["1F920"],
|
348 |
+
"status": "fully-qualified",
|
349 |
+
"emoji": "🤠",
|
350 |
+
"name": "cowboy hat face"
|
351 |
+
}, {
|
352 |
+
"codes": ["1F921"],
|
353 |
+
"status": "fully-qualified",
|
354 |
+
"emoji": "🤡",
|
355 |
+
"name": "clown face"
|
356 |
+
}, {
|
357 |
+
"codes": ["1F925"],
|
358 |
+
"status": "fully-qualified",
|
359 |
+
"emoji": "🤥",
|
360 |
+
"name": "lying face"
|
361 |
+
}, {
|
362 |
+
"codes": ["1F92B"],
|
363 |
+
"status": "fully-qualified",
|
364 |
+
"emoji": "🤫",
|
365 |
+
"name": "shushing face"
|
366 |
+
}, {
|
367 |
+
"codes": ["1F92D"],
|
368 |
+
"status": "fully-qualified",
|
369 |
+
"emoji": "🤭",
|
370 |
+
"name": "face with hand over mouth"
|
371 |
+
}, {
|
372 |
+
"codes": ["1F9D0"],
|
373 |
+
"status": "fully-qualified",
|
374 |
+
"emoji": "🧐",
|
375 |
+
"name": "face with monocle"
|
376 |
+
}, {
|
377 |
+
"codes": ["1F913"],
|
378 |
+
"status": "fully-qualified",
|
379 |
+
"emoji": "🤓",
|
380 |
+
"name": "nerd face"
|
381 |
+
}, {
|
382 |
+
"codes": ["1F590", "FE0F"],
|
383 |
+
"status": "fully-qualified",
|
384 |
+
"emoji": "🖐️",
|
385 |
+
"name": "hand with fingers splayed"
|
386 |
+
}, {
|
387 |
+
"codes": ["1F44D"],
|
388 |
+
"status": "fully-qualified",
|
389 |
+
"emoji": "👍",
|
390 |
+
"name": "thumbs up"
|
391 |
+
}, {
|
392 |
+
"codes": ["1F44E"],
|
393 |
+
"status": "fully-qualified",
|
394 |
+
"emoji": "👎",
|
395 |
+
"name": "thumbs down"
|
396 |
+
}, {
|
397 |
+
"codes": ["2764", "FE0F"],
|
398 |
+
"status": "fully-qualified",
|
399 |
+
"emoji": "❤️",
|
400 |
+
"name": "red heart"
|
401 |
+
}, {
|
402 |
+
"codes": ["1F4A3"],
|
403 |
+
"status": "fully-qualified",
|
404 |
+
"emoji": "💣",
|
405 |
+
"name": "bomb"
|
406 |
+
}, {
|
407 |
+
"codes": ["1F339"],
|
408 |
+
"status": "fully-qualified",
|
409 |
+
"emoji": "🌹",
|
410 |
+
"name": "rose"
|
411 |
+
}, {
|
412 |
+
"codes": ["1F940"],
|
413 |
+
"status": "fully-qualified",
|
414 |
+
"emoji": "🥀",
|
415 |
+
"name": "wilted flower"
|
416 |
+
}, {
|
417 |
+
"codes": ["1F33A"],
|
418 |
+
"status": "fully-qualified",
|
419 |
+
"emoji": "🌺",
|
420 |
+
"name": "hibiscus"
|
421 |
+
}, {
|
422 |
+
"codes": ["1F33B"],
|
423 |
+
"status": "fully-qualified",
|
424 |
+
"emoji": "🌻",
|
425 |
+
"name": "sunflower"
|
426 |
+
}, {
|
427 |
+
"codes": ["1F33C"],
|
428 |
+
"status": "fully-qualified",
|
429 |
+
"emoji": "🌼",
|
430 |
+
"name": "blossom"
|
431 |
+
}, {
|
432 |
+
"codes": ["1F352"],
|
433 |
+
"status": "fully-qualified",
|
434 |
+
"emoji": "🍒",
|
435 |
+
"name": "cherries"
|
436 |
+
}, {
|
437 |
+
"codes": ["1F353"],
|
438 |
+
"status": "fully-qualified",
|
439 |
+
"emoji": "🍓",
|
440 |
+
"name": "strawberry"
|
441 |
+
}, {
|
442 |
+
"codes": ["1F354"],
|
443 |
+
"status": "fully-qualified",
|
444 |
+
"emoji": "🍔",
|
445 |
+
"name": "hamburger"
|
446 |
+
}, {
|
447 |
+
"codes": ["1F35F"],
|
448 |
+
"status": "fully-qualified",
|
449 |
+
"emoji": "🍟",
|
450 |
+
"name": "french fries"
|
451 |
+
}, {
|
452 |
+
"codes": ["1F355"],
|
453 |
+
"status": "fully-qualified",
|
454 |
+
"emoji": "🍕",
|
455 |
+
"name": "pizza"
|
456 |
+
}, {
|
457 |
+
"codes": ["2615"],
|
458 |
+
"status": "fully-qualified",
|
459 |
+
"emoji": "☕",
|
460 |
+
"name": "hot beverage"
|
461 |
+
}, {
|
462 |
+
"codes": ["1F375"],
|
463 |
+
"status": "fully-qualified",
|
464 |
+
"emoji": "🍵",
|
465 |
+
"name": "teacup without handle"
|
466 |
+
}, {
|
467 |
+
"codes": ["1F376"],
|
468 |
+
"status": "fully-qualified",
|
469 |
+
"emoji": "🍶",
|
470 |
+
"name": "sake"
|
471 |
+
}, {
|
472 |
+
"codes": ["1F37E"],
|
473 |
+
"status": "fully-qualified",
|
474 |
+
"emoji": "🍾",
|
475 |
+
"name": "bottle with popping cork"
|
476 |
+
}, {
|
477 |
+
"codes": ["1F377"],
|
478 |
+
"status": "fully-qualified",
|
479 |
+
"emoji": "🍷",
|
480 |
+
"name": "wine glass"
|
481 |
+
}, {
|
482 |
+
"codes": ["1F378"],
|
483 |
+
"status": "fully-qualified",
|
484 |
+
"emoji": "🍸",
|
485 |
+
"name": "cocktail glass"
|
486 |
+
}, {
|
487 |
+
"codes": ["1F379"],
|
488 |
+
"status": "fully-qualified",
|
489 |
+
"emoji": "🍹",
|
490 |
+
"name": "tropical drink"
|
491 |
+
}, {
|
492 |
+
"codes": ["1F37A"],
|
493 |
+
"status": "fully-qualified",
|
494 |
+
"emoji": "🍺",
|
495 |
+
"name": "beer mug"
|
496 |
+
}, {
|
497 |
+
"codes": ["1F37B"],
|
498 |
+
"status": "fully-qualified",
|
499 |
+
"emoji": "🍻",
|
500 |
+
"name": "clinking beer mugs"
|
501 |
+
}, {
|
502 |
+
"codes": ["1F942"],
|
503 |
+
"status": "fully-qualified",
|
504 |
+
"emoji": "🥂",
|
505 |
+
"name": "clinking glasses"
|
506 |
+
}
|
507 |
+
|
508 |
+
];
|
509 |
+
|
510 |
+
!function () {
|
511 |
+
var a = {}, b = function (b) {
|
512 |
+
for (var c = a[b], e = c.deps, f = c.defn, g = e.length, h = new Array(g), i = 0; i < g; ++i) h[i] = d(e[i]);
|
513 |
+
var j = f.apply(null, h);
|
514 |
+
if (void 0 === j) throw"module [" + b + "] returned undefined";
|
515 |
+
c.instance = j
|
516 |
+
}, c = function (b, c, d) {
|
517 |
+
if ("string" != typeof b) throw"module id must be a string";
|
518 |
+
if (void 0 === c) throw"no dependencies for " + b;
|
519 |
+
if (void 0 === d) throw"no definition function for " + b;
|
520 |
+
a[b] = {deps: c, defn: d, instance: void 0}
|
521 |
+
}, d = function (c) {
|
522 |
+
var d = a[c];
|
523 |
+
if (void 0 === d) throw"module [" + c + "] was undefined";
|
524 |
+
return void 0 === d.instance && b(c), d.instance
|
525 |
+
}, e = function (a, b) {
|
526 |
+
for (var c = a.length, e = new Array(c), f = 0; f < c; ++f) e[f] = d(a[f]);
|
527 |
+
b.apply(null, e)
|
528 |
+
}, f = {};
|
529 |
+
f.bolt = {module: {api: {define: c, require: e, demand: d}}};
|
530 |
+
var g = c, h = function (a, b) {
|
531 |
+
g(a, [], function () {
|
532 |
+
return b
|
533 |
+
})
|
534 |
+
};
|
535 |
+
h("3", tinymce.util.Tools.resolve), g("1", ["3"], function (a) {
|
536 |
+
return a("tinymce.PluginManager")
|
537 |
+
}), g("5", ["3"], function (a) {
|
538 |
+
return a("tinymce.util.Tools")
|
539 |
+
}), g("4", ["5"], function (a) {
|
540 |
+
|
541 |
+
var c = function (c) {
|
542 |
+
var d;
|
543 |
+
|
544 |
+
d = '<div id="wpf-emoji-wrap" class="wpf-emoji-wrap">';
|
545 |
+
|
546 |
+
for( var i = 0; i < emojis.length; i++){
|
547 |
+
d += '<span class="wpf-emoji" data-emoji="' + emojis[i].emoji + '">' + emojis[i].emoji + '</span>';
|
548 |
+
}
|
549 |
+
|
550 |
+
d += '</div>';
|
551 |
+
|
552 |
+
return d;
|
553 |
+
};
|
554 |
+
return {getHtml: c}
|
555 |
+
}), g("2", ["4"], function (a) {
|
556 |
+
var b = function (a, b) {
|
557 |
+
a.insertContent(' ' + b + ' ')
|
558 |
+
}, c = function (c, d) {
|
559 |
+
var e = a.getHtml(d);
|
560 |
+
c.addButton("emoticons", {
|
561 |
+
type: "panelbutton",
|
562 |
+
panel: {
|
563 |
+
classes: "wpf-emoji-extra-wrap",
|
564 |
+
role: "application",
|
565 |
+
autohide: !0,
|
566 |
+
html: e,
|
567 |
+
onclick: function (a) {
|
568 |
+
var d = c.dom.getParent(a.target, "span.wpf-emoji");
|
569 |
+
d && (b( c, d.getAttribute("data-emoji") ))
|
570 |
+
}
|
571 |
+
},
|
572 |
+
tooltip: "Emoji"
|
573 |
+
})
|
574 |
+
};
|
575 |
+
return {register: c}
|
576 |
+
}), g("0", ["1", "2"], function (a, b) {
|
577 |
+
return a.add("emoticons", function (a, c) {
|
578 |
+
b.register(a, c)
|
579 |
+
}), function () {
|
580 |
+
}
|
581 |
+
}), d("0")()
|
582 |
+
}();
|
wpf-includes/class-api.php
ADDED
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Exit if accessed directly
|
3 |
+
if( !defined( 'ABSPATH' ) ) exit;
|
4 |
+
|
5 |
+
class wpForoAPI{
|
6 |
+
|
7 |
+
public $locale = 'en_US';
|
8 |
+
public $locales = array( 'af_ZA', 'ar_AR', 'az_AZ', 'be_BY', 'bg_BG', 'bn_IN', 'bs_BA', 'ca_ES', 'cs_CZ', 'cy_GB', 'da_DK', 'de_DE', 'el_GR', 'en_US',
|
9 |
+
'en_GB', 'eo_EO', 'es_ES', 'es_LA', 'et_EE', 'eu_ES', 'fa_IR', 'fb_LT', 'fi_FI', 'fo_FO', 'fr_FR', 'fr_CA', 'fy_NL', 'ga_IE',
|
10 |
+
'gl_ES', 'he_IL', 'hi_IN', 'hr_HR', 'hu_HU', 'hy_AM', 'id_ID', 'is_IS', 'it_IT', 'ja_JP', 'ka_GE', 'km_KH', 'ko_KR', 'ku_TR',
|
11 |
+
'la_VA', 'lt_LT', 'lv_LV', 'mk_MK', 'ml_IN', 'ms_MY', 'nb_NO', 'ne_NP', 'nl_NL', 'nn_NO', 'pa_IN', 'pl_PL', 'ps_AF', 'pt_PT',
|
12 |
+
'pt_BR', 'ro_RO', 'ru_RU', 'sk_SK', 'sl_SI', 'sq_AL', 'sr_RS', 'sv_SE', 'sw_KE', 'ta_IN', 'te_IN', 'th_TH', 'tl_PH', 'tr_TR',
|
13 |
+
'uk_UA', 'vi_VN', 'zh_CN', 'zh_HK', 'zh_TW' );
|
14 |
+
|
15 |
+
|
16 |
+
public function __construct(){
|
17 |
+
$this->init_defaults();
|
18 |
+
$this->init_options();
|
19 |
+
}
|
20 |
+
|
21 |
+
private function init_defaults(){
|
22 |
+
$this->default = new stdClass;
|
23 |
+
$this->default->options = array(
|
24 |
+
'fb_api_id' => '',
|
25 |
+
'fb_api_secret' => '',
|
26 |
+
'fb_login' => 0,
|
27 |
+
'fb_load_sdk' => 1,
|
28 |
+
'fb_lb_on_lp' => 1,
|
29 |
+
'fb_lb_on_rp' => 1,
|
30 |
+
'fb_redirect' => 'profile',
|
31 |
+
'fb_redirect_url' => ''
|
32 |
+
);
|
33 |
+
}
|
34 |
+
|
35 |
+
private function init_options(){
|
36 |
+
$this->options = get_wpf_option('wpforo_api_options', $this->default->options);
|
37 |
+
}
|
38 |
+
|
39 |
+
public function hooks(){
|
40 |
+
if(!is_user_logged_in()){
|
41 |
+
if( $this->options['fb_login'] ){
|
42 |
+
$template = WPF()->current_object['template'];
|
43 |
+
if( $template == 'login' || $template == 'register' ){
|
44 |
+
add_action('wp_enqueue_scripts', array($this, 'fb_enqueue'));
|
45 |
+
if( $this->options['fb_load_sdk'] ){
|
46 |
+
add_action('wpforo_bottom_hook', array($this, 'fb_login_scripts'));
|
47 |
+
}
|
48 |
+
}
|
49 |
+
if( $this->options['fb_lb_on_lp'] ){
|
50 |
+
add_action('wpforo_login_form_end', array($this, 'fb_login_button'));
|
51 |
+
}
|
52 |
+
if( $this->options['fb_lb_on_rp'] ){
|
53 |
+
add_action('wpforo_register_form_end', array($this, 'fb_login_button'));
|
54 |
+
}
|
55 |
+
add_action('wp_ajax_wpforo_facebook_auth', array($this, 'fb_auth'));
|
56 |
+
add_action('wp_ajax_nopriv_wpforo_facebook_auth', array($this, 'fb_auth'));
|
57 |
+
}
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
public function fb_local(){
|
62 |
+
$wplocal = get_locale();
|
63 |
+
if( in_array($wplocal, $this->locales) ){
|
64 |
+
return $wplocal;
|
65 |
+
}
|
66 |
+
else{
|
67 |
+
return $this->local;
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
71 |
+
public function fb_enqueue() {
|
72 |
+
$app_id = $this->options['fb_api_id'];
|
73 |
+
wp_register_script('wpforo-snfb', WPFORO_URL . '/wpf-assets/js/snfb.js', array('jquery'), WPFORO_VERSION, false );
|
74 |
+
wp_enqueue_script('wpforo-snfb');
|
75 |
+
wp_localize_script('wpforo-snfb', 'wpforo_fb',
|
76 |
+
array( 'ajaxurl' => admin_url('admin-ajax.php'), 'site_url' => home_url(), 'scopes' => 'email,public_profile', 'appId' => $app_id, 'l18n' => array( 'chrome_ios_alert' => __( 'Please login into facebook and then click connect button again', 'wpforo' )))
|
77 |
+
);
|
78 |
+
}
|
79 |
+
|
80 |
+
public function fb_auth(){
|
81 |
+
|
82 |
+
$app_version = '2.10';
|
83 |
+
$app_secret = $this->options['fb_api_secret'];
|
84 |
+
check_ajax_referer( 'wpforo-fb-nonce', 'security' );
|
85 |
+
$fb_token = isset( $_POST['fb_response']['authResponse']['accessToken'] ) ? $_POST['fb_response']['authResponse']['accessToken'] : '';
|
86 |
+
$fb_url = add_query_arg( array( 'fields' => 'id,first_name,last_name,email,link,about,locale,birthday', 'access_token' => $fb_token ), 'https://graph.facebook.com/v' . $app_version . '/' . $_POST['fb_response']['authResponse']['userID'] );
|
87 |
+
|
88 |
+
###################################################################################################################
|
89 |
+
// Verifying Graph API Calls with appsecret_proof
|
90 |
+
// Graph API calls can be made from clients or from your server on behalf of clients.
|
91 |
+
// Calls from a server can be better secured by adding a parameter called appsecret_proof.
|
92 |
+
// https://developers.facebook.com/docs/graph-api/securing-requests/
|
93 |
+
if( !$app_secret ) {
|
94 |
+
$appsecret_proof = hash_hmac('sha256', $fb_token, trim($app_secret) );
|
95 |
+
$fb_url = add_query_arg( array( 'appsecret_proof' => $appsecret_proof ), $fb_url );
|
96 |
+
}
|
97 |
+
###################################################################################################################
|
98 |
+
|
99 |
+
$fb_response = wp_remote_get( esc_url_raw( $fb_url ), array( 'timeout' => 30 ) );
|
100 |
+
if( is_wp_error( $fb_response ) ) wpforo_ajax_response( array( 'error' => $fb_response->get_error_message() ) );
|
101 |
+
$fb_user = json_decode( wp_remote_retrieve_body( $fb_response ), true );
|
102 |
+
if( isset( $fb_user['error'] ) ) wpforo_ajax_response( array( 'error' => 'Error code: '. $fb_user['error']['code'] . ' - ' . $fb_user['error']['message'] ) );
|
103 |
+
if( empty( $fb_user['email'] ) ) wpforo_ajax_response( array( 'error' => __('Your email is required to be able authorize you here. Please try loging again. ', 'wpforo' ), 'fb' => $fb_user ) );
|
104 |
+
$fb_user['link'] = ( isset($fb_user['link']) ) ? $fb_user['link'] : '';
|
105 |
+
$fb_user['about'] = ( isset($fb_user['about']) ) ? $fb_user['about'] : '';
|
106 |
+
$fb_user['locale'] = ( isset($fb_user['locale']) ) ? $fb_user['locale'] : '';
|
107 |
+
$user = array( 'fb_user_id' => $fb_user['id'], 'first_name' => $fb_user['first_name'], 'last_name' => $fb_user['last_name'], 'user_email' => $fb_user['email'], 'user_url' => $fb_user['link'], 'user_pass' => wp_generate_password(), 'description' => $fb_user['about'], 'locale' => $fb_user['locale'], 'rich_editing' => 'true' );
|
108 |
+
$message = array( 'error' => __( 'Invalid User', 'wpforo' ) );
|
109 |
+
if ( empty( $user['fb_user_id'] ) ) wpforo_ajax_response( $message );
|
110 |
+
$member = wpforo_get_fb_user( $user );
|
111 |
+
$meta_updated = false;
|
112 |
+
|
113 |
+
if ( $member ){
|
114 |
+
$user_id = $member->ID;
|
115 |
+
$message = array( 'success' => $user_id, 'method' => 'login');
|
116 |
+
if( empty( $member->user_email ) ) wp_update_user( array( 'ID' => $user_id, 'user_email' => $user['user_email'] ) );
|
117 |
+
} else {
|
118 |
+
if( !wpforo_feature('user-register') ) wpforo_ajax_response( array( 'error' => __( 'User registration is disabled', 'wpforo' ) ) );
|
119 |
+
$username = wpforo_unique_username( $user['user_email'] );
|
120 |
+
$user['user_login'] = str_replace('.', '', $username);
|
121 |
+
$user['user_nicename'] = sanitize_title($username);
|
122 |
+
$user['display_name'] = ( $user['first_name'] || $user['last_name'] ) ? trim($user['first_name'] . ' ' . $user['last_name']) : ucfirst(str_replace('-', ' ', $user['user_nicename']));
|
123 |
+
$user_id = wp_insert_user( $user );
|
124 |
+
if( !is_wp_error( $user_id ) ) {
|
125 |
+
wp_new_user_notification( $user_id, NULL, 'admin' );
|
126 |
+
wp_new_user_notification( $user_id, '', 'user' );
|
127 |
+
update_user_meta( $user_id, '_fb_user_id', $user['fb_user_id'] );
|
128 |
+
if( isset($fb_user['birthday']) && $fb_user['birthday'] ){
|
129 |
+
update_user_meta( $user_id, '_fb_user_birthday', $fb_user['birthday'] );
|
130 |
+
}
|
131 |
+
$meta_updated = true;
|
132 |
+
$message = array( 'success' => $user_id, 'method' => 'registration' );
|
133 |
+
}
|
134 |
+
}
|
135 |
+
if( is_numeric( $user_id ) ) {
|
136 |
+
wp_set_auth_cookie( $user_id, true );
|
137 |
+
if( !$meta_updated ) update_user_meta( $user_id, '_fb_user_id', $user['fb_user_id'] );
|
138 |
+
}
|
139 |
+
wpforo_ajax_response( $message );
|
140 |
+
}
|
141 |
+
|
142 |
+
public function fb_redirect(){
|
143 |
+
if( $this->options['fb_redirect'] == 'custom' && $this->options['fb_redirect_url'] != '' ){
|
144 |
+
return esc_url($this->options['fb_redirect_url']);
|
145 |
+
}
|
146 |
+
elseif( $this->options['fb_redirect'] == 'profile' ){
|
147 |
+
$current_user_id = WPF()->current_userid;
|
148 |
+
return wpforo_home_url("account/");
|
149 |
+
}
|
150 |
+
else{
|
151 |
+
return wpforo_home_url();
|
152 |
+
}
|
153 |
+
}
|
154 |
+
|
155 |
+
public function fb_login_scripts(){
|
156 |
+
?>
|
157 |
+
<!-- wpForo FB Login start -->
|
158 |
+
<script type='text/javascript' > function statusChangeCallback(response){ if (response.status === 'connected') {} else if (response.status === 'not_authorized') {} else {}} function checkLoginState() { FB.getLoginStatus(function(response) { statusChangeCallback(response); }); } window.fbAsyncInit = function(){ FB.init({ appId : '<?php echo trim($this->options['fb_api_id']) ?>', cookie : true, xfbml : true, status : false, version : 'v2.10' }); FB.getLoginStatus(function(response) {statusChangeCallback(response);}); }; (function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/<?php echo $this->fb_local() ?>/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script>
|
159 |
+
<!-- wpForo FB Login end -->
|
160 |
+
<?php
|
161 |
+
}
|
162 |
+
|
163 |
+
public function fb_login_button(){
|
164 |
+
?>
|
165 |
+
<div class="wpforo_fb-button wpforo-fb-login-wrap" data-redirect="<?php echo $this->fb_redirect() ?>" data-fb_nonce="<?php echo wp_create_nonce( 'wpforo-fb-nonce' ) ?>">
|
166 |
+
<div class="fb-login-button" data-max-rows="1" onlogin="wpforo_fb_check_auth" data-size="medium" data-button-type="login_with" data-show-faces="false" data-auth-type="rerequest" data-auto-logout-link="false" data-use-continue-as="true" data-scope="email,public_profile"></div>
|
167 |
+
<img data-no-lazy="1" src="<?php echo WPFORO_URL . '/wpf-assets/images/loading.gif'; ?>" class="wpforo_fb-spinner" style="display:none"/>
|
168 |
+
</div>
|
169 |
+
<?php
|
170 |
+
}
|
171 |
+
|
172 |
+
}
|
wpf-includes/class-cache.php
CHANGED
@@ -3,18 +3,15 @@
|
|
3 |
if( !defined( 'ABSPATH' ) ) exit;
|
4 |
|
5 |
class wpForoCache{
|
6 |
-
|
7 |
-
private $wpforo;
|
8 |
public $object;
|
9 |
public $dir;
|
10 |
public $lang;
|
11 |
|
12 |
-
function __construct(
|
13 |
-
if(!isset($this->wpforo)) $this->wpforo = $wpForo;
|
14 |
$this->init();
|
15 |
}
|
16 |
|
17 |
-
|
18 |
$wp_upload_dir = wp_upload_dir();
|
19 |
$uplds_dir = $wp_upload_dir['basedir']."/wpforo";
|
20 |
$cache_dir = $uplds_dir . "/cache";
|
@@ -26,7 +23,7 @@ class wpForoCache{
|
|
26 |
|
27 |
public function get_key( $type = 'html' ){
|
28 |
if($type == 'html'){
|
29 |
-
$ug =
|
30 |
return md5( preg_replace('|(.+)\#.+?$|is', '$1', $_SERVER['REQUEST_URI']) . $ug );
|
31 |
}
|
32 |
}
|
@@ -56,20 +53,20 @@ class wpForoCache{
|
|
56 |
public function on( $type = 'object_cashe' ){
|
57 |
if( $type == 'html_cashe' ){
|
58 |
if( wpforo_feature('output-buffer') && function_exists('ob_start') ){
|
59 |
-
return wpforo_feature('html_cashe'
|
60 |
}
|
61 |
else{
|
62 |
return false;
|
63 |
}
|
64 |
}
|
65 |
else{
|
66 |
-
return wpforo_feature($type
|
67 |
}
|
68 |
}
|
69 |
|
70 |
public function get( $key, $type = 'loop' ){
|
71 |
|
72 |
-
$template =
|
73 |
$loop_templates = array('forum', 'topic', 'post');
|
74 |
if( $type == 'loop' && $template ){
|
75 |
if( $this->exists($key, $template) ){
|
@@ -93,7 +90,7 @@ class wpForoCache{
|
|
93 |
}
|
94 |
|
95 |
public function get_html(){
|
96 |
-
$template =
|
97 |
if( $template == 'forum' ){
|
98 |
$key = $this->get_key();
|
99 |
if( $this->exists($key, $template) ){
|
@@ -107,7 +104,7 @@ class wpForoCache{
|
|
107 |
|
108 |
public function html( $content ){
|
109 |
if(!$this->on('html_cashe')) return false;
|
110 |
-
$template =
|
111 |
if( $template == 'forum' ){
|
112 |
$key = $this->get_key();
|
113 |
$this->create_html( $content, $template, $key );
|
@@ -117,16 +114,16 @@ class wpForoCache{
|
|
117 |
public function create( $mode = 'loop', $cache = array(), $type = 'post' ){
|
118 |
|
119 |
if(!$this->on('object_cashe')) return false;
|
120 |
-
$template =
|
121 |
if( $template == 'forum' ) { $this->check( $this->dir . '/item/post' ); }
|
122 |
|
123 |
if( $mode == 'loop' && $template ){
|
124 |
if( $template == 'forum' || $template == 'topic' || $template == 'post'){
|
125 |
-
$cache =
|
126 |
$this->create_files( $cache, $template );
|
127 |
-
$cache =
|
128 |
$this->create_files( $cache, $template );
|
129 |
-
$cache =
|
130 |
$this->create_files( $cache, $template );
|
131 |
}
|
132 |
}
|
3 |
if( !defined( 'ABSPATH' ) ) exit;
|
4 |
|
5 |
class wpForoCache{
|
|
|
|
|
6 |
public $object;
|
7 |
public $dir;
|
8 |
public $lang;
|
9 |
|
10 |
+
function __construct(){
|
|
|
11 |
$this->init();
|
12 |
}
|
13 |
|
14 |
+
private function init(){
|
15 |
$wp_upload_dir = wp_upload_dir();
|
16 |
$uplds_dir = $wp_upload_dir['basedir']."/wpforo";
|
17 |
$cache_dir = $uplds_dir . "/cache";
|
23 |
|
24 |
public function get_key( $type = 'html' ){
|
25 |
if($type == 'html'){
|
26 |
+
$ug = WPF()->current_user_groupid;
|
27 |
return md5( preg_replace('|(.+)\#.+?$|is', '$1', $_SERVER['REQUEST_URI']) . $ug );
|
28 |
}
|
29 |
}
|
53 |
public function on( $type = 'object_cashe' ){
|
54 |
if( $type == 'html_cashe' ){
|
55 |
if( wpforo_feature('output-buffer') && function_exists('ob_start') ){
|
56 |
+
return wpforo_feature( 'html_cashe');
|
57 |
}
|
58 |
else{
|
59 |
return false;
|
60 |
}
|
61 |
}
|
62 |
else{
|
63 |
+
return wpforo_feature($type);
|
64 |
}
|
65 |
}
|
66 |
|
67 |
public function get( $key, $type = 'loop' ){
|
68 |
|
69 |
+
$template = WPF()->current_object['template'];
|
70 |
$loop_templates = array('forum', 'topic', 'post');
|
71 |
if( $type == 'loop' && $template ){
|
72 |
if( $this->exists($key, $template) ){
|
90 |
}
|
91 |
|
92 |
public function get_html(){
|
93 |
+
$template = WPF()->current_object['template'];
|
94 |
if( $template == 'forum' ){
|
95 |
$key = $this->get_key();
|
96 |
if( $this->exists($key, $template) ){
|
104 |
|
105 |
public function html( $content ){
|
106 |
if(!$this->on('html_cashe')) return false;
|
107 |
+
$template = WPF()->current_object['template'];
|
108 |
if( $template == 'forum' ){
|
109 |
$key = $this->get_key();
|
110 |
$this->create_html( $content, $template, $key );
|
114 |
public function create( $mode = 'loop', $cache = array(), $type = 'post' ){
|
115 |
|
116 |
if(!$this->on('object_cashe')) return false;
|
117 |
+
$template = WPF()->current_object['template'];
|
118 |
if( $template == 'forum' ) { $this->check( $this->dir . '/item/post' ); }
|
119 |
|
120 |
if( $mode == 'loop' && $template ){
|
121 |
if( $template == 'forum' || $template == 'topic' || $template == 'post'){
|
122 |
+
$cache = WPF()->forum->get_cache('forums');
|
123 |
$this->create_files( $cache, $template );
|
124 |
+
$cache = WPF()->topic->get_cache('topics');
|
125 |
$this->create_files( $cache, $template );
|
126 |
+
$cache = WPF()->post->get_cache('posts');
|
127 |
$this->create_files( $cache, $template );
|
128 |
}
|
129 |
}
|
wpf-includes/class-feed.php
CHANGED
@@ -3,17 +3,13 @@
|
|
3 |
if( !defined( 'ABSPATH' ) ) exit;
|
4 |
|
5 |
class wpForoFeed{
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
function __construct( $wpForo ){
|
10 |
-
if(!isset($this->wpforo)) $this->wpforo = $wpForo;
|
11 |
-
}
|
12 |
|
13 |
function rss2_url($echo = true, $general = false){
|
14 |
$url = wpforo_get_request_uri();
|
15 |
-
if(isset(
|
16 |
-
if(isset(
|
17 |
if(isset($forumid) && isset($topicid)){
|
18 |
$rss2 = $url . '?type=rss2&forum=' . intval($forumid) . '&topic=' . intval($topicid);
|
19 |
}
|
@@ -48,13 +44,13 @@ class wpForoFeed{
|
|
48 |
<channel>
|
49 |
<title>
|
50 |
<?php if(!isset($forum['title']) || !$forum['title']): ?>
|
51 |
-
<?php echo esc_html(
|
52 |
<?php else: ?>
|
53 |
-
<?php echo esc_html($forum['title']); ?> - <?php echo esc_html(
|
54 |
<?php endif; ?>
|
55 |
</title>
|
56 |
<link><?php echo esc_url($forum['forumurl']); ?></link>
|
57 |
-
<description><?php echo esc_html(
|
58 |
<language><?php bloginfo_rss( 'language' ); ?></language>
|
59 |
<lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', date('Y-m-d H:i:s'), false); ?></lastBuildDate>
|
60 |
<generator>wpForo</generator>
|
@@ -87,13 +83,13 @@ class wpForoFeed{
|
|
87 |
<channel>
|
88 |
<title>
|
89 |
<?php if(!isset($topic['title']) || !$topic['title']): ?>
|
90 |
-
<?php echo esc_html(
|
91 |
<?php else: ?>
|
92 |
<?php echo esc_html($topic['title']); ?> - <?php echo esc_html($forum['title']); ?>
|
93 |
<?php endif; ?>
|
94 |
</title>
|
95 |
<link><?php echo esc_url($topic['topicurl']); ?></link>
|
96 |
-
<description><?php echo esc_html(
|
97 |
<language><?php bloginfo_rss( 'language' ); ?></language>
|
98 |
<lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', date('Y-m-d H:i:s'), false); ?></lastBuildDate>
|
99 |
<generator>wpForo</generator>
|
3 |
if( !defined( 'ABSPATH' ) ) exit;
|
4 |
|
5 |
class wpForoFeed{
|
6 |
+
|
7 |
+
function __construct(){}
|
|
|
|
|
|
|
|
|
8 |
|
9 |
function rss2_url($echo = true, $general = false){
|
10 |
$url = wpforo_get_request_uri();
|
11 |
+
if(isset(WPF()->current_object['forumid'])){ $forumid = WPF()->current_object['forumid']; }
|
12 |
+
if(isset(WPF()->current_object['topicid'])){ $topicid = WPF()->current_object['topicid']; }
|
13 |
if(isset($forumid) && isset($topicid)){
|
14 |
$rss2 = $url . '?type=rss2&forum=' . intval($forumid) . '&topic=' . intval($topicid);
|
15 |
}
|
44 |
<channel>
|
45 |
<title>
|
46 |
<?php if(!isset($forum['title']) || !$forum['title']): ?>
|
47 |
+
<?php echo esc_html(WPF()->general_options['title']) . ' - ' . wpforo_phrase('Recent Topics', false) ?>
|
48 |
<?php else: ?>
|
49 |
+
<?php echo esc_html($forum['title']); ?> - <?php echo esc_html(WPF()->general_options['title']); ?>
|
50 |
<?php endif; ?>
|
51 |
</title>
|
52 |
<link><?php echo esc_url($forum['forumurl']); ?></link>
|
53 |
+
<description><?php echo esc_html(WPF()->general_options['description']); ?></description>
|
54 |
<language><?php bloginfo_rss( 'language' ); ?></language>
|
55 |
<lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', date('Y-m-d H:i:s'), false); ?></lastBuildDate>
|
56 |
<generator>wpForo</generator>
|
83 |
<channel>
|
84 |
<title>
|
85 |
<?php if(!isset($topic['title']) || !$topic['title']): ?>
|
86 |
+
<?php echo esc_html(WPF()->general_options['title']) . ' - ' . wpforo_phrase('Recent Posts', false); ?>
|
87 |
<?php else: ?>
|
88 |
<?php echo esc_html($topic['title']); ?> - <?php echo esc_html($forum['title']); ?>
|
89 |
<?php endif; ?>
|
90 |
</title>
|
91 |
<link><?php echo esc_url($topic['topicurl']); ?></link>
|
92 |
+
<description><?php echo esc_html(WPF()->general_options['description']); ?></description>
|
93 |
<language><?php bloginfo_rss( 'language' ); ?></language>
|
94 |
<lastBuildDate><?php echo mysql2date('D, d M Y H:i:s +0000', date('Y-m-d H:i:s'), false); ?></lastBuildDate>
|
95 |
<generator>wpForo</generator>
|
wpf-includes/class-forums.php
CHANGED
@@ -4,16 +4,13 @@
|
|
4 |
|
5 |
|
6 |
class wpForoForum{
|
7 |
-
private $wpforo;
|
8 |
public $default;
|
9 |
public $options;
|
10 |
public $cans;
|
11 |
|
12 |
static $cache = array( 'forums' => array(), 'forum' => array(), 'item' => array() );
|
13 |
|
14 |
-
public function __construct(
|
15 |
-
if(!isset($this->wpforo)) $this->wpforo = $wpForo;
|
16 |
-
|
17 |
$this->init_defaults();
|
18 |
$this->init_options();
|
19 |
}
|
@@ -26,6 +23,8 @@ class wpForoForum{
|
|
26 |
'layout_extended_intro_topics_toggle' => 1,
|
27 |
'layout_qa_intro_topics_count' => 3,
|
28 |
'layout_extended_intro_topics_count' => 5,
|
|
|
|
|
29 |
);
|
30 |
|
31 |
$this->default->cans = array (
|
@@ -57,7 +56,10 @@ class wpForoForum{
|
|
57 |
'at' => 'Can set topic answered',
|
58 |
'oat' => 'Can set own topic answered',
|
59 |
'cot' => 'Can close topic',
|
60 |
-
'mt' => 'Can move topic'
|
|
|
|
|
|
|
61 |
);
|
62 |
}
|
63 |
|
@@ -74,9 +76,9 @@ class wpForoForum{
|
|
74 |
$new_slug = wpforo_text($slug, 250, false);
|
75 |
$forumid = intval($forumid);
|
76 |
$i = 2;
|
77 |
-
while(
|
78 |
if( !isset($parent_slug) && $parentid = intval($parentid) ){
|
79 |
-
$parent_slug =
|
80 |
$new_slug = $parent_slug . "-" . wpforo_text($slug, 250, false);
|
81 |
}else{
|
82 |
$new_slug = wpforo_text($slug, 250, false) . '-' . $i;
|
@@ -87,8 +89,8 @@ class wpForoForum{
|
|
87 |
}
|
88 |
|
89 |
public function add( $args = array(), $checkperm = TRUE ){
|
90 |
-
if( $checkperm &&
|
91 |
-
|
92 |
return FALSE;
|
93 |
}
|
94 |
|
@@ -98,7 +100,7 @@ class wpForoForum{
|
|
98 |
extract($args, EXTR_OVERWRITE);
|
99 |
|
100 |
if( !isset($title) || !$title ){
|
101 |
-
|
102 |
return FALSE;
|
103 |
}
|
104 |
|
@@ -121,12 +123,12 @@ class wpForoForum{
|
|
121 |
if(!$parentid) $is_cat = 1;
|
122 |
|
123 |
if($parentid) {
|
124 |
-
$cat_layout =
|
125 |
$cat_layout = intval($cat_layout);
|
126 |
}
|
127 |
|
128 |
-
if(
|
129 |
-
|
130 |
array(
|
131 |
'title' => stripslashes($title),
|
132 |
'slug' => $slug,
|
@@ -146,20 +148,20 @@ class wpForoForum{
|
|
146 |
array('%s','%s','%s','%d','%s','%d','%d','%s','%s','%s','%d','%d','%d','%d')
|
147 |
)
|
148 |
){
|
149 |
-
$forumid =
|
150 |
$this->delete_tree_cache();
|
151 |
wpforo_clean_cache($forumid, 'forum', $args);
|
152 |
-
|
153 |
return $forumid;
|
154 |
}
|
155 |
|
156 |
-
|
157 |
return FALSE;
|
158 |
}
|
159 |
|
160 |
public function edit( $args = array() ){
|
161 |
-
if(
|
162 |
-
|
163 |
return FALSE;
|
164 |
}
|
165 |
|
@@ -170,12 +172,12 @@ class wpForoForum{
|
|
170 |
extract($args, EXTR_OVERWRITE);
|
171 |
|
172 |
if( !isset($forumid) || !$forumid ){
|
173 |
-
|
174 |
return FALSE;
|
175 |
}
|
176 |
|
177 |
if( !isset($title) || !$title ){
|
178 |
-
|
179 |
return FALSE;
|
180 |
}
|
181 |
|
@@ -199,12 +201,12 @@ class wpForoForum{
|
|
199 |
if(!$parentid) $is_cat = 1;
|
200 |
|
201 |
if($parentid) {
|
202 |
-
$cat_layout =
|
203 |
$cat_layout = intval($cat_layout);
|
204 |
}
|
205 |
|
206 |
-
if( FALSE !==
|
207 |
-
|
208 |
array(
|
209 |
'title' => stripslashes($title),
|
210 |
'slug' => $slug,
|
@@ -226,16 +228,16 @@ class wpForoForum{
|
|
226 |
if( isset($cat_layout) ){
|
227 |
$childs = array();
|
228 |
$this->get_childs($forumid, $childs);
|
229 |
-
$sql = "UPDATE `"
|
230 |
-
|
231 |
}
|
232 |
$this->delete_tree_cache();
|
233 |
wpforo_clean_cache($forumid, 'forum', $args);
|
234 |
-
|
235 |
return $forumid;
|
236 |
}
|
237 |
|
238 |
-
|
239 |
return FALSE;
|
240 |
}
|
241 |
|
@@ -243,8 +245,8 @@ class wpForoForum{
|
|
243 |
$forumid = intval($forumid);
|
244 |
if(!$forumid && isset( $_REQUEST['id'] ) ) $forumid = intval($_REQUEST['id']);
|
245 |
|
246 |
-
if(
|
247 |
-
|
248 |
return FALSE;
|
249 |
}
|
250 |
|
@@ -253,21 +255,21 @@ class wpForoForum{
|
|
253 |
$forumids = implode(',', array_map('intval', $childs));
|
254 |
|
255 |
// START delete topic posts include first post
|
256 |
-
if( $topicids =
|
257 |
foreach($topicids as $topicid){
|
258 |
-
|
259 |
}
|
260 |
}
|
261 |
// END delete topic posts include first post
|
262 |
|
263 |
-
if(
|
264 |
$this->delete_tree_cache();
|
265 |
wpforo_clean_cache();
|
266 |
-
|
267 |
return TRUE;
|
268 |
}
|
269 |
|
270 |
-
|
271 |
return FALSE;
|
272 |
}
|
273 |
|
@@ -283,24 +285,24 @@ class wpForoForum{
|
|
283 |
if( $child_forumids = $this->get_child_forums( $forumid ) ){
|
284 |
$forumids = trim( implode(',', array_map('intval', $child_forumids)) );
|
285 |
if( $forumids ){
|
286 |
-
$merge_layout =
|
287 |
|
288 |
-
if(
|
289 |
-
|
290 |
return FALSE;
|
291 |
}
|
292 |
}
|
293 |
}
|
294 |
|
295 |
-
|
296 |
-
|
297 |
array( 'forumid' => $mergeid ),
|
298 |
array( 'forumid' => $forumid ),
|
299 |
array( '%d' ),
|
300 |
array( '%d' )
|
301 |
);
|
302 |
-
|
303 |
-
|
304 |
array( 'forumid' => $mergeid ),
|
305 |
array( 'forumid' => $forumid ),
|
306 |
array( '%d' ),
|
@@ -310,14 +312,14 @@ class wpForoForum{
|
|
310 |
$this->rebuild_last_infos($mergeid);
|
311 |
$this->rebuild_stats($mergeid);
|
312 |
|
313 |
-
if(
|
314 |
$this->delete_tree_cache();
|
315 |
wpforo_clean_cache(0, 'forum');
|
316 |
-
|
317 |
return TRUE;
|
318 |
}
|
319 |
|
320 |
-
|
321 |
return FALSE;
|
322 |
}
|
323 |
|
@@ -330,15 +332,15 @@ class wpForoForum{
|
|
330 |
$last_userid = 0;
|
331 |
$last_post_date = '0000-00-00 00:00:00';
|
332 |
|
333 |
-
$last_topics =
|
334 |
if(!empty($last_topics)){
|
335 |
$last_topic = $last_topics[0];
|
336 |
$last_topicid = $last_topic['topicid'];
|
337 |
}
|
338 |
-
$last_posts =
|
339 |
if(!empty($last_posts)){
|
340 |
$last_post = $last_posts[0];
|
341 |
-
$last_post_data =
|
342 |
if(!empty($last_post_data)){
|
343 |
$last_postid = $last_post_data['postid'];
|
344 |
$last_userid = $last_post_data['userid'];
|
@@ -346,7 +348,7 @@ class wpForoForum{
|
|
346 |
}
|
347 |
}
|
348 |
|
349 |
-
|
350 |
SET `last_topicid` = ".intval($last_topicid).", `last_postid` = ".intval($last_postid).",
|
351 |
`last_userid` = ".intval($last_userid).", `last_post_date` = '".esc_sql($last_post_date)."'
|
352 |
WHERE `forumid` = ".intval($forumid) );
|
@@ -355,11 +357,11 @@ class wpForoForum{
|
|
355 |
|
356 |
public function rebuild_stats($forumid){
|
357 |
if( !$forumid = intval($forumid) ) return false;
|
358 |
-
$topics =
|
359 |
-
$posts =
|
360 |
|
361 |
-
if( false !==
|
362 |
-
|
363 |
array('topics' => $topics, 'posts' => $posts ),
|
364 |
array('forumid' => $forumid),
|
365 |
array('%d', '%d'),
|
@@ -371,9 +373,9 @@ class wpForoForum{
|
|
371 |
return false;
|
372 |
}
|
373 |
|
374 |
-
function get_forum( $args){
|
375 |
|
376 |
-
$cache =
|
377 |
|
378 |
if(is_array($args)){
|
379 |
$default = array(
|
@@ -407,7 +409,7 @@ class wpForoForum{
|
|
407 |
}
|
408 |
if(!empty($args)){
|
409 |
extract($args, EXTR_OVERWRITE);
|
410 |
-
$sql = "SELECT * FROM `"
|
411 |
$wheres = array();
|
412 |
if($forumid != NULL) $wheres[] = "`forumid` = " . intval($forumid);
|
413 |
if($status != NULL) $wheres[] = "`status` = " . intval($status);
|
@@ -421,7 +423,7 @@ class wpForoForum{
|
|
421 |
if(!empty($wheres)){
|
422 |
$sql .= " WHERE " . implode( " AND ", $wheres );
|
423 |
}
|
424 |
-
$forum =
|
425 |
if(!empty($forum)) {
|
426 |
$forum['url'] = $this->get_forum_url( $forum );
|
427 |
}
|
@@ -438,7 +440,7 @@ class wpForoForum{
|
|
438 |
|
439 |
function get_forums($args = array(), &$items_count = 0 ){
|
440 |
|
441 |
-
$cache =
|
442 |
|
443 |
$default = array(
|
444 |
'include' => array(), // array( 2, 10, 25 )
|
@@ -465,7 +467,7 @@ class wpForoForum{
|
|
465 |
$parent_include = wpforo_parse_args( $parent_include );
|
466 |
$parent_exclude = wpforo_parse_args( $parent_exclude );
|
467 |
|
468 |
-
$sql = "SELECT * FROM `"
|
469 |
$wheres = array();
|
470 |
|
471 |
if(!empty($include)) $wheres[] = "`forumid` IN(" . implode(', ', array_map('intval', $include)) . ")";
|
@@ -486,7 +488,7 @@ class wpForoForum{
|
|
486 |
if(!empty($wheres)) $sql .= " WHERE " . implode( " AND ", $wheres );
|
487 |
|
488 |
$item_count_sql = preg_replace('#SELECT.+?FROM#isu', 'SELECT count(*) FROM', $sql);
|
489 |
-
if( $item_count_sql ) $items_count =
|
490 |
|
491 |
$sql .= esc_sql(" ORDER BY `$orderby` " . $order);
|
492 |
|
@@ -498,9 +500,9 @@ class wpForoForum{
|
|
498 |
}
|
499 |
}
|
500 |
|
501 |
-
if( $cache ){ $object_key = md5( $sql .
|
502 |
|
503 |
-
$forums =
|
504 |
$forums = apply_filters('wpforo_get_topics', $forums);
|
505 |
|
506 |
if($cache && isset($object_key) && !empty($forums)){
|
@@ -524,7 +526,7 @@ class wpForoForum{
|
|
524 |
);
|
525 |
}
|
526 |
|
527 |
-
$sql = "SELECT `forumid` FROM `"
|
528 |
$wheres = array();
|
529 |
|
530 |
foreach($fields as $field){
|
@@ -532,7 +534,7 @@ class wpForoForum{
|
|
532 |
}
|
533 |
|
534 |
$sql .= " WHERE " . implode(" OR ", $wheres);
|
535 |
-
return
|
536 |
}
|
537 |
|
538 |
return array();
|
@@ -550,8 +552,8 @@ class wpForoForum{
|
|
550 |
|
551 |
if(!isset($forumid) || !$forumid = intval($forumid) ) continue;
|
552 |
|
553 |
-
if(FALSE !==
|
554 |
-
|
555 |
array(
|
556 |
'parentid' => (isset($parentid) ? intval($parentid) : 0),
|
557 |
'order' => (isset($order) ? intval($order) : 0),
|
@@ -565,19 +567,19 @@ class wpForoForum{
|
|
565 |
)) $i++;
|
566 |
|
567 |
if(isset($parentid) && $parentid = intval($parentid) ){
|
568 |
-
$cat_layout =
|
569 |
-
|
570 |
}
|
571 |
|
572 |
}
|
573 |
|
574 |
-
|
575 |
-
|
576 |
|
577 |
if($i){
|
578 |
-
|
579 |
}else{
|
580 |
-
|
581 |
}
|
582 |
|
583 |
}
|
@@ -585,7 +587,7 @@ class wpForoForum{
|
|
585 |
|
586 |
function get_childs($forumid, &$data){
|
587 |
if(empty($data)) $data[] = $forumid;
|
588 |
-
$sub_forums =
|
589 |
if(!empty($sub_forums)){
|
590 |
foreach($sub_forums as $sub_forum){
|
591 |
$data[] = $sub_forum['forumid'];
|
@@ -609,7 +611,7 @@ class wpForoForum{
|
|
609 |
* @return int
|
610 |
*/
|
611 |
function count_depth($forumid, &$depth){
|
612 |
-
$parentid =
|
613 |
|
614 |
if($parentid != 0){
|
615 |
$depth++;
|
@@ -618,7 +620,7 @@ class wpForoForum{
|
|
618 |
}
|
619 |
|
620 |
function get_child_forums($parent){
|
621 |
-
$children =
|
622 |
if(!empty($children)){
|
623 |
foreach( $children as $child ){
|
624 |
$data[] = $child['childid'];
|
@@ -631,22 +633,21 @@ class wpForoForum{
|
|
631 |
|
632 |
function forum_list( $parent, $type , $cats = TRUE, $topicid = 0 ){
|
633 |
static $old_depth;
|
634 |
-
|
635 |
-
|
636 |
foreach ( $parent as $forumid ) {
|
637 |
|
638 |
if ($forumid == 0) continue;
|
639 |
$depth = 0;
|
640 |
$this->count_depth($forumid, $depth);
|
641 |
-
$name =
|
642 |
if($type == 'select_box'){
|
643 |
-
if( isset($_GET['page']) && $_GET['page'] == 'wpforo-ads' && isset($_GET['action']) && $_GET['action'] == 'edit' && isset($_GET['id']) && $_GET['id'] ){
|
644 |
-
$ad =
|
645 |
$ad_forumids = explode(',', $ad['forumids']);
|
646 |
}
|
647 |
?><option value="<?php echo intval($forumid) ?>"<?php echo( !$cats && $depth == 0 ? ' disabled ': ''); echo ( $forumid == $this->parentid($topicid) || (isset( $_GET['forumid'] ) && $forumid == $_GET['forumid']) || ( !empty($_GET['wpff']) && in_array($forumid, $_GET['wpff']) ) || ( !empty($ad_forumids) && in_array($forumid, $ad_forumids) ) || ( isset($_GET['parentid']) && $_GET['parentid'] == $forumid ) ? ' selected ' : '' ) ?> > <?php echo esc_html(str_repeat( '— ', $depth ) . trim($name)) ?></option><?php
|
648 |
}elseif($type == 'drag_menu'){
|
649 |
-
$cur_forum =
|
650 |
$cat_layout_name = ( $cur_forum['cat_layout'] == 2 ? 'Simplified Layout' : ( $cur_forum['cat_layout'] == 3 ? 'QA Layout' : 'Extended Layout' ) ); ?>
|
651 |
|
652 |
<li id="menu-item-<?php echo intval($forumid) ?>" class="menu-item menu-item-depth-<?php echo esc_attr($depth) ?>">
|
@@ -660,7 +661,7 @@ class wpForoForum{
|
|
660 |
<span class="wpforo-cat-layout"><?php echo ( $depth != 0 ? __('Topics', 'wpforo') . ' (' . intval($cur_forum['topics']) . ') , ' . __('Posts', 'wpforo') . ' (' . intval($cur_forum['posts']) . ') | ' : '' ) ?><?php echo ( $depth == 0 ? '( <i>' . esc_html($cat_layout_name) . '</i> ) | ' : '' ); ?></span>
|
661 |
<span class="menu_add"><a href="<?php echo admin_url( 'admin.php?page=wpforo-forums&action=add&parentid=' . intval($forumid) ) ?>" > <img src="<?php echo WPFORO_URL ?>/wpf-assets/images/icons/plus<?php echo ((!$depth) ? '-dark' : ''); ?>.png" title="<?php if( $depth ) : _e('Add a new SubForum', 'wpforo'); else: _e('Add a new Forum in this Category', 'wpforo'); endif; ?>"/></a></span> |
|
662 |
<span class="menu_edit"><a href="<?php echo admin_url( 'admin.php?page=wpforo-forums&id=' . intval($forumid) . '&action=edit' ) ?>"><img src="<?php echo WPFORO_URL ?>/wpf-assets/images/icons/pencil<?php echo ((!$depth) ? '-dark' : ''); ?>.png" title="<?php _e('edit', 'wpforo') ?>"/></a></span> |
|
663 |
-
<?php if(
|
664 |
<span class="menu_delete"><a href="<?php echo admin_url( 'admin.php?page=wpforo-forums&id=' . intval($forumid) . '&action=del' ) ?>"><img src="<?php echo WPFORO_URL ?>/wpf-assets/images/icons/trash<?php echo ((!$depth) ? '-dark' : ''); ?>.png" title="<?php _e('delete', 'wpforo') ?>"/></a></span> |
|
665 |
<?php endif; ?>
|
666 |
<span class="menu_view"><a href="<?php echo esc_url(wpforo_forum($forumid, 'url')); ?>" > <img src="<?php echo WPFORO_URL ?>/wpf-assets/images/icons/eye<?php echo ((!$depth) ? '-dark' : ''); ?>.png" title="<?php _e('View', 'wpforo') ?>"/> </a> </span>
|
@@ -673,13 +674,13 @@ class wpForoForum{
|
|
673 |
|
674 |
<?php
|
675 |
}elseif($type == 'front_list'){
|
676 |
-
$slug =
|
677 |
if(isset($old_depth) && $old_depth == $depth) echo '</dd><dd>';
|
678 |
if(isset($old_depth) && $old_depth < $depth) echo '<dl><dd>';
|
679 |
if(isset($old_depth) && $old_depth > $depth) echo '</dd></dl>';
|
680 |
$old_depth = $depth;
|
681 |
-
if(isset(
|
682 |
-
if( $forumid ==
|
683 |
echo'<span class="wpf-dl-item wpf-dl-current"><i class="fa fa-comments-o"></i><strong>'.esc_html($name).'</strong><a href="' . esc_url( wpforo_forum($forumid, 'url') ) . '" > »</a></span>';
|
684 |
}
|
685 |
else{
|
@@ -698,13 +699,13 @@ class wpForoForum{
|
|
698 |
}
|
699 |
|
700 |
function tree( $type = 'front_list', $cats = TRUE, $topicid = 0 ){
|
701 |
-
$parentids =
|
702 |
if(!empty($parentids)){
|
703 |
foreach( $parentids as $parentid ){
|
704 |
$data[] = $parentid['parentid'];
|
705 |
}
|
706 |
if( !wpforo_is_admin() ){
|
707 |
-
$key = md5( serialize($data) . $type . (int)$cats .
|
708 |
$html = get_option( 'wpforo_forum_tree_' . $key );
|
709 |
if( $html ){
|
710 |
echo $html;
|
@@ -727,31 +728,31 @@ class wpForoForum{
|
|
727 |
// end forums tree for drop down menu
|
728 |
|
729 |
public function delete_tree_cache() {
|
730 |
-
|
731 |
}
|
732 |
|
733 |
function parentid( $topicid = 0 ){
|
734 |
if(isset($_GET['page']) && $_GET['page'] == 'wpforo-forums'){
|
735 |
-
if( isset($_GET['id'])) return
|
736 |
}
|
737 |
elseif( isset($_GET['page']) && $_GET['page'] == 'wpforo-topics' ){
|
738 |
-
if( isset($_GET['id'])) return
|
739 |
}else{
|
740 |
-
if( $topicid ) return
|
741 |
}
|
742 |
}
|
743 |
|
744 |
function permissions(){
|
745 |
-
$access_arr =
|
746 |
if(!empty( $access_arr )){
|
747 |
|
748 |
if(isset($_GET['id'])){
|
749 |
-
if($permissions_srlz =
|
750 |
$permissions_arr = unserialize($permissions_srlz);
|
751 |
}
|
752 |
}
|
753 |
|
754 |
-
if($usergroups =
|
755 |
foreach($usergroups as $usergroup){
|
756 |
extract($usergroup, EXTR_OVERWRITE);
|
757 |
echo '
|
@@ -805,8 +806,8 @@ class wpForoForum{
|
|
805 |
$wheres = "`forumid` IN(" . implode(', ', array_map('intval', $forumids)) . ")";
|
806 |
}
|
807 |
|
808 |
-
$sql = "SELECT SUM(`topics`) as topics, SUM(`posts`) as posts FROM `"
|
809 |
-
return
|
810 |
|
811 |
}
|
812 |
|
@@ -841,16 +842,16 @@ class wpForoForum{
|
|
841 |
extract($args, EXTR_OVERWRITE);
|
842 |
|
843 |
if( $args['forumid'] ){
|
844 |
-
$sql = "SELECT `cat_layout` FROM `"
|
845 |
-
$cat_layout =
|
846 |
return ( $cat_layout ? $cat_layout : 1 );
|
847 |
}elseif( $args['topicid'] ){
|
848 |
-
$sql = "SELECT `forumid` FROM `"
|
849 |
-
$forumid =
|
850 |
return $this->get_layout(array( 'forumid' => $forumid ));
|
851 |
}elseif( $args['postid'] ){
|
852 |
-
$sql = "SELECT `forumid` FROM `"
|
853 |
-
$forumid =
|
854 |
return $this->get_layout(array( 'forumid' => $forumid ));
|
855 |
}
|
856 |
}
|
@@ -875,7 +876,7 @@ class wpForoForum{
|
|
875 |
}
|
876 |
|
877 |
function get_all_relative_ids($forumid, &$relative_ids){
|
878 |
-
$forum =
|
879 |
|
880 |
if($forum['parentid'] != 0){
|
881 |
$relative_ids[] = $forum['forumid'];
|
@@ -887,20 +888,20 @@ class wpForoForum{
|
|
887 |
}
|
888 |
|
889 |
function get_count( $args = array() ){
|
890 |
-
$sql = "SELECT COUNT(`forumid`) FROM `"
|
891 |
if( !empty($args) ){
|
892 |
$wheres = array();
|
893 |
foreach ($args as $key => $value) $wheres[] = "`$key` = " . intval($value);
|
894 |
if($wheres) $sql .= " WHERE " . implode(' AND ', $wheres);
|
895 |
}
|
896 |
-
return
|
897 |
}
|
898 |
|
899 |
function get_lastinfo( $ids = array() ){
|
900 |
$lastinfo = array();
|
901 |
if(!empty($ids)){
|
902 |
$ids = implode(',', array_map('intval', $ids));
|
903 |
-
$lastinfo =
|
904 |
}
|
905 |
return $lastinfo;
|
906 |
}
|
@@ -915,7 +916,7 @@ class wpForoForum{
|
|
915 |
$items = array();
|
916 |
$level = $level + 1;
|
917 |
foreach ($forums as $forum) {
|
918 |
-
if ( !isset($forum['forumid']) ||
|
919 |
$forum['level'] = $level + 1;
|
920 |
if ($forum['parentid'] == $parentId) {
|
921 |
$children = $this->children($forums, $forum['forumid'], $level);
|
4 |
|
5 |
|
6 |
class wpForoForum{
|
|
|
7 |
public $default;
|
8 |
public $options;
|
9 |
public $cans;
|
10 |
|
11 |
static $cache = array( 'forums' => array(), 'forum' => array(), 'item' => array() );
|
12 |
|
13 |
+
public function __construct(){
|
|
|
|
|
14 |
$this->init_defaults();
|
15 |
$this->init_options();
|
16 |
}
|
23 |
'layout_extended_intro_topics_toggle' => 1,
|
24 |
'layout_qa_intro_topics_count' => 3,
|
25 |
'layout_extended_intro_topics_count' => 5,
|
26 |
+
'layout_qa_intro_topics_length' => 90,
|
27 |
+
'layout_extended_intro_topics_length' => 45,
|
28 |
);
|
29 |
|
30 |
$this->default->cans = array (
|
56 |
'at' => 'Can set topic answered',
|
57 |
'oat' => 'Can set own topic answered',
|
58 |
'cot' => 'Can close topic',
|
59 |
+
'mt' => 'Can move topic',
|
60 |
+
'ccp' => 'Can create poll',
|
61 |
+
'cvp' => 'Can vote poll',
|
62 |
+
'cvpr' => 'Can view poll result',
|
63 |
);
|
64 |
}
|
65 |
|
76 |
$new_slug = wpforo_text($slug, 250, false);
|
77 |
$forumid = intval($forumid);
|
78 |
$i = 2;
|
79 |
+
while( WPF()->db->get_var("SELECT `forumid` FROM ".WPF()->db->prefix."wpforo_forums WHERE `slug` = '" . esc_sql($new_slug) . "'" . ($forumid ? ' AND `forumid` != '. intval($forumid) : '')) ){
|
80 |
if( !isset($parent_slug) && $parentid = intval($parentid) ){
|
81 |
+
$parent_slug = WPF()->db->get_var("SELECT `slug` FROM ".WPF()->db->prefix."wpforo_forums WHERE `forumid` = " . intval($parentid) );
|
82 |
$new_slug = $parent_slug . "-" . wpforo_text($slug, 250, false);
|
83 |
}else{
|
84 |
$new_slug = wpforo_text($slug, 250, false) . '-' . $i;
|
89 |
}
|
90 |
|
91 |
public function add( $args = array(), $checkperm = TRUE ){
|
92 |
+
if( $checkperm && !WPF()->perm->usergroup_can('cf') ){
|
93 |
+
WPF()->notice->add('Permission denied for add forum', 'error');
|
94 |
return FALSE;
|
95 |
}
|
96 |
|
100 |
extract($args, EXTR_OVERWRITE);
|
101 |
|
102 |
if( !isset($title) || !$title ){
|
103 |
+
WPF()->notice->add('Please insert required fields!', 'error');
|
104 |
return FALSE;
|
105 |
}
|
106 |
|
123 |
if(!$parentid) $is_cat = 1;
|
124 |
|
125 |
if($parentid) {
|
126 |
+
$cat_layout = WPF()->db->get_var("SELECT `cat_layout` FROM `".WPF()->db->prefix ."wpforo_forums` WHERE `forumid` = " . intval($parentid) );
|
127 |
$cat_layout = intval($cat_layout);
|
128 |
}
|
129 |
|
130 |
+
if( WPF()->db->insert(
|
131 |
+
WPF()->db->prefix . 'wpforo_forums',
|
132 |
array(
|
133 |
'title' => stripslashes($title),
|
134 |
'slug' => $slug,
|
148 |
array('%s','%s','%s','%d','%s','%d','%d','%s','%s','%s','%d','%d','%d','%d')
|
149 |
)
|
150 |
){
|
151 |
+
$forumid = WPF()->db->insert_id;
|
152 |
$this->delete_tree_cache();
|
153 |
wpforo_clean_cache($forumid, 'forum', $args);
|
154 |
+
WPF()->notice->add('Your forum successfully added', 'success');
|
155 |
return $forumid;
|
156 |
}
|
157 |
|
158 |
+
WPF()->notice->add('Can\'t add forum', 'error');
|
159 |
return FALSE;
|
160 |
}
|
161 |
|
162 |
public function edit( $args = array() ){
|
163 |
+
if( !WPF()->perm->usergroup_can('ef') ){
|
164 |
+
WPF()->notice->add('Permission denied for edit forum', 'error');
|
165 |
return FALSE;
|
166 |
}
|
167 |
|
172 |
extract($args, EXTR_OVERWRITE);
|
173 |
|
174 |
if( !isset($forumid) || !$forumid ){
|
175 |
+
WPF()->notice->add('Forum update error', 'error');
|
176 |
return FALSE;
|
177 |
}
|
178 |
|
179 |
if( !isset($title) || !$title ){
|
180 |
+
WPF()->notice->add('Please insert required fields!', 'error');
|
181 |
return FALSE;
|
182 |
}
|
183 |
|
201 |
if(!$parentid) $is_cat = 1;
|
202 |
|
203 |
if($parentid) {
|
204 |
+
$cat_layout = WPF()->db->get_var("SELECT `cat_layout` FROM `".WPF()->db->prefix ."wpforo_forums` WHERE `forumid` = " . intval($parentid) );
|
205 |
$cat_layout = intval($cat_layout);
|
206 |
}
|
207 |
|
208 |
+
if( FALSE !== WPF()->db->update(
|
209 |
+
WPF()->db->prefix . 'wpforo_forums',
|
210 |
array(
|
211 |
'title' => stripslashes($title),
|
212 |
'slug' => $slug,
|
228 |
if( isset($cat_layout) ){
|
229 |
$childs = array();
|
230 |
$this->get_childs($forumid, $childs);
|
231 |
+
$sql = "UPDATE `".WPF()->db->prefix . "wpforo_forums` SET `cat_layout` = ".intval($cat_layout)." WHERE `forumid` IN(". implode(',', array_map('intval', $childs)).")";
|
232 |
+
WPF()->db->query($sql);
|
233 |
}
|
234 |
$this->delete_tree_cache();
|
235 |
wpforo_clean_cache($forumid, 'forum', $args);
|
236 |
+
WPF()->notice->add('Forum successfully updated', 'success');
|
237 |
return $forumid;
|
238 |
}
|
239 |
|
240 |
+
WPF()->notice->add('Forum update error', 'error');
|
241 |
return FALSE;
|
242 |
}
|
243 |
|
245 |
$forumid = intval($forumid);
|
246 |
if(!$forumid && isset( $_REQUEST['id'] ) ) $forumid = intval($_REQUEST['id']);
|
247 |
|
248 |
+
if( !WPF()->perm->usergroup_can('df') ){
|
249 |
+
WPF()->notice->add('Permission denied for delete forum', 'error');
|
250 |
return FALSE;
|
251 |
}
|
252 |
|
255 |
$forumids = implode(',', array_map('intval', $childs));
|
256 |
|
257 |
// START delete topic posts include first post
|
258 |
+
if( $topicids = WPF()->db->get_col( "SELECT `topicid` FROM ".WPF()->db->prefix."wpforo_topics WHERE `forumid` IN(". esc_sql($forumids) .")" ) ){
|
259 |
foreach($topicids as $topicid){
|
260 |
+
WPF()->topic->delete($topicid, false);
|
261 |
}
|
262 |
}
|
263 |
// END delete topic posts include first post
|
264 |
|
265 |
+
if(WPF()->db->query( "DELETE FROM ".WPF()->db->prefix."wpforo_forums WHERE `forumid` IN(". esc_sql($forumids) .")" )){
|
266 |
$this->delete_tree_cache();
|
267 |
wpforo_clean_cache();
|
268 |
+
WPF()->notice->add('Your forum successfully deleted', 'success');
|
269 |
return TRUE;
|
270 |
}
|
271 |
|
272 |
+
WPF()->notice->add('Forum deleting error', 'error');
|
273 |
return FALSE;
|
274 |
}
|
275 |
|
285 |
if( $child_forumids = $this->get_child_forums( $forumid ) ){
|
286 |
$forumids = trim( implode(',', array_map('intval', $child_forumids)) );
|
287 |
if( $forumids ){
|
288 |
+
$merge_layout = WPF()->db->get_var("SELECT `cat_layout` FROM `".WPF()->db->prefix."wpforo_forums` WHERE `forumid` = " . intval($mergeid) );
|
289 |
|
290 |
+
if(!WPF()->db->query( "UPDATE ".WPF()->db->prefix."wpforo_forums SET `parentid` = " . intval($mergeid) . ", `cat_layout` = " . intval($merge_layout) . " WHERE `forumid` IN(". esc_sql($forumids) .")" )){
|
291 |
+
WPF()->notice->add('Forum merging error', 'error');
|
292 |
return FALSE;
|
293 |
}
|
294 |
}
|
295 |
}
|
296 |
|
297 |
+
WPF()->db->update(
|
298 |
+
WPF()->db->prefix . 'wpforo_topics',
|
299 |
array( 'forumid' => $mergeid ),
|
300 |
array( 'forumid' => $forumid ),
|
301 |
array( '%d' ),
|
302 |
array( '%d' )
|
303 |
);
|
304 |
+
WPF()->db->update(
|
305 |
+
WPF()->db->prefix . 'wpforo_posts',
|
306 |
array( 'forumid' => $mergeid ),
|
307 |
array( 'forumid' => $forumid ),
|
308 |
array( '%d' ),
|
312 |
$this->rebuild_last_infos($mergeid);
|
313 |
$this->rebuild_stats($mergeid);
|
314 |
|
315 |
+
if(WPF()->db->delete( WPF()->db->prefix.'wpforo_forums', array( 'forumid' => $forumid ), array( '%d' ) )){
|
316 |
$this->delete_tree_cache();
|
317 |
wpforo_clean_cache(0, 'forum');
|
318 |
+
WPF()->notice->add('Forum is successfully merged', 'success');
|
319 |
return TRUE;
|
320 |
}
|
321 |
|
322 |
+
WPF()->notice->add('Forum merging error', 'error');
|
323 |
return FALSE;
|
324 |
}
|
325 |
|
332 |
$last_userid = 0;
|
333 |
$last_post_date = '0000-00-00 00:00:00';
|
334 |
|
335 |
+
$last_topics = WPF()->topic->get_topics( array('forumid' => $forumid, 'orderby' => 'topicid', 'order' => 'DESC', 'row_count' => 1) );
|
336 |
if(!empty($last_topics)){
|
337 |
$last_topic = $last_topics[0];
|
338 |
$last_topicid = $last_topic['topicid'];
|
339 |
}
|
340 |
+
$last_posts = WPF()->topic->get_topics( array('forumid' => $forumid, 'orderby' => 'modified', 'order' => 'DESC', 'row_count' => 1) );
|
341 |
if(!empty($last_posts)){
|
342 |
$last_post = $last_posts[0];
|
343 |
+
$last_post_data = WPF()->post->get_post($last_post['last_post']);
|
344 |
if(!empty($last_post_data)){
|
345 |
$last_postid = $last_post_data['postid'];
|
346 |
$last_userid = $last_post_data['userid'];
|
348 |
}
|
349 |
}
|
350 |
|
351 |
+
WPF()->db->query( "UPDATE `".WPF()->db->prefix."wpforo_forums`
|
352 |
SET `last_topicid` = ".intval($last_topicid).", `last_postid` = ".intval($last_postid).",
|
353 |
`last_userid` = ".intval($last_userid).", `last_post_date` = '".esc_sql($last_post_date)."'
|
354 |
WHERE `forumid` = ".intval($forumid) );
|
357 |
|
358 |
public function rebuild_stats($forumid){
|
359 |
if( !$forumid = intval($forumid) ) return false;
|
360 |
+
$topics = WPF()->topic->get_count( array('forumid' => $forumid) );
|
361 |
+
$posts = WPF()->post->get_count( array('forumid' => $forumid) );
|
362 |
|
363 |
+
if( false !== WPF()->db->update(
|
364 |
+
WPF()->db->prefix . "wpforo_forums",
|
365 |
array('topics' => $topics, 'posts' => $posts ),
|
366 |
array('forumid' => $forumid),
|
367 |
array('%d', '%d'),
|
373 |
return false;
|
374 |
}
|
375 |
|
376 |
+
function get_forum( $args ){
|
377 |
|
378 |
+
$cache = WPF()->cache->on('memory_cashe');
|
379 |
|
380 |
if(is_array($args)){
|
381 |
$default = array(
|
409 |
}
|
410 |
if(!empty($args)){
|
411 |
extract($args, EXTR_OVERWRITE);
|
412 |
+
$sql = "SELECT * FROM `".WPF()->db->prefix."wpforo_forums`";
|
413 |
$wheres = array();
|
414 |
if($forumid != NULL) $wheres[] = "`forumid` = " . intval($forumid);
|
415 |
if($status != NULL) $wheres[] = "`status` = " . intval($status);
|
423 |
if(!empty($wheres)){
|
424 |
$sql .= " WHERE " . implode( " AND ", $wheres );
|
425 |
}
|
426 |
+
$forum = WPF()->db->get_row($sql, ARRAY_A);
|
427 |
if(!empty($forum)) {
|
428 |
$forum['url'] = $this->get_forum_url( $forum );
|
429 |
}
|
440 |
|
441 |
function get_forums($args = array(), &$items_count = 0 ){
|
442 |
|
443 |
+
$cache = WPF()->cache->on('object_cashe');
|
444 |
|
445 |
$default = array(
|
446 |
'include' => array(), // array( 2, 10, 25 )
|
467 |
$parent_include = wpforo_parse_args( $parent_include );
|
468 |
$parent_exclude = wpforo_parse_args( $parent_exclude );
|
469 |
|
470 |
+
$sql = "SELECT * FROM `".WPF()->db->prefix."wpforo_forums`";
|
471 |
$wheres = array();
|
472 |
|
473 |
if(!empty($include)) $wheres[] = "`forumid` IN(" . implode(', ', array_map('intval', $include)) . ")";
|
488 |
if(!empty($wheres)) $sql .= " WHERE " . implode( " AND ", $wheres );
|
489 |
|
490 |
$item_count_sql = preg_replace('#SELECT.+?FROM#isu', 'SELECT count(*) FROM', $sql);
|
491 |
+
if( $item_count_sql ) $items_count = WPF()->db->get_var($item_count_sql);
|
492 |
|
493 |
$sql .= esc_sql(" ORDER BY `$orderby` " . $order);
|
494 |
|
500 |
}
|
501 |
}
|
502 |
|
503 |
+
if( $cache ){ $object_key = md5( $sql . WPF()->current_user_groupid ); $object_cache = WPF()->cache->get( $object_key ); if(!empty($object_cache)){$items_count = $object_cache['items_count']; return $object_cache['items'];}}
|
504 |
|
505 |
+
$forums = WPF()->db->get_results($sql, ARRAY_A);
|
506 |
$forums = apply_filters('wpforo_get_topics', $forums);
|
507 |
|
508 |
if($cache && isset($object_key) && !empty($forums)){
|
526 |
);
|
527 |
}
|
528 |
|
529 |
+
$sql = "SELECT `forumid` FROM `".WPF()->db->prefix."wpforo_forums`";
|
530 |
$wheres = array();
|
531 |
|
532 |
foreach($fields as $field){
|
534 |
}
|
535 |
|
536 |
$sql .= " WHERE " . implode(" OR ", $wheres);
|
537 |
+
return WPF()->db->get_col($sql);
|
538 |
}
|
539 |
|
540 |
return array();
|
552 |
|
553 |
if(!isset($forumid) || !$forumid = intval($forumid) ) continue;
|
554 |
|
555 |
+
if(FALSE !== WPF()->db->update(
|
556 |
+
WPF()->db->prefix . 'wpforo_forums',
|
557 |
array(
|
558 |
'parentid' => (isset($parentid) ? intval($parentid) : 0),
|
559 |
'order' => (isset($order) ? intval($order) : 0),
|
567 |
)) $i++;
|
568 |
|
569 |
if(isset($parentid) && $parentid = intval($parentid) ){
|
570 |
+
$cat_layout = WPF()->db->get_var("SELECT `cat_layout` FROM `".WPF()->db->prefix."wpforo_forums` WHERE `forumid` = " . intval($parentid));
|
571 |
+
WPF()->db->query("UPDATE `".WPF()->db->prefix."wpforo_forums` SET `cat_layout` = " . intval($cat_layout) . " WHERE `forumid` = " . intval($forumid));
|
572 |
}
|
573 |
|
574 |
}
|
575 |
|
576 |
+
WPF()->db->query("UPDATE `".WPF()->db->prefix."wpforo_forums` SET `is_cat` = 0");
|
577 |
+
WPF()->db->query("UPDATE `".WPF()->db->prefix."wpforo_forums` SET `is_cat` = 1 WHERE `parentid` = 0");
|
578 |
|
579 |
if($i){
|
580 |
+
WPF()->notice->add('Forum hierarchy successfully updated', 'success');
|
581 |
}else{
|
582 |
+
WPF()->notice->add('Cannot update forum hierarchy', 'error');
|
583 |
}
|
584 |
|
585 |
}
|
587 |
|
588 |
function get_childs($forumid, &$data){
|
589 |
if(empty($data)) $data[] = $forumid;
|
590 |
+
$sub_forums = WPF()->db->get_results("SELECT `forumid` FROM ".WPF()->db->prefix."wpforo_forums WHERE `parentid` = ".intval($forumid), ARRAY_A);
|
591 |
if(!empty($sub_forums)){
|
592 |
foreach($sub_forums as $sub_forum){
|
593 |
$data[] = $sub_forum['forumid'];
|
611 |
* @return int
|
612 |
*/
|
613 |
function count_depth($forumid, &$depth){
|
614 |
+
$parentid = WPF()->db->get_var("SELECT `parentid` FROM `".WPF()->db->prefix."wpforo_forums` WHERE `forumid` = ".intval($forumid));
|
615 |
|
616 |
if($parentid != 0){
|
617 |
$depth++;
|
620 |
}
|
621 |
|
622 |
function get_child_forums($parent){
|
623 |
+
$children = WPF()->db->get_results("SELECT `forumid` AS childid FROM `".WPF()->db->prefix."wpforo_forums` WHERE `parentid` = ".intval($parent)." ORDER BY `order`", ARRAY_A);
|
624 |
if(!empty($children)){
|
625 |
foreach( $children as $child ){
|
626 |
$data[] = $child['childid'];
|
633 |
|
634 |
function forum_list( $parent, $type , $cats = TRUE, $topicid = 0 ){
|
635 |
static $old_depth;
|
636 |
+
|
|
|
637 |
foreach ( $parent as $forumid ) {
|
638 |
|
639 |
if ($forumid == 0) continue;
|
640 |
$depth = 0;
|
641 |
$this->count_depth($forumid, $depth);
|
642 |
+
$name = WPF()->db->get_var("SELECT `title` FROM `".WPF()->db->prefix."wpforo_forums` WHERE `forumid` = ".intval($forumid));
|
643 |
if($type == 'select_box'){
|
644 |
+
if( function_exists('WPF_AD') && isset($_GET['page']) && $_GET['page'] == 'wpforo-ads' && isset($_GET['action']) && $_GET['action'] == 'edit' && isset($_GET['id']) && $_GET['id'] ){
|
645 |
+
$ad = WPF_AD()->get_ad($_GET['id']);
|
646 |
$ad_forumids = explode(',', $ad['forumids']);
|
647 |
}
|
648 |
?><option value="<?php echo intval($forumid) ?>"<?php echo( !$cats && $depth == 0 ? ' disabled ': ''); echo ( $forumid == $this->parentid($topicid) || (isset( $_GET['forumid'] ) && $forumid == $_GET['forumid']) || ( !empty($_GET['wpff']) && in_array($forumid, $_GET['wpff']) ) || ( !empty($ad_forumids) && in_array($forumid, $ad_forumids) ) || ( isset($_GET['parentid']) && $_GET['parentid'] == $forumid ) ? ' selected ' : '' ) ?> > <?php echo esc_html(str_repeat( '— ', $depth ) . trim($name)) ?></option><?php
|
649 |
}elseif($type == 'drag_menu'){
|
650 |
+
$cur_forum = WPF()->db->get_row("SELECT `cat_layout`, `topics`, `posts` FROM `".WPF()->db->prefix."wpforo_forums` WHERE `forumid` = ".intval($forumid), ARRAY_A);
|
651 |
$cat_layout_name = ( $cur_forum['cat_layout'] == 2 ? 'Simplified Layout' : ( $cur_forum['cat_layout'] == 3 ? 'QA Layout' : 'Extended Layout' ) ); ?>
|
652 |
|
653 |
<li id="menu-item-<?php echo intval($forumid) ?>" class="menu-item menu-item-depth-<?php echo esc_attr($depth) ?>">
|
661 |
<span class="wpforo-cat-layout"><?php echo ( $depth != 0 ? __('Topics', 'wpforo') . ' (' . intval($cur_forum['topics']) . ') , ' . __('Posts', 'wpforo') . ' (' . intval($cur_forum['posts']) . ') | ' : '' ) ?><?php echo ( $depth == 0 ? '( <i>' . esc_html($cat_layout_name) . '</i> ) | ' : '' ); ?></span>
|
662 |
<span class="menu_add"><a href="<?php echo admin_url( 'admin.php?page=wpforo-forums&action=add&parentid=' . intval($forumid) ) ?>" > <img src="<?php echo WPFORO_URL ?>/wpf-assets/images/icons/plus<?php echo ((!$depth) ? '-dark' : ''); ?>.png" title="<?php if( $depth ) : _e('Add a new SubForum', 'wpforo'); else: _e('Add a new Forum in this Category', 'wpforo'); endif; ?>"/></a></span> |
|
663 |
<span class="menu_edit"><a href="<?php echo admin_url( 'admin.php?page=wpforo-forums&id=' . intval($forumid) . '&action=edit' ) ?>"><img src="<?php echo WPFORO_URL ?>/wpf-assets/images/icons/pencil<?php echo ((!$depth) ? '-dark' : ''); ?>.png" title="<?php _e('edit', 'wpforo') ?>"/></a></span> |
|
664 |
+
<?php if( WPF()->perm->usergroup_can('df') ): ?>
|
665 |
<span class="menu_delete"><a href="<?php echo admin_url( 'admin.php?page=wpforo-forums&id=' . intval($forumid) . '&action=del' ) ?>"><img src="<?php echo WPFORO_URL ?>/wpf-assets/images/icons/trash<?php echo ((!$depth) ? '-dark' : ''); ?>.png" title="<?php _e('delete', 'wpforo') ?>"/></a></span> |
|
666 |
<?php endif; ?>
|
667 |
<span class="menu_view"><a href="<?php echo esc_url(wpforo_forum($forumid, 'url')); ?>" > <img src="<?php echo WPFORO_URL ?>/wpf-assets/images/icons/eye<?php echo ((!$depth) ? '-dark' : ''); ?>.png" title="<?php _e('View', 'wpforo') ?>"/> </a> </span>
|
674 |
|
675 |
<?php
|
676 |
}elseif($type == 'front_list'){
|
677 |
+
$slug = WPF()->db->get_var("SELECT `slug` FROM `".WPF()->db->prefix."wpforo_forums` WHERE `forumid` = ".intval($forumid));
|
678 |
if(isset($old_depth) && $old_depth == $depth) echo '</dd><dd>';
|
679 |
if(isset($old_depth) && $old_depth < $depth) echo '<dl><dd>';
|
680 |
if(isset($old_depth) && $old_depth > $depth) echo '</dd></dl>';
|
681 |
$old_depth = $depth;
|
682 |
+
if(isset(WPF()->current_object) && isset(WPF()->current_object['forumid'])){
|
683 |
+
if( $forumid == WPF()->current_object['forumid'] ){
|
684 |
echo'<span class="wpf-dl-item wpf-dl-current"><i class="fa fa-comments-o"></i><strong>'.esc_html($name).'</strong><a href="' . esc_url( wpforo_forum($forumid, 'url') ) . '" > »</a></span>';
|
685 |
}
|
686 |
else{
|
699 |
}
|
700 |
|
701 |
function tree( $type = 'front_list', $cats = TRUE, $topicid = 0 ){
|
702 |
+
$parentids = WPF()->db->get_results("SELECT `forumid` AS parentid FROM `".WPF()->db->prefix."wpforo_forums` WHERE `parentid` = 0 ORDER BY `order`", ARRAY_A);
|
703 |
if(!empty($parentids)){
|
704 |
foreach( $parentids as $parentid ){
|
705 |
$data[] = $parentid['parentid'];
|
706 |
}
|
707 |
if( !wpforo_is_admin() ){
|
708 |
+
$key = md5( serialize($data) . $type . (int)$cats . WPF()->current_user_groupid );
|
709 |
$html = get_option( 'wpforo_forum_tree_' . $key );
|
710 |
if( $html ){
|
711 |
echo $html;
|
728 |
// end forums tree for drop down menu
|
729 |
|
730 |
public function delete_tree_cache() {
|
731 |
+
WPF()->db->query("DELETE FROM " . WPF()->db->options . " WHERE `option_name` LIKE 'wpforo_forum_tree_%'");
|
732 |
}
|
733 |
|
734 |
function parentid( $topicid = 0 ){
|
735 |
if(isset($_GET['page']) && $_GET['page'] == 'wpforo-forums'){
|
736 |
+
if( isset($_GET['id'])) return WPF()->db->get_var("SELECT `parentid` FROM `".WPF()->db->prefix."wpforo_forums` WHERE `forumid` = ".intval($_GET['id']));
|
737 |
}
|
738 |
elseif( isset($_GET['page']) && $_GET['page'] == 'wpforo-topics' ){
|
739 |
+
if( isset($_GET['id'])) return WPF()->db->get_var( "SELECT `forumid` FROM `".WPF()->db->prefix."wpforo_topics` WHERE `topicid` = ".intval($_GET['id']));
|
740 |
}else{
|
741 |
+
if( $topicid ) return WPF()->db->get_var( "SELECT `forumid` FROM `".WPF()->db->prefix."wpforo_topics` WHERE `topicid` = ".intval($topicid));
|
742 |
}
|
743 |
}
|
744 |
|
745 |
function permissions(){
|
746 |
+
$access_arr = WPF()->perm->get_accesses();
|
747 |
if(!empty( $access_arr )){
|
748 |
|
749 |
if(isset($_GET['id'])){
|
750 |
+
if($permissions_srlz = WPF()->db->get_var("SELECT `permissions` FROM `".WPF()->db->prefix."wpforo_forums` WHERE `forumid` = ".intval($_GET['id']))){
|
751 |
$permissions_arr = unserialize($permissions_srlz);
|
752 |
}
|
753 |
}
|
754 |
|
755 |
+
if($usergroups = WPF()->db->get_results("SELECT `groupid`, `name` FROM `".WPF()->db->prefix."wpforo_usergroups`", ARRAY_A)){
|
756 |
foreach($usergroups as $usergroup){
|
757 |
extract($usergroup, EXTR_OVERWRITE);
|
758 |
echo '
|
806 |
$wheres = "`forumid` IN(" . implode(', ', array_map('intval', $forumids)) . ")";
|
807 |
}
|
808 |
|
809 |
+
$sql = "SELECT SUM(`topics`) as topics, SUM(`posts`) as posts FROM `".WPF()->db->prefix."wpforo_forums` WHERE " . $wheres;
|
810 |
+
return WPF()->db->get_row($sql, ARRAY_A);
|
811 |
|
812 |
}
|
813 |
|
842 |
extract($args, EXTR_OVERWRITE);
|
843 |
|
844 |
if( $args['forumid'] ){
|
845 |
+
$sql = "SELECT `cat_layout` FROM `".WPF()->db->prefix."wpforo_forums` WHERE `forumid` = " . intval($args['forumid']);
|
846 |
+
$cat_layout = WPF()->db->get_var($sql);
|
847 |
return ( $cat_layout ? $cat_layout : 1 );
|
848 |
}elseif( $args['topicid'] ){
|
849 |
+
$sql = "SELECT `forumid` FROM `".WPF()->db->prefix."wpforo_topics` WHERE `topicid` = " . intval($args['topicid']);
|
850 |
+
$forumid = WPF()->db->get_var($sql);
|
851 |
return $this->get_layout(array( 'forumid' => $forumid ));
|
852 |
}elseif( $args['postid'] ){
|
853 |
+
$sql = "SELECT `forumid` FROM `".WPF()->db->prefix."wpforo_posts` WHERE `postid` = " . intval($args['postid']);
|
854 |
+
$forumid = WPF()->db->get_var($sql);
|
855 |
return $this->get_layout(array( 'forumid' => $forumid ));
|
856 |
}
|
857 |
}
|
876 |
}
|
877 |
|
878 |
function get_all_relative_ids($forumid, &$relative_ids){
|
879 |
+
$forum = WPF()->db->get_row("SELECT `parentid`, `forumid` FROM `".WPF()->db->prefix."wpforo_forums` WHERE `forumid` = ".intval($forumid), ARRAY_A);
|
880 |
|
881 |
if($forum['parentid'] != 0){
|
882 |
$relative_ids[] = $forum['forumid'];
|
888 |
}
|
889 |
|
890 |
function get_count( $args = array() ){
|
891 |
+
$sql = "SELECT COUNT(`forumid`) FROM `".WPF()->db->prefix."wpforo_forums`";
|
892 |
if( !empty($args) ){
|
893 |
$wheres = array();
|
894 |
foreach ($args as $key => $value) $wheres[] = "`$key` = " . intval($value);
|
895 |
if($wheres) $sql .= " WHERE " . implode(' AND ', $wheres);
|
896 |
}
|
897 |
+
return WPF()->db->get_var($sql);
|
898 |
}
|
899 |
|
900 |
function get_lastinfo( $ids = array() ){
|
901 |
$lastinfo = array();
|
902 |
if(!empty($ids)){
|
903 |
$ids = implode(',', array_map('intval', $ids));
|
904 |
+
$lastinfo = WPF()->db->get_row( "SELECT `userid` as last_userid, `topicid` as last_topicid, `postid` as last_postid, `created` as last_post_date FROM `" . WPF()->db->prefix . "wpforo_posts` WHERE forumid IN(" . $ids .") ORDER BY `created` DESC LIMIT 1", ARRAY_A);
|
905 |
}
|
906 |
return $lastinfo;
|
907 |
}
|
916 |
$items = array();
|
917 |
$level = $level + 1;
|
918 |
foreach ($forums as $forum) {
|
919 |
+
if ( !isset($forum['forumid']) || !WPF()->perm->forum_can('vf', $forum['forumid'])) continue;
|
920 |
$forum['level'] = $level + 1;
|
921 |
if ($forum['parentid'] == $parentId) {
|
922 |
$children = $this->children($forums, $forum['forumid'], $level);
|
wpf-includes/class-members.php
CHANGED
@@ -4,7 +4,6 @@
|
|
4 |
|
5 |
|
6 |
class wpForoMember{
|
7 |
-
private $wpforo;
|
8 |
public $default;
|
9 |
public $options;
|
10 |
private $fields;
|
@@ -15,11 +14,9 @@ class wpForoMember{
|
|
15 |
public $pass_min_length;
|
16 |
public $pass_max_length;
|
17 |
|
18 |
-
static $cache = array( 'users' => array(), 'user' => array(), 'guest' => array() );
|
19 |
|
20 |
-
function __construct(
|
21 |
-
if(!isset($this->wpforo)) $this->wpforo = $wpForo;
|
22 |
-
|
23 |
$this->init_defaults();
|
24 |
$this->init_options();
|
25 |
|
@@ -30,6 +27,7 @@ class wpForoMember{
|
|
30 |
$this->default = new stdClass;
|
31 |
|
32 |
$this->default->options = array(
|
|
|
33 |
'default_title' => 'Member',
|
34 |
'online_status_timeout' => 240,
|
35 |
'url_structure' => 'nicename',
|
@@ -70,12 +68,12 @@ class wpForoMember{
|
|
70 |
if(!isset($args['userid']) || !$args['userid'] || !isset($args['username']) || !$args['username'] ) return FALSE;
|
71 |
extract( $args, EXTR_OVERWRITE );
|
72 |
$this->reset($userid);
|
73 |
-
return
|
74 |
-
|
75 |
array( 'userid' => intval($userid),
|
76 |
-
'title' => ( isset($title) && $title ? $title :
|
77 |
'username' => sanitize_user($username),
|
78 |
-
'groupid' => intval((isset($groupid) && $groupid ? $groupid :
|
79 |
'site' => (isset($site) ? sanitize_text_field($site) : '' ),
|
80 |
'timezone' => ( isset($timezone) ? sanitize_text_field($timezone) : 'UTC+0' ),
|
81 |
'about' => ( isset($about) ? stripslashes( wpforo_kses(trim($about), 'user_description') ) : '' ),
|
@@ -98,11 +96,11 @@ class wpForoMember{
|
|
98 |
}
|
99 |
|
100 |
if(isset($groupid) && $groupid){
|
101 |
-
if(
|
102 |
$groupid = intval($groupid);
|
103 |
-
if( !(
|
104 |
$flds = $this->get_fields();
|
105 |
-
if( !in_array($groupid, wpforo_parse_args($flds['groupid']['allowedGroupIds'])) ) $groupid =
|
106 |
}
|
107 |
$fields['groupid'] = $groupid;
|
108 |
$fields_types[] = '%d';
|
@@ -180,8 +178,8 @@ class wpForoMember{
|
|
180 |
|
181 |
$this->reset($userid);
|
182 |
|
183 |
-
$result =
|
184 |
-
|
185 |
$fields,
|
186 |
array('userid' => intval($userid)),
|
187 |
$fields_types,
|
@@ -190,7 +188,7 @@ class wpForoMember{
|
|
190 |
|
191 |
if( $result !== FALSE && $userid ){
|
192 |
if(isset($fields['site'])){
|
193 |
-
|
194 |
}
|
195 |
if(isset($fields['about'])){
|
196 |
update_user_meta( $userid, 'description', $fields['about'] );
|
@@ -201,8 +199,8 @@ class wpForoMember{
|
|
201 |
}
|
202 |
|
203 |
function create($args){
|
204 |
-
if(!wpforo_feature('user-register'
|
205 |
-
|
206 |
return FALSE;
|
207 |
}
|
208 |
|
@@ -233,43 +231,43 @@ class wpForoMember{
|
|
233 |
$illegal_user_logins = array_map( 'strtolower', (array) apply_filters( 'illegal_user_logins', array() ) );
|
234 |
if ( $sanitized_user_login == '' ) {
|
235 |
$errors->add( 'empty_username', __( '<strong>ERROR</strong>: Please enter a username.' ) );
|
236 |
-
|
237 |
return FALSE;
|
238 |
}elseif ( ! validate_username( $user_login ) ) {
|
239 |
$errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) );
|
240 |
$sanitized_user_login = '';
|
241 |
-
|
242 |
$user_login = '';
|
243 |
return FALSE;
|
244 |
}elseif( strlen($user_login) < $this->login_min_length || strlen($user_login) > $this->login_max_length ){
|
245 |
-
|
246 |
return FALSE;
|
247 |
}elseif ( username_exists( $sanitized_user_login ) ) {
|
248 |
$errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ) );
|
249 |
-
|
250 |
return FALSE;
|
251 |
}elseif ( in_array( strtolower( $sanitized_user_login ), $illegal_user_logins ) ) {
|
252 |
$errors->add( 'invalid_username', __( '<strong>ERROR</strong>: Sorry, that username is not allowed.' ) );
|
253 |
-
|
254 |
return FALSE;
|
255 |
}elseif ( $user_email == '' ) {
|
256 |
$errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please type your email address.' ) );
|
257 |
-
|
258 |
return FALSE;
|
259 |
}elseif ( ! is_email( $user_email ) ) {
|
260 |
$errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The email address isn’t correct.' ) );
|
261 |
-
|
262 |
$user_email = '';
|
263 |
return FALSE;
|
264 |
}elseif ( email_exists( $user_email ) ) {
|
265 |
$errors->add( 'email_exists', __( '<strong>ERROR</strong>: This email is already registered, please choose another one.' ) );
|
266 |
-
|
267 |
return FALSE;
|
268 |
}elseif( strlen($user_pass1) < $this->pass_min_length || strlen($user_pass1) > $this->pass_max_length ){
|
269 |
-
|
270 |
return FALSE;
|
271 |
}elseif($user_pass1 != $user_pass2){
|
272 |
-
|
273 |
return FALSE;
|
274 |
}else{
|
275 |
do_action( 'register_post', $sanitized_user_login, $user_email, $errors );
|
@@ -277,7 +275,7 @@ class wpForoMember{
|
|
277 |
if ( $errors->get_error_code() ){
|
278 |
$args = array();
|
279 |
foreach($errors->errors as $u_err) $args[] = $u_err[0];
|
280 |
-
|
281 |
return FALSE;
|
282 |
}
|
283 |
$user_id = wp_create_user( $sanitized_user_login, $user_pass1, $user_email );
|
@@ -287,30 +285,30 @@ class wpForoMember{
|
|
287 |
wp_signon($creds);
|
288 |
do_action( 'wpforo_create_profile_after', $args );
|
289 |
do_action( 'register_new_user', $user_id );
|
290 |
-
|
291 |
return $user_id;
|
292 |
}
|
293 |
}
|
294 |
}elseif( !empty($args['user_login']) && !empty($args['user_email']) ){
|
295 |
if( strlen($args['user_login']) < $this->login_min_length || strlen($args['user_login']) > $this->login_max_length ){
|
296 |
-
|
297 |
return FALSE;
|
298 |
}
|
299 |
$user_id = register_new_user( $args['user_login'], $args['user_email'] );
|
300 |
if ( !is_wp_error( $user_id ) && $user_id ) {
|
301 |
$args['userid'] = $user_id;
|
302 |
do_action( 'wpforo_create_profile_after', $args );
|
303 |
-
|
304 |
return $user_id;
|
305 |
}
|
306 |
}
|
307 |
if(!empty($user_id->errors)){
|
308 |
$args = array();
|
309 |
foreach($user_id->errors as $u_err) $args[] = $u_err[0];
|
310 |
-
|
311 |
return FALSE;
|
312 |
}
|
313 |
-
|
314 |
return FALSE;
|
315 |
}
|
316 |
|
@@ -334,8 +332,8 @@ class wpForoMember{
|
|
334 |
$userid = intval($userid);
|
335 |
|
336 |
$isRegister = ( isset($args['template']) && $args['template'] == 'register' ) ? true : false;
|
337 |
-
if ( !$isRegister && ( !is_user_logged_in() ||
|
338 |
-
|
339 |
return FALSE;
|
340 |
}
|
341 |
|
@@ -346,10 +344,10 @@ class wpForoMember{
|
|
346 |
if( isset($user_email) && $user_email ){
|
347 |
$user_email = sanitize_email($user_email);
|
348 |
if ( ! is_email( $user_email ) ) {
|
349 |
-
|
350 |
return FALSE;
|
351 |
}elseif ( ( $owner_id = email_exists( $user_email ) ) && ( $owner_id != $userid ) ) {
|
352 |
-
|
353 |
return FALSE;
|
354 |
}
|
355 |
|
@@ -359,20 +357,20 @@ class wpForoMember{
|
|
359 |
if( isset($user_nicename) && $user_nicename ){
|
360 |
$user_nicename = sanitize_title( trim($user_nicename) );
|
361 |
if( is_numeric($user_nicename) ){
|
362 |
-
|
363 |
return FALSE;
|
364 |
}
|
365 |
-
$sql = "SELECT `ID` FROM `"
|
366 |
-
if(
|
367 |
-
|
368 |
return FALSE;
|
369 |
}
|
370 |
|
371 |
$fields['user_nicename'] = $user_nicename;
|
372 |
$fields_types[] = '%s';
|
373 |
|
374 |
-
|
375 |
-
|
376 |
array('meta_value' => $user_nicename),
|
377 |
array('user_id' => $userid, 'meta_key' => 'nickname'),
|
378 |
array('%s'),
|
@@ -381,8 +379,8 @@ class wpForoMember{
|
|
381 |
}
|
382 |
|
383 |
if( $fields ){
|
384 |
-
|
385 |
-
|
386 |
$fields,
|
387 |
array('ID' => $userid),
|
388 |
$fields_types,
|
@@ -394,19 +392,19 @@ class wpForoMember{
|
|
394 |
|
395 |
if( FALSE !== $this->edit_profile($args) ){
|
396 |
do_action( 'wpforo_edit_profile_after', $args );
|
397 |
-
|
398 |
return $userid;
|
399 |
}
|
400 |
}
|
401 |
|
402 |
-
|
403 |
return FALSE;
|
404 |
}
|
405 |
|
406 |
public function change_password($old_passw, $new_passw, $userid){
|
407 |
if( !$userid = wpforo_bigintval($userid) ){
|
408 |
-
|
409 |
-
|
410 |
return false;
|
411 |
}
|
412 |
|
@@ -422,26 +420,26 @@ class wpForoMember{
|
|
422 |
$creds = array('user_login' => sanitize_user( $user['user_login'] ), 'user_password' => $new_passw );
|
423 |
wp_signon($creds);
|
424 |
|
425 |
-
|
426 |
return true;
|
427 |
}
|
428 |
|
429 |
-
|
430 |
-
|
431 |
return false;
|
432 |
}
|
433 |
|
434 |
function upload_avatar( $userid = 0 ){
|
435 |
|
436 |
$userid = intval($userid);
|
437 |
-
if(
|
438 |
|
439 |
if( !$userid ){
|
440 |
if( !isset($_POST['member']['userid']) || !$userid = intval($_POST['member']['userid']) ) return;
|
441 |
}
|
442 |
|
443 |
if( !$user = $this->get_member($userid) ) return;
|
444 |
-
$
|
445 |
if(isset($_FILES['avatar']) && !empty($_FILES['avatar']) && isset($_FILES['avatar']['name']) && $_FILES['avatar']['name']){
|
446 |
|
447 |
$name = sanitize_file_name($_FILES['avatar']['name']); //myimg.png
|
@@ -451,15 +449,15 @@ class wpForoMember{
|
|
451 |
$size = intval($_FILES['avatar']['size']); //6112
|
452 |
|
453 |
if( $size > 2*1048576 ){
|
454 |
-
|
455 |
-
|
456 |
return FALSE;
|
457 |
}
|
458 |
|
459 |
if( $error ){
|
460 |
$error = wpforo_file_upload_error($error);
|
461 |
-
|
462 |
-
|
463 |
return FALSE;
|
464 |
}
|
465 |
|
@@ -471,12 +469,12 @@ class wpForoMember{
|
|
471 |
|
472 |
$ext = pathinfo($name, PATHINFO_EXTENSION);
|
473 |
if( !wpforo_is_image($ext) ){
|
474 |
-
|
475 |
-
|
476 |
return FALSE;
|
477 |
}
|
478 |
|
479 |
-
$fnm = pathinfo($
|
480 |
$fnm = str_replace(' ', '-', $fnm);
|
481 |
while(strpos($fnm, '--') !== FALSE) $fnm = str_replace('--', '-', $fnm);
|
482 |
$fnm = preg_replace("/[^-a-zA-Z0-9]/", "", $fnm);
|
@@ -493,7 +491,7 @@ class wpForoMember{
|
|
493 |
$image->save( $avatar_path );
|
494 |
}
|
495 |
$blog_url = preg_replace('#^https?\:#is', '', $upload_dir['baseurl']);
|
496 |
-
|
497 |
$this->reset($userid);
|
498 |
}
|
499 |
}
|
@@ -503,36 +501,37 @@ class wpForoMember{
|
|
503 |
function synchronize_user($userid){
|
504 |
if(!$userid) return FALSE;
|
505 |
$user = get_userdata($userid);
|
506 |
-
if(
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
'last_login' => sanitize_text_field($user->user_registered) ) );
|
527 |
-
}
|
528 |
return FALSE;
|
529 |
}
|
530 |
|
531 |
function synchronize_users(){
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
|
|
|
|
|
|
536 |
if( !empty($userids) ){
|
537 |
foreach($userids as $userid){
|
538 |
$this->synchronize_user($userid);
|
@@ -540,33 +539,29 @@ class wpForoMember{
|
|
540 |
}
|
541 |
|
542 |
## -- START -- delete profiles where not participant on multisite blog
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
## -- END -- delete profiles where not participant on multisite blog
|
548 |
}
|
549 |
-
|
550 |
-
function get_member($args
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
);
|
567 |
-
|
568 |
-
}
|
569 |
-
|
570 |
$args = wpforo_parse_args( $args, $default );
|
571 |
|
572 |
if(isset($args['userid'])){
|
@@ -575,61 +570,47 @@ class wpForoMember{
|
|
575 |
}
|
576 |
}
|
577 |
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
update_user_meta( $userid, '_wpf_member_obj', $member );
|
620 |
-
}
|
621 |
-
}else{
|
622 |
-
$member['profile_url'] = $this->profile_url( $member );
|
623 |
-
$member['stat'] = $this->get_stat( $member, false, true );
|
624 |
-
}
|
625 |
-
}
|
626 |
-
|
627 |
-
if($cache && isset($userid)){
|
628 |
-
return self::$cache['user'][$userid] = $member;
|
629 |
-
}else{
|
630 |
-
return $member;
|
631 |
-
}
|
632 |
-
}
|
633 |
}
|
634 |
|
635 |
function get_members($args = array(), &$items_count = 0){
|
@@ -639,6 +620,7 @@ class wpForoMember{
|
|
639 |
'exclude' => array(), // array( 2, 10, 25 )
|
640 |
'status' => array('active', 'banned'), // 'active', 'blocked', 'trashed', 'spamer'
|
641 |
'groupid' => NULL, // groupid
|
|
|
642 |
'orderby' => 'userid', //
|
643 |
'order' => 'ASC', // ASC DESC
|
644 |
'offset' => 0, // OFFSET
|
@@ -652,25 +634,26 @@ class wpForoMember{
|
|
652 |
$include = wpforo_parse_args( $include );
|
653 |
$exclude = wpforo_parse_args( $exclude );
|
654 |
|
655 |
-
$sql = "SELECT *, ug.name AS groupname FROM `"
|
656 |
-
INNER JOIN `"
|
657 |
-
LEFT JOIN `"
|
658 |
$wheres = array();
|
659 |
if(!empty($include)) $wheres[] = "u.`ID` IN(" . implode(', ', array_map('intval', $include)) . ")";
|
660 |
if(!empty($exclude)) $wheres[] = "u.`ID` NOT IN(" . implode(', ', array_map('intval', $exclude)) . ")";
|
661 |
if(!empty($status)) $wheres[] = " p.`status` IN('" . implode("','", array_map('esc_sql', array_map('sanitize_text_field', $status)) ) . "')";
|
662 |
-
if($groupid
|
663 |
-
|
|
|
664 |
if(!empty($wheres)) $sql .= " WHERE " . implode($wheres, " AND ");
|
665 |
|
666 |
$item_count_sql = preg_replace('#SELECT.+?FROM#isu', 'SELECT count(*) FROM', $sql);
|
667 |
-
if( $item_count_sql ) $items_count =
|
668 |
|
669 |
if( $orderby == 'groupid' ) $orderby = 'p.`groupid`';
|
670 |
$sql .= esc_sql(" ORDER BY $orderby " . $order);
|
671 |
if($row_count) $sql .= esc_sql(" LIMIT $offset,$row_count");
|
672 |
|
673 |
-
return
|
674 |
}
|
675 |
}
|
676 |
|
@@ -687,8 +670,8 @@ class wpForoMember{
|
|
687 |
);
|
688 |
}
|
689 |
|
690 |
-
$sql = "SELECT `ID` FROM `"
|
691 |
-
INNER JOIN `"
|
692 |
$wheres = array();
|
693 |
|
694 |
foreach($fields as $field){
|
@@ -700,7 +683,7 @@ class wpForoMember{
|
|
700 |
$sql .= " WHERE " . implode($wheres, " OR ");
|
701 |
if( $limit ) $sql .= " LIMIT " . intval($limit);
|
702 |
|
703 |
-
return
|
704 |
}else{
|
705 |
return array();
|
706 |
}
|
@@ -712,8 +695,8 @@ class wpForoMember{
|
|
712 |
|
713 |
public function filter($args, $limit = NULL){
|
714 |
if($args && is_array($args)){
|
715 |
-
$sql = "SELECT `ID` FROM `"
|
716 |
-
INNER JOIN `"
|
717 |
$wheres = array();
|
718 |
|
719 |
foreach($args as $field => $needle){
|
@@ -726,7 +709,7 @@ class wpForoMember{
|
|
726 |
$sql .= " WHERE " . implode($wheres, " AND ");
|
727 |
if( $limit ) $sql .= " LIMIT " . intval($limit);
|
728 |
|
729 |
-
return
|
730 |
}
|
731 |
}
|
732 |
|
@@ -734,16 +717,16 @@ class wpForoMember{
|
|
734 |
}
|
735 |
|
736 |
function ban($userid){
|
737 |
-
if( $userid ==
|
738 |
-
|
739 |
return FALSE;
|
740 |
}
|
741 |
-
if(
|
742 |
-
|
743 |
return FALSE;
|
744 |
}
|
745 |
-
if( FALSE !==
|
746 |
-
|
747 |
array('status' => 'banned'),
|
748 |
array('userid' => intval( $userid )),
|
749 |
array('%s'),
|
@@ -751,21 +734,21 @@ class wpForoMember{
|
|
751 |
)
|
752 |
){
|
753 |
$this->reset($userid);
|
754 |
-
|
755 |
return TRUE;
|
756 |
}
|
757 |
|
758 |
-
|
759 |
return FALSE;
|
760 |
}
|
761 |
|
762 |
function unban($userid){
|
763 |
-
if(
|
764 |
-
|
765 |
return FALSE;
|
766 |
}
|
767 |
-
if( FALSE !==
|
768 |
-
|
769 |
array('status' => 'active'),
|
770 |
array('userid' => intval( $userid )),
|
771 |
array('%s'),
|
@@ -773,11 +756,11 @@ class wpForoMember{
|
|
773 |
)
|
774 |
){
|
775 |
$this->reset($userid);
|
776 |
-
|
777 |
return TRUE;
|
778 |
}
|
779 |
|
780 |
-
|
781 |
return FALSE;
|
782 |
}
|
783 |
|
@@ -790,40 +773,40 @@ class wpForoMember{
|
|
790 |
*/
|
791 |
public function delete( $userid, $reassign = NULL ){
|
792 |
if( !($userid = intval($userid)) ) return FALSE;
|
793 |
-
if(
|
794 |
-
|
795 |
return FALSE;
|
796 |
}
|
797 |
|
798 |
do_action('wpforo_before_delete_user', $userid, $reassign);
|
799 |
|
800 |
if( !($reassign = intval($reassign)) ){
|
801 |
-
if( $postids =
|
802 |
-
foreach( $postids as $postid )
|
803 |
}
|
804 |
|
805 |
-
if( $topicids =
|
806 |
-
foreach( $topicids as $topicid )
|
807 |
}
|
808 |
}else{
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
if( $user_stats =
|
814 |
-
|
815 |
SUM(`posts`) AS posts,
|
816 |
SUM(`questions`) AS questions,
|
817 |
SUM(`answers`) AS answers,
|
818 |
SUM(`comments`) AS comments
|
819 |
-
FROM
|
820 |
-
WHERE userid IN( %d , %d )", $userid, $reassign
|
821 |
),
|
822 |
ARRAY_A
|
823 |
)
|
824 |
){
|
825 |
-
|
826 |
-
|
827 |
array(
|
828 |
'posts' => $user_stats['posts'],
|
829 |
'questions' => $user_stats['questions'],
|
@@ -837,41 +820,41 @@ class wpForoMember{
|
|
837 |
}
|
838 |
}
|
839 |
|
840 |
-
|
841 |
-
|
842 |
);
|
843 |
|
844 |
-
|
845 |
-
|
846 |
);
|
847 |
|
848 |
-
|
849 |
-
|
850 |
);
|
851 |
|
852 |
-
|
853 |
-
|
854 |
);
|
855 |
|
856 |
-
if( FALSE !==
|
857 |
-
|
858 |
)
|
859 |
){
|
860 |
|
861 |
do_action('wpforo_after_delete_user', $userid, $reassign);
|
862 |
|
863 |
-
|
864 |
return TRUE;
|
865 |
}
|
866 |
|
867 |
-
|
868 |
return FALSE;
|
869 |
}
|
870 |
|
871 |
public function avatar($member, $attr = '', $size = ''){
|
872 |
|
873 |
-
if(!isset($member['userid'])) return;
|
874 |
-
$cache =
|
875 |
|
876 |
$src = $member['avatar'];
|
877 |
$userid = $member['userid'];
|
@@ -882,7 +865,7 @@ class wpForoMember{
|
|
882 |
}
|
883 |
}
|
884 |
}
|
885 |
-
if($src && wpforo_feature('custom-avatars'
|
886 |
$attr = ($attr ? $attr : 'height="96" width="96"');
|
887 |
$img = '<img class="avatar" src="'.esc_url($src).'" '. $attr .' />';
|
888 |
}else{
|
@@ -899,9 +882,9 @@ class wpForoMember{
|
|
899 |
}
|
900 |
}
|
901 |
|
902 |
-
function get_avatar($userid, $attr = '', $size = ''
|
903 |
|
904 |
-
$cache =
|
905 |
|
906 |
if($cache && isset(self::$cache['avatar'][$userid])){
|
907 |
if(self::$cache['avatar'][$userid]['attr'] == $attr && self::$cache['avatar'][$userid]['size'] == $size){
|
@@ -910,8 +893,8 @@ class wpForoMember{
|
|
910 |
}
|
911 |
}
|
912 |
}
|
913 |
-
$src = $this->
|
914 |
-
if($src && wpforo_feature('custom-avatars'
|
915 |
$attr = ($attr ? $attr : 'height="96" width="96"');
|
916 |
$img = '<img class="avatar" src="'.esc_url($src).'" '. $attr .' />';
|
917 |
}else{
|
@@ -929,41 +912,52 @@ class wpForoMember{
|
|
929 |
}
|
930 |
|
931 |
public function get_avatar_url($userid){
|
932 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
933 |
}
|
934 |
|
935 |
function get_topics_count( $userid ){
|
936 |
-
$count =
|
937 |
return $count;
|
938 |
}
|
939 |
|
940 |
function get_questions_count( $userid ){
|
941 |
-
$count =
|
942 |
return $count;
|
943 |
}
|
944 |
|
945 |
function get_answers_count( $userid ){
|
946 |
-
$count =
|
947 |
return $count;
|
948 |
}
|
949 |
|
950 |
function get_question_comments_count( $userid ){
|
951 |
-
$count =
|
952 |
return $count;
|
953 |
}
|
954 |
|
955 |
function get_replies_count( $userid ){
|
956 |
-
$count =
|
957 |
return $count;
|
958 |
}
|
959 |
|
960 |
function get_likes_count( $userid ){
|
961 |
-
$count =
|
962 |
return $count;
|
963 |
}
|
964 |
|
965 |
function get_votes_count( $userid ){
|
966 |
-
$count =
|
967 |
return $count;
|
968 |
}
|
969 |
|
@@ -974,24 +968,24 @@ class wpForoMember{
|
|
974 |
|
975 |
//getting user's posts votes and likes count
|
976 |
function get_user_votes_and_likes_count( $userid ){
|
977 |
-
$votes_count =
|
978 |
-
$likes_count =
|
979 |
return $votes_count + $likes_count;
|
980 |
}
|
981 |
|
982 |
function get_profile_url( $arg, $template = 'profile' ){
|
983 |
if(!$arg) return wpforo_home_url();
|
984 |
$userid = intval( basename($arg) );
|
985 |
-
$member_args = ( $userid ? $userid : array( '
|
986 |
$user = $this->get_member( $member_args );
|
987 |
if(empty($user)) return wpforo_home_url();
|
988 |
-
$user_slug = ( wpfo(
|
989 |
return wpforo_home_url("$template/$user_slug");
|
990 |
}
|
991 |
|
992 |
function profile_url( $member = array(), $template = 'profile' ){
|
993 |
if(isset($member['ID']) || isset($member['user_nicename'])){
|
994 |
-
$user_slug = ( wpfo(
|
995 |
$profile_url = wpforo_home_url("$template/$user_slug");
|
996 |
$profile_url = apply_filters( 'wpforo_profile_url', $profile_url, $member, $template );
|
997 |
}
|
@@ -1007,7 +1001,7 @@ class wpForoMember{
|
|
1007 |
//$live_count = TRUE / FALSE
|
1008 |
function get_stat( $args = array(), $live_count = false, $cache = false ){
|
1009 |
|
1010 |
-
$cache =
|
1011 |
|
1012 |
$stat = array( 'points' => 0,
|
1013 |
'rating' => 0,
|
@@ -1046,7 +1040,7 @@ class wpForoMember{
|
|
1046 |
if($question_comments = $this->get_question_comments_count( $userid )) $stat['question_comments'] = $question_comments;
|
1047 |
}
|
1048 |
else{
|
1049 |
-
$profile =
|
1050 |
if(isset($profile['questions'])) $stat['questions'] = intval($profile['questions']);
|
1051 |
if(isset($profile['answers'])) $stat['answers'] = intval($profile['answers']);
|
1052 |
if(isset($profile['posts'])) $stat['posts'] = intval($profile['posts']);
|
@@ -1076,14 +1070,14 @@ class wpForoMember{
|
|
1076 |
}
|
1077 |
|
1078 |
function get_count(){
|
1079 |
-
return
|
1080 |
-
INNER JOIN `"
|
1081 |
}
|
1082 |
|
1083 |
|
1084 |
-
function is_online( $userid, $duration =
|
1085 |
|
1086 |
-
$cache =
|
1087 |
|
1088 |
if( $cache && isset(self::$cache['online'][$userid]) ){
|
1089 |
if(self::$cache['online'][$userid]['durration'] == $duration ){
|
@@ -1092,8 +1086,10 @@ class wpForoMember{
|
|
1092 |
}
|
1093 |
}
|
1094 |
}
|
1095 |
-
if(
|
1096 |
-
$
|
|
|
|
|
1097 |
$current_time = current_time( 'timestamp', 1 );
|
1098 |
$online_duration = $current_time - $online_time;
|
1099 |
if( $online_duration < $duration ) {
|
@@ -1127,31 +1123,25 @@ class wpForoMember{
|
|
1127 |
<?php endif;
|
1128 |
}
|
1129 |
|
1130 |
-
function online_members_count( $duration =
|
1131 |
-
if(
|
1132 |
$current_time = current_time( 'timestamp', 1 );
|
1133 |
$online_timeframe = $current_time - $duration;
|
1134 |
-
return
|
1135 |
|
1136 |
}
|
1137 |
|
1138 |
-
function get_online_members( $count = 1, $duration =
|
1139 |
-
if(
|
1140 |
$current_time = current_time( 'timestamp', 1 );
|
1141 |
$online_timeframe = $current_time - $duration;
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
);
|
1150 |
-
return $this->get_members( $args );
|
1151 |
-
}
|
1152 |
-
else{
|
1153 |
-
return array();
|
1154 |
-
}
|
1155 |
}
|
1156 |
|
1157 |
function levels(){
|
@@ -1167,15 +1157,15 @@ class wpForoMember{
|
|
1167 |
$rating['title'] = array( 0 => 'New Member', 1 => 'Active Member', 2 => 'Eminent Member', 3 => 'Trusted Member', 4 => 'Estimable Member', 5 => 'Reputable Member', 6 => 'Honorable Member', 7 => 'Prominent Member', 8 => 'Noble Member', 9 => 'Famed Member', 10 => 'Illustrious Member' );
|
1168 |
$rating['icon'] = array( 0 => 'fa-star-half-o', 1 => 'fa-star', 2 => 'fa-star', 3 => 'fa-star', 4 => 'fa-star', 5 => 'fa-star', 6 => 'fa-certificate', 7 => 'fa-certificate', 8 => 'fa-certificate', 9 => 'fa-shield', 10 => 'fa-trophy' );
|
1169 |
|
1170 |
-
if(!empty(
|
1171 |
|
1172 |
-
if($level === false) return
|
1173 |
-
if(!empty(
|
1174 |
|
1175 |
-
if(!$var) return
|
1176 |
-
if(!empty(
|
1177 |
|
1178 |
-
return
|
1179 |
|
1180 |
}
|
1181 |
}
|
@@ -1233,19 +1223,29 @@ class wpForoMember{
|
|
1233 |
return '<i class="fa '. sanitize_html_class($this->rating($level, 'icon')) .'"></i>';
|
1234 |
}
|
1235 |
else{
|
1236 |
-
return;
|
1237 |
}
|
1238 |
}
|
1239 |
|
1240 |
public function reset($userid){
|
1241 |
if( !$userid ) return;
|
1242 |
-
|
1243 |
wpforo_clean_cache( $userid, 'user' );
|
1244 |
}
|
1245 |
|
1246 |
public function clear_db_cache(){
|
1247 |
-
|
1248 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1249 |
|
1250 |
public function init_current_user(){
|
1251 |
$current_user = wp_get_current_user();
|
@@ -1253,30 +1253,16 @@ class wpForoMember{
|
|
1253 |
$user = $this->get_member( $current_user->ID );
|
1254 |
$status = ( isset($user['status']) ? $user['status'] : '' );
|
1255 |
if( $status == 'active' ){
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
$this->wpforo->current_user = array();
|
1265 |
-
$this->wpforo->current_user_groupid = 4;
|
1266 |
-
$this->wpforo->current_userid = 0;
|
1267 |
-
$this->wpforo->current_username = '';
|
1268 |
-
$this->wpforo->current_user_email = '';
|
1269 |
-
$this->wpforo->current_user_display_name = '';
|
1270 |
}
|
1271 |
-
|
1272 |
-
}else{
|
1273 |
-
$this->wpforo->current_user = array();
|
1274 |
-
$this->wpforo->current_user_groupid = 4;
|
1275 |
-
$this->wpforo->current_userid = 0;
|
1276 |
-
$this->wpforo->current_username = '';
|
1277 |
-
$this->wpforo->current_user_email = '';
|
1278 |
-
$this->wpforo->current_user_display_name = '';
|
1279 |
-
$this->wpforo->current_user_status = '';
|
1280 |
}
|
1281 |
}
|
1282 |
|
@@ -1295,7 +1281,7 @@ class wpForoMember{
|
|
1295 |
|
1296 |
$userids = array_diff( $userids, array( $current_user->ID ) );
|
1297 |
$users_have_content = false;
|
1298 |
-
if (
|
1299 |
$users_have_content = true;
|
1300 |
}
|
1301 |
?>
|
@@ -1332,9 +1318,9 @@ class wpForoMember{
|
|
1332 |
|
1333 |
|
1334 |
public function autoban($userid){
|
1335 |
-
if(
|
1336 |
-
|
1337 |
-
|
1338 |
array('status' => 'banned'),
|
1339 |
array('userid' => intval( $userid )),
|
1340 |
array('%s'),
|
@@ -1345,11 +1331,11 @@ class wpForoMember{
|
|
1345 |
|
1346 |
public function member_approved_posts( $member = array() ){
|
1347 |
if(is_numeric($member)){
|
1348 |
-
if( isset(
|
1349 |
-
return
|
1350 |
}
|
1351 |
else{
|
1352 |
-
return
|
1353 |
}
|
1354 |
}
|
1355 |
elseif(is_array($member) && !empty($member)){
|
@@ -1361,13 +1347,13 @@ class wpForoMember{
|
|
1361 |
}
|
1362 |
|
1363 |
public function current_user_is_new(){
|
1364 |
-
if(
|
1365 |
//This is an admin or moderator. The number of posts doesn't matter.
|
1366 |
return false;
|
1367 |
}
|
1368 |
else{
|
1369 |
-
$posts = $this->member_approved_posts(
|
1370 |
-
if ( $posts <
|
1371 |
return true;
|
1372 |
}
|
1373 |
else{
|
@@ -1377,13 +1363,13 @@ class wpForoMember{
|
|
1377 |
}
|
1378 |
|
1379 |
public function banned_count(){
|
1380 |
-
$count =
|
1381 |
return $count;
|
1382 |
}
|
1383 |
|
1384 |
public function get_guest( $args = array() ){
|
1385 |
|
1386 |
-
$cache =
|
1387 |
|
1388 |
if( !isset($args['name']) || $args['name'] == '' ) $args['name'] = wpforo_phrase('Anonymous', false);
|
1389 |
if( !isset($args['email']) || $args['email'] == '' ) $args['email'] = 'anonymous@example.com';
|
@@ -1401,7 +1387,7 @@ class wpForoMember{
|
|
1401 |
|
1402 |
if( $args['email'] ){
|
1403 |
$post_args = array( 'email' => $args['email'], 'orderby' => 'created', 'order' => 'ASC' );
|
1404 |
-
$posts =
|
1405 |
if( !empty($posts) ){
|
1406 |
$args['posts'] = count($posts);
|
1407 |
if( isset($posts[0]['created']) || $posts[0]['created'] ) $args['user_registered'] = $posts[0]['created'];
|
@@ -1449,9 +1435,9 @@ class wpForoMember{
|
|
1449 |
|
1450 |
$this->fields = apply_filters('wpforo_member_before_init_fields', $this->fields);
|
1451 |
|
1452 |
-
$usergroupids =
|
1453 |
-
$usergroupids_can_edit_fields =
|
1454 |
-
$usergroupids_can_view_social_net =
|
1455 |
|
1456 |
$this->fields['user_login'] = array(
|
1457 |
'fieldKey' => 'user_login',
|
@@ -1474,7 +1460,7 @@ class wpForoMember{
|
|
1474 |
'search'
|
1475 |
),
|
1476 |
'canEdit' => $usergroupids_can_edit_fields,
|
1477 |
-
'canView' =>
|
1478 |
'can' => 'vmu',
|
1479 |
'isSearchable' => 0
|
1480 |
);
|
@@ -1499,7 +1485,7 @@ class wpForoMember{
|
|
1499 |
'search'
|
1500 |
),
|
1501 |
'canEdit' => $usergroupids_can_edit_fields,
|
1502 |
-
'canView' =>
|
1503 |
'can' => 'vmm',
|
1504 |
'isSearchable' => 1
|
1505 |
);
|
@@ -1600,7 +1586,7 @@ class wpForoMember{
|
|
1600 |
'search'
|
1601 |
),
|
1602 |
'canEdit' => $usergroupids_can_edit_fields,
|
1603 |
-
'canView' =>
|
1604 |
'can' => 'vmt',
|
1605 |
'isSearchable' => 1
|
1606 |
);
|
@@ -1648,7 +1634,7 @@ class wpForoMember{
|
|
1648 |
'search'
|
1649 |
),
|
1650 |
'canEdit' => $usergroupids_can_edit_fields,
|
1651 |
-
'canView' =>
|
1652 |
'can' => 'va',
|
1653 |
'isSearchable' => 0
|
1654 |
);
|
@@ -1672,7 +1658,7 @@ class wpForoMember{
|
|
1672 |
'search'
|
1673 |
),
|
1674 |
'canEdit' => $usergroupids_can_edit_fields,
|
1675 |
-
'canView' =>
|
1676 |
'can' => 'vmw',
|
1677 |
'isSearchable' => 1
|
1678 |
);
|
@@ -1889,7 +1875,7 @@ class wpForoMember{
|
|
1889 |
'search'
|
1890 |
),
|
1891 |
'canEdit' => $usergroupids_can_edit_fields,
|
1892 |
-
'canView' =>
|
1893 |
'can' => 'vml',
|
1894 |
'isSearchable' => 1
|
1895 |
);
|
@@ -1938,7 +1924,7 @@ class wpForoMember{
|
|
1938 |
'search'
|
1939 |
),
|
1940 |
'canEdit' => $usergroupids_can_edit_fields,
|
1941 |
-
'canView' =>
|
1942 |
'can' => 'vmo',
|
1943 |
'isSearchable' => 1
|
1944 |
);
|
@@ -1962,7 +1948,7 @@ class wpForoMember{
|
|
1962 |
'search'
|
1963 |
),
|
1964 |
'canEdit' => $usergroupids_can_edit_fields,
|
1965 |
-
'canView' =>
|
1966 |
'can' => 'vms',
|
1967 |
'isSearchable' => 1
|
1968 |
);
|
@@ -1986,7 +1972,7 @@ class wpForoMember{
|
|
1986 |
'search'
|
1987 |
),
|
1988 |
'canEdit' => $usergroupids_can_edit_fields,
|
1989 |
-
'canView' =>
|
1990 |
'can' => 'vmam',
|
1991 |
'isSearchable' => 1
|
1992 |
);
|
@@ -2106,7 +2092,7 @@ class wpForoMember{
|
|
2106 |
$this->fields['user_login'],
|
2107 |
$this->fields['user_email']
|
2108 |
);
|
2109 |
-
if( !wpforo_feature('user-register-email-confirm'
|
2110 |
$fields = array(
|
2111 |
array(
|
2112 |
$regform
|
4 |
|
5 |
|
6 |
class wpForoMember{
|
|
|
7 |
public $default;
|
8 |
public $options;
|
9 |
private $fields;
|
14 |
public $pass_min_length;
|
15 |
public $pass_max_length;
|
16 |
|
17 |
+
static $cache = array( 'users' => array(), 'user' => array(), 'guest' => array(), 'avatar' => array() );
|
18 |
|
19 |
+
function __construct(){
|
|
|
|
|
20 |
$this->init_defaults();
|
21 |
$this->init_options();
|
22 |
|
27 |
$this->default = new stdClass;
|
28 |
|
29 |
$this->default->options = array(
|
30 |
+
'custom_title_is_on' => 1,
|
31 |
'default_title' => 'Member',
|
32 |
'online_status_timeout' => 240,
|
33 |
'url_structure' => 'nicename',
|
68 |
if(!isset($args['userid']) || !$args['userid'] || !isset($args['username']) || !$args['username'] ) return FALSE;
|
69 |
extract( $args, EXTR_OVERWRITE );
|
70 |
$this->reset($userid);
|
71 |
+
return WPF()->db->insert(
|
72 |
+
WPF()->db->prefix . 'wpforo_profiles',
|
73 |
array( 'userid' => intval($userid),
|
74 |
+
'title' => ( isset($title) && $title ? $title : WPF()->member->options['default_title'] ),
|
75 |
'username' => sanitize_user($username),
|
76 |
+
'groupid' => intval((isset($groupid) && $groupid ? $groupid : WPF()->usergroup->default_groupid)),
|
77 |
'site' => (isset($site) ? sanitize_text_field($site) : '' ),
|
78 |
'timezone' => ( isset($timezone) ? sanitize_text_field($timezone) : 'UTC+0' ),
|
79 |
'about' => ( isset($about) ? stripslashes( wpforo_kses(trim($about), 'user_description') ) : '' ),
|
96 |
}
|
97 |
|
98 |
if(isset($groupid) && $groupid){
|
99 |
+
if( WPF()->current_user_groupid == 1 || current_user_can('administrator') || apply_filters('wpforo_allow_edit_profile_groupid', false) ){
|
100 |
$groupid = intval($groupid);
|
101 |
+
if( !(!WPF()->current_object['user_is_same_current_user'] && (WPF()->current_user_groupid == 1 || current_user_can('administrator') )) ) {
|
102 |
$flds = $this->get_fields();
|
103 |
+
if( !in_array($groupid, wpforo_parse_args($flds['groupid']['allowedGroupIds'])) ) $groupid = WPF()->usergroup->default_groupid;
|
104 |
}
|
105 |
$fields['groupid'] = $groupid;
|
106 |
$fields_types[] = '%d';
|
178 |
|
179 |
$this->reset($userid);
|
180 |
|
181 |
+
$result = WPF()->db->update(
|
182 |
+
WPF()->db->prefix.'wpforo_profiles',
|
183 |
$fields,
|
184 |
array('userid' => intval($userid)),
|
185 |
$fields_types,
|
188 |
|
189 |
if( $result !== FALSE && $userid ){
|
190 |
if(isset($fields['site'])){
|
191 |
+
WPF()->db->query("UPDATE `" . WPF()->db->prefix. "users` SET `user_url` = '" . esc_sql($fields['site']) . "' WHERE `ID` = " . intval($userid) );
|
192 |
}
|
193 |
if(isset($fields['about'])){
|
194 |
update_user_meta( $userid, 'description', $fields['about'] );
|
199 |
}
|
200 |
|
201 |
function create($args){
|
202 |
+
if(!wpforo_feature('user-register')){
|
203 |
+
WPF()->notice->add('User registration is disabled.', 'error');
|
204 |
return FALSE;
|
205 |
}
|
206 |
|
231 |
$illegal_user_logins = array_map( 'strtolower', (array) apply_filters( 'illegal_user_logins', array() ) );
|
232 |
if ( $sanitized_user_login == '' ) {
|
233 |
$errors->add( 'empty_username', __( '<strong>ERROR</strong>: Please enter a username.' ) );
|
234 |
+
WPF()->notice->add('Username is missed.', 'error');
|
235 |
return FALSE;
|
236 |
}elseif ( ! validate_username( $user_login ) ) {
|
237 |
$errors->add( 'invalid_username', __( '<strong>ERROR</strong>: This username is invalid because it uses illegal characters. Please enter a valid username.' ) );
|
238 |
$sanitized_user_login = '';
|
239 |
+
WPF()->notice->add('Illegal character in username.', 'error');
|
240 |
$user_login = '';
|
241 |
return FALSE;
|
242 |
}elseif( strlen($user_login) < $this->login_min_length || strlen($user_login) > $this->login_max_length ){
|
243 |
+
WPF()->notice->add( 'Username length must be between %d characters and %d characters.', 'error', array($this->login_min_length, $this->login_max_length) );
|
244 |
return FALSE;
|
245 |
}elseif ( username_exists( $sanitized_user_login ) ) {
|
246 |
$errors->add( 'username_exists', __( '<strong>ERROR</strong>: This username is already registered. Please choose another one.' ) );
|
247 |
+
WPF()->notice->add('Username exists. Please insert another.', 'error');
|
248 |
return FALSE;
|
249 |
}elseif ( in_array( strtolower( $sanitized_user_login ), $illegal_user_logins ) ) {
|
250 |
$errors->add( 'invalid_username', __( '<strong>ERROR</strong>: Sorry, that username is not allowed.' ) );
|
251 |
+
WPF()->notice->add('ERROR: invalid_username. Sorry, that username is not allowed. Please insert another.', 'error');
|
252 |
return FALSE;
|
253 |
}elseif ( $user_email == '' ) {
|
254 |
$errors->add( 'empty_email', __( '<strong>ERROR</strong>: Please type your email address.' ) );
|
255 |
+
WPF()->notice->add('Insert your Email address.', 'error');
|
256 |
return FALSE;
|
257 |
}elseif ( ! is_email( $user_email ) ) {
|
258 |
$errors->add( 'invalid_email', __( '<strong>ERROR</strong>: The email address isn’t correct.' ) );
|
259 |
+
WPF()->notice->add('Invalid Email address', 'error');
|
260 |
$user_email = '';
|
261 |
return FALSE;
|
262 |
}elseif ( email_exists( $user_email ) ) {
|
263 |
$errors->add( 'email_exists', __( '<strong>ERROR</strong>: This email is already registered, please choose another one.' ) );
|
264 |
+
WPF()->notice->add('Email address exists. Please insert another.', 'error');
|
265 |
return FALSE;
|
266 |
}elseif( strlen($user_pass1) < $this->pass_min_length || strlen($user_pass1) > $this->pass_max_length ){
|
267 |
+
WPF()->notice->add( 'Password length must be between %d characters and %d characters.', 'error', array($this->pass_min_length, $this->pass_max_length) );
|
268 |
return FALSE;
|
269 |
}elseif($user_pass1 != $user_pass2){
|
270 |
+
WPF()->notice->add('Password mismatch.', 'error');
|
271 |
return FALSE;
|
272 |
}else{
|
273 |
do_action( 'register_post', $sanitized_user_login, $user_email, $errors );
|
275 |
if ( $errors->get_error_code() ){
|
276 |
$args = array();
|
277 |
foreach($errors->errors as $u_err) $args[] = $u_err[0];
|
278 |
+
WPF()->notice->add($args, 'error');
|
279 |
return FALSE;
|
280 |
}
|
281 |
$user_id = wp_create_user( $sanitized_user_login, $user_pass1, $user_email );
|
285 |
wp_signon($creds);
|
286 |
do_action( 'wpforo_create_profile_after', $args );
|
287 |
do_action( 'register_new_user', $user_id );
|
288 |
+
WPF()->notice->add('Success! Thank you Dear Friend', 'success');
|
289 |
return $user_id;
|
290 |
}
|
291 |
}
|
292 |
}elseif( !empty($args['user_login']) && !empty($args['user_email']) ){
|
293 |
if( strlen($args['user_login']) < $this->login_min_length || strlen($args['user_login']) > $this->login_max_length ){
|
294 |
+
WPF()->notice->add( 'Username length must be between %d characters and %d characters.', 'error', array($this->login_min_length, $this->login_max_length) );
|
295 |
return FALSE;
|
296 |
}
|
297 |
$user_id = register_new_user( $args['user_login'], $args['user_email'] );
|
298 |
if ( !is_wp_error( $user_id ) && $user_id ) {
|
299 |
$args['userid'] = $user_id;
|
300 |
do_action( 'wpforo_create_profile_after', $args );
|
301 |
+
WPF()->notice->add('Success! Please check your mail for confirmation.', 'success');
|
302 |
return $user_id;
|
303 |
}
|
304 |
}
|
305 |
if(!empty($user_id->errors)){
|
306 |
$args = array();
|
307 |
foreach($user_id->errors as $u_err) $args[] = $u_err[0];
|
308 |
+
WPF()->notice->add($args, 'error');
|
309 |
return FALSE;
|
310 |
}
|
311 |
+
WPF()->notice->add('Registration Error', 'error');
|
312 |
return FALSE;
|
313 |
}
|
314 |
|
332 |
$userid = intval($userid);
|
333 |
|
334 |
$isRegister = ( isset($args['template']) && $args['template'] == 'register' ) ? true : false;
|
335 |
+
if ( !$isRegister && ( !is_user_logged_in() || !WPF()->perm->user_can_manage_user( WPF()->current_userid, $userid ) ) ) {
|
336 |
+
WPF()->notice->add('Permission denied', 'error');
|
337 |
return FALSE;
|
338 |
}
|
339 |
|
344 |
if( isset($user_email) && $user_email ){
|
345 |
$user_email = sanitize_email($user_email);
|
346 |
if ( ! is_email( $user_email ) ) {
|
347 |
+
WPF()->notice->add('Invalid Email address', 'error');
|
348 |
return FALSE;
|
349 |
}elseif ( ( $owner_id = email_exists( $user_email ) ) && ( $owner_id != $userid ) ) {
|
350 |
+
WPF()->notice->add('This email address is already registered. Please insert another.', 'error');
|
351 |
return FALSE;
|
352 |
}
|
353 |
|
357 |
if( isset($user_nicename) && $user_nicename ){
|
358 |
$user_nicename = sanitize_title( trim($user_nicename) );
|
359 |
if( is_numeric($user_nicename) ){
|
360 |
+
WPF()->notice->add('Numerical nicknames are not allowed. Please insert another.', 'error');
|
361 |
return FALSE;
|
362 |
}
|
363 |
+
$sql = "SELECT `ID` FROM `".WPF()->db->base_prefix."users` WHERE `ID` != ". intval($userid) ." AND ( `user_nicename` LIKE '".esc_sql($user_nicename)."' OR `ID` LIKE '".esc_sql($user_nicename)."' )";
|
364 |
+
if( WPF()->db->get_var($sql)){
|
365 |
+
WPF()->notice->add('This nickname is already registered. Please insert another.', 'error');
|
366 |
return FALSE;
|
367 |
}
|
368 |
|
369 |
$fields['user_nicename'] = $user_nicename;
|
370 |
$fields_types[] = '%s';
|
371 |
|
372 |
+
WPF()->db->update(
|
373 |
+
WPF()->db->base_prefix."usermeta",
|
374 |
array('meta_value' => $user_nicename),
|
375 |
array('user_id' => $userid, 'meta_key' => 'nickname'),
|
376 |
array('%s'),
|
379 |
}
|
380 |
|
381 |
if( $fields ){
|
382 |
+
WPF()->db->update(
|
383 |
+
WPF()->db->base_prefix."users",
|
384 |
$fields,
|
385 |
array('ID' => $userid),
|
386 |
$fields_types,
|
392 |
|
393 |
if( FALSE !== $this->edit_profile($args) ){
|
394 |
do_action( 'wpforo_edit_profile_after', $args );
|
395 |
+
WPF()->notice->add('Your profile data have been successfully updated.', 'success');
|
396 |
return $userid;
|
397 |
}
|
398 |
}
|
399 |
|
400 |
+
WPF()->notice->add('Something wrong with profile data.', 'error');
|
401 |
return FALSE;
|
402 |
}
|
403 |
|
404 |
public function change_password($old_passw, $new_passw, $userid){
|
405 |
if( !$userid = wpforo_bigintval($userid) ){
|
406 |
+
WPF()->notice->clear();
|
407 |
+
WPF()->notice->add('Userid is wrong', 'error');
|
408 |
return false;
|
409 |
}
|
410 |
|
420 |
$creds = array('user_login' => sanitize_user( $user['user_login'] ), 'user_password' => $new_passw );
|
421 |
wp_signon($creds);
|
422 |
|
423 |
+
WPF()->notice->add('Password successfully changed', 'success');
|
424 |
return true;
|
425 |
}
|
426 |
|
427 |
+
WPF()->notice->clear();
|
428 |
+
WPF()->notice->add('Old password is wrong', 'error');
|
429 |
return false;
|
430 |
}
|
431 |
|
432 |
function upload_avatar( $userid = 0 ){
|
433 |
|
434 |
$userid = intval($userid);
|
435 |
+
if( !WPF()->perm->usergroup_can('upa') ) return;
|
436 |
|
437 |
if( !$userid ){
|
438 |
if( !isset($_POST['member']['userid']) || !$userid = intval($_POST['member']['userid']) ) return;
|
439 |
}
|
440 |
|
441 |
if( !$user = $this->get_member($userid) ) return;
|
442 |
+
$user_nicename = urldecode($user['user_nicename']);
|
443 |
if(isset($_FILES['avatar']) && !empty($_FILES['avatar']) && isset($_FILES['avatar']['name']) && $_FILES['avatar']['name']){
|
444 |
|
445 |
$name = sanitize_file_name($_FILES['avatar']['name']); //myimg.png
|
449 |
$size = intval($_FILES['avatar']['size']); //6112
|
450 |
|
451 |
if( $size > 2*1048576 ){
|
452 |
+
WPF()->notice->clear();
|
453 |
+
WPF()->notice->add('Avatar image is too big maximum allowed size is 2MB', 'error');
|
454 |
return FALSE;
|
455 |
}
|
456 |
|
457 |
if( $error ){
|
458 |
$error = wpforo_file_upload_error($error);
|
459 |
+
WPF()->notice->clear();
|
460 |
+
WPF()->notice->add($error, 'error');
|
461 |
return FALSE;
|
462 |
}
|
463 |
|
469 |
|
470 |
$ext = pathinfo($name, PATHINFO_EXTENSION);
|
471 |
if( !wpforo_is_image($ext) ){
|
472 |
+
WPF()->notice->clear();
|
473 |
+
WPF()->notice->add('Incorrect file format. Allowed formats: jpeg, jpg, png, gif.', 'error');
|
474 |
return FALSE;
|
475 |
}
|
476 |
|
477 |
+
$fnm = pathinfo($user_nicename, PATHINFO_FILENAME);
|
478 |
$fnm = str_replace(' ', '-', $fnm);
|
479 |
while(strpos($fnm, '--') !== FALSE) $fnm = str_replace('--', '-', $fnm);
|
480 |
$fnm = preg_replace("/[^-a-zA-Z0-9]/", "", $fnm);
|
491 |
$image->save( $avatar_path );
|
492 |
}
|
493 |
$blog_url = preg_replace('#^https?\:#is', '', $upload_dir['baseurl']);
|
494 |
+
WPF()->db->update(WPF()->db->prefix.'wpforo_profiles', array('avatar' => $blog_url . "/wpforo/avatars/" . $avatar_fname), array('userid' => intval($userid)), array('%s'), array('%d'));
|
495 |
$this->reset($userid);
|
496 |
}
|
497 |
}
|
501 |
function synchronize_user($userid){
|
502 |
if(!$userid) return FALSE;
|
503 |
$user = get_userdata($userid);
|
504 |
+
if( is_super_admin( $userid ) || in_array('administrator', $user->roles) ){
|
505 |
+
$groupid = 1;
|
506 |
+
}elseif( in_array('editor', $user->roles) ){
|
507 |
+
$groupid = 2;
|
508 |
+
}elseif( in_array('customer', $user->roles) ){
|
509 |
+
$groupid = 5;
|
510 |
+
}else{
|
511 |
+
$groupid = WPF()->usergroup->default_groupid;
|
512 |
+
}
|
513 |
+
$insert_groupid = (isset($_POST['wpforo_usergroup'])) ? intval($_POST['wpforo_usergroup']) : $groupid;
|
514 |
+
$insert_timezone = (isset($_POST['wpforo_usertimezone'])) ? sanitize_text_field($_POST['wpforo_usertimezone']) : '';
|
515 |
+
$about = get_user_meta( $userid, 'description', true );
|
516 |
+
return $this->add_profile(
|
517 |
+
array( 'userid' => intval($userid),
|
518 |
+
'username' => sanitize_user($user->user_login),
|
519 |
+
'groupid' => intval($insert_groupid),
|
520 |
+
'site' => esc_url($user->user_url),
|
521 |
+
'timezone' => sanitize_text_field($insert_timezone),
|
522 |
+
'about' => stripslashes( wpforo_kses(trim($about), 'user_description') ),
|
523 |
+
'last_login' => sanitize_text_field($user->user_registered) ) );
|
|
|
|
|
524 |
return FALSE;
|
525 |
}
|
526 |
|
527 |
function synchronize_users(){
|
528 |
+
|
529 |
+
if( is_multisite() ){
|
530 |
+
$sql = "SELECT `user_id` FROM `".WPF()->db->base_prefix."usermeta` WHERE `meta_key` LIKE '".WPF()->db->prefix."capabilities' AND `user_id` NOT IN( SELECT `userid` FROM `".WPF()->db->prefix."wpforo_profiles` )";
|
531 |
+
} else {
|
532 |
+
$sql = "SELECT `ID` as user_id FROM `".WPF()->db->base_prefix."users` WHERE `ID` NOT IN( SELECT `userid` FROM `".WPF()->db->prefix."wpforo_profiles` )";
|
533 |
+
}
|
534 |
+
$userids = WPF()->db->get_col($sql);
|
535 |
if( !empty($userids) ){
|
536 |
foreach($userids as $userid){
|
537 |
$this->synchronize_user($userid);
|
539 |
}
|
540 |
|
541 |
## -- START -- delete profiles where not participant on multisite blog
|
542 |
+
if( is_multisite() ){
|
543 |
+
$sql = "DELETE FROM `".WPF()->db->prefix."wpforo_profiles` WHERE `userid` NOT IN( SELECT `user_id` FROM `".WPF()->db->base_prefix."usermeta` WHERE `meta_key` LIKE '".WPF()->db->prefix."capabilities' )";
|
544 |
+
WPF()->db->query($sql);
|
545 |
+
}
|
546 |
## -- END -- delete profiles where not participant on multisite blog
|
547 |
}
|
548 |
+
|
549 |
+
function get_member($args){
|
550 |
+
if(!$args) return array();
|
551 |
+
|
552 |
+
$cache = WPF()->cache->on('memory_cashe');
|
553 |
+
|
554 |
+
$default = array(
|
555 |
+
'userid' => NULL, // $userid
|
556 |
+
'user_nicename' => '' // $user_nicename
|
557 |
+
);
|
558 |
+
|
559 |
+
if( is_numeric($args) ){
|
560 |
+
$args = array( 'userid' => $args );
|
561 |
+
}elseif ( !is_array($args) ){
|
562 |
+
$args = array( 'user_nicename' => $args );
|
563 |
+
}
|
564 |
+
|
|
|
|
|
|
|
|
|
565 |
$args = wpforo_parse_args( $args, $default );
|
566 |
|
567 |
if(isset($args['userid'])){
|
570 |
}
|
571 |
}
|
572 |
|
573 |
+
extract($args);
|
574 |
+
|
575 |
+
$do_db_cache = wpforo_feature('member_cashe');
|
576 |
+
|
577 |
+
$userid = wpforo_bigintval($userid);
|
578 |
+
|
579 |
+
$user_meta_obj = true;
|
580 |
+
$member = array();
|
581 |
+
if( $do_db_cache ){
|
582 |
+
if( $user_nicename ){
|
583 |
+
$user_obj = get_user_by( 'user_nicename', $user_nicename );
|
584 |
+
if( !empty($user_obj) ) $userid = $user_obj->ID;
|
585 |
+
}
|
586 |
+
$member = get_user_meta( $userid, '_wpf_member_obj', true );
|
587 |
+
}
|
588 |
+
|
589 |
+
if(empty($member)){
|
590 |
+
$user_meta_obj = false;
|
591 |
+
$sql = "SELECT *, ug.name AS groupname, ug.color AS color FROM `".WPF()->db->base_prefix."users` u
|
592 |
+
INNER JOIN `".WPF()->db->prefix."wpforo_profiles` p ON p.`userid` = u.`ID`
|
593 |
+
LEFT JOIN `".WPF()->db->prefix."wpforo_usergroups` ug ON ug.`groupid` = p.`groupid`";
|
594 |
+
$wheres = array();
|
595 |
+
if($userid) $wheres[] = "`ID` = $userid";
|
596 |
+
if($user_nicename) $wheres[] = "`user_nicename` = '" . esc_sql($user_nicename) . "'";
|
597 |
+
if( !empty($wheres) ) $sql .= " WHERE " . implode($wheres, " AND ");
|
598 |
+
$member = WPF()->db->get_row($sql, ARRAY_A);
|
599 |
+
}
|
600 |
+
|
601 |
+
if(!empty($member)) {
|
602 |
+
$member['profile_url'] = $this->profile_url( $member );
|
603 |
+
$member['stat'] = $this->get_stat( $member, false, true );
|
604 |
+
if( $do_db_cache ){
|
605 |
+
if(!$user_meta_obj) update_user_meta( $userid, '_wpf_member_obj', $member );
|
606 |
+
}
|
607 |
+
}
|
608 |
+
|
609 |
+
if($cache && isset($userid)){
|
610 |
+
return self::$cache['user'][$userid] = $member;
|
611 |
+
}else{
|
612 |
+
return $member;
|
613 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
614 |
}
|
615 |
|
616 |
function get_members($args = array(), &$items_count = 0){
|
620 |
'exclude' => array(), // array( 2, 10, 25 )
|
621 |
'status' => array('active', 'banned'), // 'active', 'blocked', 'trashed', 'spamer'
|
622 |
'groupid' => NULL, // groupid
|
623 |
+
'online_time' => NULL, // groupid
|
624 |
'orderby' => 'userid', //
|
625 |
'order' => 'ASC', // ASC DESC
|
626 |
'offset' => 0, // OFFSET
|
634 |
$include = wpforo_parse_args( $include );
|
635 |
$exclude = wpforo_parse_args( $exclude );
|
636 |
|
637 |
+
$sql = "SELECT *, ug.name AS groupname, ug.color AS color FROM `".WPF()->db->base_prefix."users` u
|
638 |
+
INNER JOIN `".WPF()->db->prefix."wpforo_profiles` p ON p.`userid` = u.`ID`
|
639 |
+
LEFT JOIN `".WPF()->db->prefix."wpforo_usergroups` ug ON ug.`groupid` = p.`groupid`";
|
640 |
$wheres = array();
|
641 |
if(!empty($include)) $wheres[] = "u.`ID` IN(" . implode(', ', array_map('intval', $include)) . ")";
|
642 |
if(!empty($exclude)) $wheres[] = "u.`ID` NOT IN(" . implode(', ', array_map('intval', $exclude)) . ")";
|
643 |
if(!empty($status)) $wheres[] = " p.`status` IN('" . implode("','", array_map('esc_sql', array_map('sanitize_text_field', $status)) ) . "')";
|
644 |
+
if( !is_null($groupid) ) $wheres[] = "p.`groupid` = " . intval($groupid);
|
645 |
+
if( !is_null($online_time) ) $wheres[] = "p.`online_time` > " . intval($online_time);
|
646 |
+
|
647 |
if(!empty($wheres)) $sql .= " WHERE " . implode($wheres, " AND ");
|
648 |
|
649 |
$item_count_sql = preg_replace('#SELECT.+?FROM#isu', 'SELECT count(*) FROM', $sql);
|
650 |
+
if( $item_count_sql ) $items_count = WPF()->db->get_var($item_count_sql);
|
651 |
|
652 |
if( $orderby == 'groupid' ) $orderby = 'p.`groupid`';
|
653 |
$sql .= esc_sql(" ORDER BY $orderby " . $order);
|
654 |
if($row_count) $sql .= esc_sql(" LIMIT $offset,$row_count");
|
655 |
|
656 |
+
return WPF()->db->get_results($sql, ARRAY_A);
|
657 |
}
|
658 |
}
|
659 |
|
670 |
);
|
671 |
}
|
672 |
|
673 |
+
$sql = "SELECT `ID` FROM `".WPF()->db->base_prefix."users` u
|
674 |
+
INNER JOIN `".WPF()->db->prefix."wpforo_profiles` p ON p.`userid` = u.`ID`";
|
675 |
$wheres = array();
|
676 |
|
677 |
foreach($fields as $field){
|
683 |
$sql .= " WHERE " . implode($wheres, " OR ");
|
684 |
if( $limit ) $sql .= " LIMIT " . intval($limit);
|
685 |
|
686 |
+
return WPF()->db->get_col($sql);
|
687 |
}else{
|
688 |
return array();
|
689 |
}
|
695 |
|
696 |
public function filter($args, $limit = NULL){
|
697 |
if($args && is_array($args)){
|
698 |
+
$sql = "SELECT `ID` FROM `".WPF()->db->base_prefix."users` u
|
699 |
+
INNER JOIN `".WPF()->db->prefix."wpforo_profiles` p ON p.`userid` = u.`ID`";
|
700 |
$wheres = array();
|
701 |
|
702 |
foreach($args as $field => $needle){
|
709 |
$sql .= " WHERE " . implode($wheres, " AND ");
|
710 |
if( $limit ) $sql .= " LIMIT " . intval($limit);
|
711 |
|
712 |
+
return WPF()->db->get_col($sql);
|
713 |
}
|
714 |
}
|
715 |
|
717 |
}
|
718 |
|
719 |
function ban($userid){
|
720 |
+
if( $userid == WPF()->current_userid ){
|
721 |
+
WPF()->notice->add('You can\'t make yourself banned user', 'error');
|
722 |
return FALSE;
|
723 |
}
|
724 |
+
if( !WPF()->perm->usergroup_can('bm') || !WPF()->perm->user_can_manage_user( WPF()->current_userid, intval( $userid ) )){
|
725 |
+
WPF()->notice->add('Permission denied for this action', 'error');
|
726 |
return FALSE;
|
727 |
}
|
728 |
+
if( FALSE !== WPF()->db->update(
|
729 |
+
WPF()->db->prefix.'wpforo_profiles',
|
730 |
array('status' => 'banned'),
|
731 |
array('userid' => intval( $userid )),
|
732 |
array('%s'),
|
734 |
)
|
735 |
){
|
736 |
$this->reset($userid);
|
737 |
+
WPF()->notice->add('User successfully banned from wpforo', 'success');
|
738 |
return TRUE;
|
739 |
}
|
740 |
|
741 |
+
WPF()->notice->add('User ban action error', 'error');
|
742 |
return FALSE;
|
743 |
}
|
744 |
|
745 |
function unban($userid){
|
746 |
+
if( !WPF()->perm->usergroup_can('bm') || !WPF()->perm->user_can_manage_user( WPF()->current_userid, intval( $userid ) )){
|
747 |
+
WPF()->notice->add('Permission denied for this action', 'error');
|
748 |
return FALSE;
|
749 |
}
|
750 |
+
if( FALSE !== WPF()->db->update(
|
751 |
+
WPF()->db->prefix.'wpforo_profiles',
|
752 |
array('status' => 'active'),
|
753 |
array('userid' => intval( $userid )),
|
754 |
array('%s'),
|
756 |
)
|
757 |
){
|
758 |
$this->reset($userid);
|
759 |
+
WPF()->notice->add('User successfully unbanned from wpforo', 'success');
|
760 |
return TRUE;
|
761 |
}
|
762 |
|
763 |
+
WPF()->notice->add('User unban action error', 'error');
|
764 |
return FALSE;
|
765 |
}
|
766 |
|
773 |
*/
|
774 |
public function delete( $userid, $reassign = NULL ){
|
775 |
if( !($userid = intval($userid)) ) return FALSE;
|
776 |
+
if( !WPF()->perm->usergroup_can('dm') || !WPF()->perm->user_can_manage_user( WPF()->current_userid, intval( $userid ) )){
|
777 |
+
WPF()->notice->add('Permission denied for this action', 'error');
|
778 |
return FALSE;
|
779 |
}
|
780 |
|
781 |
do_action('wpforo_before_delete_user', $userid, $reassign);
|
782 |
|
783 |
if( !($reassign = intval($reassign)) ){
|
784 |
+
if( $postids = WPF()->db->get_col( WPF()->db->prepare( "SELECT `postid` FROM `".WPF()->db->prefix."wpforo_posts` WHERE userid = %d", $userid ) ) ){
|
785 |
+
foreach( $postids as $postid ) WPF()->post->delete($postid);
|
786 |
}
|
787 |
|
788 |
+
if( $topicids = WPF()->db->get_col( WPF()->db->prepare( "SELECT `topicid` FROM `".WPF()->db->prefix."wpforo_topics` WHERE userid = %d", $userid ) ) ){
|
789 |
+
foreach( $topicids as $topicid ) WPF()->topic->delete($topicid, false);
|
790 |
}
|
791 |
}else{
|
792 |
+
WPF()->db->update( WPF()->db->prefix."wpforo_topics", array('userid' => $reassign), array('userid' => $userid) );
|
793 |
+
WPF()->db->update( WPF()->db->prefix."wpforo_posts", array('userid' => $reassign), array('userid' => $userid) );
|
794 |
+
WPF()->db->update( WPF()->db->prefix."wpforo_likes", array('post_userid' => $reassign), array('post_userid' => $userid) );
|
795 |
+
WPF()->db->update( WPF()->db->prefix."wpforo_votes", array('post_userid' => $reassign), array('post_userid' => $userid) );
|
796 |
+
if( $user_stats = WPF()->db->get_row(
|
797 |
+
WPF()->db->prepare( "SELECT
|
798 |
SUM(`posts`) AS posts,
|
799 |
SUM(`questions`) AS questions,
|
800 |
SUM(`answers`) AS answers,
|
801 |
SUM(`comments`) AS comments
|
802 |
+
FROM `".WPF()->db->prefix."wpforo_profiles`
|
803 |
+
WHERE `userid` IN( %d , %d )", $userid, $reassign
|
804 |
),
|
805 |
ARRAY_A
|
806 |
)
|
807 |
){
|
808 |
+
WPF()->db->update(
|
809 |
+
WPF()->db->prefix.'wpforo_profiles',
|
810 |
array(
|
811 |
'posts' => $user_stats['posts'],
|
812 |
'questions' => $user_stats['questions'],
|
820 |
}
|
821 |
}
|
822 |
|
823 |
+
WPF()->db->delete(
|
824 |
+
WPF()->db->prefix.'wpforo_subscribes', array( 'userid' => $userid ), array( '%d' )
|
825 |
);
|
826 |
|
827 |
+
WPF()->db->delete(
|
828 |
+
WPF()->db->prefix.'wpforo_views', array( 'userid' => $userid ), array( '%d' )
|
829 |
);
|
830 |
|
831 |
+
WPF()->db->delete(
|
832 |
+
WPF()->db->prefix.'wpforo_likes', array( 'userid' => $userid ), array( '%d' )
|
833 |
);
|
834 |
|
835 |
+
WPF()->db->delete(
|
836 |
+
WPF()->db->prefix.'wpforo_votes', array( 'userid' => $userid ), array( '%d' )
|
837 |
);
|
838 |
|
839 |
+
if( FALSE !== WPF()->db->delete(
|
840 |
+
WPF()->db->prefix.'wpforo_profiles', array( 'userid' => $userid ), array( '%d' )
|
841 |
)
|
842 |
){
|
843 |
|
844 |
do_action('wpforo_after_delete_user', $userid, $reassign);
|
845 |
|
846 |
+
WPF()->notice->add('User successfully deleted from wpforo', 'success');
|
847 |
return TRUE;
|
848 |
}
|
849 |
|
850 |
+
WPF()->notice->add('User delete error', 'error');
|
851 |
return FALSE;
|
852 |
}
|
853 |
|
854 |
public function avatar($member, $attr = '', $size = ''){
|
855 |
|
856 |
+
if(!isset($member['userid'])) return '';
|
857 |
+
$cache = WPF()->cache->on('memory_cashe');
|
858 |
|
859 |
$src = $member['avatar'];
|
860 |
$userid = $member['userid'];
|
865 |
}
|
866 |
}
|
867 |
}
|
868 |
+
if($src && wpforo_feature('custom-avatars')){
|
869 |
$attr = ($attr ? $attr : 'height="96" width="96"');
|
870 |
$img = '<img class="avatar" src="'.esc_url($src).'" '. $attr .' />';
|
871 |
}else{
|
882 |
}
|
883 |
}
|
884 |
|
885 |
+
function get_avatar($userid, $attr = '', $size = ''){
|
886 |
|
887 |
+
$cache = WPF()->cache->on('memory_cashe');
|
888 |
|
889 |
if($cache && isset(self::$cache['avatar'][$userid])){
|
890 |
if(self::$cache['avatar'][$userid]['attr'] == $attr && self::$cache['avatar'][$userid]['size'] == $size){
|
893 |
}
|
894 |
}
|
895 |
}
|
896 |
+
$src = $this->get_avatar_url($userid);
|
897 |
+
if($src && wpforo_feature('custom-avatars')){
|
898 |
$attr = ($attr ? $attr : 'height="96" width="96"');
|
899 |
$img = '<img class="avatar" src="'.esc_url($src).'" '. $attr .' />';
|
900 |
}else{
|
912 |
}
|
913 |
|
914 |
public function get_avatar_url($userid){
|
915 |
+
$cache = WPF()->cache->on('memory_cashe');
|
916 |
+
if( $cache && array_key_exists($userid, self::$cache['user']) && array_key_exists('avatar', self::$cache['user'][$userid]) ){
|
917 |
+
return self::$cache['user'][$userid]['avatar'];
|
918 |
+
}
|
919 |
+
if( $cache && array_key_exists($userid, self::$cache['avatar']) && array_key_exists('avatar_url', self::$cache['avatar'][$userid]) ){
|
920 |
+
return self::$cache['avatar'][$userid]['avatar_url'];
|
921 |
+
}
|
922 |
+
|
923 |
+
$avatar_url = WPF()->db->get_var( WPF()->db->prepare("SELECT `avatar` FROM `".WPF()->db->prefix."wpforo_profiles` WHERE `userid` = %d", wpforo_bigintval($userid)) );
|
924 |
+
|
925 |
+
if($cache) return self::$cache['avatar'][$userid]['avatar_url'] = $avatar_url;
|
926 |
+
return $avatar_url;
|
927 |
}
|
928 |
|
929 |
function get_topics_count( $userid ){
|
930 |
+
$count = WPF()->db->get_var("SELECT count(topicid) FROM `".WPF()->db->prefix."wpforo_topics` WHERE `userid` = ".intval($userid));
|
931 |
return $count;
|
932 |
}
|
933 |
|
934 |
function get_questions_count( $userid ){
|
935 |
+
$count = WPF()->db->get_var("SELECT count(topicid) FROM `".WPF()->db->prefix."wpforo_topics` WHERE `userid` = ".intval($userid));
|
936 |
return $count;
|
937 |
}
|
938 |
|
939 |
function get_answers_count( $userid ){
|
940 |
+
$count = WPF()->db->get_var("SELECT count(postid) FROM `".WPF()->db->prefix."wpforo_posts` WHERE `is_answer` = 1 AND `userid` = ".intval($userid));
|
941 |
return $count;
|
942 |
}
|
943 |
|
944 |
function get_question_comments_count( $userid ){
|
945 |
+
$count = WPF()->db->get_var("SELECT count(postid) FROM `".WPF()->db->prefix."wpforo_posts` WHERE `parentid` > 0 AND `userid` = ".intval($userid));
|
946 |
return $count;
|
947 |
}
|
948 |
|
949 |
function get_replies_count( $userid ){
|
950 |
+
$count = WPF()->db->get_var("SELECT count(postid) FROM `".WPF()->db->prefix."wpforo_posts` WHERE `userid` = ".intval($userid));
|
951 |
return $count;
|
952 |
}
|
953 |
|
954 |
function get_likes_count( $userid ){
|
955 |
+
$count = WPF()->db->get_var("SELECT count(likeid) FROM `".WPF()->db->prefix."wpforo_likes` WHERE `userid` = ".intval($userid));
|
956 |
return $count;
|
957 |
}
|
958 |
|
959 |
function get_votes_count( $userid ){
|
960 |
+
$count = WPF()->db->get_var("SELECT count(voteid) FROM `".WPF()->db->prefix."wpforo_votes` WHERE `userid` = ".intval($userid));
|
961 |
return $count;
|
962 |
}
|
963 |
|
968 |
|
969 |
//getting user's posts votes and likes count
|
970 |
function get_user_votes_and_likes_count( $userid ){
|
971 |
+
$votes_count = WPF()->db->get_var("SELECT count(voteid) FROM `".WPF()->db->prefix."wpforo_votes` WHERE `post_userid` = ".intval($userid));
|
972 |
+
$likes_count = WPF()->db->get_var("SELECT count(likeid) FROM `".WPF()->db->prefix."wpforo_likes` WHERE `post_userid` = ".intval($userid));
|
973 |
return $votes_count + $likes_count;
|
974 |
}
|
975 |
|
976 |
function get_profile_url( $arg, $template = 'profile' ){
|
977 |
if(!$arg) return wpforo_home_url();
|
978 |
$userid = intval( basename($arg) );
|
979 |
+
$member_args = ( $userid ? $userid : array( 'user_nicename' => basename($arg) ) );
|
980 |
$user = $this->get_member( $member_args );
|
981 |
if(empty($user)) return wpforo_home_url();
|
982 |
+
$user_slug = ( wpfo(WPF()->member->options['url_structure'], false) == 'id' ? $user['ID'] : $user['user_nicename'] );
|
983 |
return wpforo_home_url("$template/$user_slug");
|
984 |
}
|
985 |
|
986 |
function profile_url( $member = array(), $template = 'profile' ){
|
987 |
if(isset($member['ID']) || isset($member['user_nicename'])){
|
988 |
+
$user_slug = ( wpfo(WPF()->member->options['url_structure'], false) == 'id' ? $member['ID'] : $member['user_nicename'] );
|
989 |
$profile_url = wpforo_home_url("$template/$user_slug");
|
990 |
$profile_url = apply_filters( 'wpforo_profile_url', $profile_url, $member, $template );
|
991 |
}
|
1001 |
//$live_count = TRUE / FALSE
|
1002 |
function get_stat( $args = array(), $live_count = false, $cache = false ){
|
1003 |
|
1004 |
+
$cache = WPF()->cache->on('memory_cashe');
|
1005 |
|
1006 |
$stat = array( 'points' => 0,
|
1007 |
'rating' => 0,
|
1040 |
if($question_comments = $this->get_question_comments_count( $userid )) $stat['question_comments'] = $question_comments;
|
1041 |
}
|
1042 |
else{
|
1043 |
+
$profile = WPF()->db->get_var("SELECT `posts`, `questions`, `answers`, `comments` FROM `".WPF()->db->prefix."wpforo_profiles` WHERE `userid` = ".intval($userid));
|
1044 |
if(isset($profile['questions'])) $stat['questions'] = intval($profile['questions']);
|
1045 |
if(isset($profile['answers'])) $stat['answers'] = intval($profile['answers']);
|
1046 |
if(isset($profile['posts'])) $stat['posts'] = intval($profile['posts']);
|
1070 |
}
|
1071 |
|
1072 |
function get_count(){
|
1073 |
+
return WPF()->db->get_var( "SELECT COUNT(p.`userid`) FROM `".WPF()->db->prefix."wpforo_profiles` p
|
1074 |
+
INNER JOIN `".WPF()->db->base_prefix."users` u ON u.`ID` = p.`userid` WHERE p.`status` NOT LIKE 'trashed'" );
|
1075 |
}
|
1076 |
|
1077 |
|
1078 |
+
function is_online( $userid, $duration = NULL ){
|
1079 |
|
1080 |
+
$cache = WPF()->cache->on('memory_cashe');
|
1081 |
|
1082 |
if( $cache && isset(self::$cache['online'][$userid]) ){
|
1083 |
if(self::$cache['online'][$userid]['durration'] == $duration ){
|
1086 |
}
|
1087 |
}
|
1088 |
}
|
1089 |
+
if(!$duration) $duration = WPF()->member->options['online_status_timeout'];
|
1090 |
+
$sql = "SELECT `online_time` FROM `".WPF()->db->prefix."wpforo_profiles` WHERE `userid` = %d";
|
1091 |
+
$sql = WPF()->db->prepare($sql, $userid);
|
1092 |
+
$online_time = intval( WPF()->db->get_var($sql) );
|
1093 |
$current_time = current_time( 'timestamp', 1 );
|
1094 |
$online_duration = $current_time - $online_time;
|
1095 |
if( $online_duration < $duration ) {
|
1123 |
<?php endif;
|
1124 |
}
|
1125 |
|
1126 |
+
function online_members_count( $duration = NULL ){
|
1127 |
+
if(!$duration) $duration = WPF()->member->options['online_status_timeout'];
|
1128 |
$current_time = current_time( 'timestamp', 1 );
|
1129 |
$online_timeframe = $current_time - $duration;
|
1130 |
+
return WPF()->db->get_var( "SELECT COUNT(`userid`) FROM `".WPF()->db->prefix."wpforo_profiles` WHERE `online_time` > " . intval($online_timeframe) );
|
1131 |
|
1132 |
}
|
1133 |
|
1134 |
+
function get_online_members( $count = 1, $duration = NULL ){
|
1135 |
+
if(!$duration) $duration = WPF()->member->options['online_status_timeout'];
|
1136 |
$current_time = current_time( 'timestamp', 1 );
|
1137 |
$online_timeframe = $current_time - $duration;
|
1138 |
+
$args = array(
|
1139 |
+
'online_time' => $online_timeframe, // $current_time - $duration
|
1140 |
+
'orderby' => 'userid', // forumid, order, parentid
|
1141 |
+
'row_count' => $count,
|
1142 |
+
'order' => 'ASC', // ASC DESC
|
1143 |
+
);
|
1144 |
+
return $this->get_members($args);
|
|
|
|
|
|
|
|
|
|
|
|
|
1145 |
}
|
1146 |
|
1147 |
function levels(){
|
1157 |
$rating['title'] = array( 0 => 'New Member', 1 => 'Active Member', 2 => 'Eminent Member', 3 => 'Trusted Member', 4 => 'Estimable Member', 5 => 'Reputable Member', 6 => 'Honorable Member', 7 => 'Prominent Member', 8 => 'Noble Member', 9 => 'Famed Member', 10 => 'Illustrious Member' );
|
1158 |
$rating['icon'] = array( 0 => 'fa-star-half-o', 1 => 'fa-star', 2 => 'fa-star', 3 => 'fa-star', 4 => 'fa-star', 5 => 'fa-star', 6 => 'fa-certificate', 7 => 'fa-certificate', 8 => 'fa-certificate', 9 => 'fa-shield', 10 => 'fa-trophy' );
|
1159 |
|
1160 |
+
if(!empty(WPF()->member->options['rating'])){
|
1161 |
|
1162 |
+
if($level === false) return WPF()->member->options['rating'];
|
1163 |
+
if(!empty(WPF()->member->options['rating'][$level])){
|
1164 |
|
1165 |
+
if(!$var) return WPF()->member->options['rating'][$level];
|
1166 |
+
if(!empty(WPF()->member->options['rating'][$level][$var])){
|
1167 |
|
1168 |
+
return WPF()->member->options['rating'][$level][$var];
|
1169 |
|
1170 |
}
|
1171 |
}
|
1223 |
return '<i class="fa '. sanitize_html_class($this->rating($level, 'icon')) .'"></i>';
|
1224 |
}
|
1225 |
else{
|
1226 |
+
return '';
|
1227 |
}
|
1228 |
}
|
1229 |
|
1230 |
public function reset($userid){
|
1231 |
if( !$userid ) return;
|
1232 |
+
WPF()->db->query( "DELETE FROM `" . WPF()->db->base_prefix ."usermeta` WHERE `meta_key` = '_wpf_member_obj' AND `user_id` = " . intval($userid) );
|
1233 |
wpforo_clean_cache( $userid, 'user' );
|
1234 |
}
|
1235 |
|
1236 |
public function clear_db_cache(){
|
1237 |
+
WPF()->db->query( "DELETE FROM `" . WPF()->db->base_prefix ."usermeta` WHERE `meta_key` = '_wpf_member_obj'" );
|
1238 |
}
|
1239 |
+
|
1240 |
+
private function update_online_time($userid = NULL){
|
1241 |
+
if(!$userid) $userid = WPF()->current_userid;
|
1242 |
+
if(!$userid) return false;
|
1243 |
+
$current_timestamp = current_time( 'timestamp', 1 );
|
1244 |
+
$sql = "UPDATE `".WPF()->db->prefix."wpforo_profiles` SET `online_time` = %d WHERE `userid` = %d";
|
1245 |
+
$sql = WPF()->db->prepare($sql, $current_timestamp, wpforo_bigintval($userid));
|
1246 |
+
if( false !== WPF()->db->query($sql) ) return $current_timestamp;
|
1247 |
+
return false;
|
1248 |
+
}
|
1249 |
|
1250 |
public function init_current_user(){
|
1251 |
$current_user = wp_get_current_user();
|
1253 |
$user = $this->get_member( $current_user->ID );
|
1254 |
$status = ( isset($user['status']) ? $user['status'] : '' );
|
1255 |
if( $status == 'active' ){
|
1256 |
+
WPF()->current_user = $user;
|
1257 |
+
WPF()->current_user_groupid = WPF()->current_user['groupid'];
|
1258 |
+
WPF()->current_userid = $current_user->ID;
|
1259 |
+
WPF()->current_username = $current_user->user_login;
|
1260 |
+
WPF()->current_user_email = $current_user->user_email;
|
1261 |
+
WPF()->current_user_display_name = $current_user->display_name;
|
1262 |
+
|
1263 |
+
$this->update_online_time();
|
|
|
|
|
|
|
|
|
|
|
|
|
1264 |
}
|
1265 |
+
WPF()->current_user_status = $status;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1266 |
}
|
1267 |
}
|
1268 |
|
1281 |
|
1282 |
$userids = array_diff( $userids, array( $current_user->ID ) );
|
1283 |
$users_have_content = false;
|
1284 |
+
if ( WPF()->db->get_var( "SELECT `postid` FROM `".WPF()->db->prefix."wpforo_posts` WHERE `userid` IN( " . implode( ',', array_map('intval', $userids) ) . " ) LIMIT 1" ) ) {
|
1285 |
$users_have_content = true;
|
1286 |
}
|
1287 |
?>
|
1318 |
|
1319 |
|
1320 |
public function autoban($userid){
|
1321 |
+
if( !WPF()->perm->usergroup_can( 'em' ) ){
|
1322 |
+
WPF()->db->update(
|
1323 |
+
WPF()->db->prefix.'wpforo_profiles',
|
1324 |
array('status' => 'banned'),
|
1325 |
array('userid' => intval( $userid )),
|
1326 |
array('%s'),
|
1331 |
|
1332 |
public function member_approved_posts( $member = array() ){
|
1333 |
if(is_numeric($member)){
|
1334 |
+
if( isset(WPF()->current_user['posts']) && WPF()->current_user['posts'] && $member == WPF()->current_userid ){
|
1335 |
+
return WPF()->current_user['posts'];
|
1336 |
}
|
1337 |
else{
|
1338 |
+
return WPF()->db->get_var( "SELECT COUNT(*) as posts FROM `".WPF()->db->prefix."wpforo_posts` WHERE `status` = 0 AND `userid` = " . intval($member) );
|
1339 |
}
|
1340 |
}
|
1341 |
elseif(is_array($member) && !empty($member)){
|
1347 |
}
|
1348 |
|
1349 |
public function current_user_is_new(){
|
1350 |
+
if( WPF()->perm->usergroup_can( 'em' ) ){
|
1351 |
//This is an admin or moderator. The number of posts doesn't matter.
|
1352 |
return false;
|
1353 |
}
|
1354 |
else{
|
1355 |
+
$posts = $this->member_approved_posts( WPF()->current_userid );
|
1356 |
+
if ( $posts < WPF()->tools_antispam['new_user_max_posts'] ) {
|
1357 |
return true;
|
1358 |
}
|
1359 |
else{
|
1363 |
}
|
1364 |
|
1365 |
public function banned_count(){
|
1366 |
+
$count = WPF()->db->get_var("SELECT count(*) FROM `".WPF()->db->prefix."wpforo_profiles` WHERE `status` = 'banned' " );
|
1367 |
return $count;
|
1368 |
}
|
1369 |
|
1370 |
public function get_guest( $args = array() ){
|
1371 |
|
1372 |
+
$cache = WPF()->cache->on('memory_cashe');
|
1373 |
|
1374 |
if( !isset($args['name']) || $args['name'] == '' ) $args['name'] = wpforo_phrase('Anonymous', false);
|
1375 |
if( !isset($args['email']) || $args['email'] == '' ) $args['email'] = 'anonymous@example.com';
|
1387 |
|
1388 |
if( $args['email'] ){
|
1389 |
$post_args = array( 'email' => $args['email'], 'orderby' => 'created', 'order' => 'ASC' );
|
1390 |
+
$posts = WPF()->post->get_posts( $post_args );
|
1391 |
if( !empty($posts) ){
|
1392 |
$args['posts'] = count($posts);
|
1393 |
if( isset($posts[0]['created']) || $posts[0]['created'] ) $args['user_registered'] = $posts[0]['created'];
|
1435 |
|
1436 |
$this->fields = apply_filters('wpforo_member_before_init_fields', $this->fields);
|
1437 |
|
1438 |
+
$usergroupids = WPF()->usergroup->get_usergroups('groupid');
|
1439 |
+
$usergroupids_can_edit_fields = WPF()->perm->usergroups_can('em');
|
1440 |
+
$usergroupids_can_view_social_net = WPF()->perm->usergroups_can('vmsn');
|
1441 |
|
1442 |
$this->fields['user_login'] = array(
|
1443 |
'fieldKey' => 'user_login',
|
1460 |
'search'
|
1461 |
),
|
1462 |
'canEdit' => $usergroupids_can_edit_fields,
|
1463 |
+
'canView' => WPF()->perm->usergroups_can('vmu'),
|
1464 |
'can' => 'vmu',
|
1465 |
'isSearchable' => 0
|
1466 |
);
|
1485 |
'search'
|
1486 |
),
|
1487 |
'canEdit' => $usergroupids_can_edit_fields,
|
1488 |
+
'canView' => WPF()->perm->usergroups_can('vmm'),
|
1489 |
'can' => 'vmm',
|
1490 |
'isSearchable' => 1
|
1491 |
);
|
1586 |
'search'
|
1587 |
),
|
1588 |
'canEdit' => $usergroupids_can_edit_fields,
|
1589 |
+
'canView' => WPF()->perm->usergroups_can('vmt'),
|
1590 |
'can' => 'vmt',
|
1591 |
'isSearchable' => 1
|
1592 |
);
|
1634 |
'search'
|
1635 |
),
|
1636 |
'canEdit' => $usergroupids_can_edit_fields,
|
1637 |
+
'canView' => WPF()->perm->usergroups_can('va'),
|
1638 |
'can' => 'va',
|
1639 |
'isSearchable' => 0
|
1640 |
);
|
1658 |
'search'
|
1659 |
),
|
1660 |
'canEdit' => $usergroupids_can_edit_fields,
|
1661 |
+
'canView' => WPF()->perm->usergroups_can('vmw'),
|
1662 |
'can' => 'vmw',
|
1663 |
'isSearchable' => 1
|
1664 |
);
|
1875 |
'search'
|
1876 |
),
|
1877 |
'canEdit' => $usergroupids_can_edit_fields,
|
1878 |
+
'canView' => WPF()->perm->usergroups_can('vml'),
|
1879 |
'can' => 'vml',
|
1880 |
'isSearchable' => 1
|
1881 |
);
|
1924 |
'search'
|
1925 |
),
|
1926 |
'canEdit' => $usergroupids_can_edit_fields,
|
1927 |
+
'canView' => WPF()->perm->usergroups_can('vmo'),
|
1928 |
'can' => 'vmo',
|
1929 |
'isSearchable' => 1
|
1930 |
);
|
1948 |
'search'
|
1949 |
),
|
1950 |
'canEdit' => $usergroupids_can_edit_fields,
|
1951 |
+
'canView' => WPF()->perm->usergroups_can('vms'),
|
1952 |
'can' => 'vms',
|
1953 |
'isSearchable' => 1
|
1954 |
);
|
1972 |
'search'
|
1973 |
),
|
1974 |
'canEdit' => $usergroupids_can_edit_fields,
|
1975 |
+
'canView' => WPF()->perm->usergroups_can('vmam'),
|
1976 |
'can' => 'vmam',
|
1977 |
'isSearchable' => 1
|
1978 |
);
|
2092 |
$this->fields['user_login'],
|
2093 |
$this->fields['user_email']
|
2094 |
);
|
2095 |
+
if( !wpforo_feature('user-register-email-confirm') ) $regform[] = $this->fields['user_pass'];
|
2096 |
$fields = array(
|
2097 |
array(
|
2098 |
$regform
|
wpf-includes/class-moderation.php
CHANGED
@@ -4,37 +4,32 @@ if (!defined('ABSPATH')) exit;
|
|
4 |
|
5 |
class wpForoModeration
|
6 |
{
|
7 |
-
private $wpforo;
|
8 |
-
private $db;
|
9 |
public $post_statuses;
|
10 |
|
11 |
-
public function __construct(
|
12 |
-
{
|
13 |
-
$this->wpforo = $wpforo;
|
14 |
-
$this->db = $wpforo->db;
|
15 |
$this->post_statuses = apply_filters('wpforo_post_statuses', array('approved', 'unapproved'));
|
16 |
}
|
17 |
|
18 |
public function init(){
|
19 |
-
if(
|
20 |
add_filter('wpforo_add_topic_data_filter', array(&$this, 'auto_moderate'));
|
21 |
add_filter('wpforo_add_post_data_filter', array(&$this, 'auto_moderate'));
|
22 |
}
|
23 |
else{
|
24 |
-
if(
|
25 |
add_filter('wpforo_add_topic_data_filter', array(&$this, 'remove_links'), 7);
|
26 |
add_filter('wpforo_edit_topic_data_filter', array(&$this, 'remove_links'), 7);
|
27 |
add_filter('wpforo_add_post_data_filter', array(&$this, 'remove_links'), 7);
|
28 |
add_filter('wpforo_edit_post_data_filter', array(&$this, 'remove_links'), 7);
|
29 |
}
|
30 |
-
if(
|
31 |
if (class_exists('Akismet')) {
|
32 |
add_filter('wpforo_add_topic_data_filter', array(&$this, 'akismet_topic'), 8);
|
33 |
add_filter('wpforo_edit_topic_data_filter', array(&$this, 'akismet_topic'), 8);
|
34 |
add_filter('wpforo_add_post_data_filter', array(&$this, 'akismet_post'), 8);
|
35 |
add_filter('wpforo_edit_post_data_filter', array(&$this, 'akismet_post'), 8);
|
36 |
}
|
37 |
-
if (
|
38 |
add_filter('wpforo_add_topic_data_filter', array(&$this, 'spam_topic'), 9);
|
39 |
add_filter('wpforo_edit_topic_data_filter', array(&$this, 'spam_topic'), 9);
|
40 |
add_filter('wpforo_add_topic_data_filter', array(&$this, 'spam_post'), 9);
|
@@ -43,7 +38,7 @@ class wpForoModeration
|
|
43 |
add_filter('wpforo_edit_post_data_filter', array(&$this, 'spam_post'), 9);
|
44 |
}
|
45 |
}
|
46 |
-
if (
|
47 |
add_filter('wpforo_add_topic_data_filter', array(&$this, 'auto_moderate'), 10);
|
48 |
add_filter('wpforo_add_post_data_filter', array(&$this, 'auto_moderate'), 10);
|
49 |
}
|
@@ -62,13 +57,13 @@ class wpForoModeration
|
|
62 |
$filter_by_status = intval((isset($_GET['filter_by_status']) ? $_GET['filter_by_status'] : 1));
|
63 |
$args['status'] = $filter_by_status;
|
64 |
if( !isset($_GET['order']) ) $args['order'] = 'DESC';
|
65 |
-
$posts =
|
66 |
return $posts;
|
67 |
}
|
68 |
|
69 |
public function search($needle, $fields = array())
|
70 |
{
|
71 |
-
$posts =
|
72 |
$pids = array();
|
73 |
foreach ($posts as $post) $pids[] = $post['postid'];
|
74 |
return $pids;
|
@@ -76,17 +71,17 @@ class wpForoModeration
|
|
76 |
|
77 |
public function post_approve($postid)
|
78 |
{
|
79 |
-
return
|
80 |
}
|
81 |
|
82 |
public function post_unapprove($postid)
|
83 |
{
|
84 |
-
return
|
85 |
}
|
86 |
|
87 |
public function get_view_url($arg)
|
88 |
{
|
89 |
-
return
|
90 |
}
|
91 |
|
92 |
public function akismet_topic($item)
|
@@ -101,20 +96,20 @@ class wpForoModeration
|
|
101 |
$post['comment_type'] = 'forum-post';
|
102 |
|
103 |
if (empty($item['forumid'])) {
|
104 |
-
$topic =
|
105 |
$item['forumid'] = $topic['forumid'];
|
106 |
}
|
107 |
|
108 |
-
$post['comment_author'] =
|
109 |
-
$post['comment_author_email'] =
|
110 |
-
$post['comment_author_url'] =
|
111 |
$post['comment_post_modified_gmt'] = current_time('mysql', 1);
|
112 |
$post['comment_content'] = $item['title'] . " \r\n " . $item['body'];
|
113 |
-
$post['permalink'] =
|
114 |
|
115 |
$response = Akismet::http_post(Akismet::build_query($post), 'comment-check');
|
116 |
if ($response[1] == 'true') {
|
117 |
-
$this->ban_for_spam(
|
118 |
$item['status'] = 1;
|
119 |
}
|
120 |
|
@@ -132,18 +127,18 @@ class wpForoModeration
|
|
132 |
$post['blog_charset'] = get_option('blog_charset');
|
133 |
$post['comment_type'] = 'forum-post';
|
134 |
|
135 |
-
$topic =
|
136 |
|
137 |
-
$post['comment_author'] =
|
138 |
-
$post['comment_author_email'] =
|
139 |
-
$post['comment_author_url'] =
|
140 |
$post['comment_post_modified_gmt'] = $topic['modified'];
|
141 |
$post['comment_content'] = $item['body'];
|
142 |
-
$post['permalink'] =
|
143 |
|
144 |
$response = Akismet::http_post(Akismet::build_query($post), 'comment-check');
|
145 |
if ($response[1] == 'true') {
|
146 |
-
$this->ban_for_spam(
|
147 |
$item['status'] = 1;
|
148 |
}
|
149 |
|
@@ -162,7 +157,7 @@ class wpForoModeration
|
|
162 |
if( $level > 2 ){
|
163 |
$link = '<a href="' . admin_url('admin.php?page=wpforo-tools&tab=antispam#spam-files') . '"><strong>>></strong></a>';
|
164 |
$phrase = '<strong>SPAM! - </strong>' . sprintf( __('Probably spam file attachments have been detected by wpForo Spam Control. Please moderate suspected files here %s', 'wpforo'), $link);
|
165 |
-
|
166 |
return true;
|
167 |
}
|
168 |
}
|
@@ -184,7 +179,7 @@ class wpForoModeration
|
|
184 |
$ext_risk = array('pdf', 'doc', 'docx', 'txt', 'htm', 'html', 'rtf', 'xml', 'xls', 'xlsx', 'php', 'cgi');
|
185 |
$ext_high_risk = array('php', 'cgi', 'exe');
|
186 |
if( in_array($ext, $ext_risk) ){
|
187 |
-
$has_post =
|
188 |
foreach($spam_file_phrases as $phrases){
|
189 |
foreach($phrases as $phrase){
|
190 |
if( strpos($item, $phrase) !== FALSE ){
|
@@ -240,8 +235,8 @@ class wpForoModeration
|
|
240 |
$item = strip_tags($item);
|
241 |
$is_similar = false;
|
242 |
$topic_args = array( 'userid' => $topic['userid'] );
|
243 |
-
$topics =
|
244 |
-
$sc_level = ( isset(
|
245 |
if( $sc_level > 100 ) $sc_level = 60; $sc_level = (101 - $sc_level);
|
246 |
if( !empty($topics) ){
|
247 |
$count = count($topics);
|
@@ -251,7 +246,7 @@ class wpForoModeration
|
|
251 |
if($check_1){ similar_text($item, $check_1, $percent); if( $percent > $sc_level ) $is_similar = true; }
|
252 |
if($check_2 && !$is_similar){ similar_text($item, $check_2, $percent); if( $percent > $sc_level ) $is_similar = true; }
|
253 |
if( $is_similar ){
|
254 |
-
$this->ban_for_spam(
|
255 |
$topic['status'] = 1;
|
256 |
}
|
257 |
}
|
@@ -272,8 +267,8 @@ class wpForoModeration
|
|
272 |
$item = strip_tags($item);
|
273 |
$is_similar = false;
|
274 |
$post_args = array( 'userid' => $post['userid'] );
|
275 |
-
$posts =
|
276 |
-
$sc_level = ( isset(
|
277 |
if( $sc_level > 100 ) $sc_level = 70; $sc_level = (101 - $sc_level);
|
278 |
if( !empty($posts) ){
|
279 |
$count = count($posts);
|
@@ -283,7 +278,7 @@ class wpForoModeration
|
|
283 |
if($check_1){ similar_text($item, $check_1, $percent); if( isset($percent) && $percent > $sc_level ) $is_similar = true; }
|
284 |
if($check_2 && !$is_similar){ similar_text($item, $check_2, $percent); if( isset($percent) && $percent > $sc_level ) $is_similar = true; }
|
285 |
if( $is_similar ){
|
286 |
-
$this->ban_for_spam(
|
287 |
$post['status'] = 1;
|
288 |
}
|
289 |
}
|
@@ -293,18 +288,18 @@ class wpForoModeration
|
|
293 |
public function auto_moderate($item){
|
294 |
|
295 |
if( empty($item) ) return $item;
|
296 |
-
if(
|
297 |
$item['status'] = 0;
|
298 |
return $item;
|
299 |
}
|
300 |
-
if(
|
301 |
$item['status'] = 1;
|
302 |
return $item;
|
303 |
}
|
304 |
|
305 |
-
if(
|
306 |
-
if( ( isset($item['status']) && $item['status'] == 1 ) || $this->has_unapproved(
|
307 |
-
$this->set_all_unapproved(
|
308 |
$item['status'] = 1;
|
309 |
}
|
310 |
if( isset($item['body']) && isset($item['title']) && ( $this->has_link($item['body']) || $this->has_link($item['title']) ) ){
|
@@ -312,7 +307,7 @@ class wpForoModeration
|
|
312 |
}
|
313 |
}
|
314 |
else{
|
315 |
-
if( !$this->has_approved(
|
316 |
$item['status'] = 1;
|
317 |
}
|
318 |
}
|
@@ -328,7 +323,7 @@ class wpForoModeration
|
|
328 |
else{
|
329 |
$userid = intval($user);
|
330 |
}
|
331 |
-
$has_approved_post =
|
332 |
if( $has_approved_post ){
|
333 |
return true;
|
334 |
}
|
@@ -345,7 +340,7 @@ class wpForoModeration
|
|
345 |
else{
|
346 |
$userid = intval($user);
|
347 |
}
|
348 |
-
$has_unapproved_post =
|
349 |
if( $has_unapproved_post ){
|
350 |
return true;
|
351 |
}
|
@@ -355,17 +350,17 @@ class wpForoModeration
|
|
355 |
}
|
356 |
|
357 |
public function ban_for_spam( $userid ){
|
358 |
-
if ( isset($userid) &&
|
359 |
-
if( !$this->has_approved(
|
360 |
-
|
361 |
}
|
362 |
}
|
363 |
}
|
364 |
|
365 |
public function set_all_unapproved( $userid ){
|
366 |
if ( isset($userid) ) {
|
367 |
-
|
368 |
-
|
369 |
}
|
370 |
}
|
371 |
|
4 |
|
5 |
class wpForoModeration
|
6 |
{
|
|
|
|
|
7 |
public $post_statuses;
|
8 |
|
9 |
+
public function __construct(){
|
|
|
|
|
|
|
10 |
$this->post_statuses = apply_filters('wpforo_post_statuses', array('approved', 'unapproved'));
|
11 |
}
|
12 |
|
13 |
public function init(){
|
14 |
+
if( !WPF()->perm->usergroup_can( 'aup' ) ){
|
15 |
add_filter('wpforo_add_topic_data_filter', array(&$this, 'auto_moderate'));
|
16 |
add_filter('wpforo_add_post_data_filter', array(&$this, 'auto_moderate'));
|
17 |
}
|
18 |
else{
|
19 |
+
if( !WPF()->perm->can_link() ){
|
20 |
add_filter('wpforo_add_topic_data_filter', array(&$this, 'remove_links'), 7);
|
21 |
add_filter('wpforo_edit_topic_data_filter', array(&$this, 'remove_links'), 7);
|
22 |
add_filter('wpforo_add_post_data_filter', array(&$this, 'remove_links'), 7);
|
23 |
add_filter('wpforo_edit_post_data_filter', array(&$this, 'remove_links'), 7);
|
24 |
}
|
25 |
+
if( WPF()->member->current_user_is_new() ){
|
26 |
if (class_exists('Akismet')) {
|
27 |
add_filter('wpforo_add_topic_data_filter', array(&$this, 'akismet_topic'), 8);
|
28 |
add_filter('wpforo_edit_topic_data_filter', array(&$this, 'akismet_topic'), 8);
|
29 |
add_filter('wpforo_add_post_data_filter', array(&$this, 'akismet_post'), 8);
|
30 |
add_filter('wpforo_edit_post_data_filter', array(&$this, 'akismet_post'), 8);
|
31 |
}
|
32 |
+
if ( WPF()->tools_antispam['spam_filter'] ) {
|
33 |
add_filter('wpforo_add_topic_data_filter', array(&$this, 'spam_topic'), 9);
|
34 |
add_filter('wpforo_edit_topic_data_filter', array(&$this, 'spam_topic'), 9);
|
35 |
add_filter('wpforo_add_topic_data_filter', array(&$this, 'spam_post'), 9);
|
38 |
add_filter('wpforo_edit_post_data_filter', array(&$this, 'spam_post'), 9);
|
39 |
}
|
40 |
}
|
41 |
+
if ( WPF()->tools_antispam['spam_filter'] ) {
|
42 |
add_filter('wpforo_add_topic_data_filter', array(&$this, 'auto_moderate'), 10);
|
43 |
add_filter('wpforo_add_post_data_filter', array(&$this, 'auto_moderate'), 10);
|
44 |
}
|
57 |
$filter_by_status = intval((isset($_GET['filter_by_status']) ? $_GET['filter_by_status'] : 1));
|
58 |
$args['status'] = $filter_by_status;
|
59 |
if( !isset($_GET['order']) ) $args['order'] = 'DESC';
|
60 |
+
$posts = WPF()->post->get_posts($args, $items_count);
|
61 |
return $posts;
|
62 |
}
|
63 |
|
64 |
public function search($needle, $fields = array())
|
65 |
{
|
66 |
+
$posts = WPF()->post->search($needle);
|
67 |
$pids = array();
|
68 |
foreach ($posts as $post) $pids[] = $post['postid'];
|
69 |
return $pids;
|
71 |
|
72 |
public function post_approve($postid)
|
73 |
{
|
74 |
+
return WPF()->post->status($postid, 0);
|
75 |
}
|
76 |
|
77 |
public function post_unapprove($postid)
|
78 |
{
|
79 |
+
return WPF()->post->status($postid, 1);
|
80 |
}
|
81 |
|
82 |
public function get_view_url($arg)
|
83 |
{
|
84 |
+
return WPF()->post->get_post_url($arg);
|
85 |
}
|
86 |
|
87 |
public function akismet_topic($item)
|
96 |
$post['comment_type'] = 'forum-post';
|
97 |
|
98 |
if (empty($item['forumid'])) {
|
99 |
+
$topic = WPF()->topic->get_topic($item['topicid']);
|
100 |
$item['forumid'] = $topic['forumid'];
|
101 |
}
|
102 |
|
103 |
+
$post['comment_author'] = WPF()->current_user['user_nicename'];
|
104 |
+
$post['comment_author_email'] = WPF()->current_user['user_email'];
|
105 |
+
$post['comment_author_url'] = WPF()->member->get_profile_url(WPF()->current_userid);
|
106 |
$post['comment_post_modified_gmt'] = current_time('mysql', 1);
|
107 |
$post['comment_content'] = $item['title'] . " \r\n " . $item['body'];
|
108 |
+
$post['permalink'] = WPF()->forum->get_forum_url($item['forumid']);
|
109 |
|
110 |
$response = Akismet::http_post(Akismet::build_query($post), 'comment-check');
|
111 |
if ($response[1] == 'true') {
|
112 |
+
$this->ban_for_spam( WPF()->current_userid );
|
113 |
$item['status'] = 1;
|
114 |
}
|
115 |
|
127 |
$post['blog_charset'] = get_option('blog_charset');
|
128 |
$post['comment_type'] = 'forum-post';
|
129 |
|
130 |
+
$topic = WPF()->topic->get_topic($item['topicid']);
|
131 |
|
132 |
+
$post['comment_author'] = WPF()->current_user['user_nicename'];
|
133 |
+
$post['comment_author_email'] = WPF()->current_user['user_email'];
|
134 |
+
$post['comment_author_url'] = WPF()->member->get_profile_url(WPF()->current_userid);
|
135 |
$post['comment_post_modified_gmt'] = $topic['modified'];
|
136 |
$post['comment_content'] = $item['body'];
|
137 |
+
$post['permalink'] = WPF()->topic->get_topic_url($item['topicid']);
|
138 |
|
139 |
$response = Akismet::http_post(Akismet::build_query($post), 'comment-check');
|
140 |
if ($response[1] == 'true') {
|
141 |
+
$this->ban_for_spam( WPF()->current_userid );
|
142 |
$item['status'] = 1;
|
143 |
}
|
144 |
|
157 |
if( $level > 2 ){
|
158 |
$link = '<a href="' . admin_url('admin.php?page=wpforo-tools&tab=antispam#spam-files') . '"><strong>>></strong></a>';
|
159 |
$phrase = '<strong>SPAM! - </strong>' . sprintf( __('Probably spam file attachments have been detected by wpForo Spam Control. Please moderate suspected files here %s', 'wpforo'), $link);
|
160 |
+
WPF()->notice->add( $phrase, 'error' );
|
161 |
return true;
|
162 |
}
|
163 |
}
|
179 |
$ext_risk = array('pdf', 'doc', 'docx', 'txt', 'htm', 'html', 'rtf', 'xml', 'xls', 'xlsx', 'php', 'cgi');
|
180 |
$ext_high_risk = array('php', 'cgi', 'exe');
|
181 |
if( in_array($ext, $ext_risk) ){
|
182 |
+
$has_post = WPF()->db->get_var( "SELECT `postid` FROM `".WPF()->db->prefix."wpforo_posts` WHERE `body` LIKE '%" . esc_sql( $item ) . "%' LIMIT 1" );
|
183 |
foreach($spam_file_phrases as $phrases){
|
184 |
foreach($phrases as $phrase){
|
185 |
if( strpos($item, $phrase) !== FALSE ){
|
235 |
$item = strip_tags($item);
|
236 |
$is_similar = false;
|
237 |
$topic_args = array( 'userid' => $topic['userid'] );
|
238 |
+
$topics = WPF()->topic->get_topics($topic_args);
|
239 |
+
$sc_level = ( isset(WPF()->tools_antispam['spam_filter_level_topic'])) ? intval(WPF()->tools_antispam['spam_filter_level_topic']) : 100;
|
240 |
if( $sc_level > 100 ) $sc_level = 60; $sc_level = (101 - $sc_level);
|
241 |
if( !empty($topics) ){
|
242 |
$count = count($topics);
|
246 |
if($check_1){ similar_text($item, $check_1, $percent); if( $percent > $sc_level ) $is_similar = true; }
|
247 |
if($check_2 && !$is_similar){ similar_text($item, $check_2, $percent); if( $percent > $sc_level ) $is_similar = true; }
|
248 |
if( $is_similar ){
|
249 |
+
$this->ban_for_spam( WPF()->current_userid );
|
250 |
$topic['status'] = 1;
|
251 |
}
|
252 |
}
|
267 |
$item = strip_tags($item);
|
268 |
$is_similar = false;
|
269 |
$post_args = array( 'userid' => $post['userid'] );
|
270 |
+
$posts = WPF()->post->get_posts($post_args);
|
271 |
+
$sc_level = ( isset(WPF()->tools_antispam['spam_filter_level_post'])) ? intval(WPF()->tools_antispam['spam_filter_level_post']) : 100;
|
272 |
if( $sc_level > 100 ) $sc_level = 70; $sc_level = (101 - $sc_level);
|
273 |
if( !empty($posts) ){
|
274 |
$count = count($posts);
|
278 |
if($check_1){ similar_text($item, $check_1, $percent); if( isset($percent) && $percent > $sc_level ) $is_similar = true; }
|
279 |
if($check_2 && !$is_similar){ similar_text($item, $check_2, $percent); if( isset($percent) && $percent > $sc_level ) $is_similar = true; }
|
280 |
if( $is_similar ){
|
281 |
+
$this->ban_for_spam( WPF()->current_userid );
|
282 |
$post['status'] = 1;
|
283 |
}
|
284 |
}
|
288 |
public function auto_moderate($item){
|
289 |
|
290 |
if( empty($item) ) return $item;
|
291 |
+
if( WPF()->perm->usergroup_can( 'em' ) ){
|
292 |
$item['status'] = 0;
|
293 |
return $item;
|
294 |
}
|
295 |
+
if( !WPF()->perm->usergroup_can( 'aup' ) ){
|
296 |
$item['status'] = 1;
|
297 |
return $item;
|
298 |
}
|
299 |
|
300 |
+
if( WPF()->member->current_user_is_new() ){
|
301 |
+
if( ( isset($item['status']) && $item['status'] == 1 ) || $this->has_unapproved( WPF()->current_userid ) ){
|
302 |
+
$this->set_all_unapproved( WPF()->current_userid );
|
303 |
$item['status'] = 1;
|
304 |
}
|
305 |
if( isset($item['body']) && isset($item['title']) && ( $this->has_link($item['body']) || $this->has_link($item['title']) ) ){
|
307 |
}
|
308 |
}
|
309 |
else{
|
310 |
+
if( !$this->has_approved( WPF()->current_userid ) ){
|
311 |
$item['status'] = 1;
|
312 |
}
|
313 |
}
|
323 |
else{
|
324 |
$userid = intval($user);
|
325 |
}
|
326 |
+
$has_approved_post = WPF()->db->get_var( "SELECT `postid` FROM `".WPF()->db->prefix."wpforo_posts` WHERE `userid` = '" . intval($userid) . "' AND `status` = 0 LIMIT 1" );
|
327 |
if( $has_approved_post ){
|
328 |
return true;
|
329 |
}
|
340 |
else{
|
341 |
$userid = intval($user);
|
342 |
}
|
343 |
+
$has_unapproved_post = WPF()->db->get_var( "SELECT `postid` FROM `".WPF()->db->prefix."wpforo_posts` WHERE `userid` = '" . intval($userid) . "' AND `status` = 1 LIMIT 1" );
|
344 |
if( $has_unapproved_post ){
|
345 |
return true;
|
346 |
}
|
350 |
}
|
351 |
|
352 |
public function ban_for_spam( $userid ){
|
353 |
+
if ( isset($userid) && WPF()->tools_antispam['spam_user_ban'] ) {
|
354 |
+
if( !$this->has_approved( WPF()->current_userid ) ){
|
355 |
+
WPF()->member->autoban( $userid );
|
356 |
}
|
357 |
}
|
358 |
}
|
359 |
|
360 |
public function set_all_unapproved( $userid ){
|
361 |
if ( isset($userid) ) {
|
362 |
+
WPF()->db->update( WPF()->db->prefix."wpforo_topics", array('status' => 1), array('userid' => intval($userid)), array('%d'), array('%d'));
|
363 |
+
WPF()->db->update( WPF()->db->prefix."wpforo_posts", array('status' => 1), array('userid' => intval($userid)), array('%d'), array('%d'));
|
364 |
}
|
365 |
}
|
366 |
|
wpf-includes/class-notices.php
CHANGED
@@ -13,21 +13,7 @@ class wpForoNotices{
|
|
13 |
* @return void
|
14 |
*/
|
15 |
private function init(){
|
16 |
-
if(
|
17 |
-
}
|
18 |
-
|
19 |
-
/**
|
20 |
-
* @return bool
|
21 |
-
*/
|
22 |
-
private function is_session_started(){
|
23 |
-
if ( php_sapi_name() !== 'cli' ) {
|
24 |
-
if ( version_compare(phpversion(), '5.4.0', '>=') ) {
|
25 |
-
return session_status() === PHP_SESSION_ACTIVE ? TRUE : FALSE;
|
26 |
-
} else {
|
27 |
-
return session_id() === '' ? FALSE : TRUE;
|
28 |
-
}
|
29 |
-
}
|
30 |
-
return FALSE;
|
31 |
}
|
32 |
|
33 |
/**
|
@@ -38,7 +24,7 @@ class wpForoNotices{
|
|
38 |
*
|
39 |
* @return bool
|
40 |
*/
|
41 |
-
public function add( $args, $type = '', $s = array() ){
|
42 |
if(!$args) return FALSE;
|
43 |
$args = (array) $args;
|
44 |
if( $s && count($args) == 1 && is_array($s) && isset($s[0]) && !is_array($s[0]) ){
|
@@ -47,9 +33,10 @@ class wpForoNotices{
|
|
47 |
$s = (array) $s;
|
48 |
}
|
49 |
|
50 |
-
if(
|
51 |
-
$
|
52 |
if( !isset($_SESSION['wpforo_notices']) ) $_SESSION['wpforo_notices'] = array();
|
|
|
53 |
|
54 |
foreach($args as $key => $arg){
|
55 |
if( $s && isset($s[$key]) ){
|
@@ -59,8 +46,8 @@ class wpForoNotices{
|
|
59 |
}
|
60 |
}
|
61 |
|
62 |
-
$_SESSION['wpforo_notices'] = array_merge( (array) $_SESSION['wpforo_notices'], (array) $args);
|
63 |
-
|
64 |
return TRUE;
|
65 |
}
|
66 |
|
@@ -73,8 +60,8 @@ class wpForoNotices{
|
|
73 |
*
|
74 |
*/
|
75 |
public function clear(){
|
76 |
-
if(
|
77 |
-
|
78 |
return TRUE;
|
79 |
}
|
80 |
|
@@ -82,27 +69,26 @@ class wpForoNotices{
|
|
82 |
}
|
83 |
|
84 |
/**
|
85 |
-
*
|
86 |
*
|
87 |
-
* @return
|
88 |
*/
|
89 |
public function get_notices(){
|
90 |
-
|
91 |
-
if($_SESSION['
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
foreach($_SESSION['wpforo_notices'] as $notice) if( !is_array($notice) ) $notices['text'] .= wpforo_phrase($notice, FALSE) . '<br/>';
|
103 |
|
104 |
$this->clear();
|
105 |
-
return $
|
106 |
}
|
107 |
|
108 |
/**
|
@@ -112,69 +98,79 @@ class wpForoNotices{
|
|
112 |
* @return void
|
113 |
*/
|
114 |
public function show( $frontend = TRUE ){
|
115 |
-
if(
|
116 |
-
if($_SESSION['wpforo_notice_type'] == 'success'){
|
117 |
-
$class = 'success';
|
118 |
-
}elseif($_SESSION['wpforo_notice_type'] == 'error'){
|
119 |
-
$class = 'error';
|
120 |
-
}else{
|
121 |
-
$class = '';
|
122 |
-
}
|
123 |
$inner = '';
|
124 |
-
|
125 |
-
$
|
126 |
-
|
127 |
-
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
jQuery(document).ready(function($){
|
130 |
-
var msg_box = $("#wpf-msg-box
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
$("#wpf-msg-box").show(150).delay(1000);
|
136 |
-
<?php if($class) : ?>
|
137 |
-
setTimeout(function(){ $("#wpf-msg-box").hide(); }, <?php echo ($class == 'error' ? 6000 : 3000 ) ?>);
|
138 |
-
<?php endif ?>
|
139 |
});
|
140 |
</script>
|
141 |
-
<?php else :
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
</div>
|
146 |
-
<?php endif ?>
|
147 |
-
<?php
|
148 |
$this->clear();
|
149 |
}
|
150 |
|
151 |
|
152 |
public function addonNote() {
|
153 |
-
global $wpforo;
|
154 |
$lastHash = get_option('wpforo-addon-note-dismissed');
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
}
|
179 |
|
180 |
public function dismissAddonNote() {
|
@@ -189,8 +185,8 @@ class wpForoNotices{
|
|
189 |
}
|
190 |
|
191 |
public function addonHash() {
|
192 |
-
|
193 |
-
foreach (
|
194 |
$viewed .= $addon['title'] . ',';
|
195 |
}
|
196 |
$hash = $viewed;
|
@@ -208,7 +204,4 @@ class wpForoNotices{
|
|
208 |
<?php
|
209 |
}
|
210 |
}
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
}
|
13 |
* @return void
|
14 |
*/
|
15 |
private function init(){
|
16 |
+
if(!wpforo_is_session_started()) session_start();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
}
|
18 |
|
19 |
/**
|
24 |
*
|
25 |
* @return bool
|
26 |
*/
|
27 |
+
public function add( $args, $type = 'neutral', $s = array() ){
|
28 |
if(!$args) return FALSE;
|
29 |
$args = (array) $args;
|
30 |
if( $s && count($args) == 1 && is_array($s) && isset($s[0]) && !is_array($s[0]) ){
|
33 |
$s = (array) $s;
|
34 |
}
|
35 |
|
36 |
+
if( wpforo_is_session_started() ){
|
37 |
+
$type = strtolower($type);
|
38 |
if( !isset($_SESSION['wpforo_notices']) ) $_SESSION['wpforo_notices'] = array();
|
39 |
+
if( !isset($_SESSION['wpforo_notices'][$type]) ) $_SESSION['wpforo_notices'][$type] = array();
|
40 |
|
41 |
foreach($args as $key => $arg){
|
42 |
if( $s && isset($s[$key]) ){
|
46 |
}
|
47 |
}
|
48 |
|
49 |
+
$_SESSION['wpforo_notices'][$type] = array_merge( (array) $_SESSION['wpforo_notices'][$type], (array) $args);
|
50 |
+
$_SESSION['wpforo_notices'][$type] = array_unique($_SESSION['wpforo_notices'][$type]);
|
51 |
return TRUE;
|
52 |
}
|
53 |
|
60 |
*
|
61 |
*/
|
62 |
public function clear(){
|
63 |
+
if( wpforo_is_session_started() ){
|
64 |
+
$_SESSION['wpforo_notices'] = array();
|
65 |
return TRUE;
|
66 |
}
|
67 |
|
69 |
}
|
70 |
|
71 |
/**
|
72 |
+
* <p class="success">success msg text</p><p class="error">error msg text</p>
|
73 |
*
|
74 |
+
* @return string
|
75 |
*/
|
76 |
public function get_notices(){
|
77 |
+
$inner = '';
|
78 |
+
if(empty($_SESSION['wpforo_notices'])) return $inner;
|
79 |
+
|
80 |
+
foreach($_SESSION['wpforo_notices'] as $type => $notice){
|
81 |
+
$notice = (array) $notice;
|
82 |
+
foreach ($notice as $msg){
|
83 |
+
if( !is_array($msg) ){
|
84 |
+
$msg = trim($msg);
|
85 |
+
if($msg) $inner .= sprintf('<p class="%s">%s</p>', sanitize_html_class($type), $msg);
|
86 |
+
}
|
87 |
+
}
|
88 |
+
}
|
|
|
89 |
|
90 |
$this->clear();
|
91 |
+
return $inner;
|
92 |
}
|
93 |
|
94 |
/**
|
98 |
* @return void
|
99 |
*/
|
100 |
public function show( $frontend = TRUE ){
|
101 |
+
if(empty($_SESSION['wpforo_notices'])) return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
$inner = '';
|
103 |
+
$backend_inner = '';
|
104 |
+
foreach($_SESSION['wpforo_notices'] as $type => $notice){
|
105 |
+
$notice = (array) $notice;
|
106 |
+
foreach ($notice as $msg){
|
107 |
+
if( !is_array($msg) ){
|
108 |
+
$msg = trim($msg);
|
109 |
+
if($msg) {
|
110 |
+
$inner .= sprintf('<p class="%s">%s</p>', sanitize_html_class($type), $msg);
|
111 |
+
$backend_inner .= sprintf(
|
112 |
+
'<div class="notice is-dismissible notice-%s">
|
113 |
+
<p>%s</p>
|
114 |
+
<button type="button" class="notice-dismiss">
|
115 |
+
<span class="screen-reader-text">%s</span>
|
116 |
+
</button>
|
117 |
+
</div>',
|
118 |
+
sanitize_html_class($type), wpforo_kses($msg), __('Dismiss this notice.', 'wpforo'));
|
119 |
+
}
|
120 |
+
}
|
121 |
+
}
|
122 |
+
}
|
123 |
+
if($frontend) : ?>
|
124 |
+
<script type="text/javascript">
|
125 |
jQuery(document).ready(function($){
|
126 |
+
var msg_box = $("#wpf-msg-box");
|
127 |
+
msg_box.html("<?php echo addslashes(wpforo_kses($inner)) ?>");
|
128 |
+
msg_box.show(150).delay(1000);
|
129 |
+
setTimeout(function(){ $("#wpf-msg-box > p.error").remove(); }, 6500);
|
130 |
+
setTimeout(function(){ $("#wpf-msg-box > p.success").remove(); }, 3000);
|
|
|
|
|
|
|
|
|
131 |
});
|
132 |
</script>
|
133 |
+
<?php else :
|
134 |
+
echo $backend_inner;
|
135 |
+
endif;
|
136 |
+
|
|
|
|
|
|
|
137 |
$this->clear();
|
138 |
}
|
139 |
|
140 |
|
141 |
public function addonNote() {
|
|
|
142 |
$lastHash = get_option('wpforo-addon-note-dismissed');
|
143 |
+
$first = get_option('wpforo-addon-note-first');
|
144 |
+
if( !$lastHash ){
|
145 |
+
$hash = $this->addonHash();
|
146 |
+
update_option('wpforo-addon-note-dismissed', $hash);
|
147 |
+
update_option('wpforo-addon-note-first', 'true');
|
148 |
+
}
|
149 |
+
elseif( $lastHash || $first == 'false' ){
|
150 |
+
$lastHashArray = explode(',', $lastHash);
|
151 |
+
$currentHash = $this->addonHash();
|
152 |
+
if ($lastHash != $currentHash) {
|
153 |
+
?>
|
154 |
+
<div class="updated notice wpforo_addon_note is-dismissible" style="margin-top:10px;">
|
155 |
+
<p style="font-weight:normal; font-size:15px; border-bottom:1px dotted #DCDCDC; padding-bottom:10px; width:95%;"><strong><?php _e('New Addons for Your Forum!', 'wpforo'); ?></strong><br><span style="font-size:14px;"><?php _e('Extend your forum with wpForo addons', 'wpforo'); ?></span></p>
|
156 |
+
<div style="font-size:14px;">
|
157 |
+
<?php
|
158 |
+
foreach (WPF()->addons as $key => $addon) {
|
159 |
+
if (in_array($addon['title'], $lastHashArray))
|
160 |
+
continue;
|
161 |
+
?>
|
162 |
+
<div style="display:inline-block; min-width:27%; padding-right:10px; margin-bottom:1px;border-bottom:1px dotted #DCDCDC; border-right:1px dotted #DCDCDC; padding-bottom:10px;"><img src="<?php echo $addon['thumb'] ?>" style="height:40px; width:auto; vertical-align:middle; margin:0 10px; text-decoration:none;" /> <a href="<?php echo $addon['url'] ?>" style="text-decoration:none;" target="_blank">wpForo <?php echo $addon['title']; ?></a></div>
|
163 |
+
<?php
|
164 |
+
}
|
165 |
+
?>
|
166 |
+
<div style="clear:both;"></div>
|
167 |
+
</div>
|
168 |
+
<p> <a href="<?php echo admin_url('admin.php?page=wpforo-addons') ?>"><?php _e('View all Addons', 'wpforo'); ?> »</a></p>
|
169 |
+
</div>
|
170 |
+
<script>jQuery(document).on( 'click', '.wpforo_addon_note .notice-dismiss', function() {jQuery.ajax({url: ajaxurl, data: { action: 'dismiss_wpforo_addon_note'}})})</script>
|
171 |
+
<?php
|
172 |
+
}
|
173 |
+
}
|
174 |
}
|
175 |
|
176 |
public function dismissAddonNote() {
|
185 |
}
|
186 |
|
187 |
public function addonHash() {
|
188 |
+
$viewed = '';
|
189 |
+
foreach (WPF()->addons as $key => $addon) {
|
190 |
$viewed .= $addon['title'] . ',';
|
191 |
}
|
192 |
$hash = $viewed;
|
204 |
<?php
|
205 |
}
|
206 |
}
|
|
|
|
|
|
|
207 |
}
|
wpf-includes/class-permissions.php
CHANGED
@@ -4,21 +4,19 @@
|
|
4 |
|
5 |
|
6 |
class wpForoPermissions{
|
7 |
-
|
8 |
-
private $wpforo;
|
9 |
private $access;
|
10 |
|
11 |
static $cache = array();
|
12 |
|
13 |
-
function __construct(
|
14 |
-
if(!isset($this->wpforo)) $this->wpforo = $wpForo;
|
15 |
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
|
|
22 |
|
23 |
/**
|
24 |
*
|
@@ -31,8 +29,8 @@ class wpForoPermissions{
|
|
31 |
if( !empty($this->access[$access]) ){
|
32 |
return $this->access[$access];
|
33 |
}else{
|
34 |
-
$sql = "SELECT * FROM `"
|
35 |
-
return
|
36 |
}
|
37 |
}
|
38 |
|
@@ -43,14 +41,14 @@ class wpForoPermissions{
|
|
43 |
* @return assoc array with accesses
|
44 |
*/
|
45 |
function get_accesses(){
|
46 |
-
$sql = "SELECT * FROM "
|
47 |
-
return
|
48 |
}
|
49 |
|
50 |
function usergroup_cans_form( $groupid = FALSE ){
|
51 |
|
52 |
$can_data = array();
|
53 |
-
$cans =
|
54 |
|
55 |
if( $groupid == FALSE ){
|
56 |
foreach($cans as $can => $name){
|
@@ -58,7 +56,7 @@ class wpForoPermissions{
|
|
58 |
@$can_data[$can]['name'] = $name;
|
59 |
}
|
60 |
}else{
|
61 |
-
$usegroup =
|
62 |
$ug_cans = unserialize($usegroup['cans']);
|
63 |
foreach($cans as $can => $name){
|
64 |
@$can_data[$can]['value'] = $ug_cans[$can];
|
@@ -72,7 +70,7 @@ class wpForoPermissions{
|
|
72 |
function forum_cans_form( $access = FALSE ){
|
73 |
|
74 |
$can_data = array();
|
75 |
-
$cans =
|
76 |
|
77 |
if( !$access ){
|
78 |
foreach($cans as $can => $name){
|
@@ -101,17 +99,17 @@ class wpForoPermissions{
|
|
101 |
* @return affected rows count or false
|
102 |
*/
|
103 |
function add( $title, $cans = array(), $key = '' ){
|
104 |
-
$cans = wpforo_parse_args($cans, array_map('wpforo_return_zero',
|
105 |
if(!$key) $key = $title;
|
106 |
|
107 |
$i = 2;
|
108 |
-
while(
|
109 |
$key = $key . '-' . $i;
|
110 |
$i++;
|
111 |
}
|
112 |
|
113 |
-
if(
|
114 |
-
|
115 |
array(
|
116 |
'title' => sanitize_text_field($title),
|
117 |
'access' => sanitize_text_field($key),
|
@@ -124,19 +122,19 @@ class wpForoPermissions{
|
|
124 |
)
|
125 |
)
|
126 |
){
|
127 |
-
|
128 |
-
return
|
129 |
}
|
130 |
|
131 |
-
|
132 |
return FALSE;
|
133 |
}
|
134 |
|
135 |
function edit( $title, $cans, $key ){
|
136 |
-
$cans = wpforo_parse_args($cans, array_map('wpforo_return_zero',
|
137 |
|
138 |
-
if( FALSE !==
|
139 |
-
|
140 |
array(
|
141 |
'title' => sanitize_text_field($title),
|
142 |
'cans' => serialize( $cans ),
|
@@ -148,11 +146,11 @@ class wpForoPermissions{
|
|
148 |
),
|
149 |
array( '%s' ))
|
150 |
){
|
151 |
-
|
152 |
return $key;
|
153 |
}
|
154 |
|
155 |
-
|
156 |
return FALSE;
|
157 |
}
|
158 |
|
@@ -161,34 +159,34 @@ class wpForoPermissions{
|
|
161 |
$accessid = intval($accessid);
|
162 |
|
163 |
if(!$accessid){
|
164 |
-
|
165 |
return FALSE;
|
166 |
}
|
167 |
|
168 |
-
if( FALSE !==
|
169 |
-
|
170 |
return $accessid;
|
171 |
}
|
172 |
|
173 |
-
|
174 |
return FALSE;
|
175 |
}
|
176 |
|
177 |
function forum_can( $do, $forumid = NULL, $groupid = NULL ){
|
178 |
|
179 |
$can = 0;
|
180 |
-
if(
|
181 |
|
182 |
-
if( is_null($forumid) && isset(
|
183 |
-
$forumid =
|
184 |
}
|
185 |
$forumid = intval($forumid);
|
186 |
|
187 |
if( is_null($groupid) ) {
|
188 |
-
$groupid =
|
189 |
}
|
190 |
|
191 |
-
if( $forum =
|
192 |
$permissions = unserialize($forum['permissions']);
|
193 |
if( isset($permissions[$groupid]) ){
|
194 |
$access = $permissions[$groupid];
|
@@ -201,16 +199,16 @@ class wpForoPermissions{
|
|
201 |
}
|
202 |
|
203 |
function usergroup_can( $do, $usergroupid = NULL ){
|
204 |
-
if( is_null($usergroupid) ) $usergroupid =
|
205 |
$usergroupid = intval($usergroupid);
|
206 |
-
$usergroup =
|
207 |
$cans = unserialize($usergroup['cans']);
|
208 |
return ( isset($cans[$do]) ? $cans[$do] : 0 );
|
209 |
}
|
210 |
|
211 |
function usergroups_can( $do ){
|
212 |
$usergroupids = array();
|
213 |
-
$usergroups =
|
214 |
foreach( $usergroups as $usergroup ){
|
215 |
$cans = unserialize( $usergroup['cans'] );
|
216 |
if( isset($cans[$do]) && $cans[$do] ){
|
@@ -240,8 +238,8 @@ class wpForoPermissions{
|
|
240 |
return true;
|
241 |
}
|
242 |
elseif( (int)$user_level == (int)$managing_user_level ){
|
243 |
-
$member =
|
244 |
-
$managing_member =
|
245 |
$user_wpforo_can = $this->usergroup_can( 'em', $member['groupid'] );
|
246 |
$managing_user_wpforo_can = $this->usergroup_can( 'em', $managing_member['groupid'] );
|
247 |
if( $user_wpforo_can && !$managing_user_wpforo_can ){
|
@@ -281,11 +279,11 @@ class wpForoPermissions{
|
|
281 |
|
282 |
|
283 |
public function can_link(){
|
284 |
-
if(
|
285 |
-
$posts =
|
286 |
$posts = intval($posts);
|
287 |
-
if( isset(
|
288 |
-
$min_posts = intval(
|
289 |
if( $min_posts != 0 ){
|
290 |
if ( $posts <= $min_posts ) {
|
291 |
return false;
|
@@ -297,11 +295,11 @@ class wpForoPermissions{
|
|
297 |
}
|
298 |
|
299 |
public function can_attach(){
|
300 |
-
if(
|
301 |
-
$posts =
|
302 |
$posts = intval($posts);
|
303 |
-
if( isset(
|
304 |
-
$min_posts = intval(
|
305 |
if( $min_posts != 0 ){
|
306 |
if ( $posts <= $min_posts ) {
|
307 |
return false;
|
@@ -313,9 +311,9 @@ class wpForoPermissions{
|
|
313 |
}
|
314 |
|
315 |
public function can_attach_file_type( $ext = '' ){
|
316 |
-
if(
|
317 |
-
if( isset(
|
318 |
-
$expld = explode('|',
|
319 |
if( in_array($ext, $expld) ){
|
320 |
return false;
|
321 |
}
|
4 |
|
5 |
|
6 |
class wpForoPermissions{
|
|
|
|
|
7 |
private $access;
|
8 |
|
9 |
static $cache = array();
|
10 |
|
11 |
+
function __construct(){}
|
|
|
12 |
|
13 |
+
public function init(){
|
14 |
+
if( WPF()->is_installed() ){
|
15 |
+
if( $accesses = $this->get_accesses() ){
|
16 |
+
foreach( $accesses as $access ) $this->access[$access['access']] = $access;
|
17 |
+
}
|
18 |
+
}
|
19 |
+
}
|
20 |
|
21 |
/**
|
22 |
*
|
29 |
if( !empty($this->access[$access]) ){
|
30 |
return $this->access[$access];
|
31 |
}else{
|
32 |
+
$sql = "SELECT * FROM `".WPF()->db->prefix."wpforo_accesses` WHERE `access` = '" . esc_sql($access) . "'";
|
33 |
+
return WPF()->db->get_row($sql, ARRAY_A);
|
34 |
}
|
35 |
}
|
36 |
|
41 |
* @return assoc array with accesses
|
42 |
*/
|
43 |
function get_accesses(){
|
44 |
+
$sql = "SELECT * FROM ".WPF()->db->prefix."wpforo_accesses";
|
45 |
+
return WPF()->db->get_results($sql, ARRAY_A);
|
46 |
}
|
47 |
|
48 |
function usergroup_cans_form( $groupid = FALSE ){
|
49 |
|
50 |
$can_data = array();
|
51 |
+
$cans = WPF()->usergroup->cans;
|
52 |
|
53 |
if( $groupid == FALSE ){
|
54 |
foreach($cans as $can => $name){
|
56 |
@$can_data[$can]['name'] = $name;
|
57 |
}
|
58 |
}else{
|
59 |
+
$usegroup = WPF()->usergroup->get_usergroup( $groupid );
|
60 |
$ug_cans = unserialize($usegroup['cans']);
|
61 |
foreach($cans as $can => $name){
|
62 |
@$can_data[$can]['value'] = $ug_cans[$can];
|
70 |
function forum_cans_form( $access = FALSE ){
|
71 |
|
72 |
$can_data = array();
|
73 |
+
$cans = WPF()->forum->cans;
|
74 |
|
75 |
if( !$access ){
|
76 |
foreach($cans as $can => $name){
|
99 |
* @return affected rows count or false
|
100 |
*/
|
101 |
function add( $title, $cans = array(), $key = '' ){
|
102 |
+
$cans = wpforo_parse_args($cans, array_map('wpforo_return_zero', WPF()->forum->cans));
|
103 |
if(!$key) $key = $title;
|
104 |
|
105 |
$i = 2;
|
106 |
+
while( WPF()->db->get_var("SELECT `access` FROM ".WPF()->db->prefix."wpforo_accesses WHERE `access` = '". esc_sql(sanitize_text_field($key)) . "'") ){
|
107 |
$key = $key . '-' . $i;
|
108 |
$i++;
|
109 |
}
|
110 |
|
111 |
+
if( WPF()->db->insert(
|
112 |
+
WPF()->db->prefix . 'wpforo_accesses',
|
113 |
array(
|
114 |
'title' => sanitize_text_field($title),
|
115 |
'access' => sanitize_text_field($key),
|
122 |
)
|
123 |
)
|
124 |
){
|
125 |
+
WPF()->notice->add( sprintf( __('%s access successfully added', 'wpforo') , esc_html($title)) , 'success');
|
126 |
+
return WPF()->db->insert_id;
|
127 |
}
|
128 |
|
129 |
+
WPF()->notice->add('Access add error', 'error');
|
130 |
return FALSE;
|
131 |
}
|
132 |
|
133 |
function edit( $title, $cans, $key ){
|
134 |
+
$cans = wpforo_parse_args($cans, array_map('wpforo_return_zero', WPF()->forum->cans));
|
135 |
|
136 |
+
if( FALSE !== WPF()->db->update(
|
137 |
+
WPF()->db->prefix . 'wpforo_accesses',
|
138 |
array(
|
139 |
'title' => sanitize_text_field($title),
|
140 |
'cans' => serialize( $cans ),
|
146 |
),
|
147 |
array( '%s' ))
|
148 |
){
|
149 |
+
WPF()->notice->add( sprintf( __('%s access successfully edited', 'wpforo'), esc_html($title)) , 'success');
|
150 |
return $key;
|
151 |
}
|
152 |
|
153 |
+
WPF()->notice->add('Access edit error', 'error');
|
154 |
return FALSE;
|
155 |
}
|
156 |
|
159 |
$accessid = intval($accessid);
|
160 |
|
161 |
if(!$accessid){
|
162 |
+
WPF()->notice->add('Access delete error', 'error');
|
163 |
return FALSE;
|
164 |
}
|
165 |
|
166 |
+
if( FALSE !== WPF()->db->delete( WPF()->db->prefix.'wpforo_accesses', array( 'accessid' => $accessid ), array( '%d' ) ) ){
|
167 |
+
WPF()->notice->add('Access successfully deleted', 'success');
|
168 |
return $accessid;
|
169 |
}
|
170 |
|
171 |
+
WPF()->notice->add('Access delete error', 'error');
|
172 |
return FALSE;
|
173 |
}
|
174 |
|
175 |
function forum_can( $do, $forumid = NULL, $groupid = NULL ){
|
176 |
|
177 |
$can = 0;
|
178 |
+
if( !WPF()->current_user_groupid ) return 0;
|
179 |
|
180 |
+
if( is_null($forumid) && isset(WPF()->current_object['forumid']) ) {
|
181 |
+
$forumid = WPF()->current_object['forumid'];
|
182 |
}
|
183 |
$forumid = intval($forumid);
|
184 |
|
185 |
if( is_null($groupid) ) {
|
186 |
+
$groupid = WPF()->current_user_groupid;
|
187 |
}
|
188 |
|
189 |
+
if( $forum = WPF()->forum->get_forum($forumid) ){
|
190 |
$permissions = unserialize($forum['permissions']);
|
191 |
if( isset($permissions[$groupid]) ){
|
192 |
$access = $permissions[$groupid];
|
199 |
}
|
200 |
|
201 |
function usergroup_can( $do, $usergroupid = NULL ){
|
202 |
+
if( is_null($usergroupid) ) $usergroupid = WPF()->current_user_groupid;
|
203 |
$usergroupid = intval($usergroupid);
|
204 |
+
$usergroup = WPF()->usergroup->get_usergroup( $usergroupid );
|
205 |
$cans = unserialize($usergroup['cans']);
|
206 |
return ( isset($cans[$do]) ? $cans[$do] : 0 );
|
207 |
}
|
208 |
|
209 |
function usergroups_can( $do ){
|
210 |
$usergroupids = array();
|
211 |
+
$usergroups = WPF()->usergroup->get_usergroups();
|
212 |
foreach( $usergroups as $usergroup ){
|
213 |
$cans = unserialize( $usergroup['cans'] );
|
214 |
if( isset($cans[$do]) && $cans[$do] ){
|
238 |
return true;
|
239 |
}
|
240 |
elseif( (int)$user_level == (int)$managing_user_level ){
|
241 |
+
$member = WPF()->member->get_member( $user_id );
|
242 |
+
$managing_member = WPF()->member->get_member( $managing_user_id );
|
243 |
$user_wpforo_can = $this->usergroup_can( 'em', $member['groupid'] );
|
244 |
$managing_user_wpforo_can = $this->usergroup_can( 'em', $managing_member['groupid'] );
|
245 |
if( $user_wpforo_can && !$managing_user_wpforo_can ){
|
279 |
|
280 |
|
281 |
public function can_link(){
|
282 |
+
if( !WPF()->perm->usergroup_can( 'em' ) ){
|
283 |
+
$posts = WPF()->member->member_approved_posts( WPF()->current_userid );
|
284 |
$posts = intval($posts);
|
285 |
+
if( isset(WPF()->tools_antispam['min_number_post_to_link']) ){
|
286 |
+
$min_posts = intval(WPF()->tools_antispam['min_number_post_to_link']);
|
287 |
if( $min_posts != 0 ){
|
288 |
if ( $posts <= $min_posts ) {
|
289 |
return false;
|
295 |
}
|
296 |
|
297 |
public function can_attach(){
|
298 |
+
if( !WPF()->perm->usergroup_can( 'em' ) ){
|
299 |
+
$posts = WPF()->member->member_approved_posts( WPF()->current_userid );
|
300 |
$posts = intval($posts);
|
301 |
+
if( isset(WPF()->tools_antispam['min_number_post_to_attach']) ){
|
302 |
+
$min_posts = intval(WPF()->tools_antispam['min_number_post_to_attach']);
|
303 |
if( $min_posts != 0 ){
|
304 |
if ( $posts <= $min_posts ) {
|
305 |
return false;
|
311 |
}
|
312 |
|
313 |
public function can_attach_file_type( $ext = '' ){
|
314 |
+
if( !WPF()->perm->usergroup_can( 'em' ) ){
|
315 |
+
if( isset(WPF()->tools_antispam['limited_file_ext']) && WPF()->member->current_user_is_new() ){
|
316 |
+
$expld = explode('|', WPF()->tools_antispam['limited_file_ext'] );
|
317 |
if( in_array($ext, $expld) ){
|
318 |
return false;
|
319 |
}
|
wpf-includes/class-phrases.php
CHANGED
@@ -3,18 +3,13 @@
|
|
3 |
if( !defined( 'ABSPATH' ) ) exit;
|
4 |
|
5 |
class wpForoPhrase{
|
6 |
-
private $wpforo;
|
7 |
public $phrases;
|
8 |
|
9 |
-
function __construct(
|
10 |
-
if(!isset($this->wpforo)) $this->wpforo = $wpForo;
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
private function init_phrases(){
|
16 |
-
if( $this->wpforo->is_installed() ) {
|
17 |
-
if ( $phrases = $this->get_phrases( array('langid' => $this->wpforo->general_options['lang']) ) ) {
|
18 |
foreach ($phrases as $phrase) {
|
19 |
$this->phrases[addslashes(strtolower($phrase['phrase_key']))] = $phrase['phrase_value'];
|
20 |
}
|
@@ -28,27 +23,27 @@ class wpForoPhrase{
|
|
28 |
extract($args);
|
29 |
|
30 |
if( empty($package) ) $package = 'wpforo';
|
31 |
-
$sql =
|
32 |
(`langid`, `phrase_key`, `phrase_value`, `package`)
|
33 |
VALUES (%d, %s, %s, %s)",
|
34 |
-
|
35 |
stripslashes(esc_html($key)),
|
36 |
stripslashes(esc_html($value)),
|
37 |
stripslashes(esc_html($package)) );
|
38 |
-
if(
|
39 |
-
|
40 |
$this->clear_cache();
|
41 |
-
return
|
42 |
}
|
43 |
-
|
44 |
return FALSE;
|
45 |
}
|
46 |
|
47 |
function edit(){
|
48 |
if( !empty($_POST['phrase']['data']) && is_array($_POST['phrase']['data']) ){
|
49 |
foreach($_POST['phrase']['data'] as $key => $phrase){
|
50 |
-
|
51 |
-
|
52 |
array( 'phrase_value' => sanitize_text_field(stripslashes($phrase['title']))),
|
53 |
array( 'phraseid' => intval($key) ),
|
54 |
array( '%s' ),
|
@@ -57,24 +52,24 @@ class wpForoPhrase{
|
|
57 |
|
58 |
}
|
59 |
$this->clear_cache();
|
60 |
-
|
61 |
return TRUE;
|
62 |
}
|
63 |
|
64 |
-
|
65 |
return FALSE;
|
66 |
}
|
67 |
|
68 |
function get_wpforo_phrase($phraseid){
|
69 |
-
$sql = 'SELECT * FROM '
|
70 |
-
return
|
71 |
}
|
72 |
|
73 |
function get_phrases($args = array(), &$items_count = 0){
|
74 |
$default = array(
|
75 |
'include' => array(), // array( 2, 10, 25 )
|
76 |
'exclude' => array(), // array( 2, 10, 25 )
|
77 |
-
'langid' =>
|
78 |
'package' => array(),
|
79 |
|
80 |
'orderby' => 'phraseid',
|
@@ -101,13 +96,13 @@ class wpForoPhrase{
|
|
101 |
if(!empty($exclude)) $wheres[] = "`phraseid` NOT IN(" . implode(', ', array_map('intval', $exclude)) . ")";
|
102 |
if($langid != NULL) $wheres[] = "`langid` = " . intval($langid);
|
103 |
|
104 |
-
$sql = "SELECT * FROM `"
|
105 |
if(!empty($wheres)){
|
106 |
$sql .= " WHERE " . implode($wheres, " AND ");
|
107 |
}
|
108 |
|
109 |
$item_count_sql = preg_replace('#SELECT.+?FROM#isu', 'SELECT count(*) FROM', $sql);
|
110 |
-
if( $item_count_sql ) $items_count =
|
111 |
|
112 |
$sql .= esc_sql(" ORDER BY `$orderby` " . $order);
|
113 |
|
@@ -119,7 +114,7 @@ class wpForoPhrase{
|
|
119 |
$sql .= $row_count != '' ? esc_sql(', '.$row_count) : '';
|
120 |
|
121 |
if ( false === ( $phrases = get_transient( 'wpforo_get_phrases_' . $key ) ) ) {
|
122 |
-
$phrases =
|
123 |
set_transient( 'wpforo_get_phrases_' . $key , $phrases, 60*60*24 );
|
124 |
}
|
125 |
return get_transient( 'wpforo_get_phrases_' . $key );
|
@@ -133,7 +128,7 @@ class wpForoPhrase{
|
|
133 |
$needle = substr(sanitize_text_field($needle), 0, 60);
|
134 |
foreach($fields as $field){
|
135 |
$field = sanitize_text_field($field);
|
136 |
-
$matches =
|
137 |
$phreseids = array_merge( $phreseids, $matches );
|
138 |
}
|
139 |
return array_unique($phreseids);
|
@@ -156,29 +151,29 @@ class wpForoPhrase{
|
|
156 |
|
157 |
if( isset($vals[0]['tag']) && $vals[0]['tag'] == 'LANGUAGE' && isset($vals[0]['attributes']['LANGUAGE']) && $vals[0]['attributes']['LANGUAGE'] ){
|
158 |
|
159 |
-
$sql = "SELECT `langid` FROM `"
|
160 |
-
$langid =
|
161 |
|
162 |
if( !$langid ){
|
163 |
-
$sql = "INSERT INTO `"
|
164 |
-
if(
|
165 |
-
$langid =
|
166 |
}
|
167 |
}
|
168 |
|
169 |
if( $langid ){
|
170 |
foreach($vals as $val){
|
171 |
if( isset($val['tag']) && $val['tag'] == 'PHRASE' && isset($val['attributes']['NAME']) && trim($val['attributes']['NAME']) && isset($val['value']) && trim($val['value']) ){
|
172 |
-
$sql = "INSERT IGNORE INTO `"
|
173 |
(`phraseid`, `langid`, `phrase_key`, `phrase_value`)
|
174 |
VALUES( NULL,
|
175 |
'".esc_sql(trim($langid))."',
|
176 |
'".esc_sql(trim($val['attributes']['NAME']))."',
|
177 |
'".esc_sql(trim($val['value']))."')";
|
178 |
-
|
179 |
}
|
180 |
}
|
181 |
-
if( !isset(
|
182 |
$blogname = get_option('blogname');
|
183 |
$general_options = array(
|
184 |
'title' => $blogname . __(' Forum', 'wpforo'),
|
@@ -186,7 +181,7 @@ class wpForoPhrase{
|
|
186 |
'lang' => sanitize_text_field($langid),
|
187 |
);
|
188 |
}else{
|
189 |
-
$general_options =
|
190 |
$general_options['lang'] = sanitize_text_field($langid);
|
191 |
}
|
192 |
if( $type == 'install' ){
|
@@ -212,7 +207,7 @@ class wpForoPhrase{
|
|
212 |
|
213 |
if( $error ){
|
214 |
$error = wpforo_file_upload_error($error);
|
215 |
-
|
216 |
return FALSE;
|
217 |
}
|
218 |
|
@@ -220,18 +215,18 @@ class wpForoPhrase{
|
|
220 |
if( move_uploaded_file(sanitize_text_field($_FILES['add_lang']['tmp_name']['xml']), WPFORO_DIR . '/wpf-admin/xml/' . $xmlfile) ){
|
221 |
if($langid = $this->xml_import($xmlfile) ){
|
222 |
delete_transient( 'wpforo_get_phrases' );
|
223 |
-
|
224 |
return $langid;
|
225 |
}
|
226 |
}
|
227 |
}
|
228 |
|
229 |
-
|
230 |
return FALSE;
|
231 |
}
|
232 |
|
233 |
function get_languages(){
|
234 |
-
return
|
235 |
}
|
236 |
|
237 |
function show_lang_list(){
|
@@ -239,14 +234,14 @@ class wpForoPhrase{
|
|
239 |
if(!empty($langs)){
|
240 |
foreach($langs as $lang) :
|
241 |
extract($lang, EXTR_OVERWRITE); ?>
|
242 |
-
<option value="<?php echo esc_attr($langid) ?>"<?php if($langid ==
|
243 |
<?php
|
244 |
endforeach;
|
245 |
}
|
246 |
}
|
247 |
|
248 |
function clear_cache(){
|
249 |
-
|
250 |
}
|
251 |
|
252 |
}
|
3 |
if( !defined( 'ABSPATH' ) ) exit;
|
4 |
|
5 |
class wpForoPhrase{
|
|
|
6 |
public $phrases;
|
7 |
|
8 |
+
public function __construct(){}
|
|
|
9 |
|
10 |
+
public function init(){
|
11 |
+
if( WPF()->is_installed() ) {
|
12 |
+
if ( $phrases = $this->get_phrases( array('langid' => WPF()->general_options['lang']) ) ) {
|
|
|
|
|
|
|
13 |
foreach ($phrases as $phrase) {
|
14 |
$this->phrases[addslashes(strtolower($phrase['phrase_key']))] = $phrase['phrase_value'];
|
15 |
}
|
23 |
extract($args);
|
24 |
|
25 |
if( empty($package) ) $package = 'wpforo';
|
26 |
+
$sql = WPF()->db->prepare( "INSERT IGNORE INTO `".WPF()->db->prefix."wpforo_phrases`
|
27 |
(`langid`, `phrase_key`, `phrase_value`, `package`)
|
28 |
VALUES (%d, %s, %s, %s)",
|
29 |
+
WPF()->general_options['lang'],
|
30 |
stripslashes(esc_html($key)),
|
31 |
stripslashes(esc_html($value)),
|
32 |
stripslashes(esc_html($package)) );
|
33 |
+
if(WPF()->db->query( $sql )){
|
34 |
+
WPF()->notice->add('Phrase successfully added', 'success');
|
35 |
$this->clear_cache();
|
36 |
+
return WPF()->db->insert_id;
|
37 |
}
|
38 |
+
WPF()->notice->add('Phrase add error', 'error');
|
39 |
return FALSE;
|
40 |
}
|
41 |
|
42 |
function edit(){
|
43 |
if( !empty($_POST['phrase']['data']) && is_array($_POST['phrase']['data']) ){
|
44 |
foreach($_POST['phrase']['data'] as $key => $phrase){
|
45 |
+
WPF()->db->update(
|
46 |
+
WPF()->db->prefix . 'wpforo_phrases',
|
47 |
array( 'phrase_value' => sanitize_text_field(stripslashes($phrase['title']))),
|
48 |
array( 'phraseid' => intval($key) ),
|
49 |
array( '%s' ),
|
52 |
|
53 |
}
|
54 |
$this->clear_cache();
|
55 |
+
WPF()->notice->add('Phrase successfully updates', 'success');
|
56 |
return TRUE;
|
57 |
}
|
58 |
|
59 |
+
WPF()->notice->add('Phrase update error', 'error');
|
60 |
return FALSE;
|
61 |
}
|
62 |
|
63 |
function get_wpforo_phrase($phraseid){
|
64 |
+
$sql = 'SELECT * FROM '.WPF()->db->prefix.'wpforo_phrases WHERE `phraseid` ='.intval($phraseid);
|
65 |
+
return WPF()->db->get_row($sql, ARRAY_A);
|
66 |
}
|
67 |
|
68 |
function get_phrases($args = array(), &$items_count = 0){
|
69 |
$default = array(
|
70 |
'include' => array(), // array( 2, 10, 25 )
|
71 |
'exclude' => array(), // array( 2, 10, 25 )
|
72 |
+
'langid' => WPF()->general_options['lang'],
|
73 |
'package' => array(),
|
74 |
|
75 |
'orderby' => 'phraseid',
|
96 |
if(!empty($exclude)) $wheres[] = "`phraseid` NOT IN(" . implode(', ', array_map('intval', $exclude)) . ")";
|
97 |
if($langid != NULL) $wheres[] = "`langid` = " . intval($langid);
|
98 |
|
99 |
+
$sql = "SELECT * FROM `".WPF()->db->prefix."wpforo_phrases`";
|
100 |
if(!empty($wheres)){
|
101 |
$sql .= " WHERE " . implode($wheres, " AND ");
|
102 |
}
|
103 |
|
104 |
$item_count_sql = preg_replace('#SELECT.+?FROM#isu', 'SELECT count(*) FROM', $sql);
|
105 |
+
if( $item_count_sql ) $items_count = WPF()->db->get_var($item_count_sql);
|
106 |
|
107 |
$sql .= esc_sql(" ORDER BY `$orderby` " . $order);
|
108 |
|
114 |
$sql .= $row_count != '' ? esc_sql(', '.$row_count) : '';
|
115 |
|
116 |
if ( false === ( $phrases = get_transient( 'wpforo_get_phrases_' . $key ) ) ) {
|
117 |
+
$phrases = WPF()->db->get_results($sql, ARRAY_A);
|
118 |
set_transient( 'wpforo_get_phrases_' . $key , $phrases, 60*60*24 );
|
119 |
}
|
120 |
return get_transient( 'wpforo_get_phrases_' . $key );
|
128 |
$needle = substr(sanitize_text_field($needle), 0, 60);
|
129 |
foreach($fields as $field){
|
130 |
$field = sanitize_text_field($field);
|
131 |
+
$matches = WPF()->db->get_col( "SELECT `phraseid` FROM ".WPF()->db->prefix."wpforo_phrases WHERE `".esc_sql($field)."` LIKE '%".esc_sql($needle)."%'" );
|
132 |
$phreseids = array_merge( $phreseids, $matches );
|
133 |
}
|
134 |
return array_unique($phreseids);
|
151 |
|
152 |
if( isset($vals[0]['tag']) && $vals[0]['tag'] == 'LANGUAGE' && isset($vals[0]['attributes']['LANGUAGE']) && $vals[0]['attributes']['LANGUAGE'] ){
|
153 |
|
154 |
+
$sql = "SELECT `langid` FROM `".WPF()->db->prefix."wpforo_languages` WHERE `name` LIKE '". esc_sql(sanitize_text_field($vals[0]['attributes']['LANGUAGE'])) ."'";
|
155 |
+
$langid = WPF()->db->get_var( $sql );
|
156 |
|
157 |
if( !$langid ){
|
158 |
+
$sql = "INSERT INTO `".WPF()->db->prefix."wpforo_languages` (`name`) VALUES ( '".esc_sql(sanitize_text_field($vals[0]['attributes']['LANGUAGE']))."' )";
|
159 |
+
if( WPF()->db->query($sql) ){
|
160 |
+
$langid = WPF()->db->insert_id;
|
161 |
}
|
162 |
}
|
163 |
|
164 |
if( $langid ){
|
165 |
foreach($vals as $val){
|
166 |
if( isset($val['tag']) && $val['tag'] == 'PHRASE' && isset($val['attributes']['NAME']) && trim($val['attributes']['NAME']) && isset($val['value']) && trim($val['value']) ){
|
167 |
+
$sql = "INSERT IGNORE INTO `".WPF()->db->prefix."wpforo_phrases`
|
168 |
(`phraseid`, `langid`, `phrase_key`, `phrase_value`)
|
169 |
VALUES( NULL,
|
170 |
'".esc_sql(trim($langid))."',
|
171 |
'".esc_sql(trim($val['attributes']['NAME']))."',
|
172 |
'".esc_sql(trim($val['value']))."')";
|
173 |
+
WPF()->db->query($sql);
|
174 |
}
|
175 |
}
|
176 |
+
if( !isset(WPF()->general_options['lang']) ){
|
177 |
$blogname = get_option('blogname');
|
178 |
$general_options = array(
|
179 |
'title' => $blogname . __(' Forum', 'wpforo'),
|
181 |
'lang' => sanitize_text_field($langid),
|
182 |
);
|
183 |
}else{
|
184 |
+
$general_options = WPF()->general_options;
|
185 |
$general_options['lang'] = sanitize_text_field($langid);
|
186 |
}
|
187 |
if( $type == 'install' ){
|
207 |
|
208 |
if( $error ){
|
209 |
$error = wpforo_file_upload_error($error);
|
210 |
+
WPF()->notice->add($error, 'error');
|
211 |
return FALSE;
|
212 |
}
|
213 |
|
215 |
if( move_uploaded_file(sanitize_text_field($_FILES['add_lang']['tmp_name']['xml']), WPFORO_DIR . '/wpf-admin/xml/' . $xmlfile) ){
|
216 |
if($langid = $this->xml_import($xmlfile) ){
|
217 |
delete_transient( 'wpforo_get_phrases' );
|
218 |
+
WPF()->notice->add('New language successfully added and changed wpforo language to new language', 'success');
|
219 |
return $langid;
|
220 |
}
|
221 |
}
|
222 |
}
|
223 |
|
224 |
+
WPF()->notice->add('Can\'t add new language', 'error');
|
225 |
return FALSE;
|
226 |
}
|
227 |
|
228 |
function get_languages(){
|
229 |
+
return WPF()->db->get_results( "SELECT * FROM `".WPF()->db->prefix."wpforo_languages`", ARRAY_A );
|
230 |
}
|
231 |
|
232 |
function show_lang_list(){
|
234 |
if(!empty($langs)){
|
235 |
foreach($langs as $lang) :
|
236 |
extract($lang, EXTR_OVERWRITE); ?>
|
237 |
+
<option value="<?php echo esc_attr($langid) ?>"<?php if($langid == WPF()->general_options['lang']) echo ' selected' ?>><?php echo esc_html($name) ?></option>
|
238 |
<?php
|
239 |
endforeach;
|
240 |
}
|
241 |
}
|
242 |
|
243 |
function clear_cache(){
|
244 |
+
WPF()->db->query("DELETE FROM " . WPF()->db->prefix . "options WHERE `option_name` LIKE '%_wpforo_get_phrases_%'");
|
245 |
}
|
246 |
|
247 |
}
|
wpf-includes/class-posts.php
CHANGED
@@ -3,15 +3,12 @@
|
|
3 |
if( !defined( 'ABSPATH' ) ) exit;
|
4 |
|
5 |
class wpForoPost{
|
6 |
-
private $wpforo;
|
7 |
public $default;
|
8 |
public $options;
|
9 |
|
10 |
public static $cache = array( 'posts' => array(), 'post' => array(), 'item' => array(), 'topic_slug' => array(), 'forum_slug' => array(), 'post_url' => array() );
|
11 |
|
12 |
-
function __construct(
|
13 |
-
if(!isset($this->wpforo)) $this->wpforo = $wpForo;
|
14 |
-
|
15 |
$this->init_defaults();
|
16 |
$this->init_options();
|
17 |
}
|
@@ -26,6 +23,7 @@ class wpForoPost{
|
|
26 |
$this->default->options = array(
|
27 |
'layout_extended_intro_posts_toggle' => 1,
|
28 |
'layout_extended_intro_posts_count' => 4,
|
|
|
29 |
'topics_per_page' => 10,
|
30 |
'eot_durr' => 300,
|
31 |
'dot_durr' => 300,
|
@@ -50,26 +48,26 @@ class wpForoPost{
|
|
50 |
//This variable will be based on according CAN of guest usergroup once Guest Posing is ready
|
51 |
$guestposting = false;
|
52 |
|
53 |
-
if( empty($args) && empty($_REQUEST['post']) ){
|
54 |
if( empty($args) && !empty($_REQUEST['post']) ){ $args = $_REQUEST['post']; $args['body'] = $_REQUEST['postbody']; }
|
55 |
-
if( !isset($args['body']) || !$args['body'] ){
|
56 |
$args['name'] = (isset($args['name']) ? $args['name'] : '' );
|
57 |
$args['email'] = (isset($args['email']) ? $args['email'] : '' );
|
58 |
if( isset($args['userid']) && $args['userid'] == 0 && $args['name'] && $args['email'] ) $guestposting = true;
|
59 |
|
60 |
-
extract($args
|
61 |
|
62 |
-
if( !isset($topicid) || !$topicid ){
|
63 |
-
if( !$topic =
|
64 |
-
if( !$forum =
|
65 |
|
66 |
if( $topic['closed'] ){
|
67 |
-
|
68 |
return FALSE;
|
69 |
}
|
70 |
|
71 |
-
if( !$guestposting &&
|
72 |
-
|
73 |
return FALSE;
|
74 |
}
|
75 |
|
@@ -81,7 +79,7 @@ class wpForoPost{
|
|
81 |
$post['title'] = $title = (isset($title) ? wpforo_text( trim($title), 250, false ) : '');
|
82 |
$post['body'] = $body = ( isset($body) ? preg_replace('#</pre>[\r\n\t\s\0]*<pre>#isu', "\r\n", $body) : '' );
|
83 |
$post['created'] = $created = ( isset($created) ? $created : current_time( 'mysql', 1 ) );
|
84 |
-
$post['userid'] = $userid = ( isset($userid) ? intval($userid) :
|
85 |
|
86 |
$post = apply_filters('wpforo_add_post_data_filter', $post);
|
87 |
|
@@ -96,16 +94,16 @@ class wpForoPost{
|
|
96 |
if(isset($created)) $created = sanitize_text_field($created);
|
97 |
if(isset($userid)) $userid = intval($userid);
|
98 |
if(isset($body)) $body = wpforo_kses(trim($body), 'post');
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
|
106 |
if(
|
107 |
-
|
108 |
-
|
109 |
array(
|
110 |
'forumid' => $forumid,
|
111 |
'topicid' => $topicid,
|
@@ -115,15 +113,15 @@ class wpForoPost{
|
|
115 |
'body' => stripslashes($body),
|
116 |
'created' => $created,
|
117 |
'modified' => $created,
|
118 |
-
'status' =>
|
119 |
-
'private' =>
|
120 |
'name' => $name,
|
121 |
'email' => $email
|
122 |
),
|
123 |
array('%d','%d','%d','%d','%s','%s','%s','%s','%d','%d','%s','%s')
|
124 |
)
|
125 |
){
|
126 |
-
$postid =
|
127 |
|
128 |
$answ_incr = '';
|
129 |
$comm_incr = '';
|
@@ -135,22 +133,24 @@ class wpForoPost{
|
|
135 |
}
|
136 |
}
|
137 |
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
|
142 |
$post['postid'] = $postid;
|
|
|
|
|
143 |
$post['posturl'] = $this->get_post_url($postid);
|
144 |
|
145 |
do_action( 'wpforo_after_add_post', $post, $topic );
|
146 |
|
147 |
wpforo_clean_cache($postid, 'post', $post);
|
148 |
-
|
149 |
-
|
150 |
return $postid;
|
151 |
}
|
152 |
|
153 |
-
|
154 |
return FALSE;
|
155 |
}
|
156 |
|
@@ -165,11 +165,11 @@ class wpForoPost{
|
|
165 |
do_action( 'wpforo_start_edit_post', $args );
|
166 |
|
167 |
if( !isset($args['postid']) || !$args['postid'] || !is_numeric($args['postid']) ){
|
168 |
-
|
169 |
return FALSE;
|
170 |
}
|
171 |
$args['postid'] = intval($args['postid']);
|
172 |
-
if( !$post = $this->get_post($args['postid']) ){
|
173 |
|
174 |
$args['userid'] = $post['userid'];
|
175 |
$args['status'] = $post['status'];
|
@@ -183,10 +183,10 @@ class wpForoPost{
|
|
183 |
|
184 |
if( !$guestposting ){
|
185 |
$diff = current_time( 'timestamp', 1 ) - strtotime($post['created']);
|
186 |
-
if( !(
|
187 |
-
(
|
188 |
-
$diff <
|
189 |
-
|
190 |
return FALSE;
|
191 |
}
|
192 |
}
|
@@ -213,8 +213,8 @@ class wpForoPost{
|
|
213 |
$name = ( isset($name) ? stripslashes($name) : stripslashes($post['name']) );
|
214 |
$email = ( isset($email) ? stripslashes($email) : stripslashes($post['email']) );
|
215 |
|
216 |
-
if( FALSE !==
|
217 |
-
|
218 |
array(
|
219 |
'title' => $title,
|
220 |
'body' => $body,
|
@@ -231,11 +231,11 @@ class wpForoPost{
|
|
231 |
do_action( 'wpforo_after_edit_post', array( 'postid' => $postid, 'topicid' => $topicid, 'title' => $title, 'body' => $body, 'status' => $status, 'private' => $private, 'name' => $name, 'email' => $email) );
|
232 |
|
233 |
wpforo_clean_cache($postid, 'post', $post);
|
234 |
-
|
235 |
return $postid;
|
236 |
}
|
237 |
|
238 |
-
|
239 |
return FALSE;
|
240 |
}
|
241 |
|
@@ -258,8 +258,8 @@ class wpForoPost{
|
|
258 |
do_action('wpforo_before_delete_post', $post);
|
259 |
|
260 |
$diff = current_time( 'timestamp', 1 ) - strtotime($post['created']);
|
261 |
-
if( !(
|
262 |
-
|
263 |
return FALSE;
|
264 |
}
|
265 |
|
@@ -267,7 +267,7 @@ class wpForoPost{
|
|
267 |
$this->delete_attachments( $postid );
|
268 |
|
269 |
//Delete post
|
270 |
-
if(
|
271 |
$last_post = $this->get_posts( array('topicid' => intval($post['topicid']), 'order' => 'DESC', 'row_count' => 1) );
|
272 |
if(is_array($last_post) && !empty($last_post)){
|
273 |
$last_post = $last_post[0];
|
@@ -275,16 +275,16 @@ class wpForoPost{
|
|
275 |
$last_post = array( 'created' => '0000-00-00 00:00:00', 'userid' => 0, 'postid' => 0 );
|
276 |
}
|
277 |
|
278 |
-
|
279 |
-
|
280 |
);
|
281 |
-
|
282 |
-
|
283 |
);
|
284 |
|
285 |
$answ_incr = '';
|
286 |
$comm_incr = '';
|
287 |
-
$forum =
|
288 |
if( isset($forum['cat_layout']) && $forum['cat_layout'] == 3 ){
|
289 |
if($post['parentid']){
|
290 |
$comm_incr = ', `comments` = IF( (`comments` - 1) < 0, 0, `comments` - 1 ) ';
|
@@ -293,23 +293,23 @@ class wpForoPost{
|
|
293 |
}
|
294 |
}
|
295 |
|
296 |
-
if(
|
297 |
-
if(
|
298 |
-
if(
|
299 |
-
|
300 |
-
|
301 |
}
|
302 |
}
|
303 |
}
|
304 |
|
305 |
do_action('wpforo_after_delete_post', $post);
|
306 |
|
307 |
-
if( $post['is_first_post'] ) return
|
308 |
if( $delete_cache ) wpforo_clean_cache($postid, 'post', $post);
|
309 |
return TRUE;
|
310 |
}
|
311 |
|
312 |
-
|
313 |
return FALSE;
|
314 |
}
|
315 |
|
@@ -326,22 +326,22 @@ class wpForoPost{
|
|
326 |
function get_post($postid){
|
327 |
|
328 |
$post = array();
|
329 |
-
$cache =
|
330 |
|
331 |
if( $cache && isset(self::$cache['post'][$postid]) ){
|
332 |
return self::$cache['post'][$postid];
|
333 |
}
|
334 |
|
335 |
-
$sql = "SELECT * FROM `"
|
336 |
-
$post =
|
337 |
if(!empty($post)) $post['userid'] = intval($post['userid']);
|
338 |
|
339 |
-
if( isset($post['forumid']) && $post['forumid'] &&
|
340 |
return array();
|
341 |
}
|
342 |
|
343 |
if( isset($post['status']) && $post['status'] && !wpforo_is_owner($post['userid'])){
|
344 |
-
if( isset($post['forumid']) && $post['forumid'] &&
|
345 |
return array();
|
346 |
}
|
347 |
}
|
@@ -365,7 +365,7 @@ class wpForoPost{
|
|
365 |
*/
|
366 |
function get_posts($args = array(), &$items_count = 0){
|
367 |
|
368 |
-
$cache =
|
369 |
|
370 |
$default = array(
|
371 |
'include' => array(), // array( 2, 10, 25 )
|
@@ -382,7 +382,8 @@ class wpForoPost{
|
|
382 |
'status' => NULL, // 0 or 1 ...
|
383 |
'private' => NULL, // 0 or 1 ...
|
384 |
'email' => NULL, // example@example.com ...
|
385 |
-
'check_private' => TRUE
|
|
|
386 |
);
|
387 |
|
388 |
$args = wpforo_parse_args( $args, $default );
|
@@ -397,53 +398,40 @@ class wpForoPost{
|
|
397 |
$exclude = wpforo_parse_args( $exclude );
|
398 |
|
399 |
$wheres = array();
|
400 |
-
$table_as_prefix = '`'
|
401 |
|
402 |
if(!empty($include)) $wheres[] = $table_as_prefix . "`postid` IN(" . implode(', ', array_map('intval', $include)) . ")";
|
403 |
if(!empty($exclude)) $wheres[] = $table_as_prefix . "`postid` NOT IN(" . implode(', ', array_map('intval', $exclude)) . ")";
|
404 |
|
|
|
405 |
if(!is_null($topicid)) $wheres[] = $table_as_prefix . "`topicid` = " . intval($topicid);
|
406 |
if($parentid != -1) $wheres[] = $table_as_prefix . "`parentid` = " . intval($parentid);
|
407 |
if(!is_null($userid)) $wheres[] = $table_as_prefix . "`userid` = " . intval($userid);
|
408 |
if(!is_null($status)) $wheres[] = $table_as_prefix . "`status` = " . intval($status);
|
409 |
if(!is_null($private)) $wheres[] = $table_as_prefix . "`private` = " . intval($private);
|
410 |
if(!is_null($email)) $wheres[] = $table_as_prefix . "`email` = '" . esc_sql($email) . "' ";
|
|
|
411 |
|
412 |
if( isset($forumid) && $forumid ){
|
413 |
-
if(
|
414 |
if(!is_null($status)) $wheres[] = $table_as_prefix . " `status` = " . intval($status);
|
415 |
}
|
416 |
-
elseif( isset(
|
417 |
-
$wheres[] = " ( " . $table_as_prefix . "`status` = 0 OR (" . $table_as_prefix . "`status` = 1 AND " . $table_as_prefix . "`userid` = " .intval(
|
418 |
}
|
419 |
else{
|
420 |
$wheres[] = " " . $table_as_prefix . "`status` = 0";
|
421 |
}
|
422 |
}
|
423 |
|
424 |
-
|
425 |
-
if(
|
426 |
-
$sql
|
427 |
-
if(!empty($wheres)){
|
428 |
-
$sql .= " WHERE `".$this->wpforo->db->prefix."wpforo_posts`.`topicid` = `".$this->wpforo->db->prefix."wpforo_topics`.`topicid` " . ((!empty($wheres)) ? 'AND' : '') . " " . implode(" AND ", $wheres);
|
429 |
-
}
|
430 |
-
else{
|
431 |
-
$sql .= " WHERE `".$this->wpforo->db->prefix."wpforo_posts`.`topicid` = `".$this->wpforo->db->prefix."wpforo_topics`.`topicid` ";
|
432 |
-
}
|
433 |
-
$sql .= " ORDER BY " .$table_as_prefix . "`$orderby` " . $order;
|
434 |
-
$item_count_sql = preg_replace('#SELECT.+?FROM#isu', 'SELECT count(*) FROM', $sql);
|
435 |
}
|
436 |
-
|
437 |
-
|
438 |
-
$sql = "SELECT * FROM `".$this->wpforo->db->prefix."wpforo_posts`";
|
439 |
-
if(!empty($wheres)){
|
440 |
-
$sql .= " WHERE " . implode(" AND ", $wheres);
|
441 |
-
}
|
442 |
-
$sql .= " ORDER BY `$orderby` " . $order;
|
443 |
-
$item_count_sql = preg_replace('#SELECT.+?FROM#isu', 'SELECT count(*) FROM', $sql);
|
444 |
-
/*}*/
|
445 |
|
446 |
-
if( $item_count_sql ) $items_count =
|
447 |
|
448 |
if($row_count != NULL){
|
449 |
if($offset != NULL){
|
@@ -453,23 +441,23 @@ class wpForoPost{
|
|
453 |
}
|
454 |
}
|
455 |
|
456 |
-
if( $cache ){ $object_key = md5( $sql .
|
457 |
|
458 |
-
$posts =
|
459 |
$posts = apply_filters('wpforo_get_posts', $posts);
|
460 |
|
461 |
if( $check_private ){
|
462 |
foreach($posts as $key => $post){
|
463 |
-
if( isset($post['forumid']) &&
|
464 |
unset($posts[$key]);
|
465 |
}
|
466 |
if( isset($posts[$key]) && isset($post['forumid']) && isset($post['private']) && $post['private'] && !wpforo_is_owner($post['userid']) ){
|
467 |
-
if(
|
468 |
unset($posts[$key]);
|
469 |
}
|
470 |
}
|
471 |
if( isset($posts[$key]) && isset($post['forumid']) && isset($post['status']) && $post['status'] && !wpforo_is_owner($post['userid']) ){
|
472 |
-
if(
|
473 |
unset($posts[$key]);
|
474 |
}
|
475 |
}
|
@@ -489,16 +477,16 @@ class wpForoPost{
|
|
489 |
$posts = $this->get_posts( $args );
|
490 |
if( !empty($posts) ){
|
491 |
foreach($posts as $key => $post){
|
492 |
-
if( isset($post['forumid']) &&
|
493 |
unset($posts[$key]);
|
494 |
}
|
495 |
if( isset($posts[$key]) && isset($post['forumid']) && isset($post['private']) && $post['private'] && !wpforo_is_owner($post['userid']) ){
|
496 |
-
if(
|
497 |
unset($posts[$key]);
|
498 |
}
|
499 |
}
|
500 |
if( isset($posts[$key]) && isset($post['forumid']) && isset($post['status']) && $post['status'] && !wpforo_is_owner($post['userid']) ){
|
501 |
-
if(
|
502 |
unset($posts[$key]);
|
503 |
}
|
504 |
}
|
@@ -530,7 +518,7 @@ class wpForoPost{
|
|
530 |
$date_period = intval($date_period);
|
531 |
|
532 |
$selects = array('p.`postid`', 't.`topicid`', 't.`private`', 't.`status`', 't.`forumid`', 'p.`userid`', 't.`title`', 'p.`created`', 'p.`body`' );
|
533 |
-
$innerjoins = array('INNER JOIN `'
|
534 |
$wheres = array();
|
535 |
$orders = array();
|
536 |
|
@@ -556,7 +544,7 @@ class wpForoPost{
|
|
556 |
$orders[] = "MATCH(t.`title`) AGAINST('$needle') + MATCH(p.`title`) AGAINST('$needle')";
|
557 |
$orders[] = "MATCH(t.`title`) AGAINST('$needle' IN BOOLEAN MODE) + MATCH(p.`title`) AGAINST('$needle' IN BOOLEAN MODE)";
|
558 |
}elseif($type == 'user-posts' || $type == 'user-topics'){
|
559 |
-
$innerjoins[] = "INNER JOIN `"
|
560 |
$wheres[] = "( u.`user_login` LIKE '$needle' OR u.`user_email` LIKE '$needle' OR u.`display_name` LIKE '$needle' )";
|
561 |
if($type == 'user-topics') $wheres[] = "`is_first_post` = 1";
|
562 |
}
|
@@ -570,11 +558,11 @@ class wpForoPost{
|
|
570 |
$orders = array('t.`forumid`');
|
571 |
}
|
572 |
|
573 |
-
$sql = "SELECT COUNT(p.`postid`) FROM `"
|
574 |
if(!empty($wheres)) $sql .= " WHERE " . implode( " AND ", $wheres );
|
575 |
-
$items_count =
|
576 |
|
577 |
-
$sql = "SELECT ".implode(', ', $selects)." FROM `"
|
578 |
if(!empty($wheres)) $sql .= " WHERE " . implode( " AND ", $wheres );
|
579 |
if(!empty($orders)) $sql .= " ORDER BY ".implode(' '.strtoupper($order).', ', $orders)." ".strtoupper($order);
|
580 |
|
@@ -586,11 +574,11 @@ class wpForoPost{
|
|
586 |
}
|
587 |
}
|
588 |
|
589 |
-
$posts =
|
590 |
foreach($posts as $key => $post){
|
591 |
-
if(
|
592 |
-
if( $post['private'] &&
|
593 |
-
if( $post['status'] &&
|
594 |
}
|
595 |
return $posts;
|
596 |
}else{
|
@@ -610,7 +598,7 @@ class wpForoPost{
|
|
610 |
* @return int
|
611 |
*/
|
612 |
function get_post_likes_count($postid){
|
613 |
-
return
|
614 |
}
|
615 |
|
616 |
/**
|
@@ -625,7 +613,7 @@ class wpForoPost{
|
|
625 |
* @return array
|
626 |
*/
|
627 |
function get_likers_usernames($postid){
|
628 |
-
return
|
629 |
}
|
630 |
|
631 |
/**
|
@@ -638,7 +626,7 @@ class wpForoPost{
|
|
638 |
* @return null or like id
|
639 |
*/
|
640 |
function is_liked($postid, $userid){
|
641 |
-
$returned_value =
|
642 |
if(is_null($returned_value)){
|
643 |
return FALSE;
|
644 |
}else{
|
@@ -658,7 +646,7 @@ class wpForoPost{
|
|
658 |
* @return int
|
659 |
*/
|
660 |
function get_post_votes_sum($postid){
|
661 |
-
$sum =
|
662 |
if($sum == null){
|
663 |
$sum = 0;
|
664 |
}
|
@@ -680,13 +668,13 @@ class wpForoPost{
|
|
680 |
|
681 |
function get_forumslug_byid($postid){
|
682 |
|
683 |
-
$cache =
|
684 |
|
685 |
if( $cache && isset(self::$cache['forum_slug'][$postid]) ){
|
686 |
return self::$cache['forum_slug'][$postid];
|
687 |
}
|
688 |
|
689 |
-
$slug =
|
690 |
|
691 |
if($cache && isset($postid)){
|
692 |
self::$cache['forum_slug'][$postid] = $slug;
|
@@ -714,13 +702,13 @@ class wpForoPost{
|
|
714 |
|
715 |
function get_topicslug_byid( $postid ){
|
716 |
|
717 |
-
$cache =
|
718 |
|
719 |
if( $cache && isset(self::$cache['topic_slug'][$postid]) ){
|
720 |
return self::$cache['topic_slug'][$postid];
|
721 |
}
|
722 |
|
723 |
-
$slug =
|
724 |
|
725 |
if($cache && isset($postid)){
|
726 |
self::$cache['topic_slug'][$postid] = $slug;
|
@@ -758,10 +746,10 @@ class wpForoPost{
|
|
758 |
if( is_array($post) && !empty($post) && $postid ){
|
759 |
$url = $this->get_forumslug_byid($postid) . '/' . $this->get_topicslug_byid($postid);
|
760 |
if( $post['topicid'] ){
|
761 |
-
if( !$position ) $position =
|
762 |
-
if( $position <=
|
763 |
-
if( $position &&
|
764 |
-
$paged = ceil($position /
|
765 |
}
|
766 |
else{
|
767 |
$paged = 1;
|
@@ -782,9 +770,9 @@ class wpForoPost{
|
|
782 |
* @param int $postid
|
783 |
*/
|
784 |
function is_answered( $postid ){
|
785 |
-
$is_answered =
|
786 |
" SELECT is_answer
|
787 |
-
FROM `"
|
788 |
WHERE postid = %d
|
789 |
",
|
790 |
intval($postid)
|
@@ -793,27 +781,27 @@ class wpForoPost{
|
|
793 |
}
|
794 |
|
795 |
function is_approved( $postid ){
|
796 |
-
$post =
|
797 |
if( $post ) return FALSE;
|
798 |
return TRUE;
|
799 |
}
|
800 |
|
801 |
function get_count( $args = array() ){
|
802 |
-
$sql = "SELECT COUNT(`postid`) FROM `"
|
803 |
if( !empty($args) ){
|
804 |
$wheres = array();
|
805 |
foreach ($args as $key => $value) $wheres[] = "`$key` = " . intval($value);
|
806 |
if($wheres) $sql .= " WHERE " . implode(' AND ', $wheres);
|
807 |
}
|
808 |
-
return
|
809 |
}
|
810 |
|
811 |
function unapproved_count(){
|
812 |
-
return
|
813 |
}
|
814 |
|
815 |
function get_attachment_id( $filename ){
|
816 |
-
$attach_id =
|
817 |
return $attach_id;
|
818 |
}
|
819 |
|
@@ -827,7 +815,7 @@ class wpForoPost{
|
|
827 |
$filename = trim($attachment[1]);
|
828 |
$file = $default_attachments_dir . $filename;
|
829 |
if( file_exists($file) ){
|
830 |
-
$posts =
|
831 |
if( is_numeric($posts) && $posts == 1 ){
|
832 |
$attachmentid = $this->get_attachment_id( '/' . $filename );
|
833 |
if ( !wp_delete_attachment( $attachmentid ) ){
|
@@ -844,20 +832,20 @@ class wpForoPost{
|
|
844 |
if( !$postid = wpforo_bigintval($postid) ) return false;
|
845 |
if( !$post = $this->get_post($postid) ) return false;
|
846 |
|
847 |
-
if( $post['is_first_post'] ) return
|
848 |
|
849 |
-
if( false !==
|
850 |
-
|
851 |
array( 'status' => intval($status) ),
|
852 |
array( 'postid' => $postid ),
|
853 |
array( '%d' ),
|
854 |
array( '%d' )
|
855 |
)){
|
856 |
-
|
857 |
return true;
|
858 |
}
|
859 |
|
860 |
-
|
861 |
return false;
|
862 |
}
|
863 |
}
|
3 |
if( !defined( 'ABSPATH' ) ) exit;
|
4 |
|
5 |
class wpForoPost{
|
|
|
6 |
public $default;
|
7 |
public $options;
|
8 |
|
9 |
public static $cache = array( 'posts' => array(), 'post' => array(), 'item' => array(), 'topic_slug' => array(), 'forum_slug' => array(), 'post_url' => array() );
|
10 |
|
11 |
+
function __construct(){
|
|
|
|
|
12 |
$this->init_defaults();
|
13 |
$this->init_options();
|
14 |
}
|
23 |
$this->default->options = array(
|
24 |
'layout_extended_intro_posts_toggle' => 1,
|
25 |
'layout_extended_intro_posts_count' => 4,
|
26 |
+
'layout_extended_intro_posts_length' => 50,
|
27 |
'topics_per_page' => 10,
|
28 |
'eot_durr' => 300,
|
29 |
'dot_durr' => 300,
|
48 |
//This variable will be based on according CAN of guest usergroup once Guest Posing is ready
|
49 |
$guestposting = false;
|
50 |
|
51 |
+
if( empty($args) && empty($_REQUEST['post']) ){ WPF()->notice->add('Reply request error', 'error'); return FALSE; }
|
52 |
if( empty($args) && !empty($_REQUEST['post']) ){ $args = $_REQUEST['post']; $args['body'] = $_REQUEST['postbody']; }
|
53 |
+
if( !isset($args['body']) || !$args['body'] ){ WPF()->notice->add('Post is empty', 'error'); return FALSE; }
|
54 |
$args['name'] = (isset($args['name']) ? $args['name'] : '' );
|
55 |
$args['email'] = (isset($args['email']) ? $args['email'] : '' );
|
56 |
if( isset($args['userid']) && $args['userid'] == 0 && $args['name'] && $args['email'] ) $guestposting = true;
|
57 |
|
58 |
+
extract($args);
|
59 |
|
60 |
+
if( !isset($topicid) || !$topicid ){ WPF()->notice->add('Error: No topic selected', 'error'); return FALSE; }
|
61 |
+
if( !$topic = WPF()->topic->get_topic(intval($topicid)) ){ WPF()->notice->add('Error: Topic is not found', 'error'); return FALSE; }
|
62 |
+
if( !$forum = WPF()->forum->get_forum(intval($topic['forumid'])) ){ WPF()->notice->add('Error: Forum is not found', 'error'); return FALSE; }
|
63 |
|
64 |
if( $topic['closed'] ){
|
65 |
+
WPF()->notice->add('Can\'t write a post: This topic is closed', 'error');
|
66 |
return FALSE;
|
67 |
}
|
68 |
|
69 |
+
if( !$guestposting && !WPF()->perm->forum_can('cr', $topic['forumid']) ){
|
70 |
+
WPF()->notice->add('You haven\'t permission to create post into this forum', 'error');
|
71 |
return FALSE;
|
72 |
}
|
73 |
|
79 |
$post['title'] = $title = (isset($title) ? wpforo_text( trim($title), 250, false ) : '');
|
80 |
$post['body'] = $body = ( isset($body) ? preg_replace('#</pre>[\r\n\t\s\0]*<pre>#isu', "\r\n", $body) : '' );
|
81 |
$post['created'] = $created = ( isset($created) ? $created : current_time( 'mysql', 1 ) );
|
82 |
+
$post['userid'] = $userid = ( isset($userid) ? intval($userid) : WPF()->current_userid );
|
83 |
|
84 |
$post = apply_filters('wpforo_add_post_data_filter', $post);
|
85 |
|
94 |
if(isset($created)) $created = sanitize_text_field($created);
|
95 |
if(isset($userid)) $userid = intval($userid);
|
96 |
if(isset($body)) $body = wpforo_kses(trim($body), 'post');
|
97 |
+
$status = ( isset($status) && $status ? 1 : 0 );
|
98 |
+
$private = ( isset($topic['private']) && $topic['private'] ? 1 : 0 );
|
99 |
+
if(isset($name)) $name = strip_tags(trim($name));
|
100 |
+
if(isset($email)) $email = strip_tags(trim($email));
|
101 |
+
|
102 |
+
do_action( 'wpforo_before_add_post', $post );
|
103 |
|
104 |
if(
|
105 |
+
WPF()->db->insert(
|
106 |
+
WPF()->db->prefix . 'wpforo_posts',
|
107 |
array(
|
108 |
'forumid' => $forumid,
|
109 |
'topicid' => $topicid,
|
113 |
'body' => stripslashes($body),
|
114 |
'created' => $created,
|
115 |
'modified' => $created,
|
116 |
+
'status' => $status,
|
117 |
+
'private' => $private,
|
118 |
'name' => $name,
|
119 |
'email' => $email
|
120 |
),
|
121 |
array('%d','%d','%d','%d','%s','%s','%s','%s','%d','%d','%s','%s')
|
122 |
)
|
123 |
){
|
124 |
+
$postid = WPF()->db->insert_id;
|
125 |
|
126 |
$answ_incr = '';
|
127 |
$comm_incr = '';
|
133 |
}
|
134 |
}
|
135 |
|
136 |
+
WPF()->db->query( "UPDATE `" . WPF()->db->prefix . "wpforo_forums` SET `last_topicid` = ". intval($topicid) .", `last_postid` = ". intval($postid) .", `last_post_date` = '".esc_sql($created)."', `last_userid` = " . intval($userid) . ", `posts` = `posts` + 1 WHERE `forumid` = " . intval($topic['forumid']) );
|
137 |
+
WPF()->db->query( "UPDATE `" . WPF()->db->prefix . "wpforo_topics` SET `modified` = '" . esc_sql($created) . "', `last_post` = ". intval($postid) .", `posts` = `posts` + 1 $answ_incr WHERE `topicid` = " . intval($topicid) );
|
138 |
+
WPF()->db->query( "UPDATE `" . WPF()->db->prefix . "wpforo_profiles` SET `posts` = `posts` + 1 $answ_incr $comm_incr WHERE `userid` = " . intval($userid) );
|
139 |
|
140 |
$post['postid'] = $postid;
|
141 |
+
$post['status'] = $status;
|
142 |
+
$post['private'] = $private;
|
143 |
$post['posturl'] = $this->get_post_url($postid);
|
144 |
|
145 |
do_action( 'wpforo_after_add_post', $post, $topic );
|
146 |
|
147 |
wpforo_clean_cache($postid, 'post', $post);
|
148 |
+
WPF()->member->reset($userid);
|
149 |
+
WPF()->notice->add('You successfully replied', 'success');
|
150 |
return $postid;
|
151 |
}
|
152 |
|
153 |
+
WPF()->notice->add('Reply request error', 'error');
|
154 |
return FALSE;
|
155 |
}
|
156 |
|
165 |
do_action( 'wpforo_start_edit_post', $args );
|
166 |
|
167 |
if( !isset($args['postid']) || !$args['postid'] || !is_numeric($args['postid']) ){
|
168 |
+
WPF()->notice->add('Cannot update post data', 'error');
|
169 |
return FALSE;
|
170 |
}
|
171 |
$args['postid'] = intval($args['postid']);
|
172 |
+
if( !$post = $this->get_post($args['postid']) ){ WPF()->notice->add('No Posts found for update', 'error'); return FALSE; }
|
173 |
|
174 |
$args['userid'] = $post['userid'];
|
175 |
$args['status'] = $post['status'];
|
183 |
|
184 |
if( !$guestposting ){
|
185 |
$diff = current_time( 'timestamp', 1 ) - strtotime($post['created']);
|
186 |
+
if( !(WPF()->perm->forum_can('er', $post['forumid']) ||
|
187 |
+
(WPF()->current_userid == $post['userid'] && WPF()->perm->forum_can('eor', $post['forumid']) &&
|
188 |
+
$diff < WPF()->post->options['eor_durr'])) ){
|
189 |
+
WPF()->notice->add('You haven\'t permission to edit post from this forum', 'error');
|
190 |
return FALSE;
|
191 |
}
|
192 |
}
|
213 |
$name = ( isset($name) ? stripslashes($name) : stripslashes($post['name']) );
|
214 |
$email = ( isset($email) ? stripslashes($email) : stripslashes($post['email']) );
|
215 |
|
216 |
+
if( FALSE !== WPF()->db->update(
|
217 |
+
WPF()->db->prefix."wpforo_posts",
|
218 |
array(
|
219 |
'title' => $title,
|
220 |
'body' => $body,
|
231 |
do_action( 'wpforo_after_edit_post', array( 'postid' => $postid, 'topicid' => $topicid, 'title' => $title, 'body' => $body, 'status' => $status, 'private' => $private, 'name' => $name, 'email' => $email) );
|
232 |
|
233 |
wpforo_clean_cache($postid, 'post', $post);
|
234 |
+
WPF()->notice->add('This post successfully edited', 'success');
|
235 |
return $postid;
|
236 |
}
|
237 |
|
238 |
+
WPF()->notice->add('Reply request error', 'error');
|
239 |
return FALSE;
|
240 |
}
|
241 |
|
258 |
do_action('wpforo_before_delete_post', $post);
|
259 |
|
260 |
$diff = current_time( 'timestamp', 1 ) - strtotime($post['created']);
|
261 |
+
if( !(WPF()->perm->forum_can('dr', $post['forumid']) || (WPF()->current_userid == $post['userid'] && WPF()->perm->forum_can('dor', $post['forumid']) && $diff < WPF()->post->options['dor_durr'])) ){
|
262 |
+
WPF()->notice->add('You haven\'t permission to delete post from this forum', 'error');
|
263 |
return FALSE;
|
264 |
}
|
265 |
|
267 |
$this->delete_attachments( $postid );
|
268 |
|
269 |
//Delete post
|
270 |
+
if( WPF()->db->delete(WPF()->db->prefix . 'wpforo_posts', array( 'postid' => intval($postid) ), array( '%d' )) ){
|
271 |
$last_post = $this->get_posts( array('topicid' => intval($post['topicid']), 'order' => 'DESC', 'row_count' => 1) );
|
272 |
if(is_array($last_post) && !empty($last_post)){
|
273 |
$last_post = $last_post[0];
|
275 |
$last_post = array( 'created' => '0000-00-00 00:00:00', 'userid' => 0, 'postid' => 0 );
|
276 |
}
|
277 |
|
278 |
+
WPF()->db->delete(
|
279 |
+
WPF()->db->prefix.'wpforo_likes', array( 'postid' => $postid ), array( '%d' )
|
280 |
);
|
281 |
+
WPF()->db->delete(
|
282 |
+
WPF()->db->prefix.'wpforo_votes', array( 'postid' => $postid ), array( '%d' )
|
283 |
);
|
284 |
|
285 |
$answ_incr = '';
|
286 |
$comm_incr = '';
|
287 |
+
$forum = WPF()->forum->get_forum($post['forumid']);
|
288 |
if( isset($forum['cat_layout']) && $forum['cat_layout'] == 3 ){
|
289 |
if($post['parentid']){
|
290 |
$comm_incr = ', `comments` = IF( (`comments` - 1) < 0, 0, `comments` - 1 ) ';
|
293 |
}
|
294 |
}
|
295 |
|
296 |
+
if(WPF()->db->query( "UPDATE IGNORE " . WPF()->db->prefix . "wpforo_topics SET `last_post` = " . intval($last_post['postid']) . ", `posts` = IF( (`posts` - 1) < 0, 0, `posts` - 1 ) $answ_incr WHERE `topicid` = " . intval( $post['topicid'] ))){
|
297 |
+
if( WPF()->db->query( "UPDATE IGNORE `" . WPF()->db->prefix . "wpforo_forums` SET `last_post_date` = '" . esc_sql($last_post['created']) . "', `last_userid` = " . intval($last_post['userid']) . ", `last_postid` = " . intval($last_post['postid']) . ", `posts` = IF( (`posts` - 1) < 0, 0, `posts` - 1 ) WHERE `forumid` = " . intval( $post['forumid'] ))){
|
298 |
+
if( WPF()->db->query( "UPDATE IGNORE `" . WPF()->db->prefix . "wpforo_profiles` SET `posts` = IF( (`posts` - 1) < 0, 0, `posts` - 1 ) $answ_incr $comm_incr WHERE `userid` = " . intval($post['userid']) ) ){
|
299 |
+
WPF()->member->reset($post['userid']);
|
300 |
+
WPF()->notice->add('This post successfully deleted', 'success');
|
301 |
}
|
302 |
}
|
303 |
}
|
304 |
|
305 |
do_action('wpforo_after_delete_post', $post);
|
306 |
|
307 |
+
if( $post['is_first_post'] ) return WPF()->topic->delete($post['topicid']);
|
308 |
if( $delete_cache ) wpforo_clean_cache($postid, 'post', $post);
|
309 |
return TRUE;
|
310 |
}
|
311 |
|
312 |
+
WPF()->notice->add('Post delete error', 'error');
|
313 |
return FALSE;
|
314 |
}
|
315 |
|
326 |
function get_post($postid){
|
327 |
|
328 |
$post = array();
|
329 |
+
$cache = WPF()->cache->on('memory_cashe');
|
330 |
|
331 |
if( $cache && isset(self::$cache['post'][$postid]) ){
|
332 |
return self::$cache['post'][$postid];
|
333 |
}
|
334 |
|
335 |
+
$sql = "SELECT * FROM `".WPF()->db->prefix."wpforo_posts` WHERE `postid` = " . intval($postid);
|
336 |
+
$post = WPF()->db->get_row($sql, ARRAY_A);
|
337 |
if(!empty($post)) $post['userid'] = intval($post['userid']);
|
338 |
|
339 |
+
if( isset($post['forumid']) && $post['forumid'] && !WPF()->perm->forum_can('vf', $post['forumid']) ){
|
340 |
return array();
|
341 |
}
|
342 |
|
343 |
if( isset($post['status']) && $post['status'] && !wpforo_is_owner($post['userid'])){
|
344 |
+
if( isset($post['forumid']) && $post['forumid'] && !WPF()->perm->forum_can('au', $post['forumid']) ){
|
345 |
return array();
|
346 |
}
|
347 |
}
|
365 |
*/
|
366 |
function get_posts($args = array(), &$items_count = 0){
|
367 |
|
368 |
+
$cache = WPF()->cache->on('object_cashe');
|
369 |
|
370 |
$default = array(
|
371 |
'include' => array(), // array( 2, 10, 25 )
|
382 |
'status' => NULL, // 0 or 1 ...
|
383 |
'private' => NULL, // 0 or 1 ...
|
384 |
'email' => NULL, // example@example.com ...
|
385 |
+
'check_private' => TRUE,
|
386 |
+
'where' => NULL,
|
387 |
);
|
388 |
|
389 |
$args = wpforo_parse_args( $args, $default );
|
398 |
$exclude = wpforo_parse_args( $exclude );
|
399 |
|
400 |
$wheres = array();
|
401 |
+
$table_as_prefix = '`'.WPF()->db->prefix.'wpforo_posts`.';
|
402 |
|
403 |
if(!empty($include)) $wheres[] = $table_as_prefix . "`postid` IN(" . implode(', ', array_map('intval', $include)) . ")";
|
404 |
if(!empty($exclude)) $wheres[] = $table_as_prefix . "`postid` NOT IN(" . implode(', ', array_map('intval', $exclude)) . ")";
|
405 |
|
406 |
+
|
407 |
if(!is_null($topicid)) $wheres[] = $table_as_prefix . "`topicid` = " . intval($topicid);
|
408 |
if($parentid != -1) $wheres[] = $table_as_prefix . "`parentid` = " . intval($parentid);
|
409 |
if(!is_null($userid)) $wheres[] = $table_as_prefix . "`userid` = " . intval($userid);
|
410 |
if(!is_null($status)) $wheres[] = $table_as_prefix . "`status` = " . intval($status);
|
411 |
if(!is_null($private)) $wheres[] = $table_as_prefix . "`private` = " . intval($private);
|
412 |
if(!is_null($email)) $wheres[] = $table_as_prefix . "`email` = '" . esc_sql($email) . "' ";
|
413 |
+
if(!is_null($where)) $wheres[] = $table_as_prefix . $where;
|
414 |
|
415 |
if( isset($forumid) && $forumid ){
|
416 |
+
if( WPF()->perm->forum_can('au', $forumid) ){
|
417 |
if(!is_null($status)) $wheres[] = $table_as_prefix . " `status` = " . intval($status);
|
418 |
}
|
419 |
+
elseif( isset(WPF()->current_userid) && WPF()->current_userid ){
|
420 |
+
$wheres[] = " ( " . $table_as_prefix . "`status` = 0 OR (" . $table_as_prefix . "`status` = 1 AND " . $table_as_prefix . "`userid` = " .intval(WPF()->current_userid). ") )";
|
421 |
}
|
422 |
else{
|
423 |
$wheres[] = " " . $table_as_prefix . "`status` = 0";
|
424 |
}
|
425 |
}
|
426 |
|
427 |
+
$sql = "SELECT * FROM `".WPF()->db->prefix."wpforo_posts`";
|
428 |
+
if(!empty($wheres)){
|
429 |
+
$sql .= " WHERE " . implode(" AND ", $wheres);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
430 |
}
|
431 |
+
$sql .= " ORDER BY `$orderby` " . $order;
|
432 |
+
$item_count_sql = preg_replace('#SELECT.+?FROM#isu', 'SELECT count(*) FROM', $sql);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
433 |
|
434 |
+
if( $item_count_sql ) $items_count = WPF()->db->get_var($item_count_sql);
|
435 |
|
436 |
if($row_count != NULL){
|
437 |
if($offset != NULL){
|
441 |
}
|
442 |
}
|
443 |
|
444 |
+
if( $cache ){ $object_key = md5( $sql . WPF()->current_user_groupid ); $object_cache = WPF()->cache->get($object_key); if(!empty($object_cache)){ $items_count = $object_cache['items_count']; return $object_cache['items']; }}
|
445 |
|
446 |
+
$posts = WPF()->db->get_results($sql, ARRAY_A);
|
447 |
$posts = apply_filters('wpforo_get_posts', $posts);
|
448 |
|
449 |
if( $check_private ){
|
450 |
foreach($posts as $key => $post){
|
451 |
+
if( isset($post['forumid']) && !WPF()->perm->forum_can('vf', $post['forumid']) ){
|
452 |
unset($posts[$key]);
|
453 |
}
|
454 |
if( isset($posts[$key]) && isset($post['forumid']) && isset($post['private']) && $post['private'] && !wpforo_is_owner($post['userid']) ){
|
455 |
+
if( !WPF()->perm->forum_can('vp', $post['forumid']) ){
|
456 |
unset($posts[$key]);
|
457 |
}
|
458 |
}
|
459 |
if( isset($posts[$key]) && isset($post['forumid']) && isset($post['status']) && $post['status'] && !wpforo_is_owner($post['userid']) ){
|
460 |
+
if( !WPF()->perm->forum_can('au', $post['forumid']) ){
|
461 |
unset($posts[$key]);
|
462 |
}
|
463 |
}
|
477 |
$posts = $this->get_posts( $args );
|
478 |
if( !empty($posts) ){
|
479 |
foreach($posts as $key => $post){
|
480 |
+
if( isset($post['forumid']) && !WPF()->perm->forum_can('vf', $post['forumid']) ){
|
481 |
unset($posts[$key]);
|
482 |
}
|
483 |
if( isset($posts[$key]) && isset($post['forumid']) && isset($post['private']) && $post['private'] && !wpforo_is_owner($post['userid']) ){
|
484 |
+
if( !WPF()->perm->forum_can('vp', $post['forumid']) ){
|
485 |
unset($posts[$key]);
|
486 |
}
|
487 |
}
|
488 |
if( isset($posts[$key]) && isset($post['forumid']) && isset($post['status']) && $post['status'] && !wpforo_is_owner($post['userid']) ){
|
489 |
+
if( !WPF()->perm->forum_can('au', $post['forumid']) ){
|
490 |
unset($posts[$key]);
|
491 |
}
|
492 |
}
|
518 |
$date_period = intval($date_period);
|
519 |
|
520 |
$selects = array('p.`postid`', 't.`topicid`', 't.`private`', 't.`status`', 't.`forumid`', 'p.`userid`', 't.`title`', 'p.`created`', 'p.`body`' );
|
521 |
+
$innerjoins = array('INNER JOIN `'.WPF()->db->prefix.'wpforo_topics` t ON t.`topicid` = p.`topicid`');
|
522 |
$wheres = array();
|
523 |
$orders = array();
|
524 |
|
544 |
$orders[] = "MATCH(t.`title`) AGAINST('$needle') + MATCH(p.`title`) AGAINST('$needle')";
|
545 |
$orders[] = "MATCH(t.`title`) AGAINST('$needle' IN BOOLEAN MODE) + MATCH(p.`title`) AGAINST('$needle' IN BOOLEAN MODE)";
|
546 |
}elseif($type == 'user-posts' || $type == 'user-topics'){
|
547 |
+
$innerjoins[] = "INNER JOIN `".WPF()->db->base_prefix."users` u ON u.`ID` = p.`userid`";
|
548 |
$wheres[] = "( u.`user_login` LIKE '$needle' OR u.`user_email` LIKE '$needle' OR u.`display_name` LIKE '$needle' )";
|
549 |
if($type == 'user-topics') $wheres[] = "`is_first_post` = 1";
|
550 |
}
|
558 |
$orders = array('t.`forumid`');
|
559 |
}
|
560 |
|
561 |
+
$sql = "SELECT COUNT(p.`postid`) FROM `".WPF()->db->prefix."wpforo_posts` p ".implode(' ', $innerjoins);
|
562 |
if(!empty($wheres)) $sql .= " WHERE " . implode( " AND ", $wheres );
|
563 |
+
$items_count = WPF()->db->get_var($sql);
|
564 |
|
565 |
+
$sql = "SELECT ".implode(', ', $selects)." FROM `".WPF()->db->prefix."wpforo_posts` p ".implode(' ', $innerjoins);
|
566 |
if(!empty($wheres)) $sql .= " WHERE " . implode( " AND ", $wheres );
|
567 |
if(!empty($orders)) $sql .= " ORDER BY ".implode(' '.strtoupper($order).', ', $orders)." ".strtoupper($order);
|
568 |
|
574 |
}
|
575 |
}
|
576 |
|
577 |
+
$posts = WPF()->db->get_results($sql, ARRAY_A);
|
578 |
foreach($posts as $key => $post){
|
579 |
+
if( !WPF()->perm->forum_can( 'vf', $post['forumid'] ) ) unset($posts[$key]);
|
580 |
+
if( $post['private'] && !WPF()->perm->forum_can( 'vp', $post['forumid'] ) ) unset($posts[$key]);
|
581 |
+
if( $post['status'] && !WPF()->perm->forum_can( 'au', $post['forumid'] ) ) unset($posts[$key]);
|
582 |
}
|
583 |
return $posts;
|
584 |
}else{
|
598 |
* @return int
|
599 |
*/
|
600 |
function get_post_likes_count($postid){
|
601 |
+
return WPF()->db->get_var("SELECT COUNT(l.`likeid`) FROM `".WPF()->db->prefix."wpforo_likes` l, `".WPF()->db->base_prefix."users` u WHERE `l`.`userid` = `u`.ID AND `l`.`postid` = ".intval($postid) );
|
602 |
}
|
603 |
|
604 |
/**
|
613 |
* @return array
|
614 |
*/
|
615 |
function get_likers_usernames($postid){
|
616 |
+
return WPF()->db->get_results("SELECT u.ID, u.display_name FROM `".WPF()->db->prefix."wpforo_likes` l, `".WPF()->db->base_prefix."users` u WHERE `l`.`userid` = `u`.ID AND `l`.`postid` = ".intval($postid)." ORDER BY l.`userid` = " . intval(WPF()->current_userid) . " DESC, l.`likeid` DESC LIMIT 3", ARRAY_A);
|
617 |
}
|
618 |
|
619 |
/**
|
626 |
* @return null or like id
|
627 |
*/
|
628 |
function is_liked($postid, $userid){
|
629 |
+
$returned_value = WPF()->db->get_var("SELECT likeid FROM `".WPF()->db->prefix."wpforo_likes` WHERE `postid` = ".intval($postid)." AND `userid` = ".intval($userid) );
|
630 |
if(is_null($returned_value)){
|
631 |
return FALSE;
|
632 |
}else{
|
646 |
* @return int
|
647 |
*/
|
648 |
function get_post_votes_sum($postid){
|
649 |
+
$sum = WPF()->db->get_var("SELECT sum(`reaction`) FROM `".WPF()->db->prefix."wpforo_votes` WHERE `postid` = ".intval($postid) );
|
650 |
if($sum == null){
|
651 |
$sum = 0;
|
652 |
}
|
668 |
|
669 |
function get_forumslug_byid($postid){
|
670 |
|
671 |
+
$cache = WPF()->cache->on('memory_cashe');
|
672 |
|
673 |
if( $cache && isset(self::$cache['forum_slug'][$postid]) ){
|
674 |
return self::$cache['forum_slug'][$postid];
|
675 |
}
|
676 |
|
677 |
+
$slug = WPF()->db->get_var("SELECT `slug` FROM ".WPF()->db->prefix."wpforo_forums WHERE `forumid` =(SELECT forumid FROM `".WPF()->db->prefix."wpforo_topics` WHERE `topicid` =(SELECT `topicid` FROM `".WPF()->db->prefix."wpforo_posts` WHERE postid = ".intval($postid)."))");
|
678 |
|
679 |
if($cache && isset($postid)){
|
680 |
self::$cache['forum_slug'][$postid] = $slug;
|
702 |
|
703 |
function get_topicslug_byid( $postid ){
|
704 |
|
705 |
+
$cache = WPF()->cache->on('memory_cashe');
|
706 |
|
707 |
if( $cache && isset(self::$cache['topic_slug'][$postid]) ){
|
708 |
return self::$cache['topic_slug'][$postid];
|
709 |
}
|
710 |
|
711 |
+
$slug = WPF()->db->get_var("SELECT `slug` FROM ".WPF()->db->prefix."wpforo_topics WHERE `topicid` =(SELECT `topicid` FROM `".WPF()->db->prefix."wpforo_posts` WHERE postid = ".intval($postid).")");
|
712 |
|
713 |
if($cache && isset($postid)){
|
714 |
self::$cache['topic_slug'][$postid] = $slug;
|
746 |
if( is_array($post) && !empty($post) && $postid ){
|
747 |
$url = $this->get_forumslug_byid($postid) . '/' . $this->get_topicslug_byid($postid);
|
748 |
if( $post['topicid'] ){
|
749 |
+
if( !$position ) $position = WPF()->db->get_var("SELECT COUNT(`postid`) FROM `".WPF()->db->prefix."wpforo_posts` WHERE `topicid` = ".intval($post['topicid'])." AND `postid` <= " . ($post['parentid'] ? intval($post['parentid']) : intval($postid) ) );
|
750 |
+
if( $position <= WPF()->post->options['posts_per_page'] ) return wpforo_home_url($url, false, $absolute ) . "#post-" . intval($postid);
|
751 |
+
if( $position && WPF()->post->options['posts_per_page'] ) {
|
752 |
+
$paged = ceil($position / WPF()->post->options['posts_per_page']);
|
753 |
}
|
754 |
else{
|
755 |
$paged = 1;
|
770 |
* @param int $postid
|
771 |
*/
|
772 |
function is_answered( $postid ){
|
773 |
+
$is_answered = WPF()->db->get_var( WPF()->db->prepare(
|
774 |
" SELECT is_answer
|
775 |
+
FROM `".WPF()->db->prefix."wpforo_posts`
|
776 |
WHERE postid = %d
|
777 |
",
|
778 |
intval($postid)
|
781 |
}
|
782 |
|
783 |
function is_approved( $postid ){
|
784 |
+
$post = WPF()->db->get_var( "SELECT `status` FROM " . WPF()->db->prefix."wpforo_posts WHERE `postid` = " . intval($postid) );
|
785 |
if( $post ) return FALSE;
|
786 |
return TRUE;
|
787 |
}
|
788 |
|
789 |
function get_count( $args = array() ){
|
790 |
+
$sql = "SELECT COUNT(`postid`) FROM `".WPF()->db->prefix."wpforo_posts`";
|
791 |
if( !empty($args) ){
|
792 |
$wheres = array();
|
793 |
foreach ($args as $key => $value) $wheres[] = "`$key` = " . intval($value);
|
794 |
if($wheres) $sql .= " WHERE " . implode(' AND ', $wheres);
|
795 |
}
|
796 |
+
return WPF()->db->get_var($sql);
|
797 |
}
|
798 |
|
799 |
function unapproved_count(){
|
800 |
+
return WPF()->db->get_var( "SELECT COUNT(*) FROM `".WPF()->db->prefix."wpforo_posts` WHERE `status` = 1" );
|
801 |
}
|
802 |
|
803 |
function get_attachment_id( $filename ){
|
804 |
+
$attach_id = WPF()->db->get_var( "SELECT `post_id` FROM `".WPF()->db->prefix."postmeta` WHERE `meta_key` = '_wp_attached_file' AND `meta_value` LIKE '%" . esc_sql($filename) . "' LIMIT 1");
|
805 |
return $attach_id;
|
806 |
}
|
807 |
|
815 |
$filename = trim($attachment[1]);
|
816 |
$file = $default_attachments_dir . $filename;
|
817 |
if( file_exists($file) ){
|
818 |
+
$posts = WPF()->db->get_var( "SELECT COUNT(*) as posts FROM `".WPF()->db->prefix."wpforo_posts` WHERE `body` LIKE '%" . esc_sql( $attachment[0] ) . "%'" );
|
819 |
if( is_numeric($posts) && $posts == 1 ){
|
820 |
$attachmentid = $this->get_attachment_id( '/' . $filename );
|
821 |
if ( !wp_delete_attachment( $attachmentid ) ){
|
832 |
if( !$postid = wpforo_bigintval($postid) ) return false;
|
833 |
if( !$post = $this->get_post($postid) ) return false;
|
834 |
|
835 |
+
if( $post['is_first_post'] ) return WPF()->topic->status($post['topicid'], $status);
|
836 |
|
837 |
+
if( false !== WPF()->db->update(
|
838 |
+
WPF()->db->prefix."wpforo_posts",
|
839 |
array( 'status' => intval($status) ),
|
840 |
array( 'postid' => $postid ),
|
841 |
array( '%d' ),
|
842 |
array( '%d' )
|
843 |
)){
|
844 |
+
WPF()->notice->add('Done!', 'success');
|
845 |
return true;
|
846 |
}
|
847 |
|
848 |
+
WPF()->notice->add('error: Change Status action', 'error');
|
849 |
return false;
|
850 |
}
|
851 |
}
|
wpf-includes/class-subscribes.php
CHANGED
@@ -4,15 +4,14 @@
|
|
4 |
|
5 |
|
6 |
class wpForoSubscribe{
|
7 |
-
private $wpforo;
|
8 |
public $default;
|
9 |
public $options;
|
10 |
|
|
|
|
|
11 |
static $cache = array( 'subscribe' => array() );
|
12 |
|
13 |
-
function __construct(
|
14 |
-
if(!isset($this->wpforo)) $this->wpforo = $wpForo;
|
15 |
-
|
16 |
$this->init_defaults();
|
17 |
$this->init_options();
|
18 |
}
|
@@ -40,7 +39,10 @@ class wpForoSubscribe{
|
|
40 |
'reset_password_email_message' => "Hello! <br>\r\n\r\n You asked us to reset your password for your account using the email address [user_login]. <br>\r\n\r\n If this was a mistake, or you didn't ask for a password reset, just ignore this email and nothing will happen. <br>\r\n\r\n To reset your password, visit the following address: <br>\r\n\r\n [reset_password_url] <br>\r\n\r\n Thanks!",
|
41 |
//'spam_notification_email_subject' => 'New Banned User',
|
42 |
//'spam_notification_email_message' => "Hello [member_name]!<br>\r\n Please check this user's topics/posts and consider to Delete or Unban.<br>\r\n User Activity: [profile_activity_url]",
|
43 |
-
'update' => '1'
|
|
|
|
|
|
|
44 |
);
|
45 |
}
|
46 |
|
@@ -62,8 +64,8 @@ class wpForoSubscribe{
|
|
62 |
|
63 |
if( !isset($confirmkey) || (isset($confirmkey) && !$confirmkey ) ) $confirmkey = $this->get_confirm_key();
|
64 |
|
65 |
-
if(
|
66 |
-
|
67 |
array(
|
68 |
'itemid' => intval($itemid),
|
69 |
'type' => sanitize_text_field($type),
|
@@ -80,57 +82,57 @@ class wpForoSubscribe{
|
|
80 |
)
|
81 |
)){
|
82 |
if( isset($active) && $active == 1 ){
|
83 |
-
|
84 |
}else{
|
85 |
-
|
86 |
}
|
87 |
return $confirmkey;
|
88 |
}
|
89 |
|
90 |
-
|
91 |
return FALSE;
|
92 |
}
|
93 |
|
94 |
function edit( $confirmkey = '' ){
|
95 |
if( !$confirmkey && isset($_REQUEST['key']) && $_REQUEST['key'] ) $confirmkey = $_REQUEST['key'];
|
96 |
if( !$confirmkey ){
|
97 |
-
|
98 |
return FALSE;
|
99 |
}
|
100 |
|
101 |
-
if(
|
102 |
-
|
103 |
array( 'active' => 1 ),
|
104 |
array( 'confirmkey' => sanitize_text_field($confirmkey) ),
|
105 |
array( '%d' ),
|
106 |
array( '%s' )
|
107 |
) ){
|
108 |
-
|
109 |
return TRUE;
|
110 |
}
|
111 |
|
112 |
-
|
113 |
return FALSE;
|
114 |
}
|
115 |
|
116 |
function delete( $confirmkey = '' ){
|
117 |
if( !$confirmkey && isset($_REQUEST['confirmkey']) && $_REQUEST['confirmkey'] ) $confirmkey = $_REQUEST['confirmkey'];
|
118 |
if( !$confirmkey ){
|
119 |
-
|
120 |
return FALSE;
|
121 |
}
|
122 |
-
if(
|
123 |
-
|
124 |
return TRUE;
|
125 |
}
|
126 |
|
127 |
-
|
128 |
return FALSE;
|
129 |
}
|
130 |
|
131 |
function get_subscribe( $args = array() ){
|
132 |
|
133 |
-
$cache =
|
134 |
|
135 |
if( is_string($args) ) $args = array("confirmkey" => sanitize_text_field($args));
|
136 |
if( empty($args) && !empty($_REQUEST['sbscrb']) ) $args = $_REQUEST['sbscrb'];
|
@@ -147,8 +149,8 @@ class wpForoSubscribe{
|
|
147 |
if( $cache && isset(self::$cache['subscribe'][$itemid][$userid][$type]) ){
|
148 |
return self::$cache['subscribe'][$itemid][$userid][$type];
|
149 |
}
|
150 |
-
$sql = "SELECT * FROM `"
|
151 |
-
$subscribe =
|
152 |
if($cache && !empty($subscribe)){
|
153 |
self::$cache['subscribe'][$itemid][$userid][$type] = $subscribe;
|
154 |
}
|
@@ -172,7 +174,7 @@ class wpForoSubscribe{
|
|
172 |
if(!empty($args)){
|
173 |
extract($args, EXTR_OVERWRITE);
|
174 |
|
175 |
-
$sql = "SELECT * FROM `"
|
176 |
$wheres = array();
|
177 |
|
178 |
if( $type ) $wheres[] = " `type` = '" . esc_sql(sanitize_text_field($type)) . "'";
|
@@ -183,7 +185,7 @@ class wpForoSubscribe{
|
|
183 |
if(!empty($wheres)) $sql .= " WHERE " . implode( " AND ", $wheres );
|
184 |
|
185 |
$item_count_sql = preg_replace('#SELECT.+?FROM#isu', 'SELECT count(*) FROM', $sql);
|
186 |
-
if( $item_count_sql ) $items_count =
|
187 |
|
188 |
$sql .= " ORDER BY `$orderby` " . $order;
|
189 |
|
@@ -194,7 +196,7 @@ class wpForoSubscribe{
|
|
194 |
$sql .= esc_sql(" LIMIT $row_count");
|
195 |
}
|
196 |
}
|
197 |
-
return
|
198 |
|
199 |
}
|
200 |
}
|
@@ -203,9 +205,9 @@ class wpForoSubscribe{
|
|
203 |
if(is_string($args)) return wpforo_home_url( "?wpforo=sbscrbconfirm&key=" . sanitize_text_field($args) );
|
204 |
|
205 |
if($args['type'] == 'forum'){
|
206 |
-
$url =
|
207 |
}elseif($args['type'] == 'topic'){
|
208 |
-
$url =
|
209 |
}else{
|
210 |
$url = wpforo_home_url();
|
211 |
}
|
4 |
|
5 |
|
6 |
class wpForoSubscribe{
|
|
|
7 |
public $default;
|
8 |
public $options;
|
9 |
|
10 |
+
public $already_sent_emails = array();
|
11 |
+
|
12 |
static $cache = array( 'subscribe' => array() );
|
13 |
|
14 |
+
function __construct(){
|
|
|
|
|
15 |
$this->init_defaults();
|
16 |
$this->init_options();
|
17 |
}
|
39 |
'reset_password_email_message' => "Hello! <br>\r\n\r\n You asked us to reset your password for your account using the email address [user_login]. <br>\r\n\r\n If this was a mistake, or you didn't ask for a password reset, just ignore this email and nothing will happen. <br>\r\n\r\n To reset your password, visit the following address: <br>\r\n\r\n [reset_password_url] <br>\r\n\r\n Thanks!",
|
40 |
//'spam_notification_email_subject' => 'New Banned User',
|
41 |
//'spam_notification_email_message' => "Hello [member_name]!<br>\r\n Please check this user's topics/posts and consider to Delete or Unban.<br>\r\n User Activity: [profile_activity_url]",
|
42 |
+
'update' => '1',
|
43 |
+
'user_mention_notify' => 1,
|
44 |
+
'user_mention_email_subject' => "You have been mentioned in forum post",
|
45 |
+
'user_mention_email_message' => "Hi [mentioned-user-name]! \r\n You have been mentioned in a post on \"[topic-title]\" by [author-user-name].<br/><br/>\r\n\r\n Post URL: [post-url]"
|
46 |
);
|
47 |
}
|
48 |
|
64 |
|
65 |
if( !isset($confirmkey) || (isset($confirmkey) && !$confirmkey ) ) $confirmkey = $this->get_confirm_key();
|
66 |
|
67 |
+
if(WPF()->db->insert(
|
68 |
+
WPF()->db->prefix . 'wpforo_subscribes',
|
69 |
array(
|
70 |
'itemid' => intval($itemid),
|
71 |
'type' => sanitize_text_field($type),
|
82 |
)
|
83 |
)){
|
84 |
if( isset($active) && $active == 1 ){
|
85 |
+
WPF()->notice->add('You have been successfully subscribed', 'success');
|
86 |
}else{
|
87 |
+
WPF()->notice->add('Success! Thank you. Please check your email and click confirmation link below to complete this step.', 'success');
|
88 |
}
|
89 |
return $confirmkey;
|
90 |
}
|
91 |
|
92 |
+
WPF()->notice->add('Can\'t subscribe to this item', 'error');
|
93 |
return FALSE;
|
94 |
}
|
95 |
|
96 |
function edit( $confirmkey = '' ){
|
97 |
if( !$confirmkey && isset($_REQUEST['key']) && $_REQUEST['key'] ) $confirmkey = $_REQUEST['key'];
|
98 |
if( !$confirmkey ){
|
99 |
+
WPF()->notice->add('Invalid request!', 'error');
|
100 |
return FALSE;
|
101 |
}
|
102 |
|
103 |
+
if( WPF()->db->update(
|
104 |
+
WPF()->db->prefix . 'wpforo_subscribes',
|
105 |
array( 'active' => 1 ),
|
106 |
array( 'confirmkey' => sanitize_text_field($confirmkey) ),
|
107 |
array( '%d' ),
|
108 |
array( '%s' )
|
109 |
) ){
|
110 |
+
WPF()->notice->add('You have been successfully subscribed', 'success');
|
111 |
return TRUE;
|
112 |
}
|
113 |
|
114 |
+
WPF()->notice->add('Your subscription for this item could not be confirmed', 'error');
|
115 |
return FALSE;
|
116 |
}
|
117 |
|
118 |
function delete( $confirmkey = '' ){
|
119 |
if( !$confirmkey && isset($_REQUEST['confirmkey']) && $_REQUEST['confirmkey'] ) $confirmkey = $_REQUEST['confirmkey'];
|
120 |
if( !$confirmkey ){
|
121 |
+
WPF()->notice->add('Invalid request!', 'error');
|
122 |
return FALSE;
|
123 |
}
|
124 |
+
if( WPF()->db->delete( WPF()->db->prefix.'wpforo_subscribes', array( 'confirmkey' => sanitize_text_field($confirmkey) ), array( '%s' ) ) ){
|
125 |
+
WPF()->notice->add('You have been successfully unsubscribed', 'success');
|
126 |
return TRUE;
|
127 |
}
|
128 |
|
129 |
+
WPF()->notice->add('Could not be unsubscribe from this item', 'error');
|
130 |
return FALSE;
|
131 |
}
|
132 |
|
133 |
function get_subscribe( $args = array() ){
|
134 |
|
135 |
+
$cache = WPF()->cache->on('memory_cashe');
|
136 |
|
137 |
if( is_string($args) ) $args = array("confirmkey" => sanitize_text_field($args));
|
138 |
if( empty($args) && !empty($_REQUEST['sbscrb']) ) $args = $_REQUEST['sbscrb'];
|
149 |
if( $cache && isset(self::$cache['subscribe'][$itemid][$userid][$type]) ){
|
150 |
return self::$cache['subscribe'][$itemid][$userid][$type];
|
151 |
}
|
152 |
+
$sql = "SELECT * FROM `".WPF()->db->prefix."wpforo_subscribes` WHERE " . $where;
|
153 |
+
$subscribe = WPF()->db->get_row($sql, ARRAY_A);
|
154 |
if($cache && !empty($subscribe)){
|
155 |
self::$cache['subscribe'][$itemid][$userid][$type] = $subscribe;
|
156 |
}
|
174 |
if(!empty($args)){
|
175 |
extract($args, EXTR_OVERWRITE);
|
176 |
|
177 |
+
$sql = "SELECT * FROM `".WPF()->db->prefix."wpforo_subscribes`";
|
178 |
$wheres = array();
|
179 |
|
180 |
if( $type ) $wheres[] = " `type` = '" . esc_sql(sanitize_text_field($type)) . "'";
|
185 |
if(!empty($wheres)) $sql .= " WHERE " . implode( " AND ", $wheres );
|
186 |
|
187 |
$item_count_sql = preg_replace('#SELECT.+?FROM#isu', 'SELECT count(*) FROM', $sql);
|
188 |
+
if( $item_count_sql ) $items_count = WPF()->db->get_var($item_count_sql);
|
189 |
|
190 |
$sql .= " ORDER BY `$orderby` " . $order;
|
191 |
|
196 |
$sql .= esc_sql(" LIMIT $row_count");
|
197 |
}
|
198 |
}
|
199 |
+
return WPF()->db->get_results($sql, ARRAY_A);
|
200 |
|
201 |
}
|
202 |
}
|
205 |
if(is_string($args)) return wpforo_home_url( "?wpforo=sbscrbconfirm&key=" . sanitize_text_field($args) );
|
206 |
|
207 |
if($args['type'] == 'forum'){
|
208 |
+
$url = WPF()->forum->get_forum_url($args['itemid']) . '/';
|
209 |
}elseif($args['type'] == 'topic'){
|
210 |
+
$url = WPF()->topic->get_topic_url($args['itemid']) . '/';
|
211 |
}else{
|
212 |
$url = wpforo_home_url();
|
213 |
}
|
wpf-includes/class-template.php
CHANGED
@@ -6,20 +6,22 @@ define('WPFORO_THEME_DIR', WPFORO_DIR . '/wpf-themes' );
|
|
6 |
define('WPFORO_THEME_URL', WPFORO_URL . '/wpf-themes' );
|
7 |
|
8 |
class wpForoTemplate{
|
9 |
-
private $wpforo;
|
10 |
public $default;
|
11 |
public $options;
|
12 |
public $style;
|
13 |
public $theme;
|
14 |
|
15 |
-
function __construct(
|
16 |
-
if(!isset($this->wpforo)) $this->wpforo = $wpForo;
|
17 |
-
|
18 |
$this->init_defaults();
|
19 |
$this->init_options();
|
20 |
-
$this->init_hooks();
|
21 |
}
|
22 |
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
private function init_hooks(){
|
24 |
if( is_wpforo_page() ){
|
25 |
add_filter("mce_external_plugins", array(&$this, 'add_tinymce_buttons'), 15);
|
@@ -63,6 +65,7 @@ class wpForoTemplate{
|
|
63 |
$plugin_array['wpforo_pre_button'] = WPFORO_URL . '/wpf-assets/js/tinymce-pre.js';
|
64 |
$plugin_array['wpforo_link_button'] = WPFORO_URL . '/wpf-assets/js/tinymce-link.js';
|
65 |
$plugin_array['wpforo_source_code_button'] = WPFORO_URL . '/wpf-assets/js/tinymce-code.js';
|
|
|
66 |
return $plugin_array;
|
67 |
}
|
68 |
|
@@ -78,7 +81,7 @@ class wpForoTemplate{
|
|
78 |
}
|
79 |
|
80 |
function topic_form($forumid){
|
81 |
-
if(!isset(
|
82 |
?>
|
83 |
<div id="wpf-topic-create" class="wpf-topic-create">
|
84 |
<form name="topic" action="" enctype="multipart/form-data" method="POST">
|
@@ -103,7 +106,7 @@ class wpForoTemplate{
|
|
103 |
'teeny'=> FALSE, // output the minimal editor config used in Press This
|
104 |
'dfw'=> false, // replace the default fullscreen with DFW (supported on the front - end in WordPress 3.4)
|
105 |
'tinymce'=> array(
|
106 |
-
'toolbar1' => 'bold,italic,underline,strikethrough,forecolor,bullist,numlist,hr,alignleft,aligncenter,alignright,alignjustify,link,unlink,blockquote,pre,undo,redo,pastetext,source_code',
|
107 |
'toolbar2' => '',
|
108 |
'toolbar3' => '',
|
109 |
'toolbar4' => '',
|
@@ -118,30 +121,30 @@ class wpForoTemplate{
|
|
118 |
<div class="wpf-extra-fields">
|
119 |
<?php do_action('wpforo_topic_form_extra_fields_before') ?>
|
120 |
<div class="wpf-main-fields">
|
121 |
-
<?php if(
|
122 |
<input id="t_sticky" name="topic[type]" type="checkbox" value="1">
|
123 |
<i class="fa fa-exclamation fa-0x"></i> <label for="t_sticky" style="padding-bottom:2px; cursor: pointer;"><?php wpforo_phrase('Set Topic Sticky'); ?> </label>
|
124 |
<span class="wpfbs"> | </span>
|
125 |
<?php endif; ?>
|
126 |
-
<?php if(
|
127 |
<input id="t_private" name="topic[private]" type="checkbox" value="1">
|
128 |
<i class="fa fa-eye-slash fa-0x"></i> <label for="t_private" style="padding-bottom:2px; cursor: pointer;" title="<?php wpforo_phrase('Only Admins and Moderators can see your private topics.'); ?>"><?php wpforo_phrase('Private Topic'); ?> </label>
|
129 |
-
|
130 |
<?php endif; ?>
|
131 |
<?php do_action('wpforo_topic_form_buttons_hook'); ?>
|
132 |
</div>
|
133 |
-
<?php if(
|
134 |
-
<?php if(!defined('WPFOROATTACH_BASENAME') &&
|
135 |
<div class="wpf-default-attachment" style="padding-top:5px;">
|
136 |
<label for="file"><?php wpforo_phrase('Attach file:') ?> </label> <input id="file" type="file" name="attachfile" />
|
137 |
-
<p><?php wpforo_phrase('Maximum allowed file size is'); echo ' ' . wpforo_print_size(
|
138 |
</div>
|
139 |
<?php endif; ?>
|
140 |
<?php endif; ?>
|
141 |
<?php do_action('wpforo_topic_form_extra_fields_after') ?>
|
142 |
</div>
|
143 |
-
<?php if( wpforo_feature('subscribe_checkbox_on_post_editor'
|
144 |
-
<div class="wpf-topic-sbs"><input id="wpf-topic-sbs" type="checkbox" name="wpforo_topic_subs" value="1" <?php echo ( wpforo_feature('subscribe_checkbox_default_status'
|
145 |
<?php endif; ?>
|
146 |
<input id="formbutton" type="submit" name="topic[save]" class="button button-primary forum_submit" value="<?php wpforo_phrase('Add Topic') ?>">
|
147 |
<div class="wpf-clear"></div>
|
@@ -192,7 +195,7 @@ class wpForoTemplate{
|
|
192 |
<input type="hidden" name="movetopicid" value="<?php echo intval($topicid) ?>"/>
|
193 |
<input type="hidden" name="post[save]" value="move"/>
|
194 |
<select id="parent" name="topic[forumid]" class="postform">
|
195 |
-
<?php
|
196 |
</select>
|
197 |
<input type="submit" value="<?php wpforo_phrase('Move') ?>"/>
|
198 |
</form>
|
@@ -205,7 +208,7 @@ class wpForoTemplate{
|
|
205 |
|
206 |
$head_html = '<p id="wpf-reply-form-title">'.wpforo_phrase('Leave a reply', false).'</p>';
|
207 |
$head_html = apply_filters( 'wpforo_reply_form_head', $head_html, $args );
|
208 |
-
if(!isset(
|
209 |
?>
|
210 |
<div id="wpf-form-wrapper">
|
211 |
<?php echo $head_html; //this is a HTML content ?>
|
@@ -236,7 +239,7 @@ class wpForoTemplate{
|
|
236 |
'dfw'=> false, // replace the default fullscreen with DFW (supported on the front - end in WordPress 3.4)
|
237 |
'editor_height' => '180',
|
238 |
'tinymce'=> array(
|
239 |
-
'toolbar1' => 'bold,italic,underline,strikethrough,forecolor,bullist,numlist,hr,alignleft,aligncenter,alignright,alignjustify,link,unlink,blockquote,pre,undo,redo,pastetext,source_code',
|
240 |
'toolbar2' => '',
|
241 |
'toolbar3' => '',
|
242 |
'toolbar4' => '',
|
@@ -251,21 +254,21 @@ class wpForoTemplate{
|
|
251 |
<div class="wpf-extra-fields">
|
252 |
<?php do_action('wpforo_reply_form_extra_fields_before') ?>
|
253 |
<?php do_action('wpforo_reply_form_buttons_hook'); ?>
|
254 |
-
<?php if(
|
255 |
-
<?php if(!defined('WPFOROATTACH_BASENAME') &&
|
256 |
<div class="wpf-default-attachment">
|
257 |
<label for="file"><?php wpforo_phrase('Attach file:') ?> </label> <input id="file" type="file" name="attachfile" />
|
258 |
-
<p><?php wpforo_phrase('Maximum allowed file size is'); echo ' ' . wpforo_print_size(
|
259 |
</div>
|
260 |
<?php endif; ?>
|
261 |
<?php endif; ?>
|
262 |
<?php do_action('wpforo_reply_form_extra_fields_after') ?>
|
263 |
</div>
|
264 |
-
<?php if( wpforo_feature('subscribe_checkbox_on_post_editor'
|
265 |
-
$args = array( "userid" =>
|
266 |
-
$subscribe =
|
267 |
if( !isset($subscribe['subid']) ) : ?>
|
268 |
-
<div class="wpf-topic-sbs"><input id="wpf-topic-sbs" type="checkbox" name="wpforo_topic_subs" value="1" <?php echo ( wpforo_feature('subscribe_checkbox_default_status'
|
269 |
<?php endif;
|
270 |
endif; ?>
|
271 |
<input id="formbutton" type="submit" name="post[save]" class="button button-primary forum_submit" value="<?php wpforo_phrase('Add Reply') ?>">
|
@@ -277,7 +280,7 @@ class wpForoTemplate{
|
|
277 |
}
|
278 |
|
279 |
function pagenavi($paged, $items_count, $permalink = TRUE, $class = ''){
|
280 |
-
$items_per_page = (
|
281 |
if($items_count <= $items_per_page) return;
|
282 |
|
283 |
$pages_count = ceil($items_count/$items_per_page);
|
@@ -316,16 +319,16 @@ class wpForoTemplate{
|
|
316 |
$return = '';
|
317 |
|
318 |
if( $l_count ){
|
319 |
-
if($l_usernames[0]['ID'] ==
|
320 |
if($l_count == 1){
|
321 |
-
$return = sprintf( wpforo_phrase('%s liked', FALSE), '<a href="' . esc_url(
|
322 |
}elseif($l_count == 2){
|
323 |
-
$return = sprintf( wpforo_phrase('%s and %s liked', FALSE), '<a href="' . esc_url(
|
324 |
}elseif($l_count == 3){
|
325 |
-
$return = sprintf( wpforo_phrase('%s, %s and %s liked', FALSE), '<a href="' . esc_url(
|
326 |
}elseif($l_count >= 4){
|
327 |
$l_count = $l_count - 3;
|
328 |
-
$return = sprintf( wpforo_phrase('%s, %s, %s and %d people liked', FALSE), '<a href="' . esc_url(
|
329 |
}
|
330 |
}
|
331 |
return $return;
|
@@ -372,14 +375,14 @@ class wpForoTemplate{
|
|
372 |
|
373 |
case 'reply':
|
374 |
if($is_closed) break;
|
375 |
-
if(
|
376 |
$button_html[] = '<span id="parentpostid'.intval($postid).'" class="wpforo-reply wpf-action add_post_button"><i class="fa fa-reply fa-rotate-180"></i>' . wpforo_phrase('Reply', false).'</span>';
|
377 |
}else{
|
378 |
$button_html[] = '<span class="wpf-action not_reg_user"><i class="fa fa-reply fa-rotate-180"></i> ' . wpforo_phrase('Reply', false).'</span>';
|
379 |
}
|
380 |
break;
|
381 |
case 'answer':
|
382 |
-
if(
|
383 |
$button_html[] = '<span class="wpforo-answer wpf-button add_post_button"><i class="fa fa-pencil"></i> ' . wpforo_phrase('Answer', false).'</span>';
|
384 |
}else{
|
385 |
$button_html[] = '<span class="wpf-button not_reg_user"><i class="fa fa-pencil"></i> ' . wpforo_phrase('Answer', false).'</span>';
|
@@ -388,7 +391,7 @@ class wpForoTemplate{
|
|
388 |
case 'comment':
|
389 |
if($is_closed) break;
|
390 |
$title = wpforo_phrase('Use comments to ask for more information or suggest improvements. Avoid answering questions in comments.', false);
|
391 |
-
if(
|
392 |
$button_html[] = '<span id="parentpostid'.intval($postid).'" class="wpforo-childreply wpf-button add_post_button" title="'.esc_attr($title).'"><i class="fa fa-comment"></i> ' . wpforo_phrase('Add a comment', false).'</span>';
|
393 |
}else{
|
394 |
$button_html[] = '<span class="not_reg_user wpf-button add_post_button" title="'.esc_attr($title).'"><i class="fa fa-comment"></i> ' . wpforo_phrase('Add a comment', false).'</span>';
|
@@ -396,70 +399,70 @@ class wpForoTemplate{
|
|
396 |
break;
|
397 |
case 'quote':
|
398 |
if($is_closed) break;
|
399 |
-
if(
|
400 |
$button_html[] = '<span id="wpfquotepost'.intval($postid).'" class="wpforo-quote wpf-action"><i class="fa fa-quote-left fa-0x"></i>' . wpforo_phrase('Quote', false).'</span>';
|
401 |
}else{
|
402 |
$button_html[] = '<span class="wpf-action not_reg_user"><i class="fa fa-quote-left fa-0x"></i>' . wpforo_phrase('Quote', false).'</span>';
|
403 |
}
|
404 |
break;
|
405 |
case 'like':
|
406 |
-
if(
|
407 |
-
$like_status = (
|
408 |
$like_icon = ( $like_status == 'wpforo-like') ? 'up' : 'down';
|
409 |
$button_html[] = '<span id="wpflike'. intval($postid) .'" class="wpf-action '. sanitize_html_class($like_status) .'"><i id="likeicon'. intval($postid) .'" class="fa fa-thumbs-o-'. esc_attr($like_icon) .' fa-0x"></i><span id="liketext'. intval($postid) .'">' . wpforo_phrase( str_replace('wpforo-', '', $like_status), false) . '</span></span>';
|
410 |
}
|
411 |
break;
|
412 |
case 'report':
|
413 |
-
if(
|
414 |
$button_html[] = '<span id="wpfreport'. intval($postid) .'" class="wpf-action wpforo-report"><i class="fa fa-exclamation-triangle"></i>' . wpforo_phrase('Report', false).'</span>';
|
415 |
}
|
416 |
break;
|
417 |
case 'sticky':
|
418 |
-
if(
|
419 |
$sticky_status = ( $is_sticky ? 'wpforo-unsticky' : 'wpforo-sticky');
|
420 |
$button_html[] = '<span id="wpfsticky'. intval($topicid) .'" class="wpf-action '. sanitize_html_class($sticky_status) .'"><i class="fa fa-exclamation fa-0x"></i><span id="stickytext'. intval($topicid) .'">' . wpforo_phrase( str_replace('wpforo-', '', $sticky_status), false).'</span></span>';
|
421 |
}
|
422 |
break;
|
423 |
case 'private':
|
424 |
-
if(
|
425 |
$private_status = ( $is_private ? 'wpforo-public' : 'wpforo-private');
|
426 |
$private_icon = ( $private_status == 'wpforo-public') ? 'eye' : 'eye-slash';
|
427 |
$button_html[] = '<span id="wpfprivate'. intval($topicid) .'" class="wpf-action '. sanitize_html_class($private_status) .'"><i id="privateicon'. intval($topicid) .'" class="fa fa-'. esc_attr($private_icon) .' fa-0x"></i><span id="privatetext'. intval($topicid) .'">' . wpforo_phrase( str_replace('wpforo-', '', $private_status), false).'</span></span>';
|
428 |
}
|
429 |
break;
|
430 |
case 'solved':
|
431 |
-
if(
|
432 |
$solved_status = ( $is_solved ? 'wpforo-unsolved' : 'wpforo-solved');
|
433 |
$button_html[] = '<span id="wpfsolved'. intval($postid) .'" class="wpf-action '. sanitize_html_class($solved_status) .'"><i class="fa fa-check-circle fa-0x"></i><span id="solvedtext'. intval($postid) .'">' . wpforo_phrase( str_replace('wpforo-', '', $solved_status), false).'</span></span>';
|
434 |
}
|
435 |
break;
|
436 |
case 'approved':
|
437 |
-
if(
|
438 |
$approve_status = ( !$is_approve ? 'wpforo-unapprove' : 'wpforo-approve');
|
439 |
$approve_icon = ( $approve_status == 'wpforo-unapprove') ? 'fa-exclamation-circle' : 'fa-check';
|
440 |
$button_html[] = '<span id="wpfapprove'. intval($postid) .'" class="wpf-action '. sanitize_html_class($approve_status) .'"><i id="approveicon'. intval($postid) .'" class="fa '. esc_attr($approve_icon) .' fa-0x"></i><span id="approvetext'. intval($postid) .'">' . wpforo_phrase( str_replace('wpforo-', '', $approve_status), false).'</span></span>';
|
441 |
}
|
442 |
break;
|
443 |
case 'close':
|
444 |
-
if(
|
445 |
$open_status = ( $is_closed ? 'wpforo-open' : 'wpforo-close' );
|
446 |
$open_icon = ($open_status == 'wpforo-open') ? 'unlock' : 'lock';
|
447 |
$button_html[] = '<span id="wpfclose'. intval($topicid) .'" class="wpf-action '. sanitize_html_class($open_status) .'"><i id="closeicon'. intval($topicid) .'" class="fa fa-'. esc_attr($open_icon) .' fa-0x"></i><span id="closetext'. intval($topicid) .'">' . wpforo_phrase( str_replace('wpforo-', '', $open_status), false).'</span></span>';
|
448 |
}
|
449 |
break;
|
450 |
case 'move':
|
451 |
-
if(
|
452 |
$button_html[] = '<span class="wpf-action wpforo-move"><i class="fa fa-share-square-o fa-0x"></i>' . wpforo_phrase('Move', false).'</span>';
|
453 |
}
|
454 |
break;
|
455 |
case 'edit':
|
456 |
if($is_closed) break;
|
457 |
-
if(
|
458 |
//New registered user's unapproved topic/post | No Edit button.
|
459 |
}
|
460 |
else{
|
461 |
$diff = current_time( 'timestamp', 1 ) - strtotime($post['created']);
|
462 |
-
if(
|
463 |
$a = ( $is_topic ) ? 'wpfedittopicpid' : '';
|
464 |
$b = ( $is_topic ) ? $postid : $postid;
|
465 |
$button_html[] = '<span id="'. esc_attr( $a . $b ) .'" class="wpforo-edit wpf-action"><i class="fa fa-edit fa-0x"></i>' . wpforo_phrase('Edit', false).'</span>';
|
@@ -467,12 +470,12 @@ class wpForoTemplate{
|
|
467 |
}
|
468 |
break;
|
469 |
case 'delete':
|
470 |
-
if(
|
471 |
//New registered user's unapproved topic/post | No Delete button.
|
472 |
}
|
473 |
else{
|
474 |
$diff = current_time( 'timestamp', 1 ) - strtotime($post['created']);
|
475 |
-
if(
|
476 |
$a = ( $is_topic ) ? 'wpftopicdelete' : 'wpfreplydelete';
|
477 |
$b = ( $is_topic ) ? $topicid : $postid;
|
478 |
$button_html[] = '<span id="'. esc_attr( $a . $b ) .'" class="wpf-action wpforo-delete"><i class="fa fa-times fa-0x"></i>' . wpforo_phrase('Delete', false).'</span>';
|
@@ -480,25 +483,25 @@ class wpForoTemplate{
|
|
480 |
}
|
481 |
break;
|
482 |
case 'link':
|
483 |
-
$url = ( $is_topic ) ?
|
484 |
$button_html[] = '<a href="'. esc_url($url) .'"><i class="fa fa-link fa-0x"></i></a>';
|
485 |
break;
|
486 |
case 'positivevote':
|
487 |
-
if(
|
488 |
-
$button_html[] = '<i itemtype="' . ( $is_topic ? 'topic' : 'reply' ) . '" id="wpfvote-up-'.
|
489 |
}else{
|
490 |
$button_html[] = '<i class="not_reg_user fa fa-play fa-rotate-270 wpfcl-0"></i>';
|
491 |
}
|
492 |
break;
|
493 |
case 'negativevote':
|
494 |
-
if(
|
495 |
-
$button_html[] = '<i itemtype="' . ( $is_topic ? 'topic' : 'reply' ) . '" id="wpfvote-down-'.
|
496 |
}else{
|
497 |
$button_html[] = '<i class="not_reg_user fa fa-play fa-rotate-90 wpfcl-0"></i>';
|
498 |
}
|
499 |
break;
|
500 |
case 'isanswer':
|
501 |
-
$is_answer =
|
502 |
$is_answer = ( $is_answer == 0 ) ? '-not' : '';
|
503 |
if( is_user_logged_in() ){
|
504 |
$button_html[] = '<div id="wpf-answer-'. intval($postid) .'" class="wpf-toggle'. esc_attr($is_answer) .'-answer"><i class="fa fa-check"></i></div>';
|
@@ -659,7 +662,7 @@ class wpForoTemplate{
|
|
659 |
|
660 |
<?php if(isset($forumid)) : ?>
|
661 |
<?php $relative_ids = array();
|
662 |
-
|
663 |
foreach( $relative_ids as $key => $rel_forumid ) : ?>
|
664 |
<?php $forum = wpforo_forum($rel_forumid) ?>
|
665 |
<?php if(!empty($forum)): ?>
|
@@ -683,7 +686,7 @@ class wpForoTemplate{
|
|
683 |
|
684 |
<?php if(isset($forumid)) : ?>
|
685 |
<?php $relative_ids = array();
|
686 |
-
|
687 |
foreach( $relative_ids as $key => $rel_forumid ) : ?>
|
688 |
<?php $forum = wpforo_forum($rel_forumid) ?>
|
689 |
<?php if(!empty($forum)): ?>
|
@@ -732,7 +735,7 @@ class wpForoTemplate{
|
|
732 |
if(isset($item['type'])){
|
733 |
|
734 |
if( $type == 'topic' ){
|
735 |
-
if(
|
736 |
$icon['class'] = 'fa-eye-slash';
|
737 |
$icon['color'] = 'wpfcl-1';
|
738 |
$icon['title'] = wpforo_phrase('Private', false);
|
@@ -823,17 +826,17 @@ class wpForoTemplate{
|
|
823 |
public function member_buttons( $member ){
|
824 |
|
825 |
if(empty($member)) return false;
|
826 |
-
$profile_access = (
|
827 |
|
828 |
if( $profile_access ){
|
829 |
?>
|
830 |
-
<a class="wpf-member-profile-button" title="<?php wpforo_phrase('Profile') ?>" href="<?php echo esc_url(
|
831 |
<i class="fa fa-user"></i>
|
832 |
</a>
|
833 |
-
<a class="wpf-member-profile-button" title="<?php wpforo_phrase('Activity') ?>" href="<?php echo esc_url(
|
834 |
<i class="fa fa-comments-o"></i>
|
835 |
</a>
|
836 |
-
<a class="wpf-member-profile-button" title="<?php wpforo_phrase('Subscriptions') ?>" href="<?php echo esc_url(
|
837 |
<i class="fa fa-rss"></i>
|
838 |
</a>
|
839 |
<?php do_action( 'wpforo_member_info_buttons', $member ); ?>
|
@@ -845,7 +848,7 @@ class wpForoTemplate{
|
|
845 |
|
846 |
$socnets = array();
|
847 |
if(empty($member)) return false;
|
848 |
-
$social_access = (
|
849 |
|
850 |
if( $social_access ){
|
851 |
|
@@ -926,13 +929,13 @@ class wpForoTemplate{
|
|
926 |
}
|
927 |
|
928 |
public function init_member_templates(){
|
929 |
-
|
930 |
'account' => wpftpl('profile-account.php'),
|
931 |
'activity' => wpftpl('profile-activity.php'),
|
932 |
'subscriptions' => wpftpl('profile-subscriptions.php')
|
933 |
);
|
934 |
-
|
935 |
-
|
936 |
}
|
937 |
|
938 |
function has_menu(){
|
@@ -965,19 +968,19 @@ class wpForoTemplate{
|
|
965 |
|
966 |
function init_nav_menu(){
|
967 |
|
968 |
-
if(isset(
|
969 |
|
970 |
-
extract(
|
971 |
|
972 |
-
|
973 |
'href' => wpforo_home_url(),
|
974 |
'label' => wpforo_phrase('forums', FALSE),
|
975 |
'attr' => ( $template == 'forum' || $template == 'topic' || $template == 'post' ? ' class="wpforo-active"' : '' ),
|
976 |
'submenues' => array()
|
977 |
);
|
978 |
|
979 |
-
if(
|
980 |
-
|
981 |
'href' => wpforo_home_url('members'),
|
982 |
'label' => wpforo_phrase('members', FALSE),
|
983 |
'attr' => ( $template == 'members' ? ' class="wpforo-active"' : '' ),
|
@@ -985,7 +988,7 @@ class wpForoTemplate{
|
|
985 |
);
|
986 |
}
|
987 |
|
988 |
-
|
989 |
'href' => wpforo_home_url('recent'),
|
990 |
'label' => wpforo_phrase('Recent Posts', FALSE),
|
991 |
'attr' => ( $template == 'recent' ? ' class="wpforo-active"' : '' ),
|
@@ -994,31 +997,31 @@ class wpForoTemplate{
|
|
994 |
|
995 |
if( is_user_logged_in() ){
|
996 |
|
997 |
-
|
998 |
-
'href' =>
|
999 |
'label' => wpforo_phrase('my profile', FALSE),
|
1000 |
-
'attr' => ( isset(
|
1001 |
'submenues' => array()
|
1002 |
);
|
1003 |
-
|
1004 |
-
'href' =>
|
1005 |
'label' => wpforo_phrase('account', FALSE),
|
1006 |
-
'attr' => ( $template == 'account' &&
|
1007 |
'submenues' => array()
|
1008 |
);
|
1009 |
-
|
1010 |
-
'href' =>
|
1011 |
'label' => wpforo_phrase('activity', FALSE),
|
1012 |
-
'attr' => ( $template == 'activity' &&
|
1013 |
'submenues' => array()
|
1014 |
);
|
1015 |
-
|
1016 |
-
'href' =>
|
1017 |
'label' => wpforo_phrase('subscriptions', FALSE),
|
1018 |
-
'attr' => ( $template == 'subscriptions' &&
|
1019 |
'submenues' => array()
|
1020 |
);
|
1021 |
-
|
1022 |
'href' => wpforo_home_url('?wpforo=logout'),
|
1023 |
'label' => wpforo_phrase('logout', FALSE),
|
1024 |
'attr' => '',
|
@@ -1027,15 +1030,15 @@ class wpForoTemplate{
|
|
1027 |
|
1028 |
}else{
|
1029 |
|
1030 |
-
if( wpforo_feature('user-register'
|
1031 |
-
|
1032 |
'href' => wpforo_register_url(),
|
1033 |
'label' => wpforo_phrase('register', FALSE),
|
1034 |
'attr' => ( isset($_GET['wpforo']) && $_GET['wpforo'] == 'signup' ? ' class="wpforo-active"' : '' ),
|
1035 |
'submenues' => array()
|
1036 |
);
|
1037 |
}
|
1038 |
-
|
1039 |
'href' => wpforo_login_url(),
|
1040 |
'label' => wpforo_phrase('login', FALSE),
|
1041 |
'attr' => ( isset($_GET['wpforo']) && $_GET['wpforo'] == 'signin' ? ' class="wpforo-active"' : '' ),
|
@@ -1043,7 +1046,7 @@ class wpForoTemplate{
|
|
1043 |
);
|
1044 |
}
|
1045 |
|
1046 |
-
|
1047 |
}
|
1048 |
}
|
1049 |
|
@@ -1164,7 +1167,7 @@ class wpForoTemplate{
|
|
1164 |
}
|
1165 |
|
1166 |
if( !is_readable( WPFORO_THEME_DIR . '/' . $theme_file ) ){
|
1167 |
-
|
1168 |
}
|
1169 |
else{
|
1170 |
$theme_data = $this->find_theme_headers( WPFORO_THEME_DIR . '/' . $theme_file );
|
@@ -1183,10 +1186,10 @@ class wpForoTemplate{
|
|
1183 |
$theme['style'] = key($styles);
|
1184 |
$theme['styles'] = $styles;
|
1185 |
}
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
|
1191 |
/**
|
1192 |
*
|
@@ -1319,7 +1322,7 @@ class wpForoTemplate{
|
|
1319 |
}
|
1320 |
|
1321 |
public function copyright(){
|
1322 |
-
if( wpforo_feature('copyright'
|
1323 |
<div id="wpforo-poweredby">
|
1324 |
<p class="wpf-by">
|
1325 |
<span onclick='javascript:document.getElementById("bywpforo").style.display = "inline";document.getElementById("awpforo").style.display = "none";' id="awpforo"> <img align="absmiddle" title="<?php esc_attr( wpforo_phrase('Powered by') ) ?> wpForo version <?php echo esc_html(WPFORO_VERSION) ?>" alt="Powered by wpForo" class="wpdimg" src="<?php echo WPFORO_URL ?>/wpf-assets/images/wpforo-info.png" alt="wpForo"> </span><a id="bywpforo" target="_blank" href="http://wpforo.com/"> <?php wpforo_phrase('Powered by') ?> wpForo version <?php echo esc_html(WPFORO_VERSION) ?></a>
|
@@ -1332,10 +1335,12 @@ class wpForoTemplate{
|
|
1332 |
public function member_menu( $userid, $menu = array() ){
|
1333 |
if( empty($menu) ) $menu = array('profile' => 'fa-user', 'account' => 'fa-cog', 'activity' => 'fa-comments-o', 'subscriptions' => 'fa-rss');
|
1334 |
$menu = apply_filters('wpforo_member_menu_filter', $menu, $userid);
|
1335 |
-
if( !($userid ==
|
|
|
|
|
1336 |
foreach( $menu as $key => $value ) :
|
1337 |
?>
|
1338 |
-
<a class="wpf-profile-menu <?php echo (
|
1339 |
<i class="fa <?php echo sanitize_html_class($value) ?>"></i> <?php wpforo_phrase($key) ?>
|
1340 |
</a>
|
1341 |
<?php
|
@@ -1343,11 +1348,24 @@ class wpForoTemplate{
|
|
1343 |
}
|
1344 |
|
1345 |
public function member_template(){
|
1346 |
-
|
1347 |
-
extract(
|
1348 |
extract($user, EXTR_OVERWRITE);
|
1349 |
-
|
1350 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1351 |
}
|
1352 |
|
1353 |
public function member_error(){
|
@@ -1379,8 +1397,8 @@ class wpForoTemplate{
|
|
1379 |
'maxLength' => 0,
|
1380 |
'faIcon' => '',
|
1381 |
'html' => '',
|
1382 |
-
'varname' => (( isset(
|
1383 |
-
'template' => (( isset(
|
1384 |
'canBeInactive' => 1,
|
1385 |
'canEdit' => array('1'),
|
1386 |
'canView' => array('1', '2', '3', '5'),
|
@@ -1405,8 +1423,8 @@ class wpForoTemplate{
|
|
1405 |
if( $maxLength ) { $maxLength_attr = ($type == 'date' || $type == 'number' || $type == 'range') ? ' max="' . $maxLength . '" ' : ' maxlength="' . $maxLength . '" '; }
|
1406 |
$minmax = $minLength_attr . ' ' . $maxLength_attr;
|
1407 |
|
1408 |
-
$args['value'] = ( isset(
|
1409 |
-
if( !$isDefault && $varname ) $args['value'] = ( isset(
|
1410 |
$value = $args['value'];
|
1411 |
|
1412 |
if( $type == 'textarea' ){
|
@@ -1558,16 +1576,16 @@ class wpForoTemplate{
|
|
1558 |
if (!is_array($allowedGroupIds)) $allowedGroupIds = explode(',', trim($allowedGroupIds));
|
1559 |
$groupids = $allowedGroupIds;
|
1560 |
}
|
1561 |
-
if (
|
1562 |
|
1563 |
-
if(
|
1564 |
|
1565 |
$groupids = array_filter($groupids);
|
1566 |
if( $groupids ){
|
1567 |
$field_html = '<select ' . $isRequired . ' name="' . esc_attr($fieldName) . '" id="' . esc_attr($fieldId) . '" class="' . esc_attr($class) . '" ' . $isDisabled . ' ' . $attributes . '>';
|
1568 |
if (!$isRequired) $field_html .= '<option value="">' . wpforo_phrase('--- Choose ---', false) . '</option>';
|
1569 |
foreach ($groupids as $groupid) {
|
1570 |
-
if ( $group =
|
1571 |
$selected = ($groupid == $value) ? 'selected="selected"' : '';
|
1572 |
$field_html .= '<option value="' . esc_attr($groupid) . '" ' . $selected . '>' . $group['name'] . '</option>';
|
1573 |
}
|
@@ -1579,7 +1597,7 @@ class wpForoTemplate{
|
|
1579 |
$field_html = '<ul>
|
1580 |
<li><input ' . $isRequired . ' name="' . esc_attr($varname) . '[avatar_type]" id="wpfat_gravatar" value="gravatar" ' . ( $value == '' || $value == NULL ? 'checked="checked"' : '' ) . ' type="radio" /> <label for="wpfat_gravatar">' . wpforo_phrase('Wordpress avatar system', false) . '</label></li>
|
1581 |
<li><input name="' . esc_attr($varname) . '[avatar_type]" id="wpfat_remote" value="remote" ' . ( $value && strpos($value, 'wpforo/avatars') === FALSE ? 'checked="checked"' : '' ) . ' type="radio" /> <label for="wpfat_remote">' . wpforo_phrase('Specify avatar by URL:', false) . '</label> <input autocomplete="off" name="' . esc_attr($varname) . '[avatar_url]" value="" maxlength="300" data-wpfucf-minmaxlength="1,300" type="url" /></li>';
|
1582 |
-
if(
|
1583 |
$field_html .= '<li><input name="' . esc_attr($varname) . '[avatar_type]" id="wpfat_custom" value="custom" type="radio" /> <label for="wpfat_custom">' . wpforo_phrase('Upload an avatar', false) . '</label>' . ( strpos($value, 'wpforo/avatars') !== FALSE ? '<br /><img src="' . esc_url($value) . '" class="wpf-custom-avatar-img"/>' : '' ) .' <input class="wpf-custom-avatar" name="avatar" type="file" /> </li>';
|
1584 |
}
|
1585 |
$field_html .= '</ul>
|
@@ -1604,7 +1622,7 @@ class wpForoTemplate{
|
|
1604 |
|
1605 |
public function field_wrap( $args, $field_html ){
|
1606 |
if( !is_array($args) || empty($args) ) return $field_html; extract( $args ); $field_wrap_html = ''; $is_owner = false; $rIcon = '';
|
1607 |
-
if( isset(
|
1608 |
$field_name_class = sanitize_text_field($name);
|
1609 |
if( $isRequired ) $rIcon = ' <span class="wpf-field-required-icon" title="' . esc_attr(wpforo_phrase('Required field', false)) . '">*</span>';
|
1610 |
$field_required_class = ( $isRequired ) ? 'wpf-field-required' : '';
|
@@ -1629,12 +1647,12 @@ class wpForoTemplate{
|
|
1629 |
}
|
1630 |
elseif( $template == 'account' ){
|
1631 |
//if( !$isEditable && !$value ) return;
|
1632 |
-
if( isset(
|
1633 |
$canEdit = ( is_array($canEdit) ) ? $canEdit : array(1);
|
1634 |
-
if( !$is_owner && !in_array(
|
1635 |
-
if( $type == 'usergroup' && (
|
1636 |
-
if( $type == 'avatar' && (
|
1637 |
-
if( $name == 'signature' && (
|
1638 |
if( $name == 'user_login' ){ $description = ''; $faIcon = ''; $field_html = '<span class="wpf-username">' . $value . '</span>'; }
|
1639 |
if( !$isEditable && $name != 'user_login' ){
|
1640 |
$description = '';
|
@@ -1672,7 +1690,8 @@ class wpForoTemplate{
|
|
1672 |
$field_wrap_html .= '<div class="wpf-field-cl"></div></div>';
|
1673 |
}
|
1674 |
elseif( $template == 'profile' ){
|
1675 |
-
if(
|
|
|
1676 |
if( $type == 'textarea' ) $value = wpautop(wpforo_kses(stripslashes($value)));
|
1677 |
$field_wrap_html .= '<div class="wpf-field wpf-field-type-' . esc_attr($type) . ' wpf-field-name-' . esc_attr($field_name_class) . ' ' . esc_attr($field_required_class) . '" title="' . esc_attr($title) . '">';
|
1678 |
if( $type == 'html' ){
|
6 |
define('WPFORO_THEME_URL', WPFORO_URL . '/wpf-themes' );
|
7 |
|
8 |
class wpForoTemplate{
|
|
|
9 |
public $default;
|
10 |
public $options;
|
11 |
public $style;
|
12 |
public $theme;
|
13 |
|
14 |
+
function __construct(){
|
|
|
|
|
15 |
$this->init_defaults();
|
16 |
$this->init_options();
|
|
|
17 |
}
|
18 |
|
19 |
+
public function init(){
|
20 |
+
$this->init_hooks();
|
21 |
+
$this->init_member_templates();
|
22 |
+
$this->init_nav_menu();
|
23 |
+
}
|
24 |
+
|
25 |
private function init_hooks(){
|
26 |
if( is_wpforo_page() ){
|
27 |
add_filter("mce_external_plugins", array(&$this, 'add_tinymce_buttons'), 15);
|
65 |
$plugin_array['wpforo_pre_button'] = WPFORO_URL . '/wpf-assets/js/tinymce-pre.js';
|
66 |
$plugin_array['wpforo_link_button'] = WPFORO_URL . '/wpf-assets/js/tinymce-link.js';
|
67 |
$plugin_array['wpforo_source_code_button'] = WPFORO_URL . '/wpf-assets/js/tinymce-code.js';
|
68 |
+
$plugin_array['emoticons'] = WPFORO_URL . '/wpf-assets/js/tinymce-emoji.js';
|
69 |
return $plugin_array;
|
70 |
}
|
71 |
|
81 |
}
|
82 |
|
83 |
function topic_form($forumid){
|
84 |
+
if(!isset(WPF()->post->options['max_upload_size']) || !WPF()->post->options['max_upload_size']){ $server_mus = wpforo_human_size_to_bytes(ini_get('upload_max_filesize')); if( !$server_mus || $server_mus > 10485760 ) $server_mus = 10485760; WPF()->post->options['max_upload_size'] = $server_mus;}
|
85 |
?>
|
86 |
<div id="wpf-topic-create" class="wpf-topic-create">
|
87 |
<form name="topic" action="" enctype="multipart/form-data" method="POST">
|
106 |
'teeny'=> FALSE, // output the minimal editor config used in Press This
|
107 |
'dfw'=> false, // replace the default fullscreen with DFW (supported on the front - end in WordPress 3.4)
|
108 |
'tinymce'=> array(
|
109 |
+
'toolbar1' => 'bold,italic,underline,strikethrough,forecolor,bullist,numlist,hr,alignleft,aligncenter,alignright,alignjustify,link,unlink,blockquote,pre,undo,redo,pastetext,source_code,emoticons',
|
110 |
'toolbar2' => '',
|
111 |
'toolbar3' => '',
|
112 |
'toolbar4' => '',
|
121 |
<div class="wpf-extra-fields">
|
122 |
<?php do_action('wpforo_topic_form_extra_fields_before') ?>
|
123 |
<div class="wpf-main-fields">
|
124 |
+
<?php if(WPF()->perm->forum_can('s', $forumid)) : ?>
|
125 |
<input id="t_sticky" name="topic[type]" type="checkbox" value="1">
|
126 |
<i class="fa fa-exclamation fa-0x"></i> <label for="t_sticky" style="padding-bottom:2px; cursor: pointer;"><?php wpforo_phrase('Set Topic Sticky'); ?> </label>
|
127 |
<span class="wpfbs"> | </span>
|
128 |
<?php endif; ?>
|
129 |
+
<?php if(WPF()->perm->forum_can('p', $forumid) || WPF()->perm->forum_can('op', $forumid)) : ?>
|
130 |
<input id="t_private" name="topic[private]" type="checkbox" value="1">
|
131 |
<i class="fa fa-eye-slash fa-0x"></i> <label for="t_private" style="padding-bottom:2px; cursor: pointer;" title="<?php wpforo_phrase('Only Admins and Moderators can see your private topics.'); ?>"><?php wpforo_phrase('Private Topic'); ?> </label>
|
132 |
+
|
133 |
<?php endif; ?>
|
134 |
<?php do_action('wpforo_topic_form_buttons_hook'); ?>
|
135 |
</div>
|
136 |
+
<?php if( WPF()->perm->can_attach() ): ?>
|
137 |
+
<?php if(!defined('WPFOROATTACH_BASENAME') && WPF()->perm->forum_can('a', $forumid)): ?>
|
138 |
<div class="wpf-default-attachment" style="padding-top:5px;">
|
139 |
<label for="file"><?php wpforo_phrase('Attach file:') ?> </label> <input id="file" type="file" name="attachfile" />
|
140 |
+
<p><?php wpforo_phrase('Maximum allowed file size is'); echo ' ' . wpforo_print_size(WPF()->post->options['max_upload_size']); ?></p>
|
141 |
</div>
|
142 |
<?php endif; ?>
|
143 |
<?php endif; ?>
|
144 |
<?php do_action('wpforo_topic_form_extra_fields_after') ?>
|
145 |
</div>
|
146 |
+
<?php if( wpforo_feature('subscribe_checkbox_on_post_editor') ) : ?>
|
147 |
+
<div class="wpf-topic-sbs"><input id="wpf-topic-sbs" type="checkbox" name="wpforo_topic_subs" value="1" <?php echo ( wpforo_feature('subscribe_checkbox_default_status') ) ? 'checked="true" ' : ''; ?>/> <label for="wpf-topic-sbs"><?php wpforo_phrase('Subscribe to this topic') ?></label></div>
|
148 |
<?php endif; ?>
|
149 |
<input id="formbutton" type="submit" name="topic[save]" class="button button-primary forum_submit" value="<?php wpforo_phrase('Add Topic') ?>">
|
150 |
<div class="wpf-clear"></div>
|
195 |
<input type="hidden" name="movetopicid" value="<?php echo intval($topicid) ?>"/>
|
196 |
<input type="hidden" name="post[save]" value="move"/>
|
197 |
<select id="parent" name="topic[forumid]" class="postform">
|
198 |
+
<?php WPF()->forum->tree('select_box', FALSE, $topicid ); ?>
|
199 |
</select>
|
200 |
<input type="submit" value="<?php wpforo_phrase('Move') ?>"/>
|
201 |
</form>
|
208 |
|
209 |
$head_html = '<p id="wpf-reply-form-title">'.wpforo_phrase('Leave a reply', false).'</p>';
|
210 |
$head_html = apply_filters( 'wpforo_reply_form_head', $head_html, $args );
|
211 |
+
if(!isset(WPF()->post->options['max_upload_size']) || !WPF()->post->options['max_upload_size']){$server_mus = wpforo_human_size_to_bytes(ini_get('upload_max_filesize')); if( !$server_mus || $server_mus > 10485760 ) $server_mus = 10485760; WPF()->post->options['max_upload_size'] = $server_mus;}
|
212 |
?>
|
213 |
<div id="wpf-form-wrapper">
|
214 |
<?php echo $head_html; //this is a HTML content ?>
|
239 |
'dfw'=> false, // replace the default fullscreen with DFW (supported on the front - end in WordPress 3.4)
|
240 |
'editor_height' => '180',
|
241 |
'tinymce'=> array(
|
242 |
+
'toolbar1' => 'bold,italic,underline,strikethrough,forecolor,bullist,numlist,hr,alignleft,aligncenter,alignright,alignjustify,link,unlink,blockquote,pre,undo,redo,pastetext,source_code,emoticons',
|
243 |
'toolbar2' => '',
|
244 |
'toolbar3' => '',
|
245 |
'toolbar4' => '',
|
254 |
<div class="wpf-extra-fields">
|
255 |
<?php do_action('wpforo_reply_form_extra_fields_before') ?>
|
256 |
<?php do_action('wpforo_reply_form_buttons_hook'); ?>
|
257 |
+
<?php if( WPF()->perm->can_attach() ): ?>
|
258 |
+
<?php if(!defined('WPFOROATTACH_BASENAME') && WPF()->perm->forum_can('a', $forumid)): ?>
|
259 |
<div class="wpf-default-attachment">
|
260 |
<label for="file"><?php wpforo_phrase('Attach file:') ?> </label> <input id="file" type="file" name="attachfile" />
|
261 |
+
<p><?php wpforo_phrase('Maximum allowed file size is'); echo ' ' . wpforo_print_size(WPF()->post->options['max_upload_size']); ?></p>
|
262 |
</div>
|
263 |
<?php endif; ?>
|
264 |
<?php endif; ?>
|
265 |
<?php do_action('wpforo_reply_form_extra_fields_after') ?>
|
266 |
</div>
|
267 |
+
<?php if( wpforo_feature('subscribe_checkbox_on_post_editor') ) :
|
268 |
+
$args = array( "userid" => WPF()->current_userid , "itemid" => intval($topicid), "type" => "topic" );
|
269 |
+
$subscribe = WPF()->sbscrb->get_subscribe( $args );
|
270 |
if( !isset($subscribe['subid']) ) : ?>
|
271 |
+
<div class="wpf-topic-sbs"><input id="wpf-topic-sbs" type="checkbox" name="wpforo_topic_subs" value="1" <?php echo ( wpforo_feature('subscribe_checkbox_default_status') ) ? 'checked="true" ' : ''; ?> /> <label for="wpf-topic-sbs"><?php wpforo_phrase('Subscribe to this topic') ?></label></div>
|
272 |
<?php endif;
|
273 |
endif; ?>
|
274 |
<input id="formbutton" type="submit" name="post[save]" class="button button-primary forum_submit" value="<?php wpforo_phrase('Add Reply') ?>">
|
280 |
}
|
281 |
|
282 |
function pagenavi($paged, $items_count, $permalink = TRUE, $class = ''){
|
283 |
+
$items_per_page = ( WPF()->current_object['template'] == 'topic' ? WPF()->post->options['topics_per_page'] : WPF()->post->options['posts_per_page'] );
|
284 |
if($items_count <= $items_per_page) return;
|
285 |
|
286 |
$pages_count = ceil($items_count/$items_per_page);
|
319 |
$return = '';
|
320 |
|
321 |
if( $l_count ){
|
322 |
+
if($l_usernames[0]['ID'] == WPF()->current_userid) $l_usernames[0]['display_name'] = wpforo_phrase('You', FALSE);
|
323 |
if($l_count == 1){
|
324 |
+
$return = sprintf( wpforo_phrase('%s liked', FALSE), '<a href="' . esc_url(WPF()->member->get_profile_url($l_usernames[0]['ID'])) . '">'.esc_html($l_usernames[0]['display_name']).'</a>' );
|
325 |
}elseif($l_count == 2){
|
326 |
+
$return = sprintf( wpforo_phrase('%s and %s liked', FALSE), '<a href="' . esc_url(WPF()->member->get_profile_url($l_usernames[0]['ID'])) . '">'.esc_html($l_usernames[0]['display_name']).'</a>', '<a href="'.esc_url(WPF()->member->get_profile_url($l_usernames[1]['ID'])).'">'.esc_html($l_usernames[1]['display_name']).'</a>' );
|
327 |
}elseif($l_count == 3){
|
328 |
+
$return = sprintf( wpforo_phrase('%s, %s and %s liked', FALSE), '<a href="' . esc_url(WPF()->member->get_profile_url($l_usernames[0]['ID'])) .'">'.esc_html($l_usernames[0]['display_name']).'</a>', '<a href="'.esc_url(WPF()->member->get_profile_url($l_usernames[1]['ID'])).'">'.esc_html($l_usernames[1]['display_name']).'</a>', '<a href="'.esc_url(WPF()->member->get_profile_url($l_usernames[2]['ID'])).'">'.esc_html($l_usernames[2]['display_name']).'</a>' );
|
329 |
}elseif($l_count >= 4){
|
330 |
$l_count = $l_count - 3;
|
331 |
+
$return = sprintf( wpforo_phrase('%s, %s, %s and %d people liked', FALSE), '<a href="' . esc_url(WPF()->member->get_profile_url($l_usernames[0]['ID'])) .'">'.esc_html($l_usernames[0]['display_name']).'</a>', '<a href="'.esc_url(WPF()->member->get_profile_url($l_usernames[1]['ID'])).'">'.esc_html($l_usernames[1]['display_name']).'</a>', '<a href="'.esc_url(WPF()->member->get_profile_url($l_usernames[2]['ID'])).'">'.esc_html($l_usernames[2]['display_name']).'</a>', $l_count );
|
332 |
}
|
333 |
}
|
334 |
return $return;
|
375 |
|
376 |
case 'reply':
|
377 |
if($is_closed) break;
|
378 |
+
if( WPF()->perm->forum_can('cr', $forumid) ){
|
379 |
$button_html[] = '<span id="parentpostid'.intval($postid).'" class="wpforo-reply wpf-action add_post_button"><i class="fa fa-reply fa-rotate-180"></i>' . wpforo_phrase('Reply', false).'</span>';
|
380 |
}else{
|
381 |
$button_html[] = '<span class="wpf-action not_reg_user"><i class="fa fa-reply fa-rotate-180"></i> ' . wpforo_phrase('Reply', false).'</span>';
|
382 |
}
|
383 |
break;
|
384 |
case 'answer':
|
385 |
+
if( WPF()->perm->forum_can('cr', $forumid) ){
|
386 |
$button_html[] = '<span class="wpforo-answer wpf-button add_post_button"><i class="fa fa-pencil"></i> ' . wpforo_phrase('Answer', false).'</span>';
|
387 |
}else{
|
388 |
$button_html[] = '<span class="wpf-button not_reg_user"><i class="fa fa-pencil"></i> ' . wpforo_phrase('Answer', false).'</span>';
|
391 |
case 'comment':
|
392 |
if($is_closed) break;
|
393 |
$title = wpforo_phrase('Use comments to ask for more information or suggest improvements. Avoid answering questions in comments.', false);
|
394 |
+
if( WPF()->perm->forum_can('cr', $forumid) ) {
|
395 |
$button_html[] = '<span id="parentpostid'.intval($postid).'" class="wpforo-childreply wpf-button add_post_button" title="'.esc_attr($title).'"><i class="fa fa-comment"></i> ' . wpforo_phrase('Add a comment', false).'</span>';
|
396 |
}else{
|
397 |
$button_html[] = '<span class="not_reg_user wpf-button add_post_button" title="'.esc_attr($title).'"><i class="fa fa-comment"></i> ' . wpforo_phrase('Add a comment', false).'</span>';
|
399 |
break;
|
400 |
case 'quote':
|
401 |
if($is_closed) break;
|
402 |
+
if( WPF()->perm->forum_can('cr', $forumid) ) {
|
403 |
$button_html[] = '<span id="wpfquotepost'.intval($postid).'" class="wpforo-quote wpf-action"><i class="fa fa-quote-left fa-0x"></i>' . wpforo_phrase('Quote', false).'</span>';
|
404 |
}else{
|
405 |
$button_html[] = '<span class="wpf-action not_reg_user"><i class="fa fa-quote-left fa-0x"></i>' . wpforo_phrase('Quote', false).'</span>';
|
406 |
}
|
407 |
break;
|
408 |
case 'like':
|
409 |
+
if( WPF()->perm->forum_can('l', $forumid) ) {
|
410 |
+
$like_status = ( WPF()->post->is_liked( $postid, WPF()->current_userid ) === FALSE ? 'wpforo-like' : 'wpforo-unlike' );
|
411 |
$like_icon = ( $like_status == 'wpforo-like') ? 'up' : 'down';
|
412 |
$button_html[] = '<span id="wpflike'. intval($postid) .'" class="wpf-action '. sanitize_html_class($like_status) .'"><i id="likeicon'. intval($postid) .'" class="fa fa-thumbs-o-'. esc_attr($like_icon) .' fa-0x"></i><span id="liketext'. intval($postid) .'">' . wpforo_phrase( str_replace('wpforo-', '', $like_status), false) . '</span></span>';
|
413 |
}
|
414 |
break;
|
415 |
case 'report':
|
416 |
+
if( WPF()->perm->forum_can('r', $forumid) ) {
|
417 |
$button_html[] = '<span id="wpfreport'. intval($postid) .'" class="wpf-action wpforo-report"><i class="fa fa-exclamation-triangle"></i>' . wpforo_phrase('Report', false).'</span>';
|
418 |
}
|
419 |
break;
|
420 |
case 'sticky':
|
421 |
+
if( WPF()->perm->forum_can('s', $forumid) ) {
|
422 |
$sticky_status = ( $is_sticky ? 'wpforo-unsticky' : 'wpforo-sticky');
|
423 |
$button_html[] = '<span id="wpfsticky'. intval($topicid) .'" class="wpf-action '. sanitize_html_class($sticky_status) .'"><i class="fa fa-exclamation fa-0x"></i><span id="stickytext'. intval($topicid) .'">' . wpforo_phrase( str_replace('wpforo-', '', $sticky_status), false).'</span></span>';
|
424 |
}
|
425 |
break;
|
426 |
case 'private':
|
427 |
+
if( WPF()->perm->forum_can('p', $forumid) || (WPF()->current_userid == $post['userid'] && WPF()->perm->forum_can('op', $forumid)) ) {
|
428 |
$private_status = ( $is_private ? 'wpforo-public' : 'wpforo-private');
|
429 |
$private_icon = ( $private_status == 'wpforo-public') ? 'eye' : 'eye-slash';
|
430 |
$button_html[] = '<span id="wpfprivate'. intval($topicid) .'" class="wpf-action '. sanitize_html_class($private_status) .'"><i id="privateicon'. intval($topicid) .'" class="fa fa-'. esc_attr($private_icon) .' fa-0x"></i><span id="privatetext'. intval($topicid) .'">' . wpforo_phrase( str_replace('wpforo-', '', $private_status), false).'</span></span>';
|
431 |
}
|
432 |
break;
|
433 |
case 'solved':
|
434 |
+
if( WPF()->perm->forum_can('sv', $forumid) || (WPF()->current_userid == $post['userid'] && WPF()->perm->forum_can('osv', $forumid)) ) {
|
435 |
$solved_status = ( $is_solved ? 'wpforo-unsolved' : 'wpforo-solved');
|
436 |
$button_html[] = '<span id="wpfsolved'. intval($postid) .'" class="wpf-action '. sanitize_html_class($solved_status) .'"><i class="fa fa-check-circle fa-0x"></i><span id="solvedtext'. intval($postid) .'">' . wpforo_phrase( str_replace('wpforo-', '', $solved_status), false).'</span></span>';
|
437 |
}
|
438 |
break;
|
439 |
case 'approved':
|
440 |
+
if( WPF()->perm->forum_can('au', $forumid) ) {
|
441 |
$approve_status = ( !$is_approve ? 'wpforo-unapprove' : 'wpforo-approve');
|
442 |
$approve_icon = ( $approve_status == 'wpforo-unapprove') ? 'fa-exclamation-circle' : 'fa-check';
|
443 |
$button_html[] = '<span id="wpfapprove'. intval($postid) .'" class="wpf-action '. sanitize_html_class($approve_status) .'"><i id="approveicon'. intval($postid) .'" class="fa '. esc_attr($approve_icon) .' fa-0x"></i><span id="approvetext'. intval($postid) .'">' . wpforo_phrase( str_replace('wpforo-', '', $approve_status), false).'</span></span>';
|
444 |
}
|
445 |
break;
|
446 |
case 'close':
|
447 |
+
if( WPF()->perm->forum_can('cot', $forumid) ) {
|
448 |
$open_status = ( $is_closed ? 'wpforo-open' : 'wpforo-close' );
|
449 |
$open_icon = ($open_status == 'wpforo-open') ? 'unlock' : 'lock';
|
450 |
$button_html[] = '<span id="wpfclose'. intval($topicid) .'" class="wpf-action '. sanitize_html_class($open_status) .'"><i id="closeicon'. intval($topicid) .'" class="fa fa-'. esc_attr($open_icon) .' fa-0x"></i><span id="closetext'. intval($topicid) .'">' . wpforo_phrase( str_replace('wpforo-', '', $open_status), false).'</span></span>';
|
451 |
}
|
452 |
break;
|
453 |
case 'move':
|
454 |
+
if( WPF()->perm->forum_can('mt', $forumid) ) {
|
455 |
$button_html[] = '<span class="wpf-action wpforo-move"><i class="fa fa-share-square-o fa-0x"></i>' . wpforo_phrase('Move', false).'</span>';
|
456 |
}
|
457 |
break;
|
458 |
case 'edit':
|
459 |
if($is_closed) break;
|
460 |
+
if( WPF()->member->current_user_is_new() && $post['status'] ){
|
461 |
//New registered user's unapproved topic/post | No Edit button.
|
462 |
}
|
463 |
else{
|
464 |
$diff = current_time( 'timestamp', 1 ) - strtotime($post['created']);
|
465 |
+
if( WPF()->perm->forum_can( ($is_topic ? 'et' : 'er'), $forumid ) || (WPF()->current_userid == $post['userid'] && WPF()->perm->forum_can( ($is_topic ? 'eot' : 'eor' ), $forumid ) && $diff < WPF()->post->options[($is_topic ? 'eot' : 'eor' ).'_durr'] ) ) {
|
466 |
$a = ( $is_topic ) ? 'wpfedittopicpid' : '';
|
467 |
$b = ( $is_topic ) ? $postid : $postid;
|
468 |
$button_html[] = '<span id="'. esc_attr( $a . $b ) .'" class="wpforo-edit wpf-action"><i class="fa fa-edit fa-0x"></i>' . wpforo_phrase('Edit', false).'</span>';
|
470 |
}
|
471 |
break;
|
472 |
case 'delete':
|
473 |
+
if( WPF()->member->current_user_is_new() && $post['status'] ){
|
474 |
//New registered user's unapproved topic/post | No Delete button.
|
475 |
}
|
476 |
else{
|
477 |
$diff = current_time( 'timestamp', 1 ) - strtotime($post['created']);
|
478 |
+
if( WPF()->perm->forum_can( ($is_topic ? 'dt' : 'dr' ), $forumid ) || (WPF()->current_userid == $post['userid'] && WPF()->perm->forum_can( ($is_topic ? 'dot' : 'dor' ), $forumid ) && $diff < WPF()->post->options[($is_topic ? 'dot' : 'dor' ).'_durr']) ){
|
479 |
$a = ( $is_topic ) ? 'wpftopicdelete' : 'wpfreplydelete';
|
480 |
$b = ( $is_topic ) ? $topicid : $postid;
|
481 |
$button_html[] = '<span id="'. esc_attr( $a . $b ) .'" class="wpf-action wpforo-delete"><i class="fa fa-times fa-0x"></i>' . wpforo_phrase('Delete', false).'</span>';
|
483 |
}
|
484 |
break;
|
485 |
case 'link':
|
486 |
+
$url = ( $is_topic ) ? WPF()->topic->get_topic_url( $topic ) : wpforo_post( $postid, 'url' );
|
487 |
$button_html[] = '<a href="'. esc_url($url) .'"><i class="fa fa-link fa-0x"></i></a>';
|
488 |
break;
|
489 |
case 'positivevote':
|
490 |
+
if( WPF()->perm->forum_can('v', $forumid) ) {
|
491 |
+
$button_html[] = '<i itemtype="' . ( $is_topic ? 'topic' : 'reply' ) . '" id="wpfvote-up-'. wpforo_bigintval($postid) .'" class="voteup fa fa-play fa-rotate-270 wpfcl-0"></i>';
|
492 |
}else{
|
493 |
$button_html[] = '<i class="not_reg_user fa fa-play fa-rotate-270 wpfcl-0"></i>';
|
494 |
}
|
495 |
break;
|
496 |
case 'negativevote':
|
497 |
+
if( WPF()->perm->forum_can('v', $forumid) ) {
|
498 |
+
$button_html[] = '<i itemtype="' . ( $is_topic ? 'topic' : 'reply' ) . '" id="wpfvote-down-'. wpforo_bigintval($postid) .'" class="votedown fa fa-play fa-rotate-90 wpfcl-0"></i>';
|
499 |
}else{
|
500 |
$button_html[] = '<i class="not_reg_user fa fa-play fa-rotate-90 wpfcl-0"></i>';
|
501 |
}
|
502 |
break;
|
503 |
case 'isanswer':
|
504 |
+
$is_answer = WPF()->post->is_answered( $postid );
|
505 |
$is_answer = ( $is_answer == 0 ) ? '-not' : '';
|
506 |
if( is_user_logged_in() ){
|
507 |
$button_html[] = '<div id="wpf-answer-'. intval($postid) .'" class="wpf-toggle'. esc_attr($is_answer) .'-answer"><i class="fa fa-check"></i></div>';
|
662 |
|
663 |
<?php if(isset($forumid)) : ?>
|
664 |
<?php $relative_ids = array();
|
665 |
+
WPF()->forum->get_all_relative_ids($forumid, $relative_ids);
|
666 |
foreach( $relative_ids as $key => $rel_forumid ) : ?>
|
667 |
<?php $forum = wpforo_forum($rel_forumid) ?>
|
668 |
<?php if(!empty($forum)): ?>
|
686 |
|
687 |
<?php if(isset($forumid)) : ?>
|
688 |
<?php $relative_ids = array();
|
689 |
+
WPF()->forum->get_all_relative_ids($forumid, $relative_ids);
|
690 |
foreach( $relative_ids as $key => $rel_forumid ) : ?>
|
691 |
<?php $forum = wpforo_forum($rel_forumid) ?>
|
692 |
<?php if(!empty($forum)): ?>
|
735 |
if(isset($item['type'])){
|
736 |
|
737 |
if( $type == 'topic' ){
|
738 |
+
if(WPF()->topic->is_private($item['topicid'])){
|
739 |
$icon['class'] = 'fa-eye-slash';
|
740 |
$icon['color'] = 'wpfcl-1';
|
741 |
$icon['title'] = wpforo_phrase('Private', false);
|
826 |
public function member_buttons( $member ){
|
827 |
|
828 |
if(empty($member)) return false;
|
829 |
+
$profile_access = ( WPF()->perm->usergroup_can('vprf') ? true : false );
|
830 |
|
831 |
if( $profile_access ){
|
832 |
?>
|
833 |
+
<a class="wpf-member-profile-button" title="<?php wpforo_phrase('Profile') ?>" href="<?php echo esc_url(WPF()->member->profile_url($member)) ?>">
|
834 |
<i class="fa fa-user"></i>
|
835 |
</a>
|
836 |
+
<a class="wpf-member-profile-button" title="<?php wpforo_phrase('Activity') ?>" href="<?php echo esc_url(WPF()->member->profile_url($member, 'activity')) ?>">
|
837 |
<i class="fa fa-comments-o"></i>
|
838 |
</a>
|
839 |
+
<a class="wpf-member-profile-button" title="<?php wpforo_phrase('Subscriptions') ?>" href="<?php echo esc_url(WPF()->member->profile_url($member, 'subscriptions')) ?>">
|
840 |
<i class="fa fa-rss"></i>
|
841 |
</a>
|
842 |
<?php do_action( 'wpforo_member_info_buttons', $member ); ?>
|
848 |
|
849 |
$socnets = array();
|
850 |
if(empty($member)) return false;
|
851 |
+
$social_access = ( WPF()->perm->usergroup_can('vmsn') ? true : false );
|
852 |
|
853 |
if( $social_access ){
|
854 |
|
929 |
}
|
930 |
|
931 |
public function init_member_templates(){
|
932 |
+
WPF()->member_tpls = array(
|
933 |
'account' => wpftpl('profile-account.php'),
|
934 |
'activity' => wpftpl('profile-activity.php'),
|
935 |
'subscriptions' => wpftpl('profile-subscriptions.php')
|
936 |
);
|
937 |
+
WPF()->member_tpls = apply_filters('wpforo_member_templates_filter', WPF()->member_tpls);
|
938 |
+
WPF()->member_tpls['profile'] = wpftpl('profile-home.php');
|
939 |
}
|
940 |
|
941 |
function has_menu(){
|
968 |
|
969 |
function init_nav_menu(){
|
970 |
|
971 |
+
if(isset(WPF()->current_object) && !empty(WPF()->current_object)){
|
972 |
|
973 |
+
extract(WPF()->current_object, EXTR_OVERWRITE);
|
974 |
|
975 |
+
WPF()->menu['wpforo-home'] = array(
|
976 |
'href' => wpforo_home_url(),
|
977 |
'label' => wpforo_phrase('forums', FALSE),
|
978 |
'attr' => ( $template == 'forum' || $template == 'topic' || $template == 'post' ? ' class="wpforo-active"' : '' ),
|
979 |
'submenues' => array()
|
980 |
);
|
981 |
|
982 |
+
if(WPF()->perm->usergroup_can('vmem')){
|
983 |
+
WPF()->menu['wpforo-members'] = array(
|
984 |
'href' => wpforo_home_url('members'),
|
985 |
'label' => wpforo_phrase('members', FALSE),
|
986 |
'attr' => ( $template == 'members' ? ' class="wpforo-active"' : '' ),
|
988 |
);
|
989 |
}
|
990 |
|
991 |
+
WPF()->menu['wpforo-recent'] = array(
|
992 |
'href' => wpforo_home_url('recent'),
|
993 |
'label' => wpforo_phrase('Recent Posts', FALSE),
|
994 |
'attr' => ( $template == 'recent' ? ' class="wpforo-active"' : '' ),
|
997 |
|
998 |
if( is_user_logged_in() ){
|
999 |
|
1000 |
+
WPF()->menu['wpforo-profile-home'] = array(
|
1001 |
+
'href' => WPF()->member->get_profile_url(WPF()->current_userid),
|
1002 |
'label' => wpforo_phrase('my profile', FALSE),
|
1003 |
+
'attr' => ( isset(WPF()->member_tpls[$template]) && WPF()->member_tpls[$template] && WPF()->current_object['user_is_same_current_user'] ? ' class="wpforo-active"' : '' ),
|
1004 |
'submenues' => array()
|
1005 |
);
|
1006 |
+
WPF()->menu['wpforo-profile-account'] = array(
|
1007 |
+
'href' => WPF()->member->get_profile_url(WPF()->current_userid, 'account'),
|
1008 |
'label' => wpforo_phrase('account', FALSE),
|
1009 |
+
'attr' => ( $template == 'account' && WPF()->current_object['user_is_same_current_user'] ? ' class="wpforo-active"' : '' ),
|
1010 |
'submenues' => array()
|
1011 |
);
|
1012 |
+
WPF()->menu['wpforo-profile-activity'] = array(
|
1013 |
+
'href' => WPF()->member->get_profile_url(WPF()->current_userid, 'activity'),
|
1014 |
'label' => wpforo_phrase('activity', FALSE),
|
1015 |
+
'attr' => ( $template == 'activity' && WPF()->current_object['user_is_same_current_user'] ? ' class="wpforo-active"' : '' ),
|
1016 |
'submenues' => array()
|
1017 |
);
|
1018 |
+
WPF()->menu['wpforo-profile-subscriptions'] = array(
|
1019 |
+
'href' => WPF()->member->get_profile_url(WPF()->current_userid, 'subscriptions'),
|
1020 |
'label' => wpforo_phrase('subscriptions', FALSE),
|
1021 |
+
'attr' => ( $template == 'subscriptions' && WPF()->current_object['user_is_same_current_user'] ? ' class="wpforo-active"' : '' ),
|
1022 |
'submenues' => array()
|
1023 |
);
|
1024 |
+
WPF()->menu['wpforo-logout'] = array(
|
1025 |
'href' => wpforo_home_url('?wpforo=logout'),
|
1026 |
'label' => wpforo_phrase('logout', FALSE),
|
1027 |
'attr' => '',
|
1030 |
|
1031 |
}else{
|
1032 |
|
1033 |
+
if( wpforo_feature('user-register') ){
|
1034 |
+
WPF()->menu['wpforo-register'] = array(
|
1035 |
'href' => wpforo_register_url(),
|
1036 |
'label' => wpforo_phrase('register', FALSE),
|
1037 |
'attr' => ( isset($_GET['wpforo']) && $_GET['wpforo'] == 'signup' ? ' class="wpforo-active"' : '' ),
|
1038 |
'submenues' => array()
|
1039 |
);
|
1040 |
}
|
1041 |
+
WPF()->menu['wpforo-login'] = array(
|
1042 |
'href' => wpforo_login_url(),
|
1043 |
'label' => wpforo_phrase('login', FALSE),
|
1044 |
'attr' => ( isset($_GET['wpforo']) && $_GET['wpforo'] == 'signin' ? ' class="wpforo-active"' : '' ),
|
1046 |
);
|
1047 |
}
|
1048 |
|
1049 |
+
WPF()->menu = apply_filters('wpforo_menu_array_filter', WPF()->menu);
|
1050 |
}
|
1051 |
}
|
1052 |
|
1167 |
}
|
1168 |
|
1169 |
if( !is_readable( WPFORO_THEME_DIR . '/' . $theme_file ) ){
|
1170 |
+
$theme['error'] = __('Theme file not readable', 'wpforo') .' ('.$theme_file.')';
|
1171 |
}
|
1172 |
else{
|
1173 |
$theme_data = $this->find_theme_headers( WPFORO_THEME_DIR . '/' . $theme_file );
|
1186 |
$theme['style'] = key($styles);
|
1187 |
$theme['styles'] = $styles;
|
1188 |
}
|
1189 |
+
}
|
1190 |
+
|
1191 |
+
return $theme;
|
1192 |
+
}
|
1193 |
|
1194 |
/**
|
1195 |
*
|
1322 |
}
|
1323 |
|
1324 |
public function copyright(){
|
1325 |
+
if( wpforo_feature('copyright') ): ?>
|
1326 |
<div id="wpforo-poweredby">
|
1327 |
<p class="wpf-by">
|
1328 |
<span onclick='javascript:document.getElementById("bywpforo").style.display = "inline";document.getElementById("awpforo").style.display = "none";' id="awpforo"> <img align="absmiddle" title="<?php esc_attr( wpforo_phrase('Powered by') ) ?> wpForo version <?php echo esc_html(WPFORO_VERSION) ?>" alt="Powered by wpForo" class="wpdimg" src="<?php echo WPFORO_URL ?>/wpf-assets/images/wpforo-info.png" alt="wpForo"> </span><a id="bywpforo" target="_blank" href="http://wpforo.com/"> <?php wpforo_phrase('Powered by') ?> wpForo version <?php echo esc_html(WPFORO_VERSION) ?></a>
|
1335 |
public function member_menu( $userid, $menu = array() ){
|
1336 |
if( empty($menu) ) $menu = array('profile' => 'fa-user', 'account' => 'fa-cog', 'activity' => 'fa-comments-o', 'subscriptions' => 'fa-rss');
|
1337 |
$menu = apply_filters('wpforo_member_menu_filter', $menu, $userid);
|
1338 |
+
if( !($userid == WPF()->current_userid || WPF()->perm->usergroup_can('em')) ) unset($menu['account']);
|
1339 |
+
if( !($userid == WPF()->current_userid || WPF()->perm->usergroup_can('vpra')) ) unset($menu['activity']);
|
1340 |
+
if( !($userid == WPF()->current_userid || WPF()->perm->usergroup_can('vprs')) ) unset($menu['subscriptions']);
|
1341 |
foreach( $menu as $key => $value ) :
|
1342 |
?>
|
1343 |
+
<a class="wpf-profile-menu <?php echo ( WPF()->current_object['template'] == $key ? ' wpforo-active' : '' ) ?>" href="<?php echo esc_url( WPF()->member->get_profile_url($userid, $key) ) ?>">
|
1344 |
<i class="fa <?php echo sanitize_html_class($value) ?>"></i> <?php wpforo_phrase($key) ?>
|
1345 |
</a>
|
1346 |
<?php
|
1348 |
}
|
1349 |
|
1350 |
public function member_template(){
|
1351 |
+
$permission = true;
|
1352 |
+
extract(WPF()->current_object, EXTR_OVERWRITE);
|
1353 |
extract($user, EXTR_OVERWRITE);
|
1354 |
+
if( $template == 'account' && !($userid == WPF()->current_userid || WPF()->perm->usergroup_can('em')) ) $permission = false;
|
1355 |
+
if( $template == 'activity' && !($userid == WPF()->current_userid || WPF()->perm->usergroup_can('vpra')) ) $permission = false;
|
1356 |
+
if( $template == 'subscriptions' && !($userid == WPF()->current_userid || WPF()->perm->usergroup_can('vprs')) ) $permission = false;
|
1357 |
+
if( $permission ){
|
1358 |
+
include( (isset(WPF()->member_tpls[$template]) && WPF()->member_tpls[$template] ? WPF()->member_tpls[$template] : WPF()->member_tpls['profile']) );
|
1359 |
+
}
|
1360 |
+
else{
|
1361 |
+
?>
|
1362 |
+
<div class="wpfbg-7 wpf-page-message-wrap">
|
1363 |
+
<div class="wpf-page-message-text">
|
1364 |
+
<?php wpforo_phrase('You do not have permission to view this page') ?>
|
1365 |
+
</div>
|
1366 |
+
</div>
|
1367 |
+
<?php
|
1368 |
+
}
|
1369 |
}
|
1370 |
|
1371 |
public function member_error(){
|
1397 |
'maxLength' => 0,
|
1398 |
'faIcon' => '',
|
1399 |
'html' => '',
|
1400 |
+
'varname' => (( isset(WPF()->form['varname']) ) ? WPF()->form['varname'] : 'wpfdata'),
|
1401 |
+
'template' => (( isset(WPF()->form['template']) ) ? WPF()->form['template'] : WPF()->current_object['template']),
|
1402 |
'canBeInactive' => 1,
|
1403 |
'canEdit' => array('1'),
|
1404 |
'canView' => array('1', '2', '3', '5'),
|
1423 |
if( $maxLength ) { $maxLength_attr = ($type == 'date' || $type == 'number' || $type == 'range') ? ' max="' . $maxLength . '" ' : ' maxlength="' . $maxLength . '" '; }
|
1424 |
$minmax = $minLength_attr . ' ' . $maxLength_attr;
|
1425 |
|
1426 |
+
$args['value'] = ( isset(WPF()->form['value'][$name]) ) ? WPF()->form['value'][$name] : $args['value'];
|
1427 |
+
if( !$isDefault && $varname ) $args['value'] = ( isset(WPF()->form['value'][$varname][$name]) ) ? WPF()->form['value'][$varname][$name] : $args['value'];
|
1428 |
$value = $args['value'];
|
1429 |
|
1430 |
if( $type == 'textarea' ){
|
1576 |
if (!is_array($allowedGroupIds)) $allowedGroupIds = explode(',', trim($allowedGroupIds));
|
1577 |
$groupids = $allowedGroupIds;
|
1578 |
}
|
1579 |
+
if ( !WPF()->current_object['user_is_same_current_user'] && (WPF()->current_user_groupid == 1 || current_user_can('administrator') ) ) $groupids = WPF()->usergroup->get_usergroups('groupid');
|
1580 |
|
1581 |
+
if( WPF()->current_object['user_is_same_current_user'] && !in_array(WPF()->current_user_groupid, $allowedGroupIds) ) $groupids = array();
|
1582 |
|
1583 |
$groupids = array_filter($groupids);
|
1584 |
if( $groupids ){
|
1585 |
$field_html = '<select ' . $isRequired . ' name="' . esc_attr($fieldName) . '" id="' . esc_attr($fieldId) . '" class="' . esc_attr($class) . '" ' . $isDisabled . ' ' . $attributes . '>';
|
1586 |
if (!$isRequired) $field_html .= '<option value="">' . wpforo_phrase('--- Choose ---', false) . '</option>';
|
1587 |
foreach ($groupids as $groupid) {
|
1588 |
+
if ( $group = WPF()->usergroup->get_usergroup($groupid) ) {
|
1589 |
$selected = ($groupid == $value) ? 'selected="selected"' : '';
|
1590 |
$field_html .= '<option value="' . esc_attr($groupid) . '" ' . $selected . '>' . $group['name'] . '</option>';
|
1591 |
}
|
1597 |
$field_html = '<ul>
|
1598 |
<li><input ' . $isRequired . ' name="' . esc_attr($varname) . '[avatar_type]" id="wpfat_gravatar" value="gravatar" ' . ( $value == '' || $value == NULL ? 'checked="checked"' : '' ) . ' type="radio" /> <label for="wpfat_gravatar">' . wpforo_phrase('Wordpress avatar system', false) . '</label></li>
|
1599 |
<li><input name="' . esc_attr($varname) . '[avatar_type]" id="wpfat_remote" value="remote" ' . ( $value && strpos($value, 'wpforo/avatars') === FALSE ? 'checked="checked"' : '' ) . ' type="radio" /> <label for="wpfat_remote">' . wpforo_phrase('Specify avatar by URL:', false) . '</label> <input autocomplete="off" name="' . esc_attr($varname) . '[avatar_url]" value="" maxlength="300" data-wpfucf-minmaxlength="1,300" type="url" /></li>';
|
1600 |
+
if( WPF()->perm->usergroup_can('upa') ) {
|
1601 |
$field_html .= '<li><input name="' . esc_attr($varname) . '[avatar_type]" id="wpfat_custom" value="custom" type="radio" /> <label for="wpfat_custom">' . wpforo_phrase('Upload an avatar', false) . '</label>' . ( strpos($value, 'wpforo/avatars') !== FALSE ? '<br /><img src="' . esc_url($value) . '" class="wpf-custom-avatar-img"/>' : '' ) .' <input class="wpf-custom-avatar" name="avatar" type="file" /> </li>';
|
1602 |
}
|
1603 |
$field_html .= '</ul>
|
1622 |
|
1623 |
public function field_wrap( $args, $field_html ){
|
1624 |
if( !is_array($args) || empty($args) ) return $field_html; extract( $args ); $field_wrap_html = ''; $is_owner = false; $rIcon = '';
|
1625 |
+
if( isset(WPF()->current_object['user']['ID']) ) { $is_owner = wpforo_is_owner( WPF()->current_object['user']['ID'] ); }
|
1626 |
$field_name_class = sanitize_text_field($name);
|
1627 |
if( $isRequired ) $rIcon = ' <span class="wpf-field-required-icon" title="' . esc_attr(wpforo_phrase('Required field', false)) . '">*</span>';
|
1628 |
$field_required_class = ( $isRequired ) ? 'wpf-field-required' : '';
|
1647 |
}
|
1648 |
elseif( $template == 'account' ){
|
1649 |
//if( !$isEditable && !$value ) return;
|
1650 |
+
if( isset(WPF()->current_user_groupid) && isset($canEdit) && !empty($canEdit) ){
|
1651 |
$canEdit = ( is_array($canEdit) ) ? $canEdit : array(1);
|
1652 |
+
if( !$is_owner && !in_array( WPF()->current_user_groupid, $canEdit )) return;
|
1653 |
+
if( $type == 'usergroup' && (!WPF()->current_user_groupid == 1 || !current_user_can('administrator'))) return;
|
1654 |
+
if( $type == 'avatar' && (!WPF()->perm->usergroup_can('va') || !wpforo_feature('custom-avatars') || !wpforo_feature('avatars'))) return;
|
1655 |
+
if( $name == 'signature' && (!WPF()->perm->usergroup_can('ups') || !wpforo_feature('signature'))) return;
|
1656 |
if( $name == 'user_login' ){ $description = ''; $faIcon = ''; $field_html = '<span class="wpf-username">' . $value . '</span>'; }
|
1657 |
if( !$isEditable && $name != 'user_login' ){
|
1658 |
$description = '';
|
1690 |
$field_wrap_html .= '<div class="wpf-field-cl"></div></div>';
|
1691 |
}
|
1692 |
elseif( $template == 'profile' ){
|
1693 |
+
if( !$is_owner && !in_array( WPF()->current_user_groupid, $canView ) ){ return ''; }
|
1694 |
+
if( $type != 'html' && (!isset($value) || (!is_numeric($value) && empty($value))) ){ return ''; }
|
1695 |
if( $type == 'textarea' ) $value = wpautop(wpforo_kses(stripslashes($value)));
|
1696 |
$field_wrap_html .= '<div class="wpf-field wpf-field-type-' . esc_attr($type) . ' wpf-field-name-' . esc_attr($field_name_class) . ' ' . esc_attr($field_required_class) . '" title="' . esc_attr($title) . '">';
|
1697 |
if( $type == 'html' ){
|
wpf-includes/class-topics.php
CHANGED
@@ -3,13 +3,9 @@
|
|
3 |
if( !defined( 'ABSPATH' ) ) exit;
|
4 |
|
5 |
class wpForoTopic{
|
6 |
-
|
7 |
-
private $wpforo;
|
8 |
static $cache = array( 'topics' => array(), 'item' => array(), 'topic' => array() );
|
9 |
|
10 |
-
function __construct(
|
11 |
-
if(!isset($this->wpforo)) $this->wpforo = $wpForo;
|
12 |
-
}
|
13 |
|
14 |
public function get_cache( $var ){
|
15 |
if( isset(self::$cache[$var]) ) return self::$cache[$var];
|
@@ -18,7 +14,7 @@ class wpForoTopic{
|
|
18 |
private function unique_slug($slug){
|
19 |
$new_slug = wpforo_text($slug, 250, false);
|
20 |
$i = 2;
|
21 |
-
while(
|
22 |
$new_slug = wpforo_text($slug, 250, false) . '-' . $i;
|
23 |
$i++;
|
24 |
}
|
@@ -33,20 +29,20 @@ class wpForoTopic{
|
|
33 |
$args['body'] = $_REQUEST['postbody'];
|
34 |
}
|
35 |
|
36 |
-
if( !isset($args['body']) || !$args['body'] ){
|
37 |
|
38 |
if( !isset($args['forumid']) || !$args['forumid'] = intval($args['forumid']) ){
|
39 |
-
|
40 |
return FALSE;
|
41 |
}
|
42 |
|
43 |
-
if(
|
44 |
-
|
45 |
return FALSE;
|
46 |
}
|
47 |
|
48 |
if( !isset($args['title']) || !$args['title'] = trim(strip_tags($args['title'])) ){
|
49 |
-
|
50 |
return FALSE;
|
51 |
}
|
52 |
|
@@ -57,7 +53,7 @@ class wpForoTopic{
|
|
57 |
$args['slug'] = (isset($args['slug']) && $args['slug']) ? sanitize_title($args['slug']) : ((isset($args['title'])) ? sanitize_title($args['title']) : md5(time()));
|
58 |
$args['slug'] = $this->unique_slug($args['slug']);
|
59 |
$args['created'] = (isset($args['created']) ? sanitize_text_field($args['created']) : current_time( 'mysql', 1 ) );
|
60 |
-
$args['userid'] = (isset($args['userid']) ? intval($args['userid']) :
|
61 |
$args['name'] = (isset($args['name']) ? $args['name'] : '' );
|
62 |
$args['email'] = (isset($args['email']) ? $args['email'] : '' );
|
63 |
|
@@ -72,9 +68,9 @@ class wpForoTopic{
|
|
72 |
if(isset($slug)) $slug = sanitize_title($slug);
|
73 |
if(isset($created)) $created = sanitize_text_field($created);
|
74 |
if(isset($userid)) $userid = intval($userid);
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
if(isset($meta_key)) $meta_key = sanitize_text_field($meta_key);
|
79 |
if(isset($meta_desc)) $meta_desc = sanitize_text_field($meta_desc);
|
80 |
if(isset($name)) $name = strip_tags(trim($name));
|
@@ -87,16 +83,16 @@ class wpForoTopic{
|
|
87 |
do_action( 'wpforo_before_add_topic', $args );
|
88 |
|
89 |
if(
|
90 |
-
|
91 |
-
|
92 |
array(
|
93 |
'title' => stripslashes($title),
|
94 |
'slug' => $slug,
|
95 |
'forumid' => $forumid,
|
96 |
'userid' => $userid,
|
97 |
-
'type' =>
|
98 |
-
'status' =>
|
99 |
-
'private' =>
|
100 |
'created' => $created,
|
101 |
'modified' => $created,
|
102 |
'last_post' => 0,
|
@@ -111,10 +107,10 @@ class wpForoTopic{
|
|
111 |
array('%s','%s','%d','%d','%d','%d','%d','%s','%s','%d','%d','%d','%s','%s','%d','%s','%s')
|
112 |
)
|
113 |
){
|
114 |
-
$topicid =
|
115 |
if(
|
116 |
-
|
117 |
-
|
118 |
array(
|
119 |
'forumid' => $forumid,
|
120 |
'topicid' => $topicid,
|
@@ -124,17 +120,17 @@ class wpForoTopic{
|
|
124 |
'created' => $created,
|
125 |
'modified' => $created,
|
126 |
'is_first_post' => 1,
|
127 |
-
'status' =>
|
128 |
-
'private' =>
|
129 |
'name' => $name,
|
130 |
'email' => $email
|
131 |
),
|
132 |
array('%d','%d','%d','%s','%s','%s','%s','%d','%d','%d','%s','%s')
|
133 |
)
|
134 |
){
|
135 |
-
$first_postid =
|
136 |
-
if( FALSE !==
|
137 |
-
|
138 |
array( 'first_postid' => $first_postid, 'last_post' => $first_postid ),
|
139 |
array( 'topicid' => $topicid ),
|
140 |
array( '%d', '%d' ),
|
@@ -142,27 +138,31 @@ class wpForoTopic{
|
|
142 |
)
|
143 |
){
|
144 |
$questions = '';
|
145 |
-
$forum =
|
146 |
if( isset($forum['cat_layout']) && $forum['cat_layout'] == 3 ) $questions = ', `questions` = `questions` + 1 ';
|
147 |
|
148 |
-
|
149 |
-
|
150 |
|
151 |
$args['topicid'] = $topicid;
|
|
|
|
|
|
|
|
|
152 |
$args['topicurl'] = $this->get_topic_url($topicid);
|
153 |
|
154 |
do_action( 'wpforo_after_add_topic', $args );
|
155 |
|
156 |
wpforo_clean_cache($topicid, 'topic', $args);
|
157 |
-
|
158 |
-
|
159 |
return $topicid;
|
160 |
}
|
161 |
}
|
162 |
|
163 |
}
|
164 |
|
165 |
-
|
166 |
return FALSE;
|
167 |
}
|
168 |
|
@@ -175,7 +175,7 @@ class wpForoTopic{
|
|
175 |
do_action( 'wpforo_start_edit_topic', $args );
|
176 |
|
177 |
if( !$topic = $this->get_topic( $args['topicid'] ) ){
|
178 |
-
|
179 |
return FALSE;
|
180 |
}
|
181 |
|
@@ -205,11 +205,11 @@ class wpForoTopic{
|
|
205 |
|
206 |
|
207 |
if( !isset($topicid) ){
|
208 |
-
|
209 |
return FALSE;
|
210 |
}
|
211 |
if( !isset($title) || !$title = trim(strip_tags($title)) ){
|
212 |
-
|
213 |
return FALSE;
|
214 |
}
|
215 |
|
@@ -217,8 +217,8 @@ class wpForoTopic{
|
|
217 |
if(isset($body)) $body = preg_replace('#</pre>[\r\n\t\s\0]*<pre>#isu', "\r\n", $body);
|
218 |
|
219 |
$diff = current_time( 'timestamp', 1 ) - strtotime($topic['created']);
|
220 |
-
if( !(
|
221 |
-
|
222 |
return FALSE;
|
223 |
}
|
224 |
|
@@ -231,8 +231,8 @@ class wpForoTopic{
|
|
231 |
$name = ( isset($name) ? stripslashes($name) : stripslashes($topic['name']) );
|
232 |
$email = ( isset($email) ? stripslashes($email) : stripslashes($topic['email']) );
|
233 |
|
234 |
-
$t_update =
|
235 |
-
|
236 |
array(
|
237 |
'title' => $title,
|
238 |
'type' => $type,
|
@@ -248,20 +248,20 @@ class wpForoTopic{
|
|
248 |
);
|
249 |
|
250 |
if( isset($topic['first_postid']) ){
|
251 |
-
if( !$post =
|
252 |
-
|
253 |
return FALSE;
|
254 |
}
|
255 |
}
|
256 |
else{
|
257 |
-
|
258 |
return FALSE;
|
259 |
}
|
260 |
|
261 |
$body = ( (isset($body) && $body) ? stripslashes($body) : stripslashes($post['body']) );
|
262 |
|
263 |
-
$p_update =
|
264 |
-
|
265 |
array(
|
266 |
'title' => $title,
|
267 |
'body' => $body,
|
@@ -278,25 +278,25 @@ class wpForoTopic{
|
|
278 |
|
279 |
if($t_update !== FALSE && $p_update !== FALSE){
|
280 |
|
281 |
-
do_action( 'wpforo_after_edit_topic', array( '
|
282 |
|
283 |
wpforo_clean_cache($topicid, 'topic', $topic);
|
284 |
-
|
285 |
return $topicid;
|
286 |
}
|
287 |
|
288 |
-
|
289 |
return FALSE;
|
290 |
}
|
291 |
|
292 |
private function users_stats_incr_minus($topicid){
|
293 |
$topicid = intval($topicid);
|
294 |
$sql = "SELECT `userid`, IF(`parentid` = 0, 'answers', 'comments') AS `type`, COUNT(*) AS `quantity`
|
295 |
-
FROM `"
|
296 |
WHERE `is_first_post` != 1 AND `topicid` IN( $topicid )
|
297 |
GROUP BY `userid`, `parentid` = 0
|
298 |
ORDER BY `userid`, `type`";
|
299 |
-
if( $users_incr_stats =
|
300 |
$prev_userid = 0;
|
301 |
$sets = array();
|
302 |
foreach( $users_incr_stats as $users_incr_stat ){
|
@@ -304,8 +304,8 @@ class wpForoTopic{
|
|
304 |
|
305 |
if( $prev_userid != $users_incr_stat['userid'] && $prev_userid != 0 ){
|
306 |
if( !empty($sets) ){
|
307 |
-
$sql = "UPDATE IGNORE `"
|
308 |
-
|
309 |
}
|
310 |
$prev_userid = $users_incr_stat['userid'];
|
311 |
$sets = array();
|
@@ -317,8 +317,8 @@ class wpForoTopic{
|
|
317 |
}
|
318 |
|
319 |
if( !empty($sets) ){
|
320 |
-
$sql = "UPDATE IGNORE `"
|
321 |
-
|
322 |
}
|
323 |
}
|
324 |
}
|
@@ -342,49 +342,49 @@ class wpForoTopic{
|
|
342 |
do_action( 'wpforo_before_delete_topic', $topic );
|
343 |
|
344 |
$diff = current_time( 'timestamp', 1 ) - strtotime($topic['created']);
|
345 |
-
if( !(
|
346 |
-
|
347 |
return FALSE;
|
348 |
}
|
349 |
|
350 |
if( $forumid = $topic['forumid'] ){
|
351 |
|
352 |
$questions = '';
|
353 |
-
$forum =
|
354 |
if( isset($forum['cat_layout']) && $forum['cat_layout'] == 3 ){
|
355 |
$questions = ' `questions` = `questions` - 1 ';
|
356 |
$this->users_stats_incr_minus($topicid);
|
357 |
}
|
358 |
|
359 |
// START delete topic posts include first post
|
360 |
-
if( $postids =
|
361 |
-
|
362 |
-
"SELECT postid FROM
|
363 |
$topicid
|
364 |
)
|
365 |
)){
|
366 |
foreach ($postids as $postid) {
|
367 |
if( $postid == $topic['first_postid'] ){
|
368 |
-
return
|
369 |
}else{
|
370 |
-
|
371 |
}
|
372 |
}
|
373 |
}
|
374 |
// END delete topic posts include first post
|
375 |
|
376 |
-
if(
|
377 |
-
|
378 |
-
|
379 |
);
|
380 |
-
if(
|
381 |
-
"UPDATE IGNORE " .
|
382 |
SET `topics` = IF( (`topics` - 1) < 0, 0, `topics` - 1 )
|
383 |
WHERE `forumid` = " . intval($forumid)
|
384 |
)
|
385 |
){
|
386 |
-
if($questions)
|
387 |
-
"UPDATE IGNORE `" .
|
388 |
SET $questions
|
389 |
WHERE `userid` = " . intval($topic['userid'])
|
390 |
);
|
@@ -392,16 +392,16 @@ class wpForoTopic{
|
|
392 |
do_action( 'wpforo_after_delete_topic', $topic );
|
393 |
|
394 |
if( $delete_cache ) wpforo_clean_cache($topicid, 'topic', $topic);
|
395 |
-
|
396 |
-
|
397 |
|
398 |
-
|
399 |
return TRUE;
|
400 |
}
|
401 |
}
|
402 |
}
|
403 |
|
404 |
-
|
405 |
return FALSE;
|
406 |
}
|
407 |
|
@@ -421,7 +421,7 @@ class wpForoTopic{
|
|
421 |
function get_topic( $args = array() ){
|
422 |
|
423 |
if( !$args ) return;
|
424 |
-
$cache =
|
425 |
|
426 |
if(is_array($args)){
|
427 |
$default = array(
|
@@ -457,7 +457,7 @@ class wpForoTopic{
|
|
457 |
if(!empty($args)){
|
458 |
extract($args, EXTR_OVERWRITE);
|
459 |
|
460 |
-
$sql = "SELECT * FROM `"
|
461 |
$wheres = array();
|
462 |
if($topicid != NULL) $wheres[] = "`topicid` = " . intval($topicid);
|
463 |
if($slug != '') $wheres[] = "`slug` = '" . esc_sql($slug) . "'";
|
@@ -466,21 +466,21 @@ class wpForoTopic{
|
|
466 |
$sql .= " WHERE " . implode($wheres, " AND ");
|
467 |
}
|
468 |
|
469 |
-
$topic =
|
470 |
|
471 |
-
if( isset($topic['forumid']) && $topic['forumid'] &&
|
472 |
return array();
|
473 |
}
|
474 |
|
475 |
if( isset($topic['private']) && $topic['private'] && !wpforo_is_owner($topic['userid']) ){
|
476 |
-
if( isset($topic['forumid']) && $topic['forumid'] &&
|
477 |
return array();
|
478 |
}
|
479 |
}
|
480 |
|
481 |
if( isset($topic['status']) && $topic['status'] && !wpforo_is_owner($topic['userid'])){
|
482 |
-
if( isset($topic['forumid']) && $topic['forumid'] &&
|
483 |
-
|
484 |
return array();
|
485 |
}
|
486 |
}
|
@@ -507,7 +507,7 @@ class wpForoTopic{
|
|
507 |
*/
|
508 |
function get_topics($args = array(), &$items_count = 0 ){
|
509 |
|
510 |
-
$cache =
|
511 |
|
512 |
$default = array(
|
513 |
'include' => array(), // array( 2, 10, 25 )
|
@@ -517,7 +517,8 @@ class wpForoTopic{
|
|
517 |
'userid' => NULL, // user id in DB
|
518 |
'type' => 0, //0, 1, etc . . .
|
519 |
'status' => NULL, //0, 1, etc . . .
|
520 |
-
'private' => NULL, //0, 1, etc . . .
|
|
|
521 |
'orderby' => 'type, topicid', // type, topicid, modified, created
|
522 |
'order' => 'DESC', // ASC DESC
|
523 |
'offset' => NULL, // this use when you give row_count
|
@@ -545,17 +546,17 @@ class wpForoTopic{
|
|
545 |
if($type != 0) $wheres[] = " `type` = " . intval($type);
|
546 |
|
547 |
if(empty($forumids)){
|
548 |
-
if( isset($forumid) &&
|
549 |
return array();
|
550 |
}
|
551 |
}
|
552 |
|
553 |
if( isset($forumid) && $forumid ){
|
554 |
-
if(
|
555 |
if(!is_null($private)) $wheres[] = " `private` = " . intval($private);
|
556 |
}
|
557 |
-
elseif( isset(
|
558 |
-
$wheres[] = " ( `private` = 0 OR (`private` = 1 AND `userid` = " .intval(
|
559 |
}
|
560 |
else{
|
561 |
$wheres[] = " `private` = 0";
|
@@ -563,24 +564,28 @@ class wpForoTopic{
|
|
563 |
}
|
564 |
|
565 |
if( isset($forumid) && $forumid ){
|
566 |
-
if(
|
567 |
if(!is_null($status)) $wheres[] = " `status` = " . intval($status);
|
568 |
}
|
569 |
-
elseif( isset(
|
570 |
-
$wheres[] = " ( `status` = 0 OR (`status` = 1 AND `userid` = " .intval(
|
571 |
}
|
572 |
else{
|
573 |
$wheres[] = " `status` = 0";
|
574 |
}
|
575 |
}
|
|
|
|
|
|
|
|
|
576 |
|
577 |
-
$sql = "SELECT * FROM `"
|
578 |
if(!empty($wheres)){
|
579 |
$sql .= " WHERE " . implode($wheres, " AND ");
|
580 |
}
|
581 |
|
582 |
$item_count_sql = preg_replace('#SELECT.+?FROM#isu', 'SELECT count(*) FROM', $sql);
|
583 |
-
if( $item_count_sql ) $items_count =
|
584 |
|
585 |
$sql .= " ORDER BY " . str_replace(',', ' ' . esc_sql($order) . ',', esc_sql($orderby)) . " " . esc_sql($order);
|
586 |
|
@@ -592,23 +597,23 @@ class wpForoTopic{
|
|
592 |
}
|
593 |
}
|
594 |
|
595 |
-
if( $cache ){ $object_key = md5( $sql .
|
596 |
|
597 |
-
$topics =
|
598 |
$topics = apply_filters('wpforo_get_topics', $topics);
|
599 |
|
600 |
if(!empty($forumids) || !$forumid){
|
601 |
foreach($topics as $key => $topic){
|
602 |
-
if(
|
603 |
unset($topics[$key]);
|
604 |
}
|
605 |
if( isset($topics[$key]) && isset($topic['private']) && $topic['private'] && !wpforo_is_owner($topic['userid']) ){
|
606 |
-
if(
|
607 |
unset($topics[$key]);
|
608 |
}
|
609 |
}
|
610 |
if( isset($topics[$key]) && isset($topic['status']) && $topic['status'] && !wpforo_is_owner($topic['userid']) ){
|
611 |
-
if(
|
612 |
unset($topics[$key]);
|
613 |
}
|
614 |
}
|
@@ -628,16 +633,16 @@ class wpForoTopic{
|
|
628 |
$topics = $this->get_topics( $args );
|
629 |
if( !empty($topics) ){
|
630 |
foreach($topics as $key => $topic){
|
631 |
-
if(
|
632 |
unset($topics[$key]);
|
633 |
}
|
634 |
if( isset($topics[$key]) && isset($topic['private']) && $topic['private'] && !wpforo_is_owner($topic['userid']) ){
|
635 |
-
if(
|
636 |
unset($topics[$key]);
|
637 |
}
|
638 |
}
|
639 |
if( isset($topics[$key]) && isset($topic['status']) && $topic['status'] && !wpforo_is_owner($topic['userid']) ){
|
640 |
-
if(
|
641 |
unset($topics[$key]);
|
642 |
}
|
643 |
}
|
@@ -673,9 +678,9 @@ class wpForoTopic{
|
|
673 |
$topicids = array();
|
674 |
foreach($fields as $field){
|
675 |
if($field == 'body'){
|
676 |
-
$matches =
|
677 |
}else{
|
678 |
-
$matches =
|
679 |
}
|
680 |
$topicids = array_merge( $topicids, $matches );
|
681 |
}
|
@@ -687,69 +692,69 @@ class wpForoTopic{
|
|
687 |
}
|
688 |
|
689 |
function get_sum_answer($forumids){
|
690 |
-
$sum =
|
691 |
if($sum) return $sum;
|
692 |
return 0;
|
693 |
}
|
694 |
|
695 |
function get_forumslug($forumid){
|
696 |
-
$slug =
|
697 |
if($slug) return $slug;
|
698 |
return 0;
|
699 |
}
|
700 |
|
701 |
function get_forumslug_byid($topicid){
|
702 |
-
$slug =
|
703 |
if($slug) return $slug;
|
704 |
return 0;
|
705 |
}
|
706 |
|
707 |
function is_sticky( $topicid ){
|
708 |
-
if(
|
709 |
$type = wpforo_topic($topicid, 'type');
|
710 |
}
|
711 |
else{
|
712 |
-
$type =
|
713 |
}
|
714 |
if( $type == 1 ) return TRUE;
|
715 |
return FALSE;
|
716 |
}
|
717 |
|
718 |
function is_private( $topicid ){
|
719 |
-
if(
|
720 |
$private = wpforo_topic($topicid, 'private');
|
721 |
}
|
722 |
else{
|
723 |
-
$private =
|
724 |
}
|
725 |
if( $private == 1 ) return TRUE;
|
726 |
return FALSE;
|
727 |
}
|
728 |
|
729 |
function is_unapproved( $topicid ){
|
730 |
-
if(
|
731 |
$status = wpforo_topic($topicid, 'status');
|
732 |
}
|
733 |
else{
|
734 |
-
$status =
|
735 |
}
|
736 |
if( $status == 1 ) return TRUE;
|
737 |
return FALSE;
|
738 |
}
|
739 |
|
740 |
function is_closed( $topicid ){
|
741 |
-
if(
|
742 |
$type = wpforo_topic($topicid, 'closed');
|
743 |
}
|
744 |
else{
|
745 |
-
$type =
|
746 |
}
|
747 |
if( $type == 1 ) return TRUE;
|
748 |
return FALSE;
|
749 |
}
|
750 |
|
751 |
function is_solved( $topicid ){
|
752 |
-
$postid =
|
753 |
if( $postid ) return TRUE;
|
754 |
return FALSE;
|
755 |
}
|
@@ -759,27 +764,29 @@ class wpForoTopic{
|
|
759 |
*
|
760 |
* @since 1.0.0
|
761 |
*
|
762 |
-
* @param topicid
|
763 |
*
|
764 |
-
* @return false
|
765 |
*/
|
766 |
function move($topicid, $forumid){
|
767 |
$topic = $this->get_topic( $topicid );
|
768 |
-
if(
|
769 |
-
|
770 |
-
$post =
|
771 |
-
|
772 |
-
$this->wpforo->db->query( "UPDATE `".$this->wpforo->db->prefix."wpforo_forums` SET `topics` = `topics` - 1, `posts` = `posts` - ".intval($topic['posts'])." WHERE `forumid` = ".intval($topic['forumid']) );
|
773 |
-
$this->wpforo->db->query( "UPDATE `".$this->wpforo->db->prefix."wpforo_forums` SET `topics` = `topics` + 1, `posts` = `posts` + ".intval($topic['posts']).", `last_topicid` = ".intval($topicid).", `last_postid` = ".intval($topic['last_post']).", `last_userid` = ".intval($post['userid']).", `last_post_date` = '". esc_sql($post['created']) ."' WHERE `forumid` = ". intval($forumid) );
|
774 |
|
775 |
-
|
|
|
776 |
|
|
|
|
|
|
|
|
|
777 |
wpforo_clean_cache( $topicid, 'topic', $topic);
|
778 |
-
|
779 |
return $topicid;
|
780 |
}
|
781 |
|
782 |
-
|
783 |
return FALSE;
|
784 |
}
|
785 |
|
@@ -818,47 +825,47 @@ class wpForoTopic{
|
|
818 |
|
819 |
|
820 |
function get_count( $args = array() ){
|
821 |
-
$sql = "SELECT COUNT(`topicid`) FROM `"
|
822 |
if( !empty($args) ){
|
823 |
$wheres = array();
|
824 |
foreach ($args as $key => $value) $wheres[] = "`$key` = " . intval($value);
|
825 |
if($wheres) $sql .= " WHERE " . implode(' AND ', $wheres);
|
826 |
}
|
827 |
-
return
|
828 |
}
|
829 |
|
830 |
public function status( $topicid, $status ){
|
831 |
if( !$topicid = wpforo_bigintval($topicid) ) return false;
|
832 |
|
833 |
-
if( false !==
|
834 |
-
|
835 |
array( 'status' => intval($status) ),
|
836 |
array( 'topicid' => $topicid ),
|
837 |
array( '%d' ),
|
838 |
array( '%d' )
|
839 |
)){
|
840 |
-
if( false !==
|
841 |
-
|
842 |
array( 'status' => intval($status) ),
|
843 |
array( 'topicid' => $topicid ),
|
844 |
array( '%d' ),
|
845 |
array( '%d' )
|
846 |
)){
|
847 |
-
|
848 |
return true;
|
849 |
}
|
850 |
}
|
851 |
|
852 |
-
|
853 |
return false;
|
854 |
}
|
855 |
|
856 |
public function delete_attachments( $topicid ){
|
857 |
$args = array( 'topicid' => $topicid );
|
858 |
-
$posts =
|
859 |
if(!empty($posts)){
|
860 |
foreach( $posts as $post ){
|
861 |
-
|
862 |
}
|
863 |
}
|
864 |
}
|
3 |
if( !defined( 'ABSPATH' ) ) exit;
|
4 |
|
5 |
class wpForoTopic{
|
|
|
|
|
6 |
static $cache = array( 'topics' => array(), 'item' => array(), 'topic' => array() );
|
7 |
|
8 |
+
function __construct(){}
|
|
|
|
|
9 |
|
10 |
public function get_cache( $var ){
|
11 |
if( isset(self::$cache[$var]) ) return self::$cache[$var];
|
14 |
private function unique_slug($slug){
|
15 |
$new_slug = wpforo_text($slug, 250, false);
|
16 |
$i = 2;
|
17 |
+
while( WPF()->db->get_var("SELECT `topicid` FROM ".WPF()->db->prefix."wpforo_topics WHERE `slug` = '" . esc_sql($new_slug) . "'") ){
|
18 |
$new_slug = wpforo_text($slug, 250, false) . '-' . $i;
|
19 |
$i++;
|
20 |
}
|
29 |
$args['body'] = $_REQUEST['postbody'];
|
30 |
}
|
31 |
|
32 |
+
if( !isset($args['body']) || !$args['body'] ){ WPF()->notice->add('Post is empty', 'error'); return FALSE; }
|
33 |
|
34 |
if( !isset($args['forumid']) || !$args['forumid'] = intval($args['forumid']) ){
|
35 |
+
WPF()->notice->add('Add Topic error: No forum selected', 'error');
|
36 |
return FALSE;
|
37 |
}
|
38 |
|
39 |
+
if( !WPF()->perm->forum_can( 'ct', $args['forumid']) ){
|
40 |
+
WPF()->notice->add('You haven\'t permission to create topic into this forum', 'error');
|
41 |
return FALSE;
|
42 |
}
|
43 |
|
44 |
if( !isset($args['title']) || !$args['title'] = trim(strip_tags($args['title'])) ){
|
45 |
+
WPF()->notice->add('Please insert required fields!', 'error');
|
46 |
return FALSE;
|
47 |
}
|
48 |
|
53 |
$args['slug'] = (isset($args['slug']) && $args['slug']) ? sanitize_title($args['slug']) : ((isset($args['title'])) ? sanitize_title($args['title']) : md5(time()));
|
54 |
$args['slug'] = $this->unique_slug($args['slug']);
|
55 |
$args['created'] = (isset($args['created']) ? sanitize_text_field($args['created']) : current_time( 'mysql', 1 ) );
|
56 |
+
$args['userid'] = (isset($args['userid']) ? intval($args['userid']) : WPF()->current_userid );
|
57 |
$args['name'] = (isset($args['name']) ? $args['name'] : '' );
|
58 |
$args['email'] = (isset($args['email']) ? $args['email'] : '' );
|
59 |
|
68 |
if(isset($slug)) $slug = sanitize_title($slug);
|
69 |
if(isset($created)) $created = sanitize_text_field($created);
|
70 |
if(isset($userid)) $userid = intval($userid);
|
71 |
+
$type = ( isset($type) && $type ? 1 : 0 );
|
72 |
+
$status = ( isset($status) && $status ? 1 : 0 );
|
73 |
+
$private = ( isset($private) && $private ? 1 : 0 );
|
74 |
if(isset($meta_key)) $meta_key = sanitize_text_field($meta_key);
|
75 |
if(isset($meta_desc)) $meta_desc = sanitize_text_field($meta_desc);
|
76 |
if(isset($name)) $name = strip_tags(trim($name));
|
83 |
do_action( 'wpforo_before_add_topic', $args );
|
84 |
|
85 |
if(
|
86 |
+
WPF()->db->insert(
|
87 |
+
WPF()->db->prefix . 'wpforo_topics',
|
88 |
array(
|
89 |
'title' => stripslashes($title),
|
90 |
'slug' => $slug,
|
91 |
'forumid' => $forumid,
|
92 |
'userid' => $userid,
|
93 |
+
'type' => $type,
|
94 |
+
'status' => $status,
|
95 |
+
'private' => $private,
|
96 |
'created' => $created,
|
97 |
'modified' => $created,
|
98 |
'last_post' => 0,
|
107 |
array('%s','%s','%d','%d','%d','%d','%d','%s','%s','%d','%d','%d','%s','%s','%d','%s','%s')
|
108 |
)
|
109 |
){
|
110 |
+
$topicid = WPF()->db->insert_id;
|
111 |
if(
|
112 |
+
WPF()->db->insert(
|
113 |
+
WPF()->db->prefix . 'wpforo_posts',
|
114 |
array(
|
115 |
'forumid' => $forumid,
|
116 |
'topicid' => $topicid,
|
120 |
'created' => $created,
|
121 |
'modified' => $created,
|
122 |
'is_first_post' => 1,
|
123 |
+
'status' => $status,
|
124 |
+
'private' => $private,
|
125 |
'name' => $name,
|
126 |
'email' => $email
|
127 |
),
|
128 |
array('%d','%d','%d','%s','%s','%s','%s','%d','%d','%d','%s','%s')
|
129 |
)
|
130 |
){
|
131 |
+
$first_postid = WPF()->db->insert_id;
|
132 |
+
if( FALSE !== WPF()->db->update(
|
133 |
+
WPF()->db->prefix . 'wpforo_topics',
|
134 |
array( 'first_postid' => $first_postid, 'last_post' => $first_postid ),
|
135 |
array( 'topicid' => $topicid ),
|
136 |
array( '%d', '%d' ),
|
138 |
)
|
139 |
){
|
140 |
$questions = '';
|
141 |
+
$forum = WPF()->forum->get_forum($forumid);
|
142 |
if( isset($forum['cat_layout']) && $forum['cat_layout'] == 3 ) $questions = ', `questions` = `questions` + 1 ';
|
143 |
|
144 |
+
WPF()->db->query( "UPDATE " . WPF()->db->prefix . "wpforo_forums SET `last_post_date` = '" . esc_sql($created). "', `last_userid` = " . intval($userid). ", `last_topicid` = " . intval($topicid) . ", `last_postid` = " . intval($first_postid) . ", `topics` = `topics` + 1 , `posts` = `posts` + 1 WHERE `forumid` = " . intval($forumid) );
|
145 |
+
WPF()->db->query( "UPDATE " . WPF()->db->prefix . "wpforo_profiles SET `posts` = `posts` + 1 $questions WHERE `userid` = " . intval($userid) );
|
146 |
|
147 |
$args['topicid'] = $topicid;
|
148 |
+
$args['first_postid'] = $first_postid;
|
149 |
+
$args['type'] = $type;
|
150 |
+
$args['status'] = $status;
|
151 |
+
$args['private'] = $private;
|
152 |
$args['topicurl'] = $this->get_topic_url($topicid);
|
153 |
|
154 |
do_action( 'wpforo_after_add_topic', $args );
|
155 |
|
156 |
wpforo_clean_cache($topicid, 'topic', $args);
|
157 |
+
WPF()->member->reset($userid);
|
158 |
+
WPF()->notice->add('Your topic successfully added', 'success');
|
159 |
return $topicid;
|
160 |
}
|
161 |
}
|
162 |
|
163 |
}
|
164 |
|
165 |
+
WPF()->notice->add('Topic add error', 'error');
|
166 |
return FALSE;
|
167 |
}
|
168 |
|
175 |
do_action( 'wpforo_start_edit_topic', $args );
|
176 |
|
177 |
if( !$topic = $this->get_topic( $args['topicid'] ) ){
|
178 |
+
WPF()->notice->add('Topic not found.', 'error');
|
179 |
return FALSE;
|
180 |
}
|
181 |
|
205 |
|
206 |
|
207 |
if( !isset($topicid) ){
|
208 |
+
WPF()->notice->add('Topic edit error', 'error');
|
209 |
return FALSE;
|
210 |
}
|
211 |
if( !isset($title) || !$title = trim(strip_tags($title)) ){
|
212 |
+
WPF()->notice->add('Please insert required fields!', 'error');
|
213 |
return FALSE;
|
214 |
}
|
215 |
|
217 |
if(isset($body)) $body = preg_replace('#</pre>[\r\n\t\s\0]*<pre>#isu', "\r\n", $body);
|
218 |
|
219 |
$diff = current_time( 'timestamp', 1 ) - strtotime($topic['created']);
|
220 |
+
if( !(WPF()->perm->forum_can('et', $topic['forumid']) || (WPF()->current_userid == $topic['userid'] && WPF()->perm->forum_can('eot', $topic['forumid']) && $diff < WPF()->post->options['eot_durr'])) ){
|
221 |
+
WPF()->notice->add('You have no permission to edit this topic', 'error');
|
222 |
return FALSE;
|
223 |
}
|
224 |
|
231 |
$name = ( isset($name) ? stripslashes($name) : stripslashes($topic['name']) );
|
232 |
$email = ( isset($email) ? stripslashes($email) : stripslashes($topic['email']) );
|
233 |
|
234 |
+
$t_update = WPF()->db->update(
|
235 |
+
WPF()->db->prefix."wpforo_topics",
|
236 |
array(
|
237 |
'title' => $title,
|
238 |
'type' => $type,
|
248 |
);
|
249 |
|
250 |
if( isset($topic['first_postid']) ){
|
251 |
+
if( !$post = WPF()->post->get_post( $topic['first_postid'] ) ){
|
252 |
+
WPF()->notice->add('Topic first post data not found.', 'error');
|
253 |
return FALSE;
|
254 |
}
|
255 |
}
|
256 |
else{
|
257 |
+
WPF()->notice->add('Topic first post not found.', 'error');
|
258 |
return FALSE;
|
259 |
}
|
260 |
|
261 |
$body = ( (isset($body) && $body) ? stripslashes($body) : stripslashes($post['body']) );
|
262 |
|
263 |
+
$p_update = WPF()->db->update(
|
264 |
+
WPF()->db->prefix."wpforo_posts",
|
265 |
array(
|
266 |
'title' => $title,
|
267 |
'body' => $body,
|
278 |
|
279 |
if($t_update !== FALSE && $p_update !== FALSE){
|
280 |
|
281 |
+
do_action( 'wpforo_after_edit_topic', array( 'userid' => $topic['userid'], 'forumid' => $topic['forumid'], 'topicid' => $topicid, 'postid' => $topic['first_postid'], 'first_postid' => $topic['first_postid'], 'title' => $title, 'body' => $body, 'status' => $status, 'name' => $name, 'email' => $email ) );
|
282 |
|
283 |
wpforo_clean_cache($topicid, 'topic', $topic);
|
284 |
+
WPF()->notice->add('Topic successfully updated', 'success');
|
285 |
return $topicid;
|
286 |
}
|
287 |
|
288 |
+
WPF()->notice->add('Topic edit error', 'error');
|
289 |
return FALSE;
|
290 |
}
|
291 |
|
292 |
private function users_stats_incr_minus($topicid){
|
293 |
$topicid = intval($topicid);
|
294 |
$sql = "SELECT `userid`, IF(`parentid` = 0, 'answers', 'comments') AS `type`, COUNT(*) AS `quantity`
|
295 |
+
FROM `".WPF()->db->prefix."wpforo_posts`
|
296 |
WHERE `is_first_post` != 1 AND `topicid` IN( $topicid )
|
297 |
GROUP BY `userid`, `parentid` = 0
|
298 |
ORDER BY `userid`, `type`";
|
299 |
+
if( $users_incr_stats = WPF()->db->get_results($sql, ARRAY_A) ){
|
300 |
$prev_userid = 0;
|
301 |
$sets = array();
|
302 |
foreach( $users_incr_stats as $users_incr_stat ){
|
304 |
|
305 |
if( $prev_userid != $users_incr_stat['userid'] && $prev_userid != 0 ){
|
306 |
if( !empty($sets) ){
|
307 |
+
$sql = "UPDATE IGNORE `".WPF()->db->prefix."wpforo_profiles` SET ".implode(', ', $sets)." WHERE `userid` = " . intval($prev_userid);
|
308 |
+
WPF()->db->query($sql);
|
309 |
}
|
310 |
$prev_userid = $users_incr_stat['userid'];
|
311 |
$sets = array();
|
317 |
}
|
318 |
|
319 |
if( !empty($sets) ){
|
320 |
+
$sql = "UPDATE IGNORE `".WPF()->db->prefix."wpforo_profiles` SET ".implode(', ', $sets)." WHERE `userid` = " . intval($users_incr_stat['userid']);
|
321 |
+
WPF()->db->query($sql);
|
322 |
}
|
323 |
}
|
324 |
}
|
342 |
do_action( 'wpforo_before_delete_topic', $topic );
|
343 |
|
344 |
$diff = current_time( 'timestamp', 1 ) - strtotime($topic['created']);
|
345 |
+
if( !(WPF()->perm->forum_can('dt', $topic['forumid']) || (WPF()->current_userid == $topic['userid'] && WPF()->perm->forum_can('dot', $topic['forumid']) && $diff < WPF()->post->options['dot_durr'])) ){
|
346 |
+
WPF()->notice->add('You haven\'t permission to delete topic from this forum', 'error');
|
347 |
return FALSE;
|
348 |
}
|
349 |
|
350 |
if( $forumid = $topic['forumid'] ){
|
351 |
|
352 |
$questions = '';
|
353 |
+
$forum = WPF()->forum->get_forum($forumid);
|
354 |
if( isset($forum['cat_layout']) && $forum['cat_layout'] == 3 ){
|
355 |
$questions = ' `questions` = `questions` - 1 ';
|
356 |
$this->users_stats_incr_minus($topicid);
|
357 |
}
|
358 |
|
359 |
// START delete topic posts include first post
|
360 |
+
if( $postids = WPF()->db->get_col(
|
361 |
+
WPF()->db->prepare(
|
362 |
+
"SELECT `postid` FROM `".WPF()->db->prefix."wpforo_posts` WHERE `topicid` = %d ORDER BY `is_first_post`",
|
363 |
$topicid
|
364 |
)
|
365 |
)){
|
366 |
foreach ($postids as $postid) {
|
367 |
if( $postid == $topic['first_postid'] ){
|
368 |
+
return WPF()->post->delete($postid, false);
|
369 |
}else{
|
370 |
+
WPF()->post->delete($postid, false);
|
371 |
}
|
372 |
}
|
373 |
}
|
374 |
// END delete topic posts include first post
|
375 |
|
376 |
+
if( WPF()->db->delete(WPF()->db->prefix . 'wpforo_topics', array('topicid' => $topicid)) ){
|
377 |
+
WPF()->db->delete(
|
378 |
+
WPF()->db->prefix.'wpforo_views', array( 'topicid' => $topicid ), array( '%d' )
|
379 |
);
|
380 |
+
if(WPF()->db->query(
|
381 |
+
"UPDATE IGNORE " . WPF()->db->prefix . "wpforo_forums
|
382 |
SET `topics` = IF( (`topics` - 1) < 0, 0, `topics` - 1 )
|
383 |
WHERE `forumid` = " . intval($forumid)
|
384 |
)
|
385 |
){
|
386 |
+
if($questions) WPF()->db->query(
|
387 |
+
"UPDATE IGNORE `" . WPF()->db->prefix . "wpforo_profiles`
|
388 |
SET $questions
|
389 |
WHERE `userid` = " . intval($topic['userid'])
|
390 |
);
|
392 |
do_action( 'wpforo_after_delete_topic', $topic );
|
393 |
|
394 |
if( $delete_cache ) wpforo_clean_cache($topicid, 'topic', $topic);
|
395 |
+
WPF()->member->reset($topic['userid']);
|
396 |
+
WPF()->forum->rebuild_last_infos($forumid);
|
397 |
|
398 |
+
WPF()->notice->add('This topic successfully deleted', 'success');
|
399 |
return TRUE;
|
400 |
}
|
401 |
}
|
402 |
}
|
403 |
|
404 |
+
WPF()->notice->add('Topics delete error', 'error');
|
405 |
return FALSE;
|
406 |
}
|
407 |
|
421 |
function get_topic( $args = array() ){
|
422 |
|
423 |
if( !$args ) return;
|
424 |
+
$cache = WPF()->cache->on('memory_cashe');
|
425 |
|
426 |
if(is_array($args)){
|
427 |
$default = array(
|
457 |
if(!empty($args)){
|
458 |
extract($args, EXTR_OVERWRITE);
|
459 |
|
460 |
+
$sql = "SELECT * FROM `".WPF()->db->prefix."wpforo_topics`";
|
461 |
$wheres = array();
|
462 |
if($topicid != NULL) $wheres[] = "`topicid` = " . intval($topicid);
|
463 |
if($slug != '') $wheres[] = "`slug` = '" . esc_sql($slug) . "'";
|
466 |
$sql .= " WHERE " . implode($wheres, " AND ");
|
467 |
}
|
468 |
|
469 |
+
$topic = WPF()->db->get_row($sql, ARRAY_A);
|
470 |
|
471 |
+
if( isset($topic['forumid']) && $topic['forumid'] && !WPF()->perm->forum_can('vf', $topic['forumid']) ){
|
472 |
return array();
|
473 |
}
|
474 |
|
475 |
if( isset($topic['private']) && $topic['private'] && !wpforo_is_owner($topic['userid']) ){
|
476 |
+
if( isset($topic['forumid']) && $topic['forumid'] && !WPF()->perm->forum_can('vp', $topic['forumid']) ){
|
477 |
return array();
|
478 |
}
|
479 |
}
|
480 |
|
481 |
if( isset($topic['status']) && $topic['status'] && !wpforo_is_owner($topic['userid'])){
|
482 |
+
if( isset($topic['forumid']) && $topic['forumid'] && !WPF()->perm->forum_can('au', $topic['forumid']) ){
|
483 |
+
WPF()->current_object['status'] = 'unapproved';
|
484 |
return array();
|
485 |
}
|
486 |
}
|
507 |
*/
|
508 |
function get_topics($args = array(), &$items_count = 0 ){
|
509 |
|
510 |
+
$cache = WPF()->cache->on('object_cashe');
|
511 |
|
512 |
$default = array(
|
513 |
'include' => array(), // array( 2, 10, 25 )
|
517 |
'userid' => NULL, // user id in DB
|
518 |
'type' => 0, //0, 1, etc . . .
|
519 |
'status' => NULL, //0, 1, etc . . .
|
520 |
+
'private' => NULL, //0, 1, etc . . .''
|
521 |
+
'pollid' => NULL,
|
522 |
'orderby' => 'type, topicid', // type, topicid, modified, created
|
523 |
'order' => 'DESC', // ASC DESC
|
524 |
'offset' => NULL, // this use when you give row_count
|
546 |
if($type != 0) $wheres[] = " `type` = " . intval($type);
|
547 |
|
548 |
if(empty($forumids)){
|
549 |
+
if( isset($forumid) && !WPF()->perm->forum_can('vf', $forumid) ){
|
550 |
return array();
|
551 |
}
|
552 |
}
|
553 |
|
554 |
if( isset($forumid) && $forumid ){
|
555 |
+
if( WPF()->perm->forum_can('vp', $forumid) ){
|
556 |
if(!is_null($private)) $wheres[] = " `private` = " . intval($private);
|
557 |
}
|
558 |
+
elseif( isset(WPF()->current_userid) && WPF()->current_userid ){
|
559 |
+
$wheres[] = " ( `private` = 0 OR (`private` = 1 AND `userid` = " .intval(WPF()->current_userid). ") )";
|
560 |
}
|
561 |
else{
|
562 |
$wheres[] = " `private` = 0";
|
564 |
}
|
565 |
|
566 |
if( isset($forumid) && $forumid ){
|
567 |
+
if( WPF()->perm->forum_can('au', $forumid) ){
|
568 |
if(!is_null($status)) $wheres[] = " `status` = " . intval($status);
|
569 |
}
|
570 |
+
elseif( isset(WPF()->current_userid) && WPF()->current_userid ){
|
571 |
+
$wheres[] = " ( `status` = 0 OR (`status` = 1 AND `userid` = " .intval(WPF()->current_userid). ") )";
|
572 |
}
|
573 |
else{
|
574 |
$wheres[] = " `status` = 0";
|
575 |
}
|
576 |
}
|
577 |
+
|
578 |
+
if( function_exists('WPF_POLL') ){
|
579 |
+
if( !is_null($pollid) ) $wheres[] = " `pollid` <> 0";
|
580 |
+
}
|
581 |
|
582 |
+
$sql = "SELECT * FROM `".WPF()->db->prefix."wpforo_topics`";
|
583 |
if(!empty($wheres)){
|
584 |
$sql .= " WHERE " . implode($wheres, " AND ");
|
585 |
}
|
586 |
|
587 |
$item_count_sql = preg_replace('#SELECT.+?FROM#isu', 'SELECT count(*) FROM', $sql);
|
588 |
+
if( $item_count_sql ) $items_count = WPF()->db->get_var($item_count_sql);
|
589 |
|
590 |
$sql .= " ORDER BY " . str_replace(',', ' ' . esc_sql($order) . ',', esc_sql($orderby)) . " " . esc_sql($order);
|
591 |
|
597 |
}
|
598 |
}
|
599 |
|
600 |
+
if( $cache ){ $object_key = md5( $sql . WPF()->current_user_groupid ); $object_cache = WPF()->cache->get( $object_key ); if( !empty($object_cache) ){ $items_count = $object_cache['items_count']; return $object_cache['items']; }}
|
601 |
|
602 |
+
$topics = WPF()->db->get_results($sql, ARRAY_A);
|
603 |
$topics = apply_filters('wpforo_get_topics', $topics);
|
604 |
|
605 |
if(!empty($forumids) || !$forumid){
|
606 |
foreach($topics as $key => $topic){
|
607 |
+
if( !WPF()->perm->forum_can('vf', $topic['forumid']) ){
|
608 |
unset($topics[$key]);
|
609 |
}
|
610 |
if( isset($topics[$key]) && isset($topic['private']) && $topic['private'] && !wpforo_is_owner($topic['userid']) ){
|
611 |
+
if( !WPF()->perm->forum_can('vp', $topic['forumid']) ){
|
612 |
unset($topics[$key]);
|
613 |
}
|
614 |
}
|
615 |
if( isset($topics[$key]) && isset($topic['status']) && $topic['status'] && !wpforo_is_owner($topic['userid']) ){
|
616 |
+
if( !WPF()->perm->forum_can('au', $topic['forumid']) ){
|
617 |
unset($topics[$key]);
|
618 |
}
|
619 |
}
|
633 |
$topics = $this->get_topics( $args );
|
634 |
if( !empty($topics) ){
|
635 |
foreach($topics as $key => $topic){
|
636 |
+
if( !WPF()->perm->forum_can('vf', $topic['forumid']) ){
|
637 |
unset($topics[$key]);
|
638 |
}
|
639 |
if( isset($topics[$key]) && isset($topic['private']) && $topic['private'] && !wpforo_is_owner($topic['userid']) ){
|
640 |
+
if( !WPF()->perm->forum_can('vp', $topic['forumid']) ){
|
641 |
unset($topics[$key]);
|
642 |
}
|
643 |
}
|
644 |
if( isset($topics[$key]) && isset($topic['status']) && $topic['status'] && !wpforo_is_owner($topic['userid']) ){
|
645 |
+
if( !WPF()->perm->forum_can('au', $topic['forumid']) ){
|
646 |
unset($topics[$key]);
|
647 |
}
|
648 |
}
|
678 |
$topicids = array();
|
679 |
foreach($fields as $field){
|
680 |
if($field == 'body'){
|
681 |
+
$matches = WPF()->db->get_col( "SELECT `topicid` FROM ".WPF()->db->prefix."wpforo_posts WHERE `".esc_sql($field)."` LIKE '%". esc_sql(sanitize_text_field($needle)) ."%'" );
|
682 |
}else{
|
683 |
+
$matches = WPF()->db->get_col( "SELECT `topicid` FROM ".WPF()->db->prefix."wpforo_topics WHERE `".esc_sql($field)."`LIKE '%". esc_sql(sanitize_text_field($needle)) ."%'" );
|
684 |
}
|
685 |
$topicids = array_merge( $topicids, $matches );
|
686 |
}
|
692 |
}
|
693 |
|
694 |
function get_sum_answer($forumids){
|
695 |
+
$sum = WPF()->db->get_var("SELECT SUM(`answers`) FROM `".WPF()->db->prefix."wpforo_topics` WHERE `forumid` IN(". implode(', ', array_map('intval', $forumids)) .")");
|
696 |
if($sum) return $sum;
|
697 |
return 0;
|
698 |
}
|
699 |
|
700 |
function get_forumslug($forumid){
|
701 |
+
$slug = WPF()->db->get_var("SELECT `slug` FROM ".WPF()->db->prefix."wpforo_forums WHERE `forumid` = " . intval($forumid));
|
702 |
if($slug) return $slug;
|
703 |
return 0;
|
704 |
}
|
705 |
|
706 |
function get_forumslug_byid($topicid){
|
707 |
+
$slug = WPF()->db->get_var("SELECT `slug` FROM ".WPF()->db->prefix."wpforo_forums WHERE `forumid` =(SELECT forumid FROM `".WPF()->db->prefix."wpforo_topics` WHERE `topicid` =".intval($topicid).")");
|
708 |
if($slug) return $slug;
|
709 |
return 0;
|
710 |
}
|
711 |
|
712 |
function is_sticky( $topicid ){
|
713 |
+
if( WPF()->cache->on('object_cashe') ){
|
714 |
$type = wpforo_topic($topicid, 'type');
|
715 |
}
|
716 |
else{
|
717 |
+
$type = WPF()->db->get_var( "SELECT `type` FROM " . WPF()->db->prefix."wpforo_topics WHERE `topicid` = " . intval($topicid) );
|
718 |
}
|
719 |
if( $type == 1 ) return TRUE;
|
720 |
return FALSE;
|
721 |
}
|
722 |
|
723 |
function is_private( $topicid ){
|
724 |
+
if( WPF()->cache->on('object_cashe') ){
|
725 |
$private = wpforo_topic($topicid, 'private');
|
726 |
}
|
727 |
else{
|
728 |
+
$private = WPF()->db->get_var( "SELECT `private` FROM " . WPF()->db->prefix."wpforo_topics WHERE `topicid` = " . intval($topicid) );
|
729 |
}
|
730 |
if( $private == 1 ) return TRUE;
|
731 |
return FALSE;
|
732 |
}
|
733 |
|
734 |
function is_unapproved( $topicid ){
|
735 |
+
if( WPF()->cache->on('object_cashe') ){
|
736 |
$status = wpforo_topic($topicid, 'status');
|
737 |
}
|
738 |
else{
|
739 |
+
$status = WPF()->db->get_var( "SELECT `status` FROM " . WPF()->db->prefix."wpforo_topics WHERE `topicid` = " . intval($topicid) );
|
740 |
}
|
741 |
if( $status == 1 ) return TRUE;
|
742 |
return FALSE;
|
743 |
}
|
744 |
|
745 |
function is_closed( $topicid ){
|
746 |
+
if( WPF()->cache->on('object_cashe') ){
|
747 |
$type = wpforo_topic($topicid, 'closed');
|
748 |
}
|
749 |
else{
|
750 |
+
$type = WPF()->db->get_var( "SELECT `closed` FROM " . WPF()->db->prefix."wpforo_topics WHERE `topicid` = " . intval($topicid) );
|
751 |
}
|
752 |
if( $type == 1 ) return TRUE;
|
753 |
return FALSE;
|
754 |
}
|
755 |
|
756 |
function is_solved( $topicid ){
|
757 |
+
$postid = WPF()->db->get_var( "SELECT `postid` FROM " . WPF()->db->prefix."wpforo_posts WHERE `is_answer` = 1 AND `topicid` = " . intval($topicid) . " LIMIT 1" );
|
758 |
if( $postid ) return TRUE;
|
759 |
return FALSE;
|
760 |
}
|
764 |
*
|
765 |
* @since 1.0.0
|
766 |
*
|
767 |
+
* @param $topicid,$forumid
|
768 |
*
|
769 |
+
* @return false|$topicid
|
770 |
*/
|
771 |
function move($topicid, $forumid){
|
772 |
$topic = $this->get_topic( $topicid );
|
773 |
+
if( WPF()->db->query( "UPDATE `".WPF()->db->prefix."wpforo_topics` SET `forumid` = ". intval($forumid) ." WHERE `topicid` = ". intval($topicid) ) ){
|
774 |
+
WPF()->db->query( "UPDATE `".WPF()->db->prefix."wpforo_posts` SET `forumid` = ". intval($forumid) ." WHERE `topicid` = ". intval($topicid) );
|
775 |
+
$post = WPF()->post->get_post($topic['last_post']);
|
|
|
|
|
|
|
776 |
|
777 |
+
WPF()->db->query( "UPDATE `".WPF()->db->prefix."wpforo_forums` SET `topics` = `topics` - 1, `posts` = `posts` - ".intval($topic['posts'])." WHERE `forumid` = ".intval($topic['forumid']) );
|
778 |
+
WPF()->db->query( "UPDATE `".WPF()->db->prefix."wpforo_forums` SET `topics` = `topics` + 1, `posts` = `posts` + ".intval($topic['posts']).", `last_topicid` = ".intval($topicid).", `last_postid` = ".intval($topic['last_post']).", `last_userid` = ".intval($post['userid']).", `last_post_date` = '". esc_sql($post['created']) ."' WHERE `forumid` = ". intval($forumid) );
|
779 |
|
780 |
+
WPF()->forum->rebuild_last_infos($topic['forumid']);
|
781 |
+
|
782 |
+
do_action('wpforo_after_move_topic', $topic, $forumid);
|
783 |
+
|
784 |
wpforo_clean_cache( $topicid, 'topic', $topic);
|
785 |
+
WPF()->notice->add('Topic successfully moved', 'success');
|
786 |
return $topicid;
|
787 |
}
|
788 |
|
789 |
+
WPF()->notice->add('Topic Move Error', 'error');
|
790 |
return FALSE;
|
791 |
}
|
792 |
|
825 |
|
826 |
|
827 |
function get_count( $args = array() ){
|
828 |
+
$sql = "SELECT COUNT(`topicid`) FROM `".WPF()->db->prefix."wpforo_topics`";
|
829 |
if( !empty($args) ){
|
830 |
$wheres = array();
|
831 |
foreach ($args as $key => $value) $wheres[] = "`$key` = " . intval($value);
|
832 |
if($wheres) $sql .= " WHERE " . implode(' AND ', $wheres);
|
833 |
}
|
834 |
+
return WPF()->db->get_var($sql);
|
835 |
}
|
836 |
|
837 |
public function status( $topicid, $status ){
|
838 |
if( !$topicid = wpforo_bigintval($topicid) ) return false;
|
839 |
|
840 |
+
if( false !== WPF()->db->update(
|
841 |
+
WPF()->db->prefix."wpforo_topics",
|
842 |
array( 'status' => intval($status) ),
|
843 |
array( 'topicid' => $topicid ),
|
844 |
array( '%d' ),
|
845 |
array( '%d' )
|
846 |
)){
|
847 |
+
if( false !== WPF()->db->update(
|
848 |
+
WPF()->db->prefix."wpforo_posts",
|
849 |
array( 'status' => intval($status) ),
|
850 |
array( 'topicid' => $topicid ),
|
851 |
array( '%d' ),
|
852 |
array( '%d' )
|
853 |
)){
|
854 |
+
WPF()->notice->add('Done!', 'success');
|
855 |
return true;
|
856 |
}
|
857 |
}
|
858 |
|
859 |
+
WPF()->notice->add('error: Change Status action', 'error');
|
860 |
return false;
|
861 |
}
|
862 |
|
863 |
public function delete_attachments( $topicid ){
|
864 |
$args = array( 'topicid' => $topicid );
|
865 |
+
$posts = WPF()->post->get_posts( $args );
|
866 |
if(!empty($posts)){
|
867 |
foreach( $posts as $post ){
|
868 |
+
WPF()->post->delete_attachments( $post['postid'] );
|
869 |
}
|
870 |
}
|
871 |
}
|
wpf-includes/class-usergroups.php
CHANGED
@@ -3,15 +3,13 @@
|
|
3 |
if( !defined( 'ABSPATH' ) ) exit;
|
4 |
|
5 |
class wpForoUsergroup{
|
6 |
-
private $wpforo;
|
7 |
public $default;
|
8 |
public $default_groupid;
|
9 |
public $cans;
|
10 |
|
11 |
static $cache = array( 'usergroup' => array(), 'user' => array() );
|
12 |
|
13 |
-
function __construct(
|
14 |
-
if(!isset($this->wpforo)) $this->wpforo = $wpForo;
|
15 |
$this->init_defaults();
|
16 |
$this->init_options();
|
17 |
}
|
@@ -34,6 +32,8 @@ class wpForoUsergroup{
|
|
34 |
'aup' => 'Front - Can pass moderation',
|
35 |
'vmem' => 'Front - Can view members',
|
36 |
'vprf' => 'Front - Can view profiles',
|
|
|
|
|
37 |
|
38 |
'upa' => 'Front - Can upload avatar',
|
39 |
'ups' => 'Front - Can have signature',
|
@@ -65,23 +65,25 @@ class wpForoUsergroup{
|
|
65 |
|
66 |
function usergroup_list_data(){
|
67 |
$ugdata = array();
|
68 |
-
$ugroups =
|
69 |
foreach($ugroups as $ugroup){
|
70 |
-
$user_count =
|
71 |
$ugdata[$ugroup['groupid']]['groupid'] = $ugroup['groupid'];
|
72 |
$ugdata[$ugroup['groupid']]['name'] = wpforo_phrase($ugroup['name'], FALSE);
|
73 |
$ugdata[$ugroup['groupid']]['count'] = intval($user_count);
|
|
|
|
|
74 |
}
|
75 |
return $ugdata;
|
76 |
}
|
77 |
|
78 |
-
function add($title, $cans = array(), $description = '', $role = 'subscriber', $access = 'standard' ){
|
79 |
$i = 2;
|
80 |
$real_title = $title;
|
81 |
-
while(
|
82 |
-
|
83 |
-
"SELECT
|
84 |
-
WHERE name = %s", sanitize_text_field($title) )))
|
85 |
{
|
86 |
$title = $title . '-' . $i;
|
87 |
$i++;
|
@@ -89,17 +91,19 @@ class wpForoUsergroup{
|
|
89 |
|
90 |
$cans = wpforo_parse_args( $cans, array_map('wpforo_return_zero', $this->cans) );
|
91 |
|
92 |
-
if(
|
93 |
-
|
94 |
array(
|
95 |
'name' => sanitize_text_field($title),
|
96 |
'cans' => serialize( $cans ),
|
97 |
'description' => $description,
|
98 |
'utitle' => sanitize_text_field($real_title),
|
99 |
'role' => $role,
|
100 |
-
'access' => $access
|
101 |
-
|
|
|
102 |
array(
|
|
|
103 |
'%s',
|
104 |
'%s',
|
105 |
'%s',
|
@@ -109,34 +113,33 @@ class wpForoUsergroup{
|
|
109 |
)
|
110 |
)
|
111 |
){
|
112 |
-
$ugid =
|
113 |
-
$forums =
|
114 |
if(!empty($forums) && $ugid){
|
115 |
-
$new_permission = array();
|
116 |
foreach($forums as $forum){
|
117 |
if(isset($forum['permissions'])){
|
118 |
$permissions = unserialize($forum['permissions']);
|
119 |
if(!empty($permissions)){
|
120 |
$permissions[$ugid] = $access;
|
121 |
$permissions = serialize($permissions);
|
122 |
-
|
123 |
}
|
124 |
}
|
125 |
}
|
126 |
}
|
127 |
-
|
128 |
-
return
|
129 |
}
|
130 |
|
131 |
-
|
132 |
return FALSE;
|
133 |
}
|
134 |
|
135 |
-
function edit( $groupid, $title, $cans, $description = '', $role = NULL, $access = NULL ){
|
136 |
|
137 |
if( $groupid == 1 ) return false;
|
138 |
if( !current_user_can('administrator') ){
|
139 |
-
|
140 |
return FALSE;
|
141 |
}
|
142 |
|
@@ -145,18 +148,20 @@ class wpForoUsergroup{
|
|
145 |
$role = is_null($role) ? $usergroup['role'] : $role;
|
146 |
$access = is_null($access) ? $usergroup['access'] : $access;
|
147 |
|
148 |
-
if( FALSE !==
|
149 |
-
|
150 |
array(
|
151 |
'name' => sanitize_text_field($title),
|
152 |
'cans' => serialize( $cans ),
|
153 |
'description' => $description,
|
154 |
'utitle' => $usergroup['utitle'],
|
155 |
'role' => $role,
|
156 |
-
'access' => $access
|
|
|
157 |
),
|
158 |
array( 'groupid' => intval($groupid) ),
|
159 |
array(
|
|
|
160 |
'%s',
|
161 |
'%s',
|
162 |
'%s',
|
@@ -166,18 +171,18 @@ class wpForoUsergroup{
|
|
166 |
),
|
167 |
array( '%d' ))
|
168 |
){
|
169 |
-
|
170 |
return $groupid;
|
171 |
}
|
172 |
|
173 |
-
|
174 |
return FALSE;
|
175 |
}
|
176 |
|
177 |
function delete(){
|
178 |
|
179 |
if( !current_user_can('administrator') ){
|
180 |
-
|
181 |
return FALSE;
|
182 |
}
|
183 |
|
@@ -188,31 +193,31 @@ class wpForoUsergroup{
|
|
188 |
$insert_gid = $_GET['gid'];
|
189 |
#################################################### USERS
|
190 |
if(isset($mergeid)){
|
191 |
-
$status =
|
192 |
$notice = wpforo_phrase('Usergroup has been successfully deleted. All users of this usergroup have been moved to the usergroup you\'ve chosen', false);
|
193 |
}else{
|
194 |
-
$status =
|
195 |
$notice = wpforo_phrase('Usergroup has been successfully deleted.');
|
196 |
}
|
197 |
#################################################### END USERS
|
198 |
if( $status !== FALSE ){
|
199 |
-
if(
|
200 |
-
|
201 |
return TRUE;
|
202 |
}
|
203 |
}
|
204 |
}
|
205 |
-
|
206 |
return FALSE;
|
207 |
}
|
208 |
|
209 |
function get_usergroup( $groupid = 4 ){
|
210 |
// Guest UsergroupID = 4
|
211 |
-
$cache =
|
212 |
if( $cache && isset(self::$cache['usergroup'][$groupid]) ){
|
213 |
return self::$cache['usergroup'][$groupid];
|
214 |
}
|
215 |
-
$usergroup =
|
216 |
if($cache && isset($groupid)){
|
217 |
self::$cache['usergroup'][$groupid] = $usergroup;
|
218 |
}
|
@@ -220,13 +225,13 @@ class wpForoUsergroup{
|
|
220 |
}
|
221 |
|
222 |
function get_usergroups( $field = 'full' ){
|
223 |
-
$cache =
|
224 |
if( $cache && isset(self::$cache['usergroups'][$field]) ) return self::$cache['usergroups'][$field];
|
225 |
|
226 |
if( $field == 'full' ){
|
227 |
-
$results =
|
228 |
}else{
|
229 |
-
$results =
|
230 |
}
|
231 |
|
232 |
if( $cache ) self::$cache['usergroups'][$field] = $results;
|
@@ -234,11 +239,11 @@ class wpForoUsergroup{
|
|
234 |
}
|
235 |
|
236 |
function get_groupid_by_userid( $userid ){
|
237 |
-
$cache =
|
238 |
if( $cache && isset(self::$cache['user'][$userid]) ){
|
239 |
return self::$cache['user'][$userid];
|
240 |
}
|
241 |
-
$groupid =
|
242 |
if($cache && isset($groupid)){
|
243 |
self::$cache['user'][$userid] = $groupid;
|
244 |
}
|
3 |
if( !defined( 'ABSPATH' ) ) exit;
|
4 |
|
5 |
class wpForoUsergroup{
|
|
|
6 |
public $default;
|
7 |
public $default_groupid;
|
8 |
public $cans;
|
9 |
|
10 |
static $cache = array( 'usergroup' => array(), 'user' => array() );
|
11 |
|
12 |
+
function __construct(){
|
|
|
13 |
$this->init_defaults();
|
14 |
$this->init_options();
|
15 |
}
|
32 |
'aup' => 'Front - Can pass moderation',
|
33 |
'vmem' => 'Front - Can view members',
|
34 |
'vprf' => 'Front - Can view profiles',
|
35 |
+
'vpra' => 'Front - Can view member activity',
|
36 |
+
'vprs' => 'Front - Can view member subscriptions',
|
37 |
|
38 |
'upa' => 'Front - Can upload avatar',
|
39 |
'ups' => 'Front - Can have signature',
|
65 |
|
66 |
function usergroup_list_data(){
|
67 |
$ugdata = array();
|
68 |
+
$ugroups = WPF()->db->get_results('SELECT `groupid`, `name`, `access`, `color` FROM '.WPF()->db->prefix.'wpforo_usergroups ORDER BY `name` ', ARRAY_A);
|
69 |
foreach($ugroups as $ugroup){
|
70 |
+
$user_count = WPF()->db->get_var('SELECT COUNT(userid) FROM '.WPF()->db->prefix.'wpforo_profiles WHERE `groupid` = ' . intval($ugroup['groupid']));
|
71 |
$ugdata[$ugroup['groupid']]['groupid'] = $ugroup['groupid'];
|
72 |
$ugdata[$ugroup['groupid']]['name'] = wpforo_phrase($ugroup['name'], FALSE);
|
73 |
$ugdata[$ugroup['groupid']]['count'] = intval($user_count);
|
74 |
+
$ugdata[$ugroup['groupid']]['access'] = $ugroup['access'];
|
75 |
+
$ugdata[$ugroup['groupid']]['color'] = $ugroup['color'];
|
76 |
}
|
77 |
return $ugdata;
|
78 |
}
|
79 |
|
80 |
+
function add($title, $cans = array(), $description = '', $role = 'subscriber', $access = 'standard', $color = '' ){
|
81 |
$i = 2;
|
82 |
$real_title = $title;
|
83 |
+
while( WPF()->db->get_var(
|
84 |
+
WPF()->db->prepare(
|
85 |
+
"SELECT `groupid` FROM `".WPF()->db->prefix."wpforo_usergroups`
|
86 |
+
WHERE `name` = '%s'", sanitize_text_field($title) )))
|
87 |
{
|
88 |
$title = $title . '-' . $i;
|
89 |
$i++;
|
91 |
|
92 |
$cans = wpforo_parse_args( $cans, array_map('wpforo_return_zero', $this->cans) );
|
93 |
|
94 |
+
if( WPF()->db->insert(
|
95 |
+
WPF()->db->prefix . 'wpforo_usergroups',
|
96 |
array(
|
97 |
'name' => sanitize_text_field($title),
|
98 |
'cans' => serialize( $cans ),
|
99 |
'description' => $description,
|
100 |
'utitle' => sanitize_text_field($real_title),
|
101 |
'role' => $role,
|
102 |
+
'access' => $access,
|
103 |
+
'color' => $color
|
104 |
+
),
|
105 |
array(
|
106 |
+
'%s',
|
107 |
'%s',
|
108 |
'%s',
|
109 |
'%s',
|
113 |
)
|
114 |
)
|
115 |
){
|
116 |
+
$ugid = WPF()->db->insert_id;
|
117 |
+
$forums = WPF()->forum->get_forums();
|
118 |
if(!empty($forums) && $ugid){
|
|
|
119 |
foreach($forums as $forum){
|
120 |
if(isset($forum['permissions'])){
|
121 |
$permissions = unserialize($forum['permissions']);
|
122 |
if(!empty($permissions)){
|
123 |
$permissions[$ugid] = $access;
|
124 |
$permissions = serialize($permissions);
|
125 |
+
WPF()->db->update( WPF()->db->prefix . 'wpforo_forums', array('permissions' => $permissions), array('forumid' => $forum['forumid']), array('%s'), array('%d') );
|
126 |
}
|
127 |
}
|
128 |
}
|
129 |
}
|
130 |
+
WPF()->notice->add('User group successfully added', 'success');
|
131 |
+
return WPF()->db->insert_id;
|
132 |
}
|
133 |
|
134 |
+
WPF()->notice->add('User group add error', 'error');
|
135 |
return FALSE;
|
136 |
}
|
137 |
|
138 |
+
function edit( $groupid, $title, $cans, $description = '', $role = NULL, $access = NULL, $color = '' ){
|
139 |
|
140 |
if( $groupid == 1 ) return false;
|
141 |
if( !current_user_can('administrator') ){
|
142 |
+
WPF()->notice->add('Permission denied', 'error');
|
143 |
return FALSE;
|
144 |
}
|
145 |
|
148 |
$role = is_null($role) ? $usergroup['role'] : $role;
|
149 |
$access = is_null($access) ? $usergroup['access'] : $access;
|
150 |
|
151 |
+
if( FALSE !== WPF()->db->update(
|
152 |
+
WPF()->db->prefix . 'wpforo_usergroups',
|
153 |
array(
|
154 |
'name' => sanitize_text_field($title),
|
155 |
'cans' => serialize( $cans ),
|
156 |
'description' => $description,
|
157 |
'utitle' => $usergroup['utitle'],
|
158 |
'role' => $role,
|
159 |
+
'access' => $access,
|
160 |
+
'color' => $color
|
161 |
),
|
162 |
array( 'groupid' => intval($groupid) ),
|
163 |
array(
|
164 |
+
'%s',
|
165 |
'%s',
|
166 |
'%s',
|
167 |
'%s',
|
171 |
),
|
172 |
array( '%d' ))
|
173 |
){
|
174 |
+
WPF()->notice->add('User group successfully edited', 'success');
|
175 |
return $groupid;
|
176 |
}
|
177 |
|
178 |
+
WPF()->notice->add('User group edit error', 'error');
|
179 |
return FALSE;
|
180 |
}
|
181 |
|
182 |
function delete(){
|
183 |
|
184 |
if( !current_user_can('administrator') ){
|
185 |
+
WPF()->notice->add('Permission denied', 'error');
|
186 |
return FALSE;
|
187 |
}
|
188 |
|
193 |
$insert_gid = $_GET['gid'];
|
194 |
#################################################### USERS
|
195 |
if(isset($mergeid)){
|
196 |
+
$status = WPF()->db->query("UPDATE `".WPF()->db->prefix ."wpforo_profiles` SET `groupid` = " . intval($mergeid) . " WHERE `groupid` = " . intval($insert_gid) );
|
197 |
$notice = wpforo_phrase('Usergroup has been successfully deleted. All users of this usergroup have been moved to the usergroup you\'ve chosen', false);
|
198 |
}else{
|
199 |
+
$status = WPF()->db->query("UPDATE `".WPF()->db->prefix ."wpforo_profiles` SET `status` = 'trashed' WHERE `groupid` = " . intval($insert_gid) );
|
200 |
$notice = wpforo_phrase('Usergroup has been successfully deleted.');
|
201 |
}
|
202 |
#################################################### END USERS
|
203 |
if( $status !== FALSE ){
|
204 |
+
if( WPF()->db->query("DELETE FROM `".WPF()->db->prefix ."wpforo_usergroups` WHERE `groupid` = " . intval($insert_gid) ) ){
|
205 |
+
WPF()->notice->add($notice, 'success');
|
206 |
return TRUE;
|
207 |
}
|
208 |
}
|
209 |
}
|
210 |
+
WPF()->notice->add('Can\'t delete this Usergroup', 'error');
|
211 |
return FALSE;
|
212 |
}
|
213 |
|
214 |
function get_usergroup( $groupid = 4 ){
|
215 |
// Guest UsergroupID = 4
|
216 |
+
$cache = WPF()->cache->on('memory_cashe');
|
217 |
if( $cache && isset(self::$cache['usergroup'][$groupid]) ){
|
218 |
return self::$cache['usergroup'][$groupid];
|
219 |
}
|
220 |
+
$usergroup = WPF()->db->get_row("SELECT * FROM `".WPF()->db->prefix."wpforo_usergroups` WHERE `groupid` = ".intval($groupid), ARRAY_A);
|
221 |
if($cache && isset($groupid)){
|
222 |
self::$cache['usergroup'][$groupid] = $usergroup;
|
223 |
}
|
225 |
}
|
226 |
|
227 |
function get_usergroups( $field = 'full' ){
|
228 |
+
$cache = WPF()->cache->on('memory_cashe');
|
229 |
if( $cache && isset(self::$cache['usergroups'][$field]) ) return self::$cache['usergroups'][$field];
|
230 |
|
231 |
if( $field == 'full' ){
|
232 |
+
$results = WPF()->db->get_results("SELECT * FROM `".WPF()->db->prefix."wpforo_usergroups`", ARRAY_A);
|
233 |
}else{
|
234 |
+
$results = WPF()->db->get_col("SELECT `$field` FROM `".WPF()->db->prefix."wpforo_usergroups`");
|
235 |
}
|
236 |
|
237 |
if( $cache ) self::$cache['usergroups'][$field] = $results;
|
239 |
}
|
240 |
|
241 |
function get_groupid_by_userid( $userid ){
|
242 |
+
$cache = WPF()->cache->on('memory_cashe');
|
243 |
if( $cache && isset(self::$cache['user'][$userid]) ){
|
244 |
return self::$cache['user'][$userid];
|
245 |
}
|
246 |
+
$groupid = WPF()->db->get_var("SELECT `groupid` FROM `".WPF()->db->prefix ."wpforo_profiles` WHERE `userid` = " . intval($userid));
|
247 |
if($cache && isset($groupid)){
|
248 |
self::$cache['user'][$userid] = $groupid;
|
249 |
}
|
wpf-includes/functions-installation.php
CHANGED
@@ -35,58 +35,66 @@ function do_wpforo_deactivation($network_wide){
|
|
35 |
}
|
36 |
|
37 |
function wpforo_activation(){
|
38 |
-
global $
|
39 |
if( ! wpforo_is_admin() ) return;
|
40 |
if( ! current_user_can( 'activate_plugins' ) ) return;
|
41 |
|
42 |
-
add_option('wpforo_default_groupid',
|
43 |
|
44 |
require( WPFORO_DIR . '/wpf-includes/install-sql.php' );
|
45 |
-
foreach( $wpforo_sql as $sql ) if( FALSE ===
|
46 |
|
47 |
-
$users =
|
48 |
-
if( $users <= 100 )
|
49 |
-
|
50 |
|
51 |
add_option( 'wpforo_count_per_page', 10 );
|
52 |
|
53 |
###################################################################
|
54 |
// General Options ////////////////////////////////////////////////
|
55 |
-
wpforo_update_options( 'wpforo_general_options',
|
56 |
|
57 |
###################################################################
|
58 |
// Forums /////////////////////////////////////////////////////////
|
59 |
-
wpforo_update_options( 'wpforo_forum_options',
|
60 |
|
61 |
##################################################################
|
62 |
// Topics & Posts ////////////////////////////////////////////////
|
63 |
-
wpforo_update_options( 'wpforo_post_options',
|
64 |
|
65 |
#################################################################
|
66 |
// Features /////////////////////////////////////////////////////
|
67 |
-
wpforo_update_options( 'wpforo_features',
|
|
|
|
|
|
|
|
|
68 |
|
69 |
#################################################################
|
70 |
// Theme & Style ////////////////////////////////////////////////
|
71 |
-
wpforo_update_options( 'wpforo_style_options',
|
72 |
-
wpforo_update_options( 'wpforo_theme_options',
|
73 |
|
74 |
#################################################################
|
75 |
// Members //////////////////////////////////////////////////////
|
76 |
$exlude = array('rating_title_ug', 'rating_badge_ug');
|
77 |
-
wpforo_update_options( 'wpforo_member_options',
|
78 |
|
79 |
#################################################################
|
80 |
// Subscribe Options ////////////////////////////////////////////
|
81 |
-
wpforo_update_options( 'wpforo_subscribe_options',
|
82 |
|
83 |
#################################################################
|
84 |
// Tool Options - Antispam ///////////////////////////////////////
|
85 |
-
wpforo_update_options( 'wpforo_tools_antispam',
|
86 |
|
87 |
#################################################################
|
88 |
// Tool Options - Cleanup ///////////////////////////////////////
|
89 |
-
wpforo_update_options( 'wpforo_tools_cleanup',
|
|
|
|
|
|
|
|
|
90 |
|
91 |
#################################################################
|
92 |
// Forum Navigation and Menu ////////////////////////////////////
|
@@ -192,31 +200,41 @@ function wpforo_activation(){
|
|
192 |
$cans_n = array('vf' => 0, 'ct' => 0, 'vt' => 0, 'et' => 0, 'dt' => 0,
|
193 |
'cr' => 0, 'vr' => 0, 'er' => 0, 'dr' => 0,
|
194 |
'eot' => 0, 'eor' => 0, 'dot' => 0, 'dor' => 0,
|
195 |
-
'l' => 0, 'r' => 0, 's' => 0, 'au' => 0,
|
196 |
-
'
|
|
|
|
|
197 |
$cans_r = array('vf' => 1, 'ct' => 0, 'vt' => 1, 'et' => 0, 'dt' => 0,
|
198 |
'cr' => 0, 'vr' => 1, 'er' => 0, 'dr' => 0,
|
199 |
'eot' => 0, 'eor' => 0, 'dot' => 0, 'dor' => 0,
|
200 |
-
'l' => 0, 'r' => 0, 's' => 0, 'au' => 0,
|
201 |
-
'
|
|
|
|
|
202 |
$cans_s = array('vf' => 1, 'ct' => 1, 'vt' => 1, 'et' => 0, 'dt' => 0,
|
203 |
'cr' => 1, 'vr' => 1, 'er' => 0, 'dr' => 0,
|
204 |
'eot' => 1, 'eor' => 1, 'dot' => 1, 'dor' => 1,
|
205 |
-
'l' => 1, 'r' => 1, 's' => 0, 'au' => 0,
|
206 |
-
'
|
|
|
|
|
207 |
$cans_m = array('vf' => 1, 'ct' => 1, 'vt' => 1, 'et' => 1, 'dt' => 1,
|
208 |
'cr' => 1, 'vr' => 1, 'er' => 1, 'dr' => 1,
|
209 |
'eot' => 1, 'eor' => 1, 'dot' => 1, 'dor' => 1,
|
210 |
-
'l' => 1, 'r' => 1, 's' => 1, 'au' => 1,
|
211 |
-
'
|
|
|
|
|
212 |
$cans_a = array('vf' => 1, 'ct' => 1, 'vt' => 1, 'et' => 1, 'dt' => 1,
|
213 |
'cr' => 1, 'vr' => 1, 'er' => 1, 'dr' => 1,
|
214 |
'eot' => 1, 'eor' => 1, 'dot' => 1, 'dor' => 1,
|
215 |
-
'l' => 1, 'r' => 1, 's' => 1, 'au' => 1,
|
216 |
-
'
|
|
|
|
|
217 |
|
218 |
-
$sql = "SELECT * FROM `"
|
219 |
-
$accesses =
|
220 |
if( empty($accesses) ){
|
221 |
|
222 |
$cans_n = serialize($cans_n);
|
@@ -225,7 +243,7 @@ function wpforo_activation(){
|
|
225 |
$cans_m = serialize($cans_m);
|
226 |
$cans_a = serialize($cans_a);
|
227 |
|
228 |
-
$sql = "INSERT IGNORE INTO `"
|
229 |
(`access`, `title`, cans) VALUES
|
230 |
('no_access', 'No access', '". $cans_n ."'),
|
231 |
('read_only', 'Read only access', '". $cans_r ."'),
|
@@ -233,7 +251,7 @@ function wpforo_activation(){
|
|
233 |
('moderator', 'Moderator access', '".$cans_m."'),
|
234 |
('full', 'Full access', '".$cans_a."')";
|
235 |
|
236 |
-
|
237 |
}else{
|
238 |
foreach($accesses as $access){
|
239 |
$default = array();
|
@@ -247,7 +265,7 @@ function wpforo_activation(){
|
|
247 |
$data_update = array_merge($default, $current);
|
248 |
if( !empty($data_update) ){
|
249 |
$data_update = serialize($data_update);
|
250 |
-
|
251 |
}
|
252 |
}
|
253 |
}
|
@@ -256,54 +274,49 @@ function wpforo_activation(){
|
|
256 |
|
257 |
#################################################################
|
258 |
// Usergroup ////////////////////////////////////////////////////
|
259 |
-
$cans_admin = array('cf' => '1', 'ef' => '1', 'df' => '1', 'vm' => '1', 'aum' => '1', 'em' => '1', 'vmg' => '1', 'aup' => '1', 'vmem' => '1', 'vprf' => '1',
|
260 |
'bm' => '1', 'dm' => '1', 'upa' => '1', 'ups' => '1', 'va' => '1',
|
261 |
'vmu' => '1', 'vmm' => '1', 'vmt' => '1', 'vmct' => '1',
|
262 |
'vmr' => '1', 'vmw' => '1', 'vmsn' => '1', 'vmrd' => '1',
|
263 |
'vmlad' => '1', 'vip' => '1', 'vml' => '1', 'vmo' => '1',
|
264 |
'vms' => '1', 'vmam' => '1', 'vmpn' => '1', 'vwpm' => '1');
|
265 |
-
$cans_moder = array('cf' => '0', 'ef' => '0', 'df' => '0', 'vm' => '0', 'aum' => '1', 'em' => '0', 'vmg' => '0', 'aup' => '1', 'vmem' => '1', 'vprf' => '1',
|
266 |
'bm' => '1', 'dm' => '1', 'upa' => '1', 'ups' => '1', 'va' => '1',
|
267 |
'vmu' => '0', 'vmm' => '1', 'vmt' => '1', 'vmct' => '1',
|
268 |
'vmr' => '1', 'vmw' => '1', 'vmsn' => '1', 'vmrd' => '1',
|
269 |
'vmlad' => '1', 'vip' => '1', 'vml' => '1', 'vmo' => '1',
|
270 |
'vms' => '1', 'vmam' => '1', 'vmpn' => '1', 'vwpm' => '1');
|
271 |
-
$cans_reg = array( 'cf' => '0', 'ef' => '0', 'df' => '0', 'vm' => '0', 'aum' => '0', 'em' => '0', 'vmg' => '0', 'aup' => '1', 'vmem' => '1', 'vprf' => '1',
|
272 |
'bm' => '0', 'dm' => '0', 'upa' => '1', 'ups' => '1', 'va' => '1',
|
273 |
'vmu' => '0', 'vmm' => '0', 'vmt' => '1', 'vmct' => '1',
|
274 |
'vmr' => '1', 'vmw' => '1', 'vmsn' => '1', 'vmrd' => '1',
|
275 |
'vmlad' => '1', 'vip' => '0', 'vml' => '1', 'vmo' => '1',
|
276 |
'vms' => '1', 'vmam' => '1', 'vmpn' => '0', 'vwpm' => '1');
|
277 |
-
$cans_guest = array('cf' => '0', 'ef' => '0', 'df' => '0', 'vm' => '0', 'aum' => '0', 'em' => '0', '
|
278 |
-
'
|
279 |
'vmu' => '0', 'vmm' => '0', 'vmt' => '1', 'vmct' => '1',
|
280 |
'vmr' => '1', 'vmw' => '0', 'vmsn' => '1', 'vmrd' => '1',
|
281 |
'vmlad' => '1', 'vip' => '0', 'vml' => '1', 'vmo' => '1',
|
282 |
'vms' => '1', 'vmam' => '1', 'vmpn' => '0', 'vwpm' => '0');
|
283 |
-
$cans_customer = array('cf' => '0', 'ef' => '0', 'df' => '0', 'vm' => '0', 'aum' => '0', 'em' => '0', 'vmg' => '0', 'aup' => '0', 'vmem' => '1', 'vprf' => '1', '
|
284 |
-
'dm' => '0', 'upa' => '1', 'ups' => '1', 'va' => '1',
|
285 |
'vmu' => '0', 'vmm' => '0', 'vmt' => '1', 'vmct' => '1',
|
286 |
'vmr' => '1', 'vmw' => '1', 'vmsn' => '1', 'vmrd' => '1',
|
287 |
'vmlad' => '1', 'vip' => '0', 'vml' => '1', 'vmo' => '1',
|
288 |
'vms' => '1', 'vmam' => '1', 'vmpn' => '0', 'vwpm' => '1');
|
289 |
|
290 |
|
291 |
-
$sql = "SELECT * FROM `"
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
$cans_customer = serialize( $cans_customer );
|
299 |
-
$sql = "INSERT IGNORE INTO `".$wpforo->db->prefix."wpforo_usergroups`
|
300 |
-
(`name`, `cans`) VALUES ('Admin', '$cans_admin'),('Moderator', '$cans_moder'),('Registered', '$cans_reg'),('Guest', '$cans_guest'),('Customer', '$cans_customer')";
|
301 |
-
$wpforo->db->query($sql);
|
302 |
}
|
303 |
else{
|
304 |
foreach($usergroups as $usergroup){
|
305 |
$default = array();
|
306 |
-
$data_update = array();
|
307 |
$current = unserialize($usergroup['cans']);
|
308 |
if( strtolower($usergroup['name']) == 'admin' ) $default = $cans_admin;
|
309 |
elseif( strtolower($usergroup['name']) == 'moderator' ) $default = $cans_moder;
|
@@ -313,18 +326,17 @@ function wpforo_activation(){
|
|
313 |
if( !empty($default) ){
|
314 |
$data_update = array_merge($default, $current);
|
315 |
if( !empty($data_update) ){
|
316 |
-
if( strtolower($usergroup['name']) == 'guest' && $data_update['vprf'] && WPFORO_VERSION == '1.4.2' ) $data_update['va'] = 1;
|
317 |
$data_update = serialize($data_update);
|
318 |
-
|
319 |
}
|
320 |
}
|
321 |
}
|
322 |
}
|
323 |
-
$sql = "SELECT COUNT(*) FROM `"
|
324 |
-
$count =
|
325 |
if(!$count){
|
326 |
-
if( $parentid =
|
327 |
-
|
328 |
}
|
329 |
}
|
330 |
|
@@ -338,9 +350,9 @@ function wpforo_activation(){
|
|
338 |
|
339 |
#################################################################
|
340 |
// Creating Forum Page //////////////////////////////////////////
|
341 |
-
if(
|
342 |
-
|
343 |
-
if( !$page_id =
|
344 |
$wpforo_page = array(
|
345 |
'post_date' => current_time( 'mysql', 1 ),
|
346 |
'post_date_gmt' => current_time( 'mysql', 1 ),
|
@@ -366,29 +378,29 @@ function wpforo_activation(){
|
|
366 |
update_option( 'wpforo_permastruct', 'community' );
|
367 |
update_option( 'wpforo_url', esc_url( home_url('/') ) . "community/" );
|
368 |
}else{
|
369 |
-
if(
|
370 |
update_option( 'wpforo_permastruct', basename($wpforo_url) );
|
371 |
update_option( 'wpforo_url', esc_url( home_url('/') ) . basename($wpforo_url) . "/" );
|
372 |
}else{
|
373 |
-
update_option( 'wpforo_url', esc_url( home_url('/') ) .
|
374 |
}
|
375 |
}
|
376 |
}
|
377 |
}else{
|
378 |
-
if(
|
379 |
-
if(
|
380 |
-
|
381 |
}
|
382 |
|
383 |
-
|
384 |
-
|
385 |
flush_rewrite_rules(FALSE);
|
386 |
nocache_headers();
|
387 |
|
388 |
|
389 |
#################################################################
|
390 |
// Importing Language Packs and Phrases /////////////////////////
|
391 |
-
|
392 |
|
393 |
#################################################################
|
394 |
// Creating wpforo folders //////////////////////////////////////
|
@@ -404,7 +416,7 @@ function wpforo_activation(){
|
|
404 |
|
405 |
#################################################################
|
406 |
// RESET USER CACHE /////////////////////////////////////////////
|
407 |
-
|
408 |
|
409 |
#################################################################
|
410 |
// RESET FUNCTIONS //////////////////////////////////////////////
|
@@ -412,7 +424,7 @@ function wpforo_activation(){
|
|
412 |
if( !$wpdb->get_row($sql, ARRAY_A) ){
|
413 |
@$wpdb->query( "ALTER TABLE `".$wpdb->prefix."wpforo_phrases` ADD COLUMN `package` VARCHAR(255) NOT NULL DEFAULT 'wpforo'" );
|
414 |
}
|
415 |
-
|
416 |
|
417 |
#################################################################
|
418 |
// ADD `private` field in TOPIC TABLE ///////////////////////////
|
@@ -432,7 +444,7 @@ function wpforo_activation(){
|
|
432 |
$args = array( 'table' => $wpdb->prefix . 'wpforo_views', 'col' => 'created', 'check' => 'col_type' );
|
433 |
$col_type = wpforo_db_check( $args );
|
434 |
if( $col_type != 'int(11)' ){
|
435 |
-
@$wpdb->query( "ALTER TABLE `".$wpdb->prefix."wpforo_views`
|
436 |
}
|
437 |
// ADD `status` field in TOPICS & POSTS TABLE ///////////////////////////
|
438 |
$args = array( 'table' => $wpdb->prefix . 'wpforo_topics', 'col' => 'status', 'check' => 'col_exists' );
|
@@ -445,8 +457,8 @@ function wpforo_activation(){
|
|
445 |
// ADD `name` and `email` field in TOPIC TABLE ///////////////////////////
|
446 |
$args = array( 'table' => $wpdb->prefix . 'wpforo_topics', 'col' => 'name', 'check' => 'col_exists' );
|
447 |
if( !wpforo_db_check( $args ) ){
|
448 |
-
@$wpdb->query( "ALTER TABLE `" . $wpdb->prefix . "wpforo_topics` ADD `name` VARCHAR(50) NOT NULL
|
449 |
-
@$wpdb->query( "ALTER TABLE `" . $wpdb->prefix . "wpforo_posts` ADD `name` VARCHAR(50) NOT NULL
|
450 |
@$wpdb->query( "ALTER TABLE `" . $wpdb->prefix . "wpforo_topics` ADD KEY `email` (`email`)" );
|
451 |
@$wpdb->query( "ALTER TABLE `" . $wpdb->prefix . "wpforo_posts` ADD KEY `email` (`email`)" );
|
452 |
}
|
@@ -462,16 +474,48 @@ function wpforo_activation(){
|
|
462 |
@$wpdb->query( "UPDATE `" . $wpdb->prefix . "wpforo_usergroups` SET `utitle` = 'name', `role` = 'subscriber', `access` = 'standard' WHERE `utitle` IS NULL OR `utitle` = ''");
|
463 |
}
|
464 |
#################################################################
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
465 |
// ADD `private` field in post TABLE ///////////////////////////
|
466 |
$args = array( 'table' => $wpdb->prefix . 'wpforo_posts', 'col' => 'private', 'check' => 'col_exists' );
|
467 |
if( !wpforo_db_check( $args ) ){
|
468 |
-
@$wpdb->query( "ALTER TABLE `" . $wpdb->prefix . "wpforo_posts` ADD `private` TINYINT(1) NOT NULL DEFAULT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
469 |
}
|
470 |
|
471 |
#################################################################
|
472 |
// UPDATE VERSION - END /////////////////////////////////////////
|
473 |
update_option('wpforo_version', WPFORO_VERSION);
|
474 |
-
|
475 |
wpforo_clean_cache();
|
476 |
}
|
477 |
|
@@ -507,7 +551,7 @@ function wpforo_deactivation() {}
|
|
507 |
|
508 |
function wpforo_uninstall() {
|
509 |
|
510 |
-
global $
|
511 |
|
512 |
if( ! wpforo_is_admin() ) return;
|
513 |
if( ! current_user_can( 'activate_plugins' ) ) return;
|
@@ -536,8 +580,8 @@ function wpforo_uninstall() {
|
|
536 |
}
|
537 |
}
|
538 |
|
539 |
-
if( isset(
|
540 |
-
wp_delete_post(
|
541 |
}
|
542 |
|
543 |
$options = array( 'wpforo_version',
|
@@ -558,7 +602,8 @@ function wpforo_uninstall() {
|
|
558 |
'wpforo_use_home_url',
|
559 |
'wpforo_excld_urls',
|
560 |
'wpforo_tools_antispam',
|
561 |
-
'wpforo_tools_cleanup'
|
|
|
562 |
);
|
563 |
|
564 |
foreach($options as $option){
|
@@ -568,11 +613,12 @@ function wpforo_uninstall() {
|
|
568 |
}
|
569 |
|
570 |
$wpdb->query( "DELETE FROM `" . $wpdb->base_prefix ."usermeta` WHERE `meta_key` = '_wpf_member_obj'" );
|
|
|
571 |
$wpdb->query( "DELETE FROM `" . $wpdb->prefix ."options` WHERE option_name LIKE 'widget_wpforo_widget_%'" );
|
572 |
|
573 |
$menu = wp_get_nav_menu_object( 'wpforo-navigation' );
|
574 |
wp_delete_nav_menu( $menu->term_id );
|
575 |
-
wp_delete_post(
|
576 |
|
577 |
deactivate_plugins( WPFORO_BASENAME );
|
578 |
|
@@ -585,7 +631,11 @@ function wpforo_uninstall() {
|
|
585 |
function wpforo_profile_notice(){
|
586 |
global $wpdb;
|
587 |
$button = '';
|
588 |
-
|
|
|
|
|
|
|
|
|
589 |
$profiles = $wpdb->get_var("SELECT COUNT(*) FROM `" . $wpdb->prefix . "wpforo_profiles`");
|
590 |
$delta = $users - $profiles;
|
591 |
$status = ( $delta > 2 ) ? round((( $profiles * 100 ) / $users ), 1) . '% (' . $profiles . ' / ' . $users . ') ' : '100%';
|
@@ -601,10 +651,10 @@ function wpforo_profile_notice(){
|
|
601 |
}
|
602 |
|
603 |
function wpforo_update_db_notice(){
|
604 |
-
global $
|
605 |
-
$private_topics = $wpdb->get_var("SELECT `topicid` FROM `" . $wpdb->prefix . "wpforo_topics` WHERE `private` = 1");
|
606 |
if( $private_topics ){
|
607 |
-
$private_posts = $wpdb->get_var("SELECT `postid` FROM `" . $wpdb->prefix . "wpforo_posts` WHERE `private` = 1");
|
608 |
if( !$private_posts ){
|
609 |
$url = admin_url('admin.php?page=wpforo-community&action=wpfdb&wpfv=142');
|
610 |
$class = 'wpforo-mnote notice notice-warning is-dismissible';
|
@@ -619,7 +669,7 @@ function wpforo_update_db_notice(){
|
|
619 |
}
|
620 |
|
621 |
function wpforo_update_db(){
|
622 |
-
global $
|
623 |
// ADD posts' private values from TOPICS table ///////////////////////////
|
624 |
@$wpdb->query( "UPDATE `" . $wpdb->prefix . "wpforo_posts`, `" . $wpdb->prefix . "wpforo_topics` SET `" . $wpdb->prefix . "wpforo_posts`.`private` = `" . $wpdb->prefix . "wpforo_topics`.`private` WHERE `" . $wpdb->prefix . "wpforo_posts`.`topicid` = `" . $wpdb->prefix . "wpforo_topics`.`topicid`");
|
625 |
// ADD INDEXES in wpforo_views TABLE///////////////////////////
|
35 |
}
|
36 |
|
37 |
function wpforo_activation(){
|
38 |
+
global $wpdb;
|
39 |
if( ! wpforo_is_admin() ) return;
|
40 |
if( ! current_user_can( 'activate_plugins' ) ) return;
|
41 |
|
42 |
+
add_option('wpforo_default_groupid', WPF()->usergroup->default->default_groupid);
|
43 |
|
44 |
require( WPFORO_DIR . '/wpf-includes/install-sql.php' );
|
45 |
+
foreach( $wpforo_sql as $sql ) if( FALSE === @WPF()->db->query($sql) ) @WPF()->db->query( preg_replace('#)[\r\n\t\s]*ENGINE.*$#isu', ')', $sql) );
|
46 |
|
47 |
+
$users = WPF()->db->get_var("SELECT COUNT(*) FROM `" . WPF()->db->base_prefix . "users`");
|
48 |
+
if( $users <= 100 ) WPF()->member->synchronize_users();
|
49 |
+
WPF()->member->init_current_user();
|
50 |
|
51 |
add_option( 'wpforo_count_per_page', 10 );
|
52 |
|
53 |
###################################################################
|
54 |
// General Options ////////////////////////////////////////////////
|
55 |
+
wpforo_update_options( 'wpforo_general_options', WPF()->default->general_options );
|
56 |
|
57 |
###################################################################
|
58 |
// Forums /////////////////////////////////////////////////////////
|
59 |
+
wpforo_update_options( 'wpforo_forum_options', WPF()->forum->default->options );
|
60 |
|
61 |
##################################################################
|
62 |
// Topics & Posts ////////////////////////////////////////////////
|
63 |
+
wpforo_update_options( 'wpforo_post_options', WPF()->post->default->options );
|
64 |
|
65 |
#################################################################
|
66 |
// Features /////////////////////////////////////////////////////
|
67 |
+
wpforo_update_options( 'wpforo_features', WPF()->default->features );
|
68 |
+
|
69 |
+
#################################################################
|
70 |
+
// API //////////////////////////////////////////////////////////
|
71 |
+
wpforo_update_options( 'wpforo_api_options', WPF()->default->features );
|
72 |
|
73 |
#################################################################
|
74 |
// Theme & Style ////////////////////////////////////////////////
|
75 |
+
wpforo_update_options( 'wpforo_style_options', WPF()->tpl->default->style );
|
76 |
+
wpforo_update_options( 'wpforo_theme_options', WPF()->tpl->default->options );
|
77 |
|
78 |
#################################################################
|
79 |
// Members //////////////////////////////////////////////////////
|
80 |
$exlude = array('rating_title_ug', 'rating_badge_ug');
|
81 |
+
wpforo_update_options( 'wpforo_member_options', WPF()->member->default->options, $exlude);
|
82 |
|
83 |
#################################################################
|
84 |
// Subscribe Options ////////////////////////////////////////////
|
85 |
+
wpforo_update_options( 'wpforo_subscribe_options', WPF()->sbscrb->default->options );
|
86 |
|
87 |
#################################################################
|
88 |
// Tool Options - Antispam ///////////////////////////////////////
|
89 |
+
wpforo_update_options( 'wpforo_tools_antispam', WPF()->default->tools_antispam);
|
90 |
|
91 |
#################################################################
|
92 |
// Tool Options - Cleanup ///////////////////////////////////////
|
93 |
+
wpforo_update_options( 'wpforo_tools_cleanup', WPF()->default->tools_cleanup);
|
94 |
+
|
95 |
+
#################################################################
|
96 |
+
// Tool Options - Misc ///////////////////////////////////////
|
97 |
+
wpforo_update_options( 'wpforo_tools_misc', WPF()->default->tools_misc);
|
98 |
|
99 |
#################################################################
|
100 |
// Forum Navigation and Menu ////////////////////////////////////
|
200 |
$cans_n = array('vf' => 0, 'ct' => 0, 'vt' => 0, 'et' => 0, 'dt' => 0,
|
201 |
'cr' => 0, 'vr' => 0, 'er' => 0, 'dr' => 0,
|
202 |
'eot' => 0, 'eor' => 0, 'dot' => 0, 'dor' => 0,
|
203 |
+
'l' => 0, 'r' => 0, 's' => 0, 'au' => 0,
|
204 |
+
'p' => 0, 'op' => 0, 'vp' => 0, 'sv' => 0,
|
205 |
+
'osv' => 0, 'v' => 0, 'a' => 0, 'va' => 0,
|
206 |
+
'at' => 0, 'oat' => 0, 'cot' => 0, 'mt' => 0, 'ccp' => 0, 'cvp' => 0, 'cvpr' => 0 );
|
207 |
$cans_r = array('vf' => 1, 'ct' => 0, 'vt' => 1, 'et' => 0, 'dt' => 0,
|
208 |
'cr' => 0, 'vr' => 1, 'er' => 0, 'dr' => 0,
|
209 |
'eot' => 0, 'eor' => 0, 'dot' => 0, 'dor' => 0,
|
210 |
+
'l' => 0, 'r' => 0, 's' => 0, 'au' => 0,
|
211 |
+
'p' => 0, 'op' => 0, 'vp' => 0, 'sv' => 0,
|
212 |
+
'osv' => 0, 'v' => 0, 'a' => 0, 'va' => 1,
|
213 |
+
'at' => 0, 'oat' => 0, 'cot' => 0, 'mt' => 0, 'ccp' => 0, 'cvp' => 0, 'cvpr' => 1 );
|
214 |
$cans_s = array('vf' => 1, 'ct' => 1, 'vt' => 1, 'et' => 0, 'dt' => 0,
|
215 |
'cr' => 1, 'vr' => 1, 'er' => 0, 'dr' => 0,
|
216 |
'eot' => 1, 'eor' => 1, 'dot' => 1, 'dor' => 1,
|
217 |
+
'l' => 1, 'r' => 1, 's' => 0, 'au' => 0,
|
218 |
+
'p' => 0, 'op' => 1, 'vp' => 0, 'sv' => 0,
|
219 |
+
'osv' => 1, 'v' => 1, 'a' => 1, 'va' => 1,
|
220 |
+
'at' => 0, 'oat' => 1, 'cot' => 0, 'mt' => 0, 'ccp' => 1, 'cvp' => 1, 'cvpr' => 1 );
|
221 |
$cans_m = array('vf' => 1, 'ct' => 1, 'vt' => 1, 'et' => 1, 'dt' => 1,
|
222 |
'cr' => 1, 'vr' => 1, 'er' => 1, 'dr' => 1,
|
223 |
'eot' => 1, 'eor' => 1, 'dot' => 1, 'dor' => 1,
|
224 |
+
'l' => 1, 'r' => 1, 's' => 1, 'au' => 1,
|
225 |
+
'p' => 1, 'op' => 1, 'vp' => 1, 'sv' => 1,
|
226 |
+
'osv' => 1, 'v' => 1, 'a' => 1, 'va' => 1,
|
227 |
+
'at' => 1, 'oat' => 1, 'cot' => 1, 'mt' => 1, 'ccp' => 1, 'cvp' => 1, 'cvpr' => 1 );
|
228 |
$cans_a = array('vf' => 1, 'ct' => 1, 'vt' => 1, 'et' => 1, 'dt' => 1,
|
229 |
'cr' => 1, 'vr' => 1, 'er' => 1, 'dr' => 1,
|
230 |
'eot' => 1, 'eor' => 1, 'dot' => 1, 'dor' => 1,
|
231 |
+
'l' => 1, 'r' => 1, 's' => 1, 'au' => 1,
|
232 |
+
'p' => 1, 'op' => 1, 'vp' => 1, 'sv' => 1,
|
233 |
+
'osv' => 1, 'v' => 1, 'a' => 1, 'va' => 1,
|
234 |
+
'at' => 1, 'oat' => 1, 'cot' => 1, 'mt' => 1, 'ccp' => 1, 'cvp' => 1, 'cvpr' => 1 );
|
235 |
|
236 |
+
$sql = "SELECT * FROM `".WPF()->db->prefix."wpforo_accesses`";
|
237 |
+
$accesses = WPF()->db->get_results($sql, ARRAY_A);
|
238 |
if( empty($accesses) ){
|
239 |
|
240 |
$cans_n = serialize($cans_n);
|
243 |
$cans_m = serialize($cans_m);
|
244 |
$cans_a = serialize($cans_a);
|
245 |
|
246 |
+
$sql = "INSERT IGNORE INTO `".WPF()->db->prefix."wpforo_accesses`
|
247 |
(`access`, `title`, cans) VALUES
|
248 |
('no_access', 'No access', '". $cans_n ."'),
|
249 |
('read_only', 'Read only access', '". $cans_r ."'),
|
251 |
('moderator', 'Moderator access', '".$cans_m."'),
|
252 |
('full', 'Full access', '".$cans_a."')";
|
253 |
|
254 |
+
WPF()->db->query( $sql );
|
255 |
}else{
|
256 |
foreach($accesses as $access){
|
257 |
$default = array();
|
265 |
$data_update = array_merge($default, $current);
|
266 |
if( !empty($data_update) ){
|
267 |
$data_update = serialize($data_update);
|
268 |
+
WPF()->db->query("UPDATE `".WPF()->db->prefix."wpforo_accesses` SET `cans` = '" . WPF()->db->_real_escape($data_update) . "' WHERE `accessid` = " . intval($access['accessid']) );
|
269 |
}
|
270 |
}
|
271 |
}
|
274 |
|
275 |
#################################################################
|
276 |
// Usergroup ////////////////////////////////////////////////////
|
277 |
+
$cans_admin = array('cf' => '1', 'ef' => '1', 'df' => '1', 'vm' => '1', 'aum' => '1', 'em' => '1', 'vmg' => '1', 'aup' => '1', 'vmem' => '1', 'vprf' => '1', 'vpra' => '1', 'vprs' => '1',
|
278 |
'bm' => '1', 'dm' => '1', 'upa' => '1', 'ups' => '1', 'va' => '1',
|
279 |
'vmu' => '1', 'vmm' => '1', 'vmt' => '1', 'vmct' => '1',
|
280 |
'vmr' => '1', 'vmw' => '1', 'vmsn' => '1', 'vmrd' => '1',
|
281 |
'vmlad' => '1', 'vip' => '1', 'vml' => '1', 'vmo' => '1',
|
282 |
'vms' => '1', 'vmam' => '1', 'vmpn' => '1', 'vwpm' => '1');
|
283 |
+
$cans_moder = array('cf' => '0', 'ef' => '0', 'df' => '0', 'vm' => '0', 'aum' => '1', 'em' => '0', 'vmg' => '0', 'aup' => '1', 'vmem' => '1', 'vprf' => '1', 'vpra' => '1', 'vprs' => '1',
|
284 |
'bm' => '1', 'dm' => '1', 'upa' => '1', 'ups' => '1', 'va' => '1',
|
285 |
'vmu' => '0', 'vmm' => '1', 'vmt' => '1', 'vmct' => '1',
|
286 |
'vmr' => '1', 'vmw' => '1', 'vmsn' => '1', 'vmrd' => '1',
|
287 |
'vmlad' => '1', 'vip' => '1', 'vml' => '1', 'vmo' => '1',
|
288 |
'vms' => '1', 'vmam' => '1', 'vmpn' => '1', 'vwpm' => '1');
|
289 |
+
$cans_reg = array( 'cf' => '0', 'ef' => '0', 'df' => '0', 'vm' => '0', 'aum' => '0', 'em' => '0', 'vmg' => '0', 'aup' => '1', 'vmem' => '1', 'vprf' => '1', 'vpra' => '1', 'vprs' => '0',
|
290 |
'bm' => '0', 'dm' => '0', 'upa' => '1', 'ups' => '1', 'va' => '1',
|
291 |
'vmu' => '0', 'vmm' => '0', 'vmt' => '1', 'vmct' => '1',
|
292 |
'vmr' => '1', 'vmw' => '1', 'vmsn' => '1', 'vmrd' => '1',
|
293 |
'vmlad' => '1', 'vip' => '0', 'vml' => '1', 'vmo' => '1',
|
294 |
'vms' => '1', 'vmam' => '1', 'vmpn' => '0', 'vwpm' => '1');
|
295 |
+
$cans_guest = array('cf' => '0', 'ef' => '0', 'df' => '0', 'vm' => '0', 'aum' => '0', 'em' => '0', 'vmg' => '0', 'aup' => '0', 'vmem' => '1', 'vprf' => '1', 'vpra' => '1', 'vprs' => '0',
|
296 |
+
'bm' => '0', 'dm' => '0', 'upa' => '0', 'ups' => '0', 'va' => '1',
|
297 |
'vmu' => '0', 'vmm' => '0', 'vmt' => '1', 'vmct' => '1',
|
298 |
'vmr' => '1', 'vmw' => '0', 'vmsn' => '1', 'vmrd' => '1',
|
299 |
'vmlad' => '1', 'vip' => '0', 'vml' => '1', 'vmo' => '1',
|
300 |
'vms' => '1', 'vmam' => '1', 'vmpn' => '0', 'vwpm' => '0');
|
301 |
+
$cans_customer = array('cf' => '0', 'ef' => '0', 'df' => '0', 'vm' => '0', 'aum' => '0', 'em' => '0', 'vmg' => '0', 'aup' => '0', 'vmem' => '1', 'vprf' => '1', 'vpra' => '1', 'vprs' => '0',
|
302 |
+
'bm' => '0', 'dm' => '0', 'upa' => '1', 'ups' => '1', 'va' => '1',
|
303 |
'vmu' => '0', 'vmm' => '0', 'vmt' => '1', 'vmct' => '1',
|
304 |
'vmr' => '1', 'vmw' => '1', 'vmsn' => '1', 'vmrd' => '1',
|
305 |
'vmlad' => '1', 'vip' => '0', 'vml' => '1', 'vmo' => '1',
|
306 |
'vms' => '1', 'vmam' => '1', 'vmpn' => '0', 'vwpm' => '1');
|
307 |
|
308 |
|
309 |
+
$sql = "SELECT * FROM `".WPF()->db->prefix."wpforo_usergroups`";
|
310 |
+
if( !$usergroups = WPF()->db->get_results($sql, ARRAY_A) ){
|
311 |
+
WPF()->usergroup->add('Admin', $cans_admin, '', 'administrator', 'full', '#FF3333');
|
312 |
+
WPF()->usergroup->add('Moderator', $cans_moder, '', 'editor', 'moderator', '#0066FF');
|
313 |
+
WPF()->usergroup->add('Registered', $cans_reg, '', 'subscriber', 'standard', '');
|
314 |
+
WPF()->usergroup->add('Guest', $cans_guest, '', '', 'read_only', '#222222');
|
315 |
+
WPF()->usergroup->add('Customer', $cans_customer, '', 'subscriber', 'standard', '#993366');
|
|
|
|
|
|
|
|
|
316 |
}
|
317 |
else{
|
318 |
foreach($usergroups as $usergroup){
|
319 |
$default = array();
|
|
|
320 |
$current = unserialize($usergroup['cans']);
|
321 |
if( strtolower($usergroup['name']) == 'admin' ) $default = $cans_admin;
|
322 |
elseif( strtolower($usergroup['name']) == 'moderator' ) $default = $cans_moder;
|
326 |
if( !empty($default) ){
|
327 |
$data_update = array_merge($default, $current);
|
328 |
if( !empty($data_update) ){
|
|
|
329 |
$data_update = serialize($data_update);
|
330 |
+
WPF()->db->query("UPDATE `".WPF()->db->prefix."wpforo_usergroups` SET `cans` = '" . WPF()->db->_real_escape($data_update) . "' WHERE `groupid` = " . intval($usergroup['groupid']) );
|
331 |
}
|
332 |
}
|
333 |
}
|
334 |
}
|
335 |
+
$sql = "SELECT COUNT(*) FROM `".WPF()->db->prefix."wpforo_forums`";
|
336 |
+
$count = WPF()->db->get_var($sql);
|
337 |
if(!$count){
|
338 |
+
if( $parentid = WPF()->forum->add( array( 'title' => 'Main Category', 'description' => 'This is a simple category / section' ), FALSE ) ){
|
339 |
+
WPF()->forum->add( array( 'title' => 'Main Forum', 'description' => 'This is a simple parent forum', 'parentid' => $parentid, 'icon' => 'fa-comments' ), FALSE );
|
340 |
}
|
341 |
}
|
342 |
|
350 |
|
351 |
#################################################################
|
352 |
// Creating Forum Page //////////////////////////////////////////
|
353 |
+
if( !WPF()->pageid ||
|
354 |
+
!WPF()->db->get_var("SELECT `ID` FROM `".WPF()->db->prefix."posts` WHERE `ID` = '".intval(WPF()->pageid)."' AND ( `post_content` LIKE '%[wpforo]%' OR `post_content` LIKE '%[wpforo-index]%' ) AND `post_status` LIKE 'publish' AND `post_type` IN('post', 'page')") ){
|
355 |
+
if( !$page_id = WPF()->db->get_var("SELECT `ID` FROM `".WPF()->db->prefix."posts` WHERE `post_content` LIKE '%[wpforo]%' AND `post_status` LIKE 'publish' AND `post_type` IN('post', 'page')") ){
|
356 |
$wpforo_page = array(
|
357 |
'post_date' => current_time( 'mysql', 1 ),
|
358 |
'post_date_gmt' => current_time( 'mysql', 1 ),
|
378 |
update_option( 'wpforo_permastruct', 'community' );
|
379 |
update_option( 'wpforo_url', esc_url( home_url('/') ) . "community/" );
|
380 |
}else{
|
381 |
+
if( !WPF()->permastruct ){
|
382 |
update_option( 'wpforo_permastruct', basename($wpforo_url) );
|
383 |
update_option( 'wpforo_url', esc_url( home_url('/') ) . basename($wpforo_url) . "/" );
|
384 |
}else{
|
385 |
+
update_option( 'wpforo_url', esc_url( home_url('/') ) . WPF()->permastruct . "/" );
|
386 |
}
|
387 |
}
|
388 |
}
|
389 |
}else{
|
390 |
+
if( !WPF()->use_home_url ) update_option( 'wpforo_use_home_url', '0' );
|
391 |
+
if( !WPF()->permastruct ) update_option( 'wpforo_permastruct', basename( get_wpf_option('wpforo_url') ) );
|
392 |
+
WPF()->db->query("UPDATE `".WPF()->db->prefix."posts` SET `post_content` = REPLACE(`post_content`, '[wpforo-index]', '[wpforo]') WHERE `ID` = '".WPF()->pageid."'");
|
393 |
}
|
394 |
|
395 |
+
WPF()->pageid = get_wpf_option( 'wpforo_pageid');
|
396 |
+
WPF()->permastruct = trim( get_wpf_option('wpforo_permastruct'), '/' );
|
397 |
flush_rewrite_rules(FALSE);
|
398 |
nocache_headers();
|
399 |
|
400 |
|
401 |
#################################################################
|
402 |
// Importing Language Packs and Phrases /////////////////////////
|
403 |
+
WPF()->phrase->xml_import('english.xml', 'install');
|
404 |
|
405 |
#################################################################
|
406 |
// Creating wpforo folders //////////////////////////////////////
|
416 |
|
417 |
#################################################################
|
418 |
// RESET USER CACHE /////////////////////////////////////////////
|
419 |
+
WPF()->member->clear_db_cache();
|
420 |
|
421 |
#################################################################
|
422 |
// RESET FUNCTIONS //////////////////////////////////////////////
|
424 |
if( !$wpdb->get_row($sql, ARRAY_A) ){
|
425 |
@$wpdb->query( "ALTER TABLE `".$wpdb->prefix."wpforo_phrases` ADD COLUMN `package` VARCHAR(255) NOT NULL DEFAULT 'wpforo'" );
|
426 |
}
|
427 |
+
WPF()->phrase->clear_cache();
|
428 |
|
429 |
#################################################################
|
430 |
// ADD `private` field in TOPIC TABLE ///////////////////////////
|
444 |
$args = array( 'table' => $wpdb->prefix . 'wpforo_views', 'col' => 'created', 'check' => 'col_type' );
|
445 |
$col_type = wpforo_db_check( $args );
|
446 |
if( $col_type != 'int(11)' ){
|
447 |
+
@$wpdb->query( "ALTER TABLE `".$wpdb->prefix."wpforo_views` MODIFY `created` INT(11) NOT NULL;" );
|
448 |
}
|
449 |
// ADD `status` field in TOPICS & POSTS TABLE ///////////////////////////
|
450 |
$args = array( 'table' => $wpdb->prefix . 'wpforo_topics', 'col' => 'status', 'check' => 'col_exists' );
|
457 |
// ADD `name` and `email` field in TOPIC TABLE ///////////////////////////
|
458 |
$args = array( 'table' => $wpdb->prefix . 'wpforo_topics', 'col' => 'name', 'check' => 'col_exists' );
|
459 |
if( !wpforo_db_check( $args ) ){
|
460 |
+
@$wpdb->query( "ALTER TABLE `" . $wpdb->prefix . "wpforo_topics` ADD `name` VARCHAR(50) NOT NULL, ADD `email` VARCHAR(50) NOT NULL" );
|
461 |
+
@$wpdb->query( "ALTER TABLE `" . $wpdb->prefix . "wpforo_posts` ADD `name` VARCHAR(50) NOT NULL, ADD `email` VARCHAR(50) NOT NULL" );
|
462 |
@$wpdb->query( "ALTER TABLE `" . $wpdb->prefix . "wpforo_topics` ADD KEY `email` (`email`)" );
|
463 |
@$wpdb->query( "ALTER TABLE `" . $wpdb->prefix . "wpforo_posts` ADD KEY `email` (`email`)" );
|
464 |
}
|
474 |
@$wpdb->query( "UPDATE `" . $wpdb->prefix . "wpforo_usergroups` SET `utitle` = 'name', `role` = 'subscriber', `access` = 'standard' WHERE `utitle` IS NULL OR `utitle` = ''");
|
475 |
}
|
476 |
#################################################################
|
477 |
+
// ADD `color` field in usergroups TABLE ///////////////////////////
|
478 |
+
$args = array( 'table' => $wpdb->prefix . 'wpforo_usergroups', 'col' => 'color', 'check' => 'col_exists' );
|
479 |
+
if( !wpforo_db_check( $args ) ){
|
480 |
+
@$wpdb->query( "ALTER TABLE `" . $wpdb->prefix . "wpforo_usergroups` ADD `color` varchar(7) NOT NULL DEFAULT ''" );
|
481 |
+
@$wpdb->query( "UPDATE `" . $wpdb->prefix . "wpforo_usergroups` SET `color` = '#FF3333' WHERE `groupid` = 1");
|
482 |
+
@$wpdb->query( "UPDATE `" . $wpdb->prefix . "wpforo_usergroups` SET `color` = '#0066FF' WHERE `groupid` = 2");
|
483 |
+
@$wpdb->query( "UPDATE `" . $wpdb->prefix . "wpforo_usergroups` SET `color` = '#222222' WHERE `groupid` = 4");
|
484 |
+
@$wpdb->query( "UPDATE `" . $wpdb->prefix . "wpforo_usergroups` SET `color` = '#993366' WHERE `groupid` = 5");
|
485 |
+
}
|
486 |
+
#################################################################
|
487 |
+
// ADD `online_time` field in profiles TABLE ///////////////////////////
|
488 |
+
$args = array( 'table' => $wpdb->prefix . 'wpforo_profiles', 'col' => 'online_time', 'check' => 'col_exists' );
|
489 |
+
if( !wpforo_db_check( $args ) ){
|
490 |
+
@$wpdb->query( "ALTER TABLE `" . $wpdb->prefix . "wpforo_profiles` ADD `online_time` INT UNSIGNED NOT NULL DEFAULT 0 AFTER `last_login`, ADD KEY (`online_time`)" );
|
491 |
+
}
|
492 |
+
#################################################################
|
493 |
// ADD `private` field in post TABLE ///////////////////////////
|
494 |
$args = array( 'table' => $wpdb->prefix . 'wpforo_posts', 'col' => 'private', 'check' => 'col_exists' );
|
495 |
if( !wpforo_db_check( $args ) ){
|
496 |
+
@$wpdb->query( "ALTER TABLE `" . $wpdb->prefix . "wpforo_posts` ADD `private` TINYINT(1) NOT NULL DEFAULT 0, ADD INDEX `is_private` (`private`)" );
|
497 |
+
}
|
498 |
+
|
499 |
+
// ADD `unique_vote` KEY in post Votes ///////////////////////////
|
500 |
+
$args = array( 'table' => $wpdb->prefix . 'wpforo_votes', 'col' => 'unique_vote', 'check' => 'key_exists' );
|
501 |
+
if( !wpforo_db_check( $args ) ){
|
502 |
+
$args = array( 'table' => $wpdb->prefix . 'wpforo_votes', 'col' => 'userid', 'check' => 'key_exists' );
|
503 |
+
if( wpforo_db_check( $args ) ) @$wpdb->query( "ALTER TABLE `" . $wpdb->prefix . "wpforo_votes` DROP KEY `userid`" );
|
504 |
+
@$wpdb->query( "ALTER TABLE `" . $wpdb->prefix . "wpforo_votes` ADD UNIQUE KEY `unique_vote` (`userid`, `postid`, `reaction`)" );
|
505 |
+
}
|
506 |
+
|
507 |
+
#################################################################
|
508 |
+
// CHECK Addon Notice /////////////////////////////////////////
|
509 |
+
$lastHash = get_option('wpforo-addon-note-dismissed');
|
510 |
+
$first = get_option('wpforo-addon-note-first');
|
511 |
+
if( $lastHash && $first == 'true' ) {
|
512 |
+
update_option('wpforo-addon-note-first', 'false');
|
513 |
}
|
514 |
|
515 |
#################################################################
|
516 |
// UPDATE VERSION - END /////////////////////////////////////////
|
517 |
update_option('wpforo_version', WPFORO_VERSION);
|
518 |
+
WPF()->notice->clear();
|
519 |
wpforo_clean_cache();
|
520 |
}
|
521 |
|
551 |
|
552 |
function wpforo_uninstall() {
|
553 |
|
554 |
+
global $wpdb;
|
555 |
|
556 |
if( ! wpforo_is_admin() ) return;
|
557 |
if( ! current_user_can( 'activate_plugins' ) ) return;
|
580 |
}
|
581 |
}
|
582 |
|
583 |
+
if( isset(WPF()->pageid) && WPF()->pageid ){
|
584 |
+
wp_delete_post( WPF()->pageid, true );
|
585 |
}
|
586 |
|
587 |
$options = array( 'wpforo_version',
|
602 |
'wpforo_use_home_url',
|
603 |
'wpforo_excld_urls',
|
604 |
'wpforo_tools_antispam',
|
605 |
+
'wpforo_tools_cleanup',
|
606 |
+
'wpforo_tools_misc'
|
607 |
);
|
608 |
|
609 |
foreach($options as $option){
|
613 |
}
|
614 |
|
615 |
$wpdb->query( "DELETE FROM `" . $wpdb->base_prefix ."usermeta` WHERE `meta_key` = '_wpf_member_obj'" );
|
616 |
+
$wpdb->query( "DELETE FROM `" . $wpdb->prefix ."options` WHERE option_name LIKE 'wpforo_stat_%'" );
|
617 |
$wpdb->query( "DELETE FROM `" . $wpdb->prefix ."options` WHERE option_name LIKE 'widget_wpforo_widget_%'" );
|
618 |
|
619 |
$menu = wp_get_nav_menu_object( 'wpforo-navigation' );
|
620 |
wp_delete_nav_menu( $menu->term_id );
|
621 |
+
wp_delete_post(WPF()->pageid, TRUE);
|
622 |
|
623 |
deactivate_plugins( WPFORO_BASENAME );
|
624 |
|
631 |
function wpforo_profile_notice(){
|
632 |
global $wpdb;
|
633 |
$button = '';
|
634 |
+
if( is_multisite() ){
|
635 |
+
$users = $wpdb->get_var("SELECT COUNT(*) FROM `".$wpdb->base_prefix."usermeta` WHERE `meta_key` LIKE '".$wpdb->prefix."capabilities'");
|
636 |
+
} else {
|
637 |
+
$users = $wpdb->get_var("SELECT COUNT(*) FROM `".$wpdb->base_prefix."users`");
|
638 |
+
}
|
639 |
$profiles = $wpdb->get_var("SELECT COUNT(*) FROM `" . $wpdb->prefix . "wpforo_profiles`");
|
640 |
$delta = $users - $profiles;
|
641 |
$status = ( $delta > 2 ) ? round((( $profiles * 100 ) / $users ), 1) . '% (' . $profiles . ' / ' . $users . ') ' : '100%';
|
651 |
}
|
652 |
|
653 |
function wpforo_update_db_notice(){
|
654 |
+
global $wpdb;
|
655 |
+
$private_topics = $wpdb->get_var("SELECT `topicid` FROM `" . $wpdb->prefix . "wpforo_topics` WHERE `private` = 1 LIMIT 1");
|
656 |
if( $private_topics ){
|
657 |
+
$private_posts = $wpdb->get_var("SELECT `postid` FROM `" . $wpdb->prefix . "wpforo_posts` WHERE `private` = 1 LIMIT 1");
|
658 |
if( !$private_posts ){
|
659 |
$url = admin_url('admin.php?page=wpforo-community&action=wpfdb&wpfv=142');
|
660 |
$class = 'wpforo-mnote notice notice-warning is-dismissible';
|
669 |
}
|
670 |
|
671 |
function wpforo_update_db(){
|
672 |
+
global $wpdb;
|
673 |
// ADD posts' private values from TOPICS table ///////////////////////////
|
674 |
@$wpdb->query( "UPDATE `" . $wpdb->prefix . "wpforo_posts`, `" . $wpdb->prefix . "wpforo_topics` SET `" . $wpdb->prefix . "wpforo_posts`.`private` = `" . $wpdb->prefix . "wpforo_topics`.`private` WHERE `" . $wpdb->prefix . "wpforo_posts`.`topicid` = `" . $wpdb->prefix . "wpforo_topics`.`topicid`");
|
675 |
// ADD INDEXES in wpforo_views TABLE///////////////////////////
|
wpf-includes/functions-template.php
CHANGED
@@ -9,9 +9,8 @@ register_nav_menus( array(
|
|
9 |
|
10 |
|
11 |
function wpforo_login_url(){
|
12 |
-
|
13 |
-
|
14 |
-
$wp_login_url = trim(get_bloginfo('url') , '/') . '/' . ltrim($wpforo->member->options['login_url'] , '/');
|
15 |
}else{
|
16 |
$request_uri = preg_replace( '#/?\?.*$#isu', '', wpforo_get_request_uri() );
|
17 |
$wp_login_url = (!is_wpforo_page() ? wpforo_home_url('?wpforo=signin') : wpforo_home_url( $request_uri . '?wpforo=signin' ) );
|
@@ -22,9 +21,8 @@ function wpforo_login_url(){
|
|
22 |
|
23 |
|
24 |
function wpforo_register_url(){
|
25 |
-
|
26 |
-
|
27 |
-
$wp_register_url = trim(get_bloginfo('url') , '/') . '/' . ltrim($wpforo->member->options['register_url'] , '/');
|
28 |
}
|
29 |
else{
|
30 |
$wp_register_url = wpforo_home_url('?wpforo=signup');
|
@@ -34,9 +32,8 @@ function wpforo_register_url(){
|
|
34 |
|
35 |
|
36 |
function wpforo_lostpass_url(){
|
37 |
-
|
38 |
-
|
39 |
-
$wp_lostpass_url = trim(get_bloginfo('url') , '/') . '/' . ltrim($wpforo->member->options['lost_password_url'] , '/');
|
40 |
}
|
41 |
else{
|
42 |
$wp_lostpass_url = wp_lostpassword_url( wpforo_get_request_uri() );
|
@@ -46,15 +43,14 @@ function wpforo_lostpass_url(){
|
|
46 |
|
47 |
|
48 |
function wpforo_menu_filter( $items, $menu ) {
|
49 |
-
global $wpforo;
|
50 |
if ( !wpforo_is_admin() ) {
|
51 |
foreach ( $items as $key => $item ) {
|
52 |
if(isset($item->url)){
|
53 |
if( strpos($item->url, '%wpforo-') !== FALSE ){
|
54 |
$shortcode = trim(str_replace(array('https://', 'http://', '/', '%'), '', $item->url));
|
55 |
-
if(isset(
|
56 |
-
if(isset(
|
57 |
-
if(isset(
|
58 |
}
|
59 |
else{
|
60 |
unset($items[$key]);
|
@@ -68,21 +64,23 @@ function wpforo_menu_filter( $items, $menu ) {
|
|
68 |
add_filter( 'wp_get_nav_menu_items', 'wpforo_menu_filter', 1, 2 );
|
69 |
|
70 |
function wpforo_menu_nofollow_items($item_output, $item, $depth, $args) {
|
71 |
-
if( isset($item->url) && strpos($item->url, '?wpforo') !== FALSE ) {
|
72 |
-
|
73 |
-
}
|
74 |
return $item_output;
|
75 |
}
|
76 |
add_filter('walker_nav_menu_start_el', 'wpforo_menu_nofollow_items', 1, 4);
|
77 |
|
78 |
function wpforo_profile_plugin_menu( $userid = 0 ){
|
79 |
-
|
|
|
|
|
80 |
$forum_profile = false;
|
81 |
if($url = wpforo_has_shop_plugin($userid)){
|
82 |
$forum_profile = true;
|
83 |
$menu_html .= '<div id="wpf-pp-shop-menu" class="wpf-pp-menu">
|
84 |
<a class="wpf-pp-menu-item" href="' . esc_url($url) . '">
|
85 |
-
<i class="fa fa-shopping-cart" title="'.wpforo_phrase('Shop Account', false).'"></i>
|
86 |
</a>
|
87 |
</div>';
|
88 |
}
|
@@ -90,17 +88,16 @@ function wpforo_profile_plugin_menu( $userid = 0 ){
|
|
90 |
$forum_profile = true;
|
91 |
$menu_html .= '<div id="wpf-pp-site-menu" class="wpf-pp-menu">
|
92 |
<a class="wpf-pp-menu-item" href="' . esc_url($url) . '">
|
93 |
-
<i class="fa fa-user" title="'.wpforo_phrase('Site Profile', false).'"></i>
|
94 |
</a>
|
95 |
</div>';
|
96 |
}
|
97 |
if( $forum_profile ) {
|
98 |
$menu_html .= '<div id="wpf-pp-forum-menu" class="wpf-pp-menu">
|
99 |
<div class="wpf-pp-menu-item">
|
100 |
-
<i class="fa fa-comments" title="' . wpforo_phrase('Forum Profile', false) . '"></i>
|
101 |
</div>
|
102 |
</div>';
|
103 |
-
$menu_html = '<div class="wpf-profile-plugin-menu">';
|
104 |
$menu_html .= "\r\n<div class=\"wpf-clear\"></div>\r\n</div>";
|
105 |
$menu_html = apply_filters( 'wpforo_profile_plugin_menu_filter', $menu_html, $userid );
|
106 |
echo $menu_html; //This is a HTML content//
|
@@ -176,7 +173,6 @@ class wpForo_Widget_search extends WP_Widget {
|
|
176 |
);
|
177 |
}
|
178 |
public function widget( $args, $instance ) {
|
179 |
-
global $wpforo;
|
180 |
echo $args['before_widget']; //This is a HTML content//
|
181 |
echo '<div id="wpf-widget-search" class="wpforo-widget-wrap">';
|
182 |
if ( ! empty( $instance['title'] ) ) {
|
@@ -217,7 +213,6 @@ class wpForo_Widget_login_form extends WP_Widget {
|
|
217 |
);
|
218 |
}
|
219 |
public function widget( $args, $instance ) {
|
220 |
-
global $wpforo;
|
221 |
echo $args['before_widget']; //This is a HTML content//
|
222 |
echo '<div id="wpf-widget-login" class="wpforo-widget-wrap">';
|
223 |
if ( ! empty( $instance['title'] ) ) {
|
@@ -225,18 +220,18 @@ class wpForo_Widget_login_form extends WP_Widget {
|
|
225 |
}
|
226 |
echo '<div class="wpforo-widget-content">';
|
227 |
?>
|
228 |
-
<?php if( is_user_logged_in() && !empty(
|
229 |
-
<?php extract(
|
230 |
<div class="wpforo-profile-wrap">
|
231 |
<div class="wpforo-profile-head">
|
232 |
<div class="h-header">
|
233 |
-
<?php if(
|
234 |
-
<div class="h-left"><?php echo
|
235 |
<?php else: $rsz = ' style="margin-left:10px;"'; endif; ?>
|
236 |
<div class="h-right" <?php echo $rsz; ?>>
|
237 |
<div class="h-top">
|
238 |
<div class="profile-display-name">
|
239 |
-
<?php
|
240 |
<?php echo $display_name ? esc_html($display_name) : esc_html(urldecode($user_nicename)) ?>
|
241 |
</div>
|
242 |
<div class="profile-stat-data">
|
@@ -250,7 +245,7 @@ class wpForo_Widget_login_form extends WP_Widget {
|
|
250 |
<div class="h-footer wpfbg-2">
|
251 |
|
252 |
<div class="h-bottom">
|
253 |
-
<?php
|
254 |
<a href="?wpforo=logout"><?php wpforo_phrase('logout') ?></a>
|
255 |
<div class="wpf-clear"></div>
|
256 |
</div>
|
@@ -325,14 +320,13 @@ class wpForo_Widget_online_members extends WP_Widget {
|
|
325 |
);
|
326 |
}
|
327 |
public function widget( $args, $instance ) {
|
328 |
-
global $wpforo;
|
329 |
echo $args['before_widget']; //This is a HTML content//
|
330 |
echo '<div id="wpf-widget-online-users" class="wpforo-widget-wrap">';
|
331 |
if ( ! empty( $instance['title'] ) ) {
|
332 |
echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title'];
|
333 |
}
|
334 |
// widget content from front end
|
335 |
-
$online_members =
|
336 |
echo '<div class="wpforo-widget-content">';
|
337 |
if(!empty($online_members)){
|
338 |
echo '<ul>
|
@@ -340,11 +334,11 @@ class wpForo_Widget_online_members extends WP_Widget {
|
|
340 |
<div class="wpforo-list-item">';
|
341 |
foreach( $online_members as $member ){
|
342 |
if( $instance['display_avatar'] ): ?>
|
343 |
-
<a href="<?php echo esc_url(
|
344 |
-
<?php echo
|
345 |
</a>
|
346 |
<?php else: ?>
|
347 |
-
<a href="<?php echo esc_url(
|
348 |
<?php endif; ?>
|
349 |
<?php
|
350 |
}
|
@@ -397,15 +391,14 @@ class wpForo_Widget_recent_topics extends WP_Widget {
|
|
397 |
);
|
398 |
}
|
399 |
public function widget( $args, $instance ) {
|
400 |
-
global $wpforo;
|
401 |
echo $args['before_widget'];//This is a HTML content//
|
402 |
echo '<div id="wpf-widget-recent-replies" class="wpforo-widget-wrap">';
|
403 |
if ( ! empty( $instance['title'] ) ) {
|
404 |
echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title'];//This is a HTML content//
|
405 |
}
|
406 |
// widget content from front end
|
407 |
-
$private = (!is_user_logged_in() ||
|
408 |
-
$status = (!is_user_logged_in() ||
|
409 |
$topic_args = array( // forumid, order, parentid
|
410 |
'orderby' => 'created',
|
411 |
'order' => 'DESC', // ASC DESC
|
@@ -413,9 +406,9 @@ class wpForo_Widget_recent_topics extends WP_Widget {
|
|
413 |
'private' => $private,
|
414 |
'status' => $status
|
415 |
);
|
416 |
-
$topics =
|
417 |
-
$ug_can_va =
|
418 |
-
$is_avatar = wpforo_feature('avatars'
|
419 |
echo '<div class="wpforo-widget-content"><ul>';
|
420 |
foreach( $topics as $topic ){
|
421 |
$topic_url = wpforo_topic($topic['topicid'], 'url');
|
@@ -426,7 +419,7 @@ class wpForo_Widget_recent_topics extends WP_Widget {
|
|
426 |
<?php if( $instance['display_avatar'] ): ?>
|
427 |
<?php if( $ug_can_va && $is_avatar ): ?>
|
428 |
<div class="wpforo-list-item-left">
|
429 |
-
<?php echo
|
430 |
</div>
|
431 |
<?php endif; ?>
|
432 |
<?php endif; ?>
|
@@ -480,14 +473,13 @@ class wpForo_Widget_recent_replies extends WP_Widget {
|
|
480 |
}
|
481 |
|
482 |
public function widget( $args, $instance ) {
|
483 |
-
global $wpforo;
|
484 |
echo $args['before_widget'];//This is a HTML content//
|
485 |
echo '<div id="wpf-widget-recent-replies" class="wpforo-widget-wrap">';
|
486 |
if ( ! empty( $instance['title'] ) ) {
|
487 |
echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title'];//This is a HTML content//
|
488 |
}
|
489 |
-
$private = (!is_user_logged_in() ||
|
490 |
-
$status = (!is_user_logged_in() ||
|
491 |
// widget content from front end
|
492 |
$posts_args = array(
|
493 |
'orderby' => 'created',
|
@@ -496,9 +488,9 @@ class wpForo_Widget_recent_replies extends WP_Widget {
|
|
496 |
'private' => $private,
|
497 |
'status' => $status
|
498 |
);
|
499 |
-
$recent_posts =
|
500 |
-
$ug_can_va =
|
501 |
-
$is_avatar = wpforo_feature('avatars'
|
502 |
echo '<div class="wpforo-widget-content"><ul>';
|
503 |
foreach( $recent_posts as $post ){
|
504 |
$post_url = wpforo_post( $post['postid'], 'url' );
|
@@ -509,7 +501,7 @@ class wpForo_Widget_recent_replies extends WP_Widget {
|
|
509 |
<?php if( $instance['display_avatar'] ): ?>
|
510 |
<?php if( $ug_can_va && $is_avatar ): ?>
|
511 |
<div class="wpforo-list-item-left">
|
512 |
-
<?php echo
|
513 |
</div>
|
514 |
<?php endif; ?>
|
515 |
<?php endif; ?>
|
@@ -563,14 +555,13 @@ class wpforo_widget_forums extends WP_Widget {
|
|
563 |
);
|
564 |
}
|
565 |
public function widget( $args, $instance ) {
|
566 |
-
global $wpforo;
|
567 |
echo $args['before_widget'];//This is a HTML content//
|
568 |
echo '<div id="wpf-widget-forums" class="wpforo-widget-wrap">';
|
569 |
if ( ! empty( $instance['title'] ) ) {
|
570 |
echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title'];//This is a HTML content//
|
571 |
}
|
572 |
echo '<div class="wpforo-widget-content">';
|
573 |
-
|
574 |
echo '</div>';
|
575 |
echo '</div>';
|
576 |
echo $args['after_widget'];//This is a HTML content//
|
@@ -643,8 +634,7 @@ function wpforo_post_edited($post, $echo = true){
|
|
643 |
}
|
644 |
|
645 |
function wpforo_hide_title($title, $id = 0) {
|
646 |
-
|
647 |
-
if( !wpforo_feature('page-title', $wpforo) ){
|
648 |
if( $wpforo_base_slug = basename( wpforo_home_url() ) ) $wpforo_page = get_page_by_path($wpforo_base_slug);
|
649 |
if(!empty($wpforo_page)){
|
650 |
if (in_the_loop() && is_page($wpforo_page->ID) && $id == get_the_ID()) {
|
@@ -677,20 +667,21 @@ function wpforo_validate_gravatar( $email ) {
|
|
677 |
}
|
678 |
}
|
679 |
|
680 |
-
function wpforo_member_title( $member = array(), $echo = true, $
|
681 |
-
global $wpforo;
|
682 |
$title = array();
|
683 |
|
684 |
-
if(empty($member) || !$member['groupid']) return;
|
685 |
-
$rating_title_ug_enabled = ( isset(
|
686 |
-
$usergroup_title_ug_enabled = ( isset(
|
687 |
|
688 |
-
if( wpforo_feature('rating_title'
|
689 |
$title[] = '<span class="wpf-member-title wpfrt" title="' . wpforo_phrase('Rating Title', false) . '">' . esc_html($member['stat']['title']) . '</span>';
|
690 |
}
|
691 |
-
if( empty($title) ){
|
692 |
$title[] = '<span class="wpf-member-title wpfct" title="' . wpforo_phrase('User Title', false) . '">' . wpforo_phrase($member['title'], false) . '</span>';
|
693 |
-
}
|
|
|
|
|
694 |
if( $usergroup_title_ug_enabled ){
|
695 |
$class = '';
|
696 |
if( $member['groupid'] == 1 ) $class = ' wpfbg-6 wpfcl-3';
|
@@ -699,7 +690,7 @@ function wpforo_member_title( $member = array(), $echo = true, $usergroup = true
|
|
699 |
$title[] = '<span class="wpf-member-title wpfut wpfug-' . intval($member['groupid']) . $class . '" title="' . wpforo_phrase('Usergroup', false) . '">' . esc_html($member['groupname']) . '</span>';
|
700 |
}
|
701 |
if( !empty($title) ){
|
702 |
-
$title_html = implode(' ', $title);
|
703 |
$title_html = apply_filters('wpforo_member_title', $title_html, $member);
|
704 |
if( $echo ) {
|
705 |
echo $title_html;
|
@@ -711,17 +702,29 @@ function wpforo_member_title( $member = array(), $echo = true, $usergroup = true
|
|
711 |
}
|
712 |
|
713 |
function wpforo_member_badge( $member = array(), $sep = '', $type = 'full' ){
|
714 |
-
|
715 |
-
|
716 |
-
if( wpforo_feature('rating', $wpforo) && $rating_badge_ug_enabled && isset($member['stat']['rating']) ): ?>
|
717 |
<div class="author-rating-<?php echo esc_attr($type) ?>" style="color:<?php echo esc_attr($member['stat']['color']) ?>" title="<?php wpforo_phrase('Member Rating Badge') ?>">
|
718 |
-
<?php echo
|
719 |
</div><?php if($sep): ?><span class="author-rating-sep"><?php echo esc_html($sep); ?></span><?php endif; ?>
|
720 |
<?php endif;
|
721 |
|
722 |
do_action('wpforo_after_member_badge', $member);
|
723 |
}
|
724 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
725 |
add_filter( 'body_class', 'wpforo_page_class', 1, 10 );
|
726 |
function wpforo_page_class( $classes ) {
|
727 |
if(!empty($classes)){
|
@@ -739,43 +742,42 @@ function wpforo_page_class( $classes ) {
|
|
739 |
###############################################################################
|
740 |
|
741 |
function wpforo_post( $postid, $var = 'item', $echo = false ){
|
742 |
-
|
743 |
-
global $wpforo;
|
744 |
$post = ( $var == 'item' ) ? array() : '';
|
745 |
if( !$postid ) return $post;
|
746 |
-
$cache =
|
747 |
if( $cache ){
|
748 |
-
$post =
|
749 |
}
|
750 |
if( empty($post) ){
|
751 |
if( !$cache && $var == 'url' ){
|
752 |
-
$post['url'] =
|
753 |
}
|
754 |
elseif( !$cache && $var == 'is_answered' ){
|
755 |
-
$post['is_answered'] =
|
756 |
}
|
757 |
elseif( !$cache && $var == 'votes_sum' ){
|
758 |
-
|
|
|
759 |
}
|
760 |
elseif( !$cache && $var == 'likes_count' ){
|
761 |
-
$post['likes_count'] =
|
762 |
}
|
763 |
elseif( !$cache && $var == 'likers_usernames' ){
|
764 |
-
$post['likers_usernames'] =
|
765 |
}
|
766 |
else{
|
767 |
-
$post =
|
768 |
if( !empty($post) ){
|
769 |
-
$post['url'] =
|
770 |
if( $cache ){
|
771 |
-
$post['is_answered'] =
|
772 |
-
$post['votes_sum'] = $
|
773 |
-
$post['likes_count'] =
|
774 |
-
$post['likers_usernames'] =
|
775 |
}
|
776 |
if(!empty($post)){
|
777 |
$cache_item = array( $postid => $post );
|
778 |
-
|
779 |
}
|
780 |
}
|
781 |
}
|
@@ -794,28 +796,26 @@ function wpforo_post( $postid, $var = 'item', $echo = false ){
|
|
794 |
}
|
795 |
|
796 |
function wpforo_topic( $topicid, $var = 'item', $echo = false ){
|
797 |
-
|
798 |
-
global $wpforo;
|
799 |
$topic = ( $var == 'item' ) ? array() : '';
|
800 |
if( !$topicid ) return $topic;
|
801 |
-
$cache =
|
802 |
-
if( $cache ) $topic =
|
803 |
|
804 |
if( empty($topic) ){
|
805 |
if( !$cache && $var == 'url' ){
|
806 |
-
$topic['url'] =
|
807 |
}
|
808 |
elseif( !$cache && $var == 'is_answer' ){
|
809 |
-
$topic['is_answer'] =
|
810 |
}
|
811 |
else{
|
812 |
-
$topic =
|
813 |
if( !empty($topic) ){
|
814 |
-
$topic['url'] =
|
815 |
-
$topic['is_answer'] =
|
816 |
if(!empty($topic)){
|
817 |
$cache_item = array( $topicid => $topic );
|
818 |
-
|
819 |
}
|
820 |
}
|
821 |
}
|
@@ -835,37 +835,35 @@ function wpforo_topic( $topicid, $var = 'item', $echo = false ){
|
|
835 |
|
836 |
|
837 |
function wpforo_forum( $forumid, $var = 'item', $echo = false ){
|
838 |
-
|
839 |
-
global $wpforo;
|
840 |
$data = array();
|
841 |
$forum = ( $var == 'item' ) ? array() : '';
|
842 |
-
$cache =
|
843 |
if( !$forumid ) return $forum;
|
844 |
-
if( $cache ) $forum =
|
845 |
|
846 |
if( empty($forum) ){
|
847 |
if( !$cache && ($var == 'childs' || $var == 'counts') ){
|
848 |
if( $var == 'childs' ) {
|
849 |
-
|
850 |
$forum['childs'] = $data;
|
851 |
}
|
852 |
else{
|
853 |
-
|
854 |
$forum['childs'] = $data;
|
855 |
-
$forum['counts'] =
|
856 |
}
|
857 |
}
|
858 |
else{
|
859 |
-
$forum =
|
860 |
if( !empty($forum) ){
|
861 |
if( $cache ){
|
862 |
-
|
863 |
$forum['childs'] = $data;
|
864 |
-
$forum['counts'] =
|
865 |
}
|
866 |
if(!empty($forum)){
|
867 |
$cache_item = array( $forumid => $forum );
|
868 |
-
|
869 |
}
|
870 |
}
|
871 |
}
|
@@ -884,17 +882,15 @@ function wpforo_forum( $forumid, $var = 'item', $echo = false ){
|
|
884 |
}
|
885 |
|
886 |
function wpforo_member( $object, $var = 'item', $echo = false ){
|
887 |
-
|
888 |
-
global $wpforo;
|
889 |
$member = array();
|
890 |
if( empty( $object ) ) return $member;
|
891 |
|
892 |
if( is_array( $object ) && isset($object['userid']) && $object['userid'] == 0 ){
|
893 |
-
$member =
|
894 |
}
|
895 |
else{
|
896 |
$userid = ( is_array( $object ) && isset($object['userid']) ) ? intval($object['userid']) : intval($object);
|
897 |
-
$member =
|
898 |
}
|
899 |
|
900 |
if( $var != 'item' && $var ){
|
@@ -912,8 +908,10 @@ function wpforo_member( $object, $var = 'item', $echo = false ){
|
|
912 |
function wpforo_member_link( $member, $prefix = '', $length = 30, $class = '', $echo = true ){
|
913 |
$display_name = ( isset($member['display_name']) && $member['display_name'] ) ? $member['display_name'] : wpforo_phrase('Anonymous', false);
|
914 |
$nofollow = ( !wpforo_feature('seo-profile')) ? ' rel="nofollow" ' : '';
|
|
|
|
|
915 |
if( isset($member['profile_url']) && $member['profile_url'] ){
|
916 |
-
?><a href="<?php echo esc_url($member['profile_url']) ?>" <?php echo $nofollow ?>><?php if( strpos($prefix, '%s') !== FALSE ): ?><?php echo sprintf( wpforo_phrase($prefix, FALSE), esc_html(wpforo_text($display_name, $length, FALSE)) ); ?><?php else: ?><?php if( $prefix ){ echo wpforo_phrase( $prefix, false) . ' '; } ?><?php if( $length ){ echo esc_html(wpforo_text($display_name, $length, false)); } else { echo esc_html($display_name); } ?><?php endif; ?></a><?php
|
917 |
}
|
918 |
else{
|
919 |
?><?php if( strpos($prefix, '%s') !== FALSE ): ?><?php echo sprintf( wpforo_phrase($prefix, FALSE), esc_html(wpforo_text($display_name, $length, FALSE)) ); ?><?php else: ?><?php if( $prefix ){ echo wpforo_phrase( $prefix, false) . ' '; } ?><?php if( $length ){ echo esc_html(wpforo_text($display_name, $length, false)); } else { echo esc_html($display_name); } ?><?php endif; ?><?php
|
@@ -1019,9 +1017,8 @@ function wpforo_resetpassword(){ ?>
|
|
1019 |
*/
|
1020 |
function wpforo_fields( $fields, $echo = true ){
|
1021 |
if( empty($fields) ) return '';
|
1022 |
-
global $wpforo;
|
1023 |
$fields = apply_filters( 'wpforo_form_fields', $fields );
|
1024 |
-
$html =
|
1025 |
if( $echo ){
|
1026 |
echo $html;
|
1027 |
}
|
@@ -1042,10 +1039,9 @@ function wpforo_fields( $fields, $echo = true ){
|
|
1042 |
*/
|
1043 |
|
1044 |
function wpforo_register_page_field_values( $fields ){
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
$wpforo->form['varname'] = 'wpfreg';
|
1049 |
}
|
1050 |
add_action( 'wpforo_register_page_start', 'wpforo_register_page_field_values', 10, 1 );
|
1051 |
|
@@ -1062,13 +1058,11 @@ add_action( 'wpforo_register_page_start', 'wpforo_register_page_field_values', 1
|
|
1062 |
*/
|
1063 |
|
1064 |
function wpforo_account_page_field_values( $fields ){
|
1065 |
-
|
1066 |
-
|
1067 |
-
if( isset($wpforo->current_object['user']) && !empty($wpforo->current_object['user']) ){
|
1068 |
-
$user = $wpforo->current_object['user'];
|
1069 |
$user = apply_filters('wpforo_profile_header_obj', $user);
|
1070 |
-
|
1071 |
-
|
1072 |
}
|
1073 |
}
|
1074 |
add_action( 'wpforo_account_page_start', 'wpforo_account_page_field_values', 10, 1 );
|
@@ -1086,77 +1080,67 @@ add_action( 'wpforo_account_page_start', 'wpforo_account_page_field_values', 10,
|
|
1086 |
*/
|
1087 |
|
1088 |
function wpforo_profile_page_field_values( $fields ){
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
$user = $wpforo->current_object['user'];
|
1093 |
-
$wpforo->form['value'] = $user;
|
1094 |
}
|
1095 |
}
|
1096 |
add_action( 'wpforo_profile_page_start', 'wpforo_profile_page_field_values', 10, 1 );
|
1097 |
|
1098 |
|
1099 |
function wpforo_search_page_field_values( $fields ){
|
1100 |
-
|
1101 |
-
|
1102 |
-
$wpforo->form['varname'] = '';
|
1103 |
}
|
1104 |
add_action( 'wpforo_search_page_start', 'wpforo_search_page_field_values', 10, 1 );
|
1105 |
|
1106 |
function wpforo_user_avatar( $user, $size, $attr = '', $lastmod = false ){
|
1107 |
-
global $wpforo;
|
1108 |
$avatar_html = '';
|
1109 |
if( is_int($user) && $user ){
|
1110 |
$avatar_html = ($size) ? get_avatar($user, $size) : get_avatar($user);
|
1111 |
if($attr) $avatar_html = str_replace('<img', '<img ' . $attr, $avatar_html);
|
1112 |
}
|
1113 |
elseif( is_array($user) && !empty($user) ){
|
1114 |
-
$avatar_html =
|
1115 |
}
|
1116 |
|
1117 |
if( $lastmod ){
|
1118 |
$url = wpforo_avatar_url( $avatar_html );
|
1119 |
if($url){
|
1120 |
-
|
|
|
|
|
1121 |
}
|
1122 |
}
|
1123 |
return $avatar_html;
|
1124 |
}
|
1125 |
|
1126 |
function wpforo_register_fields(){
|
1127 |
-
|
1128 |
-
|
1129 |
-
$fields = $wpforo->member->get_register_fields();
|
1130 |
do_action( 'wpforo_register_page_start', $fields );
|
1131 |
|
1132 |
return $fields;
|
1133 |
}
|
1134 |
|
1135 |
function wpforo_account_fields(){
|
1136 |
-
|
1137 |
-
|
1138 |
-
$fields = $wpforo->member->get_account_fields();
|
1139 |
do_action( 'wpforo_account_page_start', $fields );
|
1140 |
|
1141 |
return $fields;
|
1142 |
}
|
1143 |
|
1144 |
function wpforo_profile_fields(){
|
1145 |
-
|
1146 |
-
|
1147 |
-
$fields = $wpforo->member->get_profile_fields();
|
1148 |
do_action( 'wpforo_profile_page_start', $fields );
|
1149 |
|
1150 |
return $fields;
|
1151 |
}
|
1152 |
|
1153 |
function wpforo_search_fields(){
|
1154 |
-
|
1155 |
-
|
1156 |
-
$fields = $wpforo->member->get_search_fields();
|
1157 |
do_action( 'wpforo_search_page_start', $fields );
|
1158 |
|
1159 |
-
if(
|
1160 |
$fields = array(
|
1161 |
array(
|
1162 |
array(
|
9 |
|
10 |
|
11 |
function wpforo_login_url(){
|
12 |
+
if(isset(WPF()->member->options['login_url']) && WPF()->member->options['login_url']){
|
13 |
+
$wp_login_url = trim(get_bloginfo('url') , '/') . '/' . ltrim(WPF()->member->options['login_url'] , '/');
|
|
|
14 |
}else{
|
15 |
$request_uri = preg_replace( '#/?\?.*$#isu', '', wpforo_get_request_uri() );
|
16 |
$wp_login_url = (!is_wpforo_page() ? wpforo_home_url('?wpforo=signin') : wpforo_home_url( $request_uri . '?wpforo=signin' ) );
|
21 |
|
22 |
|
23 |
function wpforo_register_url(){
|
24 |
+
if(isset(WPF()->member->options['register_url']) && WPF()->member->options['register_url']){
|
25 |
+
$wp_register_url = trim(get_bloginfo('url') , '/') . '/' . ltrim(WPF()->member->options['register_url'] , '/');
|
|
|
26 |
}
|
27 |
else{
|
28 |
$wp_register_url = wpforo_home_url('?wpforo=signup');
|
32 |
|
33 |
|
34 |
function wpforo_lostpass_url(){
|
35 |
+
if(isset(WPF()->member->options['lost_password_url']) && WPF()->member->options['lost_password_url']){
|
36 |
+
$wp_lostpass_url = trim(get_bloginfo('url') , '/') . '/' . ltrim(WPF()->member->options['lost_password_url'] , '/');
|
|
|
37 |
}
|
38 |
else{
|
39 |
$wp_lostpass_url = wp_lostpassword_url( wpforo_get_request_uri() );
|
43 |
|
44 |
|
45 |
function wpforo_menu_filter( $items, $menu ) {
|
|
|
46 |
if ( !wpforo_is_admin() ) {
|
47 |
foreach ( $items as $key => $item ) {
|
48 |
if(isset($item->url)){
|
49 |
if( strpos($item->url, '%wpforo-') !== FALSE ){
|
50 |
$shortcode = trim(str_replace(array('https://', 'http://', '/', '%'), '', $item->url));
|
51 |
+
if(isset(WPF()->menu) && isset(WPF()->menu[$shortcode])){
|
52 |
+
if(isset(WPF()->menu[$shortcode]['href'])) $item->url = WPF()->menu[$shortcode]['href'];
|
53 |
+
if(isset(WPF()->menu[$shortcode]['attr']) && strpos(WPF()->menu[$shortcode]['attr'], 'wpforo-active') !== FALSE ) $item->classes[] = 'wpforo-active';
|
54 |
}
|
55 |
else{
|
56 |
unset($items[$key]);
|
64 |
add_filter( 'wp_get_nav_menu_items', 'wpforo_menu_filter', 1, 2 );
|
65 |
|
66 |
function wpforo_menu_nofollow_items($item_output, $item, $depth, $args) {
|
67 |
+
//if( isset($item->url) && strpos($item->url, '?wpforo') !== FALSE ) {
|
68 |
+
//$item_output = str_replace('<a ', '<a rel="nofollow" ', $item_output);
|
69 |
+
//}
|
70 |
return $item_output;
|
71 |
}
|
72 |
add_filter('walker_nav_menu_start_el', 'wpforo_menu_nofollow_items', 1, 4);
|
73 |
|
74 |
function wpforo_profile_plugin_menu( $userid = 0 ){
|
75 |
+
|
76 |
+
$menu_html = '<div class="wpf-profile-plugin-menu">';
|
77 |
+
|
78 |
$forum_profile = false;
|
79 |
if($url = wpforo_has_shop_plugin($userid)){
|
80 |
$forum_profile = true;
|
81 |
$menu_html .= '<div id="wpf-pp-shop-menu" class="wpf-pp-menu">
|
82 |
<a class="wpf-pp-menu-item" href="' . esc_url($url) . '">
|
83 |
+
<i class="fa fa-shopping-cart" title="'.wpforo_phrase('Shop Account', false).'"></i> <span>'.wpforo_phrase('Shop Account', false).'</span>
|
84 |
</a>
|
85 |
</div>';
|
86 |
}
|
88 |
$forum_profile = true;
|
89 |
$menu_html .= '<div id="wpf-pp-site-menu" class="wpf-pp-menu">
|
90 |
<a class="wpf-pp-menu-item" href="' . esc_url($url) . '">
|
91 |
+
<i class="fa fa-user" title="'.wpforo_phrase('Site Profile', false).'"></i> <span>'.wpforo_phrase('Site Profile', false).'</span>
|
92 |
</a>
|
93 |
</div>';
|
94 |
}
|
95 |
if( $forum_profile ) {
|
96 |
$menu_html .= '<div id="wpf-pp-forum-menu" class="wpf-pp-menu">
|
97 |
<div class="wpf-pp-menu-item">
|
98 |
+
<i class="fa fa-comments" title="' . wpforo_phrase('Forum Profile', false) . '"></i> <span>' . wpforo_phrase('Forum Profile', false) . '</span>
|
99 |
</div>
|
100 |
</div>';
|
|
|
101 |
$menu_html .= "\r\n<div class=\"wpf-clear\"></div>\r\n</div>";
|
102 |
$menu_html = apply_filters( 'wpforo_profile_plugin_menu_filter', $menu_html, $userid );
|
103 |
echo $menu_html; //This is a HTML content//
|
173 |
);
|
174 |
}
|
175 |
public function widget( $args, $instance ) {
|
|
|
176 |
echo $args['before_widget']; //This is a HTML content//
|
177 |
echo '<div id="wpf-widget-search" class="wpforo-widget-wrap">';
|
178 |
if ( ! empty( $instance['title'] ) ) {
|
213 |
);
|
214 |
}
|
215 |
public function widget( $args, $instance ) {
|
|
|
216 |
echo $args['before_widget']; //This is a HTML content//
|
217 |
echo '<div id="wpf-widget-login" class="wpforo-widget-wrap">';
|
218 |
if ( ! empty( $instance['title'] ) ) {
|
220 |
}
|
221 |
echo '<div class="wpforo-widget-content">';
|
222 |
?>
|
223 |
+
<?php if( is_user_logged_in() && !empty(WPF()->current_user) ) : ?>
|
224 |
+
<?php extract(WPF()->current_object, EXTR_OVERWRITE); extract(WPF()->current_user, EXTR_OVERWRITE); ?>
|
225 |
<div class="wpforo-profile-wrap">
|
226 |
<div class="wpforo-profile-head">
|
227 |
<div class="h-header">
|
228 |
+
<?php if( WPF()->perm->usergroup_can('va') && wpforo_feature('avatars') ): $rsz =''; ?>
|
229 |
+
<div class="h-left"><?php echo WPF()->member->get_avatar($userid, 'alt="'.esc_attr($display_name).'"', 150); ?></div>
|
230 |
<?php else: $rsz = ' style="margin-left:10px;"'; endif; ?>
|
231 |
<div class="h-right" <?php echo $rsz; ?>>
|
232 |
<div class="h-top">
|
233 |
<div class="profile-display-name">
|
234 |
+
<?php WPF()->member->show_online_indicator($userid) ?>
|
235 |
<?php echo $display_name ? esc_html($display_name) : esc_html(urldecode($user_nicename)) ?>
|
236 |
</div>
|
237 |
<div class="profile-stat-data">
|
245 |
<div class="h-footer wpfbg-2">
|
246 |
|
247 |
<div class="h-bottom">
|
248 |
+
<?php WPF()->tpl->member_menu($userid) ?>
|
249 |
<a href="?wpforo=logout"><?php wpforo_phrase('logout') ?></a>
|
250 |
<div class="wpf-clear"></div>
|
251 |
</div>
|
320 |
);
|
321 |
}
|
322 |
public function widget( $args, $instance ) {
|
|
|
323 |
echo $args['before_widget']; //This is a HTML content//
|
324 |
echo '<div id="wpf-widget-online-users" class="wpforo-widget-wrap">';
|
325 |
if ( ! empty( $instance['title'] ) ) {
|
326 |
echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title'];
|
327 |
}
|
328 |
// widget content from front end
|
329 |
+
$online_members = WPF()->member->get_online_members($instance['count']);
|
330 |
echo '<div class="wpforo-widget-content">';
|
331 |
if(!empty($online_members)){
|
332 |
echo '<ul>
|
334 |
<div class="wpforo-list-item">';
|
335 |
foreach( $online_members as $member ){
|
336 |
if( $instance['display_avatar'] ): ?>
|
337 |
+
<a href="<?php echo esc_url(WPF()->member->get_profile_url( $member['ID'] )) ?>" class="onlineavatar">
|
338 |
+
<?php echo WPF()->member->get_avatar( $member['ID'], 'style="width:95%;" class="avatar" title="'.esc_attr($member['display_name']).'"'); ?>
|
339 |
</a>
|
340 |
<?php else: ?>
|
341 |
+
<a href="<?php echo esc_url(WPF()->member->get_profile_url( $member['ID'] )) ?>" class="onlineuser"><?php echo esc_html($member['display_name']) ?></a>
|
342 |
<?php endif; ?>
|
343 |
<?php
|
344 |
}
|
391 |
);
|
392 |
}
|
393 |
public function widget( $args, $instance ) {
|
|
|
394 |
echo $args['before_widget'];//This is a HTML content//
|
395 |
echo '<div id="wpf-widget-recent-replies" class="wpforo-widget-wrap">';
|
396 |
if ( ! empty( $instance['title'] ) ) {
|
397 |
echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title'];//This is a HTML content//
|
398 |
}
|
399 |
// widget content from front end
|
400 |
+
$private = (!is_user_logged_in() || !WPF()->perm->usergroup_can('em')) ? 0 : NULL;
|
401 |
+
$status = (!is_user_logged_in() || !WPF()->perm->usergroup_can('em')) ? 0 : NULL;
|
402 |
$topic_args = array( // forumid, order, parentid
|
403 |
'orderby' => 'created',
|
404 |
'order' => 'DESC', // ASC DESC
|
406 |
'private' => $private,
|
407 |
'status' => $status
|
408 |
);
|
409 |
+
$topics = WPF()->topic->get_topics_filtered($topic_args);
|
410 |
+
$ug_can_va = WPF()->perm->usergroup_can('va');
|
411 |
+
$is_avatar = wpforo_feature('avatars');
|
412 |
echo '<div class="wpforo-widget-content"><ul>';
|
413 |
foreach( $topics as $topic ){
|
414 |
$topic_url = wpforo_topic($topic['topicid'], 'url');
|
419 |
<?php if( $instance['display_avatar'] ): ?>
|
420 |
<?php if( $ug_can_va && $is_avatar ): ?>
|
421 |
<div class="wpforo-list-item-left">
|
422 |
+
<?php echo WPF()->member->get_avatar( $topic['userid']); ?>
|
423 |
</div>
|
424 |
<?php endif; ?>
|
425 |
<?php endif; ?>
|
473 |
}
|
474 |
|
475 |
public function widget( $args, $instance ) {
|
|
|
476 |
echo $args['before_widget'];//This is a HTML content//
|
477 |
echo '<div id="wpf-widget-recent-replies" class="wpforo-widget-wrap">';
|
478 |
if ( ! empty( $instance['title'] ) ) {
|
479 |
echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title'];//This is a HTML content//
|
480 |
}
|
481 |
+
$private = (!is_user_logged_in() || !WPF()->perm->usergroup_can('em')) ? 0 : NULL;
|
482 |
+
$status = (!is_user_logged_in() || !WPF()->perm->usergroup_can('em')) ? 0 : NULL;
|
483 |
// widget content from front end
|
484 |
$posts_args = array(
|
485 |
'orderby' => 'created',
|
488 |
'private' => $private,
|
489 |
'status' => $status
|
490 |
);
|
491 |
+
$recent_posts = WPF()->post->get_posts_filtered($posts_args);
|
492 |
+
$ug_can_va = WPF()->perm->usergroup_can('va');
|
493 |
+
$is_avatar = wpforo_feature('avatars');
|
494 |
echo '<div class="wpforo-widget-content"><ul>';
|
495 |
foreach( $recent_posts as $post ){
|
496 |
$post_url = wpforo_post( $post['postid'], 'url' );
|
501 |
<?php if( $instance['display_avatar'] ): ?>
|
502 |
<?php if( $ug_can_va && $is_avatar ): ?>
|
503 |
<div class="wpforo-list-item-left">
|
504 |
+
<?php echo WPF()->member->get_avatar( $post['userid']); ?>
|
505 |
</div>
|
506 |
<?php endif; ?>
|
507 |
<?php endif; ?>
|
555 |
);
|
556 |
}
|
557 |
public function widget( $args, $instance ) {
|
|
|
558 |
echo $args['before_widget'];//This is a HTML content//
|
559 |
echo '<div id="wpf-widget-forums" class="wpforo-widget-wrap">';
|
560 |
if ( ! empty( $instance['title'] ) ) {
|
561 |
echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title'];//This is a HTML content//
|
562 |
}
|
563 |
echo '<div class="wpforo-widget-content">';
|
564 |
+
WPF()->forum->tree('front_list');
|
565 |
echo '</div>';
|
566 |
echo '</div>';
|
567 |
echo $args['after_widget'];//This is a HTML content//
|
634 |
}
|
635 |
|
636 |
function wpforo_hide_title($title, $id = 0) {
|
637 |
+
if( !wpforo_feature('page-title') ){
|
|
|
638 |
if( $wpforo_base_slug = basename( wpforo_home_url() ) ) $wpforo_page = get_page_by_path($wpforo_base_slug);
|
639 |
if(!empty($wpforo_page)){
|
640 |
if (in_the_loop() && is_page($wpforo_page->ID) && $id == get_the_ID()) {
|
667 |
}
|
668 |
}
|
669 |
|
670 |
+
function wpforo_member_title( $member = array(), $echo = true, $before = '', $after = '' ){
|
|
|
671 |
$title = array();
|
672 |
|
673 |
+
if(empty($member) || !$member['groupid']) return '';
|
674 |
+
$rating_title_ug_enabled = ( isset(WPF()->member->options['rating_title_ug'][$member['groupid']]) && WPF()->member->options['rating_title_ug'][$member['groupid']] ) ? true : false ;
|
675 |
+
$usergroup_title_ug_enabled = ( isset(WPF()->member->options['title_usergroup'][$member['groupid']]) && WPF()->member->options['title_usergroup'][$member['groupid']] ) ? true : false ;
|
676 |
|
677 |
+
if( wpforo_feature('rating_title') && $rating_title_ug_enabled && isset($member['stat']['title']) ){
|
678 |
$title[] = '<span class="wpf-member-title wpfrt" title="' . wpforo_phrase('Rating Title', false) . '">' . esc_html($member['stat']['title']) . '</span>';
|
679 |
}
|
680 |
+
if( empty($title) && WPF()->member->options['custom_title_is_on'] ){
|
681 |
$title[] = '<span class="wpf-member-title wpfct" title="' . wpforo_phrase('User Title', false) . '">' . wpforo_phrase($member['title'], false) . '</span>';
|
682 |
+
}else{
|
683 |
+
$before = $after = '';
|
684 |
+
}
|
685 |
if( $usergroup_title_ug_enabled ){
|
686 |
$class = '';
|
687 |
if( $member['groupid'] == 1 ) $class = ' wpfbg-6 wpfcl-3';
|
690 |
$title[] = '<span class="wpf-member-title wpfut wpfug-' . intval($member['groupid']) . $class . '" title="' . wpforo_phrase('Usergroup', false) . '">' . esc_html($member['groupname']) . '</span>';
|
691 |
}
|
692 |
if( !empty($title) ){
|
693 |
+
$title_html = $before . implode(' ', $title) . $after;
|
694 |
$title_html = apply_filters('wpforo_member_title', $title_html, $member);
|
695 |
if( $echo ) {
|
696 |
echo $title_html;
|
702 |
}
|
703 |
|
704 |
function wpforo_member_badge( $member = array(), $sep = '', $type = 'full' ){
|
705 |
+
$rating_badge_ug_enabled = ( isset(WPF()->member->options['rating_badge_ug'][$member['groupid']]) && WPF()->member->options['rating_badge_ug'][$member['groupid']] ) ? true : false ;
|
706 |
+
if( wpforo_feature('rating') && $rating_badge_ug_enabled && isset($member['stat']['rating']) ): ?>
|
|
|
707 |
<div class="author-rating-<?php echo esc_attr($type) ?>" style="color:<?php echo esc_attr($member['stat']['color']) ?>" title="<?php wpforo_phrase('Member Rating Badge') ?>">
|
708 |
+
<?php echo WPF()->member->rating_badge($member['stat']['rating'], $type); ?>
|
709 |
</div><?php if($sep): ?><span class="author-rating-sep"><?php echo esc_html($sep); ?></span><?php endif; ?>
|
710 |
<?php endif;
|
711 |
|
712 |
do_action('wpforo_after_member_badge', $member);
|
713 |
}
|
714 |
|
715 |
+
|
716 |
+
function wpforo_member_nicename( $member = array(), $prefix = '', $bracket = true, $wrap = true, $class = 'wpf-author-nicename', $echo = true ){
|
717 |
+
if( empty($member) || !isset($member['user_nicename']) ) return '';
|
718 |
+
$nicename = '';
|
719 |
+
if( $wrap ){ $nicename .= '<div class="' . $class . '" title="' . wpforo_phrase('You can mention a person using @nicename in post content to send that person an email message. When you post a topic or reply, forum sends an email message to the user letting them know that they have been mentioned on the post.', false) . '">';}
|
720 |
+
if( $bracket ) $nicename .= '(';
|
721 |
+
$nicename .= $prefix . urldecode($member['user_nicename']);
|
722 |
+
if( $bracket ) $nicename .= ')';
|
723 |
+
if( $wrap ){ $nicename .= '</div>';}
|
724 |
+
if( $echo ){ echo $nicename; } else{ return $nicename; }
|
725 |
+
}
|
726 |
+
|
727 |
+
|
728 |
add_filter( 'body_class', 'wpforo_page_class', 1, 10 );
|
729 |
function wpforo_page_class( $classes ) {
|
730 |
if(!empty($classes)){
|
742 |
###############################################################################
|
743 |
|
744 |
function wpforo_post( $postid, $var = 'item', $echo = false ){
|
|
|
|
|
745 |
$post = ( $var == 'item' ) ? array() : '';
|
746 |
if( !$postid ) return $post;
|
747 |
+
$cache = WPF()->cache->on('object_cashe');
|
748 |
if( $cache ){
|
749 |
+
$post = WPF()->cache->get_item( $postid, 'post' );
|
750 |
}
|
751 |
if( empty($post) ){
|
752 |
if( !$cache && $var == 'url' ){
|
753 |
+
$post['url'] = WPF()->post->get_post_url($postid);
|
754 |
}
|
755 |
elseif( !$cache && $var == 'is_answered' ){
|
756 |
+
$post['is_answered'] = WPF()->post->is_answered($postid);
|
757 |
}
|
758 |
elseif( !$cache && $var == 'votes_sum' ){
|
759 |
+
$post = WPF()->post->get_post($postid);
|
760 |
+
$post['votes_sum'] = $post['votes'];
|
761 |
}
|
762 |
elseif( !$cache && $var == 'likes_count' ){
|
763 |
+
$post['likes_count'] = WPF()->post->get_post_likes_count($postid);
|
764 |
}
|
765 |
elseif( !$cache && $var == 'likers_usernames' ){
|
766 |
+
$post['likers_usernames'] = WPF()->post->get_likers_usernames($postid);
|
767 |
}
|
768 |
else{
|
769 |
+
$post = WPF()->post->get_post($postid);
|
770 |
if( !empty($post) ){
|
771 |
+
$post['url'] = WPF()->post->get_post_url($post);
|
772 |
if( $cache ){
|
773 |
+
$post['is_answered'] = WPF()->post->is_answered($postid);
|
774 |
+
$post['votes_sum'] = $post['votes'];
|
775 |
+
$post['likes_count'] = WPF()->post->get_post_likes_count($postid);
|
776 |
+
$post['likers_usernames'] = WPF()->post->get_likers_usernames($postid);
|
777 |
}
|
778 |
if(!empty($post)){
|
779 |
$cache_item = array( $postid => $post );
|
780 |
+
WPF()->cache->create('item', $cache_item, 'post');
|
781 |
}
|
782 |
}
|
783 |
}
|
796 |
}
|
797 |
|
798 |
function wpforo_topic( $topicid, $var = 'item', $echo = false ){
|
|
|
|
|
799 |
$topic = ( $var == 'item' ) ? array() : '';
|
800 |
if( !$topicid ) return $topic;
|
801 |
+
$cache = WPF()->cache->on('object_cashe');
|
802 |
+
if( $cache ) $topic = WPF()->cache->get_item( $topicid, 'topic' );
|
803 |
|
804 |
if( empty($topic) ){
|
805 |
if( !$cache && $var == 'url' ){
|
806 |
+
$topic['url'] = WPF()->topic->get_topic_url( $topicid );
|
807 |
}
|
808 |
elseif( !$cache && $var == 'is_answer' ){
|
809 |
+
$topic['is_answer'] = WPF()->topic->is_solved( $topicid );
|
810 |
}
|
811 |
else{
|
812 |
+
$topic = WPF()->topic->get_topic($topicid);
|
813 |
if( !empty($topic) ){
|
814 |
+
$topic['url'] = WPF()->topic->get_topic_url($topic);
|
815 |
+
$topic['is_answer'] = WPF()->topic->is_solved( $topic['topicid'] );
|
816 |
if(!empty($topic)){
|
817 |
$cache_item = array( $topicid => $topic );
|
818 |
+
WPF()->cache->create('item', $cache_item, 'topic');
|
819 |
}
|
820 |
}
|
821 |
}
|
835 |
|
836 |
|
837 |
function wpforo_forum( $forumid, $var = 'item', $echo = false ){
|
|
|
|
|
838 |
$data = array();
|
839 |
$forum = ( $var == 'item' ) ? array() : '';
|
840 |
+
$cache = WPF()->cache->on('object_cashe');
|
841 |
if( !$forumid ) return $forum;
|
842 |
+
if( $cache ) $forum = WPF()->cache->get_item( $forumid, 'forum' );
|
843 |
|
844 |
if( empty($forum) ){
|
845 |
if( !$cache && ($var == 'childs' || $var == 'counts') ){
|
846 |
if( $var == 'childs' ) {
|
847 |
+
WPF()->forum->get_childs($forumid, $data);
|
848 |
$forum['childs'] = $data;
|
849 |
}
|
850 |
else{
|
851 |
+
WPF()->forum->get_childs($forumid, $data);
|
852 |
$forum['childs'] = $data;
|
853 |
+
$forum['counts'] = WPF()->forum->get_counts( $data );
|
854 |
}
|
855 |
}
|
856 |
else{
|
857 |
+
$forum = WPF()->forum->get_forum($forumid);
|
858 |
if( !empty($forum) ){
|
859 |
if( $cache ){
|
860 |
+
WPF()->forum->get_childs($forum['forumid'], $data);
|
861 |
$forum['childs'] = $data;
|
862 |
+
$forum['counts'] = WPF()->forum->get_counts( $data );
|
863 |
}
|
864 |
if(!empty($forum)){
|
865 |
$cache_item = array( $forumid => $forum );
|
866 |
+
WPF()->cache->create('item', $cache_item, 'forum');
|
867 |
}
|
868 |
}
|
869 |
}
|
882 |
}
|
883 |
|
884 |
function wpforo_member( $object, $var = 'item', $echo = false ){
|
|
|
|
|
885 |
$member = array();
|
886 |
if( empty( $object ) ) return $member;
|
887 |
|
888 |
if( is_array( $object ) && isset($object['userid']) && $object['userid'] == 0 ){
|
889 |
+
$member = WPF()->member->get_guest( $object );
|
890 |
}
|
891 |
else{
|
892 |
$userid = ( is_array( $object ) && isset($object['userid']) ) ? intval($object['userid']) : intval($object);
|
893 |
+
$member = WPF()->member->get_member( $userid );
|
894 |
}
|
895 |
|
896 |
if( $var != 'item' && $var ){
|
908 |
function wpforo_member_link( $member, $prefix = '', $length = 30, $class = '', $echo = true ){
|
909 |
$display_name = ( isset($member['display_name']) && $member['display_name'] ) ? $member['display_name'] : wpforo_phrase('Anonymous', false);
|
910 |
$nofollow = ( !wpforo_feature('seo-profile')) ? ' rel="nofollow" ' : '';
|
911 |
+
$color = (isset($member['color']) && $member['color'] ) ? 'style="color:' . $member['color'] . '"' : '';
|
912 |
+
$class = ($class) ? 'class="' . $class . '"' : '';
|
913 |
if( isset($member['profile_url']) && $member['profile_url'] ){
|
914 |
+
?><a href="<?php echo esc_url($member['profile_url']) ?>" <?php echo $nofollow ?> <?php echo $color ?> <?php echo $class ?>><?php if( strpos($prefix, '%s') !== FALSE ): ?><?php echo sprintf( wpforo_phrase($prefix, FALSE), esc_html(wpforo_text($display_name, $length, FALSE)) ); ?><?php else: ?><?php if( $prefix ){ echo wpforo_phrase( $prefix, false) . ' '; } ?><?php if( $length ){ echo esc_html(wpforo_text($display_name, $length, false)); } else { echo esc_html($display_name); } ?><?php endif; ?></a><?php
|
915 |
}
|
916 |
else{
|
917 |
?><?php if( strpos($prefix, '%s') !== FALSE ): ?><?php echo sprintf( wpforo_phrase($prefix, FALSE), esc_html(wpforo_text($display_name, $length, FALSE)) ); ?><?php else: ?><?php if( $prefix ){ echo wpforo_phrase( $prefix, false) . ' '; } ?><?php if( $length ){ echo esc_html(wpforo_text($display_name, $length, false)); } else { echo esc_html($display_name); } ?><?php endif; ?><?php
|
1017 |
*/
|
1018 |
function wpforo_fields( $fields, $echo = true ){
|
1019 |
if( empty($fields) ) return '';
|
|
|
1020 |
$fields = apply_filters( 'wpforo_form_fields', $fields );
|
1021 |
+
$html = WPF()->tpl->form_fields( $fields );
|
1022 |
if( $echo ){
|
1023 |
echo $html;
|
1024 |
}
|
1039 |
*/
|
1040 |
|
1041 |
function wpforo_register_page_field_values( $fields ){
|
1042 |
+
WPF()->form['value']['user_login'] = (isset($_POST['wpfreg']['user_login'])) ? sanitize_user($_POST['wpfreg']['user_login']) : '';
|
1043 |
+
WPF()->form['value']['user_email'] = (isset($_POST['wpfreg']['user_email'])) ? sanitize_email($_POST['wpfreg']['user_email']) : '';
|
1044 |
+
WPF()->form['varname'] = 'wpfreg';
|
|
|
1045 |
}
|
1046 |
add_action( 'wpforo_register_page_start', 'wpforo_register_page_field_values', 10, 1 );
|
1047 |
|
1058 |
*/
|
1059 |
|
1060 |
function wpforo_account_page_field_values( $fields ){
|
1061 |
+
if( isset(WPF()->current_object['user']) && !empty(WPF()->current_object['user']) ){
|
1062 |
+
$user = WPF()->current_object['user'];
|
|
|
|
|
1063 |
$user = apply_filters('wpforo_profile_header_obj', $user);
|
1064 |
+
WPF()->form['value'] = $user;
|
1065 |
+
WPF()->form['varname'] = 'member';
|
1066 |
}
|
1067 |
}
|
1068 |
add_action( 'wpforo_account_page_start', 'wpforo_account_page_field_values', 10, 1 );
|
1080 |
*/
|
1081 |
|
1082 |
function wpforo_profile_page_field_values( $fields ){
|
1083 |
+
if( isset(WPF()->current_object['user']) && !empty(WPF()->current_object['user']) ){
|
1084 |
+
$user = WPF()->current_object['user'];
|
1085 |
+
WPF()->form['value'] = $user;
|
|
|
|
|
1086 |
}
|
1087 |
}
|
1088 |
add_action( 'wpforo_profile_page_start', 'wpforo_profile_page_field_values', 10, 1 );
|
1089 |
|
1090 |
|
1091 |
function wpforo_search_page_field_values( $fields ){
|
1092 |
+
WPF()->form['value'] = ( !empty($_GET) ? (array) $_GET : array() );
|
1093 |
+
WPF()->form['varname'] = '';
|
|
|
1094 |
}
|
1095 |
add_action( 'wpforo_search_page_start', 'wpforo_search_page_field_values', 10, 1 );
|
1096 |
|
1097 |
function wpforo_user_avatar( $user, $size, $attr = '', $lastmod = false ){
|
|
|
1098 |
$avatar_html = '';
|
1099 |
if( is_int($user) && $user ){
|
1100 |
$avatar_html = ($size) ? get_avatar($user, $size) : get_avatar($user);
|
1101 |
if($attr) $avatar_html = str_replace('<img', '<img ' . $attr, $avatar_html);
|
1102 |
}
|
1103 |
elseif( is_array($user) && !empty($user) ){
|
1104 |
+
$avatar_html = WPF()->member->avatar($user, $attr, $size);
|
1105 |
}
|
1106 |
|
1107 |
if( $lastmod ){
|
1108 |
$url = wpforo_avatar_url( $avatar_html );
|
1109 |
if($url){
|
1110 |
+
if( strpos($url, 'gravatar.com') === FALSE ){
|
1111 |
+
$avatar_html = str_replace($url, $url . '?lm=' . time(), $avatar_html);
|
1112 |
+
}
|
1113 |
}
|
1114 |
}
|
1115 |
return $avatar_html;
|
1116 |
}
|
1117 |
|
1118 |
function wpforo_register_fields(){
|
1119 |
+
$fields = WPF()->member->get_register_fields();
|
|
|
|
|
1120 |
do_action( 'wpforo_register_page_start', $fields );
|
1121 |
|
1122 |
return $fields;
|
1123 |
}
|
1124 |
|
1125 |
function wpforo_account_fields(){
|
1126 |
+
$fields = WPF()->member->get_account_fields();
|
|
|
|
|
1127 |
do_action( 'wpforo_account_page_start', $fields );
|
1128 |
|
1129 |
return $fields;
|
1130 |
}
|
1131 |
|
1132 |
function wpforo_profile_fields(){
|
1133 |
+
$fields = WPF()->member->get_profile_fields();
|
|
|
|
|
1134 |
do_action( 'wpforo_profile_page_start', $fields );
|
1135 |
|
1136 |
return $fields;
|
1137 |
}
|
1138 |
|
1139 |
function wpforo_search_fields(){
|
1140 |
+
$fields = WPF()->member->get_search_fields();
|
|
|
|
|
1141 |
do_action( 'wpforo_search_page_start', $fields );
|
1142 |
|
1143 |
+
if( WPF()->member->options['search_type'] == 'search' ){
|
1144 |
$fields = array(
|
1145 |
array(
|
1146 |
array(
|
wpf-includes/functions.php
CHANGED
@@ -24,8 +24,6 @@ function wpforo_verify_form( $mode = 'full' ){
|
|
24 |
}
|
25 |
|
26 |
function wpforo_home_url($str = '', $echo = false, $absolute = true){
|
27 |
-
global $wpforo;
|
28 |
-
|
29 |
if( strpos($str, 'http') === 0 ){
|
30 |
$base_url = preg_replace('#/?\?.*$#isu', '', wpforo_home_url());
|
31 |
$base_url = preg_replace('#index\.php/?#isu', '', $base_url, 1);
|
@@ -35,18 +33,18 @@ function wpforo_home_url($str = '', $echo = false, $absolute = true){
|
|
35 |
$str = trim(WPFORO_BASE_PERMASTRUCT, '/\\') . '/' . trim($str, '/\\');
|
36 |
|
37 |
if( $absolute ){
|
38 |
-
$url =
|
39 |
//-START- check is url maybe wordpress home
|
40 |
$maybe_home_url = trim( preg_replace('#/?index\.php/?(\?.*)?$#isu', '', $url), '/\\' );
|
41 |
$home_url = trim( home_url(), '/\\' );
|
42 |
if( $maybe_home_url == $home_url ){
|
43 |
$url = preg_replace('#index\.php/?#isu', '', $url, 1);
|
44 |
-
$url =
|
45 |
}
|
46 |
//-END- check is url maybe wordpress home
|
47 |
}
|
48 |
else{
|
49 |
-
echo $url =
|
50 |
}
|
51 |
|
52 |
if(!$echo) return $url;
|
@@ -72,8 +70,6 @@ function is_wpforo_page($url = ''){
|
|
72 |
}
|
73 |
|
74 |
function is_wpforo_exclude_url($url = ''){
|
75 |
-
global $wpforo;
|
76 |
-
|
77 |
if(!$url) $url = wpforo_get_request_uri();
|
78 |
$url = urldecode($url);
|
79 |
$url = preg_replace('#/page/\d*/?$#isu', '', $url);
|
@@ -81,8 +77,8 @@ function is_wpforo_exclude_url($url = ''){
|
|
81 |
if( !$current_url = wpforo_get_url_query_vars_str($url) ) return FALSE;
|
82 |
if( preg_match('#\.php/?(?:\?[^/]*)?$#isu', $current_url) ) return TRUE;
|
83 |
|
84 |
-
if(
|
85 |
-
$expld = array_filter( explode("\n",
|
86 |
foreach( $expld as $excld_url ){
|
87 |
$excld_url = urldecode($excld_url);
|
88 |
if( strpos($excld_url, home_url('/')) === FALSE ) continue;
|
@@ -97,14 +93,13 @@ function is_wpforo_exclude_url($url = ''){
|
|
97 |
function is_wpforo_url($url = ''){
|
98 |
if( wpforo_is_admin() ) return FALSE;
|
99 |
if(!$url) $url = wpforo_get_request_uri();
|
100 |
-
|
101 |
-
|
102 |
-
if( $wpforo->use_home_url ) return TRUE;
|
103 |
|
104 |
$current_url = wpforo_get_url_query_vars_str($url);
|
105 |
|
106 |
-
if(
|
107 |
-
&& strpos($current_url,
|
108 |
&& !wpforo_is_admin() ) return TRUE;
|
109 |
|
110 |
return FALSE;
|
@@ -112,7 +107,7 @@ function is_wpforo_url($url = ''){
|
|
112 |
|
113 |
function is_wpforo_shortcode_page(){
|
114 |
if( wpforo_is_admin() ) return FALSE;
|
115 |
-
global $
|
116 |
if( $post && isset($post->post_content) && has_shortcode( $post->post_content, 'wpforo' ) && !is_wpforo_url() ) return TRUE;
|
117 |
return FALSE;
|
118 |
}
|
@@ -129,9 +124,8 @@ function wpforo_get_url_query_vars_str($url = ''){
|
|
129 |
return $current_url;
|
130 |
}
|
131 |
|
132 |
-
function wpforo_feature(
|
133 |
-
if(
|
134 |
-
if( isset($wpforo->features[$option]) && $wpforo->features[$option] ){
|
135 |
return true;
|
136 |
}
|
137 |
else{
|
@@ -274,12 +268,9 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
274 |
if(empty($bulk_actions)) $bulk_actions = array( 'del' );
|
275 |
|
276 |
if(!empty($fields)) :
|
277 |
-
global $wpdb;
|
278 |
-
global $wpforo;
|
279 |
-
|
280 |
$args = array();
|
281 |
|
282 |
-
if(isset($_GET['s']) && $_GET['s'] != '') $args['include'] =
|
283 |
if(isset($_GET['orderby'])) $args['orderby'] = sanitize_text_field($_GET['orderby']);
|
284 |
if(isset($_GET['order'])) $args['order'] = sanitize_text_field($_GET['order']);
|
285 |
if(isset($_GET['forumid']) && $_GET['forumid'] != 0) $args['forumid'] = intval($_GET['forumid']);
|
@@ -304,8 +295,13 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
304 |
if( $varname == 'member' && !isset($_GET['member_status']) ){
|
305 |
$args['status'] = array('active');
|
306 |
}
|
307 |
-
|
308 |
-
|
|
|
|
|
|
|
|
|
|
|
309 |
|
310 |
if(isset($args['include']) && empty($args['include'])){
|
311 |
$items_count = 0;
|
@@ -360,7 +356,7 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
360 |
</div>
|
361 |
<?php if($varname == 'moderation'): ?>
|
362 |
<?php
|
363 |
-
$total =
|
364 |
$up_total = (!isset($_GET['filter_by_status']) || (isset($_GET['filter_by_status']) && $_GET['filter_by_status'] == 1 )) ? $items_count : ($total - $items_count);
|
365 |
$ap_total = ((isset($_GET['filter_by_status']) && $_GET['filter_by_status'] == 0 )) ? $items_count : ($total - $items_count);
|
366 |
?>
|
@@ -370,7 +366,7 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
370 |
</ul>
|
371 |
<?php elseif($varname == 'member' && (!isset($_GET['groupid']) || (isset($_GET['groupid']) && !$_GET['groupid'])) ): ?>
|
372 |
<?php
|
373 |
-
$total =
|
374 |
$up_total = (!isset($_GET['member_status']) || (isset($_GET['member_status']) && $_GET['member_status'] == 'active' )) ? $items_count : ($total - $items_count);
|
375 |
$ap_total = ((isset($_GET['member_status']) && $_GET['member_status'] == 'banned' )) ? $items_count : ($total - $items_count);
|
376 |
?>
|
@@ -404,20 +400,20 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
404 |
|
405 |
<select name="<?php echo esc_attr($filter_field) ?>">
|
406 |
<option value="0"><?php _e('Show all forums', 'wpforo'); ?></option>
|
407 |
-
<?php
|
408 |
</select>
|
409 |
|
410 |
<?php }elseif($filter_field == 'langid'){ ?>
|
411 |
|
412 |
<select name="<?php echo esc_attr($filter_field) ?>">
|
413 |
-
<?php
|
414 |
</select>
|
415 |
|
416 |
<?php }elseif($filter_field == 'groupid'){ ?>
|
417 |
|
418 |
<select name="<?php echo esc_attr($filter_field) ?>">
|
419 |
<option value="0"><?php _e('filter by group', 'wpforo') ?></option>
|
420 |
-
<?php foreach(
|
421 |
<?php if( $group['groupid'] != 4 ) : ?>
|
422 |
<option value="<?php echo esc_attr($group['groupid']) ?>" <?php echo ( isset($_GET['groupid']) && $_GET['groupid'] == $group['groupid'] ? 'selected' : '' ) ?>><?php echo esc_html($group['name']) ?></option>
|
423 |
<?php endif ?>
|
@@ -425,8 +421,8 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
425 |
</select>
|
426 |
|
427 |
<?php }elseif( $varname == 'member' && $filter_field == 'status' ){
|
428 |
-
$sql = "SELECT DISTINCT `status` as statuses FROM `" .
|
429 |
-
if( $statuses =
|
430 |
<select name="member_status">
|
431 |
<option value="0"><?php _e('filter by status', 'wpforo') ?></option>
|
432 |
|
@@ -441,8 +437,8 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
441 |
|
442 |
}elseif( $varname == 'phrase' && $filter_field == 'package' ){
|
443 |
|
444 |
-
$sql = "SELECT DISTINCT `package` as packages FROM `" .
|
445 |
-
if( $packages =
|
446 |
<select name="phrase_package">
|
447 |
<option value="0"><?php _e('filter by package', 'wpforo') ?></option>
|
448 |
|
@@ -459,7 +455,7 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
459 |
$filter_by_status = intval( ( isset($_GET['filter_by_status']) ? $_GET['filter_by_status'] : 1 ) );
|
460 |
|
461 |
if($filter_field == 'status'){
|
462 |
-
if( $statuses =
|
463 |
<select name="filter_by_status">
|
464 |
|
465 |
<?php foreach ($statuses as $key => $status) : ?>
|
@@ -470,12 +466,12 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
470 |
<?php
|
471 |
endif;
|
472 |
}elseif($filter_field == 'userid'){
|
473 |
-
$sql = "SELECT DISTINCT `userid` FROM `"
|
474 |
-
if( $userids =
|
475 |
<select name="filter_by_userid">
|
476 |
<option value="0"><?php _e('filter by user', 'wpforo') ?></option>
|
477 |
|
478 |
-
<?php foreach ($userids as $userid) : $user =
|
479 |
<option value="<?php echo esc_attr($userid) ?>" <?php echo ( isset($_GET['filter_by_userid']) && $_GET['filter_by_userid'] == $userid ? 'selected' : '' ) ?>><?php echo esc_html( wpforo_make_dname($user['display_name'], $user['user_nicename']) ) ?></option>
|
480 |
<?php endforeach; ?>
|
481 |
|
@@ -576,9 +572,9 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
576 |
<?php
|
577 |
if($varname == 'member'){
|
578 |
$url = $url_user = admin_url( 'user-edit.php?user_id=' . intval($item[$primary_key]));
|
579 |
-
$url_profile =
|
580 |
}elseif($varname == 'moderation'){
|
581 |
-
$url =
|
582 |
}else{
|
583 |
$url = admin_url( 'admin.php?page=wpforo-'. $varname .'s&id='.$item[$primary_key] .'&action=edit' );
|
584 |
}
|
@@ -589,7 +585,7 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
589 |
<?php
|
590 |
if($varname == 'forum'){
|
591 |
$depth = 0;
|
592 |
-
|
593 |
echo str_repeat( '— ', $depth);
|
594 |
}
|
595 |
wpfo($item[$field], true, 'esc_html');
|
@@ -611,7 +607,7 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
611 |
<span class="edit"><a href="<?php echo esc_url($url_profile); ?>"><?php _e('edit profile', 'wpforo'); ?></a></span>
|
612 |
<?php if( $act_key != ( count($actions) - 1 ) ) echo " | "; ?>
|
613 |
<?php break;
|
614 |
-
case 'ban': if($item['userid'] ==
|
615 |
<?php $ban_url = wp_nonce_url( admin_url( 'admin.php?page=wpforo-' . esc_attr(sanitize_text_field($varname)) . 's&id=' . intval($item[$primary_key]) . '&action=' . ($item['status'] == 'banned' ? 'unban' : 'ban') ), 'wpforo_admin_table_action_ban' ); ?>
|
616 |
<span class="trash"><a class="submitban" title="<?php echo ($item['status'] == 'banned' ? __('unban user', 'wpforo') : __('ban user', 'wpforo') ) ?>" onclick="return confirm('<?php echo ($item['status'] == 'banned' ? __('Are you sure, you want to unban this user?', 'wpforo') : __('Are you sure, you want to ban this user?', 'wpforo') ) ?>');" href="<?php echo esc_url($ban_url); ?>"><?php echo ($item['status'] == 'banned' ? __('unban user', 'wpforo') : __('ban user', 'wpforo') ) ?></a></span>
|
617 |
<?php if( $act_key != ( count($actions) - 1 ) ) echo " | "; ?>
|
@@ -626,7 +622,7 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
626 |
<span class="vim-u"><a class="vim-u" title="<?php echo ( !$item['status'] ? __('unapprove this item', 'wpforo') : __('Approve this item', 'wpforo') ) ?>" href="<?php echo esc_url($approve_url); ?>"><?php echo ( !$item['status'] ? __('unapprove', 'wpforo') : __('approve', 'wpforo') ); ?></a></span>
|
627 |
<?php if( $act_key != ( count($actions) - 1 ) ) echo " | "; ?>
|
628 |
<?php break;
|
629 |
-
case 'user_delete': if($item['userid'] ==
|
630 |
<?php $delete_url = wp_nonce_url( "users.php?action=delete&user=".intval($item[$primary_key]), 'bulk-users' ) ?>
|
631 |
<span class="trash"><a class="submitdelete" title="<?php _e('Delete this item', 'wpforo') ?>" onclick="return confirm('<?php _e('Are you sure you whant to DELETE this item?', 'wpforo') ?>');" href="<?php echo esc_url($delete_url); ?>"><?php _e('delete', 'wpforo'); ?></a></span>
|
632 |
<?php if( $act_key != ( count($actions) - 1 ) ) echo " | "; ?>
|
@@ -645,7 +641,7 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
645 |
}
|
646 |
?>
|
647 |
<span class="view">
|
648 |
-
<a href="<?php echo esc_url(
|
649 |
<?php _e('view', 'wpforo'); ?>
|
650 |
</a>
|
651 |
</span>
|
@@ -658,17 +654,17 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
658 |
<?php else : ?>
|
659 |
<td class="<?php echo esc_attr($item[$field]) ?> column-<?php echo esc_attr($item[$field]) ?>">
|
660 |
<?php if($field == 'forumid') : ?>
|
661 |
-
<?php $data =
|
662 |
<?php elseif($field == 'userid') : ?>
|
663 |
<?php if(isset($item['name'])): ?>
|
664 |
<?php $data = wpforo_member($item); echo esc_html(wpforo_make_dname($data['display_name'], $data['user_nicename'])); ?>
|
665 |
<?php else: ?>
|
666 |
-
<?php $data =
|
667 |
<?php endif; ?>
|
668 |
<?php elseif($field == 'groupid') : ?>
|
669 |
-
<?php $data =
|
670 |
<?php elseif($field == 'rank') : ?>
|
671 |
-
<div class="author-rating"><div class="bar wpfw-<?php echo esc_attr(
|
672 |
<?php elseif($field == 'is_first_post') : ?>
|
673 |
<b><?php echo strtoupper( ( $item[$field] ? __('Topic', 'wpforo') : __('Post', 'wpforo') ) ) ?></b>
|
674 |
<?php else : ?>
|
@@ -732,8 +728,7 @@ function wpforo_create_form_table($varname, $primary_key, $fields = array(), $se
|
|
732 |
}
|
733 |
|
734 |
function wpforo_phrase($key, $echo = TRUE, $format = 'first-upper'){
|
735 |
-
|
736 |
-
$phrase = (isset($wpforo->phrase->phrases[addslashes(strtolower($key))])) ? $wpforo->phrase->phrases[addslashes(strtolower($key))] : $key;
|
737 |
if( $key == $phrase ){
|
738 |
$phrase = __($key, 'wpforo');
|
739 |
}
|
@@ -795,10 +790,20 @@ function wpforo_screen_option(){ ?>
|
|
795 |
}
|
796 |
|
797 |
|
798 |
-
function wpforo_text( $text, $length, $echo = TRUE ){
|
799 |
$text = preg_replace('#(?:[^\'\"]|^)(https?://[^\s\'\"<>]+)(?:[^\'\"]|$)#isu', '', $text);
|
800 |
$text = preg_replace('#\[attach[^\[\]]*\][^\[\]]*\[/attach\]#isu', '', $text);
|
801 |
$text = strip_tags($text);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
802 |
if(function_exists('mb_substr')){
|
803 |
if($echo){
|
804 |
echo trim( mb_substr( $text, 0, $length, get_option('blog_charset') ) . ( ( function_exists('mb_strlen') ? mb_strlen( $text, get_option('blog_charset') ) : strlen($text) ) > $length ? '...' : '' ) );
|
@@ -878,11 +883,18 @@ function wpforo_nofollow_tag( $content ){
|
|
878 |
return $content;
|
879 |
}
|
880 |
function wpforo_nofollow($match){
|
881 |
-
|
882 |
-
|
|
|
883 |
if( isset($match[0]) ) $link = $match[0];
|
884 |
if( isset($match[1]) && strpos($match[1], $parse['host']) === FALSE ){
|
885 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
886 |
}
|
887 |
return $link;
|
888 |
}
|
@@ -890,10 +902,9 @@ function wpforo_nofollow($match){
|
|
890 |
add_action('wp_loaded', 'wpforo_cookie_logs', 10);
|
891 |
|
892 |
function wpforo_cookie_logs(){
|
893 |
-
|
894 |
-
if(!wpforo_feature('view-logging', $wpforo)) return;
|
895 |
$key = ''; $logid = 0; $log = false;
|
896 |
-
$data =
|
897 |
if( $data['template'] == 'post' && isset($data['topicid']) && $data['topicid'] ){
|
898 |
$logid = $data['topicid'];
|
899 |
$key = 'wpf_viewed_topics';
|
@@ -920,31 +931,30 @@ function wpforo_cookie_logs(){
|
|
920 |
|
921 |
add_action('wpforo_bottom_hook', 'wpforo_user_logging');
|
922 |
function wpforo_user_logging(){
|
923 |
-
|
924 |
-
$data = $wpforo->current_object;
|
925 |
if( $data['template'] == 'post' && isset($data['topicid']) && $data['topicid'] ){
|
926 |
$current_user_id = get_current_user_id();
|
927 |
$current_time = current_time( 'timestamp', 1 );
|
928 |
|
929 |
-
if( wpforo_feature('view-logging'
|
930 |
$viwed_ids = wpforo_getcookie( 'wpf_viewed_topics', true );
|
931 |
if( empty($viwed_ids) || ( is_array($viwed_ids) && !in_array($data['topicid'] , $viwed_ids ))){
|
932 |
-
|
933 |
}
|
934 |
}
|
935 |
else{
|
936 |
if( $current_user_id ){
|
937 |
//registered user
|
938 |
-
$view =
|
939 |
if( !$view['vid'] ){
|
940 |
-
$sql = "INSERT INTO ".
|
941 |
-
|
942 |
-
|
943 |
}else{
|
944 |
-
$sql = "UPDATE ".
|
945 |
-
|
946 |
if( $current_time - $view['created'] > 86400 ){
|
947 |
-
|
948 |
}
|
949 |
}
|
950 |
}
|
@@ -1031,7 +1041,6 @@ function wpforo_human_filesize($bytes, $decimals = 2) {
|
|
1031 |
function wpforo_date($date, $type = 'ago', $echo = true ) {
|
1032 |
if(is_numeric($date)) $date = date_i18n( 'Y-m-d H:i:s', $date);
|
1033 |
|
1034 |
-
global $wpforo;
|
1035 |
$d = $date;
|
1036 |
$sep = ' ';
|
1037 |
$timestamp = strtotime($date);
|
@@ -1039,15 +1048,15 @@ function wpforo_date($date, $type = 'ago', $echo = true ) {
|
|
1039 |
$current_offset = get_option('gmt_offset');
|
1040 |
if(!is_string($type)) $type = 'ago';
|
1041 |
|
1042 |
-
if( is_user_logged_in() && !empty(
|
1043 |
-
if( isset(
|
1044 |
-
if(preg_match('|UTC([\-\+]+.?)|is',
|
1045 |
$timezone_string = '';
|
1046 |
$current_offset = str_replace('+', '', $timezone_array[1]);
|
1047 |
}
|
1048 |
else{
|
1049 |
-
if(in_array(
|
1050 |
-
$timezone_string =
|
1051 |
$current_offset = '';
|
1052 |
}
|
1053 |
else{
|
@@ -1073,7 +1082,7 @@ function wpforo_date($date, $type = 'ago', $echo = true ) {
|
|
1073 |
$d = sprintf( wpforo_phrase('%s ago', false, false), $d );
|
1074 |
}
|
1075 |
else{
|
1076 |
-
if( wpforo_feature('wp-date-format'
|
1077 |
$date_format = get_option('date_format');
|
1078 |
$time_format = get_option('time_format');
|
1079 |
$type = $date_format . $sep . $time_format;
|
@@ -1091,7 +1100,7 @@ function wpforo_date($date, $type = 'ago', $echo = true ) {
|
|
1091 |
$d = sprintf( wpforo_phrase('%s ago', false, false), $d );
|
1092 |
}
|
1093 |
else{
|
1094 |
-
if( wpforo_feature('wp-date-format'
|
1095 |
$date_format = get_option('date_format');
|
1096 |
$time_format = get_option('time_format');
|
1097 |
$type = $date_format . $sep . $time_format;
|
@@ -1410,18 +1419,13 @@ function wpforo_is_image($e){
|
|
1410 |
|
1411 |
|
1412 |
function get_wpf_option( $option, $default = false ){
|
1413 |
-
global $wpdb;
|
1414 |
$value = get_option($option, $default);
|
1415 |
if( $value ){
|
1416 |
$value = maybe_unserialize( $value );
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
$check = @unserialize($value);
|
1422 |
-
if( !$check ) $value = wpforo_fixSerializedArray($value);
|
1423 |
-
if( !$value && $value !== 0 ) return NULL;
|
1424 |
-
}
|
1425 |
}
|
1426 |
if( $default && is_array($default) && is_array($value) ) $value = array_merge( $default, $value );
|
1427 |
return $value;
|
@@ -1516,27 +1520,27 @@ function wpforo_attachment_sizes( $sizes ){
|
|
1516 |
return array('thumbnail');
|
1517 |
}
|
1518 |
|
1519 |
-
function wpforo_debug(
|
1520 |
-
if( wpforo_feature('debug-mode'
|
1521 |
<div id="wpforo-debug" style="display:none">
|
1522 |
<h4>Super Globals</h4>
|
1523 |
<p>Requests: <?php print_r($_REQUEST); ?></p>
|
1524 |
<p>Server: <?php print_r($_REQUEST); ?></p>
|
1525 |
<h4>Options and Features</h4>
|
1526 |
-
<textarea style="width:500px; height:300px;"><?php echo @ 'permastruct: ' .
|
1527 |
-
echo @ 'use_home_url: ' .
|
1528 |
echo @ 'url: ' . wpforo_home_url() . "\r\n";
|
1529 |
-
@print_r(
|
1530 |
-
echo @ 'pageid:' .
|
1531 |
-
echo @ 'default_groupid: ' .
|
1532 |
-
@print_r(
|
1533 |
-
@print_r(
|
1534 |
-
@print_r(
|
1535 |
-
@print_r(
|
1536 |
-
@print_r(
|
1537 |
-
@print_r(
|
1538 |
-
@print_r(
|
1539 |
-
@print_r(
|
1540 |
?>
|
1541 |
</textarea>
|
1542 |
</div>
|
@@ -1558,19 +1562,17 @@ function wpforo_hook( $name, $args = array() ){
|
|
1558 |
* @param string Item View / Template (e.g.: 'forum', 'topic', 'post', 'user', 'widget', etc...)
|
1559 |
* @param array Item data as array
|
1560 |
*
|
1561 |
-
* @return NULL
|
1562 |
*/
|
1563 |
function wpforo_clean_cache( $id = 0, $template = 'all', $item = array() ){
|
1564 |
-
global $wpforo;
|
1565 |
$pageid = url_to_postid( $_SERVER['REQUEST_URI'] );
|
1566 |
do_action( 'wpforo_clean_cache_start', $id, $template );
|
1567 |
if( $pageid ){
|
1568 |
$page = get_post( $pageid );
|
1569 |
clean_post_cache( $page );
|
1570 |
}
|
1571 |
-
|
1572 |
do_action( 'wpforo_clean_cache', $id, $template );
|
1573 |
-
|
1574 |
do_action( 'wpforo_clean_cache_end', $id, $template );
|
1575 |
}
|
1576 |
|
@@ -1581,36 +1583,32 @@ function wpforo_db_check( $args = array() ){
|
|
1581 |
$table = esc_sql(trim($args['table']));
|
1582 |
|
1583 |
if( $check == 'table_exists' ){
|
1584 |
-
return $wpdb->get_var("SHOW TABLES LIKE '
|
1585 |
}
|
1586 |
|
1587 |
if( $check == 'col_exists' ){
|
1588 |
-
return $wpdb->get_var("SHOW COLUMNS FROM
|
1589 |
}
|
1590 |
|
1591 |
if( $check == 'key_exists' ){
|
1592 |
-
|
1593 |
-
return $col['Key'];
|
1594 |
}
|
1595 |
|
1596 |
if( $check == 'default_value' ){
|
1597 |
-
$col = $wpdb->get_row("SHOW COLUMNS FROM
|
1598 |
return $col['Default'];
|
1599 |
}
|
1600 |
|
1601 |
if( $check == 'col_type' ){
|
1602 |
-
$col = $wpdb->get_row("SHOW COLUMNS FROM
|
1603 |
return $col['Type'];
|
1604 |
}
|
1605 |
}
|
1606 |
|
1607 |
function wpforo_is_owner( $userid ){
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
if( $userid == $wpforo->current_userid ) return true;
|
1612 |
-
}
|
1613 |
-
}
|
1614 |
return false;
|
1615 |
}
|
1616 |
|
@@ -1695,7 +1693,6 @@ function wpforo_sprintf_array($format, $arr){
|
|
1695 |
|
1696 |
function wpforo_avatar_url($avatar_html){
|
1697 |
if( preg_match('#src=[\'"]([^\'"]+?)[\'"]#isu', $avatar_html, $matches) ){
|
1698 |
-
//return preg_replace('#(^[^\r\n\t\s\0]*?gravatar\.com/[^\r\n\t\s\0]*?)\?s=\d+[^\r\n\t\s\0]*#isu', '$1?s=300', $matches[1], 1);
|
1699 |
return $matches[1];
|
1700 |
}
|
1701 |
return '';
|
@@ -1744,4 +1741,64 @@ function wpforo_return_zero($var = null){
|
|
1744 |
function wpforo_is_json($string) {
|
1745 |
json_decode($string);
|
1746 |
return (json_last_error() == JSON_ERROR_NONE);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1747 |
}
|
24 |
}
|
25 |
|
26 |
function wpforo_home_url($str = '', $echo = false, $absolute = true){
|
|
|
|
|
27 |
if( strpos($str, 'http') === 0 ){
|
28 |
$base_url = preg_replace('#/?\?.*$#isu', '', wpforo_home_url());
|
29 |
$base_url = preg_replace('#index\.php/?#isu', '', $base_url, 1);
|
33 |
$str = trim(WPFORO_BASE_PERMASTRUCT, '/\\') . '/' . trim($str, '/\\');
|
34 |
|
35 |
if( $absolute ){
|
36 |
+
$url = WPF()->user_trailingslashit( home_url($str) );
|
37 |
//-START- check is url maybe wordpress home
|
38 |
$maybe_home_url = trim( preg_replace('#/?index\.php/?(\?.*)?$#isu', '', $url), '/\\' );
|
39 |
$home_url = trim( home_url(), '/\\' );
|
40 |
if( $maybe_home_url == $home_url ){
|
41 |
$url = preg_replace('#index\.php/?#isu', '', $url, 1);
|
42 |
+
$url = WPF()->user_trailingslashit($url);
|
43 |
}
|
44 |
//-END- check is url maybe wordpress home
|
45 |
}
|
46 |
else{
|
47 |
+
echo $url = WPF()->user_trailingslashit( $str );
|
48 |
}
|
49 |
|
50 |
if(!$echo) return $url;
|
70 |
}
|
71 |
|
72 |
function is_wpforo_exclude_url($url = ''){
|
|
|
|
|
73 |
if(!$url) $url = wpforo_get_request_uri();
|
74 |
$url = urldecode($url);
|
75 |
$url = preg_replace('#/page/\d*/?$#isu', '', $url);
|
77 |
if( !$current_url = wpforo_get_url_query_vars_str($url) ) return FALSE;
|
78 |
if( preg_match('#\.php/?(?:\?[^/]*)?$#isu', $current_url) ) return TRUE;
|
79 |
|
80 |
+
if( WPF()->use_home_url && WPF()->excld_urls ){
|
81 |
+
$expld = array_filter( explode("\n", WPF()->excld_urls) );
|
82 |
foreach( $expld as $excld_url ){
|
83 |
$excld_url = urldecode($excld_url);
|
84 |
if( strpos($excld_url, home_url('/')) === FALSE ) continue;
|
93 |
function is_wpforo_url($url = ''){
|
94 |
if( wpforo_is_admin() ) return FALSE;
|
95 |
if(!$url) $url = wpforo_get_request_uri();
|
96 |
+
|
97 |
+
if( WPF()->use_home_url ) return TRUE;
|
|
|
98 |
|
99 |
$current_url = wpforo_get_url_query_vars_str($url);
|
100 |
|
101 |
+
if( WPF()->permastruct && strpos($current_url, WPF()->permastruct) !== FALSE
|
102 |
+
&& strpos($current_url, WPF()->permastruct) == 0
|
103 |
&& !wpforo_is_admin() ) return TRUE;
|
104 |
|
105 |
return FALSE;
|
107 |
|
108 |
function is_wpforo_shortcode_page(){
|
109 |
if( wpforo_is_admin() ) return FALSE;
|
110 |
+
global $post;
|
111 |
if( $post && isset($post->post_content) && has_shortcode( $post->post_content, 'wpforo' ) && !is_wpforo_url() ) return TRUE;
|
112 |
return FALSE;
|
113 |
}
|
124 |
return $current_url;
|
125 |
}
|
126 |
|
127 |
+
function wpforo_feature($option){
|
128 |
+
if( isset(WPF()->features[$option]) && WPF()->features[$option] ){
|
|
|
129 |
return true;
|
130 |
}
|
131 |
else{
|
268 |
if(empty($bulk_actions)) $bulk_actions = array( 'del' );
|
269 |
|
270 |
if(!empty($fields)) :
|
|
|
|
|
|
|
271 |
$args = array();
|
272 |
|
273 |
+
if(isset($_GET['s']) && $_GET['s'] != '') $args['include'] = WPF()->$varname->search(sanitize_text_field($_GET['s']), $search_fields);
|
274 |
if(isset($_GET['orderby'])) $args['orderby'] = sanitize_text_field($_GET['orderby']);
|
275 |
if(isset($_GET['order'])) $args['order'] = sanitize_text_field($_GET['order']);
|
276 |
if(isset($_GET['forumid']) && $_GET['forumid'] != 0) $args['forumid'] = intval($_GET['forumid']);
|
295 |
if( $varname == 'member' && !isset($_GET['member_status']) ){
|
296 |
$args['status'] = array('active');
|
297 |
}
|
298 |
+
|
299 |
+
if($varname == 'ad') {
|
300 |
+
$_call_ = WPF_AD();
|
301 |
+
}else{
|
302 |
+
$_call_ = WPF()->$varname;
|
303 |
+
}
|
304 |
+
$items = $_call_->$func($args, $items_count);
|
305 |
|
306 |
if(isset($args['include']) && empty($args['include'])){
|
307 |
$items_count = 0;
|
356 |
</div>
|
357 |
<?php if($varname == 'moderation'): ?>
|
358 |
<?php
|
359 |
+
$total = WPF()->post->get_count();
|
360 |
$up_total = (!isset($_GET['filter_by_status']) || (isset($_GET['filter_by_status']) && $_GET['filter_by_status'] == 1 )) ? $items_count : ($total - $items_count);
|
361 |
$ap_total = ((isset($_GET['filter_by_status']) && $_GET['filter_by_status'] == 0 )) ? $items_count : ($total - $items_count);
|
362 |
?>
|
366 |
</ul>
|
367 |
<?php elseif($varname == 'member' && (!isset($_GET['groupid']) || (isset($_GET['groupid']) && !$_GET['groupid'])) ): ?>
|
368 |
<?php
|
369 |
+
$total = WPF()->member->get_count();
|
370 |
$up_total = (!isset($_GET['member_status']) || (isset($_GET['member_status']) && $_GET['member_status'] == 'active' )) ? $items_count : ($total - $items_count);
|
371 |
$ap_total = ((isset($_GET['member_status']) && $_GET['member_status'] == 'banned' )) ? $items_count : ($total - $items_count);
|
372 |
?>
|
400 |
|
401 |
<select name="<?php echo esc_attr($filter_field) ?>">
|
402 |
<option value="0"><?php _e('Show all forums', 'wpforo'); ?></option>
|
403 |
+
<?php WPF()->forum->tree('select_box'); ?>
|
404 |
</select>
|
405 |
|
406 |
<?php }elseif($filter_field == 'langid'){ ?>
|
407 |
|
408 |
<select name="<?php echo esc_attr($filter_field) ?>">
|
409 |
+
<?php WPF()->phrase->show_lang_list() ?>
|
410 |
</select>
|
411 |
|
412 |
<?php }elseif($filter_field == 'groupid'){ ?>
|
413 |
|
414 |
<select name="<?php echo esc_attr($filter_field) ?>">
|
415 |
<option value="0"><?php _e('filter by group', 'wpforo') ?></option>
|
416 |
+
<?php foreach(WPF()->usergroup->get_usergroups() as $group) : ?>
|
417 |
<?php if( $group['groupid'] != 4 ) : ?>
|
418 |
<option value="<?php echo esc_attr($group['groupid']) ?>" <?php echo ( isset($_GET['groupid']) && $_GET['groupid'] == $group['groupid'] ? 'selected' : '' ) ?>><?php echo esc_html($group['name']) ?></option>
|
419 |
<?php endif ?>
|
421 |
</select>
|
422 |
|
423 |
<?php }elseif( $varname == 'member' && $filter_field == 'status' ){
|
424 |
+
$sql = "SELECT DISTINCT `status` as statuses FROM `" . WPF()->db->prefix . "wpforo_profiles`";
|
425 |
+
if( $statuses = WPF()->db->get_col($sql) ){ ?>
|
426 |
<select name="member_status">
|
427 |
<option value="0"><?php _e('filter by status', 'wpforo') ?></option>
|
428 |
|
437 |
|
438 |
}elseif( $varname == 'phrase' && $filter_field == 'package' ){
|
439 |
|
440 |
+
$sql = "SELECT DISTINCT `package` as packages FROM `" . WPF()->db->prefix . "wpforo_phrases`";
|
441 |
+
if( $packages = WPF()->db->get_col($sql) ){ ?>
|
442 |
<select name="phrase_package">
|
443 |
<option value="0"><?php _e('filter by package', 'wpforo') ?></option>
|
444 |
|
455 |
$filter_by_status = intval( ( isset($_GET['filter_by_status']) ? $_GET['filter_by_status'] : 1 ) );
|
456 |
|
457 |
if($filter_field == 'status'){
|
458 |
+
if( $statuses = WPF()->moderation->post_statuses ) : ?>
|
459 |
<select name="filter_by_status">
|
460 |
|
461 |
<?php foreach ($statuses as $key => $status) : ?>
|
466 |
<?php
|
467 |
endif;
|
468 |
}elseif($filter_field == 'userid'){
|
469 |
+
$sql = "SELECT DISTINCT `userid` FROM `".WPF()->db->prefix."wpforo_posts` WHERE `status` = $filter_by_status";
|
470 |
+
if( $userids = WPF()->db->get_col($sql) ) : ?>
|
471 |
<select name="filter_by_userid">
|
472 |
<option value="0"><?php _e('filter by user', 'wpforo') ?></option>
|
473 |
|
474 |
+
<?php foreach ($userids as $userid) : $user = WPF()->member->get_member($userid); ?>
|
475 |
<option value="<?php echo esc_attr($userid) ?>" <?php echo ( isset($_GET['filter_by_userid']) && $_GET['filter_by_userid'] == $userid ? 'selected' : '' ) ?>><?php echo esc_html( wpforo_make_dname($user['display_name'], $user['user_nicename']) ) ?></option>
|
476 |
<?php endforeach; ?>
|
477 |
|
572 |
<?php
|
573 |
if($varname == 'member'){
|
574 |
$url = $url_user = admin_url( 'user-edit.php?user_id=' . intval($item[$primary_key]));
|
575 |
+
$url_profile = WPF()->$varname->get_profile_url($item[$primary_key], 'account');
|
576 |
}elseif($varname == 'moderation'){
|
577 |
+
$url = WPF()->post->get_post_url($item[$primary_key]);
|
578 |
}else{
|
579 |
$url = admin_url( 'admin.php?page=wpforo-'. $varname .'s&id='.$item[$primary_key] .'&action=edit' );
|
580 |
}
|
585 |
<?php
|
586 |
if($varname == 'forum'){
|
587 |
$depth = 0;
|
588 |
+
WPF()->forum->count_depth($item[$primary_key], $depth);
|
589 |
echo str_repeat( '— ', $depth);
|
590 |
}
|
591 |
wpfo($item[$field], true, 'esc_html');
|
607 |
<span class="edit"><a href="<?php echo esc_url($url_profile); ?>"><?php _e('edit profile', 'wpforo'); ?></a></span>
|
608 |
<?php if( $act_key != ( count($actions) - 1 ) ) echo " | "; ?>
|
609 |
<?php break;
|
610 |
+
case 'ban': if($item['userid'] == WPF()->current_userid) break; ?>
|
611 |
<?php $ban_url = wp_nonce_url( admin_url( 'admin.php?page=wpforo-' . esc_attr(sanitize_text_field($varname)) . 's&id=' . intval($item[$primary_key]) . '&action=' . ($item['status'] == 'banned' ? 'unban' : 'ban') ), 'wpforo_admin_table_action_ban' ); ?>
|
612 |
<span class="trash"><a class="submitban" title="<?php echo ($item['status'] == 'banned' ? __('unban user', 'wpforo') : __('ban user', 'wpforo') ) ?>" onclick="return confirm('<?php echo ($item['status'] == 'banned' ? __('Are you sure, you want to unban this user?', 'wpforo') : __('Are you sure, you want to ban this user?', 'wpforo') ) ?>');" href="<?php echo esc_url($ban_url); ?>"><?php echo ($item['status'] == 'banned' ? __('unban user', 'wpforo') : __('ban user', 'wpforo') ) ?></a></span>
|
613 |
<?php if( $act_key != ( count($actions) - 1 ) ) echo " | "; ?>
|
622 |
<span class="vim-u"><a class="vim-u" title="<?php echo ( !$item['status'] ? __('unapprove this item', 'wpforo') : __('Approve this item', 'wpforo') ) ?>" href="<?php echo esc_url($approve_url); ?>"><?php echo ( !$item['status'] ? __('unapprove', 'wpforo') : __('approve', 'wpforo') ); ?></a></span>
|
623 |
<?php if( $act_key != ( count($actions) - 1 ) ) echo " | "; ?>
|
624 |
<?php break;
|
625 |
+
case 'user_delete': if($item['userid'] == WPF()->current_userid) break; ?>
|
626 |
<?php $delete_url = wp_nonce_url( "users.php?action=delete&user=".intval($item[$primary_key]), 'bulk-users' ) ?>
|
627 |
<span class="trash"><a class="submitdelete" title="<?php _e('Delete this item', 'wpforo') ?>" onclick="return confirm('<?php _e('Are you sure you whant to DELETE this item?', 'wpforo') ?>');" href="<?php echo esc_url($delete_url); ?>"><?php _e('delete', 'wpforo'); ?></a></span>
|
628 |
<?php if( $act_key != ( count($actions) - 1 ) ) echo " | "; ?>
|
641 |
}
|
642 |
?>
|
643 |
<span class="view">
|
644 |
+
<a href="<?php echo esc_url(WPF()->$varname->$fn_name($item_id)) ?>" target="_blank" title="<?php echo esc_attr( __('view', 'wpforo')); ?> “<?php echo esc_attr($varname) ?>”" rel="permalink">
|
645 |
<?php _e('view', 'wpforo'); ?>
|
646 |
</a>
|
647 |
</span>
|
654 |
<?php else : ?>
|
655 |
<td class="<?php echo esc_attr($item[$field]) ?> column-<?php echo esc_attr($item[$field]) ?>">
|
656 |
<?php if($field == 'forumid') : ?>
|
657 |
+
<?php $data = WPF()->forum->get_forum($item[$field]); echo esc_html($data['title']); ?>
|
658 |
<?php elseif($field == 'userid') : ?>
|
659 |
<?php if(isset($item['name'])): ?>
|
660 |
<?php $data = wpforo_member($item); echo esc_html(wpforo_make_dname($data['display_name'], $data['user_nicename'])); ?>
|
661 |
<?php else: ?>
|
662 |
+
<?php $data = WPF()->member->get_member($item[$field]); echo esc_html(wpforo_make_dname($data['display_name'], $data['user_nicename'])); ?>
|
663 |
<?php endif; ?>
|
664 |
<?php elseif($field == 'groupid') : ?>
|
665 |
+
<?php $data = WPF()->usergroup->get_usergroup($item[$field]); echo esc_html($data['name']); ?>
|
666 |
<?php elseif($field == 'rank') : ?>
|
667 |
+
<div class="author-rating"><div class="bar wpfw-<?php echo esc_attr(WPF()->member->rating_level($item['posts'])); ?> wpfbg-4"></div></div>
|
668 |
<?php elseif($field == 'is_first_post') : ?>
|
669 |
<b><?php echo strtoupper( ( $item[$field] ? __('Topic', 'wpforo') : __('Post', 'wpforo') ) ) ?></b>
|
670 |
<?php else : ?>
|
728 |
}
|
729 |
|
730 |
function wpforo_phrase($key, $echo = TRUE, $format = 'first-upper'){
|
731 |
+
$phrase = (isset(WPF()->phrase->phrases[addslashes(strtolower($key))])) ? WPF()->phrase->phrases[addslashes(strtolower($key))] : $key;
|
|
|
732 |
if( $key == $phrase ){
|
733 |
$phrase = __($key, 'wpforo');
|
734 |
}
|
790 |
}
|
791 |
|
792 |
|
793 |
+
function wpforo_text( $text, $length = 0, $echo = TRUE ){
|
794 |
$text = preg_replace('#(?:[^\'\"]|^)(https?://[^\s\'\"<>]+)(?:[^\'\"]|$)#isu', '', $text);
|
795 |
$text = preg_replace('#\[attach[^\[\]]*\][^\[\]]*\[/attach\]#isu', '', $text);
|
796 |
$text = strip_tags($text);
|
797 |
+
|
798 |
+
if(!$length){
|
799 |
+
if($echo){
|
800 |
+
echo trim($text);
|
801 |
+
return '';
|
802 |
+
}else{
|
803 |
+
return trim($text);
|
804 |
+
}
|
805 |
+
}
|
806 |
+
|
807 |
if(function_exists('mb_substr')){
|
808 |
if($echo){
|
809 |
echo trim( mb_substr( $text, 0, $length, get_option('blog_charset') ) . ( ( function_exists('mb_strlen') ? mb_strlen( $text, get_option('blog_charset') ) : strlen($text) ) > $length ? '...' : '' ) );
|
883 |
return $content;
|
884 |
}
|
885 |
function wpforo_nofollow($match){
|
886 |
+
$dofollow = WPF()->tools_misc['dofollow'];
|
887 |
+
if(!empty($dofollow)){ $dofollow = explode("\n", $dofollow); if(!empty($dofollow)) $dofollow = array_map("trim", $dofollow); }
|
888 |
+
$url = get_bloginfo('url'); $parse = parse_url($url);
|
889 |
if( isset($match[0]) ) $link = $match[0];
|
890 |
if( isset($match[1]) && strpos($match[1], $parse['host']) === FALSE ){
|
891 |
+
$link_url = parse_url($match[1]);
|
892 |
+
if(!empty($dofollow) && isset($link_url['host']) && $link_url['host'] && in_array($link_url['host'], $dofollow) ){
|
893 |
+
return $link;
|
894 |
+
}
|
895 |
+
else{
|
896 |
+
$link = preg_replace('|(<a[^><]+)>|is', '$1 rel="nofollow">', $match[0]);
|
897 |
+
}
|
898 |
}
|
899 |
return $link;
|
900 |
}
|
902 |
add_action('wp_loaded', 'wpforo_cookie_logs', 10);
|
903 |
|
904 |
function wpforo_cookie_logs(){
|
905 |
+
if(!wpforo_feature('view-logging')) return;
|
|
|
906 |
$key = ''; $logid = 0; $log = false;
|
907 |
+
$data = WPF()->current_object;
|
908 |
if( $data['template'] == 'post' && isset($data['topicid']) && $data['topicid'] ){
|
909 |
$logid = $data['topicid'];
|
910 |
$key = 'wpf_viewed_topics';
|
931 |
|
932 |
add_action('wpforo_bottom_hook', 'wpforo_user_logging');
|
933 |
function wpforo_user_logging(){
|
934 |
+
$data = WPF()->current_object;
|
|
|
935 |
if( $data['template'] == 'post' && isset($data['topicid']) && $data['topicid'] ){
|
936 |
$current_user_id = get_current_user_id();
|
937 |
$current_time = current_time( 'timestamp', 1 );
|
938 |
|
939 |
+
if( wpforo_feature('view-logging')){
|
940 |
$viwed_ids = wpforo_getcookie( 'wpf_viewed_topics', true );
|
941 |
if( empty($viwed_ids) || ( is_array($viwed_ids) && !in_array($data['topicid'] , $viwed_ids ))){
|
942 |
+
WPF()->db->query("UPDATE `".WPF()->db->prefix."wpforo_topics` SET `views` = `views` + 1 WHERE `topicid` = " . intval($data['topicid']));
|
943 |
}
|
944 |
}
|
945 |
else{
|
946 |
if( $current_user_id ){
|
947 |
//registered user
|
948 |
+
$view = WPF()->db->get_row("SELECT `vid`, `created` FROM `". WPF()->db->prefix . "wpforo_views` WHERE `topicid` = " . intval($data['topicid']) ." AND `userid` = " . intval($current_user_id), ARRAY_A);
|
949 |
if( !$view['vid'] ){
|
950 |
+
$sql = "INSERT INTO ". WPF()->db->prefix ."wpforo_views( `userid` , `topicid` , `created` ) VALUES ( '".intval($current_user_id)."', " . intval($data['topicid']) . ", '" . esc_sql($current_time) . "' ) ";
|
951 |
+
WPF()->db->query($sql);
|
952 |
+
WPF()->db->query("UPDATE `".WPF()->db->prefix."wpforo_topics` SET `views` = `views` + 1 WHERE `topicid` = " . intval($data['topicid']));
|
953 |
}else{
|
954 |
+
$sql = "UPDATE ". WPF()->db->prefix ."wpforo_views SET `created` = " . intval($current_time) . " WHERE `userid` = " . intval($current_user_id) . " AND `topicid` = " . intval($data['topicid']);
|
955 |
+
WPF()->db->query($sql);
|
956 |
if( $current_time - $view['created'] > 86400 ){
|
957 |
+
WPF()->db->query("UPDATE `".WPF()->db->prefix."wpforo_topics` SET `views` = `views` + 1 WHERE `topicid` = " . intval($data['topicid']));
|
958 |
}
|
959 |
}
|
960 |
}
|
1041 |
function wpforo_date($date, $type = 'ago', $echo = true ) {
|
1042 |
if(is_numeric($date)) $date = date_i18n( 'Y-m-d H:i:s', $date);
|
1043 |
|
|
|
1044 |
$d = $date;
|
1045 |
$sep = ' ';
|
1046 |
$timestamp = strtotime($date);
|
1048 |
$current_offset = get_option('gmt_offset');
|
1049 |
if(!is_string($type)) $type = 'ago';
|
1050 |
|
1051 |
+
if( is_user_logged_in() && !empty(WPF()->current_user) ){
|
1052 |
+
if( isset(WPF()->current_user['timezone']) && WPF()->current_user['timezone'] != '' ){
|
1053 |
+
if(preg_match('|UTC([\-\+]+.?)|is', WPF()->current_user['timezone'], $timezone_array)){
|
1054 |
$timezone_string = '';
|
1055 |
$current_offset = str_replace('+', '', $timezone_array[1]);
|
1056 |
}
|
1057 |
else{
|
1058 |
+
if(in_array(WPF()->current_user['timezone'], timezone_identifiers_list())){
|
1059 |
+
$timezone_string = WPF()->current_user['timezone'];
|
1060 |
$current_offset = '';
|
1061 |
}
|
1062 |
else{
|
1082 |
$d = sprintf( wpforo_phrase('%s ago', false, false), $d );
|
1083 |
}
|
1084 |
else{
|
1085 |
+
if( wpforo_feature('wp-date-format') ){
|
1086 |
$date_format = get_option('date_format');
|
1087 |
$time_format = get_option('time_format');
|
1088 |
$type = $date_format . $sep . $time_format;
|
1100 |
$d = sprintf( wpforo_phrase('%s ago', false, false), $d );
|
1101 |
}
|
1102 |
else{
|
1103 |
+
if( wpforo_feature('wp-date-format') ){
|
1104 |
$date_format = get_option('date_format');
|
1105 |
$time_format = get_option('time_format');
|
1106 |
$type = $date_format . $sep . $time_format;
|
1419 |
|
1420 |
|
1421 |
function get_wpf_option( $option, $default = false ){
|
|
|
1422 |
$value = get_option($option, $default);
|
1423 |
if( $value ){
|
1424 |
$value = maybe_unserialize( $value );
|
1425 |
+
if(is_serialized( $value )) {
|
1426 |
+
$check = @unserialize($value);
|
1427 |
+
if( !$check ) $value = wpforo_fixSerializedArray($value);
|
1428 |
+
}
|
|
|
|
|
|
|
|
|
1429 |
}
|
1430 |
if( $default && is_array($default) && is_array($value) ) $value = array_merge( $default, $value );
|
1431 |
return $value;
|
1520 |
return array('thumbnail');
|
1521 |
}
|
1522 |
|
1523 |
+
function wpforo_debug(){
|
1524 |
+
if( wpforo_feature('debug-mode') ) : ?>
|
1525 |
<div id="wpforo-debug" style="display:none">
|
1526 |
<h4>Super Globals</h4>
|
1527 |
<p>Requests: <?php print_r($_REQUEST); ?></p>
|
1528 |
<p>Server: <?php print_r($_REQUEST); ?></p>
|
1529 |
<h4>Options and Features</h4>
|
1530 |
+
<textarea style="width:500px; height:300px;"><?php echo @ 'permastruct: ' . WPF()->permastruct . "\r\n";
|
1531 |
+
echo @ 'use_home_url: ' . WPF()->use_home_url . "\r\n";
|
1532 |
echo @ 'url: ' . wpforo_home_url() . "\r\n";
|
1533 |
+
@print_r(WPF()->general_options) . "\r\n";
|
1534 |
+
echo @ 'pageid:' . WPF()->pageid . "\r\n";
|
1535 |
+
echo @ 'default_groupid: ' . WPF()->usergroup->default_groupid . "\r\n";
|
1536 |
+
@print_r(WPF()->forum->options) . "\r\n";
|
1537 |
+
@print_r(WPF()->post->options) . "\r\n";
|
1538 |
+
@print_r(WPF()->member->options) . "\r\n";
|
1539 |
+
@print_r(WPF()->sbscrb->options) . "\r\n";
|
1540 |
+
@print_r(WPF()->features) . "\r\n";
|
1541 |
+
@print_r(WPF()->tpl->style) . "\r\n";
|
1542 |
+
@print_r(WPF()->tpl->options) . "\r\n";
|
1543 |
+
@print_r(WPF()->tpl->theme) . "\r\n";
|
1544 |
?>
|
1545 |
</textarea>
|
1546 |
</div>
|
1562 |
* @param string Item View / Template (e.g.: 'forum', 'topic', 'post', 'user', 'widget', etc...)
|
1563 |
* @param array Item data as array
|
1564 |
*
|
|
|
1565 |
*/
|
1566 |
function wpforo_clean_cache( $id = 0, $template = 'all', $item = array() ){
|
|
|
1567 |
$pageid = url_to_postid( $_SERVER['REQUEST_URI'] );
|
1568 |
do_action( 'wpforo_clean_cache_start', $id, $template );
|
1569 |
if( $pageid ){
|
1570 |
$page = get_post( $pageid );
|
1571 |
clean_post_cache( $page );
|
1572 |
}
|
1573 |
+
WPF()->statistic('update', $template);
|
1574 |
do_action( 'wpforo_clean_cache', $id, $template );
|
1575 |
+
WPF()->cache->clean( $id, $template, $item );
|
1576 |
do_action( 'wpforo_clean_cache_end', $id, $template );
|
1577 |
}
|
1578 |
|
1583 |
$table = esc_sql(trim($args['table']));
|
1584 |
|
1585 |
if( $check == 'table_exists' ){
|
1586 |
+
return $wpdb->get_var("SHOW TABLES LIKE '$table'");
|
1587 |
}
|
1588 |
|
1589 |
if( $check == 'col_exists' ){
|
1590 |
+
return $wpdb->get_var("SHOW COLUMNS FROM `$table` LIKE '$col'");
|
1591 |
}
|
1592 |
|
1593 |
if( $check == 'key_exists' ){
|
1594 |
+
return $wpdb->get_var("SHOW KEYS FROM `$table` WHERE `Key_name` = '$col'");
|
|
|
1595 |
}
|
1596 |
|
1597 |
if( $check == 'default_value' ){
|
1598 |
+
$col = $wpdb->get_row("SHOW COLUMNS FROM `$table` LIKE '$col'", ARRAY_A);
|
1599 |
return $col['Default'];
|
1600 |
}
|
1601 |
|
1602 |
if( $check == 'col_type' ){
|
1603 |
+
$col = $wpdb->get_row("SHOW COLUMNS FROM `$table` LIKE '$col'", ARRAY_A);
|
1604 |
return $col['Type'];
|
1605 |
}
|
1606 |
}
|
1607 |
|
1608 |
function wpforo_is_owner( $userid ){
|
1609 |
+
if( isset(WPF()->current_userid) && WPF()->current_userid ){
|
1610 |
+
if( $userid == WPF()->current_userid ) return true;
|
1611 |
+
}
|
|
|
|
|
|
|
1612 |
return false;
|
1613 |
}
|
1614 |
|
1693 |
|
1694 |
function wpforo_avatar_url($avatar_html){
|
1695 |
if( preg_match('#src=[\'"]([^\'"]+?)[\'"]#isu', $avatar_html, $matches) ){
|
|
|
1696 |
return $matches[1];
|
1697 |
}
|
1698 |
return '';
|
1741 |
function wpforo_is_json($string) {
|
1742 |
json_decode($string);
|
1743 |
return (json_last_error() == JSON_ERROR_NONE);
|
1744 |
+
}
|
1745 |
+
|
1746 |
+
function wpforo_ajax_response( $message ) {
|
1747 |
+
wp_send_json( $message );
|
1748 |
+
die();
|
1749 |
+
}
|
1750 |
+
|
1751 |
+
function wpforo_get_fb_user( $user ) {
|
1752 |
+
if( is_user_logged_in() ) return wp_get_current_user();
|
1753 |
+
$user_data = get_user_by('email', $user['user_email']);
|
1754 |
+
if( !$user_data ) {
|
1755 |
+
$users = get_users( array( 'meta_key' => '_fb_user_id', 'meta_value' => $user['fb_user_id'], 'number' => 1, 'count_total' => false ) );
|
1756 |
+
if( is_array( $users ) ) $user_data = reset( $users );
|
1757 |
+
}
|
1758 |
+
return $user_data;
|
1759 |
+
}
|
1760 |
+
|
1761 |
+
|
1762 |
+
function wpforo_unique_username( $username ) {
|
1763 |
+
static $i;
|
1764 |
+
if( !$username ) $username = 'user_' . uniqid();
|
1765 |
+
if( strpos($username, '@') !== FALSE ){
|
1766 |
+
$parts = explode( "@", $username );
|
1767 |
+
if( !empty($parts) && isset($parts[0]) && $parts[0] ) {
|
1768 |
+
$username = $parts[0];
|
1769 |
+
} else {
|
1770 |
+
$username = str_replace( '@', '', $username);
|
1771 |
+
}
|
1772 |
+
}
|
1773 |
+
if ( null === $i ) { $i = 1; } else { $i++; }
|
1774 |
+
if ( !username_exists($username) ) { return $username; }
|
1775 |
+
$new_username = sprintf( '%s-%s', $username, $i );
|
1776 |
+
if ( ! username_exists( $new_username ) ) {
|
1777 |
+
return $new_username;
|
1778 |
+
} else {
|
1779 |
+
return call_user_func( __FUNCTION__, $username );
|
1780 |
+
}
|
1781 |
+
}
|
1782 |
+
|
1783 |
+
|
1784 |
+
function wpforo_find_current_user_data( $current_object ){
|
1785 |
+
if( is_user_logged_in() && !(isset($current_object['user_nicename']) && $current_object['user_nicename']) && !(isset($current_object['userid']) && $current_object['userid']) ){
|
1786 |
+
$user = wp_get_current_user();
|
1787 |
+
if(!empty($user)){
|
1788 |
+
$current_object['userid'] = $user->ID;
|
1789 |
+
$current_object['user_nicename'] = $user->user_nicename;
|
1790 |
+
}
|
1791 |
+
}
|
1792 |
+
return $current_object;
|
1793 |
+
}
|
1794 |
+
|
1795 |
+
function wpforo_is_session_started(){
|
1796 |
+
if ( php_sapi_name() !== 'cli' ) {
|
1797 |
+
if ( version_compare(phpversion(), '5.4.0', '>=') ) {
|
1798 |
+
return session_status() === PHP_SESSION_ACTIVE ? TRUE : FALSE;
|
1799 |
+
} else {
|
1800 |
+
return session_id() === '' ? FALSE : TRUE;
|
1801 |
+
}
|
1802 |
+
}
|
1803 |
+
return FALSE;
|
1804 |
}
|
wpf-includes/install-sql.php
CHANGED
@@ -4,12 +4,12 @@
|
|
4 |
|
5 |
|
6 |
$charset_collate = '';
|
7 |
-
if ( ! empty(
|
8 |
-
if ( ! empty(
|
9 |
-
$engine = version_compare(
|
10 |
|
11 |
$wpforo_sql = array(
|
12 |
-
"CREATE TABLE IF NOT EXISTS `
|
13 |
`forumid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
14 |
`title` VARCHAR(255) NOT NULL,
|
15 |
`slug` VARCHAR(255) NOT NULL,
|
@@ -36,7 +36,7 @@
|
|
36 |
KEY `parentid` (`parentid`),
|
37 |
KEY `is_cat` (`is_cat`)
|
38 |
) ENGINE=MyISAM $charset_collate;",
|
39 |
-
"CREATE TABLE IF NOT EXISTS `
|
40 |
`topicid` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
41 |
`forumid` INT UNSIGNED NOT NULL,
|
42 |
`first_postid` BIGINT UNSIGNED NOT NULL DEFAULT 0,
|
@@ -60,7 +60,7 @@
|
|
60 |
`name` VARCHAR(50) NOT NULL DEFAULT '',
|
61 |
`email` VARCHAR(50) NOT NULL DEFAULT '',
|
62 |
PRIMARY KEY (`topicid`),
|
63 |
-
UNIQUE KEY `
|
64 |
FULLTEXT KEY `title` (`title`),
|
65 |
KEY `forumid` (`forumid`),
|
66 |
KEY `first_postid` (`first_postid`),
|
@@ -72,7 +72,7 @@
|
|
72 |
KEY `is_private` (`private`),
|
73 |
KEY `own_private` (`userid`,`private`)
|
74 |
) ENGINE=$engine $charset_collate;",
|
75 |
-
"CREATE TABLE IF NOT EXISTS `
|
76 |
`postid` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
77 |
`parentid` BIGINT UNSIGNED NOT NULL DEFAULT 0,
|
78 |
`forumid` INT UNSIGNED NOT NULL,
|
@@ -97,6 +97,7 @@
|
|
97 |
KEY `topicid` (`topicid`),
|
98 |
KEY `forumid` (`forumid`),
|
99 |
KEY `userid` (`userid`),
|
|
|
100 |
KEY `parentid` (`parentid`),
|
101 |
KEY `is_answer` (`is_answer`),
|
102 |
KEY `is_first_post` (`is_first_post`),
|
@@ -104,7 +105,7 @@
|
|
104 |
KEY `email` (`email`),
|
105 |
KEY `is_private` (`private`)
|
106 |
) ENGINE=$engine $charset_collate;",
|
107 |
-
"CREATE TABLE IF NOT EXISTS `
|
108 |
`userid` INT UNSIGNED NOT NULL,
|
109 |
`title` VARCHAR(255) NOT NULL DEFAULT 'member',
|
110 |
`username` VARCHAR(255) NOT NULL,
|
@@ -113,21 +114,22 @@
|
|
113 |
`questions` INT NOT NULL DEFAULT 0,
|
114 |
`answers` INT NOT NULL DEFAULT 0,
|
115 |
`comments` INT NOT NULL DEFAULT 0,
|
116 |
-
`site` VARCHAR(255)
|
117 |
-
`icq` VARCHAR(255)
|
118 |
-
`aim` VARCHAR(255)
|
119 |
-
`yahoo` VARCHAR(255)
|
120 |
-
`msn` VARCHAR(255)
|
121 |
-
`facebook` VARCHAR(255)
|
122 |
-
`twitter` VARCHAR(255)
|
123 |
-
`gtalk` VARCHAR(255)
|
124 |
-
`skype` VARCHAR(255)
|
125 |
-
`avatar` VARCHAR(255)
|
126 |
`signature` TEXT,
|
127 |
`about` TEXT,
|
128 |
`occupation` TEXT,
|
129 |
-
`location` VARCHAR(255)
|
130 |
`last_login` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
|
|
131 |
`rank` INT UNSIGNED NOT NULL DEFAULT 0,
|
132 |
`like` INT UNSIGNED NOT NULL DEFAULT 0,
|
133 |
`status` VARCHAR(8) DEFAULT 'active' COMMENT 'active, blocked, trashed, spamer',
|
@@ -136,24 +138,29 @@
|
|
136 |
UNIQUE KEY `UNIQUE ID` (`userid`),
|
137 |
UNIQUE KEY `UNIQUE USERNAME` (`username`(191)),
|
138 |
KEY `groupid` (`groupid`),
|
|
|
139 |
KEY `posts` (`posts`),
|
140 |
KEY `status` (`status`)
|
141 |
) ENGINE=MyISAM $charset_collate;",
|
142 |
-
"CREATE TABLE IF NOT EXISTS `
|
143 |
`groupid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
144 |
`name` VARCHAR(255) NOT NULL,
|
145 |
`cans` LONGTEXT NOT NULL COMMENT 'board permissions',
|
146 |
`description` TEXT,
|
|
|
|
|
|
|
|
|
147 |
PRIMARY KEY (`groupid`),
|
148 |
UNIQUE KEY `UNIQUE_GROUP_NAME` (`name`(191))
|
149 |
) ENGINE=MyISAM $charset_collate;",
|
150 |
-
"CREATE TABLE IF NOT EXISTS `
|
151 |
`langid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
152 |
`name` VARCHAR(255) NOT NULL,
|
153 |
PRIMARY KEY (`langid`),
|
154 |
UNIQUE KEY `UNIQUE language name` (`name`(191))
|
155 |
) ENGINE=MyISAM $charset_collate;",
|
156 |
-
"CREATE TABLE IF NOT EXISTS `
|
157 |
`phraseid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
158 |
`langid` INT UNSIGNED NOT NULL,
|
159 |
`phrase_key` VARCHAR(255) NOT NULL,
|
@@ -164,23 +171,23 @@
|
|
164 |
KEY `phrase_key` (`phrase_key`(191)),
|
165 |
UNIQUE KEY lng_and_key_uniq (`langid`, `phrase_key`(191))
|
166 |
) ENGINE=MyISAM $charset_collate;",
|
167 |
-
"CREATE TABLE IF NOT EXISTS `
|
168 |
`likeid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
169 |
`userid` INT UNSIGNED NOT NULL,
|
170 |
`postid` INT UNSIGNED NOT NULL,
|
171 |
`post_userid` INT UNSIGNED NOT NULL,
|
172 |
PRIMARY KEY (`likeid`),
|
173 |
UNIQUE KEY `userid` (`userid`,`postid`)
|
174 |
-
) ENGINE
|
175 |
-
"CREATE TABLE IF NOT EXISTS `
|
176 |
`vid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
177 |
`userid` INT UNSIGNED NOT NULL,
|
178 |
`topicid` INT UNSIGNED NOT NULL,
|
179 |
`created` INT UNSIGNED NOT NULL,
|
180 |
PRIMARY KEY (`vid`),
|
181 |
KEY `user_topic` (`userid`,`topicid`)
|
182 |
-
) ENGINE
|
183 |
-
"CREATE TABLE IF NOT EXISTS `
|
184 |
`voteid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
185 |
`userid` INT UNSIGNED NOT NULL,
|
186 |
`postid` INT UNSIGNED NOT NULL,
|
@@ -188,8 +195,8 @@
|
|
188 |
`post_userid` INT UNSIGNED NOT NULL,
|
189 |
PRIMARY KEY (`voteid`),
|
190 |
UNIQUE KEY `userid` (`userid`,`postid`)
|
191 |
-
) ENGINE
|
192 |
-
"CREATE TABLE IF NOT EXISTS `
|
193 |
`accessid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
194 |
`access` VARCHAR(255) NOT NULL,
|
195 |
`title` VARCHAR(255) NOT NULL,
|
@@ -197,7 +204,7 @@
|
|
197 |
PRIMARY KEY (`accessid`),
|
198 |
UNIQUE KEY ( `access`(191) )
|
199 |
) ENGINE=MyISAM $charset_collate;",
|
200 |
-
"CREATE TABLE IF NOT EXISTS `
|
201 |
`subid` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
202 |
`itemid` BIGINT UNSIGNED NOT NULL,
|
203 |
`type` VARCHAR(5) NOT NULL,
|
@@ -209,8 +216,8 @@
|
|
209 |
UNIQUE KEY `confirmkey` (`confirmkey`),
|
210 |
KEY `itemid_2` (`itemid`),
|
211 |
KEY `userid` (`userid`)
|
212 |
-
) ENGINE
|
213 |
-
"CREATE TABLE IF NOT EXISTS `
|
214 |
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
215 |
`userid` BIGINT UNSIGNED NOT NULL,
|
216 |
`name` VARCHAR(60) NOT NULL,
|
@@ -224,5 +231,5 @@
|
|
224 |
KEY `topicid` (`topicid`),
|
225 |
KEY `time` (`time`),
|
226 |
KEY `ip` (`ip`)
|
227 |
-
) ENGINE
|
228 |
);
|
4 |
|
5 |
|
6 |
$charset_collate = '';
|
7 |
+
if ( ! empty(WPF()->db->charset) ) $charset_collate = "DEFAULT CHARACTER SET " . WPF()->db->charset;
|
8 |
+
if ( ! empty(WPF()->db->collate) ) $charset_collate .= " COLLATE " . WPF()->db->collate;
|
9 |
+
$engine = version_compare(WPF()->db->db_version(), '5.6.4', '>=') ? 'InnoDB' : 'MyISAM';
|
10 |
|
11 |
$wpforo_sql = array(
|
12 |
+
"CREATE TABLE IF NOT EXISTS `".WPF()->db->prefix."wpforo_forums`(
|
13 |
`forumid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
14 |
`title` VARCHAR(255) NOT NULL,
|
15 |
`slug` VARCHAR(255) NOT NULL,
|
36 |
KEY `parentid` (`parentid`),
|
37 |
KEY `is_cat` (`is_cat`)
|
38 |
) ENGINE=MyISAM $charset_collate;",
|
39 |
+
"CREATE TABLE IF NOT EXISTS `".WPF()->db->prefix."wpforo_topics`(
|
40 |
`topicid` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
41 |
`forumid` INT UNSIGNED NOT NULL,
|
42 |
`first_postid` BIGINT UNSIGNED NOT NULL DEFAULT 0,
|
60 |
`name` VARCHAR(50) NOT NULL DEFAULT '',
|
61 |
`email` VARCHAR(50) NOT NULL DEFAULT '',
|
62 |
PRIMARY KEY (`topicid`),
|
63 |
+
UNIQUE KEY `slug` (`slug`(191)),
|
64 |
FULLTEXT KEY `title` (`title`),
|
65 |
KEY `forumid` (`forumid`),
|
66 |
KEY `first_postid` (`first_postid`),
|
72 |
KEY `is_private` (`private`),
|
73 |
KEY `own_private` (`userid`,`private`)
|
74 |
) ENGINE=$engine $charset_collate;",
|
75 |
+
"CREATE TABLE IF NOT EXISTS `".WPF()->db->prefix."wpforo_posts`(
|
76 |
`postid` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
77 |
`parentid` BIGINT UNSIGNED NOT NULL DEFAULT 0,
|
78 |
`forumid` INT UNSIGNED NOT NULL,
|
97 |
KEY `topicid` (`topicid`),
|
98 |
KEY `forumid` (`forumid`),
|
99 |
KEY `userid` (`userid`),
|
100 |
+
KEY `created` (`created`),
|
101 |
KEY `parentid` (`parentid`),
|
102 |
KEY `is_answer` (`is_answer`),
|
103 |
KEY `is_first_post` (`is_first_post`),
|
105 |
KEY `email` (`email`),
|
106 |
KEY `is_private` (`private`)
|
107 |
) ENGINE=$engine $charset_collate;",
|
108 |
+
"CREATE TABLE IF NOT EXISTS `".WPF()->db->prefix."wpforo_profiles` (
|
109 |
`userid` INT UNSIGNED NOT NULL,
|
110 |
`title` VARCHAR(255) NOT NULL DEFAULT 'member',
|
111 |
`username` VARCHAR(255) NOT NULL,
|
114 |
`questions` INT NOT NULL DEFAULT 0,
|
115 |
`answers` INT NOT NULL DEFAULT 0,
|
116 |
`comments` INT NOT NULL DEFAULT 0,
|
117 |
+
`site` VARCHAR(255),
|
118 |
+
`icq` VARCHAR(255),
|
119 |
+
`aim` VARCHAR(255),
|
120 |
+
`yahoo` VARCHAR(255),
|
121 |
+
`msn` VARCHAR(255),
|
122 |
+
`facebook` VARCHAR(255),
|
123 |
+
`twitter` VARCHAR(255),
|
124 |
+
`gtalk` VARCHAR(255),
|
125 |
+
`skype` VARCHAR(255),
|
126 |
+
`avatar` VARCHAR(255),
|
127 |
`signature` TEXT,
|
128 |
`about` TEXT,
|
129 |
`occupation` TEXT,
|
130 |
+
`location` VARCHAR(255),
|
131 |
`last_login` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
132 |
+
`online_time` INT UNSIGNED,
|
133 |
`rank` INT UNSIGNED NOT NULL DEFAULT 0,
|
134 |
`like` INT UNSIGNED NOT NULL DEFAULT 0,
|
135 |
`status` VARCHAR(8) DEFAULT 'active' COMMENT 'active, blocked, trashed, spamer',
|
138 |
UNIQUE KEY `UNIQUE ID` (`userid`),
|
139 |
UNIQUE KEY `UNIQUE USERNAME` (`username`(191)),
|
140 |
KEY `groupid` (`groupid`),
|
141 |
+
KEY `online_time` (`online_time`),
|
142 |
KEY `posts` (`posts`),
|
143 |
KEY `status` (`status`)
|
144 |
) ENGINE=MyISAM $charset_collate;",
|
145 |
+
"CREATE TABLE IF NOT EXISTS `".WPF()->db->prefix."wpforo_usergroups`(
|
146 |
`groupid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
147 |
`name` VARCHAR(255) NOT NULL,
|
148 |
`cans` LONGTEXT NOT NULL COMMENT 'board permissions',
|
149 |
`description` TEXT,
|
150 |
+
`utitle` VARCHAR(100) NOT NULL DEFAULT '',
|
151 |
+
`role` VARCHAR(50) NOT NULL DEFAULT '',
|
152 |
+
`access` VARCHAR(50) NOT NULL DEFAULT '',
|
153 |
+
`color` varchar(7) NOT NULL DEFAULT '',
|
154 |
PRIMARY KEY (`groupid`),
|
155 |
UNIQUE KEY `UNIQUE_GROUP_NAME` (`name`(191))
|
156 |
) ENGINE=MyISAM $charset_collate;",
|
157 |
+
"CREATE TABLE IF NOT EXISTS `".WPF()->db->prefix."wpforo_languages`(
|
158 |
`langid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
159 |
`name` VARCHAR(255) NOT NULL,
|
160 |
PRIMARY KEY (`langid`),
|
161 |
UNIQUE KEY `UNIQUE language name` (`name`(191))
|
162 |
) ENGINE=MyISAM $charset_collate;",
|
163 |
+
"CREATE TABLE IF NOT EXISTS `".WPF()->db->prefix."wpforo_phrases` (
|
164 |
`phraseid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
165 |
`langid` INT UNSIGNED NOT NULL,
|
166 |
`phrase_key` VARCHAR(255) NOT NULL,
|
171 |
KEY `phrase_key` (`phrase_key`(191)),
|
172 |
UNIQUE KEY lng_and_key_uniq (`langid`, `phrase_key`(191))
|
173 |
) ENGINE=MyISAM $charset_collate;",
|
174 |
+
"CREATE TABLE IF NOT EXISTS `".WPF()->db->prefix."wpforo_likes`(
|
175 |
`likeid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
176 |
`userid` INT UNSIGNED NOT NULL,
|
177 |
`postid` INT UNSIGNED NOT NULL,
|
178 |
`post_userid` INT UNSIGNED NOT NULL,
|
179 |
PRIMARY KEY (`likeid`),
|
180 |
UNIQUE KEY `userid` (`userid`,`postid`)
|
181 |
+
) ENGINE=INNODB $charset_collate;",
|
182 |
+
"CREATE TABLE IF NOT EXISTS `".WPF()->db->prefix."wpforo_views`(
|
183 |
`vid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
184 |
`userid` INT UNSIGNED NOT NULL,
|
185 |
`topicid` INT UNSIGNED NOT NULL,
|
186 |
`created` INT UNSIGNED NOT NULL,
|
187 |
PRIMARY KEY (`vid`),
|
188 |
KEY `user_topic` (`userid`,`topicid`)
|
189 |
+
) ENGINE=INNODB $charset_collate;",
|
190 |
+
"CREATE TABLE IF NOT EXISTS `".WPF()->db->prefix."wpforo_votes`(
|
191 |
`voteid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
192 |
`userid` INT UNSIGNED NOT NULL,
|
193 |
`postid` INT UNSIGNED NOT NULL,
|
195 |
`post_userid` INT UNSIGNED NOT NULL,
|
196 |
PRIMARY KEY (`voteid`),
|
197 |
UNIQUE KEY `userid` (`userid`,`postid`)
|
198 |
+
) ENGINE=INNODB $charset_collate;",
|
199 |
+
"CREATE TABLE IF NOT EXISTS `".WPF()->db->prefix."wpforo_accesses`(
|
200 |
`accessid` INT UNSIGNED NOT NULL AUTO_INCREMENT,
|
201 |
`access` VARCHAR(255) NOT NULL,
|
202 |
`title` VARCHAR(255) NOT NULL,
|
204 |
PRIMARY KEY (`accessid`),
|
205 |
UNIQUE KEY ( `access`(191) )
|
206 |
) ENGINE=MyISAM $charset_collate;",
|
207 |
+
"CREATE TABLE IF NOT EXISTS `".WPF()->db->prefix."wpforo_subscribes` (
|
208 |
`subid` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
209 |
`itemid` BIGINT UNSIGNED NOT NULL,
|
210 |
`type` VARCHAR(5) NOT NULL,
|
216 |
UNIQUE KEY `confirmkey` (`confirmkey`),
|
217 |
KEY `itemid_2` (`itemid`),
|
218 |
KEY `userid` (`userid`)
|
219 |
+
) ENGINE=INNODB $charset_collate;",
|
220 |
+
"CREATE TABLE IF NOT EXISTS `".WPF()->db->prefix."wpforo_visits` (
|
221 |
`id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
|
222 |
`userid` BIGINT UNSIGNED NOT NULL,
|
223 |
`name` VARCHAR(60) NOT NULL,
|
231 |
KEY `topicid` (`topicid`),
|
232 |
KEY `time` (`time`),
|
233 |
KEY `ip` (`ip`)
|
234 |
+
) ENGINE=INNODB $charset_collate;"
|
235 |
);
|
wpf-includes/wpf-actions.php
CHANGED
@@ -3,15 +3,12 @@
|
|
3 |
if( !defined( 'ABSPATH' ) ) exit;
|
4 |
|
5 |
function wpforo_actions(){
|
6 |
-
|
7 |
-
global $wpforo;
|
8 |
-
|
9 |
do_action( 'wpforo_actions' );
|
10 |
|
11 |
-
if( isset($_POST['wpfreg']) && !empty($_POST['wpfreg']) && $userid =
|
12 |
wpforo_verify_form('ref');
|
13 |
-
|
14 |
-
wp_redirect(
|
15 |
exit();
|
16 |
}
|
17 |
|
@@ -21,11 +18,10 @@ function wpforo_actions(){
|
|
21 |
$wpf_login_times = get_user_meta($user->ID, '_wpf_login_times', true);
|
22 |
if( isset($user->ID) && $wpf_login_times >= 1) {
|
23 |
$name = ( isset($user->data->display_name) ) ? $user->data->display_name : '';
|
24 |
-
|
25 |
-
$wpforo->notice->add( 'Welcome back %s!', 'success', $args);
|
26 |
}
|
27 |
else{
|
28 |
-
|
29 |
}
|
30 |
(int)$wpf_login_times++;
|
31 |
update_user_meta( $user->ID, '_wpf_login_times', $wpf_login_times );
|
@@ -34,15 +30,15 @@ function wpforo_actions(){
|
|
34 |
}else{
|
35 |
$args = array();
|
36 |
foreach($user->errors as $u_err) $args[] = $u_err[0];
|
37 |
-
|
38 |
wp_redirect( wpforo_get_request_uri() );
|
39 |
exit();
|
40 |
}
|
41 |
}
|
42 |
|
43 |
-
extract(
|
44 |
|
45 |
-
if( $template
|
46 |
wp_redirect( wpforo_home_url() );
|
47 |
exit();
|
48 |
}
|
@@ -51,31 +47,31 @@ function wpforo_actions(){
|
|
51 |
if(isset($_POST['member']['userid']) && $_POST['member']['userid']){
|
52 |
wpforo_verify_form();
|
53 |
|
54 |
-
if( !( intval($_POST['member']['userid']) ==
|
55 |
-
(
|
56 |
-
|
57 |
-
|
58 |
wp_redirect(wpforo_get_request_uri());
|
59 |
exit();
|
60 |
}
|
61 |
|
62 |
-
$edit_response =
|
63 |
-
if( isset($_POST['member']['avatar_type']) && $_POST['member']['avatar_type'] == 'custom' )
|
64 |
|
65 |
if( isset($_POST['member']['old_pass'])
|
66 |
&& isset($_POST['member']['user_pass1'])
|
67 |
&& isset($_POST['member']['user_pass2'])
|
68 |
&& $_POST['member']['user_pass1'] && $_POST['member']['user_pass2'] && $_POST['member']['old_pass'] ){
|
69 |
if( $_POST['member']['user_pass1'] == $_POST['member']['user_pass2'] ){
|
70 |
-
|
71 |
}else{
|
72 |
-
|
73 |
-
|
74 |
}
|
75 |
}
|
76 |
|
77 |
-
|
78 |
-
if( $edit_response && $profile_url =
|
79 |
wp_redirect($profile_url);
|
80 |
exit();
|
81 |
}
|
@@ -87,14 +83,14 @@ function wpforo_actions(){
|
|
87 |
if( isset($_POST['topic']['save']) && isset($_REQUEST['topic']['action']) ){
|
88 |
if( $_REQUEST['topic']['action'] == 'add' ){
|
89 |
wpforo_verify_form();
|
90 |
-
if( $topicid =
|
91 |
-
wp_redirect(
|
92 |
exit();
|
93 |
}
|
94 |
}elseif( $_REQUEST['topic']['action'] == 'edit' ){
|
95 |
wpforo_verify_form();
|
96 |
-
if( $topicid =
|
97 |
-
wp_redirect(
|
98 |
exit();
|
99 |
}
|
100 |
}
|
@@ -106,14 +102,14 @@ function wpforo_actions(){
|
|
106 |
if( $_POST['post']['save'] != 'move' && isset($_REQUEST['post']['action']) ){
|
107 |
if($_REQUEST['post']['action'] == 'add'){
|
108 |
wpforo_verify_form();
|
109 |
-
if( $postid =
|
110 |
-
wp_redirect(
|
111 |
exit();
|
112 |
}
|
113 |
}elseif($_REQUEST['post']['action'] == 'edit'){
|
114 |
wpforo_verify_form();
|
115 |
-
if( $postid =
|
116 |
-
wp_redirect(
|
117 |
exit();
|
118 |
}
|
119 |
}
|
@@ -123,7 +119,7 @@ function wpforo_actions(){
|
|
123 |
wpforo_verify_form();
|
124 |
$move_topicid = intval($_POST['movetopicid']);
|
125 |
$move_forumid = intval($_POST['topic']['forumid']);
|
126 |
-
|
127 |
wp_redirect( wpforo_get_request_uri() );
|
128 |
exit();
|
129 |
}
|
@@ -136,9 +132,9 @@ function wpforo_actions(){
|
|
136 |
if( isset($_GET['wpforo']) && ($_GET['wpforo'] == 'sbscrbconfirm' || $_GET['wpforo'] == 'unsbscrb') && isset($_GET['key']) && $_GET['key'] ){
|
137 |
$sbs_key = sanitize_text_field($_GET['key']);
|
138 |
if( $_GET['wpforo'] == 'sbscrbconfirm' ){
|
139 |
-
|
140 |
}else{
|
141 |
-
|
142 |
}
|
143 |
wp_redirect( wpforo_home_url( preg_replace('#\?.*$#is', '', wpforo_get_request_uri()) ) );
|
144 |
exit();
|
@@ -175,12 +171,12 @@ function wpforo_actions(){
|
|
175 |
|
176 |
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-community' && isset($_GET['action']) && $_GET['action'] ){
|
177 |
if(!current_user_can('administrator')){
|
178 |
-
|
179 |
wp_redirect(admin_url());
|
180 |
exit();
|
181 |
}
|
182 |
if( $_GET['action'] == 'synch' ){
|
183 |
-
if( function_exists('set_time_limit') ) set_time_limit( 3600 );
|
184 |
wp_redirect(admin_url('admin.php?page=wpforo-community'));
|
185 |
exit();
|
186 |
}
|
@@ -190,54 +186,55 @@ function wpforo_actions(){
|
|
190 |
exit();
|
191 |
}
|
192 |
if( $_GET['action'] == 'reset_fstat' && check_admin_referer( 'wpforo_reset_forums_stat' ) ){
|
193 |
-
$forums =
|
194 |
if(!empty($forums)){
|
195 |
foreach($forums as $forum){
|
196 |
-
$topics =
|
197 |
-
$posts =
|
198 |
-
|
|
|
199 |
}
|
200 |
-
|
201 |
}
|
202 |
}
|
203 |
if( $_GET['action'] == 'reset_ustat' && check_admin_referer( 'wpforo_reset_users_stat' ) ){
|
204 |
-
$users =
|
205 |
if(!empty($users)){
|
206 |
foreach($users as $user){
|
207 |
-
$questions =
|
208 |
-
$answers =
|
209 |
-
$posts =
|
210 |
-
$question_comments =
|
211 |
-
|
212 |
SET `posts` = " . intval($posts) . ", `answers` = " . intval($answers) . ", `comments` = " . intval($question_comments) . ", `questions` = " . intval($questions) . "
|
213 |
WHERE `userid` = " . intval( $user['userid'] ) );
|
214 |
}
|
215 |
-
|
216 |
}
|
217 |
}
|
218 |
if( $_GET['action'] == 'reset_phrase_cache' && check_admin_referer( 'wpforo_reset_phrase_cache' ) ){
|
219 |
-
|
220 |
-
|
221 |
}
|
222 |
if( $_GET['action'] == 'reset_user_cache' && check_admin_referer( 'wpforo_reset_user_cache' ) ){
|
223 |
-
|
224 |
-
|
225 |
}
|
226 |
if( $_GET['action'] == 'reset_cache' && check_admin_referer( 'wpforo_reset_cache' ) ){
|
227 |
-
|
228 |
-
|
229 |
wpforo_clean_cache(0);
|
230 |
$current_time = time();
|
231 |
$month_ago = $current_time - 2592000;
|
232 |
-
|
233 |
-
|
234 |
}
|
235 |
}
|
236 |
|
237 |
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-settings' ){
|
238 |
|
239 |
if(!current_user_can('administrator')){
|
240 |
-
|
241 |
wp_redirect(admin_url());
|
242 |
exit();
|
243 |
}
|
@@ -261,32 +258,32 @@ function wpforo_actions(){
|
|
261 |
|
262 |
if( update_option('wpforo_url', esc_url( home_url($permastruct) ) )
|
263 |
&& update_option('wpforo_permastruct', $permastruct) ){
|
264 |
-
|
265 |
}else{
|
266 |
-
|
267 |
}
|
268 |
|
269 |
-
|
270 |
flush_rewrite_rules(FALSE);
|
271 |
nocache_headers();
|
272 |
}
|
273 |
|
274 |
if( $wpforo_use_home_url == 0 && !isset($_POST['wpforo_url']) ){
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
flush_rewrite_rules(FALSE);
|
280 |
nocache_headers();
|
281 |
}
|
282 |
|
283 |
if( update_option('wpforo_general_options', $_POST['wpforo_general_options']) ){
|
284 |
-
|
285 |
}else{
|
286 |
-
|
287 |
}
|
288 |
|
289 |
-
|
290 |
wpforo_clean_cache();
|
291 |
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=general' ) );
|
292 |
exit();
|
@@ -295,7 +292,7 @@ function wpforo_actions(){
|
|
295 |
##add new lang action
|
296 |
if( isset($_FILES['add_lang']) ){
|
297 |
check_admin_referer( 'wpforo-settings-language' );
|
298 |
-
|
299 |
wpforo_clean_cache();
|
300 |
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=general' ) );
|
301 |
exit();
|
@@ -305,9 +302,9 @@ function wpforo_actions(){
|
|
305 |
if( isset($_POST['wpforo_forum_options']) ){
|
306 |
check_admin_referer( 'wpforo-settings-forums' );
|
307 |
if( update_option('wpforo_forum_options', $_POST['wpforo_forum_options']) ){
|
308 |
-
|
309 |
}else{
|
310 |
-
|
311 |
}
|
312 |
wpforo_clean_cache();
|
313 |
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=forums' ) );
|
@@ -323,9 +320,9 @@ function wpforo_actions(){
|
|
323 |
$_POST['wpforo_post_options']['dor_durr'] = intval($_POST['wpforo_post_options']['dor_durr']) * 60;
|
324 |
$_POST['wpforo_post_options']['max_upload_size'] = intval(wpforo_human_size_to_bytes($_POST['wpforo_post_options']['max_upload_size'].'M'));
|
325 |
if( update_option('wpforo_post_options', $_POST['wpforo_post_options']) ){
|
326 |
-
|
327 |
}else{
|
328 |
-
|
329 |
}
|
330 |
wpforo_clean_cache();
|
331 |
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=posts' ) );
|
@@ -337,9 +334,9 @@ function wpforo_actions(){
|
|
337 |
check_admin_referer( 'wpforo-settings-members' );
|
338 |
$_POST['wpforo_member_options']['online_status_timeout'] = intval($_POST['wpforo_member_options']['online_status_timeout']) * 60;
|
339 |
if( update_option('wpforo_member_options', $_POST['wpforo_member_options']) ){
|
340 |
-
|
341 |
}else{
|
342 |
-
|
343 |
}
|
344 |
wpforo_clean_cache();
|
345 |
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=members' ) );
|
@@ -350,23 +347,35 @@ function wpforo_actions(){
|
|
350 |
if( isset($_POST['wpforo_features']) ){
|
351 |
check_admin_referer( 'wpforo-features' );
|
352 |
if( update_option('wpforo_features', $_POST['wpforo_features']) ){
|
353 |
-
|
354 |
}else{
|
355 |
-
|
356 |
}
|
357 |
wpforo_clean_cache();
|
358 |
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=features' ) );
|
359 |
exit();
|
360 |
}
|
361 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
##Theme options
|
363 |
if( isset($_POST['wpforo_theme_options']) && isset($_POST['wpforo_style_options']) ){
|
364 |
check_admin_referer( 'wpforo-settings-styles' );
|
365 |
-
|
366 |
-
|
367 |
update_option('wpforo_style_options', $_POST['wpforo_style_options']);
|
368 |
-
update_option('wpforo_theme_options',
|
369 |
-
|
370 |
wpforo_clean_cache();
|
371 |
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=styles' ) );
|
372 |
exit();
|
@@ -376,9 +385,9 @@ function wpforo_actions(){
|
|
376 |
if( isset($_POST['wpforo_subscribe_options']) ){
|
377 |
check_admin_referer( 'wpforo-settings-emails' );
|
378 |
if( update_option('wpforo_subscribe_options', $_POST['wpforo_subscribe_options']) ){
|
379 |
-
|
380 |
}else{
|
381 |
-
|
382 |
}
|
383 |
wpforo_clean_cache();
|
384 |
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=emails' ) );
|
@@ -391,7 +400,7 @@ function wpforo_actions(){
|
|
391 |
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-forums' ){
|
392 |
|
393 |
if(!current_user_can('administrator')){
|
394 |
-
|
395 |
wp_redirect(admin_url());
|
396 |
exit();
|
397 |
}
|
@@ -399,12 +408,12 @@ function wpforo_actions(){
|
|
399 |
if( isset($_POST['wpforo_submit']) && isset($_REQUEST['forum']) && isset($_GET['action']) ){
|
400 |
check_admin_referer( 'wpforo-forum-addedit' );
|
401 |
if( $_GET['action'] == 'add' ){
|
402 |
-
if( $forumid =
|
403 |
wp_redirect( admin_url( 'admin.php?page=wpforo-forums' ) );
|
404 |
exit();
|
405 |
}
|
406 |
}elseif( $_GET['action'] == 'edit' && isset($_GET['id']) ){
|
407 |
-
$forumid =
|
408 |
}
|
409 |
if( isset($forumid) && $forumid ){
|
410 |
wp_redirect( admin_url( 'admin.php?page=wpforo-forums&id=' . intval($forumid) . '&action=edit' ) );
|
@@ -417,9 +426,9 @@ function wpforo_actions(){
|
|
417 |
if(isset($_POST['wpforo_delete']) && $_GET['action'] == 'del' && isset($_REQUEST['forum']['delete'])){
|
418 |
check_admin_referer( 'wpforo-forum-delete' );
|
419 |
if( intval($_REQUEST['forum']['delete']) == 1 ){
|
420 |
-
|
421 |
}elseif( intval($_REQUEST['forum']['delete']) == 0 ){
|
422 |
-
|
423 |
}
|
424 |
wp_redirect( admin_url( 'admin.php?page=wpforo-forums' ) );
|
425 |
exit();
|
@@ -427,7 +436,7 @@ function wpforo_actions(){
|
|
427 |
|
428 |
if(isset($_POST['forums_hierarchy_submit'])){
|
429 |
check_admin_referer( 'wpforo-forums-hierarchy' );
|
430 |
-
|
431 |
wpforo_clean_cache(0, 'forum');
|
432 |
wp_redirect( admin_url( 'admin.php?page=wpforo-forums' ) );
|
433 |
exit();
|
@@ -437,8 +446,8 @@ function wpforo_actions(){
|
|
437 |
##Moderation
|
438 |
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-moderations' ){
|
439 |
|
440 |
-
if(
|
441 |
-
|
442 |
wp_redirect(admin_url());
|
443 |
exit();
|
444 |
}
|
@@ -466,7 +475,7 @@ function wpforo_actions(){
|
|
466 |
}else{
|
467 |
!check_admin_referer( 'wpforo_admin_table_action_delete' );
|
468 |
}
|
469 |
-
foreach ($pids as $pid)
|
470 |
wp_redirect(admin_url('admin.php?page=wpforo-moderations'));
|
471 |
exit();
|
472 |
} elseif ($u_action == 'approve') {
|
@@ -477,14 +486,15 @@ function wpforo_actions(){
|
|
477 |
}
|
478 |
foreach ($pids as $pid) {
|
479 |
if( $pid ){
|
480 |
-
|
481 |
//Email Notification ////////////////////////////////////////////////////////////
|
482 |
-
$post =
|
483 |
wpforo_clean_cache($pid, 'post', $post);
|
484 |
if( !empty($post) && isset($post['is_first_post']) && $post['is_first_post'] ){
|
485 |
-
|
486 |
-
|
487 |
-
|
|
|
488 |
wpforo_forum_subscribers_mail_sender( $topic );
|
489 |
}
|
490 |
}
|
@@ -501,7 +511,7 @@ function wpforo_actions(){
|
|
501 |
!check_admin_referer( 'wpforo_admin_table_action_approve' );
|
502 |
}
|
503 |
foreach ($pids as $pid) {
|
504 |
-
|
505 |
wpforo_clean_cache($pid, 'post');
|
506 |
}
|
507 |
wp_redirect(admin_url('admin.php?page=wpforo-moderations'));
|
@@ -514,21 +524,21 @@ function wpforo_actions(){
|
|
514 |
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-phrases' ){
|
515 |
|
516 |
if(!current_user_can('administrator')){
|
517 |
-
|
518 |
wp_redirect(admin_url());
|
519 |
exit();
|
520 |
}
|
521 |
|
522 |
if(isset($_POST['phrase']['save'])){
|
523 |
check_admin_referer( 'wpforo-phrases-edit' );
|
524 |
-
|
525 |
wp_redirect( admin_url( 'admin.php?page=wpforo-phrases' ) );
|
526 |
exit();
|
527 |
}
|
528 |
|
529 |
if( isset($_POST['phrase']['add']) && !empty($_POST['phrase']['value']) ){
|
530 |
check_admin_referer( 'wpforo-phrase-add' );
|
531 |
-
|
532 |
wp_redirect( admin_url( 'admin.php?page=wpforo-phrases' ) );
|
533 |
exit();
|
534 |
}
|
@@ -552,7 +562,7 @@ function wpforo_actions(){
|
|
552 |
$ids = explode(',', urldecode($ids));
|
553 |
$uids = array_map('intval', array_filter($ids));
|
554 |
}
|
555 |
-
$uids = array_diff($uids, (array)
|
556 |
|
557 |
if( $u_action && !empty($uids) ){
|
558 |
|
@@ -567,14 +577,14 @@ function wpforo_actions(){
|
|
567 |
}else{
|
568 |
!check_admin_referer( 'wpforo_admin_table_action_ban' );
|
569 |
}
|
570 |
-
foreach($uids as $uid)
|
571 |
}elseif($u_action == 'unban'){
|
572 |
if( $bulk ){
|
573 |
!check_admin_referer( 'bulk_action_member' );
|
574 |
}else{
|
575 |
!check_admin_referer( 'wpforo_admin_table_action_ban' );
|
576 |
}
|
577 |
-
foreach($uids as $uid)
|
578 |
}
|
579 |
wpforo_clean_cache(0, 'user');
|
580 |
wp_redirect( admin_url( 'admin.php?page=wpforo-members' ) );
|
@@ -587,7 +597,7 @@ function wpforo_actions(){
|
|
587 |
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-usergroups' ){
|
588 |
|
589 |
if(!current_user_can('administrator')){
|
590 |
-
|
591 |
wp_redirect(admin_url());
|
592 |
exit();
|
593 |
}
|
@@ -599,7 +609,8 @@ function wpforo_actions(){
|
|
599 |
$insert_usergroup_name = sanitize_text_field($_POST['usergroup']['name']);
|
600 |
$insert_usergroup_role = sanitize_text_field($_POST['usergroup']['role']);
|
601 |
$insert_usergroup_access = sanitize_text_field($_POST['usergroup']['access']);
|
602 |
-
|
|
|
603 |
if(isset($$insert_usergroup_id)) wpforo_clean_cache( $insert_usergroup_id, 'loop' );
|
604 |
wp_redirect( admin_url( 'admin.php?page=wpforo-usergroups' ) );
|
605 |
exit();
|
@@ -607,8 +618,9 @@ function wpforo_actions(){
|
|
607 |
$insert_usergroup_id = intval($_GET['gid']);
|
608 |
$insert_usergroup_name = sanitize_text_field($_POST['usergroup']['name']);
|
609 |
$insert_usergroup_role = sanitize_text_field($_POST['usergroup']['role']);
|
610 |
-
$
|
611 |
-
|
|
|
612 |
wp_redirect( admin_url( 'admin.php?page=wpforo-usergroups' ) );
|
613 |
exit();
|
614 |
}
|
@@ -616,7 +628,7 @@ function wpforo_actions(){
|
|
616 |
}
|
617 |
if(isset($_GET['action']) && $_GET['action']=='del' && isset($_POST['usergroup']['submit']) && $_POST['usergroup']['submit'] == 'Delete'){
|
618 |
check_admin_referer( 'wpforo-usergroup-delete' );
|
619 |
-
|
620 |
wpforo_clean_cache(0, 'user');
|
621 |
wp_redirect( admin_url( 'admin.php?page=wpforo-usergroups' ) );
|
622 |
exit();
|
@@ -633,7 +645,7 @@ function wpforo_actions(){
|
|
633 |
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-settings' && isset($_GET['tab']) && $_GET['tab'] == 'accesses' ){
|
634 |
|
635 |
if(!current_user_can('administrator')){
|
636 |
-
|
637 |
wp_redirect(admin_url());
|
638 |
exit();
|
639 |
}
|
@@ -642,7 +654,7 @@ function wpforo_actions(){
|
|
642 |
check_admin_referer( 'wpforo-access-addedit' );
|
643 |
$cans = ( isset($_POST['cans'] ) ? $_POST['cans'] : array() );
|
644 |
$insert_access_name = sanitize_text_field($_POST['access']['name']);
|
645 |
-
|
646 |
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=accesses' ) );
|
647 |
exit();
|
648 |
}elseif( isset( $_POST['access'] ) && $_POST['access']['action'] == 'edit' ){
|
@@ -650,20 +662,20 @@ function wpforo_actions(){
|
|
650 |
$cans = ( isset($_POST['cans'] ) ? $_POST['cans'] : array() );
|
651 |
$insert_access_key = sanitize_text_field($_POST['access']['key']);
|
652 |
$insert_access_name = sanitize_text_field($_POST['access']['name']);
|
653 |
-
|
654 |
wpforo_clean_cache(0, 'loop');
|
655 |
wp_redirect( wpforo_get_request_uri() );
|
656 |
exit();
|
657 |
}elseif( isset($_GET['action']) && $_GET['action'] == 'del' && isset($_GET['accessid']) ){
|
658 |
|
659 |
if( !check_admin_referer( 'wpforo_access_delete' )){
|
660 |
-
|
661 |
wp_redirect(admin_url());
|
662 |
exit();
|
663 |
}
|
664 |
|
665 |
$insert_access_id = intval($_GET['accessid']);
|
666 |
-
|
667 |
wpforo_clean_cache(0, 'loop');
|
668 |
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=accesses' ) );
|
669 |
exit();
|
@@ -674,7 +686,7 @@ function wpforo_actions(){
|
|
674 |
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-themes' && isset($_GET['theme']) ){
|
675 |
|
676 |
if(!current_user_can('administrator')){
|
677 |
-
|
678 |
wp_redirect(admin_url());
|
679 |
exit();
|
680 |
}
|
@@ -685,16 +697,16 @@ function wpforo_actions(){
|
|
685 |
$new_theme = get_option( 'wpforo_theme_archive_' . $theme );
|
686 |
}
|
687 |
elseif( $_GET['action'] == 'install' || $_GET['action'] == 'reset' ){
|
688 |
-
$new_theme =
|
689 |
if( $_GET['action'] == 'reset' ){
|
690 |
delete_option( 'wpforo_theme_archive_' . $theme );
|
691 |
}
|
692 |
}
|
693 |
-
$current_theme =
|
694 |
if( !empty($new_theme) ){
|
695 |
update_option( 'wpforo_theme_options', $new_theme );
|
696 |
if( $_GET['action'] != 'reset' ){
|
697 |
-
update_option( 'wpforo_theme_archive_' .
|
698 |
}
|
699 |
}
|
700 |
wp_redirect( admin_url( 'admin.php?page=wpforo-themes' ) );
|
@@ -717,7 +729,9 @@ function wpforo_actions(){
|
|
717 |
$topic_rss_items = 10;
|
718 |
|
719 |
if( $_GET['forum'] == 'g' ){
|
720 |
-
$forum = array(
|
|
|
|
|
721 |
}
|
722 |
else{
|
723 |
$forumid = intval($_GET['forum']);
|
@@ -727,39 +741,41 @@ function wpforo_actions(){
|
|
727 |
|
728 |
if(isset($_GET['topic']) && $_GET['topic']){
|
729 |
if( $_GET['topic'] == 'g' ){
|
730 |
-
$posts =
|
|
|
|
|
731 |
}
|
732 |
else{
|
733 |
$topicid = intval($_GET['topic']);
|
734 |
-
$topic = wpforo_topic($topicid);
|
735 |
-
$topic['topicurl'] = ( $topic['url'] ) ? $topic['url'] :
|
736 |
-
$posts =
|
737 |
}
|
738 |
foreach($posts as $key => $post){
|
739 |
$member = wpforo_member( $post );
|
740 |
$posts[$key]['description'] = wpforo_text( trim(strip_tags($post['body'])), 190, false );
|
741 |
$posts[$key]['content'] = trim($post['body']);
|
742 |
-
$posts[$key]['posturl'] =
|
743 |
$posts[$key]['author'] = $member['display_name'];
|
744 |
}
|
745 |
-
|
746 |
}
|
747 |
else{
|
748 |
if( $_GET['forum'] == 'g' ){
|
749 |
-
$topics =
|
750 |
}
|
751 |
else{
|
752 |
-
$topics =
|
753 |
}
|
754 |
foreach($topics as $key => $topic){
|
755 |
$post = wpforo_post($topic['first_postid']);
|
756 |
$member = wpforo_member($topic);
|
757 |
$topics[$key]['description'] = wpforo_text( trim(strip_tags($post['body'])), 190, false );
|
758 |
$topics[$key]['content'] = trim($post['body']);
|
759 |
-
$topics[$key]['topicurl'] =
|
760 |
$topics[$key]['author'] = $member['display_name'];
|
761 |
}
|
762 |
-
|
763 |
}
|
764 |
exit();
|
765 |
}
|
@@ -768,7 +784,7 @@ function wpforo_actions(){
|
|
768 |
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-tools' ){
|
769 |
|
770 |
if(!current_user_can('administrator')){
|
771 |
-
|
772 |
wp_redirect(admin_url());
|
773 |
exit();
|
774 |
}
|
@@ -776,7 +792,7 @@ function wpforo_actions(){
|
|
776 |
if( isset($_POST['wpforo_tools_antispam']) ){
|
777 |
check_admin_referer( 'wpforo-tools-antispam' );
|
778 |
if( update_option('wpforo_tools_antispam', $_POST['wpforo_tools_antispam']) ){
|
779 |
-
|
780 |
}
|
781 |
wp_redirect( admin_url( 'admin.php?page=wpforo-tools&tab=antispam' ) );
|
782 |
exit();
|
@@ -785,12 +801,21 @@ function wpforo_actions(){
|
|
785 |
if( isset($_POST['wpforo_tools_cleanup']) ){
|
786 |
check_admin_referer( 'wpforo-tools-cleanup' );
|
787 |
if( update_option('wpforo_tools_cleanup', $_POST['wpforo_tools_cleanup']) ){
|
788 |
-
|
789 |
}
|
790 |
wp_redirect( admin_url( 'admin.php?page=wpforo-tools&tab=cleanup' ) );
|
791 |
exit();
|
792 |
}
|
793 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
794 |
if(isset($_GET['action']) && $_GET['action']=='delete-spam-file' && isset($_GET['sfname']) && $_GET['sfname']){
|
795 |
$filename = sanitize_file_name($_GET['sfname']);
|
796 |
if(check_admin_referer( 'wpforo_tools_antispam_files')){
|
@@ -800,11 +825,11 @@ function wpforo_actions(){
|
|
800 |
$upload_dir = wp_upload_dir();
|
801 |
$default_attachments_dir = $upload_dir['basedir'] . '/wpforo/default_attachments/';
|
802 |
$file = $default_attachments_dir . $filename;
|
803 |
-
$attachmentid =
|
804 |
if ( !wp_delete_attachment( $attachmentid ) ){
|
805 |
@unlink($file);
|
806 |
}
|
807 |
-
|
808 |
wp_redirect( admin_url( 'admin.php?page=wpforo-tools&tab=antispam' ) );
|
809 |
exit();
|
810 |
}
|
@@ -823,16 +848,16 @@ function wpforo_actions(){
|
|
823 |
while (false !== ($filename = readdir($handle))){
|
824 |
$level = 0;
|
825 |
if( $filename == '.' || $filename == '..') continue;
|
826 |
-
if( !$level =
|
827 |
if( $delete_level == $level ){
|
828 |
-
$attachmentid =
|
829 |
if ( !wp_delete_attachment( $attachmentid ) ){
|
830 |
$file = $default_attachments_dir . $filename; @unlink($file);
|
831 |
}
|
832 |
}
|
833 |
}
|
834 |
closedir($handle);
|
835 |
-
|
836 |
wp_redirect( admin_url( 'admin.php?page=wpforo-tools&tab=antispam' ) );
|
837 |
exit();
|
838 |
}
|
3 |
if( !defined( 'ABSPATH' ) ) exit;
|
4 |
|
5 |
function wpforo_actions(){
|
|
|
|
|
|
|
6 |
do_action( 'wpforo_actions' );
|
7 |
|
8 |
+
if( isset($_POST['wpfreg']) && !empty($_POST['wpfreg']) && $userid = WPF()->member->create($_POST['wpfreg'])){
|
9 |
wpforo_verify_form('ref');
|
10 |
+
WPF()->member->reset($userid);
|
11 |
+
wp_redirect( WPF()->member->get_profile_url( $userid, 'account' ) );
|
12 |
exit();
|
13 |
}
|
14 |
|
18 |
$wpf_login_times = get_user_meta($user->ID, '_wpf_login_times', true);
|
19 |
if( isset($user->ID) && $wpf_login_times >= 1) {
|
20 |
$name = ( isset($user->data->display_name) ) ? $user->data->display_name : '';
|
21 |
+
WPF()->notice->add( 'Welcome back %s!', 'success', $name);
|
|
|
22 |
}
|
23 |
else{
|
24 |
+
WPF()->notice->add('Welcome to our Community!', 'success');
|
25 |
}
|
26 |
(int)$wpf_login_times++;
|
27 |
update_user_meta( $user->ID, '_wpf_login_times', $wpf_login_times );
|
30 |
}else{
|
31 |
$args = array();
|
32 |
foreach($user->errors as $u_err) $args[] = $u_err[0];
|
33 |
+
WPF()->notice->add($args, 'error');
|
34 |
wp_redirect( wpforo_get_request_uri() );
|
35 |
exit();
|
36 |
}
|
37 |
}
|
38 |
|
39 |
+
extract(WPF()->current_object, EXTR_OVERWRITE);
|
40 |
|
41 |
+
if( in_array( $template, array('profile', 'account', 'activity', 'subscriptions') ) && !isset($user_nicename) && !isset($userid) ){
|
42 |
wp_redirect( wpforo_home_url() );
|
43 |
exit();
|
44 |
}
|
47 |
if(isset($_POST['member']['userid']) && $_POST['member']['userid']){
|
48 |
wpforo_verify_form();
|
49 |
|
50 |
+
if( !( intval($_POST['member']['userid']) == WPF()->current_userid ||
|
51 |
+
( WPF()->perm->usergroup_can('em') && WPF()->perm->user_can_manage_user( WPF()->current_userid, intval($_POST['member']['userid']) )) ) ){
|
52 |
+
WPF()->notice->clear();
|
53 |
+
WPF()->notice->add('Permission denied', 'error');
|
54 |
wp_redirect(wpforo_get_request_uri());
|
55 |
exit();
|
56 |
}
|
57 |
|
58 |
+
$edit_response = WPF()->member->edit();
|
59 |
+
if( isset($_POST['member']['avatar_type']) && $_POST['member']['avatar_type'] == 'custom' ) WPF()->member->upload_avatar();
|
60 |
|
61 |
if( isset($_POST['member']['old_pass'])
|
62 |
&& isset($_POST['member']['user_pass1'])
|
63 |
&& isset($_POST['member']['user_pass2'])
|
64 |
&& $_POST['member']['user_pass1'] && $_POST['member']['user_pass2'] && $_POST['member']['old_pass'] ){
|
65 |
if( $_POST['member']['user_pass1'] == $_POST['member']['user_pass2'] ){
|
66 |
+
WPF()->member->change_password($_POST['member']['old_pass'], $_POST['member']['user_pass1'], $_POST['member']['userid']);
|
67 |
}else{
|
68 |
+
WPF()->notice->clear();
|
69 |
+
WPF()->notice->add('New Passwords do not match', 'error');
|
70 |
}
|
71 |
}
|
72 |
|
73 |
+
WPF()->member->reset(intval($_POST['member']['userid']));
|
74 |
+
if( $edit_response && $profile_url = WPF()->member->get_profile_url( sanitize_title($_POST['member']['user_nicename']), 'account') ){
|
75 |
wp_redirect($profile_url);
|
76 |
exit();
|
77 |
}
|
83 |
if( isset($_POST['topic']['save']) && isset($_REQUEST['topic']['action']) ){
|
84 |
if( $_REQUEST['topic']['action'] == 'add' ){
|
85 |
wpforo_verify_form();
|
86 |
+
if( $topicid = WPF()->topic->add() ){
|
87 |
+
wp_redirect( WPF()->topic->get_topic_url($topicid) );
|
88 |
exit();
|
89 |
}
|
90 |
}elseif( $_REQUEST['topic']['action'] == 'edit' ){
|
91 |
wpforo_verify_form();
|
92 |
+
if( $topicid = WPF()->topic->edit() ){
|
93 |
+
wp_redirect( WPF()->topic->get_topic_url($topicid) );
|
94 |
exit();
|
95 |
}
|
96 |
}
|
102 |
if( $_POST['post']['save'] != 'move' && isset($_REQUEST['post']['action']) ){
|
103 |
if($_REQUEST['post']['action'] == 'add'){
|
104 |
wpforo_verify_form();
|
105 |
+
if( $postid = WPF()->post->add() ){
|
106 |
+
wp_redirect( WPF()->post->get_post_url( $postid ) );
|
107 |
exit();
|
108 |
}
|
109 |
}elseif($_REQUEST['post']['action'] == 'edit'){
|
110 |
wpforo_verify_form();
|
111 |
+
if( $postid = WPF()->post->edit() ){
|
112 |
+
wp_redirect( WPF()->post->get_post_url( $postid ) );
|
113 |
exit();
|
114 |
}
|
115 |
}
|
119 |
wpforo_verify_form();
|
120 |
$move_topicid = intval($_POST['movetopicid']);
|
121 |
$move_forumid = intval($_POST['topic']['forumid']);
|
122 |
+
WPF()->topic->move( $move_topicid, $move_forumid );
|
123 |
wp_redirect( wpforo_get_request_uri() );
|
124 |
exit();
|
125 |
}
|
132 |
if( isset($_GET['wpforo']) && ($_GET['wpforo'] == 'sbscrbconfirm' || $_GET['wpforo'] == 'unsbscrb') && isset($_GET['key']) && $_GET['key'] ){
|
133 |
$sbs_key = sanitize_text_field($_GET['key']);
|
134 |
if( $_GET['wpforo'] == 'sbscrbconfirm' ){
|
135 |
+
WPF()->sbscrb->edit($sbs_key);
|
136 |
}else{
|
137 |
+
WPF()->sbscrb->delete($sbs_key);
|
138 |
}
|
139 |
wp_redirect( wpforo_home_url( preg_replace('#\?.*$#is', '', wpforo_get_request_uri()) ) );
|
140 |
exit();
|
171 |
|
172 |
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-community' && isset($_GET['action']) && $_GET['action'] ){
|
173 |
if(!current_user_can('administrator')){
|
174 |
+
WPF()->notice->add('Permission denied', 'error');
|
175 |
wp_redirect(admin_url());
|
176 |
exit();
|
177 |
}
|
178 |
if( $_GET['action'] == 'synch' ){
|
179 |
+
if( function_exists('set_time_limit') ) set_time_limit( 3600 ); WPF()->member->synchronize_users();
|
180 |
wp_redirect(admin_url('admin.php?page=wpforo-community'));
|
181 |
exit();
|
182 |
}
|
186 |
exit();
|
187 |
}
|
188 |
if( $_GET['action'] == 'reset_fstat' && check_admin_referer( 'wpforo_reset_forums_stat' ) ){
|
189 |
+
$forums = WPF()->db->get_results("SELECT `forumid` FROM " . WPF()->db->prefix . "wpforo_forums ORDER BY `forumid` ASC", ARRAY_A);
|
190 |
if(!empty($forums)){
|
191 |
foreach($forums as $forum){
|
192 |
+
$topics = WPF()->db->get_var( "SELECT COUNT(*) as count FROM `" . WPF()->db->prefix . "wpforo_topics` WHERE `forumid` = " . intval($forum['forumid']) );
|
193 |
+
$posts = WPF()->db->get_var( "SELECT COUNT(*) as count FROM `" . WPF()->db->prefix . "wpforo_posts` WHERE `forumid` = " . intval($forum['forumid']) );
|
194 |
+
WPF()->db->query("UPDATE `" . WPF()->db->prefix . "wpforo_forums` SET `topics` = " . intval($topics) . ", `posts` = " . intval($posts) . " WHERE `forumid` = " . intval($forum['forumid']) );
|
195 |
+
WPF()->db->query("DELETE FROM `" . WPF()->db->prefix . "options` WHERE `option_name` LIKE 'wpforo_stat%'" );
|
196 |
}
|
197 |
+
WPF()->notice->add('Updated Successfully!', 'success');
|
198 |
}
|
199 |
}
|
200 |
if( $_GET['action'] == 'reset_ustat' && check_admin_referer( 'wpforo_reset_users_stat' ) ){
|
201 |
+
$users = WPF()->db->get_results("SELECT `userid` FROM " . WPF()->db->prefix . "wpforo_profiles ORDER BY `posts` DESC", ARRAY_A);
|
202 |
if(!empty($users)){
|
203 |
foreach($users as $user){
|
204 |
+
$questions = WPF()->member->get_questions_count( $user['userid'] );
|
205 |
+
$answers = WPF()->member->get_answers_count( $user['userid'] );
|
206 |
+
$posts = WPF()->member->get_replies_count( $user['userid'] );
|
207 |
+
$question_comments = WPF()->member->get_question_comments_count( $user['userid'] );
|
208 |
+
WPF()->db->query("UPDATE `" . WPF()->db->prefix . "wpforo_profiles`
|
209 |
SET `posts` = " . intval($posts) . ", `answers` = " . intval($answers) . ", `comments` = " . intval($question_comments) . ", `questions` = " . intval($questions) . "
|
210 |
WHERE `userid` = " . intval( $user['userid'] ) );
|
211 |
}
|
212 |
+
WPF()->notice->add('Updated Successfully!', 'success');
|
213 |
}
|
214 |
}
|
215 |
if( $_GET['action'] == 'reset_phrase_cache' && check_admin_referer( 'wpforo_reset_phrase_cache' ) ){
|
216 |
+
WPF()->phrase->clear_cache();
|
217 |
+
WPF()->notice->add('Deleted Successfully!', 'success');
|
218 |
}
|
219 |
if( $_GET['action'] == 'reset_user_cache' && check_admin_referer( 'wpforo_reset_user_cache' ) ){
|
220 |
+
WPF()->member->clear_db_cache();
|
221 |
+
WPF()->notice->add('Deleted Successfully!', 'success');
|
222 |
}
|
223 |
if( $_GET['action'] == 'reset_cache' && check_admin_referer( 'wpforo_reset_cache' ) ){
|
224 |
+
WPF()->phrase->clear_cache();
|
225 |
+
WPF()->member->clear_db_cache();
|
226 |
wpforo_clean_cache(0);
|
227 |
$current_time = time();
|
228 |
$month_ago = $current_time - 2592000;
|
229 |
+
WPF()->db->query("DELETE FROM `" . WPF()->db->prefix . "wpforo_views` WHERE `created` < " . intval($month_ago) );
|
230 |
+
WPF()->notice->add('Deleted Successfully!', 'success');
|
231 |
}
|
232 |
}
|
233 |
|
234 |
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-settings' ){
|
235 |
|
236 |
if(!current_user_can('administrator')){
|
237 |
+
WPF()->notice->add('Permission denied', 'error');
|
238 |
wp_redirect(admin_url());
|
239 |
exit();
|
240 |
}
|
258 |
|
259 |
if( update_option('wpforo_url', esc_url( home_url($permastruct) ) )
|
260 |
&& update_option('wpforo_permastruct', $permastruct) ){
|
261 |
+
WPF()->notice->add('Forum Base URL successfully updated', 'success');
|
262 |
}else{
|
263 |
+
WPF()->notice->add('Successfully updated', 'success');
|
264 |
}
|
265 |
|
266 |
+
WPF()->permastruct = $permastruct;
|
267 |
flush_rewrite_rules(FALSE);
|
268 |
nocache_headers();
|
269 |
}
|
270 |
|
271 |
if( $wpforo_use_home_url == 0 && !isset($_POST['wpforo_url']) ){
|
272 |
+
WPF()->permastruct = trim( get_wpf_option('wpforo_permastruct'), '/\\' );
|
273 |
+
WPF()->permastruct = preg_replace('#^/?index\.php/?#isu', '', WPF()->permastruct);
|
274 |
+
WPF()->permastruct = trim(WPF()->permastruct, '/\\');
|
275 |
+
WPF()->pageid = get_wpf_option( 'wpforo_pageid');
|
276 |
flush_rewrite_rules(FALSE);
|
277 |
nocache_headers();
|
278 |
}
|
279 |
|
280 |
if( update_option('wpforo_general_options', $_POST['wpforo_general_options']) ){
|
281 |
+
WPF()->notice->add('General options successfully updated', 'success');
|
282 |
}else{
|
283 |
+
WPF()->notice->add('Successfully updated', 'success');
|
284 |
}
|
285 |
|
286 |
+
WPF()->member->clear_db_cache();
|
287 |
wpforo_clean_cache();
|
288 |
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=general' ) );
|
289 |
exit();
|
292 |
##add new lang action
|
293 |
if( isset($_FILES['add_lang']) ){
|
294 |
check_admin_referer( 'wpforo-settings-language' );
|
295 |
+
WPF()->phrase->add_lang();
|
296 |
wpforo_clean_cache();
|
297 |
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=general' ) );
|
298 |
exit();
|
302 |
if( isset($_POST['wpforo_forum_options']) ){
|
303 |
check_admin_referer( 'wpforo-settings-forums' );
|
304 |
if( update_option('wpforo_forum_options', $_POST['wpforo_forum_options']) ){
|
305 |
+
WPF()->notice->add('Forum options successfully updated', 'success');
|
306 |
}else{
|
307 |
+
WPF()->notice->add('Forum options successfully updated, but previous value not changed', 'success');
|
308 |
}
|
309 |
wpforo_clean_cache();
|
310 |
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=forums' ) );
|
320 |
$_POST['wpforo_post_options']['dor_durr'] = intval($_POST['wpforo_post_options']['dor_durr']) * 60;
|
321 |
$_POST['wpforo_post_options']['max_upload_size'] = intval(wpforo_human_size_to_bytes($_POST['wpforo_post_options']['max_upload_size'].'M'));
|
322 |
if( update_option('wpforo_post_options', $_POST['wpforo_post_options']) ){
|
323 |
+
WPF()->notice->add('Post options successfully updated', 'success');
|
324 |
}else{
|
325 |
+
WPF()->notice->add('Post options successfully updated, but previous value not changed', 'success');
|
326 |
}
|
327 |
wpforo_clean_cache();
|
328 |
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=posts' ) );
|
334 |
check_admin_referer( 'wpforo-settings-members' );
|
335 |
$_POST['wpforo_member_options']['online_status_timeout'] = intval($_POST['wpforo_member_options']['online_status_timeout']) * 60;
|
336 |
if( update_option('wpforo_member_options', $_POST['wpforo_member_options']) ){
|
337 |
+
WPF()->notice->add('Member options successfully updated', 'success');
|
338 |
}else{
|
339 |
+
WPF()->notice->add('Member options successfully updated, but previous value not changed', 'success');
|
340 |
}
|
341 |
wpforo_clean_cache();
|
342 |
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=members' ) );
|
347 |
if( isset($_POST['wpforo_features']) ){
|
348 |
check_admin_referer( 'wpforo-features' );
|
349 |
if( update_option('wpforo_features', $_POST['wpforo_features']) ){
|
350 |
+
WPF()->notice->add('Features successfully updated', 'success');
|
351 |
}else{
|
352 |
+
WPF()->notice->add('Features successfully updated, but previous value not changed', 'success');
|
353 |
}
|
354 |
wpforo_clean_cache();
|
355 |
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=features' ) );
|
356 |
exit();
|
357 |
}
|
358 |
|
359 |
+
##APIs
|
360 |
+
if( isset($_POST['wpforo_api_options']) ){
|
361 |
+
check_admin_referer( 'wpforo-settings-api' );
|
362 |
+
if( update_option('wpforo_api_options', $_POST['wpforo_api_options']) ){
|
363 |
+
WPF()->notice->add('API options successfully updated', 'success');
|
364 |
+
}else{
|
365 |
+
WPF()->notice->add('API options successfully updated, but previous value not changed', 'success');
|
366 |
+
}
|
367 |
+
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=api' ) );
|
368 |
+
exit();
|
369 |
+
}
|
370 |
+
|
371 |
##Theme options
|
372 |
if( isset($_POST['wpforo_theme_options']) && isset($_POST['wpforo_style_options']) ){
|
373 |
check_admin_referer( 'wpforo-settings-styles' );
|
374 |
+
WPF()->tpl->options['style'] = sanitize_text_field($_POST['wpforo_theme_options']['style']);
|
375 |
+
WPF()->tpl->options['styles'] = $_POST['wpforo_theme_options']['styles'];
|
376 |
update_option('wpforo_style_options', $_POST['wpforo_style_options']);
|
377 |
+
update_option('wpforo_theme_options', WPF()->tpl->options);
|
378 |
+
WPF()->notice->add('Theme options successfully updated', 'success');
|
379 |
wpforo_clean_cache();
|
380 |
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=styles' ) );
|
381 |
exit();
|
385 |
if( isset($_POST['wpforo_subscribe_options']) ){
|
386 |
check_admin_referer( 'wpforo-settings-emails' );
|
387 |
if( update_option('wpforo_subscribe_options', $_POST['wpforo_subscribe_options']) ){
|
388 |
+
WPF()->notice->add('Subscribe options successfully updated', 'success');
|
389 |
}else{
|
390 |
+
WPF()->notice->add('Subscribe options successfully updated, but previous value not changed', 'success');
|
391 |
}
|
392 |
wpforo_clean_cache();
|
393 |
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=emails' ) );
|
400 |
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-forums' ){
|
401 |
|
402 |
if(!current_user_can('administrator')){
|
403 |
+
WPF()->notice->add('Permission denied', 'error');
|
404 |
wp_redirect(admin_url());
|
405 |
exit();
|
406 |
}
|
408 |
if( isset($_POST['wpforo_submit']) && isset($_REQUEST['forum']) && isset($_GET['action']) ){
|
409 |
check_admin_referer( 'wpforo-forum-addedit' );
|
410 |
if( $_GET['action'] == 'add' ){
|
411 |
+
if( $forumid = WPF()->forum->add() ){
|
412 |
wp_redirect( admin_url( 'admin.php?page=wpforo-forums' ) );
|
413 |
exit();
|
414 |
}
|
415 |
}elseif( $_GET['action'] == 'edit' && isset($_GET['id']) ){
|
416 |
+
$forumid = WPF()->forum->edit();
|
417 |
}
|
418 |
if( isset($forumid) && $forumid ){
|
419 |
wp_redirect( admin_url( 'admin.php?page=wpforo-forums&id=' . intval($forumid) . '&action=edit' ) );
|
426 |
if(isset($_POST['wpforo_delete']) && $_GET['action'] == 'del' && isset($_REQUEST['forum']['delete'])){
|
427 |
check_admin_referer( 'wpforo-forum-delete' );
|
428 |
if( intval($_REQUEST['forum']['delete']) == 1 ){
|
429 |
+
WPF()->forum->delete();
|
430 |
}elseif( intval($_REQUEST['forum']['delete']) == 0 ){
|
431 |
+
WPF()->forum->merge();
|
432 |
}
|
433 |
wp_redirect( admin_url( 'admin.php?page=wpforo-forums' ) );
|
434 |
exit();
|
436 |
|
437 |
if(isset($_POST['forums_hierarchy_submit'])){
|
438 |
check_admin_referer( 'wpforo-forums-hierarchy' );
|
439 |
+
WPF()->forum->update_hierarchy();
|
440 |
wpforo_clean_cache(0, 'forum');
|
441 |
wp_redirect( admin_url( 'admin.php?page=wpforo-forums' ) );
|
442 |
exit();
|
446 |
##Moderation
|
447 |
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-moderations' ){
|
448 |
|
449 |
+
if(!WPF()->perm->usergroup_can('aum')){
|
450 |
+
WPF()->notice->add('Permission denied', 'error');
|
451 |
wp_redirect(admin_url());
|
452 |
exit();
|
453 |
}
|
475 |
}else{
|
476 |
!check_admin_referer( 'wpforo_admin_table_action_delete' );
|
477 |
}
|
478 |
+
foreach ($pids as $pid) WPF()->post->delete($pid);
|
479 |
wp_redirect(admin_url('admin.php?page=wpforo-moderations'));
|
480 |
exit();
|
481 |
} elseif ($u_action == 'approve') {
|
486 |
}
|
487 |
foreach ($pids as $pid) {
|
488 |
if( $pid ){
|
489 |
+
WPF()->moderation->post_approve($pid);
|
490 |
//Email Notification ////////////////////////////////////////////////////////////
|
491 |
+
$post = WPF()->post->get_post($pid);
|
492 |
wpforo_clean_cache($pid, 'post', $post);
|
493 |
if( !empty($post) && isset($post['is_first_post']) && $post['is_first_post'] ){
|
494 |
+
wpforo_send_mail_to_mentioned_users( $post );
|
495 |
+
if( isset($post['topicid']) && $post['topicid'] ){
|
496 |
+
$topic = WPF()->topic->get_topic($post['topicid']);
|
497 |
+
if( !empty($topic) ){
|
498 |
wpforo_forum_subscribers_mail_sender( $topic );
|
499 |
}
|
500 |
}
|
511 |
!check_admin_referer( 'wpforo_admin_table_action_approve' );
|
512 |
}
|
513 |
foreach ($pids as $pid) {
|
514 |
+
WPF()->moderation->post_unapprove($pid);
|
515 |
wpforo_clean_cache($pid, 'post');
|
516 |
}
|
517 |
wp_redirect(admin_url('admin.php?page=wpforo-moderations'));
|
524 |
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-phrases' ){
|
525 |
|
526 |
if(!current_user_can('administrator')){
|
527 |
+
WPF()->notice->add('Permission denied', 'error');
|
528 |
wp_redirect(admin_url());
|
529 |
exit();
|
530 |
}
|
531 |
|
532 |
if(isset($_POST['phrase']['save'])){
|
533 |
check_admin_referer( 'wpforo-phrases-edit' );
|
534 |
+
WPF()->phrase->edit();
|
535 |
wp_redirect( admin_url( 'admin.php?page=wpforo-phrases' ) );
|
536 |
exit();
|
537 |
}
|
538 |
|
539 |
if( isset($_POST['phrase']['add']) && !empty($_POST['phrase']['value']) ){
|
540 |
check_admin_referer( 'wpforo-phrase-add' );
|
541 |
+
WPF()->phrase->add();
|
542 |
wp_redirect( admin_url( 'admin.php?page=wpforo-phrases' ) );
|
543 |
exit();
|
544 |
}
|
562 |
$ids = explode(',', urldecode($ids));
|
563 |
$uids = array_map('intval', array_filter($ids));
|
564 |
}
|
565 |
+
$uids = array_diff($uids, (array) WPF()->current_userid);
|
566 |
|
567 |
if( $u_action && !empty($uids) ){
|
568 |
|
577 |
}else{
|
578 |
!check_admin_referer( 'wpforo_admin_table_action_ban' );
|
579 |
}
|
580 |
+
foreach($uids as $uid) WPF()->member->ban($uid);
|
581 |
}elseif($u_action == 'unban'){
|
582 |
if( $bulk ){
|
583 |
!check_admin_referer( 'bulk_action_member' );
|
584 |
}else{
|
585 |
!check_admin_referer( 'wpforo_admin_table_action_ban' );
|
586 |
}
|
587 |
+
foreach($uids as $uid) WPF()->member->unban($uid);
|
588 |
}
|
589 |
wpforo_clean_cache(0, 'user');
|
590 |
wp_redirect( admin_url( 'admin.php?page=wpforo-members' ) );
|
597 |
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-usergroups' ){
|
598 |
|
599 |
if(!current_user_can('administrator')){
|
600 |
+
WPF()->notice->add('Permission denied', 'error');
|
601 |
wp_redirect(admin_url());
|
602 |
exit();
|
603 |
}
|
609 |
$insert_usergroup_name = sanitize_text_field($_POST['usergroup']['name']);
|
610 |
$insert_usergroup_role = sanitize_text_field($_POST['usergroup']['role']);
|
611 |
$insert_usergroup_access = sanitize_text_field($_POST['usergroup']['access']);
|
612 |
+
$insert_usergroup_color = ( isset($_POST['wpfugc']) && $_POST['wpfugc'] ) ? '' : sanitize_text_field($_POST['usergroup']['color']);
|
613 |
+
$insert_usergroup_id = WPF()->usergroup->add( $insert_usergroup_name, $board_cans, '', $insert_usergroup_role, $insert_usergroup_access, $insert_usergroup_color );
|
614 |
if(isset($$insert_usergroup_id)) wpforo_clean_cache( $insert_usergroup_id, 'loop' );
|
615 |
wp_redirect( admin_url( 'admin.php?page=wpforo-usergroups' ) );
|
616 |
exit();
|
618 |
$insert_usergroup_id = intval($_GET['gid']);
|
619 |
$insert_usergroup_name = sanitize_text_field($_POST['usergroup']['name']);
|
620 |
$insert_usergroup_role = sanitize_text_field($_POST['usergroup']['role']);
|
621 |
+
$insert_usergroup_color = ( isset($_POST['wpfugc']) && $_POST['wpfugc'] ) ? '' : sanitize_text_field($_POST['usergroup']['color']);
|
622 |
+
WPF()->usergroup->edit( $insert_usergroup_id, $insert_usergroup_name, $board_cans, '', $insert_usergroup_role, NULL, $insert_usergroup_color );
|
623 |
+
if(isset($insert_usergroup_id)) wpforo_clean_cache( $insert_usergroup_id, 'loop' );
|
624 |
wp_redirect( admin_url( 'admin.php?page=wpforo-usergroups' ) );
|
625 |
exit();
|
626 |
}
|
628 |
}
|
629 |
if(isset($_GET['action']) && $_GET['action']=='del' && isset($_POST['usergroup']['submit']) && $_POST['usergroup']['submit'] == 'Delete'){
|
630 |
check_admin_referer( 'wpforo-usergroup-delete' );
|
631 |
+
WPF()->usergroup->delete();
|
632 |
wpforo_clean_cache(0, 'user');
|
633 |
wp_redirect( admin_url( 'admin.php?page=wpforo-usergroups' ) );
|
634 |
exit();
|
645 |
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-settings' && isset($_GET['tab']) && $_GET['tab'] == 'accesses' ){
|
646 |
|
647 |
if(!current_user_can('administrator')){
|
648 |
+
WPF()->notice->add('Permission denied', 'error');
|
649 |
wp_redirect(admin_url());
|
650 |
exit();
|
651 |
}
|
654 |
check_admin_referer( 'wpforo-access-addedit' );
|
655 |
$cans = ( isset($_POST['cans'] ) ? $_POST['cans'] : array() );
|
656 |
$insert_access_name = sanitize_text_field($_POST['access']['name']);
|
657 |
+
WPF()->perm->add( $insert_access_name, $cans );
|
658 |
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=accesses' ) );
|
659 |
exit();
|
660 |
}elseif( isset( $_POST['access'] ) && $_POST['access']['action'] == 'edit' ){
|
662 |
$cans = ( isset($_POST['cans'] ) ? $_POST['cans'] : array() );
|
663 |
$insert_access_key = sanitize_text_field($_POST['access']['key']);
|
664 |
$insert_access_name = sanitize_text_field($_POST['access']['name']);
|
665 |
+
WPF()->perm->edit( $insert_access_name, $cans, $insert_access_key );
|
666 |
wpforo_clean_cache(0, 'loop');
|
667 |
wp_redirect( wpforo_get_request_uri() );
|
668 |
exit();
|
669 |
}elseif( isset($_GET['action']) && $_GET['action'] == 'del' && isset($_GET['accessid']) ){
|
670 |
|
671 |
if( !check_admin_referer( 'wpforo_access_delete' )){
|
672 |
+
WPF()->notice->add('Permission denied', 'error');
|
673 |
wp_redirect(admin_url());
|
674 |
exit();
|
675 |
}
|
676 |
|
677 |
$insert_access_id = intval($_GET['accessid']);
|
678 |
+
WPF()->perm->delete( $insert_access_id );
|
679 |
wpforo_clean_cache(0, 'loop');
|
680 |
wp_redirect( admin_url( 'admin.php?page=wpforo-settings&tab=accesses' ) );
|
681 |
exit();
|
686 |
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-themes' && isset($_GET['theme']) ){
|
687 |
|
688 |
if(!current_user_can('administrator')){
|
689 |
+
WPF()->notice->add('Permission denied', 'error');
|
690 |
wp_redirect(admin_url());
|
691 |
exit();
|
692 |
}
|
697 |
$new_theme = get_option( 'wpforo_theme_archive_' . $theme );
|
698 |
}
|
699 |
elseif( $_GET['action'] == 'install' || $_GET['action'] == 'reset' ){
|
700 |
+
$new_theme = WPF()->tpl->find_theme( $theme );
|
701 |
if( $_GET['action'] == 'reset' ){
|
702 |
delete_option( 'wpforo_theme_archive_' . $theme );
|
703 |
}
|
704 |
}
|
705 |
+
$current_theme = WPF()->tpl->options;
|
706 |
if( !empty($new_theme) ){
|
707 |
update_option( 'wpforo_theme_options', $new_theme );
|
708 |
if( $_GET['action'] != 'reset' ){
|
709 |
+
update_option( 'wpforo_theme_archive_' . WPF()->tpl->theme, $current_theme );
|
710 |
}
|
711 |
}
|
712 |
wp_redirect( admin_url( 'admin.php?page=wpforo-themes' ) );
|
729 |
$topic_rss_items = 10;
|
730 |
|
731 |
if( $_GET['forum'] == 'g' ){
|
732 |
+
$forum = array();
|
733 |
+
$forum['forumurl'] = '#';
|
734 |
+
$forum['title'] = '';
|
735 |
}
|
736 |
else{
|
737 |
$forumid = intval($_GET['forum']);
|
741 |
|
742 |
if(isset($_GET['topic']) && $_GET['topic']){
|
743 |
if( $_GET['topic'] == 'g' ){
|
744 |
+
$posts = WPF()->post->get_posts( array( 'row_count' => $topic_rss_items, 'orderby' => 'created', 'order' => 'DESC', 'check_private' => true ) );
|
745 |
+
$topic['title'] = '';
|
746 |
+
$topic['topicurl'] = '#';
|
747 |
}
|
748 |
else{
|
749 |
$topicid = intval($_GET['topic']);
|
750 |
+
$topic = wpforo_topic($topicid); //WPF()->topic->get_topic($topicid);
|
751 |
+
$topic['topicurl'] = ( $topic['url'] ) ? $topic['url'] : WPF()->topic->get_topic_url($topicid);
|
752 |
+
$posts = WPF()->post->get_posts( array( 'topicid' => $topicid, 'row_count' => $topic_rss_items, 'orderby' => 'created', 'order' => 'DESC', 'check_private' => true ) );
|
753 |
}
|
754 |
foreach($posts as $key => $post){
|
755 |
$member = wpforo_member( $post );
|
756 |
$posts[$key]['description'] = wpforo_text( trim(strip_tags($post['body'])), 190, false );
|
757 |
$posts[$key]['content'] = trim($post['body']);
|
758 |
+
$posts[$key]['posturl'] = WPF()->post->get_post_url( $post['postid'] );
|
759 |
$posts[$key]['author'] = $member['display_name'];
|
760 |
}
|
761 |
+
WPF()->feed->rss2_topic($forum, $topic, $posts);
|
762 |
}
|
763 |
else{
|
764 |
if( $_GET['forum'] == 'g' ){
|
765 |
+
$topics = WPF()->topic->get_topics( array( 'row_count' => $forum_rss_items, 'orderby' => 'created', 'order' => 'DESC' ) );
|
766 |
}
|
767 |
else{
|
768 |
+
$topics = WPF()->topic->get_topics( array( 'forumid' => $forumid, 'row_count' => $forum_rss_items, 'orderby' => 'created', 'order' => 'DESC' ) );
|
769 |
}
|
770 |
foreach($topics as $key => $topic){
|
771 |
$post = wpforo_post($topic['first_postid']);
|
772 |
$member = wpforo_member($topic);
|
773 |
$topics[$key]['description'] = wpforo_text( trim(strip_tags($post['body'])), 190, false );
|
774 |
$topics[$key]['content'] = trim($post['body']);
|
775 |
+
$topics[$key]['topicurl'] = WPF()->topic->get_topic_url($topic['topicid']);
|
776 |
$topics[$key]['author'] = $member['display_name'];
|
777 |
}
|
778 |
+
WPF()->feed->rss2_forum($forum, $topics);
|
779 |
}
|
780 |
exit();
|
781 |
}
|
784 |
if( wpforo_is_admin() && isset($_GET['page']) && $_GET['page'] == 'wpforo-tools' ){
|
785 |
|
786 |
if(!current_user_can('administrator')){
|
787 |
+
WPF()->notice->add('Permission denied', 'error');
|
788 |
wp_redirect(admin_url());
|
789 |
exit();
|
790 |
}
|
792 |
if( isset($_POST['wpforo_tools_antispam']) ){
|
793 |
check_admin_referer( 'wpforo-tools-antispam' );
|
794 |
if( update_option('wpforo_tools_antispam', $_POST['wpforo_tools_antispam']) ){
|
795 |
+
WPF()->notice->add('Settings successfully updated', 'success');
|
796 |
}
|
797 |
wp_redirect( admin_url( 'admin.php?page=wpforo-tools&tab=antispam' ) );
|
798 |
exit();
|
801 |
if( isset($_POST['wpforo_tools_cleanup']) ){
|
802 |
check_admin_referer( 'wpforo-tools-cleanup' );
|
803 |
if( update_option('wpforo_tools_cleanup', $_POST['wpforo_tools_cleanup']) ){
|
804 |
+
WPF()->notice->add('Settings successfully updated', 'success');
|
805 |
}
|
806 |
wp_redirect( admin_url( 'admin.php?page=wpforo-tools&tab=cleanup' ) );
|
807 |
exit();
|
808 |
}
|
809 |
|
810 |
+
if( isset($_POST['wpforo_tools_misc']) ){
|
811 |
+
check_admin_referer( 'wpforo-tools-misc' );
|
812 |
+
if( update_option('wpforo_tools_misc', $_POST['wpforo_tools_misc']) ){
|
813 |
+
WPF()->notice->add('Settings successfully updated', 'success');
|
814 |
+
}
|
815 |
+
wp_redirect( admin_url( 'admin.php?page=wpforo-tools&tab=misc' ) );
|
816 |
+
exit();
|
817 |
+
}
|
818 |
+
|
819 |
if(isset($_GET['action']) && $_GET['action']=='delete-spam-file' && isset($_GET['sfname']) && $_GET['sfname']){
|
820 |
$filename = sanitize_file_name($_GET['sfname']);
|
821 |
if(check_admin_referer( 'wpforo_tools_antispam_files')){
|
825 |
$upload_dir = wp_upload_dir();
|
826 |
$default_attachments_dir = $upload_dir['basedir'] . '/wpforo/default_attachments/';
|
827 |
$file = $default_attachments_dir . $filename;
|
828 |
+
$attachmentid = WPF()->post->get_attachment_id( '/' . $filename );
|
829 |
if ( !wp_delete_attachment( $attachmentid ) ){
|
830 |
@unlink($file);
|
831 |
}
|
832 |
+
WPF()->notice->add( 'Deleted', 'success' );
|
833 |
wp_redirect( admin_url( 'admin.php?page=wpforo-tools&tab=antispam' ) );
|
834 |
exit();
|
835 |
}
|
848 |
while (false !== ($filename = readdir($handle))){
|
849 |
$level = 0;
|
850 |
if( $filename == '.' || $filename == '..') continue;
|
851 |
+
if( !$level = WPF()->moderation->spam_file($filename) ) continue;
|
852 |
if( $delete_level == $level ){
|
853 |
+
$attachmentid = WPF()->post->get_attachment_id( '/' . $filename );
|
854 |
if ( !wp_delete_attachment( $attachmentid ) ){
|
855 |
$file = $default_attachments_dir . $filename; @unlink($file);
|
856 |
}
|
857 |
}
|
858 |
}
|
859 |
closedir($handle);
|
860 |
+
WPF()->notice->add( 'Deleted', 'success' );
|
861 |
wp_redirect( admin_url( 'admin.php?page=wpforo-tools&tab=antispam' ) );
|
862 |
exit();
|
863 |
}
|
wpf-includes/wpf-hooks.php
CHANGED
@@ -26,8 +26,7 @@ function wpforo_action_link( $links, $file ) {
|
|
26 |
}
|
27 |
|
28 |
function wpforo_notice_show(){
|
29 |
-
|
30 |
-
$wpforo->notice->show();
|
31 |
}
|
32 |
add_action( 'wpforo_top_hook', 'wpforo_notice_show', 10, 0 );
|
33 |
|
@@ -38,10 +37,9 @@ add_action('init', 'wpforo_user_admin_bar');
|
|
38 |
|
39 |
function wpforo_admin_notice__menu_help(){
|
40 |
if(strpos(wpforo_get_request_uri(), 'nav-menus.php') !== FALSE){
|
41 |
-
|
42 |
-
|
43 |
$message = 'wpForo Menu Shortcodes<hr/><table>';
|
44 |
-
foreach(
|
45 |
$message .= "<tr><td> " . $value['label'] . ": </td><td> /%$key%/ </td></tr>";
|
46 |
}
|
47 |
$message .= "<tr><td> " . wpforo_phrase('register', FALSE) . ": </td><td> /%wpforo-register%/ </td></tr>
|
@@ -75,16 +73,14 @@ function wpforo_remove_comment_support() {
|
|
75 |
add_action('init', 'wpforo_remove_comment_support', 100);
|
76 |
|
77 |
function wpforo_change_author_default_page( $link ){
|
78 |
-
|
79 |
-
|
80 |
-
return $wpforo->member->get_profile_url($link);
|
81 |
}
|
82 |
function wpforo_change_comment_author_default_page( $link, $ID = 0, $object = NULL ){
|
83 |
-
|
84 |
-
if(!wpforo_feature('comment-author-link', $wpforo)) return $link;
|
85 |
if(!isset($link) || !$link){
|
86 |
if(isset($object->user_id) && $object->user_id){
|
87 |
-
return
|
88 |
}
|
89 |
}
|
90 |
return $link;
|
@@ -105,28 +101,25 @@ function wpforo_change_default_login_page( $login_url, $redirect ) {
|
|
105 |
add_filter( 'login_url', 'wpforo_change_default_login_page', 10, 2 );
|
106 |
|
107 |
function wpftpl( $filename ){
|
108 |
-
global $wpforo;
|
109 |
$find = array();
|
110 |
if ( $filename ) {
|
111 |
$find[] = 'wpforo/'. $filename;
|
112 |
$template = locate_template( array_unique( $find ) );
|
113 |
-
if ( !$template ) $template = WPFORO_THEME_DIR . '/'.
|
114 |
|
115 |
return apply_filters('wpforo_wpftpl', $template);
|
116 |
}
|
117 |
}
|
118 |
|
119 |
function wpforo_init_template(){
|
120 |
-
global $wpforo;
|
121 |
if(wpforo_is_admin()) return;
|
122 |
include_once( wpftpl('index.php') );
|
123 |
}
|
124 |
|
125 |
add_shortcode( 'wpforo', 'wpforo_load' );
|
126 |
function wpforo_load( $atts ){
|
127 |
-
if(wpforo_is_admin()) return;
|
128 |
-
|
129 |
-
|
130 |
if( is_wpforo_shortcode_page() ){
|
131 |
$url = wpforo_home_url();
|
132 |
|
@@ -139,26 +132,26 @@ function wpforo_load( $atts ){
|
|
139 |
if( $args['id'] || $args['slug'] ){
|
140 |
$getid = ( $args['slug'] ? $args['slug'] : $args['id'] );
|
141 |
if( $args['item'] == 'topic' ){
|
142 |
-
$url =
|
143 |
}elseif( $args['item'] == 'profile' ){
|
144 |
-
$url =
|
145 |
}else{
|
146 |
-
$url =
|
147 |
}
|
148 |
}
|
149 |
|
150 |
-
|
151 |
-
|
152 |
}
|
153 |
|
154 |
if(wpforo_feature('output-buffer') && function_exists('ob_start')){
|
155 |
-
if( wpforo_feature('html_cashe'
|
156 |
-
$html =
|
157 |
}
|
158 |
ob_start();
|
159 |
wpforo_init_template();
|
160 |
$output = ob_get_clean();
|
161 |
-
|
162 |
return $output;
|
163 |
}
|
164 |
else{
|
@@ -177,20 +170,18 @@ function wpforo_template_include($template){
|
|
177 |
add_action('wp', 'wpforo_set_header_status');
|
178 |
function wpforo_set_header_status(){
|
179 |
if( is_wpforo_page() ){
|
180 |
-
global $wp_query
|
181 |
|
182 |
-
$status = (
|
183 |
status_header( $status );
|
184 |
$wp_query->is_404 = FALSE;
|
185 |
}
|
186 |
}
|
187 |
|
188 |
function wpforo_do_rewrite(){
|
189 |
-
global $wpforo;
|
190 |
-
|
191 |
if( is_wpforo_page() ){
|
192 |
-
if(
|
193 |
-
add_rewrite_rule( '(.*)', 'index.php?page_id=' .
|
194 |
add_filter('template_include', 'wpforo_template_include');
|
195 |
}
|
196 |
}
|
@@ -198,14 +189,12 @@ function wpforo_do_rewrite(){
|
|
198 |
add_action('setup_theme', 'wpforo_do_rewrite');
|
199 |
|
200 |
function wpforo_rewrite_rules_array($rules){
|
201 |
-
|
202 |
-
|
203 |
-
$permastruct = utf8_uri_encode( $wpforo->permastruct );
|
204 |
$permastruct = preg_replace('#^/?index\.php/?#isu', '', $permastruct);
|
205 |
$permastruct = trim($permastruct, '/');
|
206 |
$pattern = '('.preg_quote($permastruct).'(?:/|$).*)$';
|
207 |
-
$to_url = 'index.php?page_id=' .
|
208 |
-
if(
|
209 |
|
210 |
return $rules;
|
211 |
}
|
@@ -228,49 +217,48 @@ function wpforo_theme_functions_wp(){
|
|
228 |
add_action('after_setup_theme', 'wpforo_theme_functions_wp');
|
229 |
|
230 |
function wpforo_meta_title($title) {
|
231 |
-
|
232 |
-
$is404 = false;
|
233 |
$meta_title = array();
|
234 |
|
235 |
-
if(!wpforo_feature('seo-title'
|
236 |
|
237 |
if(is_wpforo_page()){
|
238 |
-
$template =
|
239 |
-
if( ($template == 'post' &&
|
240 |
-
($template == 'topic' &&
|
241 |
-
($template == 'profile' &&
|
242 |
$is404 = true;
|
243 |
}
|
244 |
if(!$is404){
|
245 |
-
$paged = (
|
246 |
-
if(!empty(
|
247 |
-
if(!empty(
|
248 |
-
if(!empty(
|
249 |
-
if(isset($topic['title']) && isset($forum['title']) && isset(
|
250 |
-
$meta_title = array($topic['title'] . $paged, $forum['title'],
|
251 |
}
|
252 |
-
elseif(!isset($topic['title']) && isset($forum['title']) && isset(
|
253 |
-
$meta_title = array($forum['title'] . $paged,
|
254 |
}
|
255 |
elseif( $template != 'forum' && $template != 'topic' && $template != 'post' ){
|
256 |
if( $template == 'profile' || $template == 'account' || $template == 'activity' || $template == 'subscriptions' ){
|
257 |
if(isset($user['display_name'])){
|
258 |
-
$meta_title = array($user['display_name'], wpforo_phrase( ucfirst($template), false),
|
259 |
}
|
260 |
-
elseif(isset(
|
261 |
-
$meta_title = array(
|
262 |
}
|
263 |
else{
|
264 |
-
$meta_title = array(wpforo_phrase( 'Member', false), wpforo_phrase( ucfirst($template), false),
|
265 |
}
|
266 |
}
|
267 |
elseif( $template == 'recent' ){
|
268 |
$wpfpaged = ( isset($_GET['wpfpaged']) && $_GET['wpfpaged'] > 1 ) ? ' - ' . wpforo_phrase( 'page', false) . ' ' . $_GET['wpfpaged'] .' ' : '';
|
269 |
-
$meta_title = array( wpforo_phrase( 'Recent Posts', false) . $wpfpaged,
|
270 |
}
|
271 |
elseif($template){
|
272 |
$wpfpaged = ( isset($_GET['wpfpaged']) && $_GET['wpfpaged'] > 1 ) ? ' - ' . wpforo_phrase( 'page', false) . ' ' . $_GET['wpfpaged'] .' ' : '';
|
273 |
-
$meta_title = array(wpforo_phrase( ucfirst($template), false) . $wpfpaged,
|
274 |
}
|
275 |
elseif($title){
|
276 |
$meta_title = (is_array($title)) ? $title : array($title);
|
@@ -279,8 +267,8 @@ function wpforo_meta_title($title) {
|
|
279 |
$meta_title = array(wpforo_phrase('Forum', false), get_bloginfo('name'));
|
280 |
}
|
281 |
}
|
282 |
-
elseif( isset(
|
283 |
-
$meta_title = array(
|
284 |
}
|
285 |
elseif($title){
|
286 |
$meta_title = (is_array($title)) ? $title : array($title);
|
@@ -290,7 +278,7 @@ function wpforo_meta_title($title) {
|
|
290 |
}
|
291 |
}
|
292 |
else{
|
293 |
-
$meta_title = array(wpforo_phrase( '404 - Page not found', false),
|
294 |
}
|
295 |
}
|
296 |
if(!empty($meta_title)) {
|
@@ -313,9 +301,7 @@ function wpforo_meta_wp_title($title){
|
|
313 |
add_filter( 'wp_title', 'wpforo_meta_wp_title', 100);
|
314 |
|
315 |
function wpforo_add_meta_tags(){
|
316 |
-
|
317 |
-
|
318 |
-
if(!wpforo_feature('seo-meta', $wpforo)) return;
|
319 |
|
320 |
if(is_wpforo_page()){
|
321 |
$title = '';
|
@@ -325,43 +311,59 @@ function wpforo_add_meta_tags(){
|
|
325 |
$description = '';
|
326 |
$udata = array();
|
327 |
$canonical = wpforo_get_request_uri();
|
328 |
-
$
|
329 |
-
if(
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
335 |
if(isset($forum['title'])) $title = $forum['title'];
|
336 |
-
if(isset(
|
337 |
-
$description = $paged .
|
338 |
}
|
339 |
-
elseif(isset(
|
340 |
-
$description = $paged .
|
341 |
}
|
342 |
-
}elseif( isset(
|
343 |
-
$post =
|
344 |
$image = wpforo_get_image_url($post['body']);
|
345 |
if($image) $og_img = '<meta property="og:image" content="' . $image . '" />' . "\r\n";
|
346 |
if(isset($post['title'])) $title = wpforo_text($paged . $post['title'], 60, false);
|
347 |
if(isset($post['body'])) $description = wpforo_text($paged . $post['body'], 150, false);
|
348 |
}elseif( $template == 'profile' || $template == 'account' || $template == 'activity' || $template == 'subscriptions' ){
|
349 |
-
if( isset(
|
350 |
$udata['name'] = (isset($user['display_name']) && $user['display_name']) ? wpforo_phrase( 'User', false ) . ': ' . $user['display_name'] : '';
|
351 |
$udata['title'] = (isset($user['stat']['title']) && $user['stat']['title']) ? wpforo_phrase( 'Title', false ) . ': ' . $user['stat']['title'] : '';
|
352 |
$udata['about'] = (isset($user['about']) && $user['about']) ? wpforo_phrase( 'About', false ) . ': ' . wpforo_text($user['about'], 150, false) : '';
|
353 |
$description = $title . ' - ' . wpforo_phrase('Member Profile', false) . ' > ' . wpforo_phrase( ucfirst($template), false ) . ' ' . wpforo_phrase( 'Page', false ) . '. ' . implode(', ', $udata);
|
354 |
if(!wpforo_feature('seo-profile')){ $noindex = "<meta name=\"robots\" content=\"noindex\">\r\n"; }
|
355 |
-
}elseif(isset(
|
356 |
$wpfpaged = ( isset($_GET['wpfpaged']) && $_GET['wpfpaged'] > 1 ) ? wpforo_phrase( 'Page', false) . ' ' . $_GET['wpfpaged'] .' | ' : '';
|
357 |
$description = $wpfpaged . wpforo_phrase( 'Forum Members List', false);
|
358 |
-
}elseif(isset(
|
359 |
$wpfpaged = ( isset($_GET['wpfpaged']) && $_GET['wpfpaged'] > 1 ) ? wpforo_phrase( 'Page', false) . ' ' . $_GET['wpfpaged'] .' | ' : '';
|
360 |
$description = $wpfpaged . wpforo_phrase( 'Recent Posts', false);
|
361 |
}
|
362 |
else{
|
363 |
-
if( isset(
|
364 |
-
if( isset(
|
|
|
|
|
|
|
365 |
}
|
366 |
$description = preg_replace('#[\t\r\n]+#isu', ' ', $description);
|
367 |
echo "\r\n<!-- wpForo SEO -->\r\n" . $noindex . "<link rel=\"canonical\" href=\"".$canonical."\" />\r\n<meta name=\"description\" content=\"" . esc_html($description) . "\" />\r\n<meta property=\"og:title\" content=\"" . esc_html($title) . "\" />\r\n<meta property=\"og:description\" content=\"" . esc_html($description) . "\" />\r\n<meta property=\"og:url\" content=\"" . $canonical . "\" />\r\n". $og_img . "<meta property=\"og:site_name\" content=\"" . get_bloginfo('name') . "\" />\r\n<meta name=\"twitter:description\" content=\"" . esc_html($description) . "\"/>\r\n<meta name=\"twitter:title\" content=\"" . esc_html($title) . "\" />\r\n<!-- wpForo SEO End -->\r\n\r\n";
|
@@ -374,68 +376,66 @@ add_action('wp_head', 'wpforo_add_meta_tags', 1);
|
|
374 |
add_action('wp_ajax_wpforo_like_ajax', 'wpf_like');
|
375 |
|
376 |
function wpf_like(){
|
377 |
-
|
378 |
-
|
379 |
-
$response = array('stat' => 0, 'likers' => '', 'notice' => $wpforo->notice->get_notices());
|
380 |
if(!is_user_logged_in()){
|
381 |
-
|
382 |
-
$response['notice'] =
|
383 |
echo json_encode($response);
|
384 |
exit();
|
385 |
}
|
386 |
if( !isset($_POST['likestatus']) || !isset($_POST['postid']) || !($postid = intval($_POST['postid'])) ){
|
387 |
-
|
388 |
-
$response['notice'] =
|
389 |
echo json_encode($response);
|
390 |
exit();
|
391 |
}
|
392 |
-
if( !$post =
|
393 |
-
|
394 |
-
$response['notice'] =
|
395 |
echo json_encode($response);
|
396 |
exit();
|
397 |
}
|
398 |
-
if(
|
399 |
-
|
400 |
-
$response['notice'] =
|
401 |
echo json_encode($response);
|
402 |
exit();
|
403 |
}
|
404 |
if( $_POST['likestatus'] ){
|
405 |
-
if(
|
406 |
-
|
407 |
array(
|
408 |
'postid' => $postid,
|
409 |
-
'userid' =>
|
410 |
'post_userid' => $post['userid']
|
411 |
),
|
412 |
array('%d','%d','%d')
|
413 |
) ){
|
414 |
wpforo_clean_cache($postid, 'post-soft');
|
415 |
-
do_action('wpforo_like', $post,
|
416 |
-
|
417 |
$response['stat'] = 1;
|
418 |
-
$response['notice'] =
|
419 |
}
|
420 |
}else{
|
421 |
-
if(
|
422 |
-
|
423 |
array(
|
424 |
'postid' => $postid,
|
425 |
-
'userid' =>
|
426 |
),
|
427 |
array('%d','%d')
|
428 |
) ){
|
429 |
wpforo_clean_cache($postid, 'post-soft');
|
430 |
-
do_action('wpforo_dislike', $post,
|
431 |
-
|
432 |
$response['stat'] = 1;
|
433 |
-
$response['notice'] =
|
434 |
}
|
435 |
}
|
436 |
-
if(!isset($post['userid']))
|
437 |
-
if(!isset(
|
438 |
-
$response['likers'] =
|
439 |
echo json_encode($response);
|
440 |
exit();
|
441 |
}
|
@@ -446,29 +446,35 @@ function wpf_vote(){
|
|
446 |
|
447 |
if(!is_user_logged_in()) return;
|
448 |
|
449 |
-
global $wpforo;
|
450 |
-
|
451 |
if( !isset($_POST['postid']) || !$_POST['postid'] ){
|
452 |
-
|
453 |
-
echo json_encode(array('stat' => 0, 'notice' =>
|
454 |
exit();
|
455 |
}
|
456 |
-
|
457 |
-
|
458 |
-
|
|
|
|
|
|
|
|
|
459 |
exit();
|
460 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
461 |
|
462 |
-
$
|
463 |
-
|
464 |
-
$postid = intval($_POST['postid']);
|
465 |
-
$post = $wpforo->post->get_post( $postid );
|
466 |
|
467 |
-
$voted =
|
468 |
-
|
469 |
array(
|
470 |
'postid' => $postid,
|
471 |
-
'userid' =>
|
472 |
'reaction' => $reaction,
|
473 |
'post_userid' => $post['userid']
|
474 |
),
|
@@ -480,72 +486,70 @@ function wpf_vote(){
|
|
480 |
)
|
481 |
);
|
482 |
|
483 |
-
if(!isset($post['userid']))
|
484 |
-
if(!isset(
|
485 |
|
486 |
if( $voted !== FALSE ){
|
|
|
|
|
487 |
if( $_POST['itemtype'] == 'topic' ){
|
488 |
-
$incr =
|
489 |
-
$incr2 = $wpforo->db->query( "UPDATE ".$wpforo->db->prefix . 'wpforo_posts'." SET `votes` = `votes` + $reaction WHERE postid = " . intval($post['postid']) );
|
490 |
-
}else{
|
491 |
-
$incr = $wpforo->db->query( "UPDATE ".$wpforo->db->prefix . 'wpforo_posts'." SET `votes` = `votes` + $reaction WHERE postid = " . intval($post['postid']) );
|
492 |
-
$incr2 = TRUE;
|
493 |
}
|
494 |
-
|
495 |
-
|
|
|
496 |
wpforo_clean_cache($postid, 'post', $post);
|
497 |
-
do_action('wpforo_vote', $reaction, $post,
|
498 |
-
|
499 |
-
echo json_encode(array('stat' => 1, 'notice' =>
|
500 |
exit();
|
501 |
}
|
502 |
}
|
503 |
|
504 |
-
|
505 |
-
echo json_encode(array('stat' => 0, 'notice' =>
|
506 |
exit();
|
507 |
}
|
508 |
|
509 |
add_action('wp_ajax_wpforo_answer_ajax', 'wpf_answer');
|
510 |
function wpf_answer(){
|
511 |
-
|
512 |
-
$response = array('stat' => 0, 'notice' => $wpforo->notice->get_notices());
|
513 |
if(!is_user_logged_in()){
|
514 |
-
|
515 |
-
$response['notice'] =
|
516 |
echo json_encode($response);
|
517 |
exit();
|
518 |
}
|
519 |
if( !isset($_POST['answerstatus']) || !isset($_POST['postid']) || !$postid = intval($_POST['postid']) ){
|
520 |
-
|
521 |
-
$response['notice'] =
|
522 |
echo json_encode($response);
|
523 |
exit();
|
524 |
}
|
525 |
-
if( !$post =
|
526 |
-
|
527 |
-
$response['notice'] =
|
528 |
echo json_encode($response);
|
529 |
exit();
|
530 |
}
|
531 |
-
if( !$topic =
|
532 |
-
|
533 |
-
$response['notice'] =
|
534 |
echo json_encode($response);
|
535 |
exit();
|
536 |
}
|
537 |
-
if( !(
|
538 |
-
|
539 |
-
$response['notice'] =
|
540 |
echo json_encode($response);
|
541 |
exit();
|
542 |
}
|
543 |
-
if( FALSE !==
|
544 |
wpforo_clean_cache($postid, 'post', $post);
|
545 |
do_action('wpforo_answer', intval($_POST['answerstatus']), $post);
|
546 |
-
|
547 |
$response['stat'] = 1;
|
548 |
-
$response['notice'] =
|
549 |
}
|
550 |
echo json_encode($response);
|
551 |
exit();
|
@@ -556,9 +560,7 @@ function wpf_quote(){
|
|
556 |
|
557 |
if(!is_user_logged_in()) return;
|
558 |
|
559 |
-
|
560 |
-
|
561 |
-
$post = $wpforo->db->get_row('SELECT `userid`, `body` FROM '.$wpforo->db->prefix.'wpforo_posts WHERE postid =' . intval($_POST['postid']), ARRAY_A);
|
562 |
$post = apply_filters('wpforo_quote_post_ajax', $post);
|
563 |
$poster = wpforo_member( $post );
|
564 |
echo '<blockquote><div class="wpforo-post-quote-author"><strong>' . wpforo_phrase('Posted by', FALSE) . ': ' . ( $poster['display_name'] ? esc_textarea($poster['display_name']) : esc_textarea($poster['user_login']) ) . '</strong></div>' . wpautop($post['body']) . '</blockquote><br />';
|
@@ -570,23 +572,21 @@ function wpf_report(){
|
|
570 |
|
571 |
if(!is_user_logged_in()) return;
|
572 |
|
573 |
-
global $wpforo;
|
574 |
-
|
575 |
if( !isset($_POST['reportmsg']) || !$_POST['reportmsg'] || !isset($_POST['postid']) || !$_POST['postid'] ){
|
576 |
-
|
577 |
-
echo json_encode(
|
578 |
exit();
|
579 |
}
|
580 |
|
581 |
############### Sending Email ##################
|
582 |
$report_text = substr($_POST['reportmsg'], 0, 1000);
|
583 |
$postid = intval($_POST['postid']);
|
584 |
-
$reporter = '<a href="'
|
585 |
$reportmsg = wpforo_kses($report_text, 'email');
|
586 |
-
$post_url = '<a target="_blank" href="'. esc_attr(
|
587 |
|
588 |
-
$subject =
|
589 |
-
$message =
|
590 |
|
591 |
$from_tags = array("[reporter]", "[message]", "[post_url]");
|
592 |
$to_words = array(sanitize_text_field($reporter), $reportmsg, $post_url);
|
@@ -595,7 +595,7 @@ function wpf_report(){
|
|
595 |
$message = stripslashes(str_replace($from_tags, $to_words, $message));
|
596 |
|
597 |
$admin_email = get_option( 'admin_email' );
|
598 |
-
$admin_emails =
|
599 |
$admin_emails = trim($admin_emails);
|
600 |
$admin_emails = explode(',', $admin_emails);
|
601 |
$admin_emails = array_map('sanitize_email', $admin_emails);
|
@@ -607,14 +607,14 @@ function wpf_report(){
|
|
607 |
remove_filter( 'wp_mail_content_type', 'wpforo_set_html_content_type' );
|
608 |
}else{
|
609 |
remove_filter( 'wp_mail_content_type', 'wpforo_set_html_content_type' );
|
610 |
-
|
611 |
-
echo json_encode(
|
612 |
exit();
|
613 |
}
|
614 |
|
615 |
############### Sending Email end ##############
|
616 |
-
|
617 |
-
echo json_encode(
|
618 |
exit();
|
619 |
}
|
620 |
|
@@ -623,13 +623,12 @@ function wpf_sticky(){
|
|
623 |
if(!is_user_logged_in()) return;
|
624 |
|
625 |
if( !isset($_POST['postid']) || !( $p_id = intval($_POST['postid']) ) ){ echo 0; exit(); }
|
626 |
-
global $wpforo;
|
627 |
if( $_POST['status'] == 'sticky' ){
|
628 |
-
$sql = "UPDATE " .
|
629 |
-
|
630 |
}elseif( $_POST['status'] == 'unsticky' ){
|
631 |
-
$sql = "UPDATE "
|
632 |
-
|
633 |
}
|
634 |
wpforo_clean_cache($p_id, 'topic');
|
635 |
echo 1;
|
@@ -641,17 +640,16 @@ function wpf_private(){
|
|
641 |
if(!is_user_logged_in()) return;
|
642 |
|
643 |
if( !isset($_POST['postid']) || !( $p_id = intval($_POST['postid']) ) ){ echo 0; exit(); }
|
644 |
-
global $wpforo;
|
645 |
if( $_POST['status'] == 'private' ){
|
646 |
-
$sql = "UPDATE " .
|
647 |
-
|
648 |
-
$sql = "UPDATE " .
|
649 |
-
|
650 |
}elseif( $_POST['status'] == 'public' ){
|
651 |
-
$sql = "UPDATE "
|
652 |
-
|
653 |
-
$sql = "UPDATE "
|
654 |
-
|
655 |
}
|
656 |
wpforo_clean_cache();
|
657 |
echo 1;
|
@@ -663,14 +661,13 @@ function wpf_solved(){
|
|
663 |
if(!is_user_logged_in()) return;
|
664 |
|
665 |
if( !isset($_POST['postid']) || !( $p_id = intval($_POST['postid']) ) ){ echo 0; exit(); }
|
666 |
-
|
667 |
-
$post = $wpforo->post->get_post($_POST['postid']);
|
668 |
if( $_POST['status'] == 'solved' ){
|
669 |
-
$sql = "UPDATE " .
|
670 |
-
|
671 |
}elseif( $_POST['status'] == 'unsolved' ){
|
672 |
-
$sql = "UPDATE "
|
673 |
-
|
674 |
}
|
675 |
if( isset($post['topicid']) && $post['topicid'] ) wpforo_clean_cache($post['topicid'], 'topic');
|
676 |
echo 1;
|
@@ -682,24 +679,23 @@ function wpf_approved(){
|
|
682 |
if(!is_user_logged_in()) return;
|
683 |
|
684 |
if( !isset($_POST['postid']) || !( $p_id = intval($_POST['postid']) ) ){ echo 0; exit(); }
|
685 |
-
global $wpforo;
|
686 |
if( $_POST['status'] == 'approve' ){
|
687 |
-
$sql = "UPDATE " .
|
688 |
-
|
689 |
-
$sql = "SELECT is_first_post FROM " .
|
690 |
-
$is_first_post =
|
691 |
if( $is_first_post ){
|
692 |
-
$sql = "UPDATE " .
|
693 |
-
|
694 |
}
|
695 |
}elseif( $_POST['status'] == 'unapprove' ){
|
696 |
-
$sql = "UPDATE "
|
697 |
-
|
698 |
-
$sql = "SELECT is_first_post FROM " .
|
699 |
-
$is_first_post =
|
700 |
if( $is_first_post ){
|
701 |
-
$sql = "UPDATE " .
|
702 |
-
|
703 |
}
|
704 |
}
|
705 |
wpforo_clean_cache($p_id, 'post');
|
@@ -712,19 +708,18 @@ function wpf_close(){
|
|
712 |
if(!is_user_logged_in()) return;
|
713 |
|
714 |
if( !isset($_POST['postid']) || !( $p_id = intval($_POST['postid']) ) ){ echo 0; exit(); }
|
715 |
-
global $wpforo;
|
716 |
if( $_POST['status'] == 'closed' ){
|
717 |
-
$sql = "UPDATE "
|
718 |
-
|
719 |
wpforo_clean_cache($p_id, 'topic');
|
720 |
}elseif( $_POST['status'] == 'close' ){
|
721 |
-
$sql = "UPDATE "
|
722 |
-
|
723 |
wpforo_clean_cache($p_id, 'topic');
|
724 |
echo 1;
|
725 |
exit();
|
726 |
}
|
727 |
-
echo
|
728 |
exit();
|
729 |
}
|
730 |
|
@@ -733,12 +728,11 @@ function wpf_edit(){
|
|
733 |
if(!is_user_logged_in()) return;
|
734 |
|
735 |
if( !isset($_POST['postid']) || !$_POST['postid'] ){ echo 0; exit(); }
|
736 |
-
global $wpforo;
|
737 |
$sql = 'SELECT t.title AS topic_title, p.title AS post_title, p.`body`
|
738 |
-
FROM '
|
739 |
-
INNER JOIN '
|
740 |
WHERE p.postid =' . intval($_POST['postid']);
|
741 |
-
if($post =
|
742 |
$post = apply_filters('wpforo_edit_post_ajax', $post);
|
743 |
$post['body'] = wpautop($post['body']);
|
744 |
echo json_encode($post);
|
@@ -752,21 +746,19 @@ add_action('wp_ajax_wpforo_delete_ajax', 'wpf_delete');
|
|
752 |
function wpf_delete(){
|
753 |
if(!is_user_logged_in()) return;
|
754 |
|
755 |
-
global $wpforo;
|
756 |
-
|
757 |
$resp = array();
|
758 |
if( $_POST['status'] == 'topic' ){
|
759 |
-
if(
|
760 |
$resp = array(
|
761 |
'postid' => intval($_POST['postid']),
|
762 |
-
'location' =>
|
763 |
);
|
764 |
$return = 1;
|
765 |
}else{
|
766 |
$return = 0;
|
767 |
}
|
768 |
}elseif($_POST['status'] == 'reply'){
|
769 |
-
if(
|
770 |
$resp = array(
|
771 |
'postid' => intval($_POST['postid'])
|
772 |
);
|
@@ -777,7 +769,7 @@ function wpf_delete(){
|
|
777 |
}
|
778 |
|
779 |
$resp['stat'] = $return;
|
780 |
-
$resp['notice'] =
|
781 |
echo json_encode( $resp );
|
782 |
exit();
|
783 |
}
|
@@ -786,49 +778,47 @@ add_action('wp_ajax_wpforo_subscribe_ajax', 'wpf_subscribe');
|
|
786 |
function wpf_subscribe(){
|
787 |
if(!is_user_logged_in()) return FALSE;
|
788 |
|
789 |
-
global $wpforo;
|
790 |
-
|
791 |
$args = array(
|
792 |
'itemid' => intval($_POST['itemid']),
|
793 |
'type' => sanitize_text_field($_POST['type']),
|
794 |
-
'userid' => intval(
|
795 |
);
|
796 |
|
797 |
if(isset($_POST['status']) && $_POST['status'] == 'subscribe'){
|
798 |
|
799 |
if($_POST['type'] == 'forum'){
|
800 |
-
$forum =
|
801 |
if( isset($forum['forumid']) && $forum['forumid'] ){
|
802 |
-
if(
|
803 |
-
|
804 |
$return = 0;
|
805 |
}
|
806 |
}
|
807 |
}elseif($_POST['type'] == 'topic'){
|
808 |
-
$topic =
|
809 |
if( isset($topic['forumid']) && $topic['forumid'] ){
|
810 |
if( isset($topic['private']) && $topic['private'] && !wpforo_is_owner($topic['userid']) ){
|
811 |
-
if(
|
812 |
-
|
813 |
$return = 0;
|
814 |
}
|
815 |
}
|
816 |
}
|
817 |
}
|
818 |
|
819 |
-
$args['confirmkey'] =
|
820 |
|
821 |
-
if( wpforo_feature('subscribe_conf'
|
822 |
############### Sending Email ##################
|
823 |
-
$confirmlink =
|
824 |
-
$member_name = (isset(
|
825 |
if($_POST['type'] == 'forum'){
|
826 |
$item_title = $forum['title'];
|
827 |
}elseif($_POST['type'] == 'topic'){
|
828 |
$item_title = $topic['title'];
|
829 |
}
|
830 |
-
$subject =
|
831 |
-
$message =
|
832 |
$from_tags = array("[member_name]", "[entry_title]", "[confirm_link]");
|
833 |
$to_words = array(sanitize_text_field($member_name), '<strong>' . sanitize_text_field($item_title) . '</strong>', '<br><br><a href="' . esc_url($confirmlink) . '"> ' . wpforo_phrase('Confirm my subscription', false) . ' </a>');
|
834 |
$subject = stripslashes(strip_tags(str_replace($from_tags, $to_words, $subject)));
|
@@ -838,14 +828,14 @@ function wpf_subscribe(){
|
|
838 |
add_filter( 'wp_mail_content_type', 'wpforo_set_html_content_type' );
|
839 |
$headers = wpforo_mail_headers();
|
840 |
|
841 |
-
if( wp_mail(
|
842 |
-
if(
|
843 |
$return = 1;
|
844 |
}else{
|
845 |
$return = 0;
|
846 |
}
|
847 |
}else{
|
848 |
-
|
849 |
$return = 0;
|
850 |
}
|
851 |
remove_filter( 'wp_mail_content_type', 'wpforo_set_html_content_type' );
|
@@ -853,7 +843,7 @@ function wpf_subscribe(){
|
|
853 |
}
|
854 |
else{
|
855 |
$args['active'] = 1;
|
856 |
-
if(
|
857 |
$return = 1;
|
858 |
}else{
|
859 |
$return = 0;
|
@@ -861,12 +851,12 @@ function wpf_subscribe(){
|
|
861 |
}
|
862 |
|
863 |
}elseif(isset($_POST['status']) && $_POST['status'] == 'unsubscribe'){
|
864 |
-
$subscribe =
|
865 |
-
$return = (int)
|
866 |
}
|
867 |
|
868 |
$resp['stat'] = $return;
|
869 |
-
$resp['notice'] =
|
870 |
echo json_encode( $resp );
|
871 |
exit();
|
872 |
}
|
@@ -877,9 +867,8 @@ function wpforo_set_html_content_type(){
|
|
877 |
}
|
878 |
|
879 |
function wpforo_wp_mail_from_name($name){
|
880 |
-
|
881 |
-
|
882 |
-
return $wpforo->sbscrb->options['from_name'];
|
883 |
}
|
884 |
else{
|
885 |
return $name;
|
@@ -887,9 +876,8 @@ function wpforo_wp_mail_from_name($name){
|
|
887 |
}
|
888 |
|
889 |
function wpforo_wp_mail_from_email($email){
|
890 |
-
|
891 |
-
|
892 |
-
return $wpforo->sbscrb->options['from_email'];
|
893 |
}
|
894 |
else{
|
895 |
return $email;
|
@@ -897,15 +885,14 @@ function wpforo_wp_mail_from_email($email){
|
|
897 |
}
|
898 |
|
899 |
function wpforo_mail_from_name(){
|
900 |
-
|
901 |
}
|
902 |
|
903 |
function wpforo_mail_from_email(){
|
904 |
-
|
905 |
}
|
906 |
|
907 |
function wpforo_mail_headers($from_name = '', $from_email = '', $cc = array(), $bcc = array()){
|
908 |
-
global $wpforo;
|
909 |
$H = array();
|
910 |
if(!$from_name) $from_name = wpforo_mail_from_name();
|
911 |
if(!$from_email) $from_email = wpforo_mail_from_email();
|
@@ -920,13 +907,12 @@ function wpforo_mail_headers($from_name = '', $from_email = '', $cc = array(), $
|
|
920 |
}
|
921 |
|
922 |
function wpforo_admin_mail_headers($from_name = '', $from_email = '', $cc = array(), $bcc = array()){
|
923 |
-
global $wpforo;
|
924 |
$H = array();
|
925 |
if(!$from_name) $from_name = wpforo_mail_from_name();
|
926 |
if(!$from_email) $from_email = wpforo_mail_from_email();
|
927 |
$H[] = 'From: ' . $from_name . ' <' . $from_email . '>';
|
928 |
if(empty($cc)){
|
929 |
-
$cc = trim(
|
930 |
$cc = explode(',', $cc);
|
931 |
$cc = array_map('trim', $cc);
|
932 |
}
|
@@ -942,16 +928,13 @@ function wpforo_admin_mail_headers($from_name = '', $from_email = '', $cc = arra
|
|
942 |
############### Sending Email end ##############
|
943 |
|
944 |
function wpforo_frontend_enqueue(){
|
945 |
-
|
946 |
-
global $wpforo;
|
947 |
-
|
948 |
if( is_wpforo_page() ){
|
949 |
wp_enqueue_script('jquery-ui-core');
|
950 |
wp_enqueue_script('jquery-ui-dialog');
|
951 |
wp_register_script( 'wpforo-frontend-js', WPFORO_URL . '/wpf-assets/js/frontend.js', array('jquery'), WPFORO_VERSION, false );
|
952 |
wp_enqueue_script('wpforo-frontend-js');
|
953 |
-
wp_localize_script('wpforo-frontend-js', 'wpforo_phrases',
|
954 |
-
if( wpforo_feature( 'font-awesome'
|
955 |
wp_register_style('wpforo-font-awesome', WPFORO_URL . '/wpf-assets/css/font-awesome/css/font-awesome.min.css', false, '4.7' );
|
956 |
wp_enqueue_style('wpforo-font-awesome');
|
957 |
if (is_rtl()) {
|
@@ -986,19 +969,18 @@ function wpforo_frontend_enqueue(){
|
|
986 |
add_action('wp_enqueue_scripts', 'wpforo_frontend_enqueue');
|
987 |
|
988 |
function wpforo_add_into_wp_head(){
|
989 |
-
|
990 |
-
|
991 |
-
if(!$wpforo->perm->forum_can('va')){
|
992 |
?>
|
993 |
<script type="text/javascript">
|
994 |
jQuery(document).ready(function($){
|
995 |
$(document).on('click','.attach_cant_view', function(){
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
|
|
1002 |
});
|
1003 |
});
|
1004 |
</script>
|
@@ -1009,16 +991,15 @@ add_action('wp_head', 'wpforo_add_into_wp_head');
|
|
1009 |
|
1010 |
function wpforo_dynamic_style() {
|
1011 |
|
1012 |
-
if(!is_wpforo_page()) return;
|
1013 |
|
1014 |
-
global $wpforo;
|
1015 |
$inline = false;
|
1016 |
$dynamic_css_file = WPFORO_TEMPLATE_DIR . '/colors.css';
|
1017 |
$dynamic_css_matrix = WPFORO_TEMPLATE_DIR . '/styles/css.php';
|
1018 |
-
if( isset(
|
1019 |
-
if( !isset(
|
1020 |
-
$style =
|
1021 |
-
$styles =
|
1022 |
if( !empty($style) && !empty($styles) ){
|
1023 |
foreach( $styles[$style] as $color_key => $color_value ){
|
1024 |
if( $color_value ) {
|
@@ -1074,32 +1055,30 @@ function wpforo_dynamic_style() {
|
|
1074 |
add_action( 'wp_enqueue_scripts', 'wpforo_dynamic_style', 12 );
|
1075 |
|
1076 |
function wpforo_style_options($css, $COLORS){
|
1077 |
-
global $wpforo;
|
1078 |
if( !isset($css)) return;
|
1079 |
-
if( isset(
|
1080 |
-
$css .= "\r\n#wpforo-wrap .wpforo-forum-title{font-size: " . intval(
|
1081 |
}
|
1082 |
-
if( isset(
|
1083 |
-
$css .= "\r\n#wpforo-wrap .wpforo-topic-title a { font-size: " . intval(
|
1084 |
}
|
1085 |
-
if( isset(
|
1086 |
-
$css .= "\r\n#wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content {font-size: " . intval(
|
1087 |
}
|
1088 |
-
if( isset(
|
1089 |
-
$css .= "\r\n" . stripslashes(
|
1090 |
}
|
1091 |
return $css;
|
1092 |
}
|
1093 |
add_filter( 'wpforo_dynamic_css_filter' , 'wpforo_style_options' , 10, 2 );
|
1094 |
|
1095 |
function wpforo_admin_enqueue(){
|
1096 |
-
|
1097 |
-
$phrases = array(
|
1098 |
'move' => __('Move', 'wpforo'),
|
1099 |
'delete' => __('Delete', 'wpforo')
|
1100 |
);
|
1101 |
if( !empty($_GET['page']) && FALSE !== strpos( $_GET['page'], 'wpforo' ) ){
|
1102 |
-
if( wpforo_feature( 'font-awesome'
|
1103 |
wp_register_style('wpforo-font-awesome', WPFORO_URL . '/wpf-assets/css/font-awesome/css/font-awesome.min.css', false, '4.6.3' );
|
1104 |
wp_enqueue_style('wpforo-font-awesome');
|
1105 |
}
|
@@ -1162,10 +1141,8 @@ add_action( 'admin_notices', 'wpforo_admin_permalink_notice' );
|
|
1162 |
|
1163 |
function wpforo_userform_to_wpuser_html_form($wp_user){
|
1164 |
if( is_super_admin() ){
|
1165 |
-
global $wpforo;
|
1166 |
-
|
1167 |
if( is_object($wp_user) ){
|
1168 |
-
$user =
|
1169 |
$groupid = $user['groupid'];
|
1170 |
$timezone = $user['timezone'];
|
1171 |
}
|
@@ -1177,7 +1154,7 @@ function wpforo_userform_to_wpuser_html_form($wp_user){
|
|
1177 |
<th scope="row"><label for="wpforo_usergroup">' . __('wpForo Usergroup', 'wpforo') . '</label></th>
|
1178 |
<td>
|
1179 |
<select name="wpforo_usergroup" id="wpforo_usergroup">';
|
1180 |
-
|
1181 |
echo ' </select>
|
1182 |
</td>
|
1183 |
</tr>
|
@@ -1198,46 +1175,41 @@ add_action( 'show_user_profile', 'wpforo_userform_to_wpuser_html_form' );
|
|
1198 |
add_action( 'edit_user_profile', 'wpforo_userform_to_wpuser_html_form' );
|
1199 |
|
1200 |
function wpforo_do_hook_user_register($userid){
|
1201 |
-
|
1202 |
-
$wpforo->member->synchronize_user($userid);
|
1203 |
}
|
1204 |
add_action( 'user_register', 'wpforo_do_hook_user_register', 10, 1 );
|
1205 |
|
1206 |
function wpforo_do_hook_update_profile($userid){
|
1207 |
-
global $wpforo;
|
1208 |
if( isset($_POST['wpforo_usergroup']) && $_POST['wpforo_usergroup'] ){
|
1209 |
-
|
1210 |
'groupid' => intval($_POST['wpforo_usergroup']),
|
1211 |
'site' => esc_url($_POST['url']),
|
1212 |
'about' => wpforo_kses($_POST['description'], 'user_description'),
|
1213 |
'timezone' => ( isset($_POST['wpforo_usertimezone']) ? sanitize_text_field($_POST['wpforo_usertimezone']) : '' ) ) );
|
1214 |
}
|
1215 |
-
|
1216 |
}
|
1217 |
add_action('personal_options_update', 'wpforo_do_hook_update_profile');
|
1218 |
add_action('edit_user_profile_update', 'wpforo_do_hook_update_profile');
|
1219 |
|
1220 |
function wpforo_update_last_login_date($user_login, $user = array()){
|
1221 |
if(empty($user)) return;
|
1222 |
-
|
1223 |
-
$wpforo->member->edit_profile( array( 'userid' => intval($user->ID), 'last_login' => current_time( 'mysql', 1 ) ) );
|
1224 |
}
|
1225 |
add_action('wp_login', 'wpforo_update_last_login_date', 10, 2);
|
1226 |
|
1227 |
function wpforo_do_hook_deleted_user($userid){
|
1228 |
-
global $wpforo;
|
1229 |
if( !empty($_REQUEST['wpforo_user_delete_option']) && $_REQUEST['wpforo_user_delete_option'] == 'reassign' && !empty($_REQUEST['wpforo_reassign_user']) ){
|
1230 |
-
|
1231 |
}else{
|
1232 |
-
|
1233 |
}
|
1234 |
-
|
1235 |
}
|
1236 |
add_action( 'deleted_user', 'wpforo_do_hook_deleted_user' );
|
1237 |
|
1238 |
function wpforo_avatar( $avatar, $id_or_email, $size, $default, $alt ) {
|
1239 |
-
|
1240 |
-
if(!wpforo_feature('replace-avatar', $wpforo)) return $avatar;
|
1241 |
$user = false;
|
1242 |
if ( is_numeric( $id_or_email ) ) {
|
1243 |
$id = (int) $id_or_email;
|
@@ -1252,7 +1224,7 @@ function wpforo_avatar( $avatar, $id_or_email, $size, $default, $alt ) {
|
|
1252 |
}
|
1253 |
|
1254 |
if( $user && is_object( $user ) ){
|
1255 |
-
if( $src =
|
1256 |
$avatar = "<img alt='" . esc_attr($alt) . "' src='" . esc_url($src) . "' class='avatar avatar-" . esc_attr($size) . " photo' height='" . esc_attr($size) . "' width='" . esc_attr($size) . "' />";
|
1257 |
}
|
1258 |
}
|
@@ -1260,16 +1232,89 @@ function wpforo_avatar( $avatar, $id_or_email, $size, $default, $alt ) {
|
|
1260 |
}
|
1261 |
add_filter( 'get_avatar' , 'wpforo_avatar' , 10, 5 );
|
1262 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1263 |
function wpforo_topic_auto_subscribe($item){
|
1264 |
if(!is_user_logged_in()) return FALSE;
|
1265 |
if(!isset($_POST['wpforo_topic_subs']) || !$_POST['wpforo_topic_subs'] ) return FALSE;
|
1266 |
|
1267 |
-
global $wpforo;
|
1268 |
-
|
1269 |
if( isset($item['forumid']) && $item['forumid'] ){
|
1270 |
if( isset($item['private']) && $item['private'] && !wpforo_is_owner($item['userid']) ){
|
1271 |
-
if(
|
1272 |
-
|
1273 |
return FALSE;
|
1274 |
}
|
1275 |
}
|
@@ -1278,25 +1323,25 @@ function wpforo_topic_auto_subscribe($item){
|
|
1278 |
}
|
1279 |
}
|
1280 |
else{
|
1281 |
-
|
1282 |
return FALSE;
|
1283 |
}
|
1284 |
|
1285 |
$args = array(
|
1286 |
'itemid' => intval($item['topicid']),
|
1287 |
'type' => 'topic',
|
1288 |
-
'userid' => intval(
|
1289 |
);
|
1290 |
|
1291 |
-
$args['confirmkey'] =
|
1292 |
|
1293 |
-
if( wpforo_feature('subscribe_conf'
|
1294 |
############### Sending Email ##################
|
1295 |
-
$confirmlink =
|
1296 |
-
$member_name = (isset(
|
1297 |
-
$subject =
|
1298 |
-
$message =
|
1299 |
-
$topic =
|
1300 |
$from_tags = array("[member_name]", "[entry_title]", "[confirm_link]");
|
1301 |
$to_words = array(sanitize_text_field($member_name), '<strong>' . sanitize_text_field($topic['title']) . '</strong>', '<br><br><a href="' . esc_url($confirmlink) . '"> ' . wpforo_phrase('Confirm my subscription', false) . ' </a>');
|
1302 |
$subject = stripslashes(str_replace($from_tags, $to_words, $subject));
|
@@ -1306,32 +1351,30 @@ function wpforo_topic_auto_subscribe($item){
|
|
1306 |
add_filter( 'wp_mail_content_type', 'wpforo_set_html_content_type' );
|
1307 |
$headers = wpforo_mail_headers();
|
1308 |
|
1309 |
-
if( wp_mail(
|
1310 |
-
if( $response =
|
1311 |
}else{
|
1312 |
-
|
1313 |
return FALSE;
|
1314 |
}
|
1315 |
remove_filter( 'wp_mail_content_type', 'wpforo_set_html_content_type' );
|
1316 |
############### Sending Email end ##############
|
1317 |
}else{
|
1318 |
$args['active'] = 1;
|
1319 |
-
if( $response =
|
1320 |
}
|
1321 |
return FALSE;
|
1322 |
}
|
1323 |
-
add_action( 'wpforo_after_add_topic', 'wpforo_topic_auto_subscribe'
|
1324 |
-
add_action( 'wpforo_after_add_post', 'wpforo_topic_auto_subscribe'
|
1325 |
|
1326 |
function wpforo_forum_subscribers_mail_sender( $topic ){
|
1327 |
|
1328 |
if( defined('IS_GO2WPFORO') && IS_GO2WPFORO ) return;
|
1329 |
|
1330 |
-
|
1331 |
-
|
1332 |
-
|
1333 |
-
if( $wpforo->sbscrb->options['new_topic_notify'] ){
|
1334 |
-
$admin_emails = explode(',', $wpforo->sbscrb->options['admin_emails']);
|
1335 |
foreach( $admin_emails as $admin_email ) $subscribers[] = sanitize_email( $admin_email );
|
1336 |
}
|
1337 |
|
@@ -1340,8 +1383,8 @@ function wpforo_forum_subscribers_mail_sender( $topic ){
|
|
1340 |
foreach($subscribers as $subscriber){
|
1341 |
|
1342 |
if( is_array($subscriber) ){
|
1343 |
-
$member =
|
1344 |
-
$unsubscribe_link =
|
1345 |
}else{
|
1346 |
$member = array('display_name' => $subscriber, 'user_email' => $subscriber);
|
1347 |
$unsubscribe_link = '#';
|
@@ -1349,14 +1392,14 @@ function wpforo_forum_subscribers_mail_sender( $topic ){
|
|
1349 |
|
1350 |
if( isset($topic['forumid']) && $topic['forumid'] ){
|
1351 |
if( isset($topic['private']) && $topic['private'] && isset($subscriber['userid']) && $topic['userid'] != $subscriber['userid'] ){
|
1352 |
-
$subscriber_groupid = ( isset($member['groupid']) && $member['groupid'] ) ? $member['groupid'] :
|
1353 |
-
if(
|
1354 |
continue;
|
1355 |
}
|
1356 |
}
|
1357 |
if( isset($topic['status']) && $topic['status'] == 1 && isset($subscriber['userid']) ){
|
1358 |
-
$subscriber_groupid = ( isset($member['groupid']) && $member['groupid'] ) ? $member['groupid'] :
|
1359 |
-
if(
|
1360 |
continue;
|
1361 |
}
|
1362 |
}
|
@@ -1365,8 +1408,9 @@ function wpforo_forum_subscribers_mail_sender( $topic ){
|
|
1365 |
$owner = wpforo_member( $topic );
|
1366 |
|
1367 |
if($owner['user_email'] == $member['user_email']) continue;
|
|
|
1368 |
|
1369 |
-
$forum =
|
1370 |
|
1371 |
############### Sending Email ##################
|
1372 |
|
@@ -1379,8 +1423,8 @@ function wpforo_forum_subscribers_mail_sender( $topic ){
|
|
1379 |
$mod_text = '';
|
1380 |
}
|
1381 |
|
1382 |
-
$subject =
|
1383 |
-
$message =
|
1384 |
|
1385 |
$from_tags = array( "[member_name]", "[forum]", "[unsubscribe_link]", "[topic_title]", "[topic_desc]");
|
1386 |
$to_words = array( sanitize_text_field($member['display_name']),
|
@@ -1403,7 +1447,7 @@ function wpforo_forum_subscribers_mail_sender( $topic ){
|
|
1403 |
|
1404 |
}
|
1405 |
}
|
1406 |
-
add_action( 'wpforo_after_add_topic', 'wpforo_forum_subscribers_mail_sender', 12
|
1407 |
|
1408 |
|
1409 |
|
@@ -1411,23 +1455,21 @@ function wpforo_topic_subscribers_mail_sender( $post ){
|
|
1411 |
|
1412 |
if( defined('IS_GO2WPFORO') && IS_GO2WPFORO ) return;
|
1413 |
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
if( $wpforo->sbscrb->options['new_reply_notify'] ){
|
1418 |
-
$admin_emails = explode(',', $wpforo->sbscrb->options['admin_emails']);
|
1419 |
foreach( $admin_emails as $admin_email ) $subscribers[] = sanitize_email( $admin_email );
|
1420 |
}
|
1421 |
|
1422 |
-
$topic =
|
1423 |
|
1424 |
$subscribers = apply_filters('wpforo_topic_subscribers', $subscribers);
|
1425 |
|
1426 |
foreach($subscribers as $subscriber){
|
1427 |
|
1428 |
if( is_array($subscriber) ){
|
1429 |
-
$member =
|
1430 |
-
$unsubscribe_link =
|
1431 |
}else{
|
1432 |
$member = array('display_name' => $subscriber, 'user_email' => $subscriber);
|
1433 |
$unsubscribe_link = '#';
|
@@ -1435,23 +1477,24 @@ function wpforo_topic_subscribers_mail_sender( $post ){
|
|
1435 |
|
1436 |
$owner = wpforo_member( $post );
|
1437 |
if($owner['user_email'] == $member['user_email']) continue;
|
|
|
1438 |
|
1439 |
if( isset($topic['forumid']) && $topic['forumid'] && isset($subscriber['userid']) ){
|
1440 |
|
1441 |
-
$subscriber_groupid = ( isset($member['groupid']) && $member['groupid'] ) ? $member['groupid'] :
|
1442 |
|
1443 |
if( isset($topic['private']) && $topic['private'] && $topic['userid'] != $subscriber['userid']){
|
1444 |
-
if(
|
1445 |
continue;
|
1446 |
}
|
1447 |
}
|
1448 |
if( isset($topic['status']) && $topic['status'] == 1){
|
1449 |
-
if(
|
1450 |
continue;
|
1451 |
}
|
1452 |
}
|
1453 |
if( isset($post['status']) && $post['status'] == 1){
|
1454 |
-
if(
|
1455 |
continue;
|
1456 |
}
|
1457 |
}
|
@@ -1468,8 +1511,8 @@ function wpforo_topic_subscribers_mail_sender( $post ){
|
|
1468 |
$mod_text = '';
|
1469 |
}
|
1470 |
|
1471 |
-
$subject =
|
1472 |
-
$message =
|
1473 |
|
1474 |
$from_tags = array( "[member_name]", "[topic]", "[unsubscribe_link]", "[reply_title]", "[reply_desc]");
|
1475 |
$to_words = array( sanitize_text_field($member['display_name']),
|
@@ -1497,8 +1540,7 @@ add_action( 'wpforo_after_add_post', 'wpforo_topic_subscribers_mail_sender', 13,
|
|
1497 |
|
1498 |
function wpforo_add_default_attachment($args){
|
1499 |
if( !empty($_FILES['attachfile']) && !empty($_FILES['attachfile']['name']) ){
|
1500 |
-
|
1501 |
-
if( $wpforo->perm->can_attach() ){
|
1502 |
$name = sanitize_file_name($_FILES['attachfile']['name']); //myimg.png
|
1503 |
$type = sanitize_mime_type($_FILES['attachfile']['type']); //image/png
|
1504 |
$tmp_name = sanitize_text_field($_FILES['attachfile']['tmp_name']); //D:\wamp\tmp\php986B.tmp
|
@@ -1517,10 +1559,10 @@ function wpforo_add_default_attachment($args){
|
|
1517 |
);
|
1518 |
|
1519 |
if( $error ){
|
1520 |
-
|
1521 |
return $args;
|
1522 |
-
}elseif( $size >
|
1523 |
-
|
1524 |
return $args;
|
1525 |
}
|
1526 |
|
@@ -1537,11 +1579,11 @@ function wpforo_add_default_attachment($args){
|
|
1537 |
$allowed_types = implode('|', $mime_types);
|
1538 |
$expld = explode('|', $allowed_types);
|
1539 |
if( !in_array($ext, $expld) ){
|
1540 |
-
|
1541 |
return $args;
|
1542 |
}
|
1543 |
-
if(
|
1544 |
-
|
1545 |
return $args;
|
1546 |
}
|
1547 |
}
|
@@ -1570,7 +1612,7 @@ function wpforo_add_default_attachment($args){
|
|
1570 |
$args['body'] .= "\r\n" . '<div id="wpfa-' . $attach_id . '" class="wpforo-attached-file"><a class="wpforo-default-attachment" href="' . esc_url($attach_url.'/'.$attach_fname) . '" target="_blank"><i class="fa fa-paperclip"></i>' . esc_html(basename($name)) . '</a></div>';
|
1571 |
$args['has_attach'] = 1;
|
1572 |
}else{
|
1573 |
-
|
1574 |
return $args;
|
1575 |
}
|
1576 |
}
|
@@ -1591,8 +1633,6 @@ function wpforo_delete_attachment( $attach_post_id ){
|
|
1591 |
}
|
1592 |
|
1593 |
function wpforo_default_attachments_filter($text){
|
1594 |
-
global $wpforo;
|
1595 |
-
|
1596 |
if( preg_match_all('#<a[^<>]*class=[\'"]wpforo-default-attachment[\'"][^<>]*href=[\'"]([^\'"]+)[\'"][^<>]*>[\r\n\t\s\0]*(?:<i[^<>]*>[\r\n\t\s\0]*</i>[\r\n\t\s\0]*)?([^<>]*)</a>#isu', $text, $matches, PREG_SET_ORDER) ){
|
1597 |
foreach( $matches as $match ){
|
1598 |
$attach_html = '';
|
@@ -1604,7 +1644,7 @@ function wpforo_default_attachments_filter($text){
|
|
1604 |
$filedir = str_replace( basename($filedir), urldecode( basename($filedir) ), $filedir );
|
1605 |
|
1606 |
if(file_exists($filedir)){
|
1607 |
-
if(
|
1608 |
$attach_html .= '<br/><div class="wpfa-item wpfa-file"><a class="attach_cant_view" style="cursor:pointer;"><span style="color:#666;">' . wpforo_phrase('Attachment', FALSE) . ':</span> ' . urldecode( basename($filename) ) . '</a></div>';
|
1609 |
}
|
1610 |
}
|
@@ -1635,7 +1675,6 @@ if( !class_exists('wpForoSmiles') ){
|
|
1635 |
|
1636 |
|
1637 |
function wpforo_add_adminbar_links( $wp_admin_bar ) {
|
1638 |
-
global $wpforo;
|
1639 |
$args = array(
|
1640 |
'id' => 'new-forum',
|
1641 |
'title' => __('New Forum', 'wpforo'),
|
@@ -1660,12 +1699,12 @@ function wpforo_add_adminbar_links( $wp_admin_bar ) {
|
|
1660 |
);
|
1661 |
$wp_admin_bar->add_node( $args );
|
1662 |
|
1663 |
-
if(
|
1664 |
-
|
1665 |
-
|
1666 |
-
(
|
1667 |
-
|
1668 |
-
|
1669 |
){
|
1670 |
$args = array(
|
1671 |
'id' => 'wpf-community',
|
@@ -1674,7 +1713,7 @@ function wpforo_add_adminbar_links( $wp_admin_bar ) {
|
|
1674 |
);
|
1675 |
$wp_admin_bar->add_node( $args );
|
1676 |
}
|
1677 |
-
if(
|
1678 |
$args = array(
|
1679 |
'id' => 'wpf-forums',
|
1680 |
'title' => __('Forums', 'wpforo'),
|
@@ -1690,7 +1729,7 @@ function wpforo_add_adminbar_links( $wp_admin_bar ) {
|
|
1690 |
);
|
1691 |
$wp_admin_bar->add_node( $args );
|
1692 |
}
|
1693 |
-
if(
|
1694 |
$args = array(
|
1695 |
'id' => 'wpf-settings',
|
1696 |
'title' => __('Settings', 'wpforo'),
|
@@ -1699,7 +1738,7 @@ function wpforo_add_adminbar_links( $wp_admin_bar ) {
|
|
1699 |
);
|
1700 |
$wp_admin_bar->add_node( $args );
|
1701 |
}
|
1702 |
-
if(
|
1703 |
$args = array(
|
1704 |
'id' => 'wpf-tools',
|
1705 |
'title' => __('Tools', 'wpforo'),
|
@@ -1708,7 +1747,7 @@ function wpforo_add_adminbar_links( $wp_admin_bar ) {
|
|
1708 |
);
|
1709 |
$wp_admin_bar->add_node( $args );
|
1710 |
}
|
1711 |
-
if(
|
1712 |
$args = array(
|
1713 |
'id' => 'wpf-moderation',
|
1714 |
'title' => __('Moderation', 'wpforo'),
|
@@ -1717,7 +1756,7 @@ function wpforo_add_adminbar_links( $wp_admin_bar ) {
|
|
1717 |
);
|
1718 |
$wp_admin_bar->add_node( $args );
|
1719 |
}
|
1720 |
-
if(
|
1721 |
$args = array(
|
1722 |
'id' => 'wpf-members',
|
1723 |
'title' => __('Members', 'wpforo'),
|
@@ -1726,7 +1765,7 @@ function wpforo_add_adminbar_links( $wp_admin_bar ) {
|
|
1726 |
);
|
1727 |
$wp_admin_bar->add_node( $args );
|
1728 |
}
|
1729 |
-
if(
|
1730 |
$args = array(
|
1731 |
'id' => 'wpf-usergroups',
|
1732 |
'title' => __('Usergroups', 'wpforo'),
|
@@ -1742,7 +1781,7 @@ function wpforo_add_adminbar_links( $wp_admin_bar ) {
|
|
1742 |
);
|
1743 |
$wp_admin_bar->add_node( $args );
|
1744 |
}
|
1745 |
-
if(
|
1746 |
$args = array(
|
1747 |
'id' => 'wpf-phrases',
|
1748 |
'title' => __('Phrases', 'wpforo'),
|
@@ -1758,7 +1797,7 @@ function wpforo_add_adminbar_links( $wp_admin_bar ) {
|
|
1758 |
);
|
1759 |
$wp_admin_bar->add_node( $args );
|
1760 |
}
|
1761 |
-
if(
|
1762 |
$args = array(
|
1763 |
'id' => 'wpf-themes',
|
1764 |
'title' => __('Themes', 'wpforo'),
|
@@ -1767,7 +1806,7 @@ function wpforo_add_adminbar_links( $wp_admin_bar ) {
|
|
1767 |
);
|
1768 |
$wp_admin_bar->add_node( $args );
|
1769 |
}
|
1770 |
-
if(
|
1771 |
$args = array(
|
1772 |
'id' => 'wpf-addons',
|
1773 |
'title' => __('Addons', 'wpforo'),
|
@@ -1781,8 +1820,7 @@ function wpforo_add_adminbar_links( $wp_admin_bar ) {
|
|
1781 |
add_action( 'admin_bar_menu', 'wpforo_add_adminbar_links', 999 );
|
1782 |
|
1783 |
function wpforo_create_cache(){
|
1784 |
-
|
1785 |
-
$wpforo->cache->create();
|
1786 |
}
|
1787 |
add_action( 'wp_footer', 'wpforo_create_cache', 10 );
|
1788 |
|
@@ -1801,14 +1839,13 @@ function wpforo_redirect_to_custom_lostpassword() {
|
|
1801 |
|
1802 |
function wpforo_redirect_to_custom_password_reset(){
|
1803 |
if ( 'GET' == $_SERVER['REQUEST_METHOD'] ) {
|
1804 |
-
global $wpforo;
|
1805 |
// Verify key / login combo
|
1806 |
$user = check_password_reset_key( $_REQUEST['key'], $_REQUEST['login'] );
|
1807 |
if ( ! $user || is_wp_error( $user ) ) {
|
1808 |
if ( $user && $user->get_error_code() === 'expired_key' ) {
|
1809 |
-
|
1810 |
} else {
|
1811 |
-
|
1812 |
}
|
1813 |
wp_redirect( wpforo_login_url() );
|
1814 |
exit;
|
@@ -1825,17 +1862,15 @@ function wpforo_redirect_to_custom_password_reset(){
|
|
1825 |
|
1826 |
function wpforo_do_lostpass(){
|
1827 |
if( isset($_POST['user_login']) && $_POST['user_login'] ){
|
1828 |
-
global $wpforo;
|
1829 |
-
|
1830 |
$errors = retrieve_password();
|
1831 |
if ( is_wp_error( $errors ) ) {
|
1832 |
// Errors found
|
1833 |
$redirect_url = wpforo_home_url( '?wpforo=lostpassword' );
|
1834 |
-
|
1835 |
} else {
|
1836 |
// Email sent
|
1837 |
$redirect_url = wpforo_login_url();
|
1838 |
-
|
1839 |
}
|
1840 |
|
1841 |
wp_safe_redirect( $redirect_url );
|
@@ -1846,8 +1881,6 @@ function wpforo_do_lostpass(){
|
|
1846 |
|
1847 |
function wpforo_do_password_reset() {
|
1848 |
if ( 'POST' == $_SERVER['REQUEST_METHOD'] ) {
|
1849 |
-
global $wpforo;
|
1850 |
-
|
1851 |
$rp_key = $_REQUEST['rp_key'];
|
1852 |
$rp_login = $_REQUEST['rp_login'];
|
1853 |
|
@@ -1855,9 +1888,9 @@ function wpforo_do_password_reset() {
|
|
1855 |
|
1856 |
if ( ! $user || is_wp_error( $user ) ) {
|
1857 |
if ( $user && $user->get_error_code() === 'expired_key' ) {
|
1858 |
-
|
1859 |
} else {
|
1860 |
-
|
1861 |
}
|
1862 |
wp_redirect( wpforo_login_url() );
|
1863 |
exit();
|
@@ -1866,7 +1899,7 @@ function wpforo_do_password_reset() {
|
|
1866 |
if ( isset( $_POST['pass1'] ) ) {
|
1867 |
if ( $_POST['pass1'] != $_POST['pass2'] ) {
|
1868 |
// Passwords don't match
|
1869 |
-
|
1870 |
$redirect_url = wpforo_home_url( '?wpforo=resetpassword&rp_key='.esc_attr( $rp_key ).'&rp_login='.esc_attr( $rp_login ) );;
|
1871 |
|
1872 |
wp_redirect( $redirect_url );
|
@@ -1875,7 +1908,7 @@ function wpforo_do_password_reset() {
|
|
1875 |
|
1876 |
if ( empty( $_POST['pass1'] ) ) {
|
1877 |
// Password is empty
|
1878 |
-
|
1879 |
$redirect_url = wpforo_home_url( '?wpforo=resetpassword&rp_key='.esc_attr( $rp_key ).'&rp_login='.esc_attr( $rp_login ) );
|
1880 |
|
1881 |
wp_redirect( $redirect_url );
|
@@ -1888,12 +1921,12 @@ function wpforo_do_password_reset() {
|
|
1888 |
$creds = array('user_login' => sanitize_user($rp_login), 'user_password' => $_POST['pass1'] );
|
1889 |
wp_signon($creds);
|
1890 |
|
1891 |
-
|
1892 |
wp_redirect( wpforo_login_url() );
|
1893 |
exit();
|
1894 |
}
|
1895 |
|
1896 |
-
|
1897 |
wp_redirect( wpforo_login_url() );
|
1898 |
exit();
|
1899 |
|
@@ -1903,14 +1936,13 @@ function wpforo_do_password_reset() {
|
|
1903 |
//add_action( 'login_form_resetpass', 'wpforo_do_password_reset' );
|
1904 |
|
1905 |
function wpforo_replace_retrieve_password_message( $message, $key, $user_login, $user_data ) {
|
1906 |
-
global $wpforo;
|
1907 |
if( wpforo_feature('resetpass-url') ){
|
1908 |
$reset_password_url = wpforo_home_url( '?wpforo=resetpassword&rp_key='.esc_attr( $key ).'&rp_login='.esc_attr( $user_login ) );
|
1909 |
-
if( empty(
|
1910 |
-
return str_replace(array('[user_login]', '[reset_password_url]'), array($user_login, "<$reset_password_url>"),
|
1911 |
}
|
1912 |
else{
|
1913 |
return $message;
|
1914 |
}
|
1915 |
}
|
1916 |
-
//add_filter( 'retrieve_password_message', 'wpforo_replace_retrieve_password_message', 10, 4 );
|
26 |
}
|
27 |
|
28 |
function wpforo_notice_show(){
|
29 |
+
WPF()->notice->show();
|
|
|
30 |
}
|
31 |
add_action( 'wpforo_top_hook', 'wpforo_notice_show', 10, 0 );
|
32 |
|
37 |
|
38 |
function wpforo_admin_notice__menu_help(){
|
39 |
if(strpos(wpforo_get_request_uri(), 'nav-menus.php') !== FALSE){
|
40 |
+
|
|
|
41 |
$message = 'wpForo Menu Shortcodes<hr/><table>';
|
42 |
+
foreach( WPF()->menu as $key => $value ){
|
43 |
$message .= "<tr><td> " . $value['label'] . ": </td><td> /%$key%/ </td></tr>";
|
44 |
}
|
45 |
$message .= "<tr><td> " . wpforo_phrase('register', FALSE) . ": </td><td> /%wpforo-register%/ </td></tr>
|
73 |
add_action('init', 'wpforo_remove_comment_support', 100);
|
74 |
|
75 |
function wpforo_change_author_default_page( $link ){
|
76 |
+
if(!wpforo_feature('author-link')) return $link;
|
77 |
+
return WPF()->member->get_profile_url($link);
|
|
|
78 |
}
|
79 |
function wpforo_change_comment_author_default_page( $link, $ID = 0, $object = NULL ){
|
80 |
+
if(!wpforo_feature('comment-author-link')) return $link;
|
|
|
81 |
if(!isset($link) || !$link){
|
82 |
if(isset($object->user_id) && $object->user_id){
|
83 |
+
return WPF()->member->get_profile_url($object->user_id);
|
84 |
}
|
85 |
}
|
86 |
return $link;
|
101 |
add_filter( 'login_url', 'wpforo_change_default_login_page', 10, 2 );
|
102 |
|
103 |
function wpftpl( $filename ){
|
|
|
104 |
$find = array();
|
105 |
if ( $filename ) {
|
106 |
$find[] = 'wpforo/'. $filename;
|
107 |
$template = locate_template( array_unique( $find ) );
|
108 |
+
if ( !$template ) $template = WPFORO_THEME_DIR . '/'. WPF()->tpl->theme .'/' . $filename;
|
109 |
|
110 |
return apply_filters('wpforo_wpftpl', $template);
|
111 |
}
|
112 |
}
|
113 |
|
114 |
function wpforo_init_template(){
|
|
|
115 |
if(wpforo_is_admin()) return;
|
116 |
include_once( wpftpl('index.php') );
|
117 |
}
|
118 |
|
119 |
add_shortcode( 'wpforo', 'wpforo_load' );
|
120 |
function wpforo_load( $atts ){
|
121 |
+
if(wpforo_is_admin()) return '';
|
122 |
+
|
|
|
123 |
if( is_wpforo_shortcode_page() ){
|
124 |
$url = wpforo_home_url();
|
125 |
|
132 |
if( $args['id'] || $args['slug'] ){
|
133 |
$getid = ( $args['slug'] ? $args['slug'] : $args['id'] );
|
134 |
if( $args['item'] == 'topic' ){
|
135 |
+
$url = WPF()->topic->get_topic_url($getid);
|
136 |
}elseif( $args['item'] == 'profile' ){
|
137 |
+
$url = WPF()->member->get_profile_url($getid);
|
138 |
}else{
|
139 |
+
$url = WPF()->forum->get_forum_url($getid);
|
140 |
}
|
141 |
}
|
142 |
|
143 |
+
WPF()->init_current_object($url);
|
144 |
+
WPF()->tpl->init_nav_menu();
|
145 |
}
|
146 |
|
147 |
if(wpforo_feature('output-buffer') && function_exists('ob_start')){
|
148 |
+
if( wpforo_feature('html_cashe') ){
|
149 |
+
$html = WPF()->cache->get_html(); if( $html ) return $html;
|
150 |
}
|
151 |
ob_start();
|
152 |
wpforo_init_template();
|
153 |
$output = ob_get_clean();
|
154 |
+
WPF()->cache->html($output);
|
155 |
return $output;
|
156 |
}
|
157 |
else{
|
170 |
add_action('wp', 'wpforo_set_header_status');
|
171 |
function wpforo_set_header_status(){
|
172 |
if( is_wpforo_page() ){
|
173 |
+
global $wp_query;
|
174 |
|
175 |
+
$status = ( WPF()->current_object['is_404'] ? 404 : 200 );
|
176 |
status_header( $status );
|
177 |
$wp_query->is_404 = FALSE;
|
178 |
}
|
179 |
}
|
180 |
|
181 |
function wpforo_do_rewrite(){
|
|
|
|
|
182 |
if( is_wpforo_page() ){
|
183 |
+
if( WPF()->use_home_url ){
|
184 |
+
add_rewrite_rule( '(.*)', 'index.php?page_id=' . WPF()->pageid, 'top');
|
185 |
add_filter('template_include', 'wpforo_template_include');
|
186 |
}
|
187 |
}
|
189 |
add_action('setup_theme', 'wpforo_do_rewrite');
|
190 |
|
191 |
function wpforo_rewrite_rules_array($rules){
|
192 |
+
$permastruct = utf8_uri_encode( WPF()->permastruct );
|
|
|
|
|
193 |
$permastruct = preg_replace('#^/?index\.php/?#isu', '', $permastruct);
|
194 |
$permastruct = trim($permastruct, '/');
|
195 |
$pattern = '('.preg_quote($permastruct).'(?:/|$).*)$';
|
196 |
+
$to_url = 'index.php?page_id=' . WPF()->pageid;
|
197 |
+
if( !WPF()->use_home_url && !in_array($to_url, $rules) ) $rules = array_merge( array($pattern => $to_url), $rules );
|
198 |
|
199 |
return $rules;
|
200 |
}
|
217 |
add_action('after_setup_theme', 'wpforo_theme_functions_wp');
|
218 |
|
219 |
function wpforo_meta_title($title) {
|
220 |
+
$is404 = false;
|
|
|
221 |
$meta_title = array();
|
222 |
|
223 |
+
if(!wpforo_feature('seo-title')) return $title;
|
224 |
|
225 |
if(is_wpforo_page()){
|
226 |
+
$template = WPF()->current_object['template'];
|
227 |
+
if( ($template == 'post' && WPF()->current_object['topicid'] == 0) ||
|
228 |
+
($template == 'topic' && WPF()->current_object['forumid'] == 0) ||
|
229 |
+
($template == 'profile' && WPF()->current_object['userid'] == 0) ){
|
230 |
$is404 = true;
|
231 |
}
|
232 |
if(!$is404){
|
233 |
+
$paged = ( WPF()->current_object['paged'] > 1 ) ? ' - ' . wpforo_phrase( 'page', false) . ' ' . WPF()->current_object['paged'] .' ' : '';
|
234 |
+
if(!empty(WPF()->current_object['forum'])) $forum = WPF()->current_object['forum'];
|
235 |
+
if(!empty(WPF()->current_object['topic'])) $topic = WPF()->current_object['topic'];
|
236 |
+
if(!empty(WPF()->current_object['user'])) $user = WPF()->current_object['user'];
|
237 |
+
if(isset($topic['title']) && isset($forum['title']) && isset(WPF()->general_options['title'])){
|
238 |
+
$meta_title = array($topic['title'] . $paged, $forum['title'], WPF()->general_options['title']);
|
239 |
}
|
240 |
+
elseif(!isset($topic['title']) && isset($forum['title']) && isset(WPF()->general_options['title'])){
|
241 |
+
$meta_title = array($forum['title'] . $paged, WPF()->general_options['title']);
|
242 |
}
|
243 |
elseif( $template != 'forum' && $template != 'topic' && $template != 'post' ){
|
244 |
if( $template == 'profile' || $template == 'account' || $template == 'activity' || $template == 'subscriptions' ){
|
245 |
if(isset($user['display_name'])){
|
246 |
+
$meta_title = array($user['display_name'], wpforo_phrase( ucfirst($template), false), WPF()->general_options['title']);
|
247 |
}
|
248 |
+
elseif(isset(WPF()->current_object['user_nicename'])){
|
249 |
+
$meta_title = array(WPF()->current_object['user_nicename'], wpforo_phrase( ucfirst($template), false), WPF()->general_options['title']);
|
250 |
}
|
251 |
else{
|
252 |
+
$meta_title = array(wpforo_phrase( 'Member', false), wpforo_phrase( ucfirst($template), false), WPF()->general_options['title']);
|
253 |
}
|
254 |
}
|
255 |
elseif( $template == 'recent' ){
|
256 |
$wpfpaged = ( isset($_GET['wpfpaged']) && $_GET['wpfpaged'] > 1 ) ? ' - ' . wpforo_phrase( 'page', false) . ' ' . $_GET['wpfpaged'] .' ' : '';
|
257 |
+
$meta_title = array( wpforo_phrase( 'Recent Posts', false) . $wpfpaged, WPF()->general_options['title']);
|
258 |
}
|
259 |
elseif($template){
|
260 |
$wpfpaged = ( isset($_GET['wpfpaged']) && $_GET['wpfpaged'] > 1 ) ? ' - ' . wpforo_phrase( 'page', false) . ' ' . $_GET['wpfpaged'] .' ' : '';
|
261 |
+
$meta_title = array(wpforo_phrase( ucfirst($template), false) . $wpfpaged, WPF()->general_options['title']);
|
262 |
}
|
263 |
elseif($title){
|
264 |
$meta_title = (is_array($title)) ? $title : array($title);
|
267 |
$meta_title = array(wpforo_phrase('Forum', false), get_bloginfo('name'));
|
268 |
}
|
269 |
}
|
270 |
+
elseif( isset(WPF()->general_options['title']) && WPF()->general_options['title'] ){
|
271 |
+
$meta_title = array(WPF()->general_options['title'], get_bloginfo('name'));
|
272 |
}
|
273 |
elseif($title){
|
274 |
$meta_title = (is_array($title)) ? $title : array($title);
|
278 |
}
|
279 |
}
|
280 |
else{
|
281 |
+
$meta_title = array(wpforo_phrase( '404 - Page not found', false), WPF()->general_options['title']);
|
282 |
}
|
283 |
}
|
284 |
if(!empty($meta_title)) {
|
301 |
add_filter( 'wp_title', 'wpforo_meta_wp_title', 100);
|
302 |
|
303 |
function wpforo_add_meta_tags(){
|
304 |
+
if(!wpforo_feature('seo-meta')) return;
|
|
|
|
|
305 |
|
306 |
if(is_wpforo_page()){
|
307 |
$title = '';
|
311 |
$description = '';
|
312 |
$udata = array();
|
313 |
$canonical = wpforo_get_request_uri();
|
314 |
+
$noindex_urls = WPF()->tools_misc['noindex'];
|
315 |
+
if(!empty($noindex_urls)){
|
316 |
+
$noindex_urls = explode("\n", $noindex_urls);
|
317 |
+
if(!empty($noindex_urls)){
|
318 |
+
$noindex_urls = array_map("trim", $noindex_urls);
|
319 |
+
foreach( $noindex_urls as $noindex_url){
|
320 |
+
$noindex_url = strtok($noindex_url, "#");
|
321 |
+
if( $canonical == $noindex_url ) {
|
322 |
+
$noindex = "<meta name=\"robots\" content=\"noindex\">\r\n"; break;
|
323 |
+
}
|
324 |
+
}
|
325 |
+
}
|
326 |
+
}
|
327 |
+
$paged = ( WPF()->current_object['paged'] > 1 ) ? wpforo_phrase( 'page', false) . ' ' . WPF()->current_object['paged'] .' | ' : '';
|
328 |
+
if(isset(WPF()->current_object['template'])) $template = WPF()->current_object['template'];
|
329 |
+
if(!empty(WPF()->current_object['forum'])) $forum = WPF()->current_object['forum'];
|
330 |
+
if(!empty(WPF()->current_object['topic'])) $topic = WPF()->current_object['topic'];
|
331 |
+
if(!empty(WPF()->current_object['user'])) $user = WPF()->current_object['user'];
|
332 |
+
if(isset(WPF()->current_object)){
|
333 |
+
if( isset(WPF()->current_object['forumid']) && !isset(WPF()->current_object['topicid']) ){
|
334 |
if(isset($forum['title'])) $title = $forum['title'];
|
335 |
+
if(isset(WPF()->current_object['forum_meta_desc']) && WPF()->current_object['forum_meta_desc'] !=''){
|
336 |
+
$description = $paged . WPF()->current_object['forum_meta_desc'];
|
337 |
}
|
338 |
+
elseif(isset(WPF()->current_object['forum_desc']) && WPF()->current_object['forum_desc'] !=''){
|
339 |
+
$description = $paged . WPF()->current_object['forum_desc'];
|
340 |
}
|
341 |
+
}elseif( isset(WPF()->current_object['topicid']) && isset($topic['first_postid']) ){
|
342 |
+
$post = WPF()->post->get_post($topic['first_postid']);
|
343 |
$image = wpforo_get_image_url($post['body']);
|
344 |
if($image) $og_img = '<meta property="og:image" content="' . $image . '" />' . "\r\n";
|
345 |
if(isset($post['title'])) $title = wpforo_text($paged . $post['title'], 60, false);
|
346 |
if(isset($post['body'])) $description = wpforo_text($paged . $post['body'], 150, false);
|
347 |
}elseif( $template == 'profile' || $template == 'account' || $template == 'activity' || $template == 'subscriptions' ){
|
348 |
+
if( isset(WPF()->general_options['title']) ) $title = $paged . WPF()->general_options['title'];
|
349 |
$udata['name'] = (isset($user['display_name']) && $user['display_name']) ? wpforo_phrase( 'User', false ) . ': ' . $user['display_name'] : '';
|
350 |
$udata['title'] = (isset($user['stat']['title']) && $user['stat']['title']) ? wpforo_phrase( 'Title', false ) . ': ' . $user['stat']['title'] : '';
|
351 |
$udata['about'] = (isset($user['about']) && $user['about']) ? wpforo_phrase( 'About', false ) . ': ' . wpforo_text($user['about'], 150, false) : '';
|
352 |
$description = $title . ' - ' . wpforo_phrase('Member Profile', false) . ' > ' . wpforo_phrase( ucfirst($template), false ) . ' ' . wpforo_phrase( 'Page', false ) . '. ' . implode(', ', $udata);
|
353 |
if(!wpforo_feature('seo-profile')){ $noindex = "<meta name=\"robots\" content=\"noindex\">\r\n"; }
|
354 |
+
}elseif(isset(WPF()->current_object['template']) && WPF()->current_object['template'] == 'member'){
|
355 |
$wpfpaged = ( isset($_GET['wpfpaged']) && $_GET['wpfpaged'] > 1 ) ? wpforo_phrase( 'Page', false) . ' ' . $_GET['wpfpaged'] .' | ' : '';
|
356 |
$description = $wpfpaged . wpforo_phrase( 'Forum Members List', false);
|
357 |
+
}elseif(isset(WPF()->current_object['template']) && WPF()->current_object['template'] == 'recent'){
|
358 |
$wpfpaged = ( isset($_GET['wpfpaged']) && $_GET['wpfpaged'] > 1 ) ? wpforo_phrase( 'Page', false) . ' ' . $_GET['wpfpaged'] .' | ' : '';
|
359 |
$description = $wpfpaged . wpforo_phrase( 'Recent Posts', false);
|
360 |
}
|
361 |
else{
|
362 |
+
if( isset(WPF()->general_options['title']) ) $title = $paged . WPF()->general_options['title'];
|
363 |
+
if( isset(WPF()->general_options['description']) ) $description = $paged . WPF()->general_options['description'];
|
364 |
+
if(isset(WPF()->current_object['template']) && ( WPF()->current_object['template'] == 'login' || WPF()->current_object['template'] == 'register' ) ){
|
365 |
+
$noindex = "<meta name=\"robots\" content=\"noindex\">\r\n";
|
366 |
+
}
|
367 |
}
|
368 |
$description = preg_replace('#[\t\r\n]+#isu', ' ', $description);
|
369 |
echo "\r\n<!-- wpForo SEO -->\r\n" . $noindex . "<link rel=\"canonical\" href=\"".$canonical."\" />\r\n<meta name=\"description\" content=\"" . esc_html($description) . "\" />\r\n<meta property=\"og:title\" content=\"" . esc_html($title) . "\" />\r\n<meta property=\"og:description\" content=\"" . esc_html($description) . "\" />\r\n<meta property=\"og:url\" content=\"" . $canonical . "\" />\r\n". $og_img . "<meta property=\"og:site_name\" content=\"" . get_bloginfo('name') . "\" />\r\n<meta name=\"twitter:description\" content=\"" . esc_html($description) . "\"/>\r\n<meta name=\"twitter:title\" content=\"" . esc_html($title) . "\" />\r\n<!-- wpForo SEO End -->\r\n\r\n";
|
376 |
add_action('wp_ajax_wpforo_like_ajax', 'wpf_like');
|
377 |
|
378 |
function wpf_like(){
|
379 |
+
$response = array('stat' => 0, 'likers' => '', 'notice' => WPF()->notice->get_notices());
|
|
|
|
|
380 |
if(!is_user_logged_in()){
|
381 |
+
WPF()->notice->add( sprintf( wpforo_phrase('Please %s or %s', FALSE), '<a href="' . wpforo_login_url() . '">'.wpforo_phrase('Login', FALSE).'</a>', '<a href="' . wpforo_register_url() . '">'.wpforo_phrase('Register', FALSE).'</a>' ) );
|
382 |
+
$response['notice'] = WPF()->notice->get_notices();
|
383 |
echo json_encode($response);
|
384 |
exit();
|
385 |
}
|
386 |
if( !isset($_POST['likestatus']) || !isset($_POST['postid']) || !($postid = intval($_POST['postid'])) ){
|
387 |
+
WPF()->notice->add('action error', 'error');
|
388 |
+
$response['notice'] = WPF()->notice->get_notices();
|
389 |
echo json_encode($response);
|
390 |
exit();
|
391 |
}
|
392 |
+
if( !$post = WPF()->post->get_post( $postid ) ){
|
393 |
+
WPF()->notice->add('post not found', 'error');
|
394 |
+
$response['notice'] = WPF()->notice->get_notices();
|
395 |
echo json_encode($response);
|
396 |
exit();
|
397 |
}
|
398 |
+
if( !WPF()->perm->forum_can( 'l', $post['forumid']) ){
|
399 |
+
WPF()->notice->add('You haven\'t permission to like posts from this forum', 'error');
|
400 |
+
$response['notice'] = WPF()->notice->get_notices();
|
401 |
echo json_encode($response);
|
402 |
exit();
|
403 |
}
|
404 |
if( $_POST['likestatus'] ){
|
405 |
+
if( WPF()->db->insert(
|
406 |
+
WPF()->db->prefix . 'wpforo_likes',
|
407 |
array(
|
408 |
'postid' => $postid,
|
409 |
+
'userid' => WPF()->current_userid,
|
410 |
'post_userid' => $post['userid']
|
411 |
),
|
412 |
array('%d','%d','%d')
|
413 |
) ){
|
414 |
wpforo_clean_cache($postid, 'post-soft');
|
415 |
+
do_action('wpforo_like', $post, WPF()->current_userid);
|
416 |
+
WPF()->notice->add('done', 'success');
|
417 |
$response['stat'] = 1;
|
418 |
+
$response['notice'] = WPF()->notice->get_notices();
|
419 |
}
|
420 |
}else{
|
421 |
+
if( WPF()->db->delete(
|
422 |
+
WPF()->db->prefix . 'wpforo_likes',
|
423 |
array(
|
424 |
'postid' => $postid,
|
425 |
+
'userid' => WPF()->current_userid
|
426 |
),
|
427 |
array('%d','%d')
|
428 |
) ){
|
429 |
wpforo_clean_cache($postid, 'post-soft');
|
430 |
+
do_action('wpforo_dislike', $post, WPF()->current_userid);
|
431 |
+
WPF()->notice->add('done', 'success');
|
432 |
$response['stat'] = 1;
|
433 |
+
$response['notice'] = WPF()->notice->get_notices();
|
434 |
}
|
435 |
}
|
436 |
+
if(!isset($post['userid'])) WPF()->member->reset($post['userid']);
|
437 |
+
if(!isset(WPF()->current_userid)) WPF()->member->reset(WPF()->current_userid);
|
438 |
+
$response['likers'] = WPF()->tpl->likers($postid);
|
439 |
echo json_encode($response);
|
440 |
exit();
|
441 |
}
|
446 |
|
447 |
if(!is_user_logged_in()) return;
|
448 |
|
|
|
|
|
449 |
if( !isset($_POST['postid']) || !$_POST['postid'] ){
|
450 |
+
WPF()->notice->add('Wrong post data', 'error');
|
451 |
+
echo json_encode(array('stat' => 0, 'notice' => WPF()->notice->get_notices()));
|
452 |
exit();
|
453 |
}
|
454 |
+
|
455 |
+
$reaction = 1;
|
456 |
+
if( $_POST['votestatus'] == 'down' ) $reaction = -1;
|
457 |
+
|
458 |
+
if( WPF()->db->get_var( "SELECT `voteid` FROM `".WPF()->db->prefix."wpforo_votes` WHERE `postid` = " . wpforo_bigintval($_POST['postid']) . " AND `userid` = " . wpforo_bigintval(WPF()->current_userid) . " AND `reaction` = '" . $reaction . "'" )){
|
459 |
+
WPF()->notice->add('You are already voted this post');
|
460 |
+
echo json_encode(array('stat' => 0, 'notice' => WPF()->notice->get_notices()));
|
461 |
exit();
|
462 |
+
}else{
|
463 |
+
WPF()->db->delete(
|
464 |
+
WPF()->db->prefix . 'wpforo_votes',
|
465 |
+
array( 'postid' => $_POST['postid'], 'userid' => WPF()->current_userid ),
|
466 |
+
array('%d', '%d')
|
467 |
+
);
|
468 |
+
}
|
469 |
|
470 |
+
$postid = wpforo_bigintval($_POST['postid']);
|
471 |
+
$post = WPF()->post->get_post( $postid );
|
|
|
|
|
472 |
|
473 |
+
$voted = WPF()->db->insert(
|
474 |
+
WPF()->db->prefix . 'wpforo_votes',
|
475 |
array(
|
476 |
'postid' => $postid,
|
477 |
+
'userid' => WPF()->current_userid,
|
478 |
'reaction' => $reaction,
|
479 |
'post_userid' => $post['userid']
|
480 |
),
|
486 |
)
|
487 |
);
|
488 |
|
489 |
+
if(!isset($post['userid'])) WPF()->member->reset($post['userid']);
|
490 |
+
if(!isset(WPF()->current_userid)) WPF()->member->reset(WPF()->current_userid);
|
491 |
|
492 |
if( $voted !== FALSE ){
|
493 |
+
$incr = $incr2 = true;
|
494 |
+
|
495 |
if( $_POST['itemtype'] == 'topic' ){
|
496 |
+
$incr = WPF()->db->query( "UPDATE ".WPF()->db->prefix . 'wpforo_topics'." SET `votes` = `votes` + $reaction WHERE topicid = " . wpforo_bigintval($post['topicid']) );
|
|
|
|
|
|
|
|
|
497 |
}
|
498 |
+
$incr2 = WPF()->db->query( "UPDATE ".WPF()->db->prefix . 'wpforo_posts'." SET `votes` = `votes` + $reaction WHERE postid = " . wpforo_bigintval($post['postid']) );
|
499 |
+
|
500 |
+
if($incr !== FALSE && $incr2 !== FALSE){
|
501 |
wpforo_clean_cache($postid, 'post', $post);
|
502 |
+
do_action('wpforo_vote', $reaction, $post, WPF()->current_userid );
|
503 |
+
WPF()->notice->add('Successfully voted', 'success');
|
504 |
+
echo json_encode(array('stat' => 1, 'notice' => WPF()->notice->get_notices()));
|
505 |
exit();
|
506 |
}
|
507 |
}
|
508 |
|
509 |
+
WPF()->notice->add('Wrong post data', 'error');
|
510 |
+
echo json_encode(array('stat' => 0, 'notice' => WPF()->notice->get_notices()));
|
511 |
exit();
|
512 |
}
|
513 |
|
514 |
add_action('wp_ajax_wpforo_answer_ajax', 'wpf_answer');
|
515 |
function wpf_answer(){
|
516 |
+
$response = array('stat' => 0, 'notice' => WPF()->notice->get_notices());
|
|
|
517 |
if(!is_user_logged_in()){
|
518 |
+
WPF()->notice->add( sprintf( wpforo_phrase('Please %s or %s', FALSE), '<a href="' . wpforo_login_url() . '">'.wpforo_phrase('Login', FALSE).'</a>', '<a href="' . wpforo_register_url() . '">'.wpforo_phrase('Register', FALSE).'</a>' ) );
|
519 |
+
$response['notice'] = WPF()->notice->get_notices();
|
520 |
echo json_encode($response);
|
521 |
exit();
|
522 |
}
|
523 |
if( !isset($_POST['answerstatus']) || !isset($_POST['postid']) || !$postid = intval($_POST['postid']) ){
|
524 |
+
WPF()->notice->add('action error', 'error');
|
525 |
+
$response['notice'] = WPF()->notice->get_notices();
|
526 |
echo json_encode($response);
|
527 |
exit();
|
528 |
}
|
529 |
+
if( !$post = WPF()->post->get_post( $postid ) ){
|
530 |
+
WPF()->notice->add('post not found', 'error');
|
531 |
+
$response['notice'] = WPF()->notice->get_notices();
|
532 |
echo json_encode($response);
|
533 |
exit();
|
534 |
}
|
535 |
+
if( !$topic = WPF()->topic->get_topic( $post['topicid'] ) ){
|
536 |
+
WPF()->notice->add('topic not found', 'error');
|
537 |
+
$response['notice'] = WPF()->notice->get_notices();
|
538 |
echo json_encode($response);
|
539 |
exit();
|
540 |
}
|
541 |
+
if( !(WPF()->perm->forum_can( 'at', $post['forumid'] ) || ( WPF()->perm->forum_can( 'oat', $post['forumid']) && WPF()->current_userid == $topic['userid'] ) ) ){
|
542 |
+
WPF()->notice->add('You haven\'t permission to make topic answered', 'error');
|
543 |
+
$response['notice'] = WPF()->notice->get_notices();
|
544 |
echo json_encode($response);
|
545 |
exit();
|
546 |
}
|
547 |
+
if( FALSE !== WPF()->db->query( "UPDATE ".WPF()->db->prefix ."wpforo_posts SET is_answer = ".intval($_POST['answerstatus'])." WHERE postid = " . intval($postid) ) ){
|
548 |
wpforo_clean_cache($postid, 'post', $post);
|
549 |
do_action('wpforo_answer', intval($_POST['answerstatus']), $post);
|
550 |
+
WPF()->notice->add('done', 'success');
|
551 |
$response['stat'] = 1;
|
552 |
+
$response['notice'] = WPF()->notice->get_notices();
|
553 |
}
|
554 |
echo json_encode($response);
|
555 |
exit();
|
560 |
|
561 |
if(!is_user_logged_in()) return;
|
562 |
|
563 |
+
$post = WPF()->db->get_row('SELECT `userid`, `body` FROM '.WPF()->db->prefix.'wpforo_posts WHERE postid =' . intval($_POST['postid']), ARRAY_A);
|
|
|
|
|
564 |
$post = apply_filters('wpforo_quote_post_ajax', $post);
|
565 |
$poster = wpforo_member( $post );
|
566 |
echo '<blockquote><div class="wpforo-post-quote-author"><strong>' . wpforo_phrase('Posted by', FALSE) . ': ' . ( $poster['display_name'] ? esc_textarea($poster['display_name']) : esc_textarea($poster['user_login']) ) . '</strong></div>' . wpautop($post['body']) . '</blockquote><br />';
|
572 |
|
573 |
if(!is_user_logged_in()) return;
|
574 |
|
|
|
|
|
575 |
if( !isset($_POST['reportmsg']) || !$_POST['reportmsg'] || !isset($_POST['postid']) || !$_POST['postid'] ){
|
576 |
+
WPF()->notice->add('Error: please insert some text to report.', 'error');
|
577 |
+
echo json_encode( WPF()->notice->get_notices() );
|
578 |
exit();
|
579 |
}
|
580 |
|
581 |
############### Sending Email ##################
|
582 |
$report_text = substr($_POST['reportmsg'], 0, 1000);
|
583 |
$postid = intval($_POST['postid']);
|
584 |
+
$reporter = '<a href="'.WPF()->current_user['profile_url'].'">'.(WPF()->current_user['display_name'] ? WPF()->current_user['display_name'] : urldecode(WPF()->current_user['user_nicename'])).'</a>';
|
585 |
$reportmsg = wpforo_kses($report_text, 'email');
|
586 |
+
$post_url = '<a target="_blank" href="'. esc_attr(WPF()->post->get_post_url($postid)).'">' . wpforo_phrase('Post link', false) . '»</a>';
|
587 |
|
588 |
+
$subject = WPF()->sbscrb->options['report_email_subject'];
|
589 |
+
$message = WPF()->sbscrb->options['report_email_message'];
|
590 |
|
591 |
$from_tags = array("[reporter]", "[message]", "[post_url]");
|
592 |
$to_words = array(sanitize_text_field($reporter), $reportmsg, $post_url);
|
595 |
$message = stripslashes(str_replace($from_tags, $to_words, $message));
|
596 |
|
597 |
$admin_email = get_option( 'admin_email' );
|
598 |
+
$admin_emails = WPF()->sbscrb->options['admin_emails'];
|
599 |
$admin_emails = trim($admin_emails);
|
600 |
$admin_emails = explode(',', $admin_emails);
|
601 |
$admin_emails = array_map('sanitize_email', $admin_emails);
|
607 |
remove_filter( 'wp_mail_content_type', 'wpforo_set_html_content_type' );
|
608 |
}else{
|
609 |
remove_filter( 'wp_mail_content_type', 'wpforo_set_html_content_type' );
|
610 |
+
WPF()->notice->add('Can\'t send report email', 'error');
|
611 |
+
echo json_encode( WPF()->notice->get_notices() );
|
612 |
exit();
|
613 |
}
|
614 |
|
615 |
############### Sending Email end ##############
|
616 |
+
WPF()->notice->add('Message has been sent', 'success');
|
617 |
+
echo json_encode( WPF()->notice->get_notices() );
|
618 |
exit();
|
619 |
}
|
620 |
|
623 |
if(!is_user_logged_in()) return;
|
624 |
|
625 |
if( !isset($_POST['postid']) || !( $p_id = intval($_POST['postid']) ) ){ echo 0; exit(); }
|
|
|
626 |
if( $_POST['status'] == 'sticky' ){
|
627 |
+
$sql = "UPDATE " . WPF()->db->prefix . "wpforo_topics SET type = 1 WHERE topicid = " . intval($p_id);
|
628 |
+
WPF()->db->query( $sql );
|
629 |
}elseif( $_POST['status'] == 'unsticky' ){
|
630 |
+
$sql = "UPDATE ".WPF()->db->prefix ."wpforo_topics SET type = 0 WHERE topicid = " . intval($p_id);
|
631 |
+
WPF()->db->query( $sql );
|
632 |
}
|
633 |
wpforo_clean_cache($p_id, 'topic');
|
634 |
echo 1;
|
640 |
if(!is_user_logged_in()) return;
|
641 |
|
642 |
if( !isset($_POST['postid']) || !( $p_id = intval($_POST['postid']) ) ){ echo 0; exit(); }
|
|
|
643 |
if( $_POST['status'] == 'private' ){
|
644 |
+
$sql = "UPDATE " . WPF()->db->prefix . "wpforo_topics SET private = 1 WHERE topicid = " . intval($p_id);
|
645 |
+
WPF()->db->query( $sql );
|
646 |
+
$sql = "UPDATE " . WPF()->db->prefix . "wpforo_posts SET private = 1 WHERE topicid = " . intval($p_id);
|
647 |
+
WPF()->db->query( $sql );
|
648 |
}elseif( $_POST['status'] == 'public' ){
|
649 |
+
$sql = "UPDATE ".WPF()->db->prefix ."wpforo_topics SET private = 0 WHERE topicid = " . intval($p_id);
|
650 |
+
WPF()->db->query( $sql );
|
651 |
+
$sql = "UPDATE ".WPF()->db->prefix ."wpforo_posts SET private = 0 WHERE topicid = " . intval($p_id);
|
652 |
+
WPF()->db->query( $sql );
|
653 |
}
|
654 |
wpforo_clean_cache();
|
655 |
echo 1;
|
661 |
if(!is_user_logged_in()) return;
|
662 |
|
663 |
if( !isset($_POST['postid']) || !( $p_id = intval($_POST['postid']) ) ){ echo 0; exit(); }
|
664 |
+
$post = WPF()->post->get_post($_POST['postid']);
|
|
|
665 |
if( $_POST['status'] == 'solved' ){
|
666 |
+
$sql = "UPDATE " . WPF()->db->prefix . "wpforo_posts SET is_answer = 1 WHERE postid = " . intval($p_id);
|
667 |
+
WPF()->db->query( $sql );
|
668 |
}elseif( $_POST['status'] == 'unsolved' ){
|
669 |
+
$sql = "UPDATE ".WPF()->db->prefix ."wpforo_posts SET is_answer = 0 WHERE postid = " . intval($p_id);
|
670 |
+
WPF()->db->query( $sql );
|
671 |
}
|
672 |
if( isset($post['topicid']) && $post['topicid'] ) wpforo_clean_cache($post['topicid'], 'topic');
|
673 |
echo 1;
|
679 |
if(!is_user_logged_in()) return;
|
680 |
|
681 |
if( !isset($_POST['postid']) || !( $p_id = intval($_POST['postid']) ) ){ echo 0; exit(); }
|
|
|
682 |
if( $_POST['status'] == 'approve' ){
|
683 |
+
$sql = "UPDATE " . WPF()->db->prefix . "wpforo_posts SET status = 0 WHERE postid = " . intval($p_id);
|
684 |
+
WPF()->db->query( $sql );
|
685 |
+
$sql = "SELECT is_first_post FROM " . WPF()->db->prefix . "wpforo_posts WHERE `postid` = " . intval($p_id);
|
686 |
+
$is_first_post = WPF()->db->get_var($sql);
|
687 |
if( $is_first_post ){
|
688 |
+
$sql = "UPDATE " . WPF()->db->prefix . "wpforo_topics SET status = 0 WHERE first_postid = " . intval($p_id);
|
689 |
+
WPF()->db->query($sql);
|
690 |
}
|
691 |
}elseif( $_POST['status'] == 'unapprove' ){
|
692 |
+
$sql = "UPDATE ".WPF()->db->prefix ."wpforo_posts SET status = 1 WHERE postid = " . intval($p_id);
|
693 |
+
WPF()->db->query( $sql );
|
694 |
+
$sql = "SELECT is_first_post FROM " . WPF()->db->prefix . "wpforo_posts WHERE postid = " . intval($p_id);
|
695 |
+
$is_first_post = WPF()->db->get_var($sql);
|
696 |
if( $is_first_post ){
|
697 |
+
$sql = "UPDATE " . WPF()->db->prefix . "wpforo_topics SET status = 1 WHERE first_postid = " . intval($p_id);
|
698 |
+
WPF()->db->query($sql);
|
699 |
}
|
700 |
}
|
701 |
wpforo_clean_cache($p_id, 'post');
|
708 |
if(!is_user_logged_in()) return;
|
709 |
|
710 |
if( !isset($_POST['postid']) || !( $p_id = intval($_POST['postid']) ) ){ echo 0; exit(); }
|
|
|
711 |
if( $_POST['status'] == 'closed' ){
|
712 |
+
$sql = "UPDATE ".WPF()->db->prefix ."wpforo_topics SET closed = 0 WHERE topicid = " . intval($p_id);
|
713 |
+
WPF()->db->query( $sql );
|
714 |
wpforo_clean_cache($p_id, 'topic');
|
715 |
}elseif( $_POST['status'] == 'close' ){
|
716 |
+
$sql = "UPDATE ".WPF()->db->prefix ."wpforo_topics SET closed = 1 WHERE topicid = " . intval($p_id);
|
717 |
+
WPF()->db->query( $sql );
|
718 |
wpforo_clean_cache($p_id, 'topic');
|
719 |
echo 1;
|
720 |
exit();
|
721 |
}
|
722 |
+
echo WPF()->topic->get_topic_url($p_id);
|
723 |
exit();
|
724 |
}
|
725 |
|
728 |
if(!is_user_logged_in()) return;
|
729 |
|
730 |
if( !isset($_POST['postid']) || !$_POST['postid'] ){ echo 0; exit(); }
|
|
|
731 |
$sql = 'SELECT t.title AS topic_title, p.title AS post_title, p.`body`
|
732 |
+
FROM '.WPF()->db->prefix.'wpforo_posts p
|
733 |
+
INNER JOIN '.WPF()->db->prefix.'wpforo_topics t ON t.topicid = p.topicid
|
734 |
WHERE p.postid =' . intval($_POST['postid']);
|
735 |
+
if($post = WPF()->db->get_row($sql, ARRAY_A) ){
|
736 |
$post = apply_filters('wpforo_edit_post_ajax', $post);
|
737 |
$post['body'] = wpautop($post['body']);
|
738 |
echo json_encode($post);
|
746 |
function wpf_delete(){
|
747 |
if(!is_user_logged_in()) return;
|
748 |
|
|
|
|
|
749 |
$resp = array();
|
750 |
if( $_POST['status'] == 'topic' ){
|
751 |
+
if( WPF()->topic->delete(intval($_POST['postid'])) ){
|
752 |
$resp = array(
|
753 |
'postid' => intval($_POST['postid']),
|
754 |
+
'location' => WPF()->forum->get_forum_url(intval($_POST['forumid']))
|
755 |
);
|
756 |
$return = 1;
|
757 |
}else{
|
758 |
$return = 0;
|
759 |
}
|
760 |
}elseif($_POST['status'] == 'reply'){
|
761 |
+
if( WPF()->post->delete(intval($_POST['postid'])) ){
|
762 |
$resp = array(
|
763 |
'postid' => intval($_POST['postid'])
|
764 |
);
|
769 |
}
|
770 |
|
771 |
$resp['stat'] = $return;
|
772 |
+
$resp['notice'] = WPF()->notice->get_notices();
|
773 |
echo json_encode( $resp );
|
774 |
exit();
|
775 |
}
|
778 |
function wpf_subscribe(){
|
779 |
if(!is_user_logged_in()) return FALSE;
|
780 |
|
|
|
|
|
781 |
$args = array(
|
782 |
'itemid' => intval($_POST['itemid']),
|
783 |
'type' => sanitize_text_field($_POST['type']),
|
784 |
+
'userid' => intval(WPF()->current_userid)
|
785 |
);
|
786 |
|
787 |
if(isset($_POST['status']) && $_POST['status'] == 'subscribe'){
|
788 |
|
789 |
if($_POST['type'] == 'forum'){
|
790 |
+
$forum = WPF()->forum->get_forum(intval($_POST['itemid']));
|
791 |
if( isset($forum['forumid']) && $forum['forumid'] ){
|
792 |
+
if( !WPF()->perm->forum_can('vf', $forum['forumid']) ){
|
793 |
+
WPF()->notice->add('You are not permitted to subscribe here', 'error');
|
794 |
$return = 0;
|
795 |
}
|
796 |
}
|
797 |
}elseif($_POST['type'] == 'topic'){
|
798 |
+
$topic = WPF()->topic->get_topic(intval($_POST['itemid']));
|
799 |
if( isset($topic['forumid']) && $topic['forumid'] ){
|
800 |
if( isset($topic['private']) && $topic['private'] && !wpforo_is_owner($topic['userid']) ){
|
801 |
+
if( !WPF()->perm->forum_can('vp', $topic['forumid']) ){
|
802 |
+
WPF()->notice->add('You are not permitted to subscribe here', 'error');
|
803 |
$return = 0;
|
804 |
}
|
805 |
}
|
806 |
}
|
807 |
}
|
808 |
|
809 |
+
$args['confirmkey'] = WPF()->sbscrb->get_confirm_key();
|
810 |
|
811 |
+
if( wpforo_feature('subscribe_conf') ){
|
812 |
############### Sending Email ##################
|
813 |
+
$confirmlink = WPF()->sbscrb->get_confirm_link($args);
|
814 |
+
$member_name = (isset(WPF()->current_user_display_name) && WPF()->current_user_display_name) ? WPF()->current_user_display_name : urldecode(WPF()->current_user['user_nicename']);
|
815 |
if($_POST['type'] == 'forum'){
|
816 |
$item_title = $forum['title'];
|
817 |
}elseif($_POST['type'] == 'topic'){
|
818 |
$item_title = $topic['title'];
|
819 |
}
|
820 |
+
$subject = WPF()->sbscrb->options['confirmation_email_subject'];
|
821 |
+
$message = WPF()->sbscrb->options['confirmation_email_message'];
|
822 |
$from_tags = array("[member_name]", "[entry_title]", "[confirm_link]");
|
823 |
$to_words = array(sanitize_text_field($member_name), '<strong>' . sanitize_text_field($item_title) . '</strong>', '<br><br><a href="' . esc_url($confirmlink) . '"> ' . wpforo_phrase('Confirm my subscription', false) . ' </a>');
|
824 |
$subject = stripslashes(strip_tags(str_replace($from_tags, $to_words, $subject)));
|
828 |
add_filter( 'wp_mail_content_type', 'wpforo_set_html_content_type' );
|
829 |
$headers = wpforo_mail_headers();
|
830 |
|
831 |
+
if( wp_mail( WPF()->current_user_email , sanitize_text_field($subject), $message, $headers ) ){
|
832 |
+
if( WPF()->sbscrb->add($args) ){
|
833 |
$return = 1;
|
834 |
}else{
|
835 |
$return = 0;
|
836 |
}
|
837 |
}else{
|
838 |
+
WPF()->notice->add('Can\'t send confirmation email', 'error');
|
839 |
$return = 0;
|
840 |
}
|
841 |
remove_filter( 'wp_mail_content_type', 'wpforo_set_html_content_type' );
|
843 |
}
|
844 |
else{
|
845 |
$args['active'] = 1;
|
846 |
+
if( WPF()->sbscrb->add($args) ){
|
847 |
$return = 1;
|
848 |
}else{
|
849 |
$return = 0;
|
851 |
}
|
852 |
|
853 |
}elseif(isset($_POST['status']) && $_POST['status'] == 'unsubscribe'){
|
854 |
+
$subscribe = WPF()->sbscrb->get_subscribe( $args );
|
855 |
+
$return = (int) WPF()->sbscrb->delete( $subscribe['confirmkey'] );
|
856 |
}
|
857 |
|
858 |
$resp['stat'] = $return;
|
859 |
+
$resp['notice'] = WPF()->notice->get_notices();
|
860 |
echo json_encode( $resp );
|
861 |
exit();
|
862 |
}
|
867 |
}
|
868 |
|
869 |
function wpforo_wp_mail_from_name($name){
|
870 |
+
if(isset(WPF()->sbscrb->options['from_name']) && WPF()->sbscrb->options['from_name']){
|
871 |
+
return WPF()->sbscrb->options['from_name'];
|
|
|
872 |
}
|
873 |
else{
|
874 |
return $name;
|
876 |
}
|
877 |
|
878 |
function wpforo_wp_mail_from_email($email){
|
879 |
+
if(isset(WPF()->sbscrb->options['from_email']) && WPF()->sbscrb->options['from_email']){
|
880 |
+
return WPF()->sbscrb->options['from_email'];
|
|
|
881 |
}
|
882 |
else{
|
883 |
return $email;
|
885 |
}
|
886 |
|
887 |
function wpforo_mail_from_name(){
|
888 |
+
if(isset(WPF()->sbscrb->options['from_name']) && WPF()->sbscrb->options['from_name']){ return WPF()->sbscrb->options['from_name']; } else {return get_option('blogname');}
|
889 |
}
|
890 |
|
891 |
function wpforo_mail_from_email(){
|
892 |
+
if(isset(WPF()->sbscrb->options['from_email']) && WPF()->sbscrb->options['from_email']){return WPF()->sbscrb->options['from_email'];} else {return get_option( 'admin_email' );}
|
893 |
}
|
894 |
|
895 |
function wpforo_mail_headers($from_name = '', $from_email = '', $cc = array(), $bcc = array()){
|
|
|
896 |
$H = array();
|
897 |
if(!$from_name) $from_name = wpforo_mail_from_name();
|
898 |
if(!$from_email) $from_email = wpforo_mail_from_email();
|
907 |
}
|
908 |
|
909 |
function wpforo_admin_mail_headers($from_name = '', $from_email = '', $cc = array(), $bcc = array()){
|
|
|
910 |
$H = array();
|
911 |
if(!$from_name) $from_name = wpforo_mail_from_name();
|
912 |
if(!$from_email) $from_email = wpforo_mail_from_email();
|
913 |
$H[] = 'From: ' . $from_name . ' <' . $from_email . '>';
|
914 |
if(empty($cc)){
|
915 |
+
$cc = trim(WPF()->sbscrb->options['admin_emails']);
|
916 |
$cc = explode(',', $cc);
|
917 |
$cc = array_map('trim', $cc);
|
918 |
}
|
928 |
############### Sending Email end ##############
|
929 |
|
930 |
function wpforo_frontend_enqueue(){
|
|
|
|
|
|
|
931 |
if( is_wpforo_page() ){
|
932 |
wp_enqueue_script('jquery-ui-core');
|
933 |
wp_enqueue_script('jquery-ui-dialog');
|
934 |
wp_register_script( 'wpforo-frontend-js', WPFORO_URL . '/wpf-assets/js/frontend.js', array('jquery'), WPFORO_VERSION, false );
|
935 |
wp_enqueue_script('wpforo-frontend-js');
|
936 |
+
wp_localize_script('wpforo-frontend-js', 'wpforo_phrases', WPF()->phrase->phrases);
|
937 |
+
if( wpforo_feature( 'font-awesome') ){
|
938 |
wp_register_style('wpforo-font-awesome', WPFORO_URL . '/wpf-assets/css/font-awesome/css/font-awesome.min.css', false, '4.7' );
|
939 |
wp_enqueue_style('wpforo-font-awesome');
|
940 |
if (is_rtl()) {
|
969 |
add_action('wp_enqueue_scripts', 'wpforo_frontend_enqueue');
|
970 |
|
971 |
function wpforo_add_into_wp_head(){
|
972 |
+
if(!WPF()->perm->forum_can('va')){
|
|
|
|
|
973 |
?>
|
974 |
<script type="text/javascript">
|
975 |
jQuery(document).ready(function($){
|
976 |
$(document).on('click','.attach_cant_view', function(){
|
977 |
+
var msg_box = jQuery("#wpf-msg-box");
|
978 |
+
var load = jQuery('#wpforo-load');
|
979 |
+
msg_box.hide();
|
980 |
+
load.visible();
|
981 |
+
msg_box.html("<p><?php echo addslashes( ( is_user_logged_in() ? WPF()->post->options['attach_cant_view_msg'] : sprintf( wpforo_phrase('Please %s or %s', FALSE), '<a href="' . wpforo_login_url() . '">'.wpforo_phrase('Login', FALSE).'</a>', '<a href="' . wpforo_register_url() . '">'.wpforo_phrase('Register', FALSE).'</a>' ) ) ) ?></p>");
|
982 |
+
msg_box.show(150).delay(1000);
|
983 |
+
load.invisible();
|
984 |
});
|
985 |
});
|
986 |
</script>
|
991 |
|
992 |
function wpforo_dynamic_style() {
|
993 |
|
994 |
+
if(!is_wpforo_page()) return false;
|
995 |
|
|
|
996 |
$inline = false;
|
997 |
$dynamic_css_file = WPFORO_TEMPLATE_DIR . '/colors.css';
|
998 |
$dynamic_css_matrix = WPFORO_TEMPLATE_DIR . '/styles/css.php';
|
999 |
+
if( isset(WPF()->tpl->options) ){
|
1000 |
+
if( !isset(WPF()->tpl->options['style']) || !isset(WPF()->tpl->options['styles']) ) return false;
|
1001 |
+
$style = WPF()->tpl->options['style'];
|
1002 |
+
$styles = WPF()->tpl->options['styles'];
|
1003 |
if( !empty($style) && !empty($styles) ){
|
1004 |
foreach( $styles[$style] as $color_key => $color_value ){
|
1005 |
if( $color_value ) {
|
1055 |
add_action( 'wp_enqueue_scripts', 'wpforo_dynamic_style', 12 );
|
1056 |
|
1057 |
function wpforo_style_options($css, $COLORS){
|
|
|
1058 |
if( !isset($css)) return;
|
1059 |
+
if( isset(WPF()->tpl->style['font_size_forum']) && WPF()->tpl->style['font_size_forum'] != 17 ){
|
1060 |
+
$css .= "\r\n#wpforo-wrap .wpforo-forum-title{font-size: " . intval(WPF()->tpl->style['font_size_forum']) . "px!important; line-height: " . (intval(WPF()->tpl->style['font_size_forum']) + 1) . "px!important;}";
|
1061 |
}
|
1062 |
+
if( isset(WPF()->tpl->style['font_size_topic']) && WPF()->tpl->style['font_size_topic'] != 16 ){
|
1063 |
+
$css .= "\r\n#wpforo-wrap .wpforo-topic-title a { font-size: " . intval(WPF()->tpl->style['font_size_topic']) . "px!important; line-height: " . (intval(WPF()->tpl->style['font_size_topic']) + 4) . "px!important; }";
|
1064 |
}
|
1065 |
+
if( isset(WPF()->tpl->style['font_size_post_content']) && WPF()->tpl->style['font_size_post_content'] != 14 ){
|
1066 |
+
$css .= "\r\n#wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content {font-size: " . intval(WPF()->tpl->style['font_size_post_content']) . "px!important; line-height: " . (intval(WPF()->tpl->style['font_size_post_content']) + 4) . "px!important;}\r\n#wpforo-wrap .wpforo-post .wpf-right .wpforo-post-content p {font-size: " . intval(WPF()->tpl->style['font_size_post_content']) . "px;}";
|
1067 |
}
|
1068 |
+
if( isset(WPF()->tpl->style['custom_css']) ){
|
1069 |
+
$css .= "\r\n" . stripslashes(WPF()->tpl->style['custom_css']);
|
1070 |
}
|
1071 |
return $css;
|
1072 |
}
|
1073 |
add_filter( 'wpforo_dynamic_css_filter' , 'wpforo_style_options' , 10, 2 );
|
1074 |
|
1075 |
function wpforo_admin_enqueue(){
|
1076 |
+
$phrases = array(
|
|
|
1077 |
'move' => __('Move', 'wpforo'),
|
1078 |
'delete' => __('Delete', 'wpforo')
|
1079 |
);
|
1080 |
if( !empty($_GET['page']) && FALSE !== strpos( $_GET['page'], 'wpforo' ) ){
|
1081 |
+
if( wpforo_feature( 'font-awesome') ){
|
1082 |
wp_register_style('wpforo-font-awesome', WPFORO_URL . '/wpf-assets/css/font-awesome/css/font-awesome.min.css', false, '4.6.3' );
|
1083 |
wp_enqueue_style('wpforo-font-awesome');
|
1084 |
}
|
1141 |
|
1142 |
function wpforo_userform_to_wpuser_html_form($wp_user){
|
1143 |
if( is_super_admin() ){
|
|
|
|
|
1144 |
if( is_object($wp_user) ){
|
1145 |
+
$user = WPF()->member->get_member($wp_user->ID);
|
1146 |
$groupid = $user['groupid'];
|
1147 |
$timezone = $user['timezone'];
|
1148 |
}
|
1154 |
<th scope="row"><label for="wpforo_usergroup">' . __('wpForo Usergroup', 'wpforo') . '</label></th>
|
1155 |
<td>
|
1156 |
<select name="wpforo_usergroup" id="wpforo_usergroup">';
|
1157 |
+
WPF()->usergroup->show_selectbox($groupid);
|
1158 |
echo ' </select>
|
1159 |
</td>
|
1160 |
</tr>
|
1175 |
add_action( 'edit_user_profile', 'wpforo_userform_to_wpuser_html_form' );
|
1176 |
|
1177 |
function wpforo_do_hook_user_register($userid){
|
1178 |
+
WPF()->member->synchronize_user($userid);
|
|
|
1179 |
}
|
1180 |
add_action( 'user_register', 'wpforo_do_hook_user_register', 10, 1 );
|
1181 |
|
1182 |
function wpforo_do_hook_update_profile($userid){
|
|
|
1183 |
if( isset($_POST['wpforo_usergroup']) && $_POST['wpforo_usergroup'] ){
|
1184 |
+
WPF()->member->edit_profile( array( 'userid' => intval($userid),
|
1185 |
'groupid' => intval($_POST['wpforo_usergroup']),
|
1186 |
'site' => esc_url($_POST['url']),
|
1187 |
'about' => wpforo_kses($_POST['description'], 'user_description'),
|
1188 |
'timezone' => ( isset($_POST['wpforo_usertimezone']) ? sanitize_text_field($_POST['wpforo_usertimezone']) : '' ) ) );
|
1189 |
}
|
1190 |
+
WPF()->member->reset($userid);
|
1191 |
}
|
1192 |
add_action('personal_options_update', 'wpforo_do_hook_update_profile');
|
1193 |
add_action('edit_user_profile_update', 'wpforo_do_hook_update_profile');
|
1194 |
|
1195 |
function wpforo_update_last_login_date($user_login, $user = array()){
|
1196 |
if(empty($user)) return;
|
1197 |
+
WPF()->member->edit_profile( array( 'userid' => intval($user->ID), 'last_login' => current_time( 'mysql', 1 ) ) );
|
|
|
1198 |
}
|
1199 |
add_action('wp_login', 'wpforo_update_last_login_date', 10, 2);
|
1200 |
|
1201 |
function wpforo_do_hook_deleted_user($userid){
|
|
|
1202 |
if( !empty($_REQUEST['wpforo_user_delete_option']) && $_REQUEST['wpforo_user_delete_option'] == 'reassign' && !empty($_REQUEST['wpforo_reassign_user']) ){
|
1203 |
+
WPF()->member->delete( $userid, $_REQUEST['wpforo_reassign_user'] );
|
1204 |
}else{
|
1205 |
+
WPF()->member->delete( $userid );
|
1206 |
}
|
1207 |
+
WPF()->notice->clear();
|
1208 |
}
|
1209 |
add_action( 'deleted_user', 'wpforo_do_hook_deleted_user' );
|
1210 |
|
1211 |
function wpforo_avatar( $avatar, $id_or_email, $size, $default, $alt ) {
|
1212 |
+
if(!wpforo_feature('replace-avatar')) return $avatar;
|
|
|
1213 |
$user = false;
|
1214 |
if ( is_numeric( $id_or_email ) ) {
|
1215 |
$id = (int) $id_or_email;
|
1224 |
}
|
1225 |
|
1226 |
if( $user && is_object( $user ) ){
|
1227 |
+
if( $src = WPF()->member->get_avatar_url($user->data->ID) ){
|
1228 |
$avatar = "<img alt='" . esc_attr($alt) . "' src='" . esc_url($src) . "' class='avatar avatar-" . esc_attr($size) . " photo' height='" . esc_attr($size) . "' width='" . esc_attr($size) . "' />";
|
1229 |
}
|
1230 |
}
|
1232 |
}
|
1233 |
add_filter( 'get_avatar' , 'wpforo_avatar' , 10, 5 );
|
1234 |
|
1235 |
+
function wpforo_mention_nickname_to_link($match){
|
1236 |
+
$return = $match[0];
|
1237 |
+
if( $member = WPF()->member->get_member($match[2]) ){
|
1238 |
+
$href = WPF()->member->profile_url($member);
|
1239 |
+
$dname = wpforo_make_dname($member['display_name'], $member['user_nicename']);
|
1240 |
+
$return = sprintf('%s<a href="%s" title="%s">@%s</a>%s', $match[1], $href, $dname, $match[2], $match[3]);
|
1241 |
+
}
|
1242 |
+
|
1243 |
+
return $return;
|
1244 |
+
}
|
1245 |
+
|
1246 |
+
function wpforo_mentioned_code_to_link($text){
|
1247 |
+
$text = htmlspecialchars_decode($text);
|
1248 |
+
$text = preg_replace_callback('#(^|[\r\n\t\s\0<>\[\]])@([^\r\n\t\s\0<>\[\]]+)($|[\r\n\t\s\0<>\[\]])#isu', 'wpforo_mention_nickname_to_link', $text);
|
1249 |
+
return $text;
|
1250 |
+
}
|
1251 |
+
add_filter('wpforo_body_text_filter', 'wpforo_mentioned_code_to_link');
|
1252 |
+
|
1253 |
+
function wpforo_send_mail_to_mentioned_users($item){
|
1254 |
+
if( !WPF()->sbscrb->options['user_mention_notify'] ) return false;
|
1255 |
+
$return = false;
|
1256 |
+
$body = strip_tags($item['body']);
|
1257 |
+
if( preg_match_all('#(?:^|[\r\n\t\s\0<>\[\]])@([^\r\n\t\s\0<>\[\]]+)(?:$|[\r\n\t\s\0<>\[\]])#isu', $body, $matches, PREG_SET_ORDER) ){
|
1258 |
+
|
1259 |
+
$dname = wpforo_make_dname( WPF()->current_user['display_name'], WPF()->current_user['user_nicename'] );
|
1260 |
+
$_to_words = array($dname);
|
1261 |
+
if( array_key_exists('first_postid', $item) ){
|
1262 |
+
$_to_words[] = $item['title'];
|
1263 |
+
$_to_words[] = $item['topicurl'];
|
1264 |
+
}else{
|
1265 |
+
$_to_words[] = wpforo_topic($item['topicid'], 'title');
|
1266 |
+
$_to_words[] = $item['posturl'];
|
1267 |
+
}
|
1268 |
+
|
1269 |
+
$_subject = WPF()->sbscrb->options['user_mention_email_subject'];
|
1270 |
+
$_message = WPF()->sbscrb->options['user_mention_email_message'];
|
1271 |
+
$_from_tags = array("[author-user-name]", "[topic-title]", "[post-url]");
|
1272 |
+
$_subject = str_replace($_from_tags, $_to_words, $_subject);
|
1273 |
+
$_message = str_replace($_from_tags, $_to_words, $_message);
|
1274 |
+
|
1275 |
+
add_filter( 'wp_mail_content_type', 'wpforo_set_html_content_type' );
|
1276 |
+
foreach ( $matches as $match ){
|
1277 |
+
$member = WPF()->member->get_member($match[1]);
|
1278 |
+
if( !empty($member['user_email']) ){
|
1279 |
+
|
1280 |
+
if( WPF()->current_userid == $member['userid'] ) continue;
|
1281 |
+
|
1282 |
+
if( in_array($member['user_email'], WPF()->sbscrb->already_sent_emails) ) continue;
|
1283 |
+
|
1284 |
+
if( isset($item['private']) && $item['private'] ){
|
1285 |
+
if( !WPF()->perm->forum_can('vp', $item['forumid'], $member['groupid']) ) continue;
|
1286 |
+
}
|
1287 |
+
if( isset($item['status']) && $item['status'] ){
|
1288 |
+
if( !WPF()->perm->forum_can('au', $item['forumid'], $member['groupid']) ) continue;
|
1289 |
+
}
|
1290 |
+
|
1291 |
+
$dname = wpforo_make_dname($member['display_name'], $member['user_nicename']);
|
1292 |
+
$subject = stripslashes(str_replace('[mentioned-user-name]', $dname, $_subject));
|
1293 |
+
$message = stripslashes(str_replace('[mentioned-user-name]', $dname, $_message));
|
1294 |
+
$message = wpforo_kses($message, 'email');
|
1295 |
+
|
1296 |
+
if( $return = wp_mail( $member['user_email'], sanitize_text_field($subject), $message, wpforo_mail_headers() ) ){
|
1297 |
+
WPF()->sbscrb->already_sent_emails[] = $member['user_email'];
|
1298 |
+
}
|
1299 |
+
}
|
1300 |
+
}
|
1301 |
+
remove_filter( 'wp_mail_content_type', 'wpforo_set_html_content_type' );
|
1302 |
+
|
1303 |
+
}
|
1304 |
+
|
1305 |
+
return $return;
|
1306 |
+
}
|
1307 |
+
add_action( 'wpforo_after_add_topic', 'wpforo_send_mail_to_mentioned_users' );
|
1308 |
+
add_action( 'wpforo_after_add_post', 'wpforo_send_mail_to_mentioned_users' );
|
1309 |
+
|
1310 |
function wpforo_topic_auto_subscribe($item){
|
1311 |
if(!is_user_logged_in()) return FALSE;
|
1312 |
if(!isset($_POST['wpforo_topic_subs']) || !$_POST['wpforo_topic_subs'] ) return FALSE;
|
1313 |
|
|
|
|
|
1314 |
if( isset($item['forumid']) && $item['forumid'] ){
|
1315 |
if( isset($item['private']) && $item['private'] && !wpforo_is_owner($item['userid']) ){
|
1316 |
+
if( !WPF()->perm->forum_can('vp', $item['forumid']) ){
|
1317 |
+
WPF()->notice->add('You are not permitted to subscribe here', 'error');
|
1318 |
return FALSE;
|
1319 |
}
|
1320 |
}
|
1323 |
}
|
1324 |
}
|
1325 |
else{
|
1326 |
+
WPF()->notice->add('Forum ID is not detected', 'error');
|
1327 |
return FALSE;
|
1328 |
}
|
1329 |
|
1330 |
$args = array(
|
1331 |
'itemid' => intval($item['topicid']),
|
1332 |
'type' => 'topic',
|
1333 |
+
'userid' => intval(WPF()->current_userid)
|
1334 |
);
|
1335 |
|
1336 |
+
$args['confirmkey'] = WPF()->sbscrb->get_confirm_key();
|
1337 |
|
1338 |
+
if( wpforo_feature('subscribe_conf') ){
|
1339 |
############### Sending Email ##################
|
1340 |
+
$confirmlink = WPF()->sbscrb->get_confirm_link($args);
|
1341 |
+
$member_name = (isset(WPF()->current_user_display_name) && WPF()->current_user_display_name) ? WPF()->current_user_display_name : urldecode(WPF()->current_user['user_nicename']);
|
1342 |
+
$subject = WPF()->sbscrb->options['confirmation_email_subject'];
|
1343 |
+
$message = WPF()->sbscrb->options['confirmation_email_message'];
|
1344 |
+
$topic = WPF()->topic->get_topic( $item['topicid'] );
|
1345 |
$from_tags = array("[member_name]", "[entry_title]", "[confirm_link]");
|
1346 |
$to_words = array(sanitize_text_field($member_name), '<strong>' . sanitize_text_field($topic['title']) . '</strong>', '<br><br><a href="' . esc_url($confirmlink) . '"> ' . wpforo_phrase('Confirm my subscription', false) . ' </a>');
|
1347 |
$subject = stripslashes(str_replace($from_tags, $to_words, $subject));
|
1351 |
add_filter( 'wp_mail_content_type', 'wpforo_set_html_content_type' );
|
1352 |
$headers = wpforo_mail_headers();
|
1353 |
|
1354 |
+
if( wp_mail( WPF()->current_user_email , sanitize_text_field($subject), $message, $headers ) ){
|
1355 |
+
if( $response = WPF()->sbscrb->add($args) ) return $response;
|
1356 |
}else{
|
1357 |
+
WPF()->notice->add('Can\'t send confirmation email', 'error');
|
1358 |
return FALSE;
|
1359 |
}
|
1360 |
remove_filter( 'wp_mail_content_type', 'wpforo_set_html_content_type' );
|
1361 |
############### Sending Email end ##############
|
1362 |
}else{
|
1363 |
$args['active'] = 1;
|
1364 |
+
if( $response = WPF()->sbscrb->add($args) ) return $response;
|
1365 |
}
|
1366 |
return FALSE;
|
1367 |
}
|
1368 |
+
add_action( 'wpforo_after_add_topic', 'wpforo_topic_auto_subscribe' );
|
1369 |
+
add_action( 'wpforo_after_add_post', 'wpforo_topic_auto_subscribe' );
|
1370 |
|
1371 |
function wpforo_forum_subscribers_mail_sender( $topic ){
|
1372 |
|
1373 |
if( defined('IS_GO2WPFORO') && IS_GO2WPFORO ) return;
|
1374 |
|
1375 |
+
$subscribers = WPF()->sbscrb->get_subscribes( array( 'itemid' => $topic['forumid'], 'type' => 'forum' ) );
|
1376 |
+
if( WPF()->sbscrb->options['new_topic_notify'] ){
|
1377 |
+
$admin_emails = explode(',', WPF()->sbscrb->options['admin_emails']);
|
|
|
|
|
1378 |
foreach( $admin_emails as $admin_email ) $subscribers[] = sanitize_email( $admin_email );
|
1379 |
}
|
1380 |
|
1383 |
foreach($subscribers as $subscriber){
|
1384 |
|
1385 |
if( is_array($subscriber) ){
|
1386 |
+
$member = WPF()->member->get_member( $subscriber['userid'] );
|
1387 |
+
$unsubscribe_link = WPF()->sbscrb->get_unsubscribe_link($subscriber['confirmkey']);
|
1388 |
}else{
|
1389 |
$member = array('display_name' => $subscriber, 'user_email' => $subscriber);
|
1390 |
$unsubscribe_link = '#';
|
1392 |
|
1393 |
if( isset($topic['forumid']) && $topic['forumid'] ){
|
1394 |
if( isset($topic['private']) && $topic['private'] && isset($subscriber['userid']) && $topic['userid'] != $subscriber['userid'] ){
|
1395 |
+
$subscriber_groupid = ( isset($member['groupid']) && $member['groupid'] ) ? $member['groupid'] : WPF()->usergroup->get_groupid_by_userid($subscriber['userid']);
|
1396 |
+
if( !WPF()->perm->forum_can('vp', $topic['forumid'], $subscriber_groupid) ){
|
1397 |
continue;
|
1398 |
}
|
1399 |
}
|
1400 |
if( isset($topic['status']) && $topic['status'] == 1 && isset($subscriber['userid']) ){
|
1401 |
+
$subscriber_groupid = ( isset($member['groupid']) && $member['groupid'] ) ? $member['groupid'] : WPF()->usergroup->get_groupid_by_userid($subscriber['userid']);
|
1402 |
+
if( !WPF()->perm->forum_can('au', $topic['forumid'], $subscriber_groupid) ){
|
1403 |
continue;
|
1404 |
}
|
1405 |
}
|
1408 |
$owner = wpforo_member( $topic );
|
1409 |
|
1410 |
if($owner['user_email'] == $member['user_email']) continue;
|
1411 |
+
if( in_array($member['user_email'], WPF()->sbscrb->already_sent_emails) ) continue;
|
1412 |
|
1413 |
+
$forum = WPF()->forum->get_forum( $topic['forumid'] );
|
1414 |
|
1415 |
############### Sending Email ##################
|
1416 |
|
1423 |
$mod_text = '';
|
1424 |
}
|
1425 |
|
1426 |
+
$subject = WPF()->sbscrb->options['new_topic_notification_email_subject'];
|
1427 |
+
$message = WPF()->sbscrb->options['new_topic_notification_email_message'];
|
1428 |
|
1429 |
$from_tags = array( "[member_name]", "[forum]", "[unsubscribe_link]", "[topic_title]", "[topic_desc]");
|
1430 |
$to_words = array( sanitize_text_field($member['display_name']),
|
1447 |
|
1448 |
}
|
1449 |
}
|
1450 |
+
add_action( 'wpforo_after_add_topic', 'wpforo_forum_subscribers_mail_sender', 12);
|
1451 |
|
1452 |
|
1453 |
|
1455 |
|
1456 |
if( defined('IS_GO2WPFORO') && IS_GO2WPFORO ) return;
|
1457 |
|
1458 |
+
$subscribers = WPF()->sbscrb->get_subscribes( array( 'itemid' => $post['topicid'], 'type' => 'topic' ) );
|
1459 |
+
if( WPF()->sbscrb->options['new_reply_notify'] ){
|
1460 |
+
$admin_emails = explode(',', WPF()->sbscrb->options['admin_emails']);
|
|
|
|
|
1461 |
foreach( $admin_emails as $admin_email ) $subscribers[] = sanitize_email( $admin_email );
|
1462 |
}
|
1463 |
|
1464 |
+
$topic = WPF()->topic->get_topic( $post['topicid'] );
|
1465 |
|
1466 |
$subscribers = apply_filters('wpforo_topic_subscribers', $subscribers);
|
1467 |
|
1468 |
foreach($subscribers as $subscriber){
|
1469 |
|
1470 |
if( is_array($subscriber) ){
|
1471 |
+
$member = WPF()->member->get_member( $subscriber['userid'] );
|
1472 |
+
$unsubscribe_link = WPF()->sbscrb->get_unsubscribe_link($subscriber['confirmkey']);
|
1473 |
}else{
|
1474 |
$member = array('display_name' => $subscriber, 'user_email' => $subscriber);
|
1475 |
$unsubscribe_link = '#';
|
1477 |
|
1478 |
$owner = wpforo_member( $post );
|
1479 |
if($owner['user_email'] == $member['user_email']) continue;
|
1480 |
+
if( in_array($member['user_email'], WPF()->sbscrb->already_sent_emails) ) continue;
|
1481 |
|
1482 |
if( isset($topic['forumid']) && $topic['forumid'] && isset($subscriber['userid']) ){
|
1483 |
|
1484 |
+
$subscriber_groupid = ( isset($member['groupid']) && $member['groupid'] ) ? $member['groupid'] : WPF()->usergroup->get_groupid_by_userid($subscriber['userid']);
|
1485 |
|
1486 |
if( isset($topic['private']) && $topic['private'] && $topic['userid'] != $subscriber['userid']){
|
1487 |
+
if( !WPF()->perm->forum_can('vp', $topic['forumid'], $subscriber_groupid) ){
|
1488 |
continue;
|
1489 |
}
|
1490 |
}
|
1491 |
if( isset($topic['status']) && $topic['status'] == 1){
|
1492 |
+
if( !WPF()->perm->forum_can('au', $topic['forumid'], $subscriber_groupid) ){
|
1493 |
continue;
|
1494 |
}
|
1495 |
}
|
1496 |
if( isset($post['status']) && $post['status'] == 1){
|
1497 |
+
if( !WPF()->perm->forum_can('au', $topic['forumid'], $subscriber_groupid) ){
|
1498 |
continue;
|
1499 |
}
|
1500 |
}
|
1511 |
$mod_text = '';
|
1512 |
}
|
1513 |
|
1514 |
+
$subject = WPF()->sbscrb->options['new_post_notification_email_subject'];
|
1515 |
+
$message = WPF()->sbscrb->options['new_post_notification_email_message'];
|
1516 |
|
1517 |
$from_tags = array( "[member_name]", "[topic]", "[unsubscribe_link]", "[reply_title]", "[reply_desc]");
|
1518 |
$to_words = array( sanitize_text_field($member['display_name']),
|
1540 |
|
1541 |
function wpforo_add_default_attachment($args){
|
1542 |
if( !empty($_FILES['attachfile']) && !empty($_FILES['attachfile']['name']) ){
|
1543 |
+
if( WPF()->perm->can_attach() ){
|
|
|
1544 |
$name = sanitize_file_name($_FILES['attachfile']['name']); //myimg.png
|
1545 |
$type = sanitize_mime_type($_FILES['attachfile']['type']); //image/png
|
1546 |
$tmp_name = sanitize_text_field($_FILES['attachfile']['tmp_name']); //D:\wamp\tmp\php986B.tmp
|
1559 |
);
|
1560 |
|
1561 |
if( $error ){
|
1562 |
+
WPF()->notice->add($phpFileUploadErrors[$error], 'error');
|
1563 |
return $args;
|
1564 |
+
}elseif( $size > WPF()->post->options['max_upload_size'] ){
|
1565 |
+
WPF()->notice->add('The uploaded file size is too big', 'error');
|
1566 |
return $args;
|
1567 |
}
|
1568 |
|
1579 |
$allowed_types = implode('|', $mime_types);
|
1580 |
$expld = explode('|', $allowed_types);
|
1581 |
if( !in_array($ext, $expld) ){
|
1582 |
+
WPF()->notice->add('File type is not allowed', 'error');
|
1583 |
return $args;
|
1584 |
}
|
1585 |
+
if( !WPF()->perm->can_attach_file_type($ext) ){
|
1586 |
+
WPF()->notice->add('You are not allowed to attach this file type', 'error');
|
1587 |
return $args;
|
1588 |
}
|
1589 |
}
|
1612 |
$args['body'] .= "\r\n" . '<div id="wpfa-' . $attach_id . '" class="wpforo-attached-file"><a class="wpforo-default-attachment" href="' . esc_url($attach_url.'/'.$attach_fname) . '" target="_blank"><i class="fa fa-paperclip"></i>' . esc_html(basename($name)) . '</a></div>';
|
1613 |
$args['has_attach'] = 1;
|
1614 |
}else{
|
1615 |
+
WPF()->notice->add('Can`t upload file', 'error');
|
1616 |
return $args;
|
1617 |
}
|
1618 |
}
|
1633 |
}
|
1634 |
|
1635 |
function wpforo_default_attachments_filter($text){
|
|
|
|
|
1636 |
if( preg_match_all('#<a[^<>]*class=[\'"]wpforo-default-attachment[\'"][^<>]*href=[\'"]([^\'"]+)[\'"][^<>]*>[\r\n\t\s\0]*(?:<i[^<>]*>[\r\n\t\s\0]*</i>[\r\n\t\s\0]*)?([^<>]*)</a>#isu', $text, $matches, PREG_SET_ORDER) ){
|
1637 |
foreach( $matches as $match ){
|
1638 |
$attach_html = '';
|
1644 |
$filedir = str_replace( basename($filedir), urldecode( basename($filedir) ), $filedir );
|
1645 |
|
1646 |
if(file_exists($filedir)){
|
1647 |
+
if(!WPF()->perm->forum_can('va')){
|
1648 |
$attach_html .= '<br/><div class="wpfa-item wpfa-file"><a class="attach_cant_view" style="cursor:pointer;"><span style="color:#666;">' . wpforo_phrase('Attachment', FALSE) . ':</span> ' . urldecode( basename($filename) ) . '</a></div>';
|
1649 |
}
|
1650 |
}
|
1675 |
|
1676 |
|
1677 |
function wpforo_add_adminbar_links( $wp_admin_bar ) {
|
|
|
1678 |
$args = array(
|
1679 |
'id' => 'new-forum',
|
1680 |
'title' => __('New Forum', 'wpforo'),
|
1699 |
);
|
1700 |
$wp_admin_bar->add_node( $args );
|
1701 |
|
1702 |
+
if( WPF()->current_user_groupid == 1 ||
|
1703 |
+
WPF()->current_user_groupid == 2 ||
|
1704 |
+
WPF()->perm->usergroup_can('vm') ||
|
1705 |
+
( WPF()->perm->usergroup_can('cf') &&
|
1706 |
+
WPF()->perm->usergroup_can('ef') &&
|
1707 |
+
WPF()->perm->usergroup_can('df') )
|
1708 |
){
|
1709 |
$args = array(
|
1710 |
'id' => 'wpf-community',
|
1713 |
);
|
1714 |
$wp_admin_bar->add_node( $args );
|
1715 |
}
|
1716 |
+
if( WPF()->perm->usergroup_can('cf') && WPF()->perm->usergroup_can('ef') && WPF()->perm->usergroup_can('df') ){
|
1717 |
$args = array(
|
1718 |
'id' => 'wpf-forums',
|
1719 |
'title' => __('Forums', 'wpforo'),
|
1729 |
);
|
1730 |
$wp_admin_bar->add_node( $args );
|
1731 |
}
|
1732 |
+
if( WPF()->current_user_groupid == 1 ){
|
1733 |
$args = array(
|
1734 |
'id' => 'wpf-settings',
|
1735 |
'title' => __('Settings', 'wpforo'),
|
1738 |
);
|
1739 |
$wp_admin_bar->add_node( $args );
|
1740 |
}
|
1741 |
+
if( WPF()->current_user_groupid == 1 ){
|
1742 |
$args = array(
|
1743 |
'id' => 'wpf-tools',
|
1744 |
'title' => __('Tools', 'wpforo'),
|
1747 |
);
|
1748 |
$wp_admin_bar->add_node( $args );
|
1749 |
}
|
1750 |
+
if( WPF()->perm->usergroup_can('aum') ){
|
1751 |
$args = array(
|
1752 |
'id' => 'wpf-moderation',
|
1753 |
'title' => __('Moderation', 'wpforo'),
|
1756 |
);
|
1757 |
$wp_admin_bar->add_node( $args );
|
1758 |
}
|
1759 |
+
if( WPF()->perm->usergroup_can('vm') ){
|
1760 |
$args = array(
|
1761 |
'id' => 'wpf-members',
|
1762 |
'title' => __('Members', 'wpforo'),
|
1765 |
);
|
1766 |
$wp_admin_bar->add_node( $args );
|
1767 |
}
|
1768 |
+
if( WPF()->current_user_groupid == 1 ){
|
1769 |
$args = array(
|
1770 |
'id' => 'wpf-usergroups',
|
1771 |
'title' => __('Usergroups', 'wpforo'),
|
1781 |
);
|
1782 |
$wp_admin_bar->add_node( $args );
|
1783 |
}
|
1784 |
+
if( WPF()->current_user_groupid == 1 ){
|
1785 |
$args = array(
|
1786 |
'id' => 'wpf-phrases',
|
1787 |
'title' => __('Phrases', 'wpforo'),
|
1797 |
);
|
1798 |
$wp_admin_bar->add_node( $args );
|
1799 |
}
|
1800 |
+
if( WPF()->current_user_groupid == 1 ){
|
1801 |
$args = array(
|
1802 |
'id' => 'wpf-themes',
|
1803 |
'title' => __('Themes', 'wpforo'),
|
1806 |
);
|
1807 |
$wp_admin_bar->add_node( $args );
|
1808 |
}
|
1809 |
+
if( WPF()->current_user_groupid == 1 ){
|
1810 |
$args = array(
|
1811 |
'id' => 'wpf-addons',
|
1812 |
'title' => __('Addons', 'wpforo'),
|
1820 |
add_action( 'admin_bar_menu', 'wpforo_add_adminbar_links', 999 );
|
1821 |
|
1822 |
function wpforo_create_cache(){
|
1823 |
+
WPF()->cache->create();
|
|
|
1824 |
}
|
1825 |
add_action( 'wp_footer', 'wpforo_create_cache', 10 );
|
1826 |
|
1839 |
|
1840 |
function wpforo_redirect_to_custom_password_reset(){
|
1841 |
if ( 'GET' == $_SERVER['REQUEST_METHOD'] ) {
|
|
|
1842 |
// Verify key / login combo
|
1843 |
$user = check_password_reset_key( $_REQUEST['key'], $_REQUEST['login'] );
|
1844 |
if ( ! $user || is_wp_error( $user ) ) {
|
1845 |
if ( $user && $user->get_error_code() === 'expired_key' ) {
|
1846 |
+
WPF()->notice->add('The key is expired', 'error');
|
1847 |
} else {
|
1848 |
+
WPF()->notice->add('The key is invalid', 'error');
|
1849 |
}
|
1850 |
wp_redirect( wpforo_login_url() );
|
1851 |
exit;
|
1862 |
|
1863 |
function wpforo_do_lostpass(){
|
1864 |
if( isset($_POST['user_login']) && $_POST['user_login'] ){
|
|
|
|
|
1865 |
$errors = retrieve_password();
|
1866 |
if ( is_wp_error( $errors ) ) {
|
1867 |
// Errors found
|
1868 |
$redirect_url = wpforo_home_url( '?wpforo=lostpassword' );
|
1869 |
+
WPF()->notice->add(join( ',', $errors->get_error_codes()), 'error');
|
1870 |
} else {
|
1871 |
// Email sent
|
1872 |
$redirect_url = wpforo_login_url();
|
1873 |
+
WPF()->notice->add('Email has been sent', 'success');
|
1874 |
}
|
1875 |
|
1876 |
wp_safe_redirect( $redirect_url );
|
1881 |
|
1882 |
function wpforo_do_password_reset() {
|
1883 |
if ( 'POST' == $_SERVER['REQUEST_METHOD'] ) {
|
|
|
|
|
1884 |
$rp_key = $_REQUEST['rp_key'];
|
1885 |
$rp_login = $_REQUEST['rp_login'];
|
1886 |
|
1888 |
|
1889 |
if ( ! $user || is_wp_error( $user ) ) {
|
1890 |
if ( $user && $user->get_error_code() === 'expired_key' ) {
|
1891 |
+
WPF()->notice->add('The key is expired', 'error');
|
1892 |
} else {
|
1893 |
+
WPF()->notice->add('The key is invalid', 'error');
|
1894 |
}
|
1895 |
wp_redirect( wpforo_login_url() );
|
1896 |
exit();
|
1899 |
if ( isset( $_POST['pass1'] ) ) {
|
1900 |
if ( $_POST['pass1'] != $_POST['pass2'] ) {
|
1901 |
// Passwords don't match
|
1902 |
+
WPF()->notice->add('The password reset mismatch', 'error');
|
1903 |
$redirect_url = wpforo_home_url( '?wpforo=resetpassword&rp_key='.esc_attr( $rp_key ).'&rp_login='.esc_attr( $rp_login ) );;
|
1904 |
|
1905 |
wp_redirect( $redirect_url );
|
1908 |
|
1909 |
if ( empty( $_POST['pass1'] ) ) {
|
1910 |
// Password is empty
|
1911 |
+
WPF()->notice->add('The password reset empty', 'error');
|
1912 |
$redirect_url = wpforo_home_url( '?wpforo=resetpassword&rp_key='.esc_attr( $rp_key ).'&rp_login='.esc_attr( $rp_login ) );
|
1913 |
|
1914 |
wp_redirect( $redirect_url );
|
1921 |
$creds = array('user_login' => sanitize_user($rp_login), 'user_password' => $_POST['pass1'] );
|
1922 |
wp_signon($creds);
|
1923 |
|
1924 |
+
WPF()->notice->add('The password has been changed', 'success');
|
1925 |
wp_redirect( wpforo_login_url() );
|
1926 |
exit();
|
1927 |
}
|
1928 |
|
1929 |
+
WPF()->notice->add('Invalid request.', 'error');
|
1930 |
wp_redirect( wpforo_login_url() );
|
1931 |
exit();
|
1932 |
|
1936 |
//add_action( 'login_form_resetpass', 'wpforo_do_password_reset' );
|
1937 |
|
1938 |
function wpforo_replace_retrieve_password_message( $message, $key, $user_login, $user_data ) {
|
|
|
1939 |
if( wpforo_feature('resetpass-url') ){
|
1940 |
$reset_password_url = wpforo_home_url( '?wpforo=resetpassword&rp_key='.esc_attr( $key ).'&rp_login='.esc_attr( $user_login ) );
|
1941 |
+
if( empty(WPF()->sbscrb->options['reset_password_email_message']) ) return preg_replace('#<?http[^\r\n\t\s]+wp-login\.php[^\r\n\t\s]+#isu', "<$reset_password_url>", $message);
|
1942 |
+
return str_replace(array('[user_login]', '[reset_password_url]'), array($user_login, "<$reset_password_url>"), WPF()->sbscrb->options['reset_password_email_message']);
|
1943 |
}
|
1944 |
else{
|
1945 |
return $message;
|
1946 |
}
|
1947 |
}
|
1948 |
+
//add_filter( 'retrieve_password_message', 'wpforo_replace_retrieve_password_message', 10, 4 );
|
wpf-includes/wpf-phrases.php
CHANGED
@@ -257,8 +257,8 @@ $wpforo_phrases = array(
|
|
257 |
'Replace Author Avatar with Forum Profile Avatar' => __('Replace Author Avatar with Forum Profile Avatar', 'wpforo'),
|
258 |
'Replace Author Link to Forum Profile' => __('Replace Author Link to Forum Profile', 'wpforo'),
|
259 |
'Replace Comment Author Link to Forum Profile' => __('Replace Comment Author Link to Forum Profile', 'wpforo'),
|
260 |
-
'Replace Login Page URL to Forum URL' => __('Replace Login Page URL to Forum URL', 'wpforo'),
|
261 |
-
'Replace Registration Page URL to Forum URL' => __('Replace Registration Page URL to Forum URL', 'wpforo'),
|
262 |
'Replies' => __('Replies', 'wpforo'),
|
263 |
'Replies not found' => __('Replies not found', 'wpforo'),
|
264 |
'Reply' => __('Reply', 'wpforo'),
|
@@ -643,12 +643,11 @@ $wpforo_phrases = array(
|
|
643 |
'Welcome back %s!' => __('Welcome back %s!', 'wpforo'),
|
644 |
'Member Profile' => __('Member Profile', 'wpforo'),
|
645 |
'Member' => __('Member', 'wpforo'),
|
646 |
-
'You
|
647 |
'Turn WordPress to wpForo' => __('Turn WordPress to wpForo', 'wpforo'),
|
648 |
'This option will disable WordPress on front-end. Only forum pages will be available. wpForo will look like as a stand-alone forum.' => __('This option will disable WordPress on front-end. Only forum pages will be available. wpForo will look like as a stand-alone forum.', 'wpforo'),
|
649 |
|
650 |
// 1.1.2 //
|
651 |
-
'Can set topic private' => __('Can set topic private', 'wpforo'),
|
652 |
'Can set own topic private' => __('Can set own topic private', 'wpforo'),
|
653 |
'Can view private topic' => __('Can view private topic', 'wpforo'),
|
654 |
'private' => __('private', 'wpforo'),
|
@@ -682,7 +681,6 @@ $wpforo_phrases = array(
|
|
682 |
'approve' => __('approve', 'wpforo'),
|
683 |
'unapprove' => __('unapprove', 'wpforo'),
|
684 |
'--- Choose ---' => __('--- Choose ---', 'wpforo'),
|
685 |
-
'New' => __('New', 'wpforo'),
|
686 |
'Required field' => __('Required field', 'wpforo'),
|
687 |
|
688 |
// 1.4.0
|
@@ -698,5 +696,11 @@ $wpforo_phrases = array(
|
|
698 |
'Enable RSS Feed' => __('Enable RSS Feed', 'wpforo'),
|
699 |
'Members Search Type:' => __('Members Search Type', 'wpforo'),
|
700 |
'Recent Posts' => __('Recent Posts', 'wpforo'),
|
701 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
702 |
);
|
257 |
'Replace Author Avatar with Forum Profile Avatar' => __('Replace Author Avatar with Forum Profile Avatar', 'wpforo'),
|
258 |
'Replace Author Link to Forum Profile' => __('Replace Author Link to Forum Profile', 'wpforo'),
|
259 |
'Replace Comment Author Link to Forum Profile' => __('Replace Comment Author Link to Forum Profile', 'wpforo'),
|
260 |
+
'Replace Login Page URL to Forum Login Page URL' => __('Replace Login Page URL to Forum Login Page URL', 'wpforo'),
|
261 |
+
'Replace Registration Page URL to Forum Registration Page URL' => __('Replace Registration Page URL to Forum Registration Page URL', 'wpforo'),
|
262 |
'Replies' => __('Replies', 'wpforo'),
|
263 |
'Replies not found' => __('Replies not found', 'wpforo'),
|
264 |
'Reply' => __('Reply', 'wpforo'),
|
643 |
'Welcome back %s!' => __('Welcome back %s!', 'wpforo'),
|
644 |
'Member Profile' => __('Member Profile', 'wpforo'),
|
645 |
'Member' => __('Member', 'wpforo'),
|
646 |
+
'You do not have permission to view this page' => __('You do not have permission to view this page', 'wpforo'),
|
647 |
'Turn WordPress to wpForo' => __('Turn WordPress to wpForo', 'wpforo'),
|
648 |
'This option will disable WordPress on front-end. Only forum pages will be available. wpForo will look like as a stand-alone forum.' => __('This option will disable WordPress on front-end. Only forum pages will be available. wpForo will look like as a stand-alone forum.', 'wpforo'),
|
649 |
|
650 |
// 1.1.2 //
|
|
|
651 |
'Can set own topic private' => __('Can set own topic private', 'wpforo'),
|
652 |
'Can view private topic' => __('Can view private topic', 'wpforo'),
|
653 |
'private' => __('private', 'wpforo'),
|
681 |
'approve' => __('approve', 'wpforo'),
|
682 |
'unapprove' => __('unapprove', 'wpforo'),
|
683 |
'--- Choose ---' => __('--- Choose ---', 'wpforo'),
|
|
|
684 |
'Required field' => __('Required field', 'wpforo'),
|
685 |
|
686 |
// 1.4.0
|
696 |
'Enable RSS Feed' => __('Enable RSS Feed', 'wpforo'),
|
697 |
'Members Search Type:' => __('Members Search Type', 'wpforo'),
|
698 |
'Recent Posts' => __('Recent Posts', 'wpforo'),
|
699 |
+
'No posts were found here' => __('No posts were found here', 'wpforo'),
|
700 |
+
|
701 |
+
// 1.4.3
|
702 |
+
'forum link' => __('forum link', 'wpforo'),
|
703 |
+
'in forum' => __('in forum', 'wpforo'),
|
704 |
+
'You can mention a person using @nicename in post content to send that person an email message. When you post a topic or reply, forum sends an email message to the user letting them know that they have been mentioned on the post.' => __('You can mention a person using @nicename in post content to send that person an email message. When you post a topic or reply, forum sends an email message to the user letting them know that they have been mentioned on the post.', 'wpforo'),
|
705 |
+
|
706 |
);
|
wpf-languages/wpforo-he_IL.mo
CHANGED
Binary file
|
wpf-languages/wpforo-he_IL.po
CHANGED
@@ -1,3298 +1,3830 @@
|
|
1 |
-
# Copyright (C) 2016 gVectors Team
|
2 |
-
# This file is distributed under the same license as the wpForo package.
|
3 |
-
msgid ""
|
4 |
-
msgstr ""
|
5 |
-
"Project-Id-Version: Forum - wpForo\n"
|
6 |
-
"
|
7 |
-
"
|
8 |
-
"
|
9 |
-
"Language:
|
10 |
-
"
|
11 |
-
"
|
12 |
-
"Content-
|
13 |
-
"
|
14 |
-
"
|
15 |
-
"X-
|
16 |
-
"X-Poedit-
|
17 |
-
"X-Poedit-
|
18 |
-
"X-Poedit-
|
19 |
-
"
|
20 |
-
"
|
21 |
-
"
|
22 |
-
"X-Poedit-SearchPath-
|
23 |
-
"X-Poedit-SearchPath-
|
24 |
-
"X-Poedit-SearchPath-
|
25 |
-
"X-Poedit-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
"
|
35 |
-
"
|
36 |
-
"
|
37 |
-
"wpForo
|
38 |
-
"
|
39 |
-
"
|
40 |
-
"
|
41 |
-
"
|
42 |
-
"
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
#: wpf-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
#: wpf-admin/
|
72 |
-
#: wpf-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
#: wpf-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
#: wpf-
|
103 |
-
msgid "
|
104 |
-
msgstr "
|
105 |
-
|
106 |
-
#: wpf-admin/
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
"
|
115 |
-
|
116 |
-
|
117 |
-
"
|
118 |
-
"
|
119 |
-
|
120 |
-
|
121 |
-
"
|
122 |
-
"
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
#: wpf-includes/wpf-phrases.php:
|
170 |
-
msgid "
|
171 |
-
msgstr "
|
172 |
-
|
173 |
-
#: wpf-admin/dashboard.php:
|
174 |
-
msgid "
|
175 |
-
msgstr "
|
176 |
-
|
177 |
-
#: wpf-admin/dashboard.php:
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
"
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
#: wpf-includes/wpf-phrases.php:
|
235 |
-
msgid "
|
236 |
-
msgstr "
|
237 |
-
|
238 |
-
#: wpf-admin/
|
239 |
-
msgid "
|
240 |
-
msgstr "
|
241 |
-
|
242 |
-
#: wpf-admin/
|
243 |
-
msgid "
|
244 |
-
msgstr "
|
245 |
-
|
246 |
-
#: wpf-admin/forum.php:
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
#: wpf-admin/
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
#: wpf-
|
278 |
-
msgid "
|
279 |
-
msgstr ""
|
280 |
-
|
281 |
-
#: wpf-admin/forum.php:
|
282 |
-
msgid ""
|
283 |
-
"
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
#: wpf-
|
288 |
-
msgid ""
|
289 |
-
"
|
290 |
-
|
291 |
-
|
292 |
-
"
|
293 |
-
msgstr ""
|
294 |
-
|
295 |
-
#: wpf-admin/forum.php:
|
296 |
-
msgid "
|
297 |
-
msgstr ""
|
298 |
-
|
299 |
-
#: wpf-admin/forum.php:
|
300 |
-
msgid "
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
"
|
310 |
-
"
|
311 |
-
msgstr ""
|
312 |
-
|
313 |
-
#: wpf-admin/forum.php:
|
314 |
-
msgid "
|
315 |
-
msgstr ""
|
316 |
-
|
317 |
-
#: wpf-admin/forum.php:
|
318 |
-
msgid "
|
319 |
-
msgstr ""
|
320 |
-
|
321 |
-
#: wpf-admin/forum.php:
|
322 |
-
msgid "
|
323 |
-
msgstr ""
|
324 |
-
|
325 |
-
#: wpf-admin/forum.php:
|
326 |
-
msgid "
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
#: wpf-admin/
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
#: wpf-
|
364 |
-
msgid "
|
365 |
-
msgstr ""
|
366 |
-
|
367 |
-
#: wpf-admin/forum.php:
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
"
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
"
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
#: wpf-admin/
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
#: wpf-admin/options-tabs/accesses.php:
|
442 |
-
#: wpf-
|
443 |
-
msgid "
|
444 |
-
msgstr "
|
445 |
-
|
446 |
-
#: wpf-admin/options-tabs/accesses.php:
|
447 |
-
msgid ""
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
#: wpf-admin/options-tabs/accesses.php:
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
"
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
#: wpf-admin/options-tabs/
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
#: wpf-admin/
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
#: wpf-admin/options-tabs/
|
566 |
-
msgid "
|
567 |
-
msgstr "
|
568 |
-
|
569 |
-
#: wpf-admin/options-tabs/
|
570 |
-
msgid "
|
571 |
-
msgstr ""
|
572 |
-
|
573 |
-
#: wpf-admin/options-tabs/
|
574 |
-
msgid "
|
575 |
-
msgstr ""
|
576 |
-
|
577 |
-
#: wpf-admin/options-tabs/
|
578 |
-
msgid "
|
579 |
-
msgstr ""
|
580 |
-
|
581 |
-
#: wpf-admin/options-tabs/
|
582 |
-
msgid "
|
583 |
-
msgstr ""
|
584 |
-
|
585 |
-
#: wpf-admin/options-tabs/
|
586 |
-
msgid "
|
587 |
-
msgstr "
|
588 |
-
|
589 |
-
#: wpf-admin/options-tabs/
|
590 |
-
msgid "
|
591 |
-
msgstr ""
|
592 |
-
|
593 |
-
#: wpf-admin/options-tabs/
|
594 |
-
msgid "
|
595 |
-
msgstr ""
|
596 |
-
|
597 |
-
#: wpf-admin/options-tabs/
|
598 |
-
msgid "
|
599 |
-
msgstr ""
|
600 |
-
|
601 |
-
#: wpf-admin/options-tabs/
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
#: wpf-admin/
|
606 |
-
msgid "
|
607 |
-
msgstr ""
|
608 |
-
|
609 |
-
#: wpf-admin/options-tabs/features.php:
|
610 |
-
msgid ""
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
"
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
msgstr ""
|
669 |
-
|
670 |
-
#: wpf-admin/options-tabs/features.php:
|
671 |
-
msgid "
|
672 |
-
msgstr ""
|
673 |
-
|
674 |
-
#: wpf-admin/options-tabs/features.php:
|
675 |
-
msgid "
|
676 |
-
msgstr ""
|
677 |
-
|
678 |
-
#: wpf-admin/options-tabs/features.php:
|
679 |
-
msgid ""
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
"
|
692 |
-
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
"Enable
|
720 |
-
|
721 |
-
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
"
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
"
|
753 |
-
"
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
"
|
769 |
-
msgstr ""
|
770 |
-
|
771 |
-
#: wpf-admin/options-tabs/
|
772 |
-
msgid "
|
773 |
-
msgstr ""
|
774 |
-
|
775 |
-
#: wpf-admin/options-tabs/
|
776 |
-
msgid "
|
777 |
-
msgstr ""
|
778 |
-
|
779 |
-
#: wpf-admin/options-tabs/
|
780 |
-
msgid "
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
|
787 |
-
|
788 |
-
|
789 |
-
|
790 |
-
|
791 |
-
|
792 |
-
|
793 |
-
|
794 |
-
|
795 |
-
|
796 |
-
|
797 |
-
|
798 |
-
|
799 |
-
|
800 |
-
|
801 |
-
|
802 |
-
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
|
811 |
-
|
812 |
-
|
813 |
-
|
814 |
-
|
815 |
-
|
816 |
-
|
817 |
-
"
|
818 |
-
msgstr ""
|
819 |
-
|
820 |
-
#: wpf-admin/options-tabs/
|
821 |
-
msgid "
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
"
|
830 |
-
msgstr ""
|
831 |
-
|
832 |
-
#: wpf-admin/options-tabs/general.php:
|
833 |
-
msgid "
|
834 |
-
msgstr ""
|
835 |
-
|
836 |
-
#: wpf-admin/options-tabs/general.php:
|
837 |
-
msgid "
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
|
858 |
-
|
859 |
-
|
860 |
-
|
861 |
-
"
|
862 |
-
|
863 |
-
|
864 |
-
|
865 |
-
|
866 |
-
|
867 |
-
|
868 |
-
#: wpf-includes/wpf-phrases.php:
|
869 |
-
msgid "
|
870 |
-
msgstr ""
|
871 |
-
|
872 |
-
#: wpf-admin/options-tabs/
|
873 |
-
|
874 |
-
|
875 |
-
|
876 |
-
|
877 |
-
|
878 |
-
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
|
894 |
-
|
895 |
-
|
896 |
-
|
897 |
-
|
898 |
-
|
899 |
-
|
900 |
-
|
901 |
-
|
902 |
-
|
903 |
-
|
904 |
-
|
905 |
-
|
906 |
-
|
907 |
-
|
908 |
-
|
909 |
-
|
910 |
-
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
#: wpf-admin/options-tabs/
|
918 |
-
|
919 |
-
|
920 |
-
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
"
|
945 |
-
|
946 |
-
|
947 |
-
|
948 |
-
|
949 |
-
msgstr ""
|
950 |
-
|
951 |
-
#: wpf-admin/options-tabs/members.php:
|
952 |
-
|
953 |
-
|
954 |
-
|
955 |
-
|
956 |
-
|
957 |
-
#: wpf-
|
958 |
-
msgid ""
|
959 |
-
|
960 |
-
|
961 |
-
|
962 |
-
"
|
963 |
-
|
964 |
-
|
965 |
-
|
966 |
-
"
|
967 |
-
|
968 |
-
|
969 |
-
|
970 |
-
|
971 |
-
|
972 |
-
|
973 |
-
|
974 |
-
|
975 |
-
|
976 |
-
|
977 |
-
|
978 |
-
|
979 |
-
|
980 |
-
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
|
1003 |
-
msgstr ""
|
1004 |
-
|
1005 |
-
#: wpf-admin/options-tabs/
|
1006 |
-
msgid "
|
1007 |
-
msgstr "
|
1008 |
-
|
1009 |
-
#: wpf-admin/options-tabs/
|
1010 |
-
msgid "
|
1011 |
-
msgstr ""
|
1012 |
-
|
1013 |
-
#: wpf-admin/options-tabs/
|
1014 |
-
msgid "
|
1015 |
-
msgstr ""
|
1016 |
-
|
1017 |
-
#: wpf-admin/options-tabs/
|
1018 |
-
msgid "
|
1019 |
-
msgstr ""
|
1020 |
-
|
1021 |
-
#: wpf-admin/options-tabs/
|
1022 |
-
msgid ""
|
1023 |
-
"
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
1033 |
-
msgstr ""
|
1034 |
-
|
1035 |
-
#: wpf-admin/options-tabs/
|
1036 |
-
msgid "
|
1037 |
-
msgstr ""
|
1038 |
-
|
1039 |
-
#: wpf-admin/options-tabs/
|
1040 |
-
msgid "
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
|
1045 |
-
|
1046 |
-
|
1047 |
-
|
1048 |
-
|
1049 |
-
|
1050 |
-
|
1051 |
-
|
1052 |
-
|
1053 |
-
|
1054 |
-
|
1055 |
-
|
1056 |
-
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
1061 |
-
|
1062 |
-
|
1063 |
-
|
1064 |
-
|
1065 |
-
|
1066 |
-
|
1067 |
-
|
1068 |
-
|
1069 |
-
|
1070 |
-
|
1071 |
-
|
1072 |
-
|
1073 |
-
|
1074 |
-
|
1075 |
-
|
1076 |
-
|
1077 |
-
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
1082 |
-
|
1083 |
-
|
1084 |
-
|
1085 |
-
|
1086 |
-
|
1087 |
-
|
1088 |
-
|
1089 |
-
|
1090 |
-
|
1091 |
-
|
1092 |
-
|
1093 |
-
|
1094 |
-
|
1095 |
-
|
1096 |
-
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
|
1101 |
-
|
1102 |
-
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
|
1107 |
-
|
1108 |
-
|
1109 |
-
|
1110 |
-
|
1111 |
-
|
1112 |
-
|
1113 |
-
|
1114 |
-
|
1115 |
-
|
1116 |
-
|
1117 |
-
|
1118 |
-
|
1119 |
-
|
1120 |
-
|
1121 |
-
|
1122 |
-
|
1123 |
-
|
1124 |
-
|
1125 |
-
|
1126 |
-
|
1127 |
-
|
1128 |
-
|
1129 |
-
|
1130 |
-
|
1131 |
-
|
1132 |
-
|
1133 |
-
|
1134 |
-
|
1135 |
-
|
1136 |
-
|
1137 |
-
|
1138 |
-
|
1139 |
-
|
1140 |
-
|
1141 |
-
|
1142 |
-
|
1143 |
-
|
1144 |
-
|
1145 |
-
|
1146 |
-
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
|
1155 |
-
|
1156 |
-
|
1157 |
-
|
1158 |
-
|
1159 |
-
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
|
1166 |
-
|
1167 |
-
|
1168 |
-
|
1169 |
-
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
|
1176 |
-
|
1177 |
-
|
1178 |
-
|
1179 |
-
|
1180 |
-
|
1181 |
-
|
1182 |
-
|
1183 |
-
|
1184 |
-
|
1185 |
-
|
1186 |
-
|
1187 |
-
|
1188 |
-
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
|
1193 |
-
msgstr ""
|
1194 |
-
|
1195 |
-
|
1196 |
-
|
1197 |
-
|
1198 |
-
|
1199 |
-
|
1200 |
-
|
1201 |
-
|
1202 |
-
|
1203 |
-
|
1204 |
-
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
1208 |
-
|
1209 |
-
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
"
|
1219 |
-
|
1220 |
-
"
|
1221 |
-
"
|
1222 |
-
|
1223 |
-
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
-
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
-
|
1233 |
-
msgstr ""
|
1234 |
-
|
1235 |
-
#: wpf-
|
1236 |
-
msgid "
|
1237 |
-
msgstr ""
|
1238 |
-
|
1239 |
-
#: wpf-
|
1240 |
-
msgid "
|
1241 |
-
msgstr "
|
1242 |
-
|
1243 |
-
#: wpf-
|
1244 |
-
msgid "
|
1245 |
-
msgstr ""
|
1246 |
-
|
1247 |
-
#: wpf-
|
1248 |
-
msgid "
|
1249 |
-
msgstr ""
|
1250 |
-
|
1251 |
-
#: wpf-
|
1252 |
-
msgid "
|
1253 |
-
msgstr ""
|
1254 |
-
|
1255 |
-
#: wpf-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
-
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
1274 |
-
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
1282 |
-
|
1283 |
-
|
1284 |
-
|
1285 |
-
|
1286 |
-
|
1287 |
-
|
1288 |
-
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
|
1295 |
-
|
1296 |
-
|
1297 |
-
|
1298 |
-
|
1299 |
-
|
1300 |
-
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
1304 |
-
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
"
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
1318 |
-
#: wpf-
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
1326 |
-
|
1327 |
-
|
1328 |
-
|
1329 |
-
|
1330 |
-
#: wpf-
|
1331 |
-
msgid "
|
1332 |
-
msgstr ""
|
1333 |
-
|
1334 |
-
#: wpf-
|
1335 |
-
|
1336 |
-
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
|
1343 |
-
|
1344 |
-
|
1345 |
-
#: wpf-
|
1346 |
-
msgid "
|
1347 |
-
msgstr "
|
1348 |
-
|
1349 |
-
#: wpf-
|
1350 |
-
msgid "
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
1354 |
-
|
1355 |
-
|
1356 |
-
|
1357 |
-
|
1358 |
-
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
1366 |
-
|
1367 |
-
|
1368 |
-
|
1369 |
-
|
1370 |
-
|
1371 |
-
#: wpf-
|
1372 |
-
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
1378 |
-
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
1386 |
-
|
1387 |
-
|
1388 |
-
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
1394 |
-
|
1395 |
-
|
1396 |
-
|
1397 |
-
|
1398 |
-
|
1399 |
-
|
1400 |
-
#: wpf-
|
1401 |
-
msgid "
|
1402 |
-
msgstr "
|
1403 |
-
|
1404 |
-
#: wpf-
|
1405 |
-
|
1406 |
-
|
1407 |
-
|
1408 |
-
|
1409 |
-
|
1410 |
-
|
1411 |
-
|
1412 |
-
|
1413 |
-
|
1414 |
-
|
1415 |
-
|
1416 |
-
|
1417 |
-
|
1418 |
-
|
1419 |
-
|
1420 |
-
|
1421 |
-
|
1422 |
-
|
1423 |
-
|
1424 |
-
|
1425 |
-
|
1426 |
-
|
1427 |
-
|
1428 |
-
|
1429 |
-
|
1430 |
-
|
1431 |
-
|
1432 |
-
|
1433 |
-
|
1434 |
-
"
|
1435 |
-
msgstr ""
|
1436 |
-
|
1437 |
-
#: wpf-
|
1438 |
-
msgid "
|
1439 |
-
msgstr ""
|
1440 |
-
|
1441 |
-
#: wpf-
|
1442 |
-
msgid "
|
1443 |
-
msgstr "
|
1444 |
-
|
1445 |
-
#: wpf-
|
1446 |
-
msgid "
|
1447 |
-
msgstr "
|
1448 |
-
|
1449 |
-
#: wpf-
|
1450 |
-
msgid "
|
1451 |
-
msgstr "
|
1452 |
-
|
1453 |
-
#: wpf-
|
1454 |
-
msgid "
|
1455 |
-
msgstr "
|
1456 |
-
|
1457 |
-
#: wpf-includes/wpf-
|
1458 |
-
msgid ""
|
1459 |
-
|
1460 |
-
|
1461 |
-
|
1462 |
-
|
1463 |
-
|
1464 |
-
|
1465 |
-
|
1466 |
-
|
1467 |
-
|
1468 |
-
|
1469 |
-
|
1470 |
-
|
1471 |
-
|
1472 |
-
|
1473 |
-
|
1474 |
-
|
1475 |
-
|
1476 |
-
|
1477 |
-
|
1478 |
-
|
1479 |
-
|
1480 |
-
|
1481 |
-
|
1482 |
-
|
1483 |
-
|
1484 |
-
|
1485 |
-
|
1486 |
-
|
1487 |
-
|
1488 |
-
msgid "
|
1489 |
-
msgstr "
|
1490 |
-
|
1491 |
-
#: wpf-
|
1492 |
-
msgid "
|
1493 |
-
msgstr ""
|
1494 |
-
|
1495 |
-
#: wpf-includes/
|
1496 |
-
msgid "
|
1497 |
-
msgstr "
|
1498 |
-
|
1499 |
-
#: wpf-includes/
|
1500 |
-
msgid "
|
1501 |
-
msgstr "
|
1502 |
-
|
1503 |
-
#: wpf-includes/
|
1504 |
-
msgid "
|
1505 |
-
msgstr "
|
1506 |
-
|
1507 |
-
#: wpf-includes/
|
1508 |
-
msgid "
|
1509 |
-
|
1510 |
-
|
1511 |
-
|
1512 |
-
|
1513 |
-
|
1514 |
-
|
1515 |
-
#: wpf-includes/
|
1516 |
-
msgid "
|
1517 |
-
|
1518 |
-
|
1519 |
-
|
1520 |
-
|
1521 |
-
|
1522 |
-
|
1523 |
-
|
1524 |
-
|
1525 |
-
|
1526 |
-
|
1527 |
-
|
1528 |
-
|
1529 |
-
|
1530 |
-
|
1531 |
-
|
1532 |
-
|
1533 |
-
|
1534 |
-
|
1535 |
-
|
1536 |
-
|
1537 |
-
msgstr "
|
1538 |
-
|
1539 |
-
|
1540 |
-
|
1541 |
-
|
1542 |
-
|
1543 |
-
|
1544 |
-
|
1545 |
-
|
1546 |
-
|
1547 |
-
|
1548 |
-
|
1549 |
-
|
1550 |
-
|
1551 |
-
|
1552 |
-
|
1553 |
-
|
1554 |
-
|
1555 |
-
|
1556 |
-
|
1557 |
-
|
1558 |
-
|
1559 |
-
|
1560 |
-
|
1561 |
-
|
1562 |
-
msgstr ""
|
1563 |
-
|
1564 |
-
#: wpf-includes/wpf-phrases.php:
|
1565 |
-
msgid "
|
1566 |
-
msgstr "
|
1567 |
-
|
1568 |
-
#: wpf-includes/
|
1569 |
-
msgid "
|
1570 |
-
msgstr "
|
1571 |
-
|
1572 |
-
#: wpf-includes/
|
1573 |
-
msgid "
|
1574 |
-
msgstr "
|
1575 |
-
|
1576 |
-
#: wpf-includes/
|
1577 |
-
msgid "
|
1578 |
-
msgstr "
|
1579 |
-
|
1580 |
-
#: wpf-includes/wpf-phrases.php:
|
1581 |
-
|
1582 |
-
|
1583 |
-
|
1584 |
-
|
1585 |
-
|
1586 |
-
|
1587 |
-
|
1588 |
-
|
1589 |
-
|
1590 |
-
|
1591 |
-
|
1592 |
-
|
1593 |
-
|
1594 |
-
|
1595 |
-
|
1596 |
-
|
1597 |
-
|
1598 |
-
|
1599 |
-
|
1600 |
-
|
1601 |
-
|
1602 |
-
|
1603 |
-
|
1604 |
-
|
1605 |
-
|
1606 |
-
|
1607 |
-
|
1608 |
-
|
1609 |
-
|
1610 |
-
|
1611 |
-
|
1612 |
-
|
1613 |
-
|
1614 |
-
|
1615 |
-
|
1616 |
-
|
1617 |
-
|
1618 |
-
|
1619 |
-
|
1620 |
-
|
1621 |
-
|
1622 |
-
|
1623 |
-
|
1624 |
-
|
1625 |
-
|
1626 |
-
|
1627 |
-
|
1628 |
-
|
1629 |
-
|
1630 |
-
|
1631 |
-
|
1632 |
-
|
1633 |
-
|
1634 |
-
|
1635 |
-
|
1636 |
-
|
1637 |
-
|
1638 |
-
|
1639 |
-
|
1640 |
-
|
1641 |
-
|
1642 |
-
|
1643 |
-
|
1644 |
-
|
1645 |
-
|
1646 |
-
|
1647 |
-
|
1648 |
-
|
1649 |
-
|
1650 |
-
|
1651 |
-
|
1652 |
-
|
1653 |
-
|
1654 |
-
|
1655 |
-
|
1656 |
-
|
1657 |
-
|
1658 |
-
|
1659 |
-
|
1660 |
-
|
1661 |
-
|
1662 |
-
|
1663 |
-
|
1664 |
-
|
1665 |
-
#: wpf-includes/
|
1666 |
-
|
1667 |
-
|
1668 |
-
|
1669 |
-
|
1670 |
-
|
1671 |
-
|
1672 |
-
|
1673 |
-
#: wpf-includes/wpf-phrases.php:
|
1674 |
-
msgid "
|
1675 |
-
msgstr "
|
1676 |
-
|
1677 |
-
#: wpf-includes/wpf-phrases.php:
|
1678 |
-
msgid "
|
1679 |
-
msgstr "
|
1680 |
-
|
1681 |
-
#: wpf-includes/
|
1682 |
-
|
1683 |
-
|
1684 |
-
|
1685 |
-
|
1686 |
-
|
1687 |
-
|
1688 |
-
|
1689 |
-
|
1690 |
-
|
1691 |
-
|
1692 |
-
|
1693 |
-
|
1694 |
-
|
1695 |
-
|
1696 |
-
|
1697 |
-
|
1698 |
-
|
1699 |
-
|
1700 |
-
|
1701 |
-
|
1702 |
-
|
1703 |
-
|
1704 |
-
|
1705 |
-
|
1706 |
-
|
1707 |
-
|
1708 |
-
|
1709 |
-
|
1710 |
-
|
1711 |
-
|
1712 |
-
|
1713 |
-
|
1714 |
-
|
1715 |
-
|
1716 |
-
|
1717 |
-
|
1718 |
-
|
1719 |
-
|
1720 |
-
|
1721 |
-
|
1722 |
-
|
1723 |
-
|
1724 |
-
|
1725 |
-
|
1726 |
-
|
1727 |
-
|
1728 |
-
|
1729 |
-
|
1730 |
-
|
1731 |
-
|
1732 |
-
|
1733 |
-
#: wpf-includes/wpf-phrases.php:
|
1734 |
-
msgid "
|
1735 |
-
msgstr "
|
1736 |
-
|
1737 |
-
#: wpf-includes/wpf-
|
1738 |
-
|
1739 |
-
|
1740 |
-
|
1741 |
-
|
1742 |
-
|
1743 |
-
|
1744 |
-
|
1745 |
-
|
1746 |
-
|
1747 |
-
msgid "
|
1748 |
-
msgstr "
|
1749 |
-
|
1750 |
-
#: wpf-includes/wpf-phrases.php:
|
1751 |
-
msgid "
|
1752 |
-
msgstr "
|
1753 |
-
|
1754 |
-
#: wpf-includes/
|
1755 |
-
msgid "
|
1756 |
-
msgstr "
|
1757 |
-
|
1758 |
-
#: wpf-includes/
|
1759 |
-
msgid "
|
1760 |
-
msgstr "
|
1761 |
-
|
1762 |
-
#: wpf-includes/
|
1763 |
-
msgid "
|
1764 |
-
msgstr "
|
1765 |
-
|
1766 |
-
#: wpf-includes/
|
1767 |
-
msgid "
|
1768 |
-
msgstr "
|
1769 |
-
|
1770 |
-
#: wpf-includes/wpf-
|
1771 |
-
|
1772 |
-
|
1773 |
-
|
1774 |
-
|
1775 |
-
|
1776 |
-
|
1777 |
-
|
1778 |
-
|
1779 |
-
|
1780 |
-
|
1781 |
-
|
1782 |
-
|
1783 |
-
|
1784 |
-
|
1785 |
-
|
1786 |
-
|
1787 |
-
|
1788 |
-
|
1789 |
-
|
1790 |
-
|
1791 |
-
|
1792 |
-
|
1793 |
-
|
1794 |
-
|
1795 |
-
|
1796 |
-
|
1797 |
-
|
1798 |
-
|
1799 |
-
|
1800 |
-
|
1801 |
-
|
1802 |
-
|
1803 |
-
|
1804 |
-
|
1805 |
-
|
1806 |
-
|
1807 |
-
|
1808 |
-
|
1809 |
-
|
1810 |
-
|
1811 |
-
|
1812 |
-
|
1813 |
-
|
1814 |
-
|
1815 |
-
|
1816 |
-
|
1817 |
-
|
1818 |
-
|
1819 |
-
|
1820 |
-
|
1821 |
-
|
1822 |
-
|
1823 |
-
|
1824 |
-
|
1825 |
-
|
1826 |
-
|
1827 |
-
|
1828 |
-
|
1829 |
-
|
1830 |
-
msgstr "
|
1831 |
-
|
1832 |
-
#: wpf-includes/wpf-
|
1833 |
-
msgid "
|
1834 |
-
msgstr "
|
1835 |
-
|
1836 |
-
#: wpf-includes/wpf-phrases.php:
|
1837 |
-
msgid "
|
1838 |
-
msgstr "
|
1839 |
-
|
1840 |
-
#: wpf-includes/wpf-
|
1841 |
-
msgid "
|
1842 |
-
msgstr "
|
1843 |
-
|
1844 |
-
#: wpf-includes/wpf-
|
1845 |
-
msgid "
|
1846 |
-
msgstr "
|
1847 |
-
|
1848 |
-
#: wpf-includes/wpf-
|
1849 |
-
msgid "
|
1850 |
-
msgstr "
|
1851 |
-
|
1852 |
-
#: wpf-includes/wpf-
|
1853 |
-
msgid "
|
1854 |
-
|
1855 |
-
|
1856 |
-
|
1857 |
-
|
1858 |
-
|
1859 |
-
|
1860 |
-
|
1861 |
-
|
1862 |
-
|
1863 |
-
|
1864 |
-
|
1865 |
-
|
1866 |
-
|
1867 |
-
|
1868 |
-
|
1869 |
-
|
1870 |
-
|
1871 |
-
|
1872 |
-
|
1873 |
-
|
1874 |
-
msgstr "
|
1875 |
-
|
1876 |
-
#: wpf-includes/wpf-
|
1877 |
-
msgid "
|
1878 |
-
|
1879 |
-
|
1880 |
-
|
1881 |
-
|
1882 |
-
|
1883 |
-
|
1884 |
-
|
1885 |
-
|
1886 |
-
|
1887 |
-
|
1888 |
-
|
1889 |
-
|
1890 |
-
|
1891 |
-
|
1892 |
-
|
1893 |
-
|
1894 |
-
|
1895 |
-
|
1896 |
-
|
1897 |
-
|
1898 |
-
|
1899 |
-
|
1900 |
-
|
1901 |
-
|
1902 |
-
|
1903 |
-
|
1904 |
-
|
1905 |
-
|
1906 |
-
|
1907 |
-
|
1908 |
-
|
1909 |
-
|
1910 |
-
|
1911 |
-
|
1912 |
-
|
1913 |
-
|
1914 |
-
msgid "
|
1915 |
-
msgstr ""
|
1916 |
-
|
1917 |
-
#: wpf-includes/wpf-phrases.php:
|
1918 |
-
|
1919 |
-
|
1920 |
-
|
1921 |
-
|
1922 |
-
|
1923 |
-
|
1924 |
-
|
1925 |
-
|
1926 |
-
|
1927 |
-
|
1928 |
-
|
1929 |
-
|
1930 |
-
|
1931 |
-
|
1932 |
-
|
1933 |
-
|
1934 |
-
|
1935 |
-
|
1936 |
-
|
1937 |
-
|
1938 |
-
|
1939 |
-
|
1940 |
-
|
1941 |
-
|
1942 |
-
|
1943 |
-
|
1944 |
-
|
1945 |
-
|
1946 |
-
|
1947 |
-
|
1948 |
-
|
1949 |
-
|
1950 |
-
|
1951 |
-
|
1952 |
-
|
1953 |
-
|
1954 |
-
|
1955 |
-
|
1956 |
-
|
1957 |
-
|
1958 |
-
|
1959 |
-
|
1960 |
-
|
1961 |
-
|
1962 |
-
|
1963 |
-
|
1964 |
-
|
1965 |
-
|
1966 |
-
|
1967 |
-
|
1968 |
-
|
1969 |
-
|
1970 |
-
|
1971 |
-
|
1972 |
-
|
1973 |
-
|
1974 |
-
|
1975 |
-
|
1976 |
-
|
1977 |
-
|
1978 |
-
|
1979 |
-
|
1980 |
-
|
1981 |
-
|
1982 |
-
|
1983 |
-
|
1984 |
-
|
1985 |
-
|
1986 |
-
|
1987 |
-
|
1988 |
-
|
1989 |
-
|
1990 |
-
|
1991 |
-
|
1992 |
-
|
1993 |
-
|
1994 |
-
|
1995 |
-
|
1996 |
-
|
1997 |
-
|
1998 |
-
|
1999 |
-
|
2000 |
-
|
2001 |
-
|
2002 |
-
|
2003 |
-
|
2004 |
-
|
2005 |
-
|
2006 |
-
|
2007 |
-
|
2008 |
-
|
2009 |
-
|
2010 |
-
|
2011 |
-
|
2012 |
-
|
2013 |
-
|
2014 |
-
|
2015 |
-
|
2016 |
-
|
2017 |
-
|
2018 |
-
|
2019 |
-
|
2020 |
-
|
2021 |
-
|
2022 |
-
|
2023 |
-
|
2024 |
-
|
2025 |
-
|
2026 |
-
|
2027 |
-
|
2028 |
-
|
2029 |
-
|
2030 |
-
|
2031 |
-
|
2032 |
-
|
2033 |
-
|
2034 |
-
|
2035 |
-
|
2036 |
-
|
2037 |
-
|
2038 |
-
|
2039 |
-
|
2040 |
-
|
2041 |
-
|
2042 |
-
|
2043 |
-
|
2044 |
-
|
2045 |
-
|
2046 |
-
|
2047 |
-
|
2048 |
-
|
2049 |
-
|
2050 |
-
|
2051 |
-
|
2052 |
-
|
2053 |
-
|
2054 |
-
|
2055 |
-
|
2056 |
-
|
2057 |
-
|
2058 |
-
|
2059 |
-
|
2060 |
-
|
2061 |
-
|
2062 |
-
|
2063 |
-
|
2064 |
-
|
2065 |
-
|
2066 |
-
|
2067 |
-
|
2068 |
-
|
2069 |
-
|
2070 |
-
|
2071 |
-
|
2072 |
-
|
2073 |
-
|
2074 |
-
|
2075 |
-
|
2076 |
-
|
2077 |
-
|
2078 |
-
|
2079 |
-
|
2080 |
-
|
2081 |
-
|
2082 |
-
|
2083 |
-
|
2084 |
-
|
2085 |
-
|
2086 |
-
|
2087 |
-
|
2088 |
-
|
2089 |
-
|
2090 |
-
|
2091 |
-
|
2092 |
-
|
2093 |
-
|
2094 |
-
|
2095 |
-
|
2096 |
-
|
2097 |
-
|
2098 |
-
|
2099 |
-
|
2100 |
-
|
2101 |
-
|
2102 |
-
|
2103 |
-
|
2104 |
-
|
2105 |
-
|
2106 |
-
|
2107 |
-
|
2108 |
-
|
2109 |
-
|
2110 |
-
|
2111 |
-
|
2112 |
-
|
2113 |
-
|
2114 |
-
|
2115 |
-
|
2116 |
-
|
2117 |
-
|
2118 |
-
|
2119 |
-
|
2120 |
-
|
2121 |
-
"
|
2122 |
-
"
|
2123 |
-
|
2124 |
-
|
2125 |
-
|
2126 |
-
|
2127 |
-
|
2128 |
-
|
2129 |
-
|
2130 |
-
|
2131 |
-
|
2132 |
-
|
2133 |
-
|
2134 |
-
|
2135 |
-
|
2136 |
-
|
2137 |
-
"
|
2138 |
-
"
|
2139 |
-
|
2140 |
-
|
2141 |
-
|
2142 |
-
|
2143 |
-
|
2144 |
-
|
2145 |
-
|
2146 |
-
|
2147 |
-
|
2148 |
-
|
2149 |
-
|
2150 |
-
|
2151 |
-
|
2152 |
-
|
2153 |
-
|
2154 |
-
|
2155 |
-
|
2156 |
-
|
2157 |
-
|
2158 |
-
|
2159 |
-
|
2160 |
-
|
2161 |
-
|
2162 |
-
|
2163 |
-
|
2164 |
-
|
2165 |
-
|
2166 |
-
|
2167 |
-
|
2168 |
-
|
2169 |
-
|
2170 |
-
|
2171 |
-
|
2172 |
-
|
2173 |
-
|
2174 |
-
|
2175 |
-
|
2176 |
-
|
2177 |
-
|
2178 |
-
|
2179 |
-
|
2180 |
-
|
2181 |
-
|
2182 |
-
msgid ""
|
2183 |
-
"
|
2184 |
-
|
2185 |
-
|
2186 |
-
"
|
2187 |
-
"
|
2188 |
-
|
2189 |
-
#: wpf-includes/wpf-phrases.php:
|
2190 |
-
msgid "
|
2191 |
-
msgstr "
|
2192 |
-
|
2193 |
-
#: wpf-includes/wpf-phrases.php:
|
2194 |
-
msgid "
|
2195 |
-
msgstr "
|
2196 |
-
|
2197 |
-
#: wpf-includes/wpf-phrases.php:
|
2198 |
-
msgid "
|
2199 |
-
msgstr ""
|
2200 |
-
|
2201 |
-
#: wpf-includes/wpf-phrases.php:
|
2202 |
-
msgid ""
|
2203 |
-
|
2204 |
-
|
2205 |
-
|
2206 |
-
|
2207 |
-
|
2208 |
-
|
2209 |
-
|
2210 |
-
|
2211 |
-
|
2212 |
-
|
2213 |
-
|
2214 |
-
|
2215 |
-
|
2216 |
-
|
2217 |
-
|
2218 |
-
|
2219 |
-
|
2220 |
-
|
2221 |
-
|
2222 |
-
|
2223 |
-
|
2224 |
-
|
2225 |
-
|
2226 |
-
|
2227 |
-
|
2228 |
-
|
2229 |
-
|
2230 |
-
|
2231 |
-
|
2232 |
-
|
2233 |
-
|
2234 |
-
|
2235 |
-
|
2236 |
-
|
2237 |
-
|
2238 |
-
|
2239 |
-
|
2240 |
-
|
2241 |
-
|
2242 |
-
|
2243 |
-
|
2244 |
-
|
2245 |
-
|
2246 |
-
|
2247 |
-
|
2248 |
-
|
2249 |
-
|
2250 |
-
|
2251 |
-
|
2252 |
-
|
2253 |
-
|
2254 |
-
|
2255 |
-
|
2256 |
-
|
2257 |
-
|
2258 |
-
|
2259 |
-
|
2260 |
-
|
2261 |
-
|
2262 |
-
|
2263 |
-
|
2264 |
-
|
2265 |
-
|
2266 |
-
|
2267 |
-
|
2268 |
-
|
2269 |
-
|
2270 |
-
|
2271 |
-
|
2272 |
-
|
2273 |
-
|
2274 |
-
|
2275 |
-
|
2276 |
-
|
2277 |
-
|
2278 |
-
|
2279 |
-
|
2280 |
-
|
2281 |
-
|
2282 |
-
|
2283 |
-
|
2284 |
-
|
2285 |
-
|
2286 |
-
|
2287 |
-
|
2288 |
-
|
2289 |
-
|
2290 |
-
|
2291 |
-
|
2292 |
-
|
2293 |
-
|
2294 |
-
|
2295 |
-
|
2296 |
-
|
2297 |
-
|
2298 |
-
|
2299 |
-
|
2300 |
-
|
2301 |
-
|
2302 |
-
|
2303 |
-
|
2304 |
-
|
2305 |
-
|
2306 |
-
|
2307 |
-
|
2308 |
-
|
2309 |
-
|
2310 |
-
|
2311 |
-
|
2312 |
-
|
2313 |
-
|
2314 |
-
|
2315 |
-
|
2316 |
-
|
2317 |
-
|
2318 |
-
|
2319 |
-
|
2320 |
-
|
2321 |
-
|
2322 |
-
|
2323 |
-
|
2324 |
-
|
2325 |
-
|
2326 |
-
|
2327 |
-
|
2328 |
-
|
2329 |
-
|
2330 |
-
|
2331 |
-
|
2332 |
-
|
2333 |
-
|
2334 |
-
|
2335 |
-
|
2336 |
-
|
2337 |
-
|
2338 |
-
|
2339 |
-
|
2340 |
-
|
2341 |
-
|
2342 |
-
|
2343 |
-
|
2344 |
-
|
2345 |
-
|
2346 |
-
|
2347 |
-
|
2348 |
-
|
2349 |
-
|
2350 |
-
|
2351 |
-
|
2352 |
-
|
2353 |
-
|
2354 |
-
|
2355 |
-
|
2356 |
-
|
2357 |
-
|
2358 |
-
|
2359 |
-
|
2360 |
-
|
2361 |
-
|
2362 |
-
|
2363 |
-
|
2364 |
-
|
2365 |
-
|
2366 |
-
|
2367 |
-
|
2368 |
-
|
2369 |
-
|
2370 |
-
|
2371 |
-
|
2372 |
-
|
2373 |
-
|
2374 |
-
|
2375 |
-
|
2376 |
-
|
2377 |
-
|
2378 |
-
|
2379 |
-
|
2380 |
-
|
2381 |
-
|
2382 |
-
|
2383 |
-
|
2384 |
-
|
2385 |
-
|
2386 |
-
|
2387 |
-
|
2388 |
-
|
2389 |
-
|
2390 |
-
|
2391 |
-
|
2392 |
-
|
2393 |
-
|
2394 |
-
|
2395 |
-
|
2396 |
-
|
2397 |
-
|
2398 |
-
|
2399 |
-
|
2400 |
-
|
2401 |
-
|
2402 |
-
|
2403 |
-
|
2404 |
-
|
2405 |
-
|
2406 |
-
|
2407 |
-
|
2408 |
-
|
2409 |
-
|
2410 |
-
|
2411 |
-
|
2412 |
-
|
2413 |
-
|
2414 |
-
|
2415 |
-
|
2416 |
-
|
2417 |
-
|
2418 |
-
|
2419 |
-
|
2420 |
-
|
2421 |
-
|
2422 |
-
|
2423 |
-
|
2424 |
-
|
2425 |
-
|
2426 |
-
|
2427 |
-
|
2428 |
-
|
2429 |
-
|
2430 |
-
|
2431 |
-
|
2432 |
-
|
2433 |
-
|
2434 |
-
|
2435 |
-
|
2436 |
-
|
2437 |
-
|
2438 |
-
|
2439 |
-
|
2440 |
-
|
2441 |
-
|
2442 |
-
|
2443 |
-
|
2444 |
-
|
2445 |
-
|
2446 |
-
|
2447 |
-
|
2448 |
-
|
2449 |
-
|
2450 |
-
|
2451 |
-
|
2452 |
-
|
2453 |
-
|
2454 |
-
|
2455 |
-
|
2456 |
-
|
2457 |
-
|
2458 |
-
|
2459 |
-
|
2460 |
-
|
2461 |
-
|
2462 |
-
|
2463 |
-
|
2464 |
-
|
2465 |
-
|
2466 |
-
|
2467 |
-
|
2468 |
-
|
2469 |
-
|
2470 |
-
|
2471 |
-
|
2472 |
-
|
2473 |
-
|
2474 |
-
|
2475 |
-
|
2476 |
-
|
2477 |
-
|
2478 |
-
|
2479 |
-
|
2480 |
-
|
2481 |
-
|
2482 |
-
|
2483 |
-
|
2484 |
-
|
2485 |
-
|
2486 |
-
|
2487 |
-
|
2488 |
-
|
2489 |
-
|
2490 |
-
|
2491 |
-
|
2492 |
-
|
2493 |
-
|
2494 |
-
|
2495 |
-
|
2496 |
-
|
2497 |
-
|
2498 |
-
|
2499 |
-
|
2500 |
-
|
2501 |
-
|
2502 |
-
|
2503 |
-
|
2504 |
-
|
2505 |
-
|
2506 |
-
|
2507 |
-
|
2508 |
-
|
2509 |
-
|
2510 |
-
|
2511 |
-
|
2512 |
-
|
2513 |
-
|
2514 |
-
|
2515 |
-
|
2516 |
-
|
2517 |
-
|
2518 |
-
|
2519 |
-
|
2520 |
-
|
2521 |
-
|
2522 |
-
|
2523 |
-
|
2524 |
-
|
2525 |
-
|
2526 |
-
|
2527 |
-
|
2528 |
-
|
2529 |
-
|
2530 |
-
|
2531 |
-
|
2532 |
-
|
2533 |
-
|
2534 |
-
|
2535 |
-
|
2536 |
-
|
2537 |
-
|
2538 |
-
|
2539 |
-
|
2540 |
-
|
2541 |
-
|
2542 |
-
|
2543 |
-
|
2544 |
-
|
2545 |
-
|
2546 |
-
|
2547 |
-
|
2548 |
-
|
2549 |
-
|
2550 |
-
|
2551 |
-
|
2552 |
-
|
2553 |
-
|
2554 |
-
|
2555 |
-
|
2556 |
-
|
2557 |
-
|
2558 |
-
|
2559 |
-
|
2560 |
-
|
2561 |
-
|
2562 |
-
|
2563 |
-
|
2564 |
-
"
|
2565 |
-
|
2566 |
-
|
2567 |
-
|
2568 |
-
|
2569 |
-
|
2570 |
-
|
2571 |
-
|
2572 |
-
|
2573 |
-
|
2574 |
-
|
2575 |
-
|
2576 |
-
|
2577 |
-
|
2578 |
-
|
2579 |
-
|
2580 |
-
|
2581 |
-
|
2582 |
-
|
2583 |
-
|
2584 |
-
|
2585 |
-
|
2586 |
-
|
2587 |
-
|
2588 |
-
|
2589 |
-
|
2590 |
-
|
2591 |
-
|
2592 |
-
|
2593 |
-
|
2594 |
-
|
2595 |
-
|
2596 |
-
|
2597 |
-
|
2598 |
-
|
2599 |
-
|
2600 |
-
|
2601 |
-
|
2602 |
-
|
2603 |
-
|
2604 |
-
|
2605 |
-
|
2606 |
-
|
2607 |
-
|
2608 |
-
|
2609 |
-
|
2610 |
-
|
2611 |
-
|
2612 |
-
|
2613 |
-
|
2614 |
-
|
2615 |
-
|
2616 |
-
|
2617 |
-
|
2618 |
-
|
2619 |
-
|
2620 |
-
|
2621 |
-
|
2622 |
-
|
2623 |
-
|
2624 |
-
|
2625 |
-
|
2626 |
-
|
2627 |
-
|
2628 |
-
|
2629 |
-
|
2630 |
-
|
2631 |
-
|
2632 |
-
|
2633 |
-
|
2634 |
-
|
2635 |
-
|
2636 |
-
|
2637 |
-
|
2638 |
-
|
2639 |
-
|
2640 |
-
|
2641 |
-
|
2642 |
-
|
2643 |
-
|
2644 |
-
|
2645 |
-
|
2646 |
-
|
2647 |
-
|
2648 |
-
|
2649 |
-
|
2650 |
-
|
2651 |
-
|
2652 |
-
|
2653 |
-
|
2654 |
-
|
2655 |
-
|
2656 |
-
|
2657 |
-
|
2658 |
-
|
2659 |
-
|
2660 |
-
|
2661 |
-
|
2662 |
-
|
2663 |
-
|
2664 |
-
|
2665 |
-
|
2666 |
-
|
2667 |
-
|
2668 |
-
|
2669 |
-
|
2670 |
-
|
2671 |
-
|
2672 |
-
|
2673 |
-
|
2674 |
-
|
2675 |
-
|
2676 |
-
|
2677 |
-
|
2678 |
-
|
2679 |
-
|
2680 |
-
|
2681 |
-
|
2682 |
-
|
2683 |
-
|
2684 |
-
|
2685 |
-
|
2686 |
-
|
2687 |
-
|
2688 |
-
msgid "
|
2689 |
-
msgstr "
|
2690 |
-
|
2691 |
-
#: wpf-includes/wpf-phrases.php:
|
2692 |
-
msgid "
|
2693 |
-
msgstr "
|
2694 |
-
|
2695 |
-
#: wpf-includes/wpf-phrases.php:
|
2696 |
-
msgid "
|
2697 |
-
msgstr "
|
2698 |
-
|
2699 |
-
#: wpf-includes/wpf-phrases.php:
|
2700 |
-
msgid "
|
2701 |
-
msgstr "
|
2702 |
-
|
2703 |
-
#: wpf-includes/wpf-phrases.php:
|
2704 |
-
msgid "
|
2705 |
-
msgstr "
|
2706 |
-
|
2707 |
-
#: wpf-includes/wpf-phrases.php:
|
2708 |
-
|
2709 |
-
|
2710 |
-
|
2711 |
-
|
2712 |
-
|
2713 |
-
|
2714 |
-
|
2715 |
-
|
2716 |
-
|
2717 |
-
|
2718 |
-
|
2719 |
-
|
2720 |
-
|
2721 |
-
|
2722 |
-
|
2723 |
-
|
2724 |
-
|
2725 |
-
|
2726 |
-
|
2727 |
-
|
2728 |
-
|
2729 |
-
|
2730 |
-
|
2731 |
-
|
2732 |
-
|
2733 |
-
|
2734 |
-
|
2735 |
-
|
2736 |
-
|
2737 |
-
|
2738 |
-
|
2739 |
-
|
2740 |
-
|
2741 |
-
|
2742 |
-
|
2743 |
-
|
2744 |
-
|
2745 |
-
|
2746 |
-
|
2747 |
-
|
2748 |
-
|
2749 |
-
|
2750 |
-
|
2751 |
-
|
2752 |
-
|
2753 |
-
|
2754 |
-
|
2755 |
-
|
2756 |
-
|
2757 |
-
|
2758 |
-
|
2759 |
-
|
2760 |
-
|
2761 |
-
|
2762 |
-
|
2763 |
-
|
2764 |
-
|
2765 |
-
|
2766 |
-
|
2767 |
-
|
2768 |
-
|
2769 |
-
|
2770 |
-
|
2771 |
-
|
2772 |
-
|
2773 |
-
|
2774 |
-
|
2775 |
-
|
2776 |
-
|
2777 |
-
|
2778 |
-
|
2779 |
-
|
2780 |
-
|
2781 |
-
|
2782 |
-
|
2783 |
-
|
2784 |
-
|
2785 |
-
|
2786 |
-
|
2787 |
-
|
2788 |
-
|
2789 |
-
|
2790 |
-
|
2791 |
-
|
2792 |
-
|
2793 |
-
|
2794 |
-
|
2795 |
-
|
2796 |
-
|
2797 |
-
|
2798 |
-
|
2799 |
-
|
2800 |
-
|
2801 |
-
|
2802 |
-
|
2803 |
-
|
2804 |
-
|
2805 |
-
|
2806 |
-
|
2807 |
-
|
2808 |
-
|
2809 |
-
|
2810 |
-
|
2811 |
-
|
2812 |
-
|
2813 |
-
|
2814 |
-
|
2815 |
-
|
2816 |
-
|
2817 |
-
|
2818 |
-
|
2819 |
-
|
2820 |
-
|
2821 |
-
|
2822 |
-
|
2823 |
-
|
2824 |
-
|
2825 |
-
|
2826 |
-
|
2827 |
-
|
2828 |
-
|
2829 |
-
|
2830 |
-
|
2831 |
-
|
2832 |
-
|
2833 |
-
|
2834 |
-
|
2835 |
-
|
2836 |
-
|
2837 |
-
|
2838 |
-
|
2839 |
-
|
2840 |
-
|
2841 |
-
|
2842 |
-
|
2843 |
-
|
2844 |
-
|
2845 |
-
|
2846 |
-
|
2847 |
-
|
2848 |
-
|
2849 |
-
|
2850 |
-
|
2851 |
-
|
2852 |
-
|
2853 |
-
|
2854 |
-
|
2855 |
-
|
2856 |
-
|
2857 |
-
|
2858 |
-
|
2859 |
-
|
2860 |
-
|
2861 |
-
|
2862 |
-
|
2863 |
-
|
2864 |
-
|
2865 |
-
|
2866 |
-
|
2867 |
-
|
2868 |
-
|
2869 |
-
|
2870 |
-
|
2871 |
-
|
2872 |
-
|
2873 |
-
|
2874 |
-
|
2875 |
-
|
2876 |
-
|
2877 |
-
|
2878 |
-
|
2879 |
-
|
2880 |
-
|
2881 |
-
|
2882 |
-
|
2883 |
-
|
2884 |
-
|
2885 |
-
|
2886 |
-
|
2887 |
-
|
2888 |
-
|
2889 |
-
|
2890 |
-
|
2891 |
-
|
2892 |
-
|
2893 |
-
|
2894 |
-
|
2895 |
-
|
2896 |
-
|
2897 |
-
|
2898 |
-
|
2899 |
-
|
2900 |
-
|
2901 |
-
|
2902 |
-
|
2903 |
-
|
2904 |
-
|
2905 |
-
|
2906 |
-
|
2907 |
-
|
2908 |
-
|
2909 |
-
|
2910 |
-
|
2911 |
-
|
2912 |
-
|
2913 |
-
|
2914 |
-
|
2915 |
-
|
2916 |
-
|
2917 |
-
|
2918 |
-
|
2919 |
-
|
2920 |
-
|
2921 |
-
|
2922 |
-
|
2923 |
-
|
2924 |
-
|
2925 |
-
|
2926 |
-
|
2927 |
-
|
2928 |
-
|
2929 |
-
|
2930 |
-
|
2931 |
-
|
2932 |
-
|
2933 |
-
|
2934 |
-
|
2935 |
-
|
2936 |
-
|
2937 |
-
|
2938 |
-
|
2939 |
-
|
2940 |
-
|
2941 |
-
|
2942 |
-
|
2943 |
-
|
2944 |
-
|
2945 |
-
|
2946 |
-
|
2947 |
-
|
2948 |
-
|
2949 |
-
|
2950 |
-
|
2951 |
-
|
2952 |
-
|
2953 |
-
|
2954 |
-
|
2955 |
-
|
2956 |
-
|
2957 |
-
|
2958 |
-
|
2959 |
-
|
2960 |
-
|
2961 |
-
|
2962 |
-
|
2963 |
-
|
2964 |
-
|
2965 |
-
|
2966 |
-
|
2967 |
-
|
2968 |
-
|
2969 |
-
|
2970 |
-
|
2971 |
-
|
2972 |
-
|
2973 |
-
|
2974 |
-
|
2975 |
-
|
2976 |
-
|
2977 |
-
|
2978 |
-
|
2979 |
-
|
2980 |
-
|
2981 |
-
|
2982 |
-
|
2983 |
-
|
2984 |
-
|
2985 |
-
|
2986 |
-
|
2987 |
-
|
2988 |
-
|
2989 |
-
|
2990 |
-
|
2991 |
-
|
2992 |
-
|
2993 |
-
|
2994 |
-
|
2995 |
-
|
2996 |
-
|
2997 |
-
|
2998 |
-
|
2999 |
-
|
3000 |
-
|
3001 |
-
|
3002 |
-
|
3003 |
-
|
3004 |
-
|
3005 |
-
|
3006 |
-
|
3007 |
-
|
3008 |
-
|
3009 |
-
|
3010 |
-
|
3011 |
-
|
3012 |
-
|
3013 |
-
|
3014 |
-
|
3015 |
-
|
3016 |
-
|
3017 |
-
|
3018 |
-
|
3019 |
-
|
3020 |
-
|
3021 |
-
|
3022 |
-
|
3023 |
-
|
3024 |
-
|
3025 |
-
|
3026 |
-
|
3027 |
-
|
3028 |
-
|
3029 |
-
|
3030 |
-
|
3031 |
-
|
3032 |
-
|
3033 |
-
|
3034 |
-
|
3035 |
-
|
3036 |
-
|
3037 |
-
|
3038 |
-
|
3039 |
-
|
3040 |
-
|
3041 |
-
|
3042 |
-
|
3043 |
-
|
3044 |
-
|
3045 |
-
|
3046 |
-
|
3047 |
-
|
3048 |
-
|
3049 |
-
|
3050 |
-
|
3051 |
-
|
3052 |
-
|
3053 |
-
|
3054 |
-
|
3055 |
-
|
3056 |
-
|
3057 |
-
|
3058 |
-
|
3059 |
-
|
3060 |
-
|
3061 |
-
|
3062 |
-
|
3063 |
-
|
3064 |
-
|
3065 |
-
|
3066 |
-
|
3067 |
-
|
3068 |
-
|
3069 |
-
|
3070 |
-
|
3071 |
-
|
3072 |
-
|
3073 |
-
|
3074 |
-
|
3075 |
-
|
3076 |
-
|
3077 |
-
|
3078 |
-
|
3079 |
-
|
3080 |
-
|
3081 |
-
|
3082 |
-
|
3083 |
-
|
3084 |
-
|
3085 |
-
|
3086 |
-
|
3087 |
-
|
3088 |
-
|
3089 |
-
|
3090 |
-
|
3091 |
-
|
3092 |
-
|
3093 |
-
|
3094 |
-
|
3095 |
-
|
3096 |
-
|
3097 |
-
|
3098 |
-
|
3099 |
-
|
3100 |
-
|
3101 |
-
|
3102 |
-
|
3103 |
-
|
3104 |
-
|
3105 |
-
|
3106 |
-
|
3107 |
-
|
3108 |
-
|
3109 |
-
|
3110 |
-
|
3111 |
-
"
|
3112 |
-
"
|
3113 |
-
|
3114 |
-
|
3115 |
-
|
3116 |
-
|
3117 |
-
|
3118 |
-
|
3119 |
-
|
3120 |
-
|
3121 |
-
|
3122 |
-
|
3123 |
-
|
3124 |
-
|
3125 |
-
|
3126 |
-
|
3127 |
-
|
3128 |
-
|
3129 |
-
|
3130 |
-
|
3131 |
-
|
3132 |
-
|
3133 |
-
|
3134 |
-
|
3135 |
-
|
3136 |
-
|
3137 |
-
|
3138 |
-
|
3139 |
-
|
3140 |
-
|
3141 |
-
|
3142 |
-
|
3143 |
-
|
3144 |
-
|
3145 |
-
|
3146 |
-
|
3147 |
-
|
3148 |
-
|
3149 |
-
|
3150 |
-
|
3151 |
-
|
3152 |
-
|
3153 |
-
|
3154 |
-
|
3155 |
-
|
3156 |
-
|
3157 |
-
|
3158 |
-
|
3159 |
-
|
3160 |
-
|
3161 |
-
|
3162 |
-
|
3163 |
-
|
3164 |
-
|
3165 |
-
|
3166 |
-
|
3167 |
-
|
3168 |
-
|
3169 |
-
|
3170 |
-
|
3171 |
-
|
3172 |
-
|
3173 |
-
|
3174 |
-
|
3175 |
-
|
3176 |
-
|
3177 |
-
|
3178 |
-
|
3179 |
-
|
3180 |
-
|
3181 |
-
|
3182 |
-
|
3183 |
-
|
3184 |
-
|
3185 |
-
|
3186 |
-
|
3187 |
-
|
3188 |
-
|
3189 |
-
|
3190 |
-
|
3191 |
-
|
3192 |
-
|
3193 |
-
|
3194 |
-
|
3195 |
-
|
3196 |
-
|
3197 |
-
|
3198 |
-
|
3199 |
-
|
3200 |
-
|
3201 |
-
|
3202 |
-
|
3203 |
-
|
3204 |
-
|
3205 |
-
|
3206 |
-
|
3207 |
-
|
3208 |
-
|
3209 |
-
|
3210 |
-
|
3211 |
-
"
|
3212 |
-
msgstr ""
|
3213 |
-
|
3214 |
-
#: wpf-includes/wpf-phrases.php:
|
3215 |
-
msgid "
|
3216 |
-
msgstr ""
|
3217 |
-
|
3218 |
-
#: wpf-includes/wpf-phrases.php:
|
3219 |
-
msgid "
|
3220 |
-
msgstr ""
|
3221 |
-
|
3222 |
-
#: wpf-includes/wpf-phrases.php:
|
3223 |
-
msgid "
|
3224 |
-
msgstr "
|
3225 |
-
|
3226 |
-
#: wpf-includes/wpf-phrases.php:
|
3227 |
-
msgid "
|
3228 |
-
msgstr "
|
3229 |
-
|
3230 |
-
#: wpf-includes/wpf-phrases.php:
|
3231 |
-
msgid "
|
3232 |
-
msgstr "נושא
|
3233 |
-
|
3234 |
-
#: wpf-includes/wpf-phrases.php:
|
3235 |
-
msgid "
|
3236 |
-
msgstr "
|
3237 |
-
|
3238 |
-
#: wpf-includes/wpf-phrases.php:
|
3239 |
-
msgid "
|
3240 |
-
msgstr "
|
3241 |
-
|
3242 |
-
#: wpf-includes/wpf-phrases.php:
|
3243 |
-
msgid "You
|
3244 |
-
msgstr "אין לך
|
3245 |
-
|
3246 |
-
#: wpf-includes/wpf-phrases.php:
|
3247 |
-
msgid "
|
3248 |
-
msgstr "
|
3249 |
-
|
3250 |
-
#:
|
3251 |
-
msgid ""
|
3252 |
-
"
|
3253 |
-
|
3254 |
-
|
3255 |
-
|
3256 |
-
|
3257 |
-
|
3258 |
-
|
3259 |
-
"
|
3260 |
-
msgstr ""
|
3261 |
-
|
3262 |
-
#:
|
3263 |
-
msgid ""
|
3264 |
-
"
|
3265 |
-
|
3266 |
-
|
3267 |
-
|
3268 |
-
|
3269 |
-
|
3270 |
-
|
3271 |
-
|
3272 |
-
|
3273 |
-
|
3274 |
-
|
3275 |
-
|
3276 |
-
|
3277 |
-
|
3278 |
-
|
3279 |
-
"
|
3280 |
-
|
3281 |
-
|
3282 |
-
|
3283 |
-
|
3284 |
-
|
3285 |
-
|
3286 |
-
|
3287 |
-
|
3288 |
-
|
3289 |
-
|
3290 |
-
|
3291 |
-
|
3292 |
-
|
3293 |
-
|
3294 |
-
|
3295 |
-
|
3296 |
-
|
3297 |
-
|
3298 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# Copyright (C) 2016 gVectors Team
|
2 |
+
# This file is distributed under the same license as the wpForo package.
|
3 |
+
msgid ""
|
4 |
+
msgstr ""
|
5 |
+
"Project-Id-Version: Forum - wpForo\n"
|
6 |
+
"POT-Creation-Date: 2017-10-15 09:18+0300\n"
|
7 |
+
"PO-Revision-Date: 2017-10-19 08:50+0300\n"
|
8 |
+
"Last-Translator: Gal Zilberman\n"
|
9 |
+
"Language-Team: \n"
|
10 |
+
"Language: he_IL\n"
|
11 |
+
"MIME-Version: 1.0\n"
|
12 |
+
"Content-Type: text/plain; charset=UTF-8\n"
|
13 |
+
"Content-Transfer-Encoding: 8bit\n"
|
14 |
+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
+
"X-Generator: Poedit 1.8.12\n"
|
16 |
+
"X-Poedit-Basepath: ..\n"
|
17 |
+
"X-Poedit-WPHeader: wpforo.php\n"
|
18 |
+
"X-Poedit-SourceCharset: UTF-8\n"
|
19 |
+
"X-Poedit-KeywordsList: __;_e;_n:1,2;_x:1,2c;_ex:1,2c;_nx:4c,1,2;esc_attr__;"
|
20 |
+
"esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c;_n_noop:1,2;"
|
21 |
+
"_nx_noop:3c,1,2;__ngettext_noop:1,2\n"
|
22 |
+
"X-Poedit-SearchPath-0: .\n"
|
23 |
+
"X-Poedit-SearchPath-1: Downloads\n"
|
24 |
+
"X-Poedit-SearchPath-2: wpforo/pre 1/wpforo-he_IL.po\n"
|
25 |
+
"X-Poedit-SearchPath-3: wpforo/pre 1/wpforo-he_IL.mo\n"
|
26 |
+
"X-Poedit-SearchPathExcluded-0: *.js\n"
|
27 |
+
|
28 |
+
#: wpf-admin/addons.php:14 wpf-admin/addons.php:22
|
29 |
+
msgid "wpForo Addons"
|
30 |
+
msgstr ""
|
31 |
+
|
32 |
+
#: wpf-admin/addons.php:28
|
33 |
+
msgid ""
|
34 |
+
"All wpForo addons are being developed by wpForo developers at gVectors Team. "
|
35 |
+
"Addon prices also include a small donation to the hard work wpForo "
|
36 |
+
"developers do for free. When you buy an addon, you also donate the free "
|
37 |
+
"wpForo development and support. Addons are the only incoming source for "
|
38 |
+
"wpForo developers. wpForo is a premium forum plugin which will always be "
|
39 |
+
"available for free. There will never be paid and pro versions of this forum "
|
40 |
+
"board. We have another dozens of awesome features in our to-do list which "
|
41 |
+
"will also be added for free in future releases. So the free wpForo "
|
42 |
+
"development always stays on the first priority and wpForo is being extended "
|
43 |
+
"with new free functions and features even faster than before."
|
44 |
+
msgstr ""
|
45 |
+
|
46 |
+
#: wpf-admin/addons.php:51
|
47 |
+
msgid "Installed"
|
48 |
+
msgstr ""
|
49 |
+
|
50 |
+
#: wpf-admin/addons.php:55
|
51 |
+
msgid "Version"
|
52 |
+
msgstr ""
|
53 |
+
|
54 |
+
#: wpf-admin/addons.php:56
|
55 |
+
msgid "at least"
|
56 |
+
msgstr "לפחות"
|
57 |
+
|
58 |
+
#: wpf-admin/addons.php:58
|
59 |
+
msgid "Details | Buy"
|
60 |
+
msgstr ""
|
61 |
+
|
62 |
+
#: wpf-admin/addons.php:64
|
63 |
+
msgid "More information about"
|
64 |
+
msgstr "עוד פרטים אודות"
|
65 |
+
|
66 |
+
#: wpf-admin/admin.php:26 wpf-admin/admin.php:27
|
67 |
+
#: wpf-includes/wpf-phrases.php:599
|
68 |
+
msgid "Dashboard"
|
69 |
+
msgstr "לוח בקרה"
|
70 |
+
|
71 |
+
#: wpf-admin/admin.php:26 wpf-admin/admin.php:28 wpf-admin/dashboard.php:138
|
72 |
+
#: wpf-admin/options-tabs/styles.php:16 wpf-admin/options.php:15
|
73 |
+
#: wpf-includes/wpf-hooks.php:1668 wpf-includes/wpf-phrases.php:123
|
74 |
+
msgid "Forums"
|
75 |
+
msgstr "פורומים"
|
76 |
+
|
77 |
+
#: wpf-admin/admin.php:29 wpf-includes/wpf-hooks.php:22
|
78 |
+
#: wpf-includes/wpf-hooks.php:1684
|
79 |
+
msgid "Settings"
|
80 |
+
msgstr "הגדרות"
|
81 |
+
|
82 |
+
#: wpf-admin/admin.php:30 wpf-includes/wpf-hooks.php:1693
|
83 |
+
msgid "Tools"
|
84 |
+
msgstr "כלים"
|
85 |
+
|
86 |
+
#: wpf-admin/admin.php:31 wpf-includes/wpf-hooks.php:1702
|
87 |
+
msgid "Moderation"
|
88 |
+
msgstr "פיקוח"
|
89 |
+
|
90 |
+
#: wpf-admin/admin.php:32 wpf-admin/dashboard.php:150 wpf-admin/member.php:10
|
91 |
+
#: wpf-admin/options.php:18 wpf-includes/wpf-hooks.php:1711
|
92 |
+
#: wpf-includes/wpf-phrases.php:178
|
93 |
+
msgid "Members"
|
94 |
+
msgstr "משתמשים"
|
95 |
+
|
96 |
+
#: wpf-admin/admin.php:33 wpf-admin/usergroup.php:8
|
97 |
+
#: wpf-includes/wpf-hooks.php:1720
|
98 |
+
msgid "Usergroups"
|
99 |
+
msgstr "קבוצות משתמשים"
|
100 |
+
|
101 |
+
#: wpf-admin/admin.php:34 wpf-includes/wpf-hooks.php:1736
|
102 |
+
#: wpf-includes/wpf-phrases.php:600
|
103 |
+
msgid "Phrases"
|
104 |
+
msgstr "ביטויים"
|
105 |
+
|
106 |
+
#: wpf-admin/admin.php:35 wpf-includes/wpf-hooks.php:1752
|
107 |
+
#: wpf-includes/wpf-phrases.php:601
|
108 |
+
msgid "Themes"
|
109 |
+
msgstr "ערכות נושא"
|
110 |
+
|
111 |
+
#: wpf-admin/admin.php:36 wpf-admin/options.php:23
|
112 |
+
#: wpf-includes/wpf-hooks.php:1761 wpf-includes/wpf-phrases.php:25
|
113 |
+
msgid "Addons"
|
114 |
+
msgstr "הרחבות"
|
115 |
+
|
116 |
+
#: wpf-admin/dashboard.php:9 wpf-includes/wpf-phrases.php:409
|
117 |
+
msgid "wpForo Dashboard"
|
118 |
+
msgstr "לוח בקרה wpForo"
|
119 |
+
|
120 |
+
#: wpf-admin/dashboard.php:25 wpf-includes/wpf-phrases.php:362
|
121 |
+
msgid "Welcome Message"
|
122 |
+
msgstr "הודעת ברכה"
|
123 |
+
|
124 |
+
#: wpf-admin/dashboard.php:31
|
125 |
+
msgid ""
|
126 |
+
"Thank you for using wpForo! wpForo is a professional bulletin board for "
|
127 |
+
"WorPress, and the only forum software which comes with Multi-layout template "
|
128 |
+
"system.\n"
|
129 |
+
" The \"Extended\", \"Simplified\" and "
|
130 |
+
"\"Question & Answer\" layouts fit almost all type of discussions needs. "
|
131 |
+
"You can use wpForo for small and extremely large communities. \n"
|
132 |
+
" <br />If you found some issue or bug "
|
133 |
+
"please open a support topic in plugin page or in our support forum at "
|
134 |
+
"gVectors.com. If you liked wpForo please leave some good review for this "
|
135 |
+
"plugin. We really need your good reviews. \n"
|
136 |
+
" If you didn't like wpForo please leave a "
|
137 |
+
"list of issues and requirements you'd like us to fix and add in near future. "
|
138 |
+
"We're here to help you and improve wpForo as much as possible."
|
139 |
+
msgstr ""
|
140 |
+
|
141 |
+
#: wpf-admin/dashboard.php:60 wpf-includes/wpf-phrases.php:130
|
142 |
+
msgid "General Information"
|
143 |
+
msgstr "מידע כללי"
|
144 |
+
|
145 |
+
#: wpf-admin/dashboard.php:64 wpf-includes/wpf-phrases.php:369
|
146 |
+
msgid "You are currently running"
|
147 |
+
msgstr ""
|
148 |
+
|
149 |
+
#: wpf-admin/dashboard.php:65 wpf-includes/wpf-phrases.php:18
|
150 |
+
msgid "Active Theme"
|
151 |
+
msgstr "ערכת נושא פעילה"
|
152 |
+
|
153 |
+
#: wpf-admin/dashboard.php:66 wpf-includes/wpf-phrases.php:414
|
154 |
+
msgid "wpForo Website"
|
155 |
+
msgstr ""
|
156 |
+
|
157 |
+
#: wpf-admin/dashboard.php:67 wpf-includes/wpf-phrases.php:320
|
158 |
+
msgid "Support Forum"
|
159 |
+
msgstr "פורום תמיכה"
|
160 |
+
|
161 |
+
#: wpf-admin/dashboard.php:78 wpf-includes/wpf-phrases.php:290
|
162 |
+
msgid "Server Information"
|
163 |
+
msgstr "פרטי שרת"
|
164 |
+
|
165 |
+
#: wpf-admin/dashboard.php:112 wpf-includes/wpf-phrases.php:46
|
166 |
+
msgid "Available"
|
167 |
+
msgstr "זמין"
|
168 |
+
|
169 |
+
#: wpf-admin/dashboard.php:112 wpf-includes/wpf-phrases.php:209
|
170 |
+
msgid "Not available"
|
171 |
+
msgstr "לא זמין"
|
172 |
+
|
173 |
+
#: wpf-admin/dashboard.php:132 wpf-includes/wpf-phrases.php:49
|
174 |
+
msgid "Board Statistic"
|
175 |
+
msgstr "סטטיסטיקות"
|
176 |
+
|
177 |
+
#: wpf-admin/dashboard.php:142 wpf-admin/options-tabs/styles.php:22
|
178 |
+
#: wpf-includes/class-forums.php:660 wpf-includes/wpf-phrases.php:339
|
179 |
+
msgid "Topics"
|
180 |
+
msgstr "נושאים"
|
181 |
+
|
182 |
+
#: wpf-admin/dashboard.php:146 wpf-includes/class-forums.php:660
|
183 |
+
#: wpf-includes/wpf-phrases.php:233
|
184 |
+
msgid "Posts"
|
185 |
+
msgstr "שרשורים"
|
186 |
+
|
187 |
+
#: wpf-admin/dashboard.php:154 wpf-includes/wpf-phrases.php:179
|
188 |
+
msgid "Members Online"
|
189 |
+
msgstr "משתמשים זמינים"
|
190 |
+
|
191 |
+
#: wpf-admin/dashboard.php:164
|
192 |
+
msgid "Avatars Size"
|
193 |
+
msgstr ""
|
194 |
+
|
195 |
+
#: wpf-admin/dashboard.php:168
|
196 |
+
msgid "Default Attachments Size"
|
197 |
+
msgstr ""
|
198 |
+
|
199 |
+
#: wpf-admin/dashboard.php:174
|
200 |
+
msgid "Advanced Attachments"
|
201 |
+
msgstr ""
|
202 |
+
|
203 |
+
#: wpf-admin/dashboard.php:175
|
204 |
+
msgid "file(s)"
|
205 |
+
msgstr "קבצים"
|
206 |
+
|
207 |
+
#: wpf-admin/dashboard.php:178
|
208 |
+
msgid "Advanced Attachments Size"
|
209 |
+
msgstr ""
|
210 |
+
|
211 |
+
#: wpf-admin/dashboard.php:183
|
212 |
+
msgid "Total Size"
|
213 |
+
msgstr "סה\"כ גודל"
|
214 |
+
|
215 |
+
#: wpf-admin/dashboard.php:191 wpf-includes/wpf-phrases.php:611
|
216 |
+
msgid "Forum Maintenance"
|
217 |
+
msgstr ""
|
218 |
+
|
219 |
+
#: wpf-admin/dashboard.php:193
|
220 |
+
msgid ""
|
221 |
+
"This process may take a few seconds or dozens of minutes, please be patient "
|
222 |
+
"and don't close this page. If you got 500 Server Error please don't worry, "
|
223 |
+
"the data updating process is still working in MySQL server."
|
224 |
+
msgstr ""
|
225 |
+
|
226 |
+
#: wpf-admin/dashboard.php:202
|
227 |
+
msgid "Delete All Caches"
|
228 |
+
msgstr ""
|
229 |
+
|
230 |
+
#: wpf-admin/dashboard.php:203 wpf-includes/wpf-phrases.php:613
|
231 |
+
msgid "Update Forums Statistic"
|
232 |
+
msgstr ""
|
233 |
+
|
234 |
+
#: wpf-admin/dashboard.php:204 wpf-includes/wpf-phrases.php:614
|
235 |
+
msgid "Update Users Statistic"
|
236 |
+
msgstr ""
|
237 |
+
|
238 |
+
#: wpf-admin/dashboard.php:205 wpf-includes/wpf-phrases.php:615
|
239 |
+
msgid "Delete Phrase Cache"
|
240 |
+
msgstr ""
|
241 |
+
|
242 |
+
#: wpf-admin/dashboard.php:206 wpf-includes/wpf-phrases.php:636
|
243 |
+
msgid "Delete User Cache"
|
244 |
+
msgstr ""
|
245 |
+
|
246 |
+
#: wpf-admin/forum.php:13 wpf-includes/functions.php:775
|
247 |
+
#: wpf-includes/wpf-phrases.php:302
|
248 |
+
msgid "Show on screen"
|
249 |
+
msgstr "הצג/י על המסך"
|
250 |
+
|
251 |
+
#: wpf-admin/forum.php:15 wpf-admin/forum.php:119
|
252 |
+
#: wpf-includes/wpf-phrases.php:113
|
253 |
+
msgid "Forum Options"
|
254 |
+
msgstr "אפשרויות פורום"
|
255 |
+
|
256 |
+
#: wpf-admin/forum.php:16 wpf-includes/wpf-phrases.php:224
|
257 |
+
msgid "Permissions"
|
258 |
+
msgstr "הרשאות"
|
259 |
+
|
260 |
+
#: wpf-admin/forum.php:17 wpf-includes/wpf-phrases.php:307
|
261 |
+
msgid "Slug"
|
262 |
+
msgstr "מזהה לכתובת"
|
263 |
+
|
264 |
+
#: wpf-admin/forum.php:18 wpf-includes/wpf-phrases.php:112
|
265 |
+
msgid "Forum Meta"
|
266 |
+
msgstr "מידע מטא של הפורום"
|
267 |
+
|
268 |
+
#: wpf-admin/forum.php:21 wpf-includes/wpf-phrases.php:274
|
269 |
+
msgid "Screen Layout"
|
270 |
+
msgstr "תצוגת מסך"
|
271 |
+
|
272 |
+
#: wpf-admin/forum.php:22 wpf-includes/wpf-phrases.php:210
|
273 |
+
msgid "Number of Columns"
|
274 |
+
msgstr "מספר עמודות"
|
275 |
+
|
276 |
+
#: wpf-admin/forum.php:32 wpf-includes/functions.php:789
|
277 |
+
#: wpf-includes/wpf-phrases.php:275
|
278 |
+
msgid "Screen Options"
|
279 |
+
msgstr "הגדרות תצוגה"
|
280 |
+
|
281 |
+
#: wpf-admin/forum.php:43 wpf-includes/wpf-phrases.php:51
|
282 |
+
msgid "Categories and Forums"
|
283 |
+
msgstr "נושאים ופורומים"
|
284 |
+
|
285 |
+
#: wpf-admin/forum.php:44 wpf-admin/options-tabs/general.php:75
|
286 |
+
#: wpf-admin/themes.php:10 wpf-admin/usergroup.php:8
|
287 |
+
#: wpf-includes/wpf-phrases.php:20
|
288 |
+
msgid "Add New"
|
289 |
+
msgstr "הוספת חדש"
|
290 |
+
|
291 |
+
#: wpf-admin/forum.php:55
|
292 |
+
msgid "Important Tips"
|
293 |
+
msgstr ""
|
294 |
+
|
295 |
+
#: wpf-admin/forum.php:56 wpf-includes/wpf-phrases.php:226
|
296 |
+
msgid "Please drag and drop forum panels to set parent-child hierarchy."
|
297 |
+
msgstr ""
|
298 |
+
|
299 |
+
#: wpf-admin/forum.php:57
|
300 |
+
msgid ""
|
301 |
+
"If a category (blue panels) does not have forums (grey panels) it will not "
|
302 |
+
"be displayed on front-end. Each category should contain at least one forum."
|
303 |
+
msgstr ""
|
304 |
+
|
305 |
+
#: wpf-admin/forum.php:58
|
306 |
+
msgid ""
|
307 |
+
"Forums can be displayed with different layouts (Extended, Simplified, Q&A), "
|
308 |
+
"just edit the top (blue panels) category and set the layout you want. Child "
|
309 |
+
"forums' layout depends on the top category (blue panels) layout. They cannot "
|
310 |
+
"have a different layout."
|
311 |
+
msgstr ""
|
312 |
+
|
313 |
+
#: wpf-admin/forum.php:74 wpf-includes/wpf-phrases.php:273
|
314 |
+
msgid "Save forums order and hierarchy"
|
315 |
+
msgstr ""
|
316 |
+
|
317 |
+
#: wpf-admin/forum.php:101 wpf-includes/wpf-phrases.php:87
|
318 |
+
msgid "Enter forum title here"
|
319 |
+
msgstr "הקלד כותרת פורום כאן"
|
320 |
+
|
321 |
+
#: wpf-admin/forum.php:106 wpf-includes/wpf-phrases.php:86
|
322 |
+
msgid "Enter description here . . ."
|
323 |
+
msgstr "הקלד תיאור כאן..."
|
324 |
+
|
325 |
+
#: wpf-admin/forum.php:107 wpf-includes/wpf-phrases.php:330
|
326 |
+
msgid ""
|
327 |
+
"This is a forum description. This content will be displayed under forum "
|
328 |
+
"title on the forum list."
|
329 |
+
msgstr ""
|
330 |
+
|
331 |
+
#: wpf-admin/forum.php:122 wpf-includes/wpf-phrases.php:222
|
332 |
+
msgid "Parent Forum"
|
333 |
+
msgstr ""
|
334 |
+
|
335 |
+
#: wpf-admin/forum.php:125 wpf-includes/wpf-phrases.php:205
|
336 |
+
msgid "No parent"
|
337 |
+
msgstr ""
|
338 |
+
|
339 |
+
#: wpf-admin/forum.php:130 wpf-includes/wpf-phrases.php:347
|
340 |
+
msgid "Use as Category"
|
341 |
+
msgstr ""
|
342 |
+
|
343 |
+
#: wpf-admin/forum.php:132 wpf-includes/wpf-phrases.php:52
|
344 |
+
msgid "Category Layout"
|
345 |
+
msgstr ""
|
346 |
+
|
347 |
+
#: wpf-admin/forum.php:140 wpf-includes/wpf-phrases.php:203
|
348 |
+
msgid "No layout found."
|
349 |
+
msgstr ""
|
350 |
+
|
351 |
+
#: wpf-admin/forum.php:149 wpf-admin/forum.php:156
|
352 |
+
#: wpf-includes/wpf-phrases.php:235
|
353 |
+
msgid "Publish"
|
354 |
+
msgstr "פרסם"
|
355 |
+
|
356 |
+
#: wpf-admin/forum.php:153 wpf-includes/wpf-phrases.php:37
|
357 |
+
msgid "Are you sure you want to delete this forum?"
|
358 |
+
msgstr ""
|
359 |
+
|
360 |
+
#: wpf-admin/forum.php:153 wpf-admin/themes.php:73
|
361 |
+
#: wpf-admin/tools-tabs/antispam.php:139 wpf-admin/usergroup.php:34
|
362 |
+
#: wpf-admin/usergroup.php:181 wpf-includes/wpf-hooks.php:1087
|
363 |
+
#: wpf-includes/wpf-phrases.php:66
|
364 |
+
msgid "Delete"
|
365 |
+
msgstr "מחיקה"
|
366 |
+
|
367 |
+
#: wpf-admin/forum.php:154 wpf-admin/usergroup.php:36
|
368 |
+
#: wpf-includes/class-forums.php:666 wpf-includes/wpf-phrases.php:356
|
369 |
+
msgid "View"
|
370 |
+
msgstr "הצגה"
|
371 |
+
|
372 |
+
#: wpf-admin/forum.php:224 wpf-includes/wpf-phrases.php:118
|
373 |
+
msgid "Forum Slug"
|
374 |
+
msgstr "מזהה כתובת לפורום"
|
375 |
+
|
376 |
+
#: wpf-admin/forum.php:227 wpf-includes/wpf-phrases.php:323
|
377 |
+
msgid ""
|
378 |
+
"The \"slug\" is the URL-friendly version of the name. It is usually all "
|
379 |
+
"lowercase and contains only letters, numbers, and hyphens."
|
380 |
+
msgstr ""
|
381 |
+
|
382 |
+
#: wpf-admin/forum.php:233
|
383 |
+
msgid "Forum Icon"
|
384 |
+
msgstr ""
|
385 |
+
|
386 |
+
#: wpf-admin/forum.php:236
|
387 |
+
msgid "Font-awesome Icon"
|
388 |
+
msgstr ""
|
389 |
+
|
390 |
+
#: wpf-admin/forum.php:238
|
391 |
+
msgid "You can find all icons"
|
392 |
+
msgstr ""
|
393 |
+
|
394 |
+
#: wpf-admin/forum.php:238
|
395 |
+
msgid "here"
|
396 |
+
msgstr "כאן"
|
397 |
+
|
398 |
+
#: wpf-admin/forum.php:238
|
399 |
+
msgid ""
|
400 |
+
"Make sure you insert a class of font-awesome icon, it should start with fa- "
|
401 |
+
"prefix like "fa-comments"."
|
402 |
+
msgstr ""
|
403 |
+
|
404 |
+
#: wpf-admin/forum.php:245 wpf-includes/wpf-phrases.php:116
|
405 |
+
msgid "Forum SEO"
|
406 |
+
msgstr ""
|
407 |
+
|
408 |
+
#: wpf-admin/forum.php:248 wpf-includes/wpf-phrases.php:184
|
409 |
+
msgid "Meta Description"
|
410 |
+
msgstr "תיאור מטא"
|
411 |
+
|
412 |
+
#: wpf-admin/forum.php:277 wpf-includes/wpf-phrases.php:329
|
413 |
+
msgid "This action will also delete all sub-forums, topics and replies."
|
414 |
+
msgstr ""
|
415 |
+
|
416 |
+
#: wpf-admin/forum.php:285 wpf-includes/wpf-phrases.php:137
|
417 |
+
msgid ""
|
418 |
+
"If you want to delete this forum and keep its sub-forums, topics and "
|
419 |
+
"replies, please select a new target forum in dropdown below"
|
420 |
+
msgstr ""
|
421 |
+
|
422 |
+
#: wpf-admin/forum.php:294 wpf-includes/wpf-phrases.php:26
|
423 |
+
msgid ""
|
424 |
+
"All sub-forums, topics and replies will be attached to selected forum. "
|
425 |
+
"Layout will be inherited from this forum."
|
426 |
+
msgstr ""
|
427 |
+
|
428 |
+
#: wpf-admin/moderation.php:10
|
429 |
+
msgid "Topic and Post Moderation"
|
430 |
+
msgstr ""
|
431 |
+
|
432 |
+
#: wpf-admin/options-tabs/accesses.php:9 wpf-includes/wpf-phrases.php:21
|
433 |
+
msgid "Add New Forum Access"
|
434 |
+
msgstr ""
|
435 |
+
|
436 |
+
#: wpf-admin/options-tabs/accesses.php:13 wpf-includes/wpf-phrases.php:15
|
437 |
+
msgid "Access names"
|
438 |
+
msgstr ""
|
439 |
+
|
440 |
+
#: wpf-admin/options-tabs/accesses.php:26
|
441 |
+
#: wpf-admin/options-tabs/accesses.php:27
|
442 |
+
#: wpf-admin/options-tabs/accesses.php:28
|
443 |
+
msgid "This access is usually used for "
|
444 |
+
msgstr ""
|
445 |
+
|
446 |
+
#: wpf-admin/options-tabs/accesses.php:26
|
447 |
+
msgid "Guests"
|
448 |
+
msgstr "אורחים"
|
449 |
+
|
450 |
+
#: wpf-admin/options-tabs/accesses.php:26
|
451 |
+
#: wpf-admin/options-tabs/accesses.php:27
|
452 |
+
#: wpf-admin/options-tabs/accesses.php:28
|
453 |
+
msgid "usergroup"
|
454 |
+
msgstr "קבוצת משתמשים"
|
455 |
+
|
456 |
+
#: wpf-admin/options-tabs/accesses.php:27 wpf-includes/wpf-phrases.php:623
|
457 |
+
msgid "Registered"
|
458 |
+
msgstr "רשום"
|
459 |
+
|
460 |
+
#: wpf-admin/options-tabs/accesses.php:28 wpf-includes/wpf-phrases.php:621
|
461 |
+
msgid "Admin"
|
462 |
+
msgstr "מנהל"
|
463 |
+
|
464 |
+
#: wpf-admin/options-tabs/accesses.php:32 wpf-includes/class-forums.php:662
|
465 |
+
#: wpf-includes/functions.php:603 wpf-includes/wpf-phrases.php:382
|
466 |
+
msgid "edit"
|
467 |
+
msgstr "עריכה"
|
468 |
+
|
469 |
+
#: wpf-admin/options-tabs/accesses.php:34 wpf-includes/wpf-phrases.php:39
|
470 |
+
msgid ""
|
471 |
+
"Are you sure you want to remove this access set? Usergroups which attached "
|
472 |
+
"to this access will lost all forum permissions."
|
473 |
+
msgstr ""
|
474 |
+
|
475 |
+
#: wpf-admin/options-tabs/accesses.php:34 wpf-includes/class-forums.php:664
|
476 |
+
#: wpf-includes/functions.php:621 wpf-includes/functions.php:631
|
477 |
+
#: wpf-includes/wpf-phrases.php:381
|
478 |
+
msgid "delete"
|
479 |
+
msgstr "מחיקה"
|
480 |
+
|
481 |
+
#: wpf-admin/options-tabs/accesses.php:49 wpf-includes/wpf-phrases.php:14
|
482 |
+
msgid "Access name"
|
483 |
+
msgstr ""
|
484 |
+
|
485 |
+
#: wpf-admin/options-tabs/accesses.php:69 wpf-includes/wpf-phrases.php:271
|
486 |
+
msgid "Save"
|
487 |
+
msgstr "שמירה"
|
488 |
+
|
489 |
+
#: wpf-admin/options-tabs/accesses.php:69 wpf-includes/wpf-phrases.php:344
|
490 |
+
msgid "Update"
|
491 |
+
msgstr "עדכון"
|
492 |
+
|
493 |
+
#: wpf-admin/options-tabs/emails.php:13
|
494 |
+
msgid "FROM Name"
|
495 |
+
msgstr ""
|
496 |
+
|
497 |
+
#: wpf-admin/options-tabs/emails.php:17
|
498 |
+
msgid "FROM Email Address"
|
499 |
+
msgstr ""
|
500 |
+
|
501 |
+
#: wpf-admin/options-tabs/emails.php:22
|
502 |
+
msgid "Forum Admins email addresses"
|
503 |
+
msgstr ""
|
504 |
+
|
505 |
+
#: wpf-admin/options-tabs/emails.php:23 wpf-includes/wpf-phrases.php:57
|
506 |
+
msgid ""
|
507 |
+
"Comma separated email addresses of forum administrators to get forum "
|
508 |
+
"notifications. For example post report messages."
|
509 |
+
msgstr ""
|
510 |
+
|
511 |
+
#: wpf-admin/options-tabs/emails.php:29
|
512 |
+
msgid "Notify Admins via email on new Topic"
|
513 |
+
msgstr ""
|
514 |
+
|
515 |
+
#: wpf-admin/options-tabs/emails.php:30
|
516 |
+
msgid ""
|
517 |
+
"Send Notification emails to all email addresses (comma separated ) of forum "
|
518 |
+
"administrators when a new Topic is created."
|
519 |
+
msgstr ""
|
520 |
+
|
521 |
+
#: wpf-admin/options-tabs/emails.php:34 wpf-admin/options-tabs/emails.php:46
|
522 |
+
#: wpf-admin/options-tabs/features.php:63 wpf-admin/tools-tabs/antispam.php:31
|
523 |
+
#: wpf-admin/tools-tabs/antispam.php:40 wpf-admin/tools-tabs/antispam.php:49
|
524 |
+
#: wpf-admin/tools-tabs/cleanup.php:39 wpf-includes/wpf-phrases.php:367
|
525 |
+
msgid "Yes"
|
526 |
+
msgstr "כן"
|
527 |
+
|
528 |
+
#: wpf-admin/options-tabs/emails.php:35 wpf-admin/options-tabs/emails.php:47
|
529 |
+
#: wpf-admin/options-tabs/features.php:64 wpf-admin/tools-tabs/antispam.php:32
|
530 |
+
#: wpf-admin/tools-tabs/antispam.php:41 wpf-admin/tools-tabs/antispam.php:50
|
531 |
+
#: wpf-admin/tools-tabs/cleanup.php:40 wpf-includes/wpf-phrases.php:197
|
532 |
+
msgid "No"
|
533 |
+
msgstr "לא"
|
534 |
+
|
535 |
+
#: wpf-admin/options-tabs/emails.php:41
|
536 |
+
msgid "Notify Admins via email on new Post"
|
537 |
+
msgstr ""
|
538 |
+
|
539 |
+
#: wpf-admin/options-tabs/emails.php:42
|
540 |
+
msgid ""
|
541 |
+
"Send Notification emails to all email addresses (comma separated ) of forum "
|
542 |
+
"administrators when a new Reply is created."
|
543 |
+
msgstr ""
|
544 |
+
|
545 |
+
#: wpf-admin/options-tabs/emails.php:53 wpf-includes/wpf-phrases.php:318
|
546 |
+
msgid "Subscription Emails"
|
547 |
+
msgstr "מכתבי מנוי"
|
548 |
+
|
549 |
+
#: wpf-admin/options-tabs/emails.php:57 wpf-includes/wpf-phrases.php:315
|
550 |
+
msgid "Subscribe confirmation email subject"
|
551 |
+
msgstr ""
|
552 |
+
|
553 |
+
#: wpf-admin/options-tabs/emails.php:61 wpf-includes/wpf-phrases.php:314
|
554 |
+
msgid "Subscribe confirmation email message"
|
555 |
+
msgstr ""
|
556 |
+
|
557 |
+
#: wpf-admin/options-tabs/emails.php:65 wpf-includes/wpf-phrases.php:196
|
558 |
+
msgid "New topic notification email subject"
|
559 |
+
msgstr ""
|
560 |
+
|
561 |
+
#: wpf-admin/options-tabs/emails.php:69 wpf-includes/wpf-phrases.php:195
|
562 |
+
msgid "New topic notification email message"
|
563 |
+
msgstr ""
|
564 |
+
|
565 |
+
#: wpf-admin/options-tabs/emails.php:73 wpf-includes/wpf-phrases.php:194
|
566 |
+
msgid "New reply notification email subject"
|
567 |
+
msgstr ""
|
568 |
+
|
569 |
+
#: wpf-admin/options-tabs/emails.php:77 wpf-includes/wpf-phrases.php:193
|
570 |
+
msgid "New reply notification email message"
|
571 |
+
msgstr ""
|
572 |
+
|
573 |
+
#: wpf-admin/options-tabs/emails.php:82 wpf-includes/wpf-phrases.php:228
|
574 |
+
msgid "Post Reporting Emails"
|
575 |
+
msgstr ""
|
576 |
+
|
577 |
+
#: wpf-admin/options-tabs/emails.php:83 wpf-includes/wpf-phrases.php:332
|
578 |
+
msgid "This message comes from post reporting pop-up form."
|
579 |
+
msgstr ""
|
580 |
+
|
581 |
+
#: wpf-admin/options-tabs/emails.php:88 wpf-includes/wpf-phrases.php:267
|
582 |
+
msgid "Report message subject"
|
583 |
+
msgstr ""
|
584 |
+
|
585 |
+
#: wpf-admin/options-tabs/emails.php:93 wpf-includes/wpf-phrases.php:266
|
586 |
+
msgid "Report message body"
|
587 |
+
msgstr ""
|
588 |
+
|
589 |
+
#: wpf-admin/options-tabs/emails.php:98
|
590 |
+
msgid "Reset Password Emails"
|
591 |
+
msgstr ""
|
592 |
+
|
593 |
+
#: wpf-admin/options-tabs/emails.php:99
|
594 |
+
msgid "This message comes from Reset Password form."
|
595 |
+
msgstr ""
|
596 |
+
|
597 |
+
#: wpf-admin/options-tabs/emails.php:103
|
598 |
+
msgid "Reset Password message body"
|
599 |
+
msgstr ""
|
600 |
+
|
601 |
+
#: wpf-admin/options-tabs/emails.php:109 wpf-admin/options-tabs/features.php:74
|
602 |
+
#: wpf-admin/options-tabs/forums.php:16 wpf-admin/options-tabs/general.php:82
|
603 |
+
#: wpf-admin/options-tabs/members.php:143 wpf-admin/options-tabs/posts.php:67
|
604 |
+
#: wpf-admin/options-tabs/styles.php:93 wpf-admin/tools-tabs/antispam.php:180
|
605 |
+
#: wpf-admin/tools-tabs/cleanup.php:49 wpf-includes/wpf-phrases.php:345
|
606 |
+
msgid "Update Options"
|
607 |
+
msgstr "עדכון אפשרויות"
|
608 |
+
|
609 |
+
#: wpf-admin/options-tabs/features.php:9 wpf-includes/wpf-phrases.php:295
|
610 |
+
msgid "Show Admin Bar for Members"
|
611 |
+
msgstr ""
|
612 |
+
|
613 |
+
#: wpf-admin/options-tabs/features.php:9 wpf-includes/wpf-phrases.php:333
|
614 |
+
msgid "This option doesn't affect website admins."
|
615 |
+
msgstr ""
|
616 |
+
|
617 |
+
#: wpf-admin/options-tabs/features.php:10 wpf-includes/wpf-phrases.php:297
|
618 |
+
msgid "Show Forum Page Title"
|
619 |
+
msgstr ""
|
620 |
+
|
621 |
+
#: wpf-admin/options-tabs/features.php:11 wpf-includes/wpf-phrases.php:300
|
622 |
+
msgid "Show Top/Menu Bar"
|
623 |
+
msgstr ""
|
624 |
+
|
625 |
+
#: wpf-admin/options-tabs/features.php:12 wpf-includes/wpf-phrases.php:299
|
626 |
+
msgid "Show Top Search"
|
627 |
+
msgstr "הצג את החיפושים המובילים"
|
628 |
+
|
629 |
+
#: wpf-admin/options-tabs/features.php:13 wpf-includes/wpf-phrases.php:296
|
630 |
+
msgid "Show Breadcrumb"
|
631 |
+
msgstr ""
|
632 |
+
|
633 |
+
#: wpf-admin/options-tabs/features.php:14 wpf-includes/wpf-phrases.php:298
|
634 |
+
msgid "Show Forum Statistic"
|
635 |
+
msgstr ""
|
636 |
+
|
637 |
+
#: wpf-admin/options-tabs/features.php:15
|
638 |
+
msgid "Log Viewed Forums and Topics"
|
639 |
+
msgstr ""
|
640 |
+
|
641 |
+
#: wpf-admin/options-tabs/features.php:16 wpf-includes/wpf-phrases.php:258
|
642 |
+
msgid "Replace Author Link to Forum Profile"
|
643 |
+
msgstr ""
|
644 |
+
|
645 |
+
#: wpf-admin/options-tabs/features.php:17 wpf-includes/wpf-phrases.php:259
|
646 |
+
msgid "Replace Comment Author Link to Forum Profile"
|
647 |
+
msgstr ""
|
648 |
+
|
649 |
+
#: wpf-admin/options-tabs/features.php:18 wpf-includes/wpf-phrases.php:633
|
650 |
+
msgid "Enable User Registration"
|
651 |
+
msgstr ""
|
652 |
+
|
653 |
+
#: wpf-admin/options-tabs/features.php:18 wpf-includes/wpf-phrases.php:634
|
654 |
+
msgid ""
|
655 |
+
"This option is not synced with WordPress \"Anyone can register\" option in "
|
656 |
+
"Dashboard > Settings > General admin page. If this option is enabled new "
|
657 |
+
"users will always be able to register."
|
658 |
+
msgstr ""
|
659 |
+
|
660 |
+
#: wpf-admin/options-tabs/features.php:19
|
661 |
+
msgid "Enable User Registration email confirmation"
|
662 |
+
msgstr ""
|
663 |
+
|
664 |
+
#: wpf-admin/options-tabs/features.php:19
|
665 |
+
msgid ""
|
666 |
+
"If you have enabled this option, after registering, user can not login "
|
667 |
+
"without confirming the email."
|
668 |
+
msgstr ""
|
669 |
+
|
670 |
+
#: wpf-admin/options-tabs/features.php:20 wpf-includes/wpf-phrases.php:261
|
671 |
+
msgid "Replace Registration Page URL to Forum URL"
|
672 |
+
msgstr ""
|
673 |
+
|
674 |
+
#: wpf-admin/options-tabs/features.php:21 wpf-includes/wpf-phrases.php:260
|
675 |
+
msgid "Replace Login Page URL to Forum URL"
|
676 |
+
msgstr ""
|
677 |
+
|
678 |
+
#: wpf-admin/options-tabs/features.php:22
|
679 |
+
msgid "Replace WP Reset Password URL to Forum reset password page"
|
680 |
+
msgstr ""
|
681 |
+
|
682 |
+
#: wpf-admin/options-tabs/features.php:23 wpf-includes/wpf-phrases.php:257
|
683 |
+
msgid "Replace Author Avatar with Forum Profile Avatar"
|
684 |
+
msgstr ""
|
685 |
+
|
686 |
+
#: wpf-admin/options-tabs/features.php:24 wpf-includes/wpf-phrases.php:77
|
687 |
+
msgid "Enable Avatars"
|
688 |
+
msgstr ""
|
689 |
+
|
690 |
+
#: wpf-admin/options-tabs/features.php:25 wpf-includes/wpf-phrases.php:78
|
691 |
+
msgid "Enable Custom Avatars"
|
692 |
+
msgstr ""
|
693 |
+
|
694 |
+
#: wpf-admin/options-tabs/features.php:26 wpf-includes/wpf-phrases.php:31
|
695 |
+
msgid "Allow Member Signature"
|
696 |
+
msgstr ""
|
697 |
+
|
698 |
+
#: wpf-admin/options-tabs/features.php:27 wpf-includes/wpf-phrases.php:80
|
699 |
+
msgid "Enable Member Rating"
|
700 |
+
msgstr ""
|
701 |
+
|
702 |
+
#: wpf-admin/options-tabs/features.php:28 wpf-includes/wpf-phrases.php:81
|
703 |
+
msgid "Enable Member Rating Titles"
|
704 |
+
msgstr ""
|
705 |
+
|
706 |
+
#: wpf-admin/options-tabs/features.php:29 wpf-includes/wpf-phrases.php:79
|
707 |
+
msgid "Enable Member Cache"
|
708 |
+
msgstr ""
|
709 |
+
|
710 |
+
#: wpf-admin/options-tabs/features.php:30
|
711 |
+
msgid "Enable Object Cache"
|
712 |
+
msgstr ""
|
713 |
+
|
714 |
+
#: wpf-admin/options-tabs/features.php:31
|
715 |
+
msgid "Enable HTML Cache"
|
716 |
+
msgstr ""
|
717 |
+
|
718 |
+
#: wpf-admin/options-tabs/features.php:32
|
719 |
+
msgid "Enable Memory Cache"
|
720 |
+
msgstr ""
|
721 |
+
|
722 |
+
#: wpf-admin/options-tabs/features.php:33 wpf-includes/wpf-phrases.php:84
|
723 |
+
msgid "Enable wpForo SEO for Meta Titles"
|
724 |
+
msgstr ""
|
725 |
+
|
726 |
+
#: wpf-admin/options-tabs/features.php:34 wpf-includes/wpf-phrases.php:83
|
727 |
+
msgid "Enable wpForo SEO for Meta Tags"
|
728 |
+
msgstr ""
|
729 |
+
|
730 |
+
#: wpf-admin/options-tabs/features.php:35
|
731 |
+
msgid "Enable User Profile Page indexing"
|
732 |
+
msgstr ""
|
733 |
+
|
734 |
+
#: wpf-admin/options-tabs/features.php:36
|
735 |
+
msgid "Enable RSS Feed"
|
736 |
+
msgstr ""
|
737 |
+
|
738 |
+
#: wpf-admin/options-tabs/features.php:37 wpf-includes/wpf-phrases.php:82
|
739 |
+
msgid "Enable wpForo Font-Awesome Lib"
|
740 |
+
msgstr ""
|
741 |
+
|
742 |
+
#: wpf-admin/options-tabs/features.php:38
|
743 |
+
msgid "Turn Off User Syncing Note"
|
744 |
+
msgstr ""
|
745 |
+
|
746 |
+
#: wpf-admin/options-tabs/features.php:39 wpf-includes/wpf-phrases.php:85
|
747 |
+
msgid "Enable Output Buffer"
|
748 |
+
msgstr ""
|
749 |
+
|
750 |
+
#: wpf-admin/options-tabs/features.php:39 wpf-includes/wpf-phrases.php:331
|
751 |
+
msgid ""
|
752 |
+
"This feature is useful if you're adding content before or after [wpforo] "
|
753 |
+
"shortcode in page content. Also it useful if forum is loaded before website "
|
754 |
+
"header, on top of the front-end."
|
755 |
+
msgstr ""
|
756 |
+
|
757 |
+
#: wpf-admin/options-tabs/features.php:40
|
758 |
+
msgid "Enable WordPress Date/Time Format"
|
759 |
+
msgstr ""
|
760 |
+
|
761 |
+
#: wpf-admin/options-tabs/features.php:40 wpf-includes/wpf-phrases.php:598
|
762 |
+
msgid ""
|
763 |
+
"You can manage WordPress date and time format in WordPress Settings > "
|
764 |
+
"General admin page."
|
765 |
+
msgstr ""
|
766 |
+
|
767 |
+
#: wpf-admin/options-tabs/features.php:41 wpf-includes/wpf-phrases.php:609
|
768 |
+
msgid "Enable Subscription Confirmation"
|
769 |
+
msgstr ""
|
770 |
+
|
771 |
+
#: wpf-admin/options-tabs/features.php:41 wpf-includes/wpf-phrases.php:610
|
772 |
+
msgid "Forum and Topic subscription with double opt-in/confirmation system."
|
773 |
+
msgstr ""
|
774 |
+
|
775 |
+
#: wpf-admin/options-tabs/features.php:42
|
776 |
+
msgid "Topic subscription option on post editor"
|
777 |
+
msgstr ""
|
778 |
+
|
779 |
+
#: wpf-admin/options-tabs/features.php:42
|
780 |
+
msgid ""
|
781 |
+
"This option adds topic subscription checkbox next to new topic and post "
|
782 |
+
"submit button."
|
783 |
+
msgstr ""
|
784 |
+
|
785 |
+
#: wpf-admin/options-tabs/features.php:43
|
786 |
+
msgid "Topic subscription option on post editor - checked/enabled"
|
787 |
+
msgstr ""
|
788 |
+
|
789 |
+
#: wpf-admin/options-tabs/features.php:43
|
790 |
+
msgid ""
|
791 |
+
"Enable this option if you want the topic subscription checkbox to be checked "
|
792 |
+
"by default."
|
793 |
+
msgstr ""
|
794 |
+
|
795 |
+
#: wpf-admin/options-tabs/features.php:44 wpf-includes/wpf-phrases.php:637
|
796 |
+
msgid "Insert Forum Attachments to Media Library"
|
797 |
+
msgstr ""
|
798 |
+
|
799 |
+
#: wpf-admin/options-tabs/features.php:44 wpf-includes/wpf-phrases.php:638
|
800 |
+
msgid ""
|
801 |
+
"Enable this option to be able manage forum attachments in Dashboard > Media "
|
802 |
+
"> Library admin page."
|
803 |
+
msgstr ""
|
804 |
+
|
805 |
+
#: wpf-admin/options-tabs/features.php:45 wpf-includes/wpf-phrases.php:602
|
806 |
+
msgid "Enable Debug Mode"
|
807 |
+
msgstr ""
|
808 |
+
|
809 |
+
#: wpf-admin/options-tabs/features.php:45 wpf-includes/wpf-phrases.php:603
|
810 |
+
msgid ""
|
811 |
+
"If you got some issue with wpForo, please enable this option before asking "
|
812 |
+
"for support, this outputs hidden important information to help us debug your "
|
813 |
+
"issue."
|
814 |
+
msgstr ""
|
815 |
+
|
816 |
+
#: wpf-admin/options-tabs/features.php:46 wpf-includes/wpf-phrases.php:134
|
817 |
+
msgid "Help wpForo to grow, show plugin info"
|
818 |
+
msgstr ""
|
819 |
+
|
820 |
+
#: wpf-admin/options-tabs/features.php:46 wpf-includes/wpf-phrases.php:227
|
821 |
+
msgid ""
|
822 |
+
"Please enable this option to help wpForo get more popularity as your thank "
|
823 |
+
"to the hard work we do for you totally free. This option adds a very small "
|
824 |
+
"icon in forum footer, which will allow your site visitors recognize the name "
|
825 |
+
"of forum solution you use."
|
826 |
+
msgstr ""
|
827 |
+
|
828 |
+
#: wpf-admin/options-tabs/general.php:15 wpf-includes/wpf-phrases.php:107
|
829 |
+
msgid "Forum Base URL"
|
830 |
+
msgstr "כתובת בסיס לפורום"
|
831 |
+
|
832 |
+
#: wpf-admin/options-tabs/general.php:24 wpf-includes/wpf-phrases.php:647
|
833 |
+
msgid "Turn WordPress to wpForo"
|
834 |
+
msgstr ""
|
835 |
+
|
836 |
+
#: wpf-admin/options-tabs/general.php:25
|
837 |
+
msgid ""
|
838 |
+
"This option will disable WordPress on front-end. Only forum pages and "
|
839 |
+
"excluded post/pages will be available. wpForo will look like as a stand-"
|
840 |
+
"alone forum."
|
841 |
+
msgstr ""
|
842 |
+
|
843 |
+
#: wpf-admin/options-tabs/general.php:28
|
844 |
+
msgid "Exclude page URLs"
|
845 |
+
msgstr ""
|
846 |
+
|
847 |
+
#: wpf-admin/options-tabs/general.php:28
|
848 |
+
msgid "one URL per line"
|
849 |
+
msgstr ""
|
850 |
+
|
851 |
+
#: wpf-admin/options-tabs/general.php:38
|
852 |
+
msgid "Visit Forum"
|
853 |
+
msgstr "בקר בפורום"
|
854 |
+
|
855 |
+
#: wpf-admin/options-tabs/general.php:41
|
856 |
+
msgid ""
|
857 |
+
"wpForo PageID doesn't exist. Forums will not be loaded, please read this"
|
858 |
+
msgstr ""
|
859 |
+
|
860 |
+
#: wpf-admin/options-tabs/general.php:41
|
861 |
+
msgid "suppor topic"
|
862 |
+
msgstr ""
|
863 |
+
|
864 |
+
#: wpf-admin/options-tabs/general.php:43
|
865 |
+
msgid "Forum Page ID"
|
866 |
+
msgstr ""
|
867 |
+
|
868 |
+
#: wpf-admin/options-tabs/general.php:48 wpf-includes/wpf-phrases.php:121
|
869 |
+
msgid "Forum Title"
|
870 |
+
msgstr "כותרת פורום"
|
871 |
+
|
872 |
+
#: wpf-admin/options-tabs/general.php:52 wpf-includes/wpf-phrases.php:108
|
873 |
+
msgid "Forum Description"
|
874 |
+
msgstr "תיאור פורום"
|
875 |
+
|
876 |
+
#: wpf-admin/options-tabs/general.php:57 wpf-includes/wpf-phrases.php:64
|
877 |
+
msgid "Dashboard Menu Position"
|
878 |
+
msgstr "מיקום תפריט לוח הבקרה"
|
879 |
+
|
880 |
+
#: wpf-admin/options-tabs/general.php:58 wpf-includes/wpf-phrases.php:324
|
881 |
+
msgid "The position in the menu order wpForo should appear."
|
882 |
+
msgstr ""
|
883 |
+
|
884 |
+
#: wpf-admin/options-tabs/general.php:59 wpf-includes/wpf-phrases.php:349
|
885 |
+
msgid ""
|
886 |
+
"Use greater than 5 - below Posts, 10 - below Media, 15 - below Links, 20 - "
|
887 |
+
"below Pages, 25 - below comments, 60 - below first separator, 65 - below "
|
888 |
+
"Plugins, 70 - below Users, 75 - below Tools, 80 - below Settings, 100 - "
|
889 |
+
"below second separator"
|
890 |
+
msgstr ""
|
891 |
+
|
892 |
+
#: wpf-admin/options-tabs/general.php:68 wpf-includes/wpf-phrases.php:110
|
893 |
+
msgid "Forum Language"
|
894 |
+
msgstr "שפת פורום"
|
895 |
+
|
896 |
+
#: wpf-admin/options-tabs/general.php:69
|
897 |
+
msgid ""
|
898 |
+
"This option is only related to XML language files. You should upload a "
|
899 |
+
"translation XML file to have a new language option in this drop-down. If you "
|
900 |
+
"are using PO/MO translation files you should change WordPress Language in "
|
901 |
+
"Dashboard > Settings admin page to load according translation for wpForo."
|
902 |
+
msgstr ""
|
903 |
+
|
904 |
+
#: wpf-admin/options-tabs/general.php:94 wpf-includes/wpf-phrases.php:144
|
905 |
+
msgid "Language XML file"
|
906 |
+
msgstr ""
|
907 |
+
|
908 |
+
#: wpf-admin/options-tabs/general.php:103 wpf-includes/wpf-phrases.php:22
|
909 |
+
msgid "Add New Language"
|
910 |
+
msgstr ""
|
911 |
+
|
912 |
+
#: wpf-admin/options-tabs/members.php:13 wpf-includes/wpf-phrases.php:218
|
913 |
+
msgid "Online status timeout"
|
914 |
+
msgstr ""
|
915 |
+
|
916 |
+
#: wpf-admin/options-tabs/members.php:16 wpf-admin/options-tabs/posts.php:19
|
917 |
+
#: wpf-admin/options-tabs/posts.php:23 wpf-admin/options-tabs/posts.php:31
|
918 |
+
#: wpf-admin/options-tabs/posts.php:35 wpf-includes/wpf-phrases.php:391
|
919 |
+
msgid "minutes"
|
920 |
+
msgstr "דקות"
|
921 |
+
|
922 |
+
#: wpf-admin/options-tabs/members.php:20 wpf-includes/wpf-phrases.php:180
|
923 |
+
msgid "Members URL structure"
|
924 |
+
msgstr ""
|
925 |
+
|
926 |
+
#: wpf-admin/options-tabs/members.php:29
|
927 |
+
msgid "Members Search Type"
|
928 |
+
msgstr ""
|
929 |
+
|
930 |
+
#: wpf-admin/options-tabs/members.php:32 wpf-includes/wpf-phrases.php:276
|
931 |
+
msgid "Search"
|
932 |
+
msgstr "חיפוש"
|
933 |
+
|
934 |
+
#: wpf-admin/options-tabs/members.php:33
|
935 |
+
msgid "Filter"
|
936 |
+
msgstr "סינון"
|
937 |
+
|
938 |
+
#: wpf-admin/options-tabs/members.php:39 wpf-includes/wpf-phrases.php:62
|
939 |
+
msgid "Custom Authorization URLs"
|
940 |
+
msgstr ""
|
941 |
+
|
942 |
+
#: wpf-admin/options-tabs/members.php:41
|
943 |
+
msgid ""
|
944 |
+
"Use this option only if you have set other pages for authorization. \n"
|
945 |
+
" wpForo doesn't change its own URLs, these options "
|
946 |
+
"are only for other plugin compatibility. \n"
|
947 |
+
" For example, if you use BuddyPress or Ultimate "
|
948 |
+
"Member plugin you can set these values:"
|
949 |
+
msgstr ""
|
950 |
+
|
951 |
+
#: wpf-admin/options-tabs/members.php:44 wpf-admin/options-tabs/members.php:50
|
952 |
+
#: wpf-includes/wpf-phrases.php:162
|
953 |
+
msgid "Login URL"
|
954 |
+
msgstr ""
|
955 |
+
|
956 |
+
#: wpf-admin/options-tabs/members.php:45 wpf-admin/options-tabs/members.php:51
|
957 |
+
#: wpf-includes/wpf-phrases.php:253
|
958 |
+
msgid "Register URL"
|
959 |
+
msgstr ""
|
960 |
+
|
961 |
+
#: wpf-admin/options-tabs/members.php:52 wpf-includes/wpf-phrases.php:164
|
962 |
+
msgid "Lost Password URL"
|
963 |
+
msgstr ""
|
964 |
+
|
965 |
+
#: wpf-admin/options-tabs/members.php:58 wpf-includes/wpf-phrases.php:175
|
966 |
+
msgid "Member Reputation and Titles"
|
967 |
+
msgstr ""
|
968 |
+
|
969 |
+
#: wpf-admin/options-tabs/members.php:62
|
970 |
+
msgid "Default title"
|
971 |
+
msgstr "כותרת ברירת מחדל"
|
972 |
+
|
973 |
+
#: wpf-admin/options-tabs/members.php:72 wpf-includes/wpf-phrases.php:248
|
974 |
+
msgid "Rating Level"
|
975 |
+
msgstr "רמת דירוג"
|
976 |
+
|
977 |
+
#: wpf-admin/options-tabs/members.php:73 wpf-includes/wpf-phrases.php:185
|
978 |
+
msgid "Min Number of Posts"
|
979 |
+
msgstr "מס' שרשורים מינימלי"
|
980 |
+
|
981 |
+
#: wpf-admin/options-tabs/members.php:74 wpf-includes/wpf-phrases.php:176
|
982 |
+
msgid "Member Title"
|
983 |
+
msgstr "כותרת משתמש"
|
984 |
+
|
985 |
+
#: wpf-admin/options-tabs/members.php:75 wpf-includes/wpf-phrases.php:294
|
986 |
+
msgid "Short Badge"
|
987 |
+
msgstr "תג דירוג מקוצר"
|
988 |
+
|
989 |
+
#: wpf-admin/options-tabs/members.php:76 wpf-includes/wpf-phrases.php:128
|
990 |
+
msgid "Full Badge"
|
991 |
+
msgstr "תג דירוג מלא"
|
992 |
+
|
993 |
+
#: wpf-admin/options-tabs/members.php:77 wpf-includes/wpf-phrases.php:246
|
994 |
+
msgid "Rating Color"
|
995 |
+
msgstr "צבע דרוג"
|
996 |
+
|
997 |
+
#: wpf-admin/options-tabs/members.php:78 wpf-includes/wpf-phrases.php:247
|
998 |
+
msgid "Rating Icon"
|
999 |
+
msgstr "תג דירוג"
|
1000 |
+
|
1001 |
+
#: wpf-admin/options-tabs/members.php:78 wpf-includes/wpf-phrases.php:187
|
1002 |
+
msgid "More"
|
1003 |
+
msgstr "עוד"
|
1004 |
+
|
1005 |
+
#: wpf-admin/options-tabs/members.php:83 wpf-includes/wpf-phrases.php:158
|
1006 |
+
msgid "Level"
|
1007 |
+
msgstr "רמה"
|
1008 |
+
|
1009 |
+
#: wpf-admin/options-tabs/members.php:84 wpf-includes/wpf-phrases.php:212
|
1010 |
+
msgid "Number of Posts"
|
1011 |
+
msgstr "מספר הודעות"
|
1012 |
+
|
1013 |
+
#: wpf-admin/options-tabs/members.php:85 wpf-includes/wpf-phrases.php:63
|
1014 |
+
msgid "Custom Title"
|
1015 |
+
msgstr "כותרת מותאמת אישית"
|
1016 |
+
|
1017 |
+
#: wpf-admin/options-tabs/members.php:88 wpf-includes/wpf-phrases.php:56
|
1018 |
+
msgid "Color"
|
1019 |
+
msgstr "צבע"
|
1020 |
+
|
1021 |
+
#: wpf-admin/options-tabs/members.php:89 wpf-includes/wpf-phrases.php:48
|
1022 |
+
msgid "Badge Icon"
|
1023 |
+
msgstr "סמל תג דירוג"
|
1024 |
+
|
1025 |
+
#: wpf-admin/options-tabs/members.php:95
|
1026 |
+
msgid "Enable Reputation Titles for selected usergroups"
|
1027 |
+
msgstr ""
|
1028 |
+
|
1029 |
+
#: wpf-admin/options-tabs/members.php:96
|
1030 |
+
msgid ""
|
1031 |
+
"This option depends on \"Enable Member Rating Titles\" parent option, witch "
|
1032 |
+
"located in wpForo Settings > Features Tab"
|
1033 |
+
msgstr ""
|
1034 |
+
|
1035 |
+
#: wpf-admin/options-tabs/members.php:109
|
1036 |
+
msgid "Enable Reputation Badges for selected usergroups"
|
1037 |
+
msgstr ""
|
1038 |
+
|
1039 |
+
#: wpf-admin/options-tabs/members.php:110
|
1040 |
+
msgid ""
|
1041 |
+
"This option depends on \"Enable Member Rating\" parent option, witch located "
|
1042 |
+
"in wpForo Settings > Features Tab"
|
1043 |
+
msgstr ""
|
1044 |
+
|
1045 |
+
#: wpf-admin/options-tabs/members.php:123
|
1046 |
+
msgid "Display Usergroup under Post Author Avatar"
|
1047 |
+
msgstr ""
|
1048 |
+
|
1049 |
+
#: wpf-admin/options-tabs/plugins.php:9
|
1050 |
+
msgid ""
|
1051 |
+
"Thank you for using wpForo. wpForo is a premium forum plugin which will "
|
1052 |
+
"always be available for free. There will never be paid and pro versions of "
|
1053 |
+
"this forum board. However this is a very large and hard project so we also "
|
1054 |
+
"develop paid addons (extensions), which will financially help us to keep "
|
1055 |
+
"improving and adding new features to the free wpForo plugin. Forum addons "
|
1056 |
+
"will also be actively developed. The first addons \"Advanced Media Uploader"
|
1057 |
+
"\", \"Polls\", \"Private Messages\" and \"Ad Manager\" will be available "
|
1058 |
+
"very soon. Once you got some addon and activated that, you will find "
|
1059 |
+
"settings in vertical subTabs here."
|
1060 |
+
msgstr ""
|
1061 |
+
|
1062 |
+
#: wpf-admin/options-tabs/posts.php:14 wpf-includes/wpf-phrases.php:214
|
1063 |
+
msgid "Number of Topics per Page"
|
1064 |
+
msgstr ""
|
1065 |
+
|
1066 |
+
#: wpf-admin/options-tabs/posts.php:18 wpf-includes/wpf-phrases.php:30
|
1067 |
+
msgid "Allow Edit Own Topic for"
|
1068 |
+
msgstr ""
|
1069 |
+
|
1070 |
+
#: wpf-admin/options-tabs/posts.php:22 wpf-includes/wpf-phrases.php:27
|
1071 |
+
msgid "Allow Delete Own Topic for"
|
1072 |
+
msgstr ""
|
1073 |
+
|
1074 |
+
#: wpf-admin/options-tabs/posts.php:26 wpf-includes/wpf-phrases.php:213
|
1075 |
+
msgid "Number of Posts per Page"
|
1076 |
+
msgstr "מספר שרשורים לעמוד"
|
1077 |
+
|
1078 |
+
#: wpf-admin/options-tabs/posts.php:30 wpf-includes/wpf-phrases.php:29
|
1079 |
+
msgid "Allow Edit Own Post for"
|
1080 |
+
msgstr ""
|
1081 |
+
|
1082 |
+
#: wpf-admin/options-tabs/posts.php:34 wpf-includes/wpf-phrases.php:28
|
1083 |
+
msgid "Allow Delete Own post for"
|
1084 |
+
msgstr ""
|
1085 |
+
|
1086 |
+
#: wpf-admin/options-tabs/posts.php:40 wpf-includes/wpf-phrases.php:169
|
1087 |
+
msgid "Maximum upload file size"
|
1088 |
+
msgstr "גודל קובץ מקסימלי להעלאה"
|
1089 |
+
|
1090 |
+
#: wpf-admin/options-tabs/posts.php:41 wpf-includes/wpf-phrases.php:371
|
1091 |
+
msgid ""
|
1092 |
+
"You can not set this value more than \"upload_max_filesize\" and "
|
1093 |
+
"\"post_max_size\". If you want to increase server parameters please contact "
|
1094 |
+
"to your hosting service support."
|
1095 |
+
msgstr ""
|
1096 |
+
|
1097 |
+
#: wpf-admin/options-tabs/posts.php:44 wpf-includes/wpf-phrases.php:166
|
1098 |
+
msgid "MB"
|
1099 |
+
msgstr "מ\"ב"
|
1100 |
+
|
1101 |
+
#: wpf-admin/options-tabs/posts.php:47 wpf-includes/wpf-phrases.php:289
|
1102 |
+
msgid "Server \"upload_max_filesize\" is "
|
1103 |
+
msgstr ""
|
1104 |
+
|
1105 |
+
#: wpf-admin/options-tabs/posts.php:48 wpf-includes/wpf-phrases.php:288
|
1106 |
+
msgid "Server \"post_max_size\" is "
|
1107 |
+
msgstr ""
|
1108 |
+
|
1109 |
+
#: wpf-admin/options-tabs/posts.php:56
|
1110 |
+
msgid "Attachment click - message for non-permitted users"
|
1111 |
+
msgstr ""
|
1112 |
+
|
1113 |
+
#: wpf-admin/options-tabs/posts.php:57
|
1114 |
+
msgid ""
|
1115 |
+
"This message will be displayed when a non-permitted forum member clicks on "
|
1116 |
+
"attached file link in topic and posts."
|
1117 |
+
msgstr ""
|
1118 |
+
|
1119 |
+
#: wpf-admin/options-tabs/styles.php:13
|
1120 |
+
msgid "Font Sizes"
|
1121 |
+
msgstr ""
|
1122 |
+
|
1123 |
+
#: wpf-admin/options-tabs/styles.php:28 wpf-includes/wpf-phrases.php:481
|
1124 |
+
msgid "Post Content"
|
1125 |
+
msgstr ""
|
1126 |
+
|
1127 |
+
#: wpf-admin/options-tabs/styles.php:36 wpf-includes/wpf-phrases.php:61
|
1128 |
+
msgid "Custom CSS Code"
|
1129 |
+
msgstr ""
|
1130 |
+
|
1131 |
+
#: wpf-admin/options-tabs/styles.php:43
|
1132 |
+
msgid "Forum Color Styles"
|
1133 |
+
msgstr ""
|
1134 |
+
|
1135 |
+
#: wpf-admin/options.php:8 wpf-includes/wpf-phrases.php:117
|
1136 |
+
msgid "Forum Settings"
|
1137 |
+
msgstr "הגדרות פורום"
|
1138 |
+
|
1139 |
+
#: wpf-admin/options.php:14 wpf-includes/wpf-phrases.php:129
|
1140 |
+
msgid "General"
|
1141 |
+
msgstr "כללי"
|
1142 |
+
|
1143 |
+
#: wpf-admin/options.php:16 wpf-includes/wpf-phrases.php:105
|
1144 |
+
msgid "Forum Accesses"
|
1145 |
+
msgstr ""
|
1146 |
+
|
1147 |
+
#: wpf-admin/options.php:17 wpf-includes/wpf-phrases.php:340
|
1148 |
+
msgid "Topics & Posts"
|
1149 |
+
msgstr "נושאים ושרשורים"
|
1150 |
+
|
1151 |
+
#: wpf-admin/options.php:19 wpf-includes/wpf-phrases.php:76
|
1152 |
+
msgid "Emails"
|
1153 |
+
msgstr ""
|
1154 |
+
|
1155 |
+
#: wpf-admin/options.php:20 wpf-includes/wpf-phrases.php:96
|
1156 |
+
msgid "Features"
|
1157 |
+
msgstr ""
|
1158 |
+
|
1159 |
+
#: wpf-admin/options.php:22 wpf-includes/wpf-phrases.php:312
|
1160 |
+
msgid "Styles"
|
1161 |
+
msgstr ""
|
1162 |
+
|
1163 |
+
#: wpf-admin/phrase.php:10 wpf-includes/wpf-phrases.php:127
|
1164 |
+
msgid "Front-end Phrases"
|
1165 |
+
msgstr ""
|
1166 |
+
|
1167 |
+
#: wpf-admin/themes.php:9 wpf-includes/wpf-phrases.php:120
|
1168 |
+
msgid "Forum Themes"
|
1169 |
+
msgstr ""
|
1170 |
+
|
1171 |
+
#: wpf-admin/themes.php:46 wpf-includes/wpf-phrases.php:60
|
1172 |
+
msgid "Current active theme"
|
1173 |
+
msgstr ""
|
1174 |
+
|
1175 |
+
#: wpf-admin/themes.php:48 wpf-includes/wpf-phrases.php:138
|
1176 |
+
msgid "Inactive"
|
1177 |
+
msgstr "לא פעיל"
|
1178 |
+
|
1179 |
+
#: wpf-admin/themes.php:52 wpf-includes/wpf-phrases.php:143
|
1180 |
+
msgid "LAYOUTS"
|
1181 |
+
msgstr ""
|
1182 |
+
|
1183 |
+
#: wpf-admin/themes.php:68 wpf-includes/wpf-phrases.php:17
|
1184 |
+
msgid "Activate"
|
1185 |
+
msgstr "הפעל"
|
1186 |
+
|
1187 |
+
#: wpf-admin/themes.php:69 wpf-includes/wpf-phrases.php:124
|
1188 |
+
msgid "Fresh Installation"
|
1189 |
+
msgstr ""
|
1190 |
+
|
1191 |
+
#: wpf-admin/themes.php:71 wpf-includes/wpf-phrases.php:140
|
1192 |
+
msgid "Install"
|
1193 |
+
msgstr "התקן"
|
1194 |
+
|
1195 |
+
#: wpf-admin/themes.php:73 wpf-includes/wpf-phrases.php:38
|
1196 |
+
msgid "Are you sure you want to delete this theme files?"
|
1197 |
+
msgstr ""
|
1198 |
+
|
1199 |
+
#: wpf-admin/themes.php:76 wpf-includes/wpf-phrases.php:40
|
1200 |
+
msgid ""
|
1201 |
+
"Are you sure you want to reset all settings and style colors to default?"
|
1202 |
+
msgstr ""
|
1203 |
+
|
1204 |
+
#: wpf-admin/themes.php:76 wpf-includes/wpf-phrases.php:269
|
1205 |
+
msgid "Reset Settings"
|
1206 |
+
msgstr ""
|
1207 |
+
|
1208 |
+
#: wpf-admin/themes.php:96 wpf-includes/wpf-phrases.php:202
|
1209 |
+
msgid "No layout found"
|
1210 |
+
msgstr ""
|
1211 |
+
|
1212 |
+
#: wpf-admin/themes.php:107 wpf-includes/wpf-phrases.php:207
|
1213 |
+
msgid "No theme found"
|
1214 |
+
msgstr ""
|
1215 |
+
|
1216 |
+
#: wpf-admin/tools-tabs/antispam.php:11
|
1217 |
+
msgid ""
|
1218 |
+
"is not installed! For an advanced Spam Control please install Akismet "
|
1219 |
+
"antispam plugin, it works well with wpForo Spam Control system. Akismet is "
|
1220 |
+
"already integrated with wpForo. It'll help to filter posts and protect forum "
|
1221 |
+
"against spam attacks."
|
1222 |
+
msgstr ""
|
1223 |
+
|
1224 |
+
#: wpf-admin/tools-tabs/antispam.php:21
|
1225 |
+
msgid "Spam Control"
|
1226 |
+
msgstr ""
|
1227 |
+
|
1228 |
+
#: wpf-admin/tools-tabs/antispam.php:22
|
1229 |
+
msgid ""
|
1230 |
+
"Some useful options to limit just registered users and minimize spam. This "
|
1231 |
+
"control don't affect users whose Usergroup has \"Can edit member\" and \"Can "
|
1232 |
+
"pass moderation\" permissions."
|
1233 |
+
msgstr ""
|
1234 |
+
|
1235 |
+
#: wpf-admin/tools-tabs/antispam.php:28
|
1236 |
+
msgid "Enable wpForo Spam Control"
|
1237 |
+
msgstr ""
|
1238 |
+
|
1239 |
+
#: wpf-admin/tools-tabs/antispam.php:37
|
1240 |
+
msgid "Ban user when spam is suspicted"
|
1241 |
+
msgstr ""
|
1242 |
+
|
1243 |
+
#: wpf-admin/tools-tabs/antispam.php:46
|
1244 |
+
msgid "Notify via email when new user is banned"
|
1245 |
+
msgstr ""
|
1246 |
+
|
1247 |
+
#: wpf-admin/tools-tabs/antispam.php:55
|
1248 |
+
msgid "Spam Suspicion Level for Topics"
|
1249 |
+
msgstr ""
|
1250 |
+
|
1251 |
+
#: wpf-admin/tools-tabs/antispam.php:59
|
1252 |
+
msgid "Spam Suspicion Level for Posts"
|
1253 |
+
msgstr ""
|
1254 |
+
|
1255 |
+
#: wpf-admin/tools-tabs/antispam.php:64
|
1256 |
+
msgid " is enabled"
|
1257 |
+
msgstr "מאופשר"
|
1258 |
+
|
1259 |
+
#: wpf-admin/tools-tabs/antispam.php:73
|
1260 |
+
msgid "New Registered User"
|
1261 |
+
msgstr ""
|
1262 |
+
|
1263 |
+
#: wpf-admin/tools-tabs/antispam.php:74
|
1264 |
+
msgid ""
|
1265 |
+
"Some useful options to limit just registered users and minimize spam. These "
|
1266 |
+
"options don't affect users whose Usergroup has \"Can edit member\" and \"Can "
|
1267 |
+
"pass moderation\" permissions."
|
1268 |
+
msgstr ""
|
1269 |
+
|
1270 |
+
#: wpf-admin/tools-tabs/antispam.php:81
|
1271 |
+
msgid "User is New (under hard spam control) during"
|
1272 |
+
msgstr ""
|
1273 |
+
|
1274 |
+
#: wpf-admin/tools-tabs/antispam.php:83
|
1275 |
+
msgid "first"
|
1276 |
+
msgstr "ראשון"
|
1277 |
+
|
1278 |
+
#: wpf-admin/tools-tabs/antispam.php:83
|
1279 |
+
msgid "posts"
|
1280 |
+
msgstr "שרשורים"
|
1281 |
+
|
1282 |
+
#: wpf-admin/tools-tabs/antispam.php:86
|
1283 |
+
msgid "Min number of posts to be able attach files"
|
1284 |
+
msgstr ""
|
1285 |
+
|
1286 |
+
#: wpf-admin/tools-tabs/antispam.php:90
|
1287 |
+
msgid "Min number of posts to be able post links"
|
1288 |
+
msgstr ""
|
1289 |
+
|
1290 |
+
#: wpf-admin/tools-tabs/antispam.php:95
|
1291 |
+
msgid "Do not allow to attach files with following extensions:"
|
1292 |
+
msgstr ""
|
1293 |
+
|
1294 |
+
#: wpf-admin/tools-tabs/antispam.php:109
|
1295 |
+
msgid "Possible Spam Attachments"
|
1296 |
+
msgstr ""
|
1297 |
+
|
1298 |
+
#: wpf-admin/tools-tabs/antispam.php:110
|
1299 |
+
msgid ""
|
1300 |
+
"This tool is designed to find attachment which have been uploaded by "
|
1301 |
+
"spammers. The tool checks most common spammer filenames and suggest to "
|
1302 |
+
"delete but you should check one by one and make sure those are spam files "
|
1303 |
+
"before deleting."
|
1304 |
+
msgstr ""
|
1305 |
+
|
1306 |
+
#: wpf-admin/tools-tabs/antispam.php:112
|
1307 |
+
msgid "Directory"
|
1308 |
+
msgstr ""
|
1309 |
+
|
1310 |
+
#: wpf-admin/tools-tabs/antispam.php:139
|
1311 |
+
msgid "Delete this file"
|
1312 |
+
msgstr ""
|
1313 |
+
|
1314 |
+
#: wpf-admin/tools-tabs/antispam.php:139
|
1315 |
+
msgid "Are you sure you want to permanently delete this file?"
|
1316 |
+
msgstr ""
|
1317 |
+
|
1318 |
+
#: wpf-admin/tools-tabs/antispam.php:150
|
1319 |
+
msgid "Click to delete Blue marked files"
|
1320 |
+
msgstr ""
|
1321 |
+
|
1322 |
+
#: wpf-admin/tools-tabs/antispam.php:151
|
1323 |
+
msgid ""
|
1324 |
+
"Are you sure you want to delete all BLUE marked files listed here. Please "
|
1325 |
+
"download Wordpress /wp-content/uploads/wpforo/ folder to your local computer "
|
1326 |
+
"before deleting files, this is not undoable."
|
1327 |
+
msgstr ""
|
1328 |
+
|
1329 |
+
#: wpf-admin/tools-tabs/antispam.php:152 wpf-admin/tools-tabs/antispam.php:158
|
1330 |
+
#: wpf-admin/tools-tabs/antispam.php:164 wpf-admin/tools-tabs/antispam.php:170
|
1331 |
+
msgid "Delete All"
|
1332 |
+
msgstr ""
|
1333 |
+
|
1334 |
+
#: wpf-admin/tools-tabs/antispam.php:155
|
1335 |
+
msgid "Click to delete Orange marked files"
|
1336 |
+
msgstr ""
|
1337 |
+
|
1338 |
+
#: wpf-admin/tools-tabs/antispam.php:157
|
1339 |
+
msgid ""
|
1340 |
+
"Are you sure you want to delete all ORANGE marked files listed here. Please "
|
1341 |
+
"download Wordpress /wp-content/uploads/wpforo/ folder to your local computer "
|
1342 |
+
"before deleting files, this is not undoable."
|
1343 |
+
msgstr ""
|
1344 |
+
|
1345 |
+
#: wpf-admin/tools-tabs/antispam.php:161
|
1346 |
+
msgid "Click to delete Red marked files"
|
1347 |
+
msgstr ""
|
1348 |
+
|
1349 |
+
#: wpf-admin/tools-tabs/antispam.php:163
|
1350 |
+
msgid ""
|
1351 |
+
"Are you sure you want to delete all RED marked files listed here. Please "
|
1352 |
+
"download Wordpress /wp-content/uploads/wpforo/ folder to your local computer "
|
1353 |
+
"before deleting files, this is not undoable."
|
1354 |
+
msgstr ""
|
1355 |
+
|
1356 |
+
#: wpf-admin/tools-tabs/antispam.php:167
|
1357 |
+
msgid "Click to delete Dark Red marked files"
|
1358 |
+
msgstr ""
|
1359 |
+
|
1360 |
+
#: wpf-admin/tools-tabs/antispam.php:169
|
1361 |
+
msgid ""
|
1362 |
+
"Are you sure you want to delete all DARK RED marked files listed here. "
|
1363 |
+
"Please download Wordpress /wp-content/uploads/wpforo/ folder to your local "
|
1364 |
+
"computer before deleting files, this is not undoable."
|
1365 |
+
msgstr ""
|
1366 |
+
|
1367 |
+
#: wpf-admin/tools-tabs/cleanup.php:12
|
1368 |
+
msgid "Delete Inactive Users"
|
1369 |
+
msgstr ""
|
1370 |
+
|
1371 |
+
#: wpf-admin/tools-tabs/cleanup.php:13
|
1372 |
+
#, php-format
|
1373 |
+
msgid ""
|
1374 |
+
"Inactive users are the account owners who have no topics, posts, comments "
|
1375 |
+
"and subscriptions for new content. In 99% cases this kind of accounts are "
|
1376 |
+
"being registered by Spammers. This tool allows you to only keep active and "
|
1377 |
+
"known inactive users."
|
1378 |
+
msgstr ""
|
1379 |
+
|
1380 |
+
#: wpf-admin/tools-tabs/cleanup.php:19
|
1381 |
+
msgid "Inactive users who have been registered more than"
|
1382 |
+
msgstr ""
|
1383 |
+
|
1384 |
+
#: wpf-admin/tools-tabs/cleanup.php:20
|
1385 |
+
msgid "days ago"
|
1386 |
+
msgstr ""
|
1387 |
+
|
1388 |
+
#: wpf-admin/tools-tabs/cleanup.php:25
|
1389 |
+
msgid "Filter by Usergroups"
|
1390 |
+
msgstr "סינון לפי קבוצת משתמשים"
|
1391 |
+
|
1392 |
+
#: wpf-admin/tools-tabs/cleanup.php:36
|
1393 |
+
msgid "Enable Auto-cleanup of inactive users"
|
1394 |
+
msgstr ""
|
1395 |
+
|
1396 |
+
#: wpf-admin/tools.php:8
|
1397 |
+
msgid "Forum Tools"
|
1398 |
+
msgstr "כלי פורום"
|
1399 |
+
|
1400 |
+
#: wpf-admin/tools.php:14
|
1401 |
+
msgid "Antispam"
|
1402 |
+
msgstr "אנטיספאם"
|
1403 |
+
|
1404 |
+
#: wpf-admin/tools.php:15
|
1405 |
+
msgid "Cleanup"
|
1406 |
+
msgstr "ניקוי"
|
1407 |
+
|
1408 |
+
#: wpf-admin/usergroup.php:18
|
1409 |
+
msgid "Usergroup id"
|
1410 |
+
msgstr "קוד קבוצת משתמשים"
|
1411 |
+
|
1412 |
+
#: wpf-admin/usergroup.php:19 wpf-admin/usergroup.php:42
|
1413 |
+
#: wpf-admin/usergroup.php:79
|
1414 |
+
msgid "Usergroup Name"
|
1415 |
+
msgstr "שם קבוצת משתמשים"
|
1416 |
+
|
1417 |
+
#: wpf-admin/usergroup.php:20
|
1418 |
+
msgid "Users Count"
|
1419 |
+
msgstr "ספירת משתמשים"
|
1420 |
+
|
1421 |
+
#: wpf-admin/usergroup.php:21
|
1422 |
+
msgid "New Users Default Group"
|
1423 |
+
msgstr "קבוצת ברירת מחדל למשתמשים חדשים"
|
1424 |
+
|
1425 |
+
#: wpf-admin/usergroup.php:33
|
1426 |
+
msgid "Edit this usergroup"
|
1427 |
+
msgstr "ערוך את קבוצת המשתמשים"
|
1428 |
+
|
1429 |
+
#: wpf-admin/usergroup.php:33 wpf-includes/wpf-phrases.php:73
|
1430 |
+
msgid "Edit"
|
1431 |
+
msgstr "עריכה"
|
1432 |
+
|
1433 |
+
#: wpf-admin/usergroup.php:34
|
1434 |
+
msgid "Delete this usergroup"
|
1435 |
+
msgstr ""
|
1436 |
+
|
1437 |
+
#: wpf-admin/usergroup.php:36
|
1438 |
+
msgid "View users list in this usergroup"
|
1439 |
+
msgstr ""
|
1440 |
+
|
1441 |
+
#: wpf-admin/usergroup.php:48
|
1442 |
+
msgid "Count of users in this usergroup"
|
1443 |
+
msgstr ""
|
1444 |
+
|
1445 |
+
#: wpf-admin/usergroup.php:53
|
1446 |
+
msgid "is Default"
|
1447 |
+
msgstr "ברירת מחדל"
|
1448 |
+
|
1449 |
+
#: wpf-admin/usergroup.php:55
|
1450 |
+
msgid "DO NOT set this option on higher level user groups !!!"
|
1451 |
+
msgstr ""
|
1452 |
+
|
1453 |
+
#: wpf-admin/usergroup.php:55
|
1454 |
+
msgid "Set as Default"
|
1455 |
+
msgstr "הגדר כברירת מחדל"
|
1456 |
+
|
1457 |
+
#: wpf-admin/usergroup.php:79 wpf-includes/wpf-phrases.php:133
|
1458 |
+
msgid "Guest"
|
1459 |
+
msgstr "אורח"
|
1460 |
+
|
1461 |
+
#: wpf-admin/usergroup.php:96
|
1462 |
+
msgid "WordPress User Role"
|
1463 |
+
msgstr ""
|
1464 |
+
|
1465 |
+
#: wpf-admin/usergroup.php:105
|
1466 |
+
msgid "Default Forum Access"
|
1467 |
+
msgstr ""
|
1468 |
+
|
1469 |
+
#: wpf-admin/usergroup.php:113
|
1470 |
+
msgid ""
|
1471 |
+
"This is only used when a new Usergroup is created, it automatically gets the "
|
1472 |
+
"selected Forum Access in all forums."
|
1473 |
+
msgstr ""
|
1474 |
+
|
1475 |
+
#: wpf-admin/usergroup.php:133 wpf-includes/wpf-phrases.php:375
|
1476 |
+
msgid "add"
|
1477 |
+
msgstr "הוספה"
|
1478 |
+
|
1479 |
+
#: wpf-admin/usergroup.php:133
|
1480 |
+
msgid "save"
|
1481 |
+
msgstr "שמירה"
|
1482 |
+
|
1483 |
+
#: wpf-admin/usergroup.php:154
|
1484 |
+
msgid "Delete Chosen Usergroup And Users"
|
1485 |
+
msgstr ""
|
1486 |
+
|
1487 |
+
#: wpf-admin/usergroup.php:164
|
1488 |
+
msgid "Delete Chosen Usergroup And Join Users To Other Usergroup"
|
1489 |
+
msgstr ""
|
1490 |
+
|
1491 |
+
#: wpf-admin/usergroup.php:176
|
1492 |
+
msgid "Users will be join this usergroup"
|
1493 |
+
msgstr ""
|
1494 |
+
|
1495 |
+
#: wpf-includes/class-forums.php:661
|
1496 |
+
msgid "Add a new SubForum"
|
1497 |
+
msgstr ""
|
1498 |
+
|
1499 |
+
#: wpf-includes/class-forums.php:661
|
1500 |
+
msgid "Add a new Forum in this Category"
|
1501 |
+
msgstr ""
|
1502 |
+
|
1503 |
+
#: wpf-includes/class-members.php:235
|
1504 |
+
msgid "<strong>ERROR</strong>: Please enter a username."
|
1505 |
+
msgstr "<strong>שגיאה</strong>: אנא הזן שם משתמש."
|
1506 |
+
|
1507 |
+
#: wpf-includes/class-members.php:239
|
1508 |
+
msgid ""
|
1509 |
+
"<strong>ERROR</strong>: This username is invalid because it uses illegal "
|
1510 |
+
"characters. Please enter a valid username."
|
1511 |
+
msgstr ""
|
1512 |
+
"<strong>שגיאה</strong>: שם משתמש זה אינו חוקי מכיוון שהוא משתמש בתווים לא "
|
1513 |
+
"חוקיים. הזן שם משתמש חוקי."
|
1514 |
+
|
1515 |
+
#: wpf-includes/class-members.php:248
|
1516 |
+
msgid ""
|
1517 |
+
"<strong>ERROR</strong>: This username is already registered. Please choose "
|
1518 |
+
"another one."
|
1519 |
+
msgstr "<strong>שגיאה</strong>: שם המשתמש קיים במערכת, בחר בשם משתמש אחר."
|
1520 |
+
|
1521 |
+
#: wpf-includes/class-members.php:252
|
1522 |
+
msgid "<strong>ERROR</strong>: Sorry, that username is not allowed."
|
1523 |
+
msgstr "<strong>שגיאה</strong>: סליחה, שם המשתמש הזה איננו מורשה."
|
1524 |
+
|
1525 |
+
#: wpf-includes/class-members.php:256
|
1526 |
+
msgid "<strong>ERROR</strong>: Please type your email address."
|
1527 |
+
msgstr "<strong>שגיאה</strong>: אנא הקלד את כתובת הדוא\"ל שלך."
|
1528 |
+
|
1529 |
+
#: wpf-includes/class-members.php:260
|
1530 |
+
msgid "<strong>ERROR</strong>: The email address isn’t correct."
|
1531 |
+
msgstr "<strong>שגיאה</strong>: כתובת הדוא\"ל שגויה."
|
1532 |
+
|
1533 |
+
#: wpf-includes/class-members.php:265
|
1534 |
+
msgid ""
|
1535 |
+
"<strong>ERROR</strong>: This email is already registered, please choose "
|
1536 |
+
"another one."
|
1537 |
+
msgstr ""
|
1538 |
+
"<strong>שגיאה</strong>: כתובת הדוא\"ל הזאת כבר קיימת במערכת, אנא בחר/י כתובת "
|
1539 |
+
"אחרת."
|
1540 |
+
|
1541 |
+
#: wpf-includes/class-members.php:1295
|
1542 |
+
msgid "What should be done with wpForo content owned by this user?"
|
1543 |
+
msgstr ""
|
1544 |
+
|
1545 |
+
#: wpf-includes/class-members.php:1297
|
1546 |
+
msgid "What should be done with wpForo content owned by these users?"
|
1547 |
+
msgstr ""
|
1548 |
+
|
1549 |
+
#: wpf-includes/class-members.php:1301
|
1550 |
+
msgid "Delete all wpForo content."
|
1551 |
+
msgstr ""
|
1552 |
+
|
1553 |
+
#: wpf-includes/class-members.php:1303
|
1554 |
+
msgid "Attribute all content to:"
|
1555 |
+
msgstr ""
|
1556 |
+
|
1557 |
+
#: wpf-includes/class-moderation.php:164
|
1558 |
+
#, php-format
|
1559 |
+
msgid ""
|
1560 |
+
"Probably spam file attachments have been detected by wpForo Spam Control. "
|
1561 |
+
"Please moderate suspected files here %s"
|
1562 |
+
msgstr ""
|
1563 |
+
|
1564 |
+
#: wpf-includes/class-notices.php:144 wpf-includes/wpf-phrases.php:69
|
1565 |
+
msgid "Dismiss this notice."
|
1566 |
+
msgstr "סגור הודעה זו."
|
1567 |
+
|
1568 |
+
#: wpf-includes/class-notices.php:160
|
1569 |
+
msgid "New Addons for Your Forum!"
|
1570 |
+
msgstr ""
|
1571 |
+
|
1572 |
+
#: wpf-includes/class-notices.php:160
|
1573 |
+
msgid "Extend your forum with wpForo addons"
|
1574 |
+
msgstr ""
|
1575 |
+
|
1576 |
+
#: wpf-includes/class-notices.php:173
|
1577 |
+
msgid "View all Addons"
|
1578 |
+
msgstr ""
|
1579 |
+
|
1580 |
+
#: wpf-includes/class-permissions.php:127 wpf-includes/wpf-phrases.php:421
|
1581 |
+
#, php-format
|
1582 |
+
msgid "%s access successfully added"
|
1583 |
+
msgstr "%s גישה הוספה בהצלחה"
|
1584 |
+
|
1585 |
+
#: wpf-includes/class-permissions.php:151 wpf-includes/wpf-phrases.php:422
|
1586 |
+
#, php-format
|
1587 |
+
msgid "%s access successfully edited"
|
1588 |
+
msgstr "%s גישה נערכה בהצלחה"
|
1589 |
+
|
1590 |
+
#: wpf-includes/class-phrases.php:184 wpf-includes/wpf-phrases.php:7
|
1591 |
+
msgid " Forum"
|
1592 |
+
msgstr "פורום"
|
1593 |
+
|
1594 |
+
#: wpf-includes/class-phrases.php:185 wpf-includes/wpf-phrases.php:6
|
1595 |
+
msgid " Discussion Board"
|
1596 |
+
msgstr "דיון"
|
1597 |
+
|
1598 |
+
#: wpf-includes/class-posts.php:36
|
1599 |
+
msgid "You are not permitted to view this attachment"
|
1600 |
+
msgstr "אין לך הרשאות לצפות בקובץ המצורף"
|
1601 |
+
|
1602 |
+
#: wpf-includes/class-template.php:74
|
1603 |
+
msgid "Insert link"
|
1604 |
+
msgstr "הכנס קישור"
|
1605 |
+
|
1606 |
+
#: wpf-includes/class-template.php:75
|
1607 |
+
msgid "Link Text"
|
1608 |
+
msgstr "טקסט קישור"
|
1609 |
+
|
1610 |
+
#: wpf-includes/class-template.php:76
|
1611 |
+
msgid "Open link in a new tab"
|
1612 |
+
msgstr "פתח קישור בלשונית חדשה"
|
1613 |
+
|
1614 |
+
#: wpf-includes/class-template.php:1149 wpf-includes/wpf-phrases.php:328
|
1615 |
+
msgid "Theme file not readable"
|
1616 |
+
msgstr ""
|
1617 |
+
|
1618 |
+
#: wpf-includes/functions-installation.php:578
|
1619 |
+
msgid "Start Profile Synchronization"
|
1620 |
+
msgstr ""
|
1621 |
+
|
1622 |
+
#: wpf-includes/functions-installation.php:578
|
1623 |
+
msgid "Continue Synchronization"
|
1624 |
+
msgstr ""
|
1625 |
+
|
1626 |
+
#: wpf-includes/functions-installation.php:581
|
1627 |
+
msgid ""
|
1628 |
+
"This process may take a few seconds or dozens of minutes, please be patient "
|
1629 |
+
"and don't close this page."
|
1630 |
+
msgstr ""
|
1631 |
+
|
1632 |
+
#: wpf-includes/functions-installation.php:582
|
1633 |
+
msgid ""
|
1634 |
+
"You can permanently disable this message in Dashboard > Forums > Features "
|
1635 |
+
"admin page."
|
1636 |
+
msgstr ""
|
1637 |
+
|
1638 |
+
#: wpf-includes/functions-installation.php:584
|
1639 |
+
msgid "wpForo Forum Installation | "
|
1640 |
+
msgstr ""
|
1641 |
+
|
1642 |
+
#: wpf-includes/functions-installation.php:585
|
1643 |
+
msgid ""
|
1644 |
+
"Forum users' profile data are not synchronized yet, this step is required! "
|
1645 |
+
"Please click the button below to complete installation."
|
1646 |
+
msgstr ""
|
1647 |
+
|
1648 |
+
#: wpf-includes/functions-template.php:7
|
1649 |
+
msgid "wpForo Menu"
|
1650 |
+
msgstr ""
|
1651 |
+
|
1652 |
+
#: wpf-includes/functions-template.php:159 wpf-includes/wpf-phrases.php:411
|
1653 |
+
msgid "wpForo Sidebar"
|
1654 |
+
msgstr ""
|
1655 |
+
|
1656 |
+
#: wpf-includes/functions-template.php:160 wpf-includes/wpf-phrases.php:192
|
1657 |
+
msgid ""
|
1658 |
+
"NOTE: If you're going to add widgets in this sidebar, please use 'Full "
|
1659 |
+
"Width' template for wpForo index page to avoid sidebar duplication."
|
1660 |
+
msgstr ""
|
1661 |
+
|
1662 |
+
#: wpf-includes/functions-template.php:199
|
1663 |
+
#: wpf-includes/functions-template.php:306
|
1664 |
+
#: wpf-includes/functions-template.php:369
|
1665 |
+
#: wpf-includes/functions-template.php:448
|
1666 |
+
#: wpf-includes/functions-template.php:529
|
1667 |
+
#: wpf-includes/functions-template.php:576 wpf-includes/wpf-phrases.php:335
|
1668 |
+
msgid "Title"
|
1669 |
+
msgstr "כותרת"
|
1670 |
+
|
1671 |
+
#: wpf-includes/functions-template.php:372
|
1672 |
+
#: wpf-includes/functions-template.php:451
|
1673 |
+
#: wpf-includes/functions-template.php:532 wpf-includes/wpf-phrases.php:211
|
1674 |
+
msgid "Number of Items"
|
1675 |
+
msgstr "מספר פריטים"
|
1676 |
+
|
1677 |
+
#: wpf-includes/functions-template.php:377 wpf-includes/wpf-phrases.php:70
|
1678 |
+
msgid "Display Avatars"
|
1679 |
+
msgstr ""
|
1680 |
+
|
1681 |
+
#: wpf-includes/functions-template.php:455
|
1682 |
+
#: wpf-includes/functions-template.php:536 wpf-includes/wpf-phrases.php:72
|
1683 |
+
msgid "Display with Avatars"
|
1684 |
+
msgstr ""
|
1685 |
+
|
1686 |
+
#: wpf-includes/functions.php:368
|
1687 |
+
msgid "Unapproved"
|
1688 |
+
msgstr "לא מאושר"
|
1689 |
+
|
1690 |
+
#: wpf-includes/functions.php:369
|
1691 |
+
msgid "Published"
|
1692 |
+
msgstr "פורסם"
|
1693 |
+
|
1694 |
+
#: wpf-includes/functions.php:378 wpf-includes/wpf-phrases.php:594
|
1695 |
+
msgid "Active"
|
1696 |
+
msgstr "פעיל"
|
1697 |
+
|
1698 |
+
#: wpf-includes/functions.php:379
|
1699 |
+
msgid "Banned"
|
1700 |
+
msgstr "חסום"
|
1701 |
+
|
1702 |
+
#: wpf-includes/functions.php:392 wpf-includes/functions.php:694
|
1703 |
+
#: wpf-includes/wpf-phrases.php:50
|
1704 |
+
msgid "Bulk Actions"
|
1705 |
+
msgstr ""
|
1706 |
+
|
1707 |
+
#: wpf-includes/functions.php:397 wpf-includes/functions.php:780
|
1708 |
+
#: wpf-includes/wpf-phrases.php:36
|
1709 |
+
msgid "Apply"
|
1710 |
+
msgstr "החל"
|
1711 |
+
|
1712 |
+
#: wpf-includes/functions.php:406 wpf-includes/wpf-phrases.php:301
|
1713 |
+
msgid "Show all forums"
|
1714 |
+
msgstr "הצג את כל הפורומים"
|
1715 |
+
|
1716 |
+
#: wpf-includes/functions.php:419 wpf-includes/wpf-phrases.php:351
|
1717 |
+
msgid "filter by group"
|
1718 |
+
msgstr "סינון לפי קבוצה"
|
1719 |
+
|
1720 |
+
#: wpf-includes/functions.php:431
|
1721 |
+
msgid "filter by status"
|
1722 |
+
msgstr "סינון לפי סטאטוס"
|
1723 |
+
|
1724 |
+
#: wpf-includes/functions.php:447
|
1725 |
+
msgid "filter by package"
|
1726 |
+
msgstr "סינון לפי חבילה"
|
1727 |
+
|
1728 |
+
#: wpf-includes/functions.php:476
|
1729 |
+
msgid "filter by user"
|
1730 |
+
msgstr "סינון לפי משתמש"
|
1731 |
+
|
1732 |
+
#: wpf-includes/functions.php:496 wpf-includes/functions.php:702
|
1733 |
+
#: wpf-includes/wpf-phrases.php:386
|
1734 |
+
msgid "item"
|
1735 |
+
msgstr "פריט"
|
1736 |
+
|
1737 |
+
#: wpf-includes/functions.php:529 wpf-includes/functions.php:545
|
1738 |
+
#: wpf-includes/wpf-phrases.php:285
|
1739 |
+
msgid "Select All"
|
1740 |
+
msgstr "בחר את כל"
|
1741 |
+
|
1742 |
+
#: wpf-includes/functions.php:534 wpf-includes/functions.php:550
|
1743 |
+
msgid "Type"
|
1744 |
+
msgstr "סוג"
|
1745 |
+
|
1746 |
+
#: wpf-includes/functions.php:607 wpf-includes/wpf-phrases.php:384
|
1747 |
+
msgid "edit user"
|
1748 |
+
msgstr "עריכת משתמש"
|
1749 |
+
|
1750 |
+
#: wpf-includes/functions.php:611 wpf-includes/wpf-phrases.php:383
|
1751 |
+
msgid "edit profile"
|
1752 |
+
msgstr "עריכת פרופיל"
|
1753 |
+
|
1754 |
+
#: wpf-includes/functions.php:616
|
1755 |
+
msgid "unban user"
|
1756 |
+
msgstr "ביטול חסימת משתמש"
|
1757 |
+
|
1758 |
+
#: wpf-includes/functions.php:616
|
1759 |
+
msgid "ban user"
|
1760 |
+
msgstr "חסום משתמש"
|
1761 |
+
|
1762 |
+
#: wpf-includes/functions.php:616
|
1763 |
+
msgid "Are you sure, you want to unban this user?"
|
1764 |
+
msgstr "האם אתה בטוח, שאתה רוצה לבטל את חסימת המשתמש הזה?"
|
1765 |
+
|
1766 |
+
#: wpf-includes/functions.php:616
|
1767 |
+
msgid "Are you sure, you want to ban this user?"
|
1768 |
+
msgstr "האם אתה בטוח, שאתה רוצה לחסום את המשתמש הזה?"
|
1769 |
+
|
1770 |
+
#: wpf-includes/functions.php:621 wpf-includes/functions.php:631
|
1771 |
+
#: wpf-includes/wpf-phrases.php:67
|
1772 |
+
msgid "Delete this item"
|
1773 |
+
msgstr "מחק פריט זה"
|
1774 |
+
|
1775 |
+
#: wpf-includes/functions.php:621 wpf-includes/functions.php:631
|
1776 |
+
#: wpf-includes/wpf-phrases.php:41
|
1777 |
+
msgid "Are you sure you whant to DELETE this item?"
|
1778 |
+
msgstr "האם את/ה בטוח/ה שאת/ה רוצה למחוק את הפריט הזה?"
|
1779 |
+
|
1780 |
+
#: wpf-includes/functions.php:626
|
1781 |
+
msgid "unapprove this item"
|
1782 |
+
msgstr "לא לאשר פריט זה"
|
1783 |
+
|
1784 |
+
#: wpf-includes/functions.php:626
|
1785 |
+
msgid "Approve this item"
|
1786 |
+
msgstr ""
|
1787 |
+
|
1788 |
+
#: wpf-includes/functions.php:626 wpf-includes/wpf-phrases.php:683
|
1789 |
+
msgid "unapprove"
|
1790 |
+
msgstr "לא לאשר"
|
1791 |
+
|
1792 |
+
#: wpf-includes/functions.php:626 wpf-includes/wpf-phrases.php:682
|
1793 |
+
msgid "approve"
|
1794 |
+
msgstr "אשר"
|
1795 |
+
|
1796 |
+
#: wpf-includes/functions.php:648 wpf-includes/functions.php:649
|
1797 |
+
#: wpf-includes/wpf-phrases.php:405
|
1798 |
+
msgid "view"
|
1799 |
+
msgstr "הצגה"
|
1800 |
+
|
1801 |
+
#: wpf-includes/functions.php:673
|
1802 |
+
msgid "Topic"
|
1803 |
+
msgstr "נושא"
|
1804 |
+
|
1805 |
+
#: wpf-includes/functions.php:673
|
1806 |
+
msgid "Post"
|
1807 |
+
msgstr "הודעה"
|
1808 |
+
|
1809 |
+
#: wpf-includes/functions.php:686 wpf-includes/wpf-phrases.php:201
|
1810 |
+
msgid "No items found"
|
1811 |
+
msgstr "לא נמצאו פריטים"
|
1812 |
+
|
1813 |
+
#: wpf-includes/functions.php:779 wpf-includes/wpf-phrases.php:141
|
1814 |
+
msgid "Items"
|
1815 |
+
msgstr "פריטים"
|
1816 |
+
|
1817 |
+
#: wpf-includes/functions.php:1106
|
1818 |
+
#, php-format
|
1819 |
+
msgid "Could not write file %s"
|
1820 |
+
msgstr "לא היה ניתן לשמור את קובץ %s"
|
1821 |
+
|
1822 |
+
#: wpf-includes/wpf-hooks.php:20 wpf-includes/wpf-phrases.php:136
|
1823 |
+
msgid ""
|
1824 |
+
"IMPORTANT! Uninstall is not a simple deactivation action. This action will "
|
1825 |
+
"permanently remove all forum data (forums, topics, replies, attachments...) "
|
1826 |
+
"from database. Please backup database before this action, you may need this "
|
1827 |
+
"forum data in future. If you are sure that you want to delete all forum data "
|
1828 |
+
"please confirm. If not, just cancel it, then you can deactivate this plugin, "
|
1829 |
+
"that will not remove forum data."
|
1830 |
+
msgstr ""
|
1831 |
+
|
1832 |
+
#: wpf-includes/wpf-hooks.php:20
|
1833 |
+
msgid "Uninstall"
|
1834 |
+
msgstr "מחיקה"
|
1835 |
+
|
1836 |
+
#: wpf-includes/wpf-hooks.php:1086 wpf-includes/wpf-phrases.php:188
|
1837 |
+
msgid "Move"
|
1838 |
+
msgstr "העברה"
|
1839 |
+
|
1840 |
+
#: wpf-includes/wpf-hooks.php:1121
|
1841 |
+
msgid "Clear"
|
1842 |
+
msgstr "נקה"
|
1843 |
+
|
1844 |
+
#: wpf-includes/wpf-hooks.php:1121
|
1845 |
+
msgid "Default"
|
1846 |
+
msgstr "ברירת מחדל"
|
1847 |
+
|
1848 |
+
#: wpf-includes/wpf-hooks.php:1121
|
1849 |
+
msgid "Select Color"
|
1850 |
+
msgstr "בחר צבע"
|
1851 |
+
|
1852 |
+
#: wpf-includes/wpf-hooks.php:1144
|
1853 |
+
msgid ""
|
1854 |
+
"IMPORTANT: wpForo can't work with default permalink, please change permalink "
|
1855 |
+
"structure"
|
1856 |
+
msgstr ""
|
1857 |
+
|
1858 |
+
#: wpf-includes/wpf-hooks.php:1165 wpf-includes/wpf-phrases.php:413
|
1859 |
+
msgid "wpForo Usergroup"
|
1860 |
+
msgstr ""
|
1861 |
+
|
1862 |
+
#: wpf-includes/wpf-hooks.php:1173 wpf-includes/wpf-phrases.php:412
|
1863 |
+
msgid "wpForo User Timezone"
|
1864 |
+
msgstr ""
|
1865 |
+
|
1866 |
+
#: wpf-includes/wpf-hooks.php:1362 wpf-includes/wpf-hooks.php:1451
|
1867 |
+
msgid "Please Moderate: "
|
1868 |
+
msgstr ""
|
1869 |
+
|
1870 |
+
#: wpf-includes/wpf-hooks.php:1363
|
1871 |
+
msgid ""
|
1872 |
+
"This topic is currently unapproved. You can approve topics in Dashboard "
|
1873 |
+
"» Forums » Moderation admin page."
|
1874 |
+
msgstr ""
|
1875 |
+
|
1876 |
+
#: wpf-includes/wpf-hooks.php:1452
|
1877 |
+
msgid ""
|
1878 |
+
"This post is currently unapproved. You can approve posts in Dashboard "
|
1879 |
+
"» Forums » Moderation admin page."
|
1880 |
+
msgstr ""
|
1881 |
+
|
1882 |
+
#: wpf-includes/wpf-hooks.php:1629 wpf-includes/wpf-hooks.php:1675
|
1883 |
+
msgid "New Forum"
|
1884 |
+
msgstr ""
|
1885 |
+
|
1886 |
+
#: wpf-includes/wpf-hooks.php:1637
|
1887 |
+
msgid "New User Group"
|
1888 |
+
msgstr ""
|
1889 |
+
|
1890 |
+
#: wpf-includes/wpf-hooks.php:1645 wpf-includes/wpf-hooks.php:1743
|
1891 |
+
msgid "New Phrase"
|
1892 |
+
msgstr ""
|
1893 |
+
|
1894 |
+
#: wpf-includes/wpf-hooks.php:1660
|
1895 |
+
msgid "Community"
|
1896 |
+
msgstr "קהילה"
|
1897 |
+
|
1898 |
+
#: wpf-includes/wpf-hooks.php:1727
|
1899 |
+
msgid "New UserGroup"
|
1900 |
+
msgstr ""
|
1901 |
+
|
1902 |
+
#: wpf-includes/wpf-phrases.php:8
|
1903 |
+
#, php-format
|
1904 |
+
msgid "%s and %s liked"
|
1905 |
+
msgstr "%s ו%s אהבו"
|
1906 |
+
|
1907 |
+
#: wpf-includes/wpf-phrases.php:9
|
1908 |
+
#, php-format
|
1909 |
+
msgid "%s liked"
|
1910 |
+
msgstr "%s אהבו"
|
1911 |
+
|
1912 |
+
#: wpf-includes/wpf-phrases.php:10
|
1913 |
+
#, php-format
|
1914 |
+
msgid "%s, %s and %s liked"
|
1915 |
+
msgstr "%s, %s ו%s אהבו"
|
1916 |
+
|
1917 |
+
#: wpf-includes/wpf-phrases.php:11
|
1918 |
+
#, php-format
|
1919 |
+
msgid "%s, %s, %s and %d people liked"
|
1920 |
+
msgstr "%s, %s, %s ו%d אנשים אהבו"
|
1921 |
+
|
1922 |
+
#: wpf-includes/wpf-phrases.php:12
|
1923 |
+
msgid "AOL IM"
|
1924 |
+
msgstr ""
|
1925 |
+
|
1926 |
+
#: wpf-includes/wpf-phrases.php:13
|
1927 |
+
msgid "About Me"
|
1928 |
+
msgstr "אודותי"
|
1929 |
+
|
1930 |
+
#: wpf-includes/wpf-phrases.php:16
|
1931 |
+
msgid "Account"
|
1932 |
+
msgstr "חשבון"
|
1933 |
+
|
1934 |
+
#: wpf-includes/wpf-phrases.php:19
|
1935 |
+
msgid "Activity"
|
1936 |
+
msgstr "פעילות"
|
1937 |
+
|
1938 |
+
#: wpf-includes/wpf-phrases.php:23
|
1939 |
+
msgid "Add a comment"
|
1940 |
+
msgstr "הוספת תגובה"
|
1941 |
+
|
1942 |
+
#: wpf-includes/wpf-phrases.php:24
|
1943 |
+
msgid "Add topic"
|
1944 |
+
msgstr "הוסף נושא"
|
1945 |
+
|
1946 |
+
#: wpf-includes/wpf-phrases.php:32
|
1947 |
+
msgid "Answer"
|
1948 |
+
msgstr "מענה"
|
1949 |
+
|
1950 |
+
#: wpf-includes/wpf-phrases.php:33
|
1951 |
+
msgid "Answer to"
|
1952 |
+
msgstr "ענה ל"
|
1953 |
+
|
1954 |
+
#: wpf-includes/wpf-phrases.php:34
|
1955 |
+
msgid "Answers"
|
1956 |
+
msgstr "תשובות"
|
1957 |
+
|
1958 |
+
#: wpf-includes/wpf-phrases.php:35
|
1959 |
+
msgid "Any Date"
|
1960 |
+
msgstr "כל תאריך"
|
1961 |
+
|
1962 |
+
#: wpf-includes/wpf-phrases.php:42
|
1963 |
+
msgid "Ascending order"
|
1964 |
+
msgstr "סדר עולה"
|
1965 |
+
|
1966 |
+
#: wpf-includes/wpf-phrases.php:43
|
1967 |
+
msgid "Attach file:"
|
1968 |
+
msgstr "קובץ מצורף:"
|
1969 |
+
|
1970 |
+
#: wpf-includes/wpf-phrases.php:44
|
1971 |
+
msgid "Attachments"
|
1972 |
+
msgstr "קבצים מצורפים"
|
1973 |
+
|
1974 |
+
#: wpf-includes/wpf-phrases.php:45
|
1975 |
+
msgid "Attachments Size"
|
1976 |
+
msgstr "גודל קבצים מצורפים"
|
1977 |
+
|
1978 |
+
#: wpf-includes/wpf-phrases.php:47
|
1979 |
+
msgid "Avatar"
|
1980 |
+
msgstr "צלמית"
|
1981 |
+
|
1982 |
+
#: wpf-includes/wpf-phrases.php:53
|
1983 |
+
msgid "Change password"
|
1984 |
+
msgstr "שנה סיסמא"
|
1985 |
+
|
1986 |
+
#: wpf-includes/wpf-phrases.php:54
|
1987 |
+
msgid "Choose target forum"
|
1988 |
+
msgstr ""
|
1989 |
+
|
1990 |
+
#: wpf-includes/wpf-phrases.php:55 wpf-themes/classic/functions.php:44
|
1991 |
+
#: wpf-themes/classic/functions.php:65 wpf-themes/classic/functions.php:94
|
1992 |
+
msgid "Collapsed"
|
1993 |
+
msgstr ""
|
1994 |
+
|
1995 |
+
#: wpf-includes/wpf-phrases.php:58
|
1996 |
+
msgid "Comments"
|
1997 |
+
msgstr "תגובות"
|
1998 |
+
|
1999 |
+
#: wpf-includes/wpf-phrases.php:59
|
2000 |
+
msgid "Confirm my subscription"
|
2001 |
+
msgstr "אשר את המנוי שלי"
|
2002 |
+
|
2003 |
+
#: wpf-includes/wpf-phrases.php:65
|
2004 |
+
msgid "Date"
|
2005 |
+
msgstr "תאריך"
|
2006 |
+
|
2007 |
+
#: wpf-includes/wpf-phrases.php:68
|
2008 |
+
msgid "Descending order"
|
2009 |
+
msgstr "סדר יורד"
|
2010 |
+
|
2011 |
+
#: wpf-includes/wpf-phrases.php:71
|
2012 |
+
msgid "Display Name"
|
2013 |
+
msgstr "שם מוצג"
|
2014 |
+
|
2015 |
+
#: wpf-includes/wpf-phrases.php:74
|
2016 |
+
msgid "Edited: "
|
2017 |
+
msgstr "נערך:"
|
2018 |
+
|
2019 |
+
#: wpf-includes/wpf-phrases.php:75
|
2020 |
+
msgid "Email"
|
2021 |
+
msgstr "דוא\"ל"
|
2022 |
+
|
2023 |
+
#: wpf-includes/wpf-phrases.php:88
|
2024 |
+
msgid "Enter title here"
|
2025 |
+
msgstr "הכנס כותרת כאן"
|
2026 |
+
|
2027 |
+
#: wpf-includes/wpf-phrases.php:89 wpf-themes/classic/functions.php:43
|
2028 |
+
#: wpf-themes/classic/functions.php:64 wpf-themes/classic/functions.php:93
|
2029 |
+
msgid "Expanded"
|
2030 |
+
msgstr ""
|
2031 |
+
|
2032 |
+
#: wpf-includes/wpf-phrases.php:90 wpf-themes/classic/functions.php:90
|
2033 |
+
msgid "Extended Layout - Intro posts"
|
2034 |
+
msgstr ""
|
2035 |
+
|
2036 |
+
#: wpf-includes/wpf-phrases.php:91 wpf-themes/classic/functions.php:40
|
2037 |
+
msgid "Extended Layout - Intro topics"
|
2038 |
+
msgstr ""
|
2039 |
+
|
2040 |
+
#: wpf-includes/wpf-phrases.php:92 wpf-themes/classic/functions.php:100
|
2041 |
+
msgid "Extended Layout - Number of intro posts"
|
2042 |
+
msgstr ""
|
2043 |
+
|
2044 |
+
#: wpf-includes/wpf-phrases.php:93 wpf-themes/classic/functions.php:49
|
2045 |
+
msgid "Extended Layout - Number of intro topics"
|
2046 |
+
msgstr ""
|
2047 |
+
|
2048 |
+
#: wpf-includes/wpf-phrases.php:94
|
2049 |
+
msgid "Facebook"
|
2050 |
+
msgstr "פייסבוק"
|
2051 |
+
|
2052 |
+
#: wpf-includes/wpf-phrases.php:95
|
2053 |
+
msgid "Failed to write file to disk"
|
2054 |
+
msgstr ""
|
2055 |
+
|
2056 |
+
#: wpf-includes/wpf-phrases.php:97
|
2057 |
+
msgid "File upload stopped by extension"
|
2058 |
+
msgstr ""
|
2059 |
+
|
2060 |
+
#: wpf-includes/wpf-phrases.php:98
|
2061 |
+
msgid "Find Posts by User"
|
2062 |
+
msgstr "מצא שרשורים לפי משתמש"
|
2063 |
+
|
2064 |
+
#: wpf-includes/wpf-phrases.php:99
|
2065 |
+
msgid "Find Topics Started by User"
|
2066 |
+
msgstr "מצא שרשורים שהותחלו ע\"י המשתמש"
|
2067 |
+
|
2068 |
+
#: wpf-includes/wpf-phrases.php:100
|
2069 |
+
msgid "First post and replies"
|
2070 |
+
msgstr "פרסום ראשון ותגובות"
|
2071 |
+
|
2072 |
+
#: wpf-includes/wpf-phrases.php:101 wpforo.php:88
|
2073 |
+
msgid "Forum"
|
2074 |
+
msgstr "פורום"
|
2075 |
+
|
2076 |
+
#: wpf-includes/wpf-phrases.php:102
|
2077 |
+
msgid "Forum - Login"
|
2078 |
+
msgstr "פורום - כניסה"
|
2079 |
+
|
2080 |
+
#: wpf-includes/wpf-phrases.php:103
|
2081 |
+
msgid "Forum - Page Not Found"
|
2082 |
+
msgstr "פורום - עמוד לא נמצא"
|
2083 |
+
|
2084 |
+
#: wpf-includes/wpf-phrases.php:104
|
2085 |
+
msgid "Forum - Registration"
|
2086 |
+
msgstr "פורום - רישום"
|
2087 |
+
|
2088 |
+
#: wpf-includes/wpf-phrases.php:106
|
2089 |
+
msgid "Forum Admin Email Addresses"
|
2090 |
+
msgstr "כתובות מייל למנהל"
|
2091 |
+
|
2092 |
+
#: wpf-includes/wpf-phrases.php:109
|
2093 |
+
msgid "Forum Home"
|
2094 |
+
msgstr "פורומים ראשי"
|
2095 |
+
|
2096 |
+
#: wpf-includes/wpf-phrases.php:111
|
2097 |
+
msgid "Forum Members"
|
2098 |
+
msgstr "משתמשי פורום"
|
2099 |
+
|
2100 |
+
#: wpf-includes/wpf-phrases.php:114
|
2101 |
+
msgid "Forum Profile"
|
2102 |
+
msgstr "פרופיל פורום"
|
2103 |
+
|
2104 |
+
#: wpf-includes/wpf-phrases.php:115
|
2105 |
+
msgid "Forum RSS Feed"
|
2106 |
+
msgstr "הזנת פורום"
|
2107 |
+
|
2108 |
+
#: wpf-includes/wpf-phrases.php:119
|
2109 |
+
msgid "Forum Statistics"
|
2110 |
+
msgstr "סטטיסטיקת פורום"
|
2111 |
+
|
2112 |
+
#: wpf-includes/wpf-phrases.php:122
|
2113 |
+
msgid "Forum is empty"
|
2114 |
+
msgstr "הפורום ריק"
|
2115 |
+
|
2116 |
+
#: wpf-includes/wpf-phrases.php:125
|
2117 |
+
msgid "From Email Address"
|
2118 |
+
msgstr "כתובת מאת"
|
2119 |
+
|
2120 |
+
#: wpf-includes/wpf-phrases.php:126
|
2121 |
+
msgid "From Name"
|
2122 |
+
msgstr "שם מאת"
|
2123 |
+
|
2124 |
+
#: wpf-includes/wpf-phrases.php:131
|
2125 |
+
msgid "Group"
|
2126 |
+
msgstr "קבוצה"
|
2127 |
+
|
2128 |
+
#: wpf-includes/wpf-phrases.php:132
|
2129 |
+
msgid "Google+"
|
2130 |
+
msgstr ""
|
2131 |
+
|
2132 |
+
#: wpf-includes/wpf-phrases.php:135
|
2133 |
+
msgid "ICQ"
|
2134 |
+
msgstr ""
|
2135 |
+
|
2136 |
+
#: wpf-includes/wpf-phrases.php:139
|
2137 |
+
msgid "Insert member name or email"
|
2138 |
+
msgstr "הקלד/י שם משתמש או מייל"
|
2139 |
+
|
2140 |
+
#: wpf-includes/wpf-phrases.php:142
|
2141 |
+
msgid "Joined"
|
2142 |
+
msgstr "הצטרף/ה"
|
2143 |
+
|
2144 |
+
#: wpf-includes/wpf-phrases.php:145
|
2145 |
+
msgid "Last 24 hours"
|
2146 |
+
msgstr "ב24 שעות האחרונות"
|
2147 |
+
|
2148 |
+
#: wpf-includes/wpf-phrases.php:146
|
2149 |
+
msgid "Last 3 Months"
|
2150 |
+
msgstr "ב3 חודשים האחרונים"
|
2151 |
+
|
2152 |
+
#: wpf-includes/wpf-phrases.php:147
|
2153 |
+
msgid "Last 6 Months"
|
2154 |
+
msgstr "ב6 חודשים האחרונים"
|
2155 |
+
|
2156 |
+
#: wpf-includes/wpf-phrases.php:148
|
2157 |
+
msgid "Last Active"
|
2158 |
+
msgstr "פעילות אחרונה"
|
2159 |
+
|
2160 |
+
#: wpf-includes/wpf-phrases.php:149
|
2161 |
+
msgid "Last Month"
|
2162 |
+
msgstr "בחודש האחרון"
|
2163 |
+
|
2164 |
+
#: wpf-includes/wpf-phrases.php:150
|
2165 |
+
msgid "Last Post"
|
2166 |
+
msgstr "פרסום אחרון"
|
2167 |
+
|
2168 |
+
#: wpf-includes/wpf-phrases.php:151
|
2169 |
+
msgid "Last Post Info"
|
2170 |
+
msgstr "פרטי ההודעה האחרונה"
|
2171 |
+
|
2172 |
+
#: wpf-includes/wpf-phrases.php:152
|
2173 |
+
msgid "Last Week"
|
2174 |
+
msgstr "שבוע שעבר"
|
2175 |
+
|
2176 |
+
#: wpf-includes/wpf-phrases.php:153
|
2177 |
+
msgid "Last Year ago"
|
2178 |
+
msgstr "שנה שעברה"
|
2179 |
+
|
2180 |
+
#: wpf-includes/wpf-phrases.php:154
|
2181 |
+
#, php-format
|
2182 |
+
msgid "Last post by %s"
|
2183 |
+
msgstr "פרסום אחרון ע\"י %s"
|
2184 |
+
|
2185 |
+
#: wpf-includes/wpf-phrases.php:155
|
2186 |
+
msgid "Latest Post"
|
2187 |
+
msgstr "הפרסום האחרון"
|
2188 |
+
|
2189 |
+
#: wpf-includes/wpf-phrases.php:156
|
2190 |
+
msgid "Leave a reply"
|
2191 |
+
msgstr "השאירו תגובה"
|
2192 |
+
|
2193 |
+
#: wpf-includes/wpf-phrases.php:157
|
2194 |
+
msgid "Length must be between 3 characters and 30 characters."
|
2195 |
+
msgstr "אורך שם המשתמש חייב להיות בין 3 ל15 תווים (באנגלית ו/או מספרים)"
|
2196 |
+
|
2197 |
+
#: wpf-includes/wpf-phrases.php:159
|
2198 |
+
msgid "Liked"
|
2199 |
+
msgstr "אהבו"
|
2200 |
+
|
2201 |
+
#: wpf-includes/wpf-phrases.php:160
|
2202 |
+
msgid "Location"
|
2203 |
+
msgstr "מיקום"
|
2204 |
+
|
2205 |
+
#: wpf-includes/wpf-phrases.php:161
|
2206 |
+
msgid "Login"
|
2207 |
+
msgstr "כניסה"
|
2208 |
+
|
2209 |
+
#: wpf-includes/wpf-phrases.php:163
|
2210 |
+
msgid "Logout"
|
2211 |
+
msgstr "יציאה"
|
2212 |
+
|
2213 |
+
#: wpf-includes/wpf-phrases.php:165
|
2214 |
+
msgid "Lost your password?"
|
2215 |
+
msgstr "שכחת את הסיסמא?"
|
2216 |
+
|
2217 |
+
#: wpf-includes/wpf-phrases.php:167
|
2218 |
+
msgid "MSN"
|
2219 |
+
msgstr ""
|
2220 |
+
|
2221 |
+
#: wpf-includes/wpf-phrases.php:168
|
2222 |
+
msgid "Maximum allowed file size is"
|
2223 |
+
msgstr "גודל קובץ מקסימלי מותר להעלאה"
|
2224 |
+
|
2225 |
+
#: wpf-includes/wpf-phrases.php:170
|
2226 |
+
msgid "Member Activity"
|
2227 |
+
msgstr "פעילות משתמש"
|
2228 |
+
|
2229 |
+
#: wpf-includes/wpf-phrases.php:171
|
2230 |
+
msgid "Member Information"
|
2231 |
+
msgstr "פרטי משתמש"
|
2232 |
+
|
2233 |
+
#: wpf-includes/wpf-phrases.php:172
|
2234 |
+
msgid "Member Rating"
|
2235 |
+
msgstr "דרוג משתמש"
|
2236 |
+
|
2237 |
+
#: wpf-includes/wpf-phrases.php:173
|
2238 |
+
msgid "Member Rating Badge"
|
2239 |
+
msgstr "תגי דירוג למשתמש"
|
2240 |
+
|
2241 |
+
#: wpf-includes/wpf-phrases.php:174
|
2242 |
+
msgid "Member Reputation"
|
2243 |
+
msgstr ""
|
2244 |
+
|
2245 |
+
#: wpf-includes/wpf-phrases.php:177
|
2246 |
+
msgid "Member information"
|
2247 |
+
msgstr "פרטי משתמש"
|
2248 |
+
|
2249 |
+
#: wpf-includes/wpf-phrases.php:181
|
2250 |
+
msgid "Members not found"
|
2251 |
+
msgstr "משתמש לא נמצא"
|
2252 |
+
|
2253 |
+
#: wpf-includes/wpf-phrases.php:182
|
2254 |
+
msgid ""
|
2255 |
+
"You have been banned. Please contact to forum administrators for more "
|
2256 |
+
"information."
|
2257 |
+
msgstr "נחסמת. אנא פנה למנהלי הפורום לקבלת מידע נוסף."
|
2258 |
+
|
2259 |
+
#: wpf-includes/wpf-phrases.php:183
|
2260 |
+
msgid "Messages"
|
2261 |
+
msgstr "הודעות"
|
2262 |
+
|
2263 |
+
#: wpf-includes/wpf-phrases.php:186
|
2264 |
+
msgid "Missing a temporary folder"
|
2265 |
+
msgstr "חסרה תיקייה זמנית"
|
2266 |
+
|
2267 |
+
#: wpf-includes/wpf-phrases.php:189
|
2268 |
+
msgid "Move topic"
|
2269 |
+
msgstr "העברת נושא"
|
2270 |
+
|
2271 |
+
#: wpf-includes/wpf-phrases.php:190
|
2272 |
+
msgid "Must be minimum 6 characters."
|
2273 |
+
msgstr "חייבת להיות לפחות שישה תווים."
|
2274 |
+
|
2275 |
+
#: wpf-includes/wpf-phrases.php:191
|
2276 |
+
msgid "My Profile"
|
2277 |
+
msgstr "הפרופיל שלי"
|
2278 |
+
|
2279 |
+
#: wpf-includes/wpf-phrases.php:198
|
2280 |
+
msgid "No activity found for this member."
|
2281 |
+
msgstr "לא נמצאה פעילות עבור משתמש זה."
|
2282 |
+
|
2283 |
+
#: wpf-includes/wpf-phrases.php:199
|
2284 |
+
msgid "No file was uploaded"
|
2285 |
+
msgstr "לא הועלה אף קובץ"
|
2286 |
+
|
2287 |
+
#: wpf-includes/wpf-phrases.php:200
|
2288 |
+
msgid "No forums were found here."
|
2289 |
+
msgstr "לא נמצאו כאן פורומים"
|
2290 |
+
|
2291 |
+
#: wpf-includes/wpf-phrases.php:204
|
2292 |
+
msgid "No online members at the moment"
|
2293 |
+
msgstr "אין חברים מקוונים כרגע"
|
2294 |
+
|
2295 |
+
#: wpf-includes/wpf-phrases.php:206
|
2296 |
+
msgid "No subscriptions found for this member."
|
2297 |
+
msgstr "לא נמצאו מנויים למשתמש זה."
|
2298 |
+
|
2299 |
+
#: wpf-includes/wpf-phrases.php:208
|
2300 |
+
msgid "No topics were found here"
|
2301 |
+
msgstr "לא נמצא פה אף נושא"
|
2302 |
+
|
2303 |
+
#: wpf-includes/wpf-phrases.php:215
|
2304 |
+
msgid "Occupation"
|
2305 |
+
msgstr "תעסוקה"
|
2306 |
+
|
2307 |
+
#: wpf-includes/wpf-phrases.php:216
|
2308 |
+
msgid "Offline"
|
2309 |
+
msgstr "לא מחוברים"
|
2310 |
+
|
2311 |
+
#: wpf-includes/wpf-phrases.php:217
|
2312 |
+
msgid "Online"
|
2313 |
+
msgstr "מחוברים"
|
2314 |
+
|
2315 |
+
#: wpf-includes/wpf-phrases.php:219
|
2316 |
+
msgid "Oops! The page you requested was not found!"
|
2317 |
+
msgstr "אופס! העמוד שחיפשת לא נמצא!"
|
2318 |
+
|
2319 |
+
#: wpf-includes/wpf-phrases.php:220
|
2320 |
+
msgid "Our newest member"
|
2321 |
+
msgstr "המשתמש החדש ביותר שלנו"
|
2322 |
+
|
2323 |
+
#: wpf-includes/wpf-phrases.php:221
|
2324 |
+
msgid "Page"
|
2325 |
+
msgstr "עמוד"
|
2326 |
+
|
2327 |
+
#: wpf-includes/wpf-phrases.php:223
|
2328 |
+
msgid "Password"
|
2329 |
+
msgstr "סיסמא"
|
2330 |
+
|
2331 |
+
#: wpf-includes/wpf-phrases.php:225
|
2332 |
+
#, php-format
|
2333 |
+
msgid "Please %s or %s"
|
2334 |
+
msgstr "%s או %s בבקשה"
|
2335 |
+
|
2336 |
+
#: wpf-includes/wpf-phrases.php:229
|
2337 |
+
msgid "Post Title"
|
2338 |
+
msgstr "נושא שירשור"
|
2339 |
+
|
2340 |
+
#: wpf-includes/wpf-phrases.php:230
|
2341 |
+
msgid "Post link"
|
2342 |
+
msgstr "קישור לשירשור"
|
2343 |
+
|
2344 |
+
#: wpf-includes/wpf-phrases.php:231
|
2345 |
+
msgid "Posted"
|
2346 |
+
msgstr "פורסם"
|
2347 |
+
|
2348 |
+
#: wpf-includes/wpf-phrases.php:232
|
2349 |
+
msgid "Posted by"
|
2350 |
+
msgstr "פורסם ע\"י"
|
2351 |
+
|
2352 |
+
#: wpf-includes/wpf-phrases.php:234
|
2353 |
+
msgid "Powered by"
|
2354 |
+
msgstr ""
|
2355 |
+
|
2356 |
+
#: wpf-includes/wpf-phrases.php:236 wpf-themes/classic/functions.php:70
|
2357 |
+
msgid "Q&A Layout - Number of intro topics"
|
2358 |
+
msgstr ""
|
2359 |
+
|
2360 |
+
#: wpf-includes/wpf-phrases.php:237 wpf-themes/classic/functions.php:61
|
2361 |
+
msgid "Q&A layout - Intro topics"
|
2362 |
+
msgstr ""
|
2363 |
+
|
2364 |
+
#: wpf-includes/wpf-phrases.php:238
|
2365 |
+
msgid "Question Comments"
|
2366 |
+
msgstr "תגובות לשאלות"
|
2367 |
+
|
2368 |
+
#: wpf-includes/wpf-phrases.php:239
|
2369 |
+
msgid "Questions"
|
2370 |
+
msgstr "שאלות"
|
2371 |
+
|
2372 |
+
#: wpf-includes/wpf-phrases.php:240
|
2373 |
+
msgid "Quote"
|
2374 |
+
msgstr "צטט"
|
2375 |
+
|
2376 |
+
#: wpf-includes/wpf-phrases.php:241
|
2377 |
+
msgid "RE"
|
2378 |
+
msgstr "השב"
|
2379 |
+
|
2380 |
+
#: wpf-includes/wpf-phrases.php:242
|
2381 |
+
msgid "REPLY:"
|
2382 |
+
msgstr "תגובה:"
|
2383 |
+
|
2384 |
+
#: wpf-includes/wpf-phrases.php:243
|
2385 |
+
msgid "RSS"
|
2386 |
+
msgstr ""
|
2387 |
+
|
2388 |
+
#: wpf-includes/wpf-phrases.php:244
|
2389 |
+
msgid "Rating"
|
2390 |
+
msgstr "דרוג"
|
2391 |
+
|
2392 |
+
#: wpf-includes/wpf-phrases.php:245
|
2393 |
+
msgid "Rating Badge"
|
2394 |
+
msgstr "תג דירוג"
|
2395 |
+
|
2396 |
+
#: wpf-includes/wpf-phrases.php:249
|
2397 |
+
msgid "Received Likes"
|
2398 |
+
msgstr "קיבל לייקים"
|
2399 |
+
|
2400 |
+
#: wpf-includes/wpf-phrases.php:250
|
2401 |
+
msgid "Recent Questions"
|
2402 |
+
msgstr "שאלות אחרונות"
|
2403 |
+
|
2404 |
+
#: wpf-includes/wpf-phrases.php:251
|
2405 |
+
msgid "Recent Topics"
|
2406 |
+
msgstr "נושאים אחרונים"
|
2407 |
+
|
2408 |
+
#: wpf-includes/wpf-phrases.php:252
|
2409 |
+
msgid "Register"
|
2410 |
+
msgstr "רישום"
|
2411 |
+
|
2412 |
+
#: wpf-includes/wpf-phrases.php:254
|
2413 |
+
msgid "Registered date"
|
2414 |
+
msgstr "תאריך רישום"
|
2415 |
+
|
2416 |
+
#: wpf-includes/wpf-phrases.php:255
|
2417 |
+
msgid "Relevancy"
|
2418 |
+
msgstr "הקשר"
|
2419 |
+
|
2420 |
+
#: wpf-includes/wpf-phrases.php:256
|
2421 |
+
msgid "Remember Me"
|
2422 |
+
msgstr "זכור אותי"
|
2423 |
+
|
2424 |
+
#: wpf-includes/wpf-phrases.php:262
|
2425 |
+
msgid "Replies"
|
2426 |
+
msgstr "תגובות"
|
2427 |
+
|
2428 |
+
#: wpf-includes/wpf-phrases.php:263
|
2429 |
+
msgid "Replies not found"
|
2430 |
+
msgstr "לא נמצאה תגובה"
|
2431 |
+
|
2432 |
+
#: wpf-includes/wpf-phrases.php:264
|
2433 |
+
msgid "Reply"
|
2434 |
+
msgstr "הגב"
|
2435 |
+
|
2436 |
+
#: wpf-includes/wpf-phrases.php:265
|
2437 |
+
msgid "Report"
|
2438 |
+
msgstr "דווח"
|
2439 |
+
|
2440 |
+
#: wpf-includes/wpf-phrases.php:268
|
2441 |
+
msgid "Report to Administration"
|
2442 |
+
msgstr "דווח למנהל"
|
2443 |
+
|
2444 |
+
#: wpf-includes/wpf-phrases.php:270
|
2445 |
+
msgid "Result Info"
|
2446 |
+
msgstr "תוצאות"
|
2447 |
+
|
2448 |
+
#: wpf-includes/wpf-phrases.php:272
|
2449 |
+
msgid "Save Changes"
|
2450 |
+
msgstr "שמירת שינויים"
|
2451 |
+
|
2452 |
+
#: wpf-includes/wpf-phrases.php:277
|
2453 |
+
msgid "Search Entire Posts"
|
2454 |
+
msgstr "חיפוש בכל תכולת ההודעה"
|
2455 |
+
|
2456 |
+
#: wpf-includes/wpf-phrases.php:278
|
2457 |
+
msgid "Search Phrase"
|
2458 |
+
msgstr "חפש ביטוי"
|
2459 |
+
|
2460 |
+
#: wpf-includes/wpf-phrases.php:279
|
2461 |
+
msgid "Search Titles Only"
|
2462 |
+
msgstr "חיפוש בכותרות בלבד"
|
2463 |
+
|
2464 |
+
#: wpf-includes/wpf-phrases.php:280
|
2465 |
+
msgid "Search Type"
|
2466 |
+
msgstr "סוג חיפוש"
|
2467 |
+
|
2468 |
+
#: wpf-includes/wpf-phrases.php:281
|
2469 |
+
msgid "Search in Forums"
|
2470 |
+
msgstr "חיפוש בפורומים"
|
2471 |
+
|
2472 |
+
#: wpf-includes/wpf-phrases.php:282
|
2473 |
+
msgid "Search in date period"
|
2474 |
+
msgstr "חיפוש בתקופה"
|
2475 |
+
|
2476 |
+
#: wpf-includes/wpf-phrases.php:283
|
2477 |
+
msgid "Search result for"
|
2478 |
+
msgstr "תוצאות חיפוש עבור"
|
2479 |
+
|
2480 |
+
#: wpf-includes/wpf-phrases.php:284
|
2481 |
+
msgid "Search..."
|
2482 |
+
msgstr "חיפוש..."
|
2483 |
+
|
2484 |
+
#: wpf-includes/wpf-phrases.php:286
|
2485 |
+
msgid "Select Page"
|
2486 |
+
msgstr "בחר עמוד"
|
2487 |
+
|
2488 |
+
#: wpf-includes/wpf-phrases.php:287
|
2489 |
+
msgid "Send Report"
|
2490 |
+
msgstr "שלח דו\"ח"
|
2491 |
+
|
2492 |
+
#: wpf-includes/wpf-phrases.php:291
|
2493 |
+
msgid "Set Topic Sticky"
|
2494 |
+
msgstr "נעץ נושא"
|
2495 |
+
|
2496 |
+
#: wpf-includes/wpf-phrases.php:292 wpf-themes/classic/functions.php:101
|
2497 |
+
msgid ""
|
2498 |
+
"Set this option value 0 if you want to show all posts under topic intro area."
|
2499 |
+
msgstr ""
|
2500 |
+
|
2501 |
+
#: wpf-includes/wpf-phrases.php:293
|
2502 |
+
msgid "Shop Account"
|
2503 |
+
msgstr ""
|
2504 |
+
|
2505 |
+
#: wpf-includes/wpf-phrases.php:303
|
2506 |
+
msgid "Sign In"
|
2507 |
+
msgstr "כניסה"
|
2508 |
+
|
2509 |
+
#: wpf-includes/wpf-phrases.php:304
|
2510 |
+
msgid "Signature"
|
2511 |
+
msgstr "חתימה"
|
2512 |
+
|
2513 |
+
#: wpf-includes/wpf-phrases.php:305
|
2514 |
+
msgid "Site Profile"
|
2515 |
+
msgstr ""
|
2516 |
+
|
2517 |
+
#: wpf-includes/wpf-phrases.php:306
|
2518 |
+
msgid "Skype"
|
2519 |
+
msgstr ""
|
2520 |
+
|
2521 |
+
#: wpf-includes/wpf-phrases.php:308
|
2522 |
+
msgid "Social Networks"
|
2523 |
+
msgstr "רשתות חברתיות"
|
2524 |
+
|
2525 |
+
#: wpf-includes/wpf-phrases.php:309
|
2526 |
+
msgid "Sorry, something wrong with your data."
|
2527 |
+
msgstr "מצטערים, משהו השתבש עם הנתונים שלך."
|
2528 |
+
|
2529 |
+
#: wpf-includes/wpf-phrases.php:310
|
2530 |
+
msgid "Sort Search Results by"
|
2531 |
+
msgstr "מיין תוצאות חיפוש לפי"
|
2532 |
+
|
2533 |
+
#: wpf-includes/wpf-phrases.php:311
|
2534 |
+
msgid "Specify avatar by URL"
|
2535 |
+
msgstr ""
|
2536 |
+
|
2537 |
+
#: wpf-includes/wpf-phrases.php:313
|
2538 |
+
msgid "Subforums"
|
2539 |
+
msgstr "תת פורומים"
|
2540 |
+
|
2541 |
+
#: wpf-includes/wpf-phrases.php:316
|
2542 |
+
msgid "Subscribe for new replies"
|
2543 |
+
msgstr "הרשם לקבלת תגובות חדשות"
|
2544 |
+
|
2545 |
+
#: wpf-includes/wpf-phrases.php:317
|
2546 |
+
msgid "Subscribe for new topics"
|
2547 |
+
msgstr "הרשם לקבלת נושאים חדשים"
|
2548 |
+
|
2549 |
+
#: wpf-includes/wpf-phrases.php:319
|
2550 |
+
msgid "Subscriptions"
|
2551 |
+
msgstr "מנויים"
|
2552 |
+
|
2553 |
+
#: wpf-includes/wpf-phrases.php:321
|
2554 |
+
msgid ""
|
2555 |
+
"Thank you for using wpForo! wpForo is a professional bulletin board for "
|
2556 |
+
"WorPress, and the only forum software which comes with Multi-layout template "
|
2557 |
+
"system. The \"Extended"
|
2558 |
+
msgstr ""
|
2559 |
+
|
2560 |
+
#: wpf-includes/wpf-phrases.php:322
|
2561 |
+
msgid ""
|
2562 |
+
"Thank you for using wpForo. wpForo is a premium forum plugin which will "
|
2563 |
+
"always be available for free. There will never be paid and pro versions of "
|
2564 |
+
"this forum board. However this is a very large and hard project so we also "
|
2565 |
+
"develop paid addons (extensions), which will financially help us to keep "
|
2566 |
+
"improving and adding new features to the free wpForo plugin. Forum addons "
|
2567 |
+
"will also be actively developed. The first addons \"Advanced Media Uploader"
|
2568 |
+
msgstr ""
|
2569 |
+
|
2570 |
+
#: wpf-includes/wpf-phrases.php:325
|
2571 |
+
msgid ""
|
2572 |
+
"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in "
|
2573 |
+
"the HTML form"
|
2574 |
+
msgstr ""
|
2575 |
+
|
2576 |
+
#: wpf-includes/wpf-phrases.php:326
|
2577 |
+
msgid "The uploaded file exceeds the upload_max_filesize directive in php.ini"
|
2578 |
+
msgstr ""
|
2579 |
+
|
2580 |
+
#: wpf-includes/wpf-phrases.php:327
|
2581 |
+
msgid "The uploaded file was only partially uploaded"
|
2582 |
+
msgstr ""
|
2583 |
+
|
2584 |
+
#: wpf-includes/wpf-phrases.php:334
|
2585 |
+
msgid "Timezone"
|
2586 |
+
msgstr "אזור זמן"
|
2587 |
+
|
2588 |
+
#: wpf-includes/wpf-phrases.php:336
|
2589 |
+
msgid "Topic RSS Feed"
|
2590 |
+
msgstr "הזנת נושא"
|
2591 |
+
|
2592 |
+
#: wpf-includes/wpf-phrases.php:337
|
2593 |
+
msgid "Topic Title"
|
2594 |
+
msgstr "כותרת נושא"
|
2595 |
+
|
2596 |
+
#: wpf-includes/wpf-phrases.php:338
|
2597 |
+
msgid "Topic title"
|
2598 |
+
msgstr "כותרת נושא"
|
2599 |
+
|
2600 |
+
#: wpf-includes/wpf-phrases.php:341
|
2601 |
+
msgid "Twitter"
|
2602 |
+
msgstr ""
|
2603 |
+
|
2604 |
+
#: wpf-includes/wpf-phrases.php:342
|
2605 |
+
msgid "Unknown upload error"
|
2606 |
+
msgstr ""
|
2607 |
+
|
2608 |
+
#: wpf-includes/wpf-phrases.php:343
|
2609 |
+
msgid "Unsubscribe"
|
2610 |
+
msgstr "בטל מנוי"
|
2611 |
+
|
2612 |
+
#: wpf-includes/wpf-phrases.php:346
|
2613 |
+
msgid "Upload an avatar"
|
2614 |
+
msgstr "העלה צלמית"
|
2615 |
+
|
2616 |
+
#: wpf-includes/wpf-phrases.php:348
|
2617 |
+
msgid ""
|
2618 |
+
"Use comments to ask for more information or suggest improvements. Avoid "
|
2619 |
+
"answering questions in comments."
|
2620 |
+
msgstr ""
|
2621 |
+
"השתמשו בתגובות כדי לקבל מידע נוסף או להציע שיפורים. הימנעו מלענות לשאלות "
|
2622 |
+
"בתגובות."
|
2623 |
+
|
2624 |
+
#: wpf-includes/wpf-phrases.php:350
|
2625 |
+
msgid "User"
|
2626 |
+
msgstr "משתמש"
|
2627 |
+
|
2628 |
+
#: wpf-includes/wpf-phrases.php:352
|
2629 |
+
msgid "User Group"
|
2630 |
+
msgstr "קבוצת משתמשים"
|
2631 |
+
|
2632 |
+
#: wpf-includes/wpf-phrases.php:353
|
2633 |
+
msgid "Usergroup has been successfully deleted."
|
2634 |
+
msgstr ""
|
2635 |
+
|
2636 |
+
#: wpf-includes/wpf-phrases.php:354
|
2637 |
+
msgid ""
|
2638 |
+
"Usergroup has been successfully deleted. All users of this usergroup have "
|
2639 |
+
"been moved to the usergroup you've chosen"
|
2640 |
+
msgstr ""
|
2641 |
+
|
2642 |
+
#: wpf-includes/wpf-phrases.php:355
|
2643 |
+
msgid "Username"
|
2644 |
+
msgstr "שם משתמש"
|
2645 |
+
|
2646 |
+
#: wpf-includes/wpf-phrases.php:357
|
2647 |
+
msgid "View entire post"
|
2648 |
+
msgstr "צפה בהודעה המלאה"
|
2649 |
+
|
2650 |
+
#: wpf-includes/wpf-phrases.php:358
|
2651 |
+
msgid "View the latest post"
|
2652 |
+
msgstr "צפה בהודעות האחרונות"
|
2653 |
+
|
2654 |
+
#: wpf-includes/wpf-phrases.php:359
|
2655 |
+
msgid "Views"
|
2656 |
+
msgstr "צפיות"
|
2657 |
+
|
2658 |
+
#: wpf-includes/wpf-phrases.php:360
|
2659 |
+
msgid "Votes"
|
2660 |
+
msgstr "הצבעות"
|
2661 |
+
|
2662 |
+
#: wpf-includes/wpf-phrases.php:361
|
2663 |
+
msgid "Website"
|
2664 |
+
msgstr "אתר"
|
2665 |
+
|
2666 |
+
#: wpf-includes/wpf-phrases.php:363
|
2667 |
+
msgid "Wordpress avatar system"
|
2668 |
+
msgstr ""
|
2669 |
+
|
2670 |
+
#: wpf-includes/wpf-phrases.php:364
|
2671 |
+
msgid "Working"
|
2672 |
+
msgstr "פועל"
|
2673 |
+
|
2674 |
+
#: wpf-includes/wpf-phrases.php:365
|
2675 |
+
msgid "Write message"
|
2676 |
+
msgstr "רשום הודעה"
|
2677 |
+
|
2678 |
+
#: wpf-includes/wpf-phrases.php:366
|
2679 |
+
msgid "Yahoo"
|
2680 |
+
msgstr ""
|
2681 |
+
|
2682 |
+
#: wpf-includes/wpf-phrases.php:368
|
2683 |
+
msgid "You"
|
2684 |
+
msgstr "את/ה"
|
2685 |
+
|
2686 |
+
#: wpf-includes/wpf-phrases.php:370
|
2687 |
+
#, php-format
|
2688 |
+
msgid "You can go to %s page or Search here"
|
2689 |
+
msgstr ""
|
2690 |
+
|
2691 |
+
#: wpf-includes/wpf-phrases.php:372
|
2692 |
+
msgid "Your Answer"
|
2693 |
+
msgstr "תשובתך"
|
2694 |
+
|
2695 |
+
#: wpf-includes/wpf-phrases.php:373
|
2696 |
+
msgid "account"
|
2697 |
+
msgstr "חשבון"
|
2698 |
+
|
2699 |
+
#: wpf-includes/wpf-phrases.php:374
|
2700 |
+
msgid "activity"
|
2701 |
+
msgstr "פעילות"
|
2702 |
+
|
2703 |
+
#: wpf-includes/wpf-phrases.php:376
|
2704 |
+
msgid "add_new"
|
2705 |
+
msgstr ""
|
2706 |
+
|
2707 |
+
#: wpf-includes/wpf-phrases.php:377
|
2708 |
+
#, php-format
|
2709 |
+
msgid "%s ago"
|
2710 |
+
msgstr "לפני %s"
|
2711 |
+
|
2712 |
+
#: wpf-includes/wpf-phrases.php:378
|
2713 |
+
msgid "by"
|
2714 |
+
msgstr "ע\"י"
|
2715 |
+
|
2716 |
+
#: wpf-includes/wpf-phrases.php:379
|
2717 |
+
#, php-format
|
2718 |
+
msgid "by %s"
|
2719 |
+
msgstr "ע\"י %s"
|
2720 |
+
|
2721 |
+
#: wpf-includes/wpf-phrases.php:380
|
2722 |
+
msgid "confirm password"
|
2723 |
+
msgstr "אשר סיסמא"
|
2724 |
+
|
2725 |
+
#: wpf-includes/wpf-phrases.php:385
|
2726 |
+
msgid "forums"
|
2727 |
+
msgstr "פורומים"
|
2728 |
+
|
2729 |
+
#: wpf-includes/wpf-phrases.php:387
|
2730 |
+
msgid "login"
|
2731 |
+
msgstr "כניסה"
|
2732 |
+
|
2733 |
+
#: wpf-includes/wpf-phrases.php:388
|
2734 |
+
msgid "logout"
|
2735 |
+
msgstr "יציאה"
|
2736 |
+
|
2737 |
+
#: wpf-includes/wpf-phrases.php:389
|
2738 |
+
msgid "matches"
|
2739 |
+
msgstr "התאמות"
|
2740 |
+
|
2741 |
+
#: wpf-includes/wpf-phrases.php:390
|
2742 |
+
msgid "members"
|
2743 |
+
msgstr "משתמשים"
|
2744 |
+
|
2745 |
+
#: wpf-includes/wpf-phrases.php:392
|
2746 |
+
msgid "my profile"
|
2747 |
+
msgstr "הפרופיל שלי"
|
2748 |
+
|
2749 |
+
#: wpf-includes/wpf-phrases.php:393
|
2750 |
+
msgid "new password"
|
2751 |
+
msgstr "סיסמא חדשה"
|
2752 |
+
|
2753 |
+
#: wpf-includes/wpf-phrases.php:394
|
2754 |
+
msgid "new password again"
|
2755 |
+
msgstr "סיסמא חדשה מחדש"
|
2756 |
+
|
2757 |
+
#: wpf-includes/wpf-phrases.php:395
|
2758 |
+
msgid "next"
|
2759 |
+
msgstr "הבא"
|
2760 |
+
|
2761 |
+
#: wpf-includes/wpf-phrases.php:396
|
2762 |
+
msgid "old password"
|
2763 |
+
msgstr "סיסמא ישנה"
|
2764 |
+
|
2765 |
+
#: wpf-includes/wpf-phrases.php:397
|
2766 |
+
msgid "phrase_key"
|
2767 |
+
msgstr ""
|
2768 |
+
|
2769 |
+
#: wpf-includes/wpf-phrases.php:398
|
2770 |
+
msgid "phrase_value"
|
2771 |
+
msgstr ""
|
2772 |
+
|
2773 |
+
#: wpf-includes/wpf-phrases.php:399
|
2774 |
+
msgid "posted"
|
2775 |
+
msgstr "פורסם"
|
2776 |
+
|
2777 |
+
#: wpf-includes/wpf-phrases.php:400
|
2778 |
+
msgid "prev"
|
2779 |
+
msgstr "הקודם"
|
2780 |
+
|
2781 |
+
#: wpf-includes/wpf-phrases.php:401
|
2782 |
+
msgid "register"
|
2783 |
+
msgstr "הרשם"
|
2784 |
+
|
2785 |
+
#: wpf-includes/wpf-phrases.php:402
|
2786 |
+
msgid "replies"
|
2787 |
+
msgstr "תגובות"
|
2788 |
+
|
2789 |
+
#: wpf-includes/wpf-phrases.php:403
|
2790 |
+
msgid "subscriptions"
|
2791 |
+
msgstr "מנויים"
|
2792 |
+
|
2793 |
+
#: wpf-includes/wpf-phrases.php:404
|
2794 |
+
msgid "update"
|
2795 |
+
msgstr "עדכון"
|
2796 |
+
|
2797 |
+
#: wpf-includes/wpf-phrases.php:406
|
2798 |
+
msgid "view all posts"
|
2799 |
+
msgstr "הצג את כל השרשורים"
|
2800 |
+
|
2801 |
+
#: wpf-includes/wpf-phrases.php:407
|
2802 |
+
msgid "view all questions"
|
2803 |
+
msgstr "הצג את כל השאלות"
|
2804 |
+
|
2805 |
+
#: wpf-includes/wpf-phrases.php:408
|
2806 |
+
msgid "view all topics"
|
2807 |
+
msgstr "הצג את כל הנושאים"
|
2808 |
+
|
2809 |
+
#: wpf-includes/wpf-phrases.php:410
|
2810 |
+
msgid "wpForo Navigation"
|
2811 |
+
msgstr ""
|
2812 |
+
|
2813 |
+
#: wpf-includes/wpf-phrases.php:415
|
2814 |
+
msgid "{number}B"
|
2815 |
+
msgstr "{number}ב"
|
2816 |
+
|
2817 |
+
#: wpf-includes/wpf-phrases.php:416
|
2818 |
+
msgid "{number}K"
|
2819 |
+
msgstr "{number}ק"
|
2820 |
+
|
2821 |
+
#: wpf-includes/wpf-phrases.php:417
|
2822 |
+
msgid "{number}M"
|
2823 |
+
msgstr "{number}מ"
|
2824 |
+
|
2825 |
+
#: wpf-includes/wpf-phrases.php:418
|
2826 |
+
msgid "{number}T"
|
2827 |
+
msgstr "{number}ט"
|
2828 |
+
|
2829 |
+
#: wpf-includes/wpf-phrases.php:423
|
2830 |
+
msgid "Access add error"
|
2831 |
+
msgstr ""
|
2832 |
+
|
2833 |
+
#: wpf-includes/wpf-phrases.php:424
|
2834 |
+
msgid "Access delete error"
|
2835 |
+
msgstr ""
|
2836 |
+
|
2837 |
+
#: wpf-includes/wpf-phrases.php:425
|
2838 |
+
msgid "Access edit error"
|
2839 |
+
msgstr ""
|
2840 |
+
|
2841 |
+
#: wpf-includes/wpf-phrases.php:426
|
2842 |
+
msgid "Access successfully deleted"
|
2843 |
+
msgstr ""
|
2844 |
+
|
2845 |
+
#: wpf-includes/wpf-phrases.php:427
|
2846 |
+
msgid "Add Topic error: No forum selected"
|
2847 |
+
msgstr ""
|
2848 |
+
|
2849 |
+
#: wpf-includes/wpf-phrases.php:428
|
2850 |
+
msgid "All Checked topics successfully deleted"
|
2851 |
+
msgstr ""
|
2852 |
+
|
2853 |
+
#: wpf-includes/wpf-phrases.php:429
|
2854 |
+
msgid "Can't add forum"
|
2855 |
+
msgstr "אין אפשרות להוסיף פורום"
|
2856 |
+
|
2857 |
+
#: wpf-includes/wpf-phrases.php:430
|
2858 |
+
msgid "Can't add new language"
|
2859 |
+
msgstr ""
|
2860 |
+
|
2861 |
+
#: wpf-includes/wpf-phrases.php:431
|
2862 |
+
msgid "Can't delete this Usergroup"
|
2863 |
+
msgstr ""
|
2864 |
+
|
2865 |
+
#: wpf-includes/wpf-phrases.php:432
|
2866 |
+
msgid "Can't send confirmation email"
|
2867 |
+
msgstr ""
|
2868 |
+
|
2869 |
+
#: wpf-includes/wpf-phrases.php:433
|
2870 |
+
msgid "Can't send report email"
|
2871 |
+
msgstr ""
|
2872 |
+
|
2873 |
+
#: wpf-includes/wpf-phrases.php:434
|
2874 |
+
msgid "Can't subscribe to this item"
|
2875 |
+
msgstr "לא ניתן להרשם לפריט זה"
|
2876 |
+
|
2877 |
+
#: wpf-includes/wpf-phrases.php:435
|
2878 |
+
msgid "Can't write a post: This topic is closed"
|
2879 |
+
msgstr "נושא זה סגור, תגובות לא יתקבלו יותר"
|
2880 |
+
|
2881 |
+
#: wpf-includes/wpf-phrases.php:436
|
2882 |
+
msgid "Can`t upload file"
|
2883 |
+
msgstr "לא ניתן להעלות קובץ"
|
2884 |
+
|
2885 |
+
#: wpf-includes/wpf-phrases.php:437
|
2886 |
+
msgid "Cannot update forum hierarchy"
|
2887 |
+
msgstr ""
|
2888 |
+
|
2889 |
+
#: wpf-includes/wpf-phrases.php:438
|
2890 |
+
msgid "Cannot update post data"
|
2891 |
+
msgstr "אין אפשרות לעדכן את נתוני ההודעה"
|
2892 |
+
|
2893 |
+
#: wpf-includes/wpf-phrases.php:439
|
2894 |
+
msgid "Could not be unsubscribe from this item"
|
2895 |
+
msgstr "לא ניתן להסיר רישום מנושא זה"
|
2896 |
+
|
2897 |
+
#: wpf-includes/wpf-phrases.php:440
|
2898 |
+
msgid "Email address exists. Please insert another."
|
2899 |
+
msgstr "כתובת הדוא\"ל כבר קיימת, אנא נסו כתובת אחרת"
|
2900 |
+
|
2901 |
+
#: wpf-includes/wpf-phrases.php:441
|
2902 |
+
msgid "Error: Forum is not found"
|
2903 |
+
msgstr "שגיאה: פורום לא נמצא"
|
2904 |
+
|
2905 |
+
#: wpf-includes/wpf-phrases.php:442
|
2906 |
+
msgid "Error: No topic selected"
|
2907 |
+
msgstr "שגיאה: לא נבחר נושא"
|
2908 |
+
|
2909 |
+
#: wpf-includes/wpf-phrases.php:443
|
2910 |
+
msgid "Error: Topic is not found"
|
2911 |
+
msgstr "שגיאה: נושא לא נמצא"
|
2912 |
+
|
2913 |
+
#: wpf-includes/wpf-phrases.php:444
|
2914 |
+
msgid "Error: please inset some text to report."
|
2915 |
+
msgstr ""
|
2916 |
+
|
2917 |
+
#: wpf-includes/wpf-phrases.php:445
|
2918 |
+
msgid "Features successfully updated"
|
2919 |
+
msgstr ""
|
2920 |
+
|
2921 |
+
#: wpf-includes/wpf-phrases.php:446
|
2922 |
+
msgid "Features successfully updated, but previous value not changed"
|
2923 |
+
msgstr ""
|
2924 |
+
|
2925 |
+
#: wpf-includes/wpf-phrases.php:447
|
2926 |
+
msgid "File type is not allowed"
|
2927 |
+
msgstr "סוג הקובץ אינו מורשה"
|
2928 |
+
|
2929 |
+
#: wpf-includes/wpf-phrases.php:448
|
2930 |
+
msgid "Forum Base URL successfully updated"
|
2931 |
+
msgstr ""
|
2932 |
+
|
2933 |
+
#: wpf-includes/wpf-phrases.php:449
|
2934 |
+
msgid "Forum deleting error"
|
2935 |
+
msgstr ""
|
2936 |
+
|
2937 |
+
#: wpf-includes/wpf-phrases.php:450
|
2938 |
+
msgid "Forum hierarchy successfully updated"
|
2939 |
+
msgstr ""
|
2940 |
+
|
2941 |
+
#: wpf-includes/wpf-phrases.php:451
|
2942 |
+
msgid "Forum is successfully merged"
|
2943 |
+
msgstr ""
|
2944 |
+
|
2945 |
+
#: wpf-includes/wpf-phrases.php:452
|
2946 |
+
msgid "Forum merging error"
|
2947 |
+
msgstr ""
|
2948 |
+
|
2949 |
+
#: wpf-includes/wpf-phrases.php:453
|
2950 |
+
msgid "Forum options successfully updated"
|
2951 |
+
msgstr ""
|
2952 |
+
|
2953 |
+
#: wpf-includes/wpf-phrases.php:454
|
2954 |
+
msgid "Forum options successfully updated, but previous value not changed"
|
2955 |
+
msgstr ""
|
2956 |
+
|
2957 |
+
#: wpf-includes/wpf-phrases.php:455
|
2958 |
+
msgid "Forum successfully updated"
|
2959 |
+
msgstr ""
|
2960 |
+
|
2961 |
+
#: wpf-includes/wpf-phrases.php:456
|
2962 |
+
msgid "Forum update error"
|
2963 |
+
msgstr ""
|
2964 |
+
|
2965 |
+
#: wpf-includes/wpf-phrases.php:457
|
2966 |
+
msgid "General options successfully updated"
|
2967 |
+
msgstr "אפשרויות כלליות עודכנו בהצלחה"
|
2968 |
+
|
2969 |
+
#: wpf-includes/wpf-phrases.php:458
|
2970 |
+
msgid "Illegal character in username."
|
2971 |
+
msgstr "אות לא חוקית בשם המשתמש"
|
2972 |
+
|
2973 |
+
#: wpf-includes/wpf-phrases.php:459
|
2974 |
+
msgid "Insert your Email address."
|
2975 |
+
msgstr "הקלד/י את כתובת הדוא\"ל שלך."
|
2976 |
+
|
2977 |
+
#: wpf-includes/wpf-phrases.php:460
|
2978 |
+
msgid "Invalid Email address"
|
2979 |
+
msgstr "כתובת דוא\"ל שגויה"
|
2980 |
+
|
2981 |
+
#: wpf-includes/wpf-phrases.php:461
|
2982 |
+
msgid "Invalid request!"
|
2983 |
+
msgstr "בקשה שגויה!"
|
2984 |
+
|
2985 |
+
#: wpf-includes/wpf-phrases.php:462
|
2986 |
+
msgid "Member options successfully updated"
|
2987 |
+
msgstr "אפשרויות משתמש עודכנו בהצלחה"
|
2988 |
+
|
2989 |
+
#: wpf-includes/wpf-phrases.php:463
|
2990 |
+
msgid "Member options successfully updated, but previous value not changed"
|
2991 |
+
msgstr ""
|
2992 |
+
|
2993 |
+
#: wpf-includes/wpf-phrases.php:464
|
2994 |
+
msgid "Message has been sent"
|
2995 |
+
msgstr "הודעה נשלחה"
|
2996 |
+
|
2997 |
+
#: wpf-includes/wpf-phrases.php:465
|
2998 |
+
msgid ""
|
2999 |
+
"New language successfully added and changed wpforo language to new language"
|
3000 |
+
msgstr ""
|
3001 |
+
|
3002 |
+
#: wpf-includes/wpf-phrases.php:466
|
3003 |
+
msgid "No Posts found for update"
|
3004 |
+
msgstr "לא נמצאו שרשורים לעדכון"
|
3005 |
+
|
3006 |
+
#: wpf-includes/wpf-phrases.php:467
|
3007 |
+
msgid "Password length must be between 6 characters and 20 characters."
|
3008 |
+
msgstr "אורך הסיסמא חייב להיות בין 6 ל20 תווים"
|
3009 |
+
|
3010 |
+
#: wpf-includes/wpf-phrases.php:468
|
3011 |
+
msgid "Password mismatch."
|
3012 |
+
msgstr "אי התאמה של הסיסמה."
|
3013 |
+
|
3014 |
+
#: wpf-includes/wpf-phrases.php:469
|
3015 |
+
msgid "Permission denied"
|
3016 |
+
msgstr "גישה נדחתה"
|
3017 |
+
|
3018 |
+
#: wpf-includes/wpf-phrases.php:470
|
3019 |
+
msgid "Permission denied for add forum"
|
3020 |
+
msgstr ""
|
3021 |
+
|
3022 |
+
#: wpf-includes/wpf-phrases.php:471
|
3023 |
+
msgid "Permission denied for delete forum"
|
3024 |
+
msgstr ""
|
3025 |
+
|
3026 |
+
#: wpf-includes/wpf-phrases.php:472
|
3027 |
+
msgid "Permission denied for edit forum"
|
3028 |
+
msgstr ""
|
3029 |
+
|
3030 |
+
#: wpf-includes/wpf-phrases.php:473
|
3031 |
+
msgid "Permission denied for this action"
|
3032 |
+
msgstr ""
|
3033 |
+
|
3034 |
+
#: wpf-includes/wpf-phrases.php:474
|
3035 |
+
msgid "Phrase add error"
|
3036 |
+
msgstr ""
|
3037 |
+
|
3038 |
+
#: wpf-includes/wpf-phrases.php:475
|
3039 |
+
msgid "Phrase adding error"
|
3040 |
+
msgstr ""
|
3041 |
+
|
3042 |
+
#: wpf-includes/wpf-phrases.php:476
|
3043 |
+
msgid "Phrase successfully added"
|
3044 |
+
msgstr ""
|
3045 |
+
|
3046 |
+
#: wpf-includes/wpf-phrases.php:477
|
3047 |
+
msgid "Phrase successfully updates"
|
3048 |
+
msgstr ""
|
3049 |
+
|
3050 |
+
#: wpf-includes/wpf-phrases.php:478
|
3051 |
+
msgid "Phrase update error"
|
3052 |
+
msgstr ""
|
3053 |
+
|
3054 |
+
#: wpf-includes/wpf-phrases.php:479
|
3055 |
+
msgid "Please insert required fields!"
|
3056 |
+
msgstr "נא למלא את שדות חובה!"
|
3057 |
+
|
3058 |
+
#: wpf-includes/wpf-phrases.php:480
|
3059 |
+
msgid "Post delete error"
|
3060 |
+
msgstr ""
|
3061 |
+
|
3062 |
+
#: wpf-includes/wpf-phrases.php:482
|
3063 |
+
msgid "Post options successfully updated"
|
3064 |
+
msgstr "אפשרויות הודעה עודכנו בהצלחה"
|
3065 |
+
|
3066 |
+
#: wpf-includes/wpf-phrases.php:483
|
3067 |
+
msgid "Post options successfully updated, but previous value not changed"
|
3068 |
+
msgstr ""
|
3069 |
+
|
3070 |
+
#: wpf-includes/wpf-phrases.php:484
|
3071 |
+
msgid "Registration Error"
|
3072 |
+
msgstr "שגיאת רישום"
|
3073 |
+
|
3074 |
+
#: wpf-includes/wpf-phrases.php:485
|
3075 |
+
msgid "Reply request error"
|
3076 |
+
msgstr ""
|
3077 |
+
|
3078 |
+
#: wpf-includes/wpf-phrases.php:486
|
3079 |
+
msgid "Something wrong with profile data."
|
3080 |
+
msgstr "יש משהו שגוי בנתוני הפרופיל"
|
3081 |
+
|
3082 |
+
#: wpf-includes/wpf-phrases.php:487
|
3083 |
+
msgid "Subscribe options successfully updated"
|
3084 |
+
msgstr "אפשרויות מנוי עודכנו בהצלחה"
|
3085 |
+
|
3086 |
+
#: wpf-includes/wpf-phrases.php:488
|
3087 |
+
msgid "Subscribe options successfully updated, but previous value not changed"
|
3088 |
+
msgstr "אפשרויות מנוי עודכנו בהצלחה, אבל הערך הקודם לא השתנה"
|
3089 |
+
|
3090 |
+
#: wpf-includes/wpf-phrases.php:489
|
3091 |
+
msgid "Success! Thank you Dear Friend"
|
3092 |
+
msgstr "הצלחת! תודה רבה חבר/ה יקר/ה"
|
3093 |
+
|
3094 |
+
#: wpf-includes/wpf-phrases.php:490
|
3095 |
+
msgid ""
|
3096 |
+
"Success! Thank you. Please check your email and click confirmation link "
|
3097 |
+
"below to complete this step."
|
3098 |
+
msgstr ""
|
3099 |
+
"הצלחת! תודה רבה. אנא בדוק/י את הדוא\"ל שלך והקליק/י על הקישור לאישור מתחת על "
|
3100 |
+
"מנת להשלים שלב זה."
|
3101 |
+
|
3102 |
+
#: wpf-includes/wpf-phrases.php:491
|
3103 |
+
msgid "Successfully updated"
|
3104 |
+
msgstr "עודכן בהצלחה"
|
3105 |
+
|
3106 |
+
#: wpf-includes/wpf-phrases.php:492
|
3107 |
+
msgid "Successfully voted"
|
3108 |
+
msgstr "ההצבעה נקלטה בהצלחה"
|
3109 |
+
|
3110 |
+
#: wpf-includes/wpf-phrases.php:493
|
3111 |
+
msgid "The uploaded file size is too big"
|
3112 |
+
msgstr "גודל הקובץ שהועלה גדול מדי"
|
3113 |
+
|
3114 |
+
#: wpf-includes/wpf-phrases.php:494
|
3115 |
+
msgid "Theme options successfully updated"
|
3116 |
+
msgstr ""
|
3117 |
+
|
3118 |
+
#: wpf-includes/wpf-phrases.php:495
|
3119 |
+
msgid "This email address is already registered. Please insert another."
|
3120 |
+
msgstr "כתובת הדוא\"ל כבר רשומה, אנא נסו כתובת אחרת"
|
3121 |
+
|
3122 |
+
#: wpf-includes/wpf-phrases.php:496
|
3123 |
+
msgid "This post successfully deleted"
|
3124 |
+
msgstr "השרשור נמחק בהצלחה"
|
3125 |
+
|
3126 |
+
#: wpf-includes/wpf-phrases.php:497
|
3127 |
+
msgid "This post successfully edited"
|
3128 |
+
msgstr "השרשור נערך בהצלחה"
|
3129 |
+
|
3130 |
+
#: wpf-includes/wpf-phrases.php:498
|
3131 |
+
msgid "This topic successfully deleted"
|
3132 |
+
msgstr "הנושא נמחק בהצלחה"
|
3133 |
+
|
3134 |
+
#: wpf-includes/wpf-phrases.php:499
|
3135 |
+
msgid "Topic Move Error"
|
3136 |
+
msgstr "שגיאה בהעברת נושא"
|
3137 |
+
|
3138 |
+
#: wpf-includes/wpf-phrases.php:500
|
3139 |
+
msgid "Topic add error"
|
3140 |
+
msgstr "שגיאה בהוספת נושא"
|
3141 |
+
|
3142 |
+
#: wpf-includes/wpf-phrases.php:501
|
3143 |
+
msgid "Topic delete error"
|
3144 |
+
msgstr "שגיאה במחיקת נושא"
|
3145 |
+
|
3146 |
+
#: wpf-includes/wpf-phrases.php:502
|
3147 |
+
msgid "Topic edit error"
|
3148 |
+
msgstr "שגיאה העדכון נושא"
|
3149 |
+
|
3150 |
+
#: wpf-includes/wpf-phrases.php:503
|
3151 |
+
msgid "Topic not found."
|
3152 |
+
msgstr "הנושא לא נמצא"
|
3153 |
+
|
3154 |
+
#: wpf-includes/wpf-phrases.php:504
|
3155 |
+
msgid "Topic successfully moved"
|
3156 |
+
msgstr "הנושא הועבר בהצלחה"
|
3157 |
+
|
3158 |
+
#: wpf-includes/wpf-phrases.php:505
|
3159 |
+
msgid "Topic successfully updated"
|
3160 |
+
msgstr "נושא עודכן בהצלחה"
|
3161 |
+
|
3162 |
+
#: wpf-includes/wpf-phrases.php:506
|
3163 |
+
msgid "Topics delete error"
|
3164 |
+
msgstr "שגיאה במחיקת נושא"
|
3165 |
+
|
3166 |
+
#: wpf-includes/wpf-phrases.php:507
|
3167 |
+
msgid "User delete error"
|
3168 |
+
msgstr "שגיאה במחיקת משתמש"
|
3169 |
+
|
3170 |
+
#: wpf-includes/wpf-phrases.php:508
|
3171 |
+
msgid "User group add error"
|
3172 |
+
msgstr "שגיאה בהוספת קבוצת משתמשים"
|
3173 |
+
|
3174 |
+
#: wpf-includes/wpf-phrases.php:509
|
3175 |
+
msgid "User group edit error"
|
3176 |
+
msgstr "שגיאה בעריכת קבוצת המשתמשים"
|
3177 |
+
|
3178 |
+
#: wpf-includes/wpf-phrases.php:510
|
3179 |
+
msgid "User group successfully added"
|
3180 |
+
msgstr "קבוצת המשתמשים הוספה בהצלחה"
|
3181 |
+
|
3182 |
+
#: wpf-includes/wpf-phrases.php:511
|
3183 |
+
msgid "User group successfully edited"
|
3184 |
+
msgstr "קבוצת המשתמשים נערכה בהצלחה"
|
3185 |
+
|
3186 |
+
#: wpf-includes/wpf-phrases.php:512
|
3187 |
+
msgid "User successfully deleted from wpforo"
|
3188 |
+
msgstr "המשתמש נמחק בהצלחה ממערכת הפורומים"
|
3189 |
+
|
3190 |
+
#: wpf-includes/wpf-phrases.php:513
|
3191 |
+
msgid "Username exists. Please insert another."
|
3192 |
+
msgstr "שם המשתמש קיים. אנא הקלידו שם אחר."
|
3193 |
+
|
3194 |
+
#: wpf-includes/wpf-phrases.php:514
|
3195 |
+
msgid "Username is missed."
|
3196 |
+
msgstr "חסר שם משתמש."
|
3197 |
+
|
3198 |
+
#: wpf-includes/wpf-phrases.php:515
|
3199 |
+
msgid "Username length must be between 3 characters and 30 characters."
|
3200 |
+
msgstr "אורך שם המשתמש חייב להיות בין 3 ל15 תווים"
|
3201 |
+
|
3202 |
+
#: wpf-includes/wpf-phrases.php:516
|
3203 |
+
msgid "Welcome to our Community!"
|
3204 |
+
msgstr "ברוכים הבאים לקהילה שלנו!"
|
3205 |
+
|
3206 |
+
#: wpf-includes/wpf-phrases.php:517
|
3207 |
+
msgid "Wrong post data"
|
3208 |
+
msgstr "נתוני ההודעה שגויים"
|
3209 |
+
|
3210 |
+
#: wpf-includes/wpf-phrases.php:518
|
3211 |
+
msgid "You are already voted this post"
|
3212 |
+
msgstr "כבר הצבעת לתגובה זו"
|
3213 |
+
|
3214 |
+
#: wpf-includes/wpf-phrases.php:519
|
3215 |
+
msgid "You have been successfully subscribed"
|
3216 |
+
msgstr "נרשמת בהצלחה כמנוי"
|
3217 |
+
|
3218 |
+
#: wpf-includes/wpf-phrases.php:520
|
3219 |
+
msgid "You have been successfully unsubscribed"
|
3220 |
+
msgstr "הרשמתך הוסרה בהצלחה"
|
3221 |
+
|
3222 |
+
#: wpf-includes/wpf-phrases.php:521
|
3223 |
+
msgid "You have no permission to edit this topic"
|
3224 |
+
msgstr "אין לך הרשאה לערוך נושא זה"
|
3225 |
+
|
3226 |
+
#: wpf-includes/wpf-phrases.php:522
|
3227 |
+
msgid "You haven't permission to create post into this forum"
|
3228 |
+
msgstr "אין לך הרשאה ליצור שרשור בפורום זה"
|
3229 |
+
|
3230 |
+
#: wpf-includes/wpf-phrases.php:523
|
3231 |
+
msgid "You haven't permission to create topic into this forum"
|
3232 |
+
msgstr "אין לך הרשאה ליצור נושא בפורום זה"
|
3233 |
+
|
3234 |
+
#: wpf-includes/wpf-phrases.php:524
|
3235 |
+
msgid "You haven't permission to delete post from this forum"
|
3236 |
+
msgstr "אין לך הרשאה למחוק שרשור מהפורום הזה"
|
3237 |
+
|
3238 |
+
#: wpf-includes/wpf-phrases.php:525
|
3239 |
+
msgid "You haven't permission to delete topic from this forum"
|
3240 |
+
msgstr "אין לך הרשאה למחוק נושא מהפורום הזה"
|
3241 |
+
|
3242 |
+
#: wpf-includes/wpf-phrases.php:526
|
3243 |
+
msgid "You haven't permission to edit post from this forum"
|
3244 |
+
msgstr "אין לך הרשאה לערוך שרשור מהפורום הזה"
|
3245 |
+
|
3246 |
+
#: wpf-includes/wpf-phrases.php:527
|
3247 |
+
msgid "You successfully replied"
|
3248 |
+
msgstr "הגבת בהצלחה"
|
3249 |
+
|
3250 |
+
#: wpf-includes/wpf-phrases.php:528
|
3251 |
+
msgid "Your forum successfully added"
|
3252 |
+
msgstr "הפורום הוסף בהצלחה"
|
3253 |
+
|
3254 |
+
#: wpf-includes/wpf-phrases.php:529
|
3255 |
+
msgid "Your forum successfully deleted"
|
3256 |
+
msgstr "הפורום נמחק בהצלחה"
|
3257 |
+
|
3258 |
+
#: wpf-includes/wpf-phrases.php:530
|
3259 |
+
msgid "Your profile data have been successfully updated."
|
3260 |
+
msgstr "הפרופיל שלך עודכן בהצלחה"
|
3261 |
+
|
3262 |
+
#: wpf-includes/wpf-phrases.php:531
|
3263 |
+
msgid "Your subscription for this item could not be confirmed"
|
3264 |
+
msgstr "לא ניתן לוודא את רישומך לעניין זה"
|
3265 |
+
|
3266 |
+
#: wpf-includes/wpf-phrases.php:532
|
3267 |
+
msgid "Your topic successfully added"
|
3268 |
+
msgstr "הנושא הוסף בהצלחה"
|
3269 |
+
|
3270 |
+
#: wpf-includes/wpf-phrases.php:534
|
3271 |
+
msgid "Dashboard - Can create forum"
|
3272 |
+
msgstr ""
|
3273 |
+
|
3274 |
+
#: wpf-includes/wpf-phrases.php:535
|
3275 |
+
msgid "Dashboard - Can edit forum"
|
3276 |
+
msgstr ""
|
3277 |
+
|
3278 |
+
#: wpf-includes/wpf-phrases.php:536
|
3279 |
+
msgid "Dashboard - Can delete forum"
|
3280 |
+
msgstr ""
|
3281 |
+
|
3282 |
+
#: wpf-includes/wpf-phrases.php:537
|
3283 |
+
msgid "Dashboard - Members Menu"
|
3284 |
+
msgstr ""
|
3285 |
+
|
3286 |
+
#: wpf-includes/wpf-phrases.php:538
|
3287 |
+
msgid "Dashboard - Can edit member"
|
3288 |
+
msgstr ""
|
3289 |
+
|
3290 |
+
#: wpf-includes/wpf-phrases.php:539
|
3291 |
+
msgid "Dashboard - Can delete member"
|
3292 |
+
msgstr ""
|
3293 |
+
|
3294 |
+
#: wpf-includes/wpf-phrases.php:540
|
3295 |
+
msgid "Dashboard - Usergroup Menu"
|
3296 |
+
msgstr ""
|
3297 |
+
|
3298 |
+
#: wpf-includes/wpf-phrases.php:541
|
3299 |
+
msgid "Front - Can view members"
|
3300 |
+
msgstr ""
|
3301 |
+
|
3302 |
+
#: wpf-includes/wpf-phrases.php:542
|
3303 |
+
msgid "Front - Can view profiles"
|
3304 |
+
msgstr ""
|
3305 |
+
|
3306 |
+
#: wpf-includes/wpf-phrases.php:543
|
3307 |
+
msgid "Front - Can upload avatar"
|
3308 |
+
msgstr ""
|
3309 |
+
|
3310 |
+
#: wpf-includes/wpf-phrases.php:544
|
3311 |
+
msgid "Front - Can have signatur"
|
3312 |
+
msgstr ""
|
3313 |
+
|
3314 |
+
#: wpf-includes/wpf-phrases.php:545
|
3315 |
+
msgid "Front - Can view avatars"
|
3316 |
+
msgstr ""
|
3317 |
+
|
3318 |
+
#: wpf-includes/wpf-phrases.php:546
|
3319 |
+
msgid "Front - Can view member username"
|
3320 |
+
msgstr ""
|
3321 |
+
|
3322 |
+
#: wpf-includes/wpf-phrases.php:547
|
3323 |
+
msgid "Front - Can view member email"
|
3324 |
+
msgstr ""
|
3325 |
+
|
3326 |
+
#: wpf-includes/wpf-phrases.php:548
|
3327 |
+
msgid "Front - Can view member title"
|
3328 |
+
msgstr ""
|
3329 |
+
|
3330 |
+
#: wpf-includes/wpf-phrases.php:549
|
3331 |
+
msgid "Front - Can view member custom title"
|
3332 |
+
msgstr ""
|
3333 |
+
|
3334 |
+
#: wpf-includes/wpf-phrases.php:550
|
3335 |
+
msgid "Front - Can view member reputation"
|
3336 |
+
msgstr ""
|
3337 |
+
|
3338 |
+
#: wpf-includes/wpf-phrases.php:551
|
3339 |
+
msgid "Front - Can view member website"
|
3340 |
+
msgstr ""
|
3341 |
+
|
3342 |
+
#: wpf-includes/wpf-phrases.php:552
|
3343 |
+
msgid "Front - Can view member social networks"
|
3344 |
+
msgstr ""
|
3345 |
+
|
3346 |
+
#: wpf-includes/wpf-phrases.php:553
|
3347 |
+
msgid "Front - Can view member reg. date"
|
3348 |
+
msgstr ""
|
3349 |
+
|
3350 |
+
#: wpf-includes/wpf-phrases.php:554
|
3351 |
+
msgid "Front - Can view member last active date"
|
3352 |
+
msgstr ""
|
3353 |
+
|
3354 |
+
#: wpf-includes/wpf-phrases.php:555
|
3355 |
+
msgid "Front - Can view member ip address"
|
3356 |
+
msgstr ""
|
3357 |
+
|
3358 |
+
#: wpf-includes/wpf-phrases.php:556
|
3359 |
+
msgid "Front - Can view member location"
|
3360 |
+
msgstr ""
|
3361 |
+
|
3362 |
+
#: wpf-includes/wpf-phrases.php:557
|
3363 |
+
msgid "Front - Can view member ocumpation"
|
3364 |
+
msgstr ""
|
3365 |
+
|
3366 |
+
#: wpf-includes/wpf-phrases.php:558
|
3367 |
+
msgid "Front - Can view member signatur"
|
3368 |
+
msgstr ""
|
3369 |
+
|
3370 |
+
#: wpf-includes/wpf-phrases.php:559
|
3371 |
+
msgid "Front - Can view member about me"
|
3372 |
+
msgstr ""
|
3373 |
+
|
3374 |
+
#: wpf-includes/wpf-phrases.php:560
|
3375 |
+
msgid "Front - Can view member phone number"
|
3376 |
+
msgstr ""
|
3377 |
+
|
3378 |
+
#: wpf-includes/wpf-phrases.php:561
|
3379 |
+
msgid "Front - Can write PM"
|
3380 |
+
msgstr ""
|
3381 |
+
|
3382 |
+
#: wpf-includes/wpf-phrases.php:562
|
3383 |
+
msgid "Can view forum"
|
3384 |
+
msgstr ""
|
3385 |
+
|
3386 |
+
#: wpf-includes/wpf-phrases.php:563
|
3387 |
+
msgid "Can create topic"
|
3388 |
+
msgstr ""
|
3389 |
+
|
3390 |
+
#: wpf-includes/wpf-phrases.php:564
|
3391 |
+
msgid "Can view topic"
|
3392 |
+
msgstr ""
|
3393 |
+
|
3394 |
+
#: wpf-includes/wpf-phrases.php:565
|
3395 |
+
msgid "Can edit topic"
|
3396 |
+
msgstr ""
|
3397 |
+
|
3398 |
+
#: wpf-includes/wpf-phrases.php:566
|
3399 |
+
msgid "Can delete topic"
|
3400 |
+
msgstr ""
|
3401 |
+
|
3402 |
+
#: wpf-includes/wpf-phrases.php:567
|
3403 |
+
msgid "Can post reply"
|
3404 |
+
msgstr ""
|
3405 |
+
|
3406 |
+
#: wpf-includes/wpf-phrases.php:568
|
3407 |
+
msgid "Can view replies"
|
3408 |
+
msgstr ""
|
3409 |
+
|
3410 |
+
#: wpf-includes/wpf-phrases.php:569
|
3411 |
+
msgid "Can edit replies"
|
3412 |
+
msgstr ""
|
3413 |
+
|
3414 |
+
#: wpf-includes/wpf-phrases.php:570
|
3415 |
+
msgid "Can delete replies"
|
3416 |
+
msgstr ""
|
3417 |
+
|
3418 |
+
#: wpf-includes/wpf-phrases.php:571
|
3419 |
+
msgid "Can edit own topic"
|
3420 |
+
msgstr ""
|
3421 |
+
|
3422 |
+
#: wpf-includes/wpf-phrases.php:572
|
3423 |
+
msgid "Can edit own replay"
|
3424 |
+
msgstr ""
|
3425 |
+
|
3426 |
+
#: wpf-includes/wpf-phrases.php:573
|
3427 |
+
msgid "Can delete own topic"
|
3428 |
+
msgstr ""
|
3429 |
+
|
3430 |
+
#: wpf-includes/wpf-phrases.php:574
|
3431 |
+
msgid "Can delete own replay"
|
3432 |
+
msgstr ""
|
3433 |
+
|
3434 |
+
#: wpf-includes/wpf-phrases.php:575
|
3435 |
+
msgid "Can like"
|
3436 |
+
msgstr ""
|
3437 |
+
|
3438 |
+
#: wpf-includes/wpf-phrases.php:576
|
3439 |
+
msgid "Can report"
|
3440 |
+
msgstr ""
|
3441 |
+
|
3442 |
+
#: wpf-includes/wpf-phrases.php:577
|
3443 |
+
msgid "Can set topic sticky"
|
3444 |
+
msgstr ""
|
3445 |
+
|
3446 |
+
#: wpf-includes/wpf-phrases.php:578 wpf-includes/wpf-phrases.php:651
|
3447 |
+
msgid "Can set topic private"
|
3448 |
+
msgstr ""
|
3449 |
+
|
3450 |
+
#: wpf-includes/wpf-phrases.php:579
|
3451 |
+
msgid "Can vote"
|
3452 |
+
msgstr ""
|
3453 |
+
|
3454 |
+
#: wpf-includes/wpf-phrases.php:580
|
3455 |
+
msgid "Can Attach File"
|
3456 |
+
msgstr ""
|
3457 |
+
|
3458 |
+
#: wpf-includes/wpf-phrases.php:581
|
3459 |
+
msgid "Can set topic answered"
|
3460 |
+
msgstr ""
|
3461 |
+
|
3462 |
+
#: wpf-includes/wpf-phrases.php:582
|
3463 |
+
msgid "Can set own topic answered"
|
3464 |
+
msgstr ""
|
3465 |
+
|
3466 |
+
#: wpf-includes/wpf-phrases.php:583
|
3467 |
+
msgid "Can close topic"
|
3468 |
+
msgstr ""
|
3469 |
+
|
3470 |
+
#: wpf-includes/wpf-phrases.php:584
|
3471 |
+
msgid "Can move topic"
|
3472 |
+
msgstr ""
|
3473 |
+
|
3474 |
+
#: wpf-includes/wpf-phrases.php:585
|
3475 |
+
msgid "like"
|
3476 |
+
msgstr "אהבתי"
|
3477 |
+
|
3478 |
+
#: wpf-includes/wpf-phrases.php:586
|
3479 |
+
msgid "unlike"
|
3480 |
+
msgstr "הסר אהבתי"
|
3481 |
+
|
3482 |
+
#: wpf-includes/wpf-phrases.php:587
|
3483 |
+
msgid "sticky"
|
3484 |
+
msgstr "נעוץ"
|
3485 |
+
|
3486 |
+
#: wpf-includes/wpf-phrases.php:588
|
3487 |
+
msgid "unsticky"
|
3488 |
+
msgstr "הסרת נעיצה"
|
3489 |
+
|
3490 |
+
#: wpf-includes/wpf-phrases.php:589
|
3491 |
+
msgid "close"
|
3492 |
+
msgstr "סגירה"
|
3493 |
+
|
3494 |
+
#: wpf-includes/wpf-phrases.php:590
|
3495 |
+
msgid "open"
|
3496 |
+
msgstr "פתיחה"
|
3497 |
+
|
3498 |
+
#: wpf-includes/wpf-phrases.php:591
|
3499 |
+
msgid "Topic Icons"
|
3500 |
+
msgstr "סמלי נושא"
|
3501 |
+
|
3502 |
+
#: wpf-includes/wpf-phrases.php:592 wpf-includes/wpf-phrases.php:685
|
3503 |
+
msgid "New"
|
3504 |
+
msgstr "חדש"
|
3505 |
+
|
3506 |
+
#: wpf-includes/wpf-phrases.php:593
|
3507 |
+
msgid "Replied"
|
3508 |
+
msgstr "נענה"
|
3509 |
+
|
3510 |
+
#: wpf-includes/wpf-phrases.php:595
|
3511 |
+
msgid "Hot"
|
3512 |
+
msgstr "חם"
|
3513 |
+
|
3514 |
+
#: wpf-includes/wpf-phrases.php:596
|
3515 |
+
msgid "Solved"
|
3516 |
+
msgstr "נפתר"
|
3517 |
+
|
3518 |
+
#: wpf-includes/wpf-phrases.php:597
|
3519 |
+
msgid "Unsolved"
|
3520 |
+
msgstr "לא נפתר"
|
3521 |
+
|
3522 |
+
#: wpf-includes/wpf-phrases.php:605
|
3523 |
+
msgid "Can set topic solved"
|
3524 |
+
msgstr ""
|
3525 |
+
|
3526 |
+
#: wpf-includes/wpf-phrases.php:606
|
3527 |
+
msgid "Can set own topic solved"
|
3528 |
+
msgstr ""
|
3529 |
+
|
3530 |
+
#: wpf-includes/wpf-phrases.php:607
|
3531 |
+
msgid "Old password is wrong"
|
3532 |
+
msgstr "הסיסמא הישנה שגויה"
|
3533 |
+
|
3534 |
+
#: wpf-includes/wpf-phrases.php:608
|
3535 |
+
msgid "New Passwords do not match"
|
3536 |
+
msgstr "הסיסמאות החדשות אינן תואמות"
|
3537 |
+
|
3538 |
+
#: wpf-includes/wpf-phrases.php:612
|
3539 |
+
msgid ""
|
3540 |
+
"This process may take a few seconds or dozens of minutes, it depends on "
|
3541 |
+
"database forum size and on server resources. Please be patient and don't "
|
3542 |
+
"close this page. If you got 500 Server Error please don't worry, the data "
|
3543 |
+
"updating process is still working in MySQL server."
|
3544 |
+
msgstr ""
|
3545 |
+
|
3546 |
+
#: wpf-includes/wpf-phrases.php:616
|
3547 |
+
msgid "Updated Successfully!"
|
3548 |
+
msgstr "עודכן בהצלחה!"
|
3549 |
+
|
3550 |
+
#: wpf-includes/wpf-phrases.php:617
|
3551 |
+
msgid "Deleted Successfully!"
|
3552 |
+
msgstr "נמחק בהצלחה!"
|
3553 |
+
|
3554 |
+
#: wpf-includes/wpf-phrases.php:618
|
3555 |
+
msgid "Closed"
|
3556 |
+
msgstr "סגור"
|
3557 |
+
|
3558 |
+
#: wpf-includes/wpf-phrases.php:619
|
3559 |
+
msgid "Forum Members List"
|
3560 |
+
msgstr "רשימת חברים בפורום"
|
3561 |
+
|
3562 |
+
#: wpf-includes/wpf-phrases.php:620
|
3563 |
+
msgid "are you sure you want to delete?"
|
3564 |
+
msgstr "האם את/ה בטוח/ה שאת/ה רוצה למחוק?"
|
3565 |
+
|
3566 |
+
#: wpf-includes/wpf-phrases.php:622
|
3567 |
+
msgid "Moderator"
|
3568 |
+
msgstr "מפקח"
|
3569 |
+
|
3570 |
+
#: wpf-includes/wpf-phrases.php:624
|
3571 |
+
msgid "Customer"
|
3572 |
+
msgstr "לקוח"
|
3573 |
+
|
3574 |
+
#: wpf-includes/wpf-phrases.php:625
|
3575 |
+
msgid "No access"
|
3576 |
+
msgstr "ללא גישה"
|
3577 |
+
|
3578 |
+
#: wpf-includes/wpf-phrases.php:626
|
3579 |
+
msgid "Read only access"
|
3580 |
+
msgstr "קריאה בלבד"
|
3581 |
+
|
3582 |
+
#: wpf-includes/wpf-phrases.php:627
|
3583 |
+
msgid "Standard access"
|
3584 |
+
msgstr "גישה רגילה"
|
3585 |
+
|
3586 |
+
#: wpf-includes/wpf-phrases.php:628
|
3587 |
+
msgid "Moderator access"
|
3588 |
+
msgstr "גישת מפקח"
|
3589 |
+
|
3590 |
+
#: wpf-includes/wpf-phrases.php:629
|
3591 |
+
msgid "Full access"
|
3592 |
+
msgstr "גישה מלאה"
|
3593 |
+
|
3594 |
+
#: wpf-includes/wpf-phrases.php:630
|
3595 |
+
msgid "Profile"
|
3596 |
+
msgstr "פרופיל"
|
3597 |
+
|
3598 |
+
#: wpf-includes/wpf-phrases.php:632
|
3599 |
+
msgid "Incorrect file format. Allowed formats: jpeg, jpg, png, gif."
|
3600 |
+
msgstr "סוג קובץ שגוי. מותר פורמטים: jpeg, jpg, png, gif."
|
3601 |
+
|
3602 |
+
#: wpf-includes/wpf-phrases.php:635
|
3603 |
+
msgid "User registration is disabled"
|
3604 |
+
msgstr "רישום משתמשים לא זמין"
|
3605 |
+
|
3606 |
+
#: wpf-includes/wpf-phrases.php:639
|
3607 |
+
msgid "Attachment removed"
|
3608 |
+
msgstr "קבצים מצורפים נמחקו"
|
3609 |
+
|
3610 |
+
#: wpf-includes/wpf-phrases.php:640
|
3611 |
+
msgid "Forum Posts"
|
3612 |
+
msgstr "הודעות בפורום"
|
3613 |
+
|
3614 |
+
#: wpf-includes/wpf-phrases.php:641
|
3615 |
+
msgid "Blog Posts"
|
3616 |
+
msgstr "פוסטים בבלוג"
|
3617 |
+
|
3618 |
+
#: wpf-includes/wpf-phrases.php:642
|
3619 |
+
msgid "Blog Comments"
|
3620 |
+
msgstr "תגובות בבלוג"
|
3621 |
+
|
3622 |
+
#: wpf-includes/wpf-phrases.php:643
|
3623 |
+
#, php-format
|
3624 |
+
msgid "Welcome back %s!"
|
3625 |
+
msgstr "ברוך שובך, %s!"
|
3626 |
+
|
3627 |
+
#: wpf-includes/wpf-phrases.php:644
|
3628 |
+
msgid "Member Profile"
|
3629 |
+
msgstr "פרופיל משתמש"
|
3630 |
+
|
3631 |
+
#: wpf-includes/wpf-phrases.php:645
|
3632 |
+
msgid "Member"
|
3633 |
+
msgstr "משתמש"
|
3634 |
+
|
3635 |
+
#: wpf-includes/wpf-phrases.php:646
|
3636 |
+
msgid "You don't have permission to this page"
|
3637 |
+
msgstr "אין לך הרשאות לצפות בעמוד זה"
|
3638 |
+
|
3639 |
+
#: wpf-includes/wpf-phrases.php:648
|
3640 |
+
msgid ""
|
3641 |
+
"This option will disable WordPress on front-end. Only forum pages will be "
|
3642 |
+
"available. wpForo will look like as a stand-alone forum."
|
3643 |
+
msgstr ""
|
3644 |
+
|
3645 |
+
#: wpf-includes/wpf-phrases.php:652
|
3646 |
+
msgid "Can set own topic private"
|
3647 |
+
msgstr ""
|
3648 |
+
|
3649 |
+
#: wpf-includes/wpf-phrases.php:653
|
3650 |
+
msgid "Can view private topic"
|
3651 |
+
msgstr ""
|
3652 |
+
|
3653 |
+
#: wpf-includes/wpf-phrases.php:654
|
3654 |
+
msgid "private"
|
3655 |
+
msgstr "פרטי"
|
3656 |
+
|
3657 |
+
#: wpf-includes/wpf-phrases.php:655
|
3658 |
+
msgid "public"
|
3659 |
+
msgstr "ציבורי"
|
3660 |
+
|
3661 |
+
#: wpf-includes/wpf-phrases.php:656
|
3662 |
+
msgid "Private Topic"
|
3663 |
+
msgstr "נושא פרטי"
|
3664 |
+
|
3665 |
+
#: wpf-includes/wpf-phrases.php:657
|
3666 |
+
msgid "Only Admins and Moderators can see your private topics."
|
3667 |
+
msgstr "רק מנהלים וצוות המעדכנים יכולים לראות את הנושאים הפרטיים שלך"
|
3668 |
+
|
3669 |
+
#: wpf-includes/wpf-phrases.php:658
|
3670 |
+
msgid "Forum ID is not detected"
|
3671 |
+
msgstr "מזהה הפורום לא זוהה"
|
3672 |
+
|
3673 |
+
#: wpf-includes/wpf-phrases.php:659
|
3674 |
+
msgid "You are not permitted to subscribe here"
|
3675 |
+
msgstr "אין לך הרשאות להרשם כאן"
|
3676 |
+
|
3677 |
+
#: wpf-includes/wpf-phrases.php:660
|
3678 |
+
msgid "Subscribe to this topic"
|
3679 |
+
msgstr "הרשמה לנושא זה"
|
3680 |
+
|
3681 |
+
#: wpf-includes/wpf-phrases.php:663
|
3682 |
+
msgid "Awaiting moderation"
|
3683 |
+
msgstr "ממתין לאישור"
|
3684 |
+
|
3685 |
+
#: wpf-includes/wpf-phrases.php:664
|
3686 |
+
msgid "Topic first post not found."
|
3687 |
+
msgstr ""
|
3688 |
+
|
3689 |
+
#: wpf-includes/wpf-phrases.php:665
|
3690 |
+
msgid "Topic first post data not found."
|
3691 |
+
msgstr ""
|
3692 |
+
|
3693 |
+
#: wpf-includes/wpf-phrases.php:666
|
3694 |
+
msgid "Settings successfully updated"
|
3695 |
+
msgstr "ההגדרות עודכנו בהצלחה"
|
3696 |
+
|
3697 |
+
#: wpf-includes/wpf-phrases.php:667
|
3698 |
+
msgid "Done!"
|
3699 |
+
msgstr "בוצע!"
|
3700 |
+
|
3701 |
+
#: wpf-includes/wpf-phrases.php:668
|
3702 |
+
msgid "You are not allowed to attach this file type"
|
3703 |
+
msgstr "אין לך הרשאה לצרף את סוג הקובץ הזה"
|
3704 |
+
|
3705 |
+
#: wpf-includes/wpf-phrases.php:669
|
3706 |
+
msgid "Post is empty"
|
3707 |
+
msgstr "ההודעה ריקה"
|
3708 |
+
|
3709 |
+
#: wpf-includes/wpf-phrases.php:670
|
3710 |
+
msgid "removed link"
|
3711 |
+
msgstr "קישור הוסר"
|
3712 |
+
|
3713 |
+
#: wpf-includes/wpf-phrases.php:671
|
3714 |
+
msgid "Submit"
|
3715 |
+
msgstr "שלח"
|
3716 |
+
|
3717 |
+
#: wpf-includes/wpf-phrases.php:674
|
3718 |
+
msgid "Usergroup"
|
3719 |
+
msgstr "קבוצת משתמשים"
|
3720 |
+
|
3721 |
+
#: wpf-includes/wpf-phrases.php:675
|
3722 |
+
msgid "Rating Title"
|
3723 |
+
msgstr "כותרת דירוג"
|
3724 |
+
|
3725 |
+
#: wpf-includes/wpf-phrases.php:676
|
3726 |
+
msgid "User Title"
|
3727 |
+
msgstr "כותרת משתמש"
|
3728 |
+
|
3729 |
+
#: wpf-includes/wpf-phrases.php:677
|
3730 |
+
msgid "Anonymous"
|
3731 |
+
msgstr "אנונימי"
|
3732 |
+
|
3733 |
+
#: wpf-includes/wpf-phrases.php:680
|
3734 |
+
msgid "approved"
|
3735 |
+
msgstr "מאושר"
|
3736 |
+
|
3737 |
+
#: wpf-includes/wpf-phrases.php:681
|
3738 |
+
msgid "unapproved"
|
3739 |
+
msgstr "לא מאושר"
|
3740 |
+
|
3741 |
+
#: wpf-includes/wpf-phrases.php:684
|
3742 |
+
msgid "--- Choose ---"
|
3743 |
+
msgstr "--- בחירה ---"
|
3744 |
+
|
3745 |
+
#: wpf-includes/wpf-phrases.php:686
|
3746 |
+
msgid "Required field"
|
3747 |
+
msgstr "שדה חובה"
|
3748 |
+
|
3749 |
+
#: wpforo.php:89
|
3750 |
+
msgid "Discussion Board"
|
3751 |
+
msgstr "לוח דיונים"
|
3752 |
+
|
3753 |
+
#: wpforo.php:504
|
3754 |
+
msgid ""
|
3755 |
+
"Allows to embed hundreds of video, social network, audio and photo content "
|
3756 |
+
"providers in forum topics and posts."
|
3757 |
+
msgstr ""
|
3758 |
+
|
3759 |
+
#: wpforo.php:505
|
3760 |
+
msgid ""
|
3761 |
+
"Advanced user profile builder system. Allows to add new fields and manage "
|
3762 |
+
"profile page. Creates custom Registration, Account, Member Search forms."
|
3763 |
+
msgstr ""
|
3764 |
+
|
3765 |
+
#: wpforo.php:506
|
3766 |
+
msgid ""
|
3767 |
+
"Adds an advanced file attachment system to forum topics and posts. AJAX "
|
3768 |
+
"powered media uploading and displaying system with user specific library."
|
3769 |
+
msgstr ""
|
3770 |
+
|
3771 |
+
#: wpforo.php:507
|
3772 |
+
msgid ""
|
3773 |
+
"Blog to Forum and Forum to Blog content synchronization. Blog posts with "
|
3774 |
+
"Forum topics and Blog comments with Forum replies."
|
3775 |
+
msgstr ""
|
3776 |
+
|
3777 |
+
#: wpforo.php:508
|
3778 |
+
msgid ""
|
3779 |
+
"Provides a safe way to communicate directly with other members. Messages are "
|
3780 |
+
"private and can only be viewed by conversation participants."
|
3781 |
+
msgstr ""
|
3782 |
+
|
3783 |
+
#: wpforo.php:509
|
3784 |
+
msgid ""
|
3785 |
+
"Ads Manager is a powerful yet simple advertisement management system, that "
|
3786 |
+
"allows you to add adverting banners between forums, topics and posts."
|
3787 |
+
msgstr ""
|
3788 |
+
|
3789 |
+
#. Plugin Name of the plugin/theme
|
3790 |
+
msgid "Forums - wpForo"
|
3791 |
+
msgstr ""
|
3792 |
+
|
3793 |
+
#. Plugin URI of the plugin/theme
|
3794 |
+
msgid "https://wpforo.com"
|
3795 |
+
msgstr ""
|
3796 |
+
|
3797 |
+
#. Description of the plugin/theme
|
3798 |
+
msgid ""
|
3799 |
+
"Forums wpForo is a new generation of forum plugins. It's full-fledged forum "
|
3800 |
+
"solution for your community. Comes with multiple modern forum layouts."
|
3801 |
+
msgstr ""
|
3802 |
+
|
3803 |
+
#. Author of the plugin/theme
|
3804 |
+
msgid "gVectors Team (A. Chakhoyan, R. Hovhannisyan)"
|
3805 |
+
msgstr ""
|
3806 |
+
|
3807 |
+
#. Author URI of the plugin/theme
|
3808 |
+
msgid "https://gvectors.com/"
|
3809 |
+
msgstr ""
|
3810 |
+
|
3811 |
+
#~ msgid "You have not permission to this page"
|
3812 |
+
#~ msgstr "אין לך הרשאות לצפות בעמוד זה"
|
3813 |
+
|
3814 |
+
#~ msgid "Forum - wpForo"
|
3815 |
+
#~ msgstr "פורום - wpForo"
|
3816 |
+
|
3817 |
+
#~ msgid "Length must be between 3 characters and 15 characters."
|
3818 |
+
#~ msgstr "האורך חייב להיות בין 3 ל15 תווים"
|
3819 |
+
|
3820 |
+
#~ msgid "Username length must be between 3 characters and 15 characters."
|
3821 |
+
#~ msgstr "אורך שם המשתמש חייב להיות בין 3 ל15 תווים"
|
3822 |
+
|
3823 |
+
#~ msgid "Private"
|
3824 |
+
#~ msgstr "פרטי"
|
3825 |
+
|
3826 |
+
#~ msgid "Public"
|
3827 |
+
#~ msgstr "ציבורי"
|
3828 |
+
|
3829 |
+
#~ msgid "Dismiss"
|
3830 |
+
#~ msgstr "בטל"
|
wpf-languages/wpforo.pot
CHANGED
@@ -5,7 +5,7 @@ msgid ""
|
|
5 |
msgstr ""
|
6 |
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
7 |
"Project-Id-Version: Forum - wpForo\n"
|
8 |
-
"POT-Creation-Date: 2017-10
|
9 |
"PO-Revision-Date: 2016-06-28 21:09+0400\n"
|
10 |
"Last-Translator: \n"
|
11 |
"Language-Team: \n"
|
@@ -60,65 +60,66 @@ msgstr ""
|
|
60 |
msgid "More information about"
|
61 |
msgstr ""
|
62 |
|
63 |
-
#: wpf-admin/admin.php:
|
64 |
#: wpf-includes/wpf-phrases.php:599
|
65 |
msgid "Dashboard"
|
66 |
msgstr ""
|
67 |
|
68 |
-
#: wpf-admin/admin.php:
|
69 |
-
#: wpf-admin/options-tabs/
|
70 |
-
#: wpf-
|
|
|
71 |
msgid "Forums"
|
72 |
msgstr ""
|
73 |
|
74 |
-
#: wpf-admin/admin.php:
|
75 |
-
#: wpf-includes/wpf-hooks.php:
|
76 |
msgid "Settings"
|
77 |
msgstr ""
|
78 |
|
79 |
-
#: wpf-admin/admin.php:
|
80 |
msgid "Tools"
|
81 |
msgstr ""
|
82 |
|
83 |
-
#: wpf-admin/admin.php:
|
84 |
msgid "Moderation"
|
85 |
msgstr ""
|
86 |
|
87 |
-
#: wpf-admin/admin.php:
|
88 |
-
#: wpf-admin/options.php:18 wpf-includes/wpf-hooks.php:
|
89 |
#: wpf-includes/wpf-phrases.php:178
|
90 |
msgid "Members"
|
91 |
msgstr ""
|
92 |
|
93 |
-
#: wpf-admin/admin.php:
|
94 |
-
#: wpf-includes/wpf-hooks.php:
|
95 |
msgid "Usergroups"
|
96 |
msgstr ""
|
97 |
|
98 |
-
#: wpf-admin/admin.php:
|
99 |
#: wpf-includes/wpf-phrases.php:600
|
100 |
msgid "Phrases"
|
101 |
msgstr ""
|
102 |
|
103 |
-
#: wpf-admin/admin.php:
|
104 |
#: wpf-includes/wpf-phrases.php:601
|
105 |
msgid "Themes"
|
106 |
msgstr ""
|
107 |
|
108 |
-
#: wpf-admin/admin.php:
|
109 |
-
#: wpf-includes/wpf-hooks.php:
|
110 |
msgid "Addons"
|
111 |
msgstr ""
|
112 |
|
113 |
-
#: wpf-admin/dashboard.php:
|
114 |
msgid "wpForo Dashboard"
|
115 |
msgstr ""
|
116 |
|
117 |
-
#: wpf-admin/dashboard.php:
|
118 |
msgid "Welcome Message"
|
119 |
msgstr ""
|
120 |
|
121 |
-
#: wpf-admin/dashboard.php:
|
122 |
msgid ""
|
123 |
"Thank you for using wpForo! wpForo is a professional bulletin board for "
|
124 |
"WorPress, and the only forum software which comes with Multi-layout template "
|
@@ -135,112 +136,112 @@ msgid ""
|
|
135 |
"We're here to help you and improve wpForo as much as possible."
|
136 |
msgstr ""
|
137 |
|
138 |
-
#: wpf-admin/dashboard.php:
|
139 |
msgid "General Information"
|
140 |
msgstr ""
|
141 |
|
142 |
-
#: wpf-admin/dashboard.php:
|
143 |
msgid "You are currently running"
|
144 |
msgstr ""
|
145 |
|
146 |
-
#: wpf-admin/dashboard.php:
|
147 |
msgid "Active Theme"
|
148 |
msgstr ""
|
149 |
|
150 |
-
#: wpf-admin/dashboard.php:
|
151 |
msgid "wpForo Website"
|
152 |
msgstr ""
|
153 |
|
154 |
-
#: wpf-admin/dashboard.php:
|
155 |
msgid "Support Forum"
|
156 |
msgstr ""
|
157 |
|
158 |
-
#: wpf-admin/dashboard.php:
|
159 |
msgid "Server Information"
|
160 |
msgstr ""
|
161 |
|
162 |
-
#: wpf-admin/dashboard.php:
|
163 |
msgid "Available"
|
164 |
msgstr ""
|
165 |
|
166 |
-
#: wpf-admin/dashboard.php:
|
167 |
msgid "Not available"
|
168 |
msgstr ""
|
169 |
|
170 |
-
#: wpf-admin/dashboard.php:
|
171 |
msgid "Board Statistic"
|
172 |
msgstr ""
|
173 |
|
174 |
-
#: wpf-admin/dashboard.php:
|
175 |
-
#: wpf-includes/class-forums.php:
|
176 |
msgid "Topics"
|
177 |
msgstr ""
|
178 |
|
179 |
-
#: wpf-admin/dashboard.php:
|
180 |
#: wpf-includes/wpf-phrases.php:233
|
181 |
msgid "Posts"
|
182 |
msgstr ""
|
183 |
|
184 |
-
#: wpf-admin/dashboard.php:
|
185 |
msgid "Members Online"
|
186 |
msgstr ""
|
187 |
|
188 |
-
#: wpf-admin/dashboard.php:
|
189 |
msgid "Avatars Size"
|
190 |
msgstr ""
|
191 |
|
192 |
-
#: wpf-admin/dashboard.php:
|
193 |
msgid "Default Attachments Size"
|
194 |
msgstr ""
|
195 |
|
196 |
-
#: wpf-admin/dashboard.php:
|
197 |
msgid "Advanced Attachments"
|
198 |
msgstr ""
|
199 |
|
200 |
-
#: wpf-admin/dashboard.php:
|
201 |
msgid "file(s)"
|
202 |
msgstr ""
|
203 |
|
204 |
-
#: wpf-admin/dashboard.php:
|
205 |
msgid "Advanced Attachments Size"
|
206 |
msgstr ""
|
207 |
|
208 |
-
#: wpf-admin/dashboard.php:
|
209 |
msgid "Total Size"
|
210 |
msgstr ""
|
211 |
|
212 |
-
#: wpf-admin/dashboard.php:
|
213 |
msgid "Forum Maintenance"
|
214 |
msgstr ""
|
215 |
|
216 |
-
#: wpf-admin/dashboard.php:
|
217 |
msgid ""
|
218 |
"This process may take a few seconds or dozens of minutes, please be patient "
|
219 |
"and don't close this page. If you got 500 Server Error please don't worry, "
|
220 |
"the data updating process is still working in MySQL server."
|
221 |
msgstr ""
|
222 |
|
223 |
-
#: wpf-admin/dashboard.php:
|
224 |
msgid "Delete All Caches"
|
225 |
msgstr ""
|
226 |
|
227 |
-
#: wpf-admin/dashboard.php:
|
228 |
msgid "Update Forums Statistic"
|
229 |
msgstr ""
|
230 |
|
231 |
-
#: wpf-admin/dashboard.php:
|
232 |
msgid "Update Users Statistic"
|
233 |
msgstr ""
|
234 |
|
235 |
-
#: wpf-admin/dashboard.php:
|
236 |
msgid "Delete Phrase Cache"
|
237 |
msgstr ""
|
238 |
|
239 |
-
#: wpf-admin/dashboard.php:
|
240 |
msgid "Delete User Cache"
|
241 |
msgstr ""
|
242 |
|
243 |
-
#: wpf-admin/forum.php:13 wpf-includes/functions.php:
|
244 |
#: wpf-includes/wpf-phrases.php:302
|
245 |
msgid "Show on screen"
|
246 |
msgstr ""
|
@@ -270,7 +271,7 @@ msgstr ""
|
|
270 |
msgid "Number of Columns"
|
271 |
msgstr ""
|
272 |
|
273 |
-
#: wpf-admin/forum.php:32 wpf-includes/functions.php:
|
274 |
#: wpf-includes/wpf-phrases.php:275
|
275 |
msgid "Screen Options"
|
276 |
msgstr ""
|
@@ -355,14 +356,14 @@ msgid "Are you sure you want to delete this forum?"
|
|
355 |
msgstr ""
|
356 |
|
357 |
#: wpf-admin/forum.php:153 wpf-admin/themes.php:73
|
358 |
-
#: wpf-admin/tools-tabs/antispam.php:139 wpf-admin/usergroup.php:
|
359 |
-
#: wpf-admin/usergroup.php:
|
360 |
#: wpf-includes/wpf-phrases.php:66
|
361 |
msgid "Delete"
|
362 |
msgstr ""
|
363 |
|
364 |
-
#: wpf-admin/forum.php:154 wpf-admin/usergroup.php:
|
365 |
-
#: wpf-includes/class-forums.php:
|
366 |
msgid "View"
|
367 |
msgstr ""
|
368 |
|
@@ -458,8 +459,8 @@ msgstr ""
|
|
458 |
msgid "Admin"
|
459 |
msgstr ""
|
460 |
|
461 |
-
#: wpf-admin/options-tabs/accesses.php:32 wpf-includes/class-forums.php:
|
462 |
-
#: wpf-includes/functions.php:
|
463 |
msgid "edit"
|
464 |
msgstr ""
|
465 |
|
@@ -469,8 +470,8 @@ msgid ""
|
|
469 |
"to this access will lost all forum permissions."
|
470 |
msgstr ""
|
471 |
|
472 |
-
#: wpf-admin/options-tabs/accesses.php:34 wpf-includes/class-forums.php:
|
473 |
-
#: wpf-includes/functions.php:
|
474 |
#: wpf-includes/wpf-phrases.php:381
|
475 |
msgid "delete"
|
476 |
msgstr ""
|
@@ -487,120 +488,218 @@ msgstr ""
|
|
487 |
msgid "Update"
|
488 |
msgstr ""
|
489 |
|
490 |
-
#: wpf-admin/options-tabs/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
491 |
msgid "FROM Name"
|
492 |
msgstr ""
|
493 |
|
494 |
-
#: wpf-admin/options-tabs/emails.php:
|
495 |
msgid "FROM Email Address"
|
496 |
msgstr ""
|
497 |
|
498 |
-
#: wpf-admin/options-tabs/emails.php:
|
499 |
msgid "Forum Admins email addresses"
|
500 |
msgstr ""
|
501 |
|
502 |
-
#: wpf-admin/options-tabs/emails.php:
|
503 |
msgid ""
|
504 |
"Comma separated email addresses of forum administrators to get forum "
|
505 |
"notifications. For example post report messages."
|
506 |
msgstr ""
|
507 |
|
508 |
-
#: wpf-admin/options-tabs/emails.php:
|
509 |
msgid "Notify Admins via email on new Topic"
|
510 |
msgstr ""
|
511 |
|
512 |
-
#: wpf-admin/options-tabs/emails.php:
|
513 |
msgid ""
|
514 |
"Send Notification emails to all email addresses (comma separated ) of forum "
|
515 |
"administrators when a new Topic is created."
|
516 |
msgstr ""
|
517 |
|
518 |
-
#: wpf-admin/options-tabs/emails.php:
|
519 |
-
#: wpf-admin/options-tabs/
|
520 |
-
#: wpf-admin/tools-tabs/antispam.php:
|
521 |
-
#: wpf-admin/tools-tabs/
|
|
|
522 |
msgid "Yes"
|
523 |
msgstr ""
|
524 |
|
525 |
-
#: wpf-admin/options-tabs/emails.php:
|
526 |
-
#: wpf-admin/options-tabs/
|
527 |
-
#: wpf-admin/tools-tabs/antispam.php:
|
528 |
-
#: wpf-admin/tools-tabs/
|
|
|
529 |
msgid "No"
|
530 |
msgstr ""
|
531 |
|
532 |
-
#: wpf-admin/options-tabs/emails.php:
|
533 |
msgid "Notify Admins via email on new Post"
|
534 |
msgstr ""
|
535 |
|
536 |
-
#: wpf-admin/options-tabs/emails.php:
|
537 |
msgid ""
|
538 |
"Send Notification emails to all email addresses (comma separated ) of forum "
|
539 |
"administrators when a new Reply is created."
|
540 |
msgstr ""
|
541 |
|
542 |
-
#: wpf-admin/options-tabs/emails.php:
|
543 |
msgid "Subscription Emails"
|
544 |
msgstr ""
|
545 |
|
546 |
-
#: wpf-admin/options-tabs/emails.php:
|
547 |
msgid "Subscribe confirmation email subject"
|
548 |
msgstr ""
|
549 |
|
550 |
-
#: wpf-admin/options-tabs/emails.php:
|
551 |
msgid "Subscribe confirmation email message"
|
552 |
msgstr ""
|
553 |
|
554 |
-
#: wpf-admin/options-tabs/emails.php:
|
555 |
msgid "New topic notification email subject"
|
556 |
msgstr ""
|
557 |
|
558 |
-
#: wpf-admin/options-tabs/emails.php:
|
559 |
msgid "New topic notification email message"
|
560 |
msgstr ""
|
561 |
|
562 |
-
#: wpf-admin/options-tabs/emails.php:
|
563 |
msgid "New reply notification email subject"
|
564 |
msgstr ""
|
565 |
|
566 |
-
#: wpf-admin/options-tabs/emails.php:
|
567 |
msgid "New reply notification email message"
|
568 |
msgstr ""
|
569 |
|
570 |
-
#: wpf-admin/options-tabs/emails.php:
|
571 |
msgid "Post Reporting Emails"
|
572 |
msgstr ""
|
573 |
|
574 |
-
#: wpf-admin/options-tabs/emails.php:
|
575 |
msgid "This message comes from post reporting pop-up form."
|
576 |
msgstr ""
|
577 |
|
578 |
-
#: wpf-admin/options-tabs/emails.php:
|
579 |
msgid "Report message subject"
|
580 |
msgstr ""
|
581 |
|
582 |
-
#: wpf-admin/options-tabs/emails.php:
|
583 |
msgid "Report message body"
|
584 |
msgstr ""
|
585 |
|
586 |
-
#: wpf-admin/options-tabs/emails.php:
|
587 |
msgid "Reset Password Emails"
|
588 |
msgstr ""
|
589 |
|
590 |
-
#: wpf-admin/options-tabs/emails.php:
|
591 |
msgid "This message comes from Reset Password form."
|
592 |
msgstr ""
|
593 |
|
594 |
-
#: wpf-admin/options-tabs/emails.php:
|
595 |
msgid "Reset Password message body"
|
596 |
msgstr ""
|
597 |
|
598 |
-
#: wpf-admin/options-tabs/emails.php:
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
#: wpf-admin/
|
603 |
-
msgid "
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
604 |
msgstr ""
|
605 |
|
606 |
#: wpf-admin/options-tabs/features.php:9 wpf-includes/wpf-phrases.php:295
|
@@ -631,7 +730,7 @@ msgstr ""
|
|
631 |
msgid "Show Forum Statistic"
|
632 |
msgstr ""
|
633 |
|
634 |
-
#: wpf-admin/options-tabs/features.php:15 wpf-includes/wpf-phrases.php:
|
635 |
msgid "Log Viewed Forums and Topics"
|
636 |
msgstr ""
|
637 |
|
@@ -665,14 +764,14 @@ msgid ""
|
|
665 |
msgstr ""
|
666 |
|
667 |
#: wpf-admin/options-tabs/features.php:20 wpf-includes/wpf-phrases.php:261
|
668 |
-
msgid "Replace Registration Page URL to Forum URL"
|
669 |
msgstr ""
|
670 |
|
671 |
#: wpf-admin/options-tabs/features.php:21 wpf-includes/wpf-phrases.php:260
|
672 |
-
msgid "Replace Login Page URL to Forum URL"
|
673 |
msgstr ""
|
674 |
|
675 |
-
#: wpf-admin/options-tabs/features.php:22 wpf-includes/wpf-phrases.php:
|
676 |
msgid "Replace WP Reset Password URL to Forum reset password page"
|
677 |
msgstr ""
|
678 |
|
@@ -728,7 +827,7 @@ msgstr ""
|
|
728 |
msgid "Enable User Profile Page indexing"
|
729 |
msgstr ""
|
730 |
|
731 |
-
#: wpf-admin/options-tabs/features.php:36 wpf-includes/wpf-phrases.php:
|
732 |
msgid "Enable RSS Feed"
|
733 |
msgstr ""
|
734 |
|
@@ -920,7 +1019,7 @@ msgstr ""
|
|
920 |
msgid "Members URL structure"
|
921 |
msgstr ""
|
922 |
|
923 |
-
#: wpf-admin/options-tabs/members.php:29 wpf-includes/wpf-phrases.php:
|
924 |
msgid "Members Search Type"
|
925 |
msgstr ""
|
926 |
|
@@ -964,82 +1063,87 @@ msgid "Member Reputation and Titles"
|
|
964 |
msgstr ""
|
965 |
|
966 |
#: wpf-admin/options-tabs/members.php:62
|
967 |
-
msgid "
|
968 |
msgstr ""
|
969 |
|
970 |
-
#: wpf-admin/options-tabs/members.php:
|
|
|
|
|
|
|
|
|
971 |
msgid "Rating Level"
|
972 |
msgstr ""
|
973 |
|
974 |
-
#: wpf-admin/options-tabs/members.php:
|
975 |
msgid "Min Number of Posts"
|
976 |
msgstr ""
|
977 |
|
978 |
-
#: wpf-admin/options-tabs/members.php:
|
979 |
msgid "Member Title"
|
980 |
msgstr ""
|
981 |
|
982 |
-
#: wpf-admin/options-tabs/members.php:
|
983 |
msgid "Short Badge"
|
984 |
msgstr ""
|
985 |
|
986 |
-
#: wpf-admin/options-tabs/members.php:
|
987 |
msgid "Full Badge"
|
988 |
msgstr ""
|
989 |
|
990 |
-
#: wpf-admin/options-tabs/members.php:
|
991 |
msgid "Rating Color"
|
992 |
msgstr ""
|
993 |
|
994 |
-
#: wpf-admin/options-tabs/members.php:
|
995 |
msgid "Rating Icon"
|
996 |
msgstr ""
|
997 |
|
998 |
-
#: wpf-admin/options-tabs/members.php:
|
999 |
msgid "More"
|
1000 |
msgstr ""
|
1001 |
|
1002 |
-
#: wpf-admin/options-tabs/members.php:
|
1003 |
msgid "Level"
|
1004 |
msgstr ""
|
1005 |
|
1006 |
-
#: wpf-admin/options-tabs/members.php:
|
1007 |
msgid "Number of Posts"
|
1008 |
msgstr ""
|
1009 |
|
1010 |
-
#: wpf-admin/options-tabs/members.php:
|
1011 |
msgid "Custom Title"
|
1012 |
msgstr ""
|
1013 |
|
1014 |
-
#: wpf-admin/options-tabs/members.php:
|
|
|
1015 |
msgid "Color"
|
1016 |
msgstr ""
|
1017 |
|
1018 |
-
#: wpf-admin/options-tabs/members.php:
|
1019 |
msgid "Badge Icon"
|
1020 |
msgstr ""
|
1021 |
|
1022 |
-
#: wpf-admin/options-tabs/members.php:
|
1023 |
msgid "Enable Reputation Titles for selected usergroups"
|
1024 |
msgstr ""
|
1025 |
|
1026 |
-
#: wpf-admin/options-tabs/members.php:
|
1027 |
msgid ""
|
1028 |
"This option depends on \"Enable Member Rating Titles\" parent option, witch "
|
1029 |
"located in wpForo Settings > Features Tab"
|
1030 |
msgstr ""
|
1031 |
|
1032 |
-
#: wpf-admin/options-tabs/members.php:
|
1033 |
msgid "Enable Reputation Badges for selected usergroups"
|
1034 |
msgstr ""
|
1035 |
|
1036 |
-
#: wpf-admin/options-tabs/members.php:
|
1037 |
msgid ""
|
1038 |
"This option depends on \"Enable Member Rating\" parent option, witch located "
|
1039 |
"in wpForo Settings > Features Tab"
|
1040 |
msgstr ""
|
1041 |
|
1042 |
-
#: wpf-admin/options-tabs/members.php:
|
1043 |
msgid "Display Usergroup under Post Author Avatar"
|
1044 |
msgstr ""
|
1045 |
|
@@ -1129,6 +1233,10 @@ msgstr ""
|
|
1129 |
msgid "Forum Color Styles"
|
1130 |
msgstr ""
|
1131 |
|
|
|
|
|
|
|
|
|
1132 |
#: wpf-admin/options.php:8 wpf-includes/wpf-phrases.php:117
|
1133 |
msgid "Forum Settings"
|
1134 |
msgstr ""
|
@@ -1157,6 +1265,10 @@ msgstr ""
|
|
1157 |
msgid "Styles"
|
1158 |
msgstr ""
|
1159 |
|
|
|
|
|
|
|
|
|
1160 |
#: wpf-admin/phrase.php:10 wpf-includes/wpf-phrases.php:127
|
1161 |
msgid "Front-end Phrases"
|
1162 |
msgstr ""
|
@@ -1390,6 +1502,32 @@ msgstr ""
|
|
1390 |
msgid "Enable Auto-cleanup of inactive users"
|
1391 |
msgstr ""
|
1392 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1393 |
#: wpf-admin/tools.php:8
|
1394 |
msgid "Forum Tools"
|
1395 |
msgstr ""
|
@@ -1402,12 +1540,16 @@ msgstr ""
|
|
1402 |
msgid "Cleanup"
|
1403 |
msgstr ""
|
1404 |
|
|
|
|
|
|
|
|
|
1405 |
#: wpf-admin/usergroup.php:18
|
1406 |
msgid "Usergroup id"
|
1407 |
msgstr ""
|
1408 |
|
1409 |
-
#: wpf-admin/usergroup.php:19 wpf-admin/usergroup.php:
|
1410 |
-
#: wpf-admin/usergroup.php:
|
1411 |
msgid "Usergroup Name"
|
1412 |
msgstr ""
|
1413 |
|
@@ -1419,226 +1561,260 @@ msgstr ""
|
|
1419 |
msgid "New Users Default Group"
|
1420 |
msgstr ""
|
1421 |
|
1422 |
-
#: wpf-admin/usergroup.php:
|
|
|
|
|
|
|
|
|
1423 |
msgid "Edit this usergroup"
|
1424 |
msgstr ""
|
1425 |
|
1426 |
-
#: wpf-admin/usergroup.php:
|
1427 |
msgid "Edit"
|
1428 |
msgstr ""
|
1429 |
|
1430 |
-
#: wpf-admin/usergroup.php:
|
1431 |
msgid "Delete this usergroup"
|
1432 |
msgstr ""
|
1433 |
|
1434 |
-
#: wpf-admin/usergroup.php:
|
1435 |
msgid "View users list in this usergroup"
|
1436 |
msgstr ""
|
1437 |
|
1438 |
-
#: wpf-admin/usergroup.php:
|
1439 |
msgid "Count of users in this usergroup"
|
1440 |
msgstr ""
|
1441 |
|
1442 |
-
#: wpf-admin/usergroup.php:
|
1443 |
msgid "is Default"
|
1444 |
msgstr ""
|
1445 |
|
1446 |
-
#: wpf-admin/usergroup.php:
|
1447 |
msgid "DO NOT set this option on higher level user groups !!!"
|
1448 |
msgstr ""
|
1449 |
|
1450 |
-
#: wpf-admin/usergroup.php:
|
1451 |
msgid "Set as Default"
|
1452 |
msgstr ""
|
1453 |
|
1454 |
-
#: wpf-admin/usergroup.php:
|
|
|
|
|
|
|
|
|
1455 |
msgid "Guest"
|
1456 |
msgstr ""
|
1457 |
|
1458 |
-
#: wpf-admin/usergroup.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1459 |
msgid "WordPress User Role"
|
1460 |
msgstr ""
|
1461 |
|
1462 |
-
#: wpf-admin/usergroup.php:
|
1463 |
msgid "Default Forum Access"
|
1464 |
msgstr ""
|
1465 |
|
1466 |
-
#: wpf-admin/usergroup.php:
|
1467 |
msgid ""
|
1468 |
"This is only used when a new Usergroup is created, it automatically gets the "
|
1469 |
"selected Forum Access in all forums."
|
1470 |
msgstr ""
|
1471 |
|
1472 |
-
#: wpf-admin/usergroup.php:
|
1473 |
msgid "add"
|
1474 |
msgstr ""
|
1475 |
|
1476 |
-
#: wpf-admin/usergroup.php:
|
1477 |
msgid "save"
|
1478 |
msgstr ""
|
1479 |
|
1480 |
-
#: wpf-admin/usergroup.php:
|
1481 |
msgid "Delete Chosen Usergroup And Users"
|
1482 |
msgstr ""
|
1483 |
|
1484 |
-
#: wpf-admin/usergroup.php:
|
1485 |
msgid "Delete Chosen Usergroup And Join Users To Other Usergroup"
|
1486 |
msgstr ""
|
1487 |
|
1488 |
-
#: wpf-admin/usergroup.php:
|
1489 |
msgid "Users will be join this usergroup"
|
1490 |
msgstr ""
|
1491 |
|
1492 |
-
#: wpf-includes/class-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1493 |
msgid "Add a new SubForum"
|
1494 |
msgstr ""
|
1495 |
|
1496 |
-
#: wpf-includes/class-forums.php:
|
1497 |
msgid "Add a new Forum in this Category"
|
1498 |
msgstr ""
|
1499 |
|
1500 |
-
#: wpf-includes/class-members.php:
|
1501 |
msgid "<strong>ERROR</strong>: Please enter a username."
|
1502 |
msgstr ""
|
1503 |
|
1504 |
-
#: wpf-includes/class-members.php:
|
1505 |
msgid ""
|
1506 |
"<strong>ERROR</strong>: This username is invalid because it uses illegal "
|
1507 |
"characters. Please enter a valid username."
|
1508 |
msgstr ""
|
1509 |
|
1510 |
-
#: wpf-includes/class-members.php:
|
1511 |
msgid ""
|
1512 |
"<strong>ERROR</strong>: This username is already registered. Please choose "
|
1513 |
"another one."
|
1514 |
msgstr ""
|
1515 |
|
1516 |
-
#: wpf-includes/class-members.php:
|
1517 |
msgid "<strong>ERROR</strong>: Sorry, that username is not allowed."
|
1518 |
msgstr ""
|
1519 |
|
1520 |
-
#: wpf-includes/class-members.php:
|
1521 |
msgid "<strong>ERROR</strong>: Please type your email address."
|
1522 |
msgstr ""
|
1523 |
|
1524 |
-
#: wpf-includes/class-members.php:
|
1525 |
msgid "<strong>ERROR</strong>: The email address isn’t correct."
|
1526 |
msgstr ""
|
1527 |
|
1528 |
-
#: wpf-includes/class-members.php:
|
1529 |
msgid ""
|
1530 |
"<strong>ERROR</strong>: This email is already registered, please choose "
|
1531 |
"another one."
|
1532 |
msgstr ""
|
1533 |
|
1534 |
-
#: wpf-includes/class-members.php:
|
1535 |
msgid "What should be done with wpForo content owned by this user?"
|
1536 |
msgstr ""
|
1537 |
|
1538 |
-
#: wpf-includes/class-members.php:
|
1539 |
msgid "What should be done with wpForo content owned by these users?"
|
1540 |
msgstr ""
|
1541 |
|
1542 |
-
#: wpf-includes/class-members.php:
|
1543 |
msgid "Delete all wpForo content."
|
1544 |
msgstr ""
|
1545 |
|
1546 |
-
#: wpf-includes/class-members.php:
|
1547 |
msgid "Attribute all content to:"
|
1548 |
msgstr ""
|
1549 |
|
1550 |
-
#: wpf-includes/class-moderation.php:
|
1551 |
#, php-format
|
1552 |
msgid ""
|
1553 |
"Probably spam file attachments have been detected by wpForo Spam Control. "
|
1554 |
"Please moderate suspected files here %s"
|
1555 |
msgstr ""
|
1556 |
|
1557 |
-
#: wpf-includes/class-notices.php:
|
1558 |
msgid "Dismiss this notice."
|
1559 |
msgstr ""
|
1560 |
|
1561 |
-
#: wpf-includes/class-notices.php:
|
1562 |
msgid "New Addons for Your Forum!"
|
1563 |
msgstr ""
|
1564 |
|
1565 |
-
#: wpf-includes/class-notices.php:
|
1566 |
msgid "Extend your forum with wpForo addons"
|
1567 |
msgstr ""
|
1568 |
|
1569 |
-
#: wpf-includes/class-notices.php:
|
1570 |
msgid "View all Addons"
|
1571 |
msgstr ""
|
1572 |
|
1573 |
-
#: wpf-includes/class-permissions.php:
|
1574 |
#, php-format
|
1575 |
msgid "%s access successfully added"
|
1576 |
msgstr ""
|
1577 |
|
1578 |
-
#: wpf-includes/class-permissions.php:
|
1579 |
#, php-format
|
1580 |
msgid "%s access successfully edited"
|
1581 |
msgstr ""
|
1582 |
|
1583 |
-
#: wpf-includes/class-phrases.php:
|
1584 |
msgid " Forum"
|
1585 |
msgstr ""
|
1586 |
|
1587 |
-
#: wpf-includes/class-phrases.php:
|
1588 |
msgid " Discussion Board"
|
1589 |
msgstr ""
|
1590 |
|
1591 |
-
#: wpf-includes/class-posts.php:
|
1592 |
msgid "You are not permitted to view this attachment"
|
1593 |
msgstr ""
|
1594 |
|
1595 |
-
#: wpf-includes/class-template.php:
|
1596 |
msgid "Insert link"
|
1597 |
msgstr ""
|
1598 |
|
1599 |
-
#: wpf-includes/class-template.php:
|
1600 |
msgid "Link Text"
|
1601 |
msgstr ""
|
1602 |
|
1603 |
-
#: wpf-includes/class-template.php:
|
1604 |
msgid "Open link in a new tab"
|
1605 |
msgstr ""
|
1606 |
|
1607 |
-
#: wpf-includes/class-template.php:
|
1608 |
msgid "Theme file not readable"
|
1609 |
msgstr ""
|
1610 |
|
1611 |
-
#: wpf-includes/functions-installation.php:
|
1612 |
msgid "Start Profile Synchronization"
|
1613 |
msgstr ""
|
1614 |
|
1615 |
-
#: wpf-includes/functions-installation.php:
|
1616 |
msgid "Continue Synchronization"
|
1617 |
msgstr ""
|
1618 |
|
1619 |
-
#: wpf-includes/functions-installation.php:
|
1620 |
msgid ""
|
1621 |
"This process may take a few seconds or dozens of minutes, please be patient "
|
1622 |
"and don't close this page."
|
1623 |
msgstr ""
|
1624 |
|
1625 |
-
#: wpf-includes/functions-installation.php:
|
1626 |
msgid ""
|
1627 |
"You can permanently disable this message in Dashboard > Forums > Features "
|
1628 |
"admin page."
|
1629 |
msgstr ""
|
1630 |
|
1631 |
-
#: wpf-includes/functions-installation.php:
|
1632 |
msgid "wpForo Forum Installation | "
|
1633 |
msgstr ""
|
1634 |
|
1635 |
-
#: wpf-includes/functions-installation.php:
|
1636 |
msgid ""
|
1637 |
"Forum users' profile data are not synchronized yet, this step is required! "
|
1638 |
"Please click the button below to complete installation."
|
1639 |
msgstr ""
|
1640 |
|
1641 |
-
#: wpf-includes/functions-installation.php:
|
1642 |
msgid ""
|
1643 |
"This process may take a few seconds or dozens of minutes, please be patient "
|
1644 |
"and don't close this page. Database backup is not required. If you got 500 "
|
@@ -1646,15 +1822,15 @@ msgid ""
|
|
1646 |
"in MySQL server."
|
1647 |
msgstr ""
|
1648 |
|
1649 |
-
#: wpf-includes/functions-installation.php:
|
1650 |
msgid "Updater Database"
|
1651 |
msgstr ""
|
1652 |
|
1653 |
-
#: wpf-includes/functions-installation.php:
|
1654 |
msgid "wpForo - Update Database "
|
1655 |
msgstr ""
|
1656 |
|
1657 |
-
#: wpf-includes/functions-installation.php:
|
1658 |
msgid "Please click the button below to complete wpForo update."
|
1659 |
msgstr ""
|
1660 |
|
@@ -1662,172 +1838,172 @@ msgstr ""
|
|
1662 |
msgid "wpForo Menu"
|
1663 |
msgstr ""
|
1664 |
|
1665 |
-
#: wpf-includes/functions-template.php:
|
1666 |
msgid "wpForo Sidebar"
|
1667 |
msgstr ""
|
1668 |
|
1669 |
-
#: wpf-includes/functions-template.php:
|
1670 |
msgid ""
|
1671 |
"NOTE: If you're going to add widgets in this sidebar, please use 'Full "
|
1672 |
"Width' template for wpForo index page to avoid sidebar duplication."
|
1673 |
msgstr ""
|
1674 |
|
1675 |
-
#: wpf-includes/functions-template.php:
|
1676 |
-
#: wpf-includes/functions-template.php:
|
1677 |
-
#: wpf-includes/functions-template.php:
|
1678 |
-
#: wpf-includes/functions-template.php:
|
1679 |
-
#: wpf-includes/functions-template.php:
|
1680 |
-
#: wpf-includes/functions-template.php:
|
1681 |
msgid "Title"
|
1682 |
msgstr ""
|
1683 |
|
1684 |
-
#: wpf-includes/functions-template.php:
|
1685 |
-
#: wpf-includes/functions-template.php:
|
1686 |
-
#: wpf-includes/functions-template.php:
|
1687 |
msgid "Number of Items"
|
1688 |
msgstr ""
|
1689 |
|
1690 |
-
#: wpf-includes/functions-template.php:
|
1691 |
msgid "Display Avatars"
|
1692 |
msgstr ""
|
1693 |
|
1694 |
-
#: wpf-includes/functions-template.php:
|
1695 |
-
#: wpf-includes/functions-template.php:
|
1696 |
msgid "Display with Avatars"
|
1697 |
msgstr ""
|
1698 |
|
1699 |
-
#: wpf-includes/functions.php:
|
1700 |
msgid "Unapproved"
|
1701 |
msgstr ""
|
1702 |
|
1703 |
-
#: wpf-includes/functions.php:
|
1704 |
msgid "Published"
|
1705 |
msgstr ""
|
1706 |
|
1707 |
-
#: wpf-includes/functions.php:
|
1708 |
msgid "Active"
|
1709 |
msgstr ""
|
1710 |
|
1711 |
-
#: wpf-includes/functions.php:
|
1712 |
msgid "Banned"
|
1713 |
msgstr ""
|
1714 |
|
1715 |
-
#: wpf-includes/functions.php:
|
1716 |
#: wpf-includes/wpf-phrases.php:50
|
1717 |
msgid "Bulk Actions"
|
1718 |
msgstr ""
|
1719 |
|
1720 |
-
#: wpf-includes/functions.php:
|
1721 |
#: wpf-includes/wpf-phrases.php:36
|
1722 |
msgid "Apply"
|
1723 |
msgstr ""
|
1724 |
|
1725 |
-
#: wpf-includes/functions.php:
|
1726 |
msgid "Show all forums"
|
1727 |
msgstr ""
|
1728 |
|
1729 |
-
#: wpf-includes/functions.php:
|
1730 |
msgid "filter by group"
|
1731 |
msgstr ""
|
1732 |
|
1733 |
-
#: wpf-includes/functions.php:
|
1734 |
msgid "filter by status"
|
1735 |
msgstr ""
|
1736 |
|
1737 |
-
#: wpf-includes/functions.php:
|
1738 |
msgid "filter by package"
|
1739 |
msgstr ""
|
1740 |
|
1741 |
-
#: wpf-includes/functions.php:
|
1742 |
msgid "filter by user"
|
1743 |
msgstr ""
|
1744 |
|
1745 |
-
#: wpf-includes/functions.php:
|
1746 |
#: wpf-includes/wpf-phrases.php:386
|
1747 |
msgid "item"
|
1748 |
msgstr ""
|
1749 |
|
1750 |
-
#: wpf-includes/functions.php:
|
1751 |
#: wpf-includes/wpf-phrases.php:285
|
1752 |
msgid "Select All"
|
1753 |
msgstr ""
|
1754 |
|
1755 |
-
#: wpf-includes/functions.php:
|
1756 |
msgid "Type"
|
1757 |
msgstr ""
|
1758 |
|
1759 |
-
#: wpf-includes/functions.php:
|
1760 |
msgid "edit user"
|
1761 |
msgstr ""
|
1762 |
|
1763 |
-
#: wpf-includes/functions.php:
|
1764 |
msgid "edit profile"
|
1765 |
msgstr ""
|
1766 |
|
1767 |
-
#: wpf-includes/functions.php:
|
1768 |
msgid "unban user"
|
1769 |
msgstr ""
|
1770 |
|
1771 |
-
#: wpf-includes/functions.php:
|
1772 |
msgid "ban user"
|
1773 |
msgstr ""
|
1774 |
|
1775 |
-
#: wpf-includes/functions.php:
|
1776 |
msgid "Are you sure, you want to unban this user?"
|
1777 |
msgstr ""
|
1778 |
|
1779 |
-
#: wpf-includes/functions.php:
|
1780 |
msgid "Are you sure, you want to ban this user?"
|
1781 |
msgstr ""
|
1782 |
|
1783 |
-
#: wpf-includes/functions.php:
|
1784 |
#: wpf-includes/wpf-phrases.php:67
|
1785 |
msgid "Delete this item"
|
1786 |
msgstr ""
|
1787 |
|
1788 |
-
#: wpf-includes/functions.php:
|
1789 |
#: wpf-includes/wpf-phrases.php:41
|
1790 |
msgid "Are you sure you whant to DELETE this item?"
|
1791 |
msgstr ""
|
1792 |
|
1793 |
-
#: wpf-includes/functions.php:
|
1794 |
msgid "unapprove this item"
|
1795 |
msgstr ""
|
1796 |
|
1797 |
-
#: wpf-includes/functions.php:
|
1798 |
msgid "Approve this item"
|
1799 |
msgstr ""
|
1800 |
|
1801 |
-
#: wpf-includes/functions.php:
|
1802 |
msgid "unapprove"
|
1803 |
msgstr ""
|
1804 |
|
1805 |
-
#: wpf-includes/functions.php:
|
1806 |
msgid "approve"
|
1807 |
msgstr ""
|
1808 |
|
1809 |
-
#: wpf-includes/functions.php:
|
1810 |
#: wpf-includes/wpf-phrases.php:405
|
1811 |
msgid "view"
|
1812 |
msgstr ""
|
1813 |
|
1814 |
-
#: wpf-includes/functions.php:
|
1815 |
msgid "Topic"
|
1816 |
msgstr ""
|
1817 |
|
1818 |
-
#: wpf-includes/functions.php:
|
1819 |
msgid "Post"
|
1820 |
msgstr ""
|
1821 |
|
1822 |
-
#: wpf-includes/functions.php:
|
1823 |
msgid "No items found"
|
1824 |
msgstr ""
|
1825 |
|
1826 |
-
#: wpf-includes/functions.php:
|
1827 |
msgid "Items"
|
1828 |
msgstr ""
|
1829 |
|
1830 |
-
#: wpf-includes/functions.php:
|
1831 |
#, php-format
|
1832 |
msgid "Could not write file %s"
|
1833 |
msgstr ""
|
@@ -1846,69 +2022,69 @@ msgstr ""
|
|
1846 |
msgid "Uninstall"
|
1847 |
msgstr ""
|
1848 |
|
1849 |
-
#: wpf-includes/wpf-hooks.php:
|
1850 |
msgid "Move"
|
1851 |
msgstr ""
|
1852 |
|
1853 |
-
#: wpf-includes/wpf-hooks.php:
|
1854 |
msgid "Clear"
|
1855 |
msgstr ""
|
1856 |
|
1857 |
-
#: wpf-includes/wpf-hooks.php:
|
1858 |
msgid "Default"
|
1859 |
msgstr ""
|
1860 |
|
1861 |
-
#: wpf-includes/wpf-hooks.php:
|
1862 |
msgid "Select Color"
|
1863 |
msgstr ""
|
1864 |
|
1865 |
-
#: wpf-includes/wpf-hooks.php:
|
1866 |
msgid ""
|
1867 |
"IMPORTANT: wpForo can't work with default permalink, please change permalink "
|
1868 |
"structure"
|
1869 |
msgstr ""
|
1870 |
|
1871 |
-
#: wpf-includes/wpf-hooks.php:
|
1872 |
msgid "wpForo Usergroup"
|
1873 |
msgstr ""
|
1874 |
|
1875 |
-
#: wpf-includes/wpf-hooks.php:
|
1876 |
msgid "wpForo User Timezone"
|
1877 |
msgstr ""
|
1878 |
|
1879 |
-
#: wpf-includes/wpf-hooks.php:
|
1880 |
msgid "Please Moderate: "
|
1881 |
msgstr ""
|
1882 |
|
1883 |
-
#: wpf-includes/wpf-hooks.php:
|
1884 |
msgid ""
|
1885 |
"This topic is currently unapproved. You can approve topics in Dashboard "
|
1886 |
"» Forums » Moderation admin page."
|
1887 |
msgstr ""
|
1888 |
|
1889 |
-
#: wpf-includes/wpf-hooks.php:
|
1890 |
msgid ""
|
1891 |
"This post is currently unapproved. You can approve posts in Dashboard "
|
1892 |
"» Forums » Moderation admin page."
|
1893 |
msgstr ""
|
1894 |
|
1895 |
-
#: wpf-includes/wpf-hooks.php:
|
1896 |
msgid "New Forum"
|
1897 |
msgstr ""
|
1898 |
|
1899 |
-
#: wpf-includes/wpf-hooks.php:
|
1900 |
msgid "New User Group"
|
1901 |
msgstr ""
|
1902 |
|
1903 |
-
#: wpf-includes/wpf-hooks.php:
|
1904 |
msgid "New Phrase"
|
1905 |
msgstr ""
|
1906 |
|
1907 |
-
#: wpf-includes/wpf-hooks.php:
|
1908 |
msgid "Community"
|
1909 |
msgstr ""
|
1910 |
|
1911 |
-
#: wpf-includes/wpf-hooks.php:
|
1912 |
msgid "New UserGroup"
|
1913 |
msgstr ""
|
1914 |
|
@@ -2000,8 +2176,8 @@ msgstr ""
|
|
2000 |
msgid "Choose target forum"
|
2001 |
msgstr ""
|
2002 |
|
2003 |
-
#: wpf-includes/wpf-phrases.php:55 wpf-themes/classic/functions.php:
|
2004 |
-
#: wpf-themes/classic/functions.php:
|
2005 |
msgid "Collapsed"
|
2006 |
msgstr ""
|
2007 |
|
@@ -2037,24 +2213,24 @@ msgstr ""
|
|
2037 |
msgid "Enter title here"
|
2038 |
msgstr ""
|
2039 |
|
2040 |
-
#: wpf-includes/wpf-phrases.php:89 wpf-themes/classic/functions.php:
|
2041 |
-
#: wpf-themes/classic/functions.php:
|
2042 |
msgid "Expanded"
|
2043 |
msgstr ""
|
2044 |
|
2045 |
-
#: wpf-includes/wpf-phrases.php:90
|
2046 |
msgid "Extended Layout - Intro posts"
|
2047 |
msgstr ""
|
2048 |
|
2049 |
-
#: wpf-includes/wpf-phrases.php:91
|
2050 |
msgid "Extended Layout - Intro topics"
|
2051 |
msgstr ""
|
2052 |
|
2053 |
-
#: wpf-includes/wpf-phrases.php:92
|
2054 |
msgid "Extended Layout - Number of intro posts"
|
2055 |
msgstr ""
|
2056 |
|
2057 |
-
#: wpf-includes/wpf-phrases.php:93
|
2058 |
msgid "Extended Layout - Number of intro topics"
|
2059 |
msgstr ""
|
2060 |
|
@@ -2082,7 +2258,7 @@ msgstr ""
|
|
2082 |
msgid "First post and replies"
|
2083 |
msgstr ""
|
2084 |
|
2085 |
-
#: wpf-includes/wpf-phrases.php:101 wpforo.php:
|
2086 |
msgid "Forum"
|
2087 |
msgstr ""
|
2088 |
|
@@ -2366,11 +2542,11 @@ msgstr ""
|
|
2366 |
msgid "Powered by"
|
2367 |
msgstr ""
|
2368 |
|
2369 |
-
#: wpf-includes/wpf-phrases.php:236
|
2370 |
msgid "Q&A Layout - Number of intro topics"
|
2371 |
msgstr ""
|
2372 |
|
2373 |
-
#: wpf-includes/wpf-phrases.php:237
|
2374 |
msgid "Q&A layout - Intro topics"
|
2375 |
msgstr ""
|
2376 |
|
@@ -2506,7 +2682,7 @@ msgstr ""
|
|
2506 |
msgid "Set Topic Sticky"
|
2507 |
msgstr ""
|
2508 |
|
2509 |
-
#: wpf-includes/wpf-phrases.php:292
|
2510 |
msgid ""
|
2511 |
"Set this option value 0 if you want to show all posts under topic intro area."
|
2512 |
msgstr ""
|
@@ -3452,7 +3628,7 @@ msgstr ""
|
|
3452 |
msgid "Can set topic sticky"
|
3453 |
msgstr ""
|
3454 |
|
3455 |
-
#: wpf-includes/wpf-phrases.php:578
|
3456 |
msgid "Can set topic private"
|
3457 |
msgstr ""
|
3458 |
|
@@ -3508,7 +3684,7 @@ msgstr ""
|
|
3508 |
msgid "Topic Icons"
|
3509 |
msgstr ""
|
3510 |
|
3511 |
-
#: wpf-includes/wpf-phrases.php:592
|
3512 |
msgid "New"
|
3513 |
msgstr ""
|
3514 |
|
@@ -3600,18 +3776,10 @@ msgstr ""
|
|
3600 |
msgid "Full access"
|
3601 |
msgstr ""
|
3602 |
|
3603 |
-
#: wpf-includes/wpf-phrases.php:630
|
3604 |
-
msgid "Profile"
|
3605 |
-
msgstr ""
|
3606 |
-
|
3607 |
#: wpf-includes/wpf-phrases.php:632
|
3608 |
msgid "Incorrect file format. Allowed formats: jpeg, jpg, png, gif."
|
3609 |
msgstr ""
|
3610 |
|
3611 |
-
#: wpf-includes/wpf-phrases.php:635
|
3612 |
-
msgid "User registration is disabled"
|
3613 |
-
msgstr ""
|
3614 |
-
|
3615 |
#: wpf-includes/wpf-phrases.php:639
|
3616 |
msgid "Attachment removed"
|
3617 |
msgstr ""
|
@@ -3642,7 +3810,7 @@ msgid "Member"
|
|
3642 |
msgstr ""
|
3643 |
|
3644 |
#: wpf-includes/wpf-phrases.php:646
|
3645 |
-
msgid "You
|
3646 |
msgstr ""
|
3647 |
|
3648 |
#: wpf-includes/wpf-phrases.php:648
|
@@ -3651,188 +3819,269 @@ msgid ""
|
|
3651 |
"available. wpForo will look like as a stand-alone forum."
|
3652 |
msgstr ""
|
3653 |
|
3654 |
-
#: wpf-includes/wpf-phrases.php:
|
3655 |
msgid "Can set own topic private"
|
3656 |
msgstr ""
|
3657 |
|
3658 |
-
#: wpf-includes/wpf-phrases.php:
|
3659 |
msgid "Can view private topic"
|
3660 |
msgstr ""
|
3661 |
|
3662 |
-
#: wpf-includes/wpf-phrases.php:
|
3663 |
msgid "private"
|
3664 |
msgstr ""
|
3665 |
|
3666 |
-
#: wpf-includes/wpf-phrases.php:
|
3667 |
msgid "public"
|
3668 |
msgstr ""
|
3669 |
|
3670 |
-
#: wpf-includes/wpf-phrases.php:
|
3671 |
msgid "Private Topic"
|
3672 |
msgstr ""
|
3673 |
|
3674 |
-
#: wpf-includes/wpf-phrases.php:
|
3675 |
msgid "Only Admins and Moderators can see your private topics."
|
3676 |
msgstr ""
|
3677 |
|
3678 |
-
#: wpf-includes/wpf-phrases.php:
|
3679 |
msgid "Forum ID is not detected"
|
3680 |
msgstr ""
|
3681 |
|
3682 |
-
#: wpf-includes/wpf-phrases.php:
|
3683 |
msgid "You are not permitted to subscribe here"
|
3684 |
msgstr ""
|
3685 |
|
3686 |
-
#: wpf-includes/wpf-phrases.php:
|
3687 |
msgid "Subscribe to this topic"
|
3688 |
msgstr ""
|
3689 |
|
3690 |
-
#: wpf-includes/wpf-phrases.php:
|
3691 |
msgid "Awaiting moderation"
|
3692 |
msgstr ""
|
3693 |
|
3694 |
-
#: wpf-includes/wpf-phrases.php:
|
3695 |
msgid "Topic first post not found."
|
3696 |
msgstr ""
|
3697 |
|
3698 |
-
#: wpf-includes/wpf-phrases.php:
|
3699 |
msgid "Topic first post data not found."
|
3700 |
msgstr ""
|
3701 |
|
3702 |
-
#: wpf-includes/wpf-phrases.php:
|
3703 |
msgid "Settings successfully updated"
|
3704 |
msgstr ""
|
3705 |
|
3706 |
-
#: wpf-includes/wpf-phrases.php:
|
3707 |
msgid "Done!"
|
3708 |
msgstr ""
|
3709 |
|
3710 |
-
#: wpf-includes/wpf-phrases.php:
|
3711 |
msgid "You are not allowed to attach this file type"
|
3712 |
msgstr ""
|
3713 |
|
3714 |
-
#: wpf-includes/wpf-phrases.php:
|
3715 |
msgid "Post is empty"
|
3716 |
msgstr ""
|
3717 |
|
3718 |
-
#: wpf-includes/wpf-phrases.php:
|
3719 |
msgid "removed link"
|
3720 |
msgstr ""
|
3721 |
|
3722 |
-
#: wpf-includes/wpf-phrases.php:
|
3723 |
msgid "Submit"
|
3724 |
msgstr ""
|
3725 |
|
3726 |
-
#: wpf-includes/wpf-phrases.php:
|
3727 |
msgid "Usergroup"
|
3728 |
msgstr ""
|
3729 |
|
3730 |
-
#: wpf-includes/wpf-phrases.php:
|
3731 |
msgid "Rating Title"
|
3732 |
msgstr ""
|
3733 |
|
3734 |
-
#: wpf-includes/wpf-phrases.php:
|
3735 |
msgid "User Title"
|
3736 |
msgstr ""
|
3737 |
|
3738 |
-
#: wpf-includes/wpf-phrases.php:
|
3739 |
msgid "Anonymous"
|
3740 |
msgstr ""
|
3741 |
|
3742 |
-
#: wpf-includes/wpf-phrases.php:
|
3743 |
msgid "approved"
|
3744 |
msgstr ""
|
3745 |
|
3746 |
-
#: wpf-includes/wpf-phrases.php:
|
3747 |
msgid "unapproved"
|
3748 |
msgstr ""
|
3749 |
|
3750 |
-
#: wpf-includes/wpf-phrases.php:
|
3751 |
msgid "--- Choose ---"
|
3752 |
msgstr ""
|
3753 |
|
3754 |
-
#: wpf-includes/wpf-phrases.php:
|
3755 |
msgid "Required field"
|
3756 |
msgstr ""
|
3757 |
|
3758 |
-
#: wpf-includes/wpf-phrases.php:
|
3759 |
msgid "Add Reply"
|
3760 |
msgstr ""
|
3761 |
|
3762 |
-
#: wpf-includes/wpf-phrases.php:
|
3763 |
msgid "Forums RSS Feed"
|
3764 |
msgstr ""
|
3765 |
|
3766 |
-
#: wpf-includes/wpf-phrases.php:
|
3767 |
msgid "Topics RSS Feed"
|
3768 |
msgstr ""
|
3769 |
|
3770 |
-
#: wpf-includes/wpf-phrases.php:
|
3771 |
msgid "Find a member"
|
3772 |
msgstr ""
|
3773 |
|
3774 |
-
#: wpf-includes/wpf-phrases.php:
|
3775 |
msgid "Display Name or Nicename"
|
3776 |
msgstr ""
|
3777 |
|
3778 |
-
#: wpf-includes/wpf-phrases.php:
|
3779 |
msgid "Reset Search"
|
3780 |
msgstr ""
|
3781 |
|
3782 |
-
#: wpf-includes/wpf-phrases.php:
|
3783 |
msgid "Reset Result"
|
3784 |
msgstr ""
|
3785 |
|
3786 |
-
#: wpf-includes/wpf-phrases.php:
|
3787 |
msgid "Recent Posts"
|
3788 |
msgstr ""
|
3789 |
|
3790 |
-
#: wpf-includes/wpf-phrases.php:
|
3791 |
msgid "No posts were found here"
|
3792 |
msgstr ""
|
3793 |
|
3794 |
-
#:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3795 |
msgid "Discussion Board"
|
3796 |
msgstr ""
|
3797 |
|
3798 |
-
#: wpforo.php:
|
3799 |
msgid ""
|
3800 |
"Allows to embed hundreds of video, social network, audio and photo content "
|
3801 |
"providers in forum topics and posts."
|
3802 |
msgstr ""
|
3803 |
|
3804 |
-
#: wpforo.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3805 |
msgid ""
|
3806 |
"Advanced user profile builder system. Allows to add new fields and manage "
|
3807 |
"profile page. Creates custom Registration, Account, Member Search forms."
|
3808 |
msgstr ""
|
3809 |
|
3810 |
-
#: wpforo.php:
|
3811 |
msgid ""
|
3812 |
"Adds an advanced file attachment system to forum topics and posts. AJAX "
|
3813 |
"powered media uploading and displaying system with user specific library."
|
3814 |
msgstr ""
|
3815 |
|
3816 |
-
#: wpforo.php:
|
3817 |
msgid ""
|
3818 |
"Blog to Forum and Forum to Blog content synchronization. Blog posts with "
|
3819 |
"Forum topics and Blog comments with Forum replies."
|
3820 |
msgstr ""
|
3821 |
|
3822 |
-
#: wpforo.php:
|
3823 |
msgid ""
|
3824 |
"Provides a safe way to communicate directly with other members. Messages are "
|
3825 |
"private and can only be viewed by conversation participants."
|
3826 |
msgstr ""
|
3827 |
|
3828 |
-
#: wpforo.php:
|
3829 |
msgid ""
|
3830 |
"Ads Manager is a powerful yet simple advertisement management system, that "
|
3831 |
"allows you to add adverting banners between forums, topics and posts."
|
3832 |
msgstr ""
|
3833 |
|
3834 |
#. Plugin Name of the plugin/theme
|
3835 |
-
msgid "
|
3836 |
msgstr ""
|
3837 |
|
3838 |
#. Plugin URI of the plugin/theme
|
5 |
msgstr ""
|
6 |
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
7 |
"Project-Id-Version: Forum - wpForo\n"
|
8 |
+
"POT-Creation-Date: 2017-12-10 01:01+0400\n"
|
9 |
"PO-Revision-Date: 2016-06-28 21:09+0400\n"
|
10 |
"Last-Translator: \n"
|
11 |
"Language-Team: \n"
|
60 |
msgid "More information about"
|
61 |
msgstr ""
|
62 |
|
63 |
+
#: wpf-admin/admin.php:24 wpf-admin/admin.php:25
|
64 |
#: wpf-includes/wpf-phrases.php:599
|
65 |
msgid "Dashboard"
|
66 |
msgstr ""
|
67 |
|
68 |
+
#: wpf-admin/admin.php:24 wpf-admin/admin.php:26 wpf-admin/dashboard.php:137
|
69 |
+
#: wpf-admin/options-tabs/api.php:83 wpf-admin/options-tabs/styles.php:16
|
70 |
+
#: wpf-admin/options.php:15 wpf-includes/wpf-hooks.php:1719
|
71 |
+
#: wpf-includes/wpf-phrases.php:123
|
72 |
msgid "Forums"
|
73 |
msgstr ""
|
74 |
|
75 |
+
#: wpf-admin/admin.php:27 wpf-includes/wpf-hooks.php:22
|
76 |
+
#: wpf-includes/wpf-hooks.php:1735
|
77 |
msgid "Settings"
|
78 |
msgstr ""
|
79 |
|
80 |
+
#: wpf-admin/admin.php:28 wpf-includes/wpf-hooks.php:1744
|
81 |
msgid "Tools"
|
82 |
msgstr ""
|
83 |
|
84 |
+
#: wpf-admin/admin.php:29 wpf-includes/wpf-hooks.php:1753
|
85 |
msgid "Moderation"
|
86 |
msgstr ""
|
87 |
|
88 |
+
#: wpf-admin/admin.php:30 wpf-admin/dashboard.php:149 wpf-admin/member.php:10
|
89 |
+
#: wpf-admin/options.php:18 wpf-includes/wpf-hooks.php:1762
|
90 |
#: wpf-includes/wpf-phrases.php:178
|
91 |
msgid "Members"
|
92 |
msgstr ""
|
93 |
|
94 |
+
#: wpf-admin/admin.php:31 wpf-admin/usergroup.php:8
|
95 |
+
#: wpf-includes/wpf-hooks.php:1771
|
96 |
msgid "Usergroups"
|
97 |
msgstr ""
|
98 |
|
99 |
+
#: wpf-admin/admin.php:32 wpf-includes/wpf-hooks.php:1787
|
100 |
#: wpf-includes/wpf-phrases.php:600
|
101 |
msgid "Phrases"
|
102 |
msgstr ""
|
103 |
|
104 |
+
#: wpf-admin/admin.php:33 wpf-includes/wpf-hooks.php:1803
|
105 |
#: wpf-includes/wpf-phrases.php:601
|
106 |
msgid "Themes"
|
107 |
msgstr ""
|
108 |
|
109 |
+
#: wpf-admin/admin.php:34 wpf-admin/options.php:24
|
110 |
+
#: wpf-includes/wpf-hooks.php:1812 wpf-includes/wpf-phrases.php:25
|
111 |
msgid "Addons"
|
112 |
msgstr ""
|
113 |
|
114 |
+
#: wpf-admin/dashboard.php:7 wpf-includes/wpf-phrases.php:409
|
115 |
msgid "wpForo Dashboard"
|
116 |
msgstr ""
|
117 |
|
118 |
+
#: wpf-admin/dashboard.php:23 wpf-includes/wpf-phrases.php:362
|
119 |
msgid "Welcome Message"
|
120 |
msgstr ""
|
121 |
|
122 |
+
#: wpf-admin/dashboard.php:29
|
123 |
msgid ""
|
124 |
"Thank you for using wpForo! wpForo is a professional bulletin board for "
|
125 |
"WorPress, and the only forum software which comes with Multi-layout template "
|
136 |
"We're here to help you and improve wpForo as much as possible."
|
137 |
msgstr ""
|
138 |
|
139 |
+
#: wpf-admin/dashboard.php:58 wpf-includes/wpf-phrases.php:130
|
140 |
msgid "General Information"
|
141 |
msgstr ""
|
142 |
|
143 |
+
#: wpf-admin/dashboard.php:62 wpf-includes/wpf-phrases.php:369
|
144 |
msgid "You are currently running"
|
145 |
msgstr ""
|
146 |
|
147 |
+
#: wpf-admin/dashboard.php:63 wpf-includes/wpf-phrases.php:18
|
148 |
msgid "Active Theme"
|
149 |
msgstr ""
|
150 |
|
151 |
+
#: wpf-admin/dashboard.php:64 wpf-includes/wpf-phrases.php:414
|
152 |
msgid "wpForo Website"
|
153 |
msgstr ""
|
154 |
|
155 |
+
#: wpf-admin/dashboard.php:65 wpf-includes/wpf-phrases.php:320
|
156 |
msgid "Support Forum"
|
157 |
msgstr ""
|
158 |
|
159 |
+
#: wpf-admin/dashboard.php:76 wpf-includes/wpf-phrases.php:290
|
160 |
msgid "Server Information"
|
161 |
msgstr ""
|
162 |
|
163 |
+
#: wpf-admin/dashboard.php:110 wpf-includes/wpf-phrases.php:46
|
164 |
msgid "Available"
|
165 |
msgstr ""
|
166 |
|
167 |
+
#: wpf-admin/dashboard.php:110 wpf-includes/wpf-phrases.php:209
|
168 |
msgid "Not available"
|
169 |
msgstr ""
|
170 |
|
171 |
+
#: wpf-admin/dashboard.php:131 wpf-includes/wpf-phrases.php:49
|
172 |
msgid "Board Statistic"
|
173 |
msgstr ""
|
174 |
|
175 |
+
#: wpf-admin/dashboard.php:141 wpf-admin/options-tabs/styles.php:22
|
176 |
+
#: wpf-includes/class-forums.php:661 wpf-includes/wpf-phrases.php:339
|
177 |
msgid "Topics"
|
178 |
msgstr ""
|
179 |
|
180 |
+
#: wpf-admin/dashboard.php:145 wpf-includes/class-forums.php:661
|
181 |
#: wpf-includes/wpf-phrases.php:233
|
182 |
msgid "Posts"
|
183 |
msgstr ""
|
184 |
|
185 |
+
#: wpf-admin/dashboard.php:153 wpf-includes/wpf-phrases.php:179
|
186 |
msgid "Members Online"
|
187 |
msgstr ""
|
188 |
|
189 |
+
#: wpf-admin/dashboard.php:163
|
190 |
msgid "Avatars Size"
|
191 |
msgstr ""
|
192 |
|
193 |
+
#: wpf-admin/dashboard.php:167
|
194 |
msgid "Default Attachments Size"
|
195 |
msgstr ""
|
196 |
|
197 |
+
#: wpf-admin/dashboard.php:173
|
198 |
msgid "Advanced Attachments"
|
199 |
msgstr ""
|
200 |
|
201 |
+
#: wpf-admin/dashboard.php:174
|
202 |
msgid "file(s)"
|
203 |
msgstr ""
|
204 |
|
205 |
+
#: wpf-admin/dashboard.php:177
|
206 |
msgid "Advanced Attachments Size"
|
207 |
msgstr ""
|
208 |
|
209 |
+
#: wpf-admin/dashboard.php:182
|
210 |
msgid "Total Size"
|
211 |
msgstr ""
|
212 |
|
213 |
+
#: wpf-admin/dashboard.php:190 wpf-includes/wpf-phrases.php:611
|
214 |
msgid "Forum Maintenance"
|
215 |
msgstr ""
|
216 |
|
217 |
+
#: wpf-admin/dashboard.php:192
|
218 |
msgid ""
|
219 |
"This process may take a few seconds or dozens of minutes, please be patient "
|
220 |
"and don't close this page. If you got 500 Server Error please don't worry, "
|
221 |
"the data updating process is still working in MySQL server."
|
222 |
msgstr ""
|
223 |
|
224 |
+
#: wpf-admin/dashboard.php:201
|
225 |
msgid "Delete All Caches"
|
226 |
msgstr ""
|
227 |
|
228 |
+
#: wpf-admin/dashboard.php:202 wpf-includes/wpf-phrases.php:613
|
229 |
msgid "Update Forums Statistic"
|
230 |
msgstr ""
|
231 |
|
232 |
+
#: wpf-admin/dashboard.php:203 wpf-includes/wpf-phrases.php:614
|
233 |
msgid "Update Users Statistic"
|
234 |
msgstr ""
|
235 |
|
236 |
+
#: wpf-admin/dashboard.php:204 wpf-includes/wpf-phrases.php:615
|
237 |
msgid "Delete Phrase Cache"
|
238 |
msgstr ""
|
239 |
|
240 |
+
#: wpf-admin/dashboard.php:205 wpf-includes/wpf-phrases.php:636
|
241 |
msgid "Delete User Cache"
|
242 |
msgstr ""
|
243 |
|
244 |
+
#: wpf-admin/forum.php:13 wpf-includes/functions.php:770
|
245 |
#: wpf-includes/wpf-phrases.php:302
|
246 |
msgid "Show on screen"
|
247 |
msgstr ""
|
271 |
msgid "Number of Columns"
|
272 |
msgstr ""
|
273 |
|
274 |
+
#: wpf-admin/forum.php:32 wpf-includes/functions.php:784
|
275 |
#: wpf-includes/wpf-phrases.php:275
|
276 |
msgid "Screen Options"
|
277 |
msgstr ""
|
356 |
msgstr ""
|
357 |
|
358 |
#: wpf-admin/forum.php:153 wpf-admin/themes.php:73
|
359 |
+
#: wpf-admin/tools-tabs/antispam.php:139 wpf-admin/usergroup.php:36
|
360 |
+
#: wpf-admin/usergroup.php:209 wpf-includes/wpf-hooks.php:1078
|
361 |
#: wpf-includes/wpf-phrases.php:66
|
362 |
msgid "Delete"
|
363 |
msgstr ""
|
364 |
|
365 |
+
#: wpf-admin/forum.php:154 wpf-admin/usergroup.php:38
|
366 |
+
#: wpf-includes/class-forums.php:667 wpf-includes/wpf-phrases.php:356
|
367 |
msgid "View"
|
368 |
msgstr ""
|
369 |
|
459 |
msgid "Admin"
|
460 |
msgstr ""
|
461 |
|
462 |
+
#: wpf-admin/options-tabs/accesses.php:32 wpf-includes/class-forums.php:663
|
463 |
+
#: wpf-includes/functions.php:599 wpf-includes/wpf-phrases.php:382
|
464 |
msgid "edit"
|
465 |
msgstr ""
|
466 |
|
470 |
"to this access will lost all forum permissions."
|
471 |
msgstr ""
|
472 |
|
473 |
+
#: wpf-admin/options-tabs/accesses.php:34 wpf-includes/class-forums.php:665
|
474 |
+
#: wpf-includes/functions.php:617 wpf-includes/functions.php:627
|
475 |
#: wpf-includes/wpf-phrases.php:381
|
476 |
msgid "delete"
|
477 |
msgstr ""
|
488 |
msgid "Update"
|
489 |
msgstr ""
|
490 |
|
491 |
+
#: wpf-admin/options-tabs/api.php:22
|
492 |
+
msgid "Facebook API Configuration"
|
493 |
+
msgstr ""
|
494 |
+
|
495 |
+
#: wpf-admin/options-tabs/api.php:23
|
496 |
+
msgid ""
|
497 |
+
"In order to get an App ID and Secret Key from Facebook, you’ll need to "
|
498 |
+
"register a new application. Don’t worry – its very easy, and your "
|
499 |
+
"application doesn't need to do anything. We only need the keys."
|
500 |
+
msgstr ""
|
501 |
+
|
502 |
+
#: wpf-admin/options-tabs/api.php:23
|
503 |
+
msgid "Please follow to this instruction"
|
504 |
+
msgstr ""
|
505 |
+
|
506 |
+
#: wpf-admin/options-tabs/api.php:26
|
507 |
+
msgid "App ID"
|
508 |
+
msgstr ""
|
509 |
+
|
510 |
+
#: wpf-admin/options-tabs/api.php:27
|
511 |
+
msgid "App Secret"
|
512 |
+
msgstr ""
|
513 |
+
|
514 |
+
#: wpf-admin/options-tabs/api.php:32
|
515 |
+
msgid "Facebook Login"
|
516 |
+
msgstr ""
|
517 |
+
|
518 |
+
#: wpf-admin/options-tabs/api.php:33
|
519 |
+
msgid "Adds Facebook Login button on Registration and Login pages."
|
520 |
+
msgstr ""
|
521 |
+
|
522 |
+
#: wpf-admin/options-tabs/api.php:37 wpf-admin/options-tabs/api.php:49
|
523 |
+
#: wpf-admin/options-tabs/api.php:60 wpf-admin/options-tabs/api.php:71
|
524 |
+
#: wpf-admin/options-tabs/members.php:65
|
525 |
+
msgid "Enable"
|
526 |
+
msgstr ""
|
527 |
+
|
528 |
+
#: wpf-admin/options-tabs/api.php:38 wpf-admin/options-tabs/api.php:50
|
529 |
+
#: wpf-admin/options-tabs/api.php:61 wpf-admin/options-tabs/api.php:72
|
530 |
+
#: wpf-admin/options-tabs/members.php:66
|
531 |
+
msgid "Disable"
|
532 |
+
msgstr ""
|
533 |
+
|
534 |
+
#: wpf-admin/options-tabs/api.php:44
|
535 |
+
msgid "Facebook SDK for JavaScript"
|
536 |
+
msgstr ""
|
537 |
+
|
538 |
+
#: wpf-admin/options-tabs/api.php:45
|
539 |
+
msgid "Facebook API connection script (sharing, login, cross-posting...)"
|
540 |
+
msgstr ""
|
541 |
+
|
542 |
+
#: wpf-admin/options-tabs/api.php:56
|
543 |
+
msgid "Facebook Login button on User Login page"
|
544 |
+
msgstr ""
|
545 |
+
|
546 |
+
#: wpf-admin/options-tabs/api.php:67
|
547 |
+
msgid "Facebook Login button on User Registration page"
|
548 |
+
msgstr ""
|
549 |
+
|
550 |
+
#: wpf-admin/options-tabs/api.php:78
|
551 |
+
msgid "Redirect to this page after success login"
|
552 |
+
msgstr ""
|
553 |
+
|
554 |
+
#: wpf-admin/options-tabs/api.php:82 wpf-includes/wpf-phrases.php:630
|
555 |
+
msgid "Profile"
|
556 |
+
msgstr ""
|
557 |
+
|
558 |
+
#: wpf-admin/options-tabs/api.php:84
|
559 |
+
msgid "Custom"
|
560 |
+
msgstr ""
|
561 |
+
|
562 |
+
#: wpf-admin/options-tabs/api.php:86
|
563 |
+
msgid "Custom URL, e.g.: http://example.com/my-page/"
|
564 |
+
msgstr ""
|
565 |
+
|
566 |
+
#: wpf-admin/options-tabs/api.php:86
|
567 |
+
msgid "Custom URL"
|
568 |
+
msgstr ""
|
569 |
+
|
570 |
+
#: wpf-admin/options-tabs/api.php:93 wpf-admin/options-tabs/emails.php:132
|
571 |
+
#: wpf-admin/options-tabs/features.php:74 wpf-admin/options-tabs/forums.php:16
|
572 |
+
#: wpf-admin/options-tabs/general.php:82 wpf-admin/options-tabs/members.php:152
|
573 |
+
#: wpf-admin/options-tabs/posts.php:67 wpf-admin/options-tabs/styles.php:93
|
574 |
+
#: wpf-admin/tools-tabs/antispam.php:180 wpf-admin/tools-tabs/cleanup.php:49
|
575 |
+
#: wpf-admin/tools-tabs/misc.php:37 wpf-includes/wpf-phrases.php:345
|
576 |
+
msgid "Update Options"
|
577 |
+
msgstr ""
|
578 |
+
|
579 |
+
#: wpf-admin/options-tabs/emails.php:12
|
580 |
msgid "FROM Name"
|
581 |
msgstr ""
|
582 |
|
583 |
+
#: wpf-admin/options-tabs/emails.php:16
|
584 |
msgid "FROM Email Address"
|
585 |
msgstr ""
|
586 |
|
587 |
+
#: wpf-admin/options-tabs/emails.php:21
|
588 |
msgid "Forum Admins email addresses"
|
589 |
msgstr ""
|
590 |
|
591 |
+
#: wpf-admin/options-tabs/emails.php:22 wpf-includes/wpf-phrases.php:57
|
592 |
msgid ""
|
593 |
"Comma separated email addresses of forum administrators to get forum "
|
594 |
"notifications. For example post report messages."
|
595 |
msgstr ""
|
596 |
|
597 |
+
#: wpf-admin/options-tabs/emails.php:28
|
598 |
msgid "Notify Admins via email on new Topic"
|
599 |
msgstr ""
|
600 |
|
601 |
+
#: wpf-admin/options-tabs/emails.php:29
|
602 |
msgid ""
|
603 |
"Send Notification emails to all email addresses (comma separated ) of forum "
|
604 |
"administrators when a new Topic is created."
|
605 |
msgstr ""
|
606 |
|
607 |
+
#: wpf-admin/options-tabs/emails.php:33 wpf-admin/options-tabs/emails.php:45
|
608 |
+
#: wpf-admin/options-tabs/emails.php:116 wpf-admin/options-tabs/features.php:63
|
609 |
+
#: wpf-admin/tools-tabs/antispam.php:31 wpf-admin/tools-tabs/antispam.php:40
|
610 |
+
#: wpf-admin/tools-tabs/antispam.php:49 wpf-admin/tools-tabs/cleanup.php:39
|
611 |
+
#: wpf-includes/wpf-phrases.php:367
|
612 |
msgid "Yes"
|
613 |
msgstr ""
|
614 |
|
615 |
+
#: wpf-admin/options-tabs/emails.php:34 wpf-admin/options-tabs/emails.php:46
|
616 |
+
#: wpf-admin/options-tabs/emails.php:117 wpf-admin/options-tabs/features.php:64
|
617 |
+
#: wpf-admin/tools-tabs/antispam.php:32 wpf-admin/tools-tabs/antispam.php:41
|
618 |
+
#: wpf-admin/tools-tabs/antispam.php:50 wpf-admin/tools-tabs/cleanup.php:40
|
619 |
+
#: wpf-includes/wpf-phrases.php:197
|
620 |
msgid "No"
|
621 |
msgstr ""
|
622 |
|
623 |
+
#: wpf-admin/options-tabs/emails.php:40
|
624 |
msgid "Notify Admins via email on new Post"
|
625 |
msgstr ""
|
626 |
|
627 |
+
#: wpf-admin/options-tabs/emails.php:41
|
628 |
msgid ""
|
629 |
"Send Notification emails to all email addresses (comma separated ) of forum "
|
630 |
"administrators when a new Reply is created."
|
631 |
msgstr ""
|
632 |
|
633 |
+
#: wpf-admin/options-tabs/emails.php:52 wpf-includes/wpf-phrases.php:318
|
634 |
msgid "Subscription Emails"
|
635 |
msgstr ""
|
636 |
|
637 |
+
#: wpf-admin/options-tabs/emails.php:56 wpf-includes/wpf-phrases.php:315
|
638 |
msgid "Subscribe confirmation email subject"
|
639 |
msgstr ""
|
640 |
|
641 |
+
#: wpf-admin/options-tabs/emails.php:60 wpf-includes/wpf-phrases.php:314
|
642 |
msgid "Subscribe confirmation email message"
|
643 |
msgstr ""
|
644 |
|
645 |
+
#: wpf-admin/options-tabs/emails.php:64 wpf-includes/wpf-phrases.php:196
|
646 |
msgid "New topic notification email subject"
|
647 |
msgstr ""
|
648 |
|
649 |
+
#: wpf-admin/options-tabs/emails.php:68 wpf-includes/wpf-phrases.php:195
|
650 |
msgid "New topic notification email message"
|
651 |
msgstr ""
|
652 |
|
653 |
+
#: wpf-admin/options-tabs/emails.php:72 wpf-includes/wpf-phrases.php:194
|
654 |
msgid "New reply notification email subject"
|
655 |
msgstr ""
|
656 |
|
657 |
+
#: wpf-admin/options-tabs/emails.php:76 wpf-includes/wpf-phrases.php:193
|
658 |
msgid "New reply notification email message"
|
659 |
msgstr ""
|
660 |
|
661 |
+
#: wpf-admin/options-tabs/emails.php:81 wpf-includes/wpf-phrases.php:228
|
662 |
msgid "Post Reporting Emails"
|
663 |
msgstr ""
|
664 |
|
665 |
+
#: wpf-admin/options-tabs/emails.php:82 wpf-includes/wpf-phrases.php:332
|
666 |
msgid "This message comes from post reporting pop-up form."
|
667 |
msgstr ""
|
668 |
|
669 |
+
#: wpf-admin/options-tabs/emails.php:87 wpf-includes/wpf-phrases.php:267
|
670 |
msgid "Report message subject"
|
671 |
msgstr ""
|
672 |
|
673 |
+
#: wpf-admin/options-tabs/emails.php:92 wpf-includes/wpf-phrases.php:266
|
674 |
msgid "Report message body"
|
675 |
msgstr ""
|
676 |
|
677 |
+
#: wpf-admin/options-tabs/emails.php:97
|
678 |
msgid "Reset Password Emails"
|
679 |
msgstr ""
|
680 |
|
681 |
+
#: wpf-admin/options-tabs/emails.php:98
|
682 |
msgid "This message comes from Reset Password form."
|
683 |
msgstr ""
|
684 |
|
685 |
+
#: wpf-admin/options-tabs/emails.php:102
|
686 |
msgid "Reset Password message body"
|
687 |
msgstr ""
|
688 |
|
689 |
+
#: wpf-admin/options-tabs/emails.php:107
|
690 |
+
msgid "User Mentioning Email"
|
691 |
+
msgstr ""
|
692 |
+
|
693 |
+
#: wpf-admin/options-tabs/emails.php:112
|
694 |
+
msgid "Enable Email Notification"
|
695 |
+
msgstr ""
|
696 |
+
|
697 |
+
#: wpf-admin/options-tabs/emails.php:122
|
698 |
+
msgid "User Mention message subject"
|
699 |
+
msgstr ""
|
700 |
+
|
701 |
+
#: wpf-admin/options-tabs/emails.php:126
|
702 |
+
msgid "User Mention message body"
|
703 |
msgstr ""
|
704 |
|
705 |
#: wpf-admin/options-tabs/features.php:9 wpf-includes/wpf-phrases.php:295
|
730 |
msgid "Show Forum Statistic"
|
731 |
msgstr ""
|
732 |
|
733 |
+
#: wpf-admin/options-tabs/features.php:15 wpf-includes/wpf-phrases.php:694
|
734 |
msgid "Log Viewed Forums and Topics"
|
735 |
msgstr ""
|
736 |
|
764 |
msgstr ""
|
765 |
|
766 |
#: wpf-admin/options-tabs/features.php:20 wpf-includes/wpf-phrases.php:261
|
767 |
+
msgid "Replace Registration Page URL to Forum Registration Page URL"
|
768 |
msgstr ""
|
769 |
|
770 |
#: wpf-admin/options-tabs/features.php:21 wpf-includes/wpf-phrases.php:260
|
771 |
+
msgid "Replace Login Page URL to Forum Login Page URL"
|
772 |
msgstr ""
|
773 |
|
774 |
+
#: wpf-admin/options-tabs/features.php:22 wpf-includes/wpf-phrases.php:695
|
775 |
msgid "Replace WP Reset Password URL to Forum reset password page"
|
776 |
msgstr ""
|
777 |
|
827 |
msgid "Enable User Profile Page indexing"
|
828 |
msgstr ""
|
829 |
|
830 |
+
#: wpf-admin/options-tabs/features.php:36 wpf-includes/wpf-phrases.php:696
|
831 |
msgid "Enable RSS Feed"
|
832 |
msgstr ""
|
833 |
|
1019 |
msgid "Members URL structure"
|
1020 |
msgstr ""
|
1021 |
|
1022 |
+
#: wpf-admin/options-tabs/members.php:29 wpf-includes/wpf-phrases.php:697
|
1023 |
msgid "Members Search Type"
|
1024 |
msgstr ""
|
1025 |
|
1063 |
msgstr ""
|
1064 |
|
1065 |
#: wpf-admin/options-tabs/members.php:62
|
1066 |
+
msgid "Member Custom Titles"
|
1067 |
msgstr ""
|
1068 |
|
1069 |
+
#: wpf-admin/options-tabs/members.php:71
|
1070 |
+
msgid "Member Custom Title by default"
|
1071 |
+
msgstr ""
|
1072 |
+
|
1073 |
+
#: wpf-admin/options-tabs/members.php:81 wpf-includes/wpf-phrases.php:248
|
1074 |
msgid "Rating Level"
|
1075 |
msgstr ""
|
1076 |
|
1077 |
+
#: wpf-admin/options-tabs/members.php:82 wpf-includes/wpf-phrases.php:185
|
1078 |
msgid "Min Number of Posts"
|
1079 |
msgstr ""
|
1080 |
|
1081 |
+
#: wpf-admin/options-tabs/members.php:83 wpf-includes/wpf-phrases.php:176
|
1082 |
msgid "Member Title"
|
1083 |
msgstr ""
|
1084 |
|
1085 |
+
#: wpf-admin/options-tabs/members.php:84 wpf-includes/wpf-phrases.php:294
|
1086 |
msgid "Short Badge"
|
1087 |
msgstr ""
|
1088 |
|
1089 |
+
#: wpf-admin/options-tabs/members.php:85 wpf-includes/wpf-phrases.php:128
|
1090 |
msgid "Full Badge"
|
1091 |
msgstr ""
|
1092 |
|
1093 |
+
#: wpf-admin/options-tabs/members.php:86 wpf-includes/wpf-phrases.php:246
|
1094 |
msgid "Rating Color"
|
1095 |
msgstr ""
|
1096 |
|
1097 |
+
#: wpf-admin/options-tabs/members.php:87 wpf-includes/wpf-phrases.php:247
|
1098 |
msgid "Rating Icon"
|
1099 |
msgstr ""
|
1100 |
|
1101 |
+
#: wpf-admin/options-tabs/members.php:87 wpf-includes/wpf-phrases.php:187
|
1102 |
msgid "More"
|
1103 |
msgstr ""
|
1104 |
|
1105 |
+
#: wpf-admin/options-tabs/members.php:92 wpf-includes/wpf-phrases.php:158
|
1106 |
msgid "Level"
|
1107 |
msgstr ""
|
1108 |
|
1109 |
+
#: wpf-admin/options-tabs/members.php:93 wpf-includes/wpf-phrases.php:212
|
1110 |
msgid "Number of Posts"
|
1111 |
msgstr ""
|
1112 |
|
1113 |
+
#: wpf-admin/options-tabs/members.php:94 wpf-includes/wpf-phrases.php:63
|
1114 |
msgid "Custom Title"
|
1115 |
msgstr ""
|
1116 |
|
1117 |
+
#: wpf-admin/options-tabs/members.php:97 wpf-admin/usergroup.php:23
|
1118 |
+
#: wpf-includes/wpf-phrases.php:56
|
1119 |
msgid "Color"
|
1120 |
msgstr ""
|
1121 |
|
1122 |
+
#: wpf-admin/options-tabs/members.php:98 wpf-includes/wpf-phrases.php:48
|
1123 |
msgid "Badge Icon"
|
1124 |
msgstr ""
|
1125 |
|
1126 |
+
#: wpf-admin/options-tabs/members.php:104
|
1127 |
msgid "Enable Reputation Titles for selected usergroups"
|
1128 |
msgstr ""
|
1129 |
|
1130 |
+
#: wpf-admin/options-tabs/members.php:105
|
1131 |
msgid ""
|
1132 |
"This option depends on \"Enable Member Rating Titles\" parent option, witch "
|
1133 |
"located in wpForo Settings > Features Tab"
|
1134 |
msgstr ""
|
1135 |
|
1136 |
+
#: wpf-admin/options-tabs/members.php:118
|
1137 |
msgid "Enable Reputation Badges for selected usergroups"
|
1138 |
msgstr ""
|
1139 |
|
1140 |
+
#: wpf-admin/options-tabs/members.php:119
|
1141 |
msgid ""
|
1142 |
"This option depends on \"Enable Member Rating\" parent option, witch located "
|
1143 |
"in wpForo Settings > Features Tab"
|
1144 |
msgstr ""
|
1145 |
|
1146 |
+
#: wpf-admin/options-tabs/members.php:132
|
1147 |
msgid "Display Usergroup under Post Author Avatar"
|
1148 |
msgstr ""
|
1149 |
|
1233 |
msgid "Forum Color Styles"
|
1234 |
msgstr ""
|
1235 |
|
1236 |
+
#: wpf-admin/options-tabs/styles.php:43
|
1237 |
+
msgid "Documentation"
|
1238 |
+
msgstr ""
|
1239 |
+
|
1240 |
#: wpf-admin/options.php:8 wpf-includes/wpf-phrases.php:117
|
1241 |
msgid "Forum Settings"
|
1242 |
msgstr ""
|
1265 |
msgid "Styles"
|
1266 |
msgstr ""
|
1267 |
|
1268 |
+
#: wpf-admin/options.php:23
|
1269 |
+
msgid "API's"
|
1270 |
+
msgstr ""
|
1271 |
+
|
1272 |
#: wpf-admin/phrase.php:10 wpf-includes/wpf-phrases.php:127
|
1273 |
msgid "Front-end Phrases"
|
1274 |
msgstr ""
|
1502 |
msgid "Enable Auto-cleanup of inactive users"
|
1503 |
msgstr ""
|
1504 |
|
1505 |
+
#: wpf-admin/tools-tabs/misc.php:10
|
1506 |
+
msgid "SEO Tools"
|
1507 |
+
msgstr ""
|
1508 |
+
|
1509 |
+
#: wpf-admin/tools-tabs/misc.php:18
|
1510 |
+
msgid "Allowed dofollow domains"
|
1511 |
+
msgstr ""
|
1512 |
+
|
1513 |
+
#: wpf-admin/tools-tabs/misc.php:19
|
1514 |
+
msgid ""
|
1515 |
+
"wpForo adds nofollow to all links with external URLs. If you want to keep "
|
1516 |
+
"some domains as internal please insert domains one per line in the textarea "
|
1517 |
+
"bellow."
|
1518 |
+
msgstr ""
|
1519 |
+
|
1520 |
+
#: wpf-admin/tools-tabs/misc.php:26
|
1521 |
+
msgid "Noindex forum page URLs"
|
1522 |
+
msgstr ""
|
1523 |
+
|
1524 |
+
#: wpf-admin/tools-tabs/misc.php:27
|
1525 |
+
msgid ""
|
1526 |
+
"The noIndex code tells Google and other search engines to NOT index the "
|
1527 |
+
"page, so that it cannot be found in search results. Please insert page URLs "
|
1528 |
+
"you do not want to be indexed one per line in the textarea bellow."
|
1529 |
+
msgstr ""
|
1530 |
+
|
1531 |
#: wpf-admin/tools.php:8
|
1532 |
msgid "Forum Tools"
|
1533 |
msgstr ""
|
1540 |
msgid "Cleanup"
|
1541 |
msgstr ""
|
1542 |
|
1543 |
+
#: wpf-admin/tools.php:16
|
1544 |
+
msgid "Misc"
|
1545 |
+
msgstr ""
|
1546 |
+
|
1547 |
#: wpf-admin/usergroup.php:18
|
1548 |
msgid "Usergroup id"
|
1549 |
msgstr ""
|
1550 |
|
1551 |
+
#: wpf-admin/usergroup.php:19 wpf-admin/usergroup.php:44
|
1552 |
+
#: wpf-admin/usergroup.php:87
|
1553 |
msgid "Usergroup Name"
|
1554 |
msgstr ""
|
1555 |
|
1561 |
msgid "New Users Default Group"
|
1562 |
msgstr ""
|
1563 |
|
1564 |
+
#: wpf-admin/usergroup.php:22
|
1565 |
+
msgid "Default Access"
|
1566 |
+
msgstr ""
|
1567 |
+
|
1568 |
+
#: wpf-admin/usergroup.php:35
|
1569 |
msgid "Edit this usergroup"
|
1570 |
msgstr ""
|
1571 |
|
1572 |
+
#: wpf-admin/usergroup.php:35 wpf-includes/wpf-phrases.php:73
|
1573 |
msgid "Edit"
|
1574 |
msgstr ""
|
1575 |
|
1576 |
+
#: wpf-admin/usergroup.php:36
|
1577 |
msgid "Delete this usergroup"
|
1578 |
msgstr ""
|
1579 |
|
1580 |
+
#: wpf-admin/usergroup.php:38
|
1581 |
msgid "View users list in this usergroup"
|
1582 |
msgstr ""
|
1583 |
|
1584 |
+
#: wpf-admin/usergroup.php:50
|
1585 |
msgid "Count of users in this usergroup"
|
1586 |
msgstr ""
|
1587 |
|
1588 |
+
#: wpf-admin/usergroup.php:55
|
1589 |
msgid "is Default"
|
1590 |
msgstr ""
|
1591 |
|
1592 |
+
#: wpf-admin/usergroup.php:57
|
1593 |
msgid "DO NOT set this option on higher level user groups !!!"
|
1594 |
msgstr ""
|
1595 |
|
1596 |
+
#: wpf-admin/usergroup.php:57
|
1597 |
msgid "Set as Default"
|
1598 |
msgstr ""
|
1599 |
|
1600 |
+
#: wpf-admin/usergroup.php:65
|
1601 |
+
msgid "default (#15)"
|
1602 |
+
msgstr ""
|
1603 |
+
|
1604 |
+
#: wpf-admin/usergroup.php:87 wpf-includes/wpf-phrases.php:133
|
1605 |
msgid "Guest"
|
1606 |
msgstr ""
|
1607 |
|
1608 |
+
#: wpf-admin/usergroup.php:102
|
1609 |
+
msgid "Usergroup Color"
|
1610 |
+
msgstr ""
|
1611 |
+
|
1612 |
+
#: wpf-admin/usergroup.php:103
|
1613 |
+
msgid "use default link color"
|
1614 |
+
msgstr ""
|
1615 |
+
|
1616 |
+
#: wpf-admin/usergroup.php:124
|
1617 |
msgid "WordPress User Role"
|
1618 |
msgstr ""
|
1619 |
|
1620 |
+
#: wpf-admin/usergroup.php:133
|
1621 |
msgid "Default Forum Access"
|
1622 |
msgstr ""
|
1623 |
|
1624 |
+
#: wpf-admin/usergroup.php:141
|
1625 |
msgid ""
|
1626 |
"This is only used when a new Usergroup is created, it automatically gets the "
|
1627 |
"selected Forum Access in all forums."
|
1628 |
msgstr ""
|
1629 |
|
1630 |
+
#: wpf-admin/usergroup.php:161 wpf-includes/wpf-phrases.php:375
|
1631 |
msgid "add"
|
1632 |
msgstr ""
|
1633 |
|
1634 |
+
#: wpf-admin/usergroup.php:161
|
1635 |
msgid "save"
|
1636 |
msgstr ""
|
1637 |
|
1638 |
+
#: wpf-admin/usergroup.php:182
|
1639 |
msgid "Delete Chosen Usergroup And Users"
|
1640 |
msgstr ""
|
1641 |
|
1642 |
+
#: wpf-admin/usergroup.php:192
|
1643 |
msgid "Delete Chosen Usergroup And Join Users To Other Usergroup"
|
1644 |
msgstr ""
|
1645 |
|
1646 |
+
#: wpf-admin/usergroup.php:204
|
1647 |
msgid "Users will be join this usergroup"
|
1648 |
msgstr ""
|
1649 |
|
1650 |
+
#: wpf-includes/class-api.php:76
|
1651 |
+
msgid "Please login into facebook and then click connect button again"
|
1652 |
+
msgstr ""
|
1653 |
+
|
1654 |
+
#: wpf-includes/class-api.php:103
|
1655 |
+
msgid ""
|
1656 |
+
"Your email is required to be able authorize you here. Please try loging "
|
1657 |
+
"again. "
|
1658 |
+
msgstr ""
|
1659 |
+
|
1660 |
+
#: wpf-includes/class-api.php:108
|
1661 |
+
msgid "Invalid User"
|
1662 |
+
msgstr ""
|
1663 |
+
|
1664 |
+
#: wpf-includes/class-api.php:118 wpf-includes/wpf-phrases.php:635
|
1665 |
+
msgid "User registration is disabled"
|
1666 |
+
msgstr ""
|
1667 |
+
|
1668 |
+
#: wpf-includes/class-forums.php:662
|
1669 |
msgid "Add a new SubForum"
|
1670 |
msgstr ""
|
1671 |
|
1672 |
+
#: wpf-includes/class-forums.php:662
|
1673 |
msgid "Add a new Forum in this Category"
|
1674 |
msgstr ""
|
1675 |
|
1676 |
+
#: wpf-includes/class-members.php:233
|
1677 |
msgid "<strong>ERROR</strong>: Please enter a username."
|
1678 |
msgstr ""
|
1679 |
|
1680 |
+
#: wpf-includes/class-members.php:237
|
1681 |
msgid ""
|
1682 |
"<strong>ERROR</strong>: This username is invalid because it uses illegal "
|
1683 |
"characters. Please enter a valid username."
|
1684 |
msgstr ""
|
1685 |
|
1686 |
+
#: wpf-includes/class-members.php:246
|
1687 |
msgid ""
|
1688 |
"<strong>ERROR</strong>: This username is already registered. Please choose "
|
1689 |
"another one."
|
1690 |
msgstr ""
|
1691 |
|
1692 |
+
#: wpf-includes/class-members.php:250
|
1693 |
msgid "<strong>ERROR</strong>: Sorry, that username is not allowed."
|
1694 |
msgstr ""
|
1695 |
|
1696 |
+
#: wpf-includes/class-members.php:254
|
1697 |
msgid "<strong>ERROR</strong>: Please type your email address."
|
1698 |
msgstr ""
|
1699 |
|
1700 |
+
#: wpf-includes/class-members.php:258
|
1701 |
msgid "<strong>ERROR</strong>: The email address isn’t correct."
|
1702 |
msgstr ""
|
1703 |
|
1704 |
+
#: wpf-includes/class-members.php:263
|
1705 |
msgid ""
|
1706 |
"<strong>ERROR</strong>: This email is already registered, please choose "
|
1707 |
"another one."
|
1708 |
msgstr ""
|
1709 |
|
1710 |
+
#: wpf-includes/class-members.php:1293
|
1711 |
msgid "What should be done with wpForo content owned by this user?"
|
1712 |
msgstr ""
|
1713 |
|
1714 |
+
#: wpf-includes/class-members.php:1295
|
1715 |
msgid "What should be done with wpForo content owned by these users?"
|
1716 |
msgstr ""
|
1717 |
|
1718 |
+
#: wpf-includes/class-members.php:1299
|
1719 |
msgid "Delete all wpForo content."
|
1720 |
msgstr ""
|
1721 |
|
1722 |
+
#: wpf-includes/class-members.php:1301
|
1723 |
msgid "Attribute all content to:"
|
1724 |
msgstr ""
|
1725 |
|
1726 |
+
#: wpf-includes/class-moderation.php:159
|
1727 |
#, php-format
|
1728 |
msgid ""
|
1729 |
"Probably spam file attachments have been detected by wpForo Spam Control. "
|
1730 |
"Please moderate suspected files here %s"
|
1731 |
msgstr ""
|
1732 |
|
1733 |
+
#: wpf-includes/class-notices.php:118 wpf-includes/wpf-phrases.php:69
|
1734 |
msgid "Dismiss this notice."
|
1735 |
msgstr ""
|
1736 |
|
1737 |
+
#: wpf-includes/class-notices.php:155
|
1738 |
msgid "New Addons for Your Forum!"
|
1739 |
msgstr ""
|
1740 |
|
1741 |
+
#: wpf-includes/class-notices.php:155
|
1742 |
msgid "Extend your forum with wpForo addons"
|
1743 |
msgstr ""
|
1744 |
|
1745 |
+
#: wpf-includes/class-notices.php:168
|
1746 |
msgid "View all Addons"
|
1747 |
msgstr ""
|
1748 |
|
1749 |
+
#: wpf-includes/class-permissions.php:125 wpf-includes/wpf-phrases.php:421
|
1750 |
#, php-format
|
1751 |
msgid "%s access successfully added"
|
1752 |
msgstr ""
|
1753 |
|
1754 |
+
#: wpf-includes/class-permissions.php:149 wpf-includes/wpf-phrases.php:422
|
1755 |
#, php-format
|
1756 |
msgid "%s access successfully edited"
|
1757 |
msgstr ""
|
1758 |
|
1759 |
+
#: wpf-includes/class-phrases.php:179 wpf-includes/wpf-phrases.php:7
|
1760 |
msgid " Forum"
|
1761 |
msgstr ""
|
1762 |
|
1763 |
+
#: wpf-includes/class-phrases.php:180 wpf-includes/wpf-phrases.php:6
|
1764 |
msgid " Discussion Board"
|
1765 |
msgstr ""
|
1766 |
|
1767 |
+
#: wpf-includes/class-posts.php:34
|
1768 |
msgid "You are not permitted to view this attachment"
|
1769 |
msgstr ""
|
1770 |
|
1771 |
+
#: wpf-includes/class-template.php:77
|
1772 |
msgid "Insert link"
|
1773 |
msgstr ""
|
1774 |
|
1775 |
+
#: wpf-includes/class-template.php:78
|
1776 |
msgid "Link Text"
|
1777 |
msgstr ""
|
1778 |
|
1779 |
+
#: wpf-includes/class-template.php:79
|
1780 |
msgid "Open link in a new tab"
|
1781 |
msgstr ""
|
1782 |
|
1783 |
+
#: wpf-includes/class-template.php:1170 wpf-includes/wpf-phrases.php:328
|
1784 |
msgid "Theme file not readable"
|
1785 |
msgstr ""
|
1786 |
|
1787 |
+
#: wpf-includes/functions-installation.php:642
|
1788 |
msgid "Start Profile Synchronization"
|
1789 |
msgstr ""
|
1790 |
|
1791 |
+
#: wpf-includes/functions-installation.php:642
|
1792 |
msgid "Continue Synchronization"
|
1793 |
msgstr ""
|
1794 |
|
1795 |
+
#: wpf-includes/functions-installation.php:645
|
1796 |
msgid ""
|
1797 |
"This process may take a few seconds or dozens of minutes, please be patient "
|
1798 |
"and don't close this page."
|
1799 |
msgstr ""
|
1800 |
|
1801 |
+
#: wpf-includes/functions-installation.php:646
|
1802 |
msgid ""
|
1803 |
"You can permanently disable this message in Dashboard > Forums > Features "
|
1804 |
"admin page."
|
1805 |
msgstr ""
|
1806 |
|
1807 |
+
#: wpf-includes/functions-installation.php:648
|
1808 |
msgid "wpForo Forum Installation | "
|
1809 |
msgstr ""
|
1810 |
|
1811 |
+
#: wpf-includes/functions-installation.php:649
|
1812 |
msgid ""
|
1813 |
"Forum users' profile data are not synchronized yet, this step is required! "
|
1814 |
"Please click the button below to complete installation."
|
1815 |
msgstr ""
|
1816 |
|
1817 |
+
#: wpf-includes/functions-installation.php:661
|
1818 |
msgid ""
|
1819 |
"This process may take a few seconds or dozens of minutes, please be patient "
|
1820 |
"and don't close this page. Database backup is not required. If you got 500 "
|
1822 |
"in MySQL server."
|
1823 |
msgstr ""
|
1824 |
|
1825 |
+
#: wpf-includes/functions-installation.php:662
|
1826 |
msgid "Updater Database"
|
1827 |
msgstr ""
|
1828 |
|
1829 |
+
#: wpf-includes/functions-installation.php:663
|
1830 |
msgid "wpForo - Update Database "
|
1831 |
msgstr ""
|
1832 |
|
1833 |
+
#: wpf-includes/functions-installation.php:664
|
1834 |
msgid "Please click the button below to complete wpForo update."
|
1835 |
msgstr ""
|
1836 |
|
1838 |
msgid "wpForo Menu"
|
1839 |
msgstr ""
|
1840 |
|
1841 |
+
#: wpf-includes/functions-template.php:156 wpf-includes/wpf-phrases.php:411
|
1842 |
msgid "wpForo Sidebar"
|
1843 |
msgstr ""
|
1844 |
|
1845 |
+
#: wpf-includes/functions-template.php:157 wpf-includes/wpf-phrases.php:192
|
1846 |
msgid ""
|
1847 |
"NOTE: If you're going to add widgets in this sidebar, please use 'Full "
|
1848 |
"Width' template for wpForo index page to avoid sidebar duplication."
|
1849 |
msgstr ""
|
1850 |
|
1851 |
+
#: wpf-includes/functions-template.php:195
|
1852 |
+
#: wpf-includes/functions-template.php:301
|
1853 |
+
#: wpf-includes/functions-template.php:363
|
1854 |
+
#: wpf-includes/functions-template.php:445
|
1855 |
+
#: wpf-includes/functions-template.php:528
|
1856 |
+
#: wpf-includes/functions-template.php:574 wpf-includes/wpf-phrases.php:335
|
1857 |
msgid "Title"
|
1858 |
msgstr ""
|
1859 |
|
1860 |
+
#: wpf-includes/functions-template.php:366
|
1861 |
+
#: wpf-includes/functions-template.php:448
|
1862 |
+
#: wpf-includes/functions-template.php:531 wpf-includes/wpf-phrases.php:211
|
1863 |
msgid "Number of Items"
|
1864 |
msgstr ""
|
1865 |
|
1866 |
+
#: wpf-includes/functions-template.php:371 wpf-includes/wpf-phrases.php:70
|
1867 |
msgid "Display Avatars"
|
1868 |
msgstr ""
|
1869 |
|
1870 |
+
#: wpf-includes/functions-template.php:452
|
1871 |
+
#: wpf-includes/functions-template.php:535 wpf-includes/wpf-phrases.php:72
|
1872 |
msgid "Display with Avatars"
|
1873 |
msgstr ""
|
1874 |
|
1875 |
+
#: wpf-includes/functions.php:364
|
1876 |
msgid "Unapproved"
|
1877 |
msgstr ""
|
1878 |
|
1879 |
+
#: wpf-includes/functions.php:365
|
1880 |
msgid "Published"
|
1881 |
msgstr ""
|
1882 |
|
1883 |
+
#: wpf-includes/functions.php:374 wpf-includes/wpf-phrases.php:594
|
1884 |
msgid "Active"
|
1885 |
msgstr ""
|
1886 |
|
1887 |
+
#: wpf-includes/functions.php:375
|
1888 |
msgid "Banned"
|
1889 |
msgstr ""
|
1890 |
|
1891 |
+
#: wpf-includes/functions.php:388 wpf-includes/functions.php:690
|
1892 |
#: wpf-includes/wpf-phrases.php:50
|
1893 |
msgid "Bulk Actions"
|
1894 |
msgstr ""
|
1895 |
|
1896 |
+
#: wpf-includes/functions.php:393 wpf-includes/functions.php:775
|
1897 |
#: wpf-includes/wpf-phrases.php:36
|
1898 |
msgid "Apply"
|
1899 |
msgstr ""
|
1900 |
|
1901 |
+
#: wpf-includes/functions.php:402 wpf-includes/wpf-phrases.php:301
|
1902 |
msgid "Show all forums"
|
1903 |
msgstr ""
|
1904 |
|
1905 |
+
#: wpf-includes/functions.php:415 wpf-includes/wpf-phrases.php:351
|
1906 |
msgid "filter by group"
|
1907 |
msgstr ""
|
1908 |
|
1909 |
+
#: wpf-includes/functions.php:427
|
1910 |
msgid "filter by status"
|
1911 |
msgstr ""
|
1912 |
|
1913 |
+
#: wpf-includes/functions.php:443
|
1914 |
msgid "filter by package"
|
1915 |
msgstr ""
|
1916 |
|
1917 |
+
#: wpf-includes/functions.php:472
|
1918 |
msgid "filter by user"
|
1919 |
msgstr ""
|
1920 |
|
1921 |
+
#: wpf-includes/functions.php:492 wpf-includes/functions.php:698
|
1922 |
#: wpf-includes/wpf-phrases.php:386
|
1923 |
msgid "item"
|
1924 |
msgstr ""
|
1925 |
|
1926 |
+
#: wpf-includes/functions.php:525 wpf-includes/functions.php:541
|
1927 |
#: wpf-includes/wpf-phrases.php:285
|
1928 |
msgid "Select All"
|
1929 |
msgstr ""
|
1930 |
|
1931 |
+
#: wpf-includes/functions.php:530 wpf-includes/functions.php:546
|
1932 |
msgid "Type"
|
1933 |
msgstr ""
|
1934 |
|
1935 |
+
#: wpf-includes/functions.php:603 wpf-includes/wpf-phrases.php:384
|
1936 |
msgid "edit user"
|
1937 |
msgstr ""
|
1938 |
|
1939 |
+
#: wpf-includes/functions.php:607 wpf-includes/wpf-phrases.php:383
|
1940 |
msgid "edit profile"
|
1941 |
msgstr ""
|
1942 |
|
1943 |
+
#: wpf-includes/functions.php:612
|
1944 |
msgid "unban user"
|
1945 |
msgstr ""
|
1946 |
|
1947 |
+
#: wpf-includes/functions.php:612
|
1948 |
msgid "ban user"
|
1949 |
msgstr ""
|
1950 |
|
1951 |
+
#: wpf-includes/functions.php:612
|
1952 |
msgid "Are you sure, you want to unban this user?"
|
1953 |
msgstr ""
|
1954 |
|
1955 |
+
#: wpf-includes/functions.php:612
|
1956 |
msgid "Are you sure, you want to ban this user?"
|
1957 |
msgstr ""
|
1958 |
|
1959 |
+
#: wpf-includes/functions.php:617 wpf-includes/functions.php:627
|
1960 |
#: wpf-includes/wpf-phrases.php:67
|
1961 |
msgid "Delete this item"
|
1962 |
msgstr ""
|
1963 |
|
1964 |
+
#: wpf-includes/functions.php:617 wpf-includes/functions.php:627
|
1965 |
#: wpf-includes/wpf-phrases.php:41
|
1966 |
msgid "Are you sure you whant to DELETE this item?"
|
1967 |
msgstr ""
|
1968 |
|
1969 |
+
#: wpf-includes/functions.php:622
|
1970 |
msgid "unapprove this item"
|
1971 |
msgstr ""
|
1972 |
|
1973 |
+
#: wpf-includes/functions.php:622
|
1974 |
msgid "Approve this item"
|
1975 |
msgstr ""
|
1976 |
|
1977 |
+
#: wpf-includes/functions.php:622 wpf-includes/wpf-phrases.php:682
|
1978 |
msgid "unapprove"
|
1979 |
msgstr ""
|
1980 |
|
1981 |
+
#: wpf-includes/functions.php:622 wpf-includes/wpf-phrases.php:681
|
1982 |
msgid "approve"
|
1983 |
msgstr ""
|
1984 |
|
1985 |
+
#: wpf-includes/functions.php:644 wpf-includes/functions.php:645
|
1986 |
#: wpf-includes/wpf-phrases.php:405
|
1987 |
msgid "view"
|
1988 |
msgstr ""
|
1989 |
|
1990 |
+
#: wpf-includes/functions.php:669
|
1991 |
msgid "Topic"
|
1992 |
msgstr ""
|
1993 |
|
1994 |
+
#: wpf-includes/functions.php:669
|
1995 |
msgid "Post"
|
1996 |
msgstr ""
|
1997 |
|
1998 |
+
#: wpf-includes/functions.php:682 wpf-includes/wpf-phrases.php:201
|
1999 |
msgid "No items found"
|
2000 |
msgstr ""
|
2001 |
|
2002 |
+
#: wpf-includes/functions.php:774 wpf-includes/wpf-phrases.php:141
|
2003 |
msgid "Items"
|
2004 |
msgstr ""
|
2005 |
|
2006 |
+
#: wpf-includes/functions.php:1124
|
2007 |
#, php-format
|
2008 |
msgid "Could not write file %s"
|
2009 |
msgstr ""
|
2022 |
msgid "Uninstall"
|
2023 |
msgstr ""
|
2024 |
|
2025 |
+
#: wpf-includes/wpf-hooks.php:1077 wpf-includes/wpf-phrases.php:188
|
2026 |
msgid "Move"
|
2027 |
msgstr ""
|
2028 |
|
2029 |
+
#: wpf-includes/wpf-hooks.php:1112
|
2030 |
msgid "Clear"
|
2031 |
msgstr ""
|
2032 |
|
2033 |
+
#: wpf-includes/wpf-hooks.php:1112
|
2034 |
msgid "Default"
|
2035 |
msgstr ""
|
2036 |
|
2037 |
+
#: wpf-includes/wpf-hooks.php:1112
|
2038 |
msgid "Select Color"
|
2039 |
msgstr ""
|
2040 |
|
2041 |
+
#: wpf-includes/wpf-hooks.php:1135
|
2042 |
msgid ""
|
2043 |
"IMPORTANT: wpForo can't work with default permalink, please change permalink "
|
2044 |
"structure"
|
2045 |
msgstr ""
|
2046 |
|
2047 |
+
#: wpf-includes/wpf-hooks.php:1154 wpf-includes/wpf-phrases.php:413
|
2048 |
msgid "wpForo Usergroup"
|
2049 |
msgstr ""
|
2050 |
|
2051 |
+
#: wpf-includes/wpf-hooks.php:1162 wpf-includes/wpf-phrases.php:412
|
2052 |
msgid "wpForo User Timezone"
|
2053 |
msgstr ""
|
2054 |
|
2055 |
+
#: wpf-includes/wpf-hooks.php:1418 wpf-includes/wpf-hooks.php:1506
|
2056 |
msgid "Please Moderate: "
|
2057 |
msgstr ""
|
2058 |
|
2059 |
+
#: wpf-includes/wpf-hooks.php:1419
|
2060 |
msgid ""
|
2061 |
"This topic is currently unapproved. You can approve topics in Dashboard "
|
2062 |
"» Forums » Moderation admin page."
|
2063 |
msgstr ""
|
2064 |
|
2065 |
+
#: wpf-includes/wpf-hooks.php:1507
|
2066 |
msgid ""
|
2067 |
"This post is currently unapproved. You can approve posts in Dashboard "
|
2068 |
"» Forums » Moderation admin page."
|
2069 |
msgstr ""
|
2070 |
|
2071 |
+
#: wpf-includes/wpf-hooks.php:1680 wpf-includes/wpf-hooks.php:1726
|
2072 |
msgid "New Forum"
|
2073 |
msgstr ""
|
2074 |
|
2075 |
+
#: wpf-includes/wpf-hooks.php:1688
|
2076 |
msgid "New User Group"
|
2077 |
msgstr ""
|
2078 |
|
2079 |
+
#: wpf-includes/wpf-hooks.php:1696 wpf-includes/wpf-hooks.php:1794
|
2080 |
msgid "New Phrase"
|
2081 |
msgstr ""
|
2082 |
|
2083 |
+
#: wpf-includes/wpf-hooks.php:1711
|
2084 |
msgid "Community"
|
2085 |
msgstr ""
|
2086 |
|
2087 |
+
#: wpf-includes/wpf-hooks.php:1778
|
2088 |
msgid "New UserGroup"
|
2089 |
msgstr ""
|
2090 |
|
2176 |
msgid "Choose target forum"
|
2177 |
msgstr ""
|
2178 |
|
2179 |
+
#: wpf-includes/wpf-phrases.php:55 wpf-themes/classic/functions.php:43
|
2180 |
+
#: wpf-themes/classic/functions.php:73 wpf-themes/classic/functions.php:111
|
2181 |
msgid "Collapsed"
|
2182 |
msgstr ""
|
2183 |
|
2213 |
msgid "Enter title here"
|
2214 |
msgstr ""
|
2215 |
|
2216 |
+
#: wpf-includes/wpf-phrases.php:89 wpf-themes/classic/functions.php:42
|
2217 |
+
#: wpf-themes/classic/functions.php:72 wpf-themes/classic/functions.php:110
|
2218 |
msgid "Expanded"
|
2219 |
msgstr ""
|
2220 |
|
2221 |
+
#: wpf-includes/wpf-phrases.php:90
|
2222 |
msgid "Extended Layout - Intro posts"
|
2223 |
msgstr ""
|
2224 |
|
2225 |
+
#: wpf-includes/wpf-phrases.php:91
|
2226 |
msgid "Extended Layout - Intro topics"
|
2227 |
msgstr ""
|
2228 |
|
2229 |
+
#: wpf-includes/wpf-phrases.php:92
|
2230 |
msgid "Extended Layout - Number of intro posts"
|
2231 |
msgstr ""
|
2232 |
|
2233 |
+
#: wpf-includes/wpf-phrases.php:93
|
2234 |
msgid "Extended Layout - Number of intro topics"
|
2235 |
msgstr ""
|
2236 |
|
2258 |
msgid "First post and replies"
|
2259 |
msgstr ""
|
2260 |
|
2261 |
+
#: wpf-includes/wpf-phrases.php:101 wpforo.php:173
|
2262 |
msgid "Forum"
|
2263 |
msgstr ""
|
2264 |
|
2542 |
msgid "Powered by"
|
2543 |
msgstr ""
|
2544 |
|
2545 |
+
#: wpf-includes/wpf-phrases.php:236
|
2546 |
msgid "Q&A Layout - Number of intro topics"
|
2547 |
msgstr ""
|
2548 |
|
2549 |
+
#: wpf-includes/wpf-phrases.php:237
|
2550 |
msgid "Q&A layout - Intro topics"
|
2551 |
msgstr ""
|
2552 |
|
2682 |
msgid "Set Topic Sticky"
|
2683 |
msgstr ""
|
2684 |
|
2685 |
+
#: wpf-includes/wpf-phrases.php:292
|
2686 |
msgid ""
|
2687 |
"Set this option value 0 if you want to show all posts under topic intro area."
|
2688 |
msgstr ""
|
3628 |
msgid "Can set topic sticky"
|
3629 |
msgstr ""
|
3630 |
|
3631 |
+
#: wpf-includes/wpf-phrases.php:578
|
3632 |
msgid "Can set topic private"
|
3633 |
msgstr ""
|
3634 |
|
3684 |
msgid "Topic Icons"
|
3685 |
msgstr ""
|
3686 |
|
3687 |
+
#: wpf-includes/wpf-phrases.php:592
|
3688 |
msgid "New"
|
3689 |
msgstr ""
|
3690 |
|
3776 |
msgid "Full access"
|
3777 |
msgstr ""
|
3778 |
|
|
|
|
|
|
|
|
|
3779 |
#: wpf-includes/wpf-phrases.php:632
|
3780 |
msgid "Incorrect file format. Allowed formats: jpeg, jpg, png, gif."
|
3781 |
msgstr ""
|
3782 |
|
|
|
|
|
|
|
|
|
3783 |
#: wpf-includes/wpf-phrases.php:639
|
3784 |
msgid "Attachment removed"
|
3785 |
msgstr ""
|
3810 |
msgstr ""
|
3811 |
|
3812 |
#: wpf-includes/wpf-phrases.php:646
|
3813 |
+
msgid "You do not have permission to view this page"
|
3814 |
msgstr ""
|
3815 |
|
3816 |
#: wpf-includes/wpf-phrases.php:648
|
3819 |
"available. wpForo will look like as a stand-alone forum."
|
3820 |
msgstr ""
|
3821 |
|
3822 |
+
#: wpf-includes/wpf-phrases.php:651
|
3823 |
msgid "Can set own topic private"
|
3824 |
msgstr ""
|
3825 |
|
3826 |
+
#: wpf-includes/wpf-phrases.php:652
|
3827 |
msgid "Can view private topic"
|
3828 |
msgstr ""
|
3829 |
|
3830 |
+
#: wpf-includes/wpf-phrases.php:653
|
3831 |
msgid "private"
|
3832 |
msgstr ""
|
3833 |
|
3834 |
+
#: wpf-includes/wpf-phrases.php:654
|
3835 |
msgid "public"
|
3836 |
msgstr ""
|
3837 |
|
3838 |
+
#: wpf-includes/wpf-phrases.php:655
|
3839 |
msgid "Private Topic"
|
3840 |
msgstr ""
|
3841 |
|
3842 |
+
#: wpf-includes/wpf-phrases.php:656
|
3843 |
msgid "Only Admins and Moderators can see your private topics."
|
3844 |
msgstr ""
|
3845 |
|
3846 |
+
#: wpf-includes/wpf-phrases.php:657
|
3847 |
msgid "Forum ID is not detected"
|
3848 |
msgstr ""
|
3849 |
|
3850 |
+
#: wpf-includes/wpf-phrases.php:658
|
3851 |
msgid "You are not permitted to subscribe here"
|
3852 |
msgstr ""
|
3853 |
|
3854 |
+
#: wpf-includes/wpf-phrases.php:659
|
3855 |
msgid "Subscribe to this topic"
|
3856 |
msgstr ""
|
3857 |
|
3858 |
+
#: wpf-includes/wpf-phrases.php:662
|
3859 |
msgid "Awaiting moderation"
|
3860 |
msgstr ""
|
3861 |
|
3862 |
+
#: wpf-includes/wpf-phrases.php:663
|
3863 |
msgid "Topic first post not found."
|
3864 |
msgstr ""
|
3865 |
|
3866 |
+
#: wpf-includes/wpf-phrases.php:664
|
3867 |
msgid "Topic first post data not found."
|
3868 |
msgstr ""
|
3869 |
|
3870 |
+
#: wpf-includes/wpf-phrases.php:665
|
3871 |
msgid "Settings successfully updated"
|
3872 |
msgstr ""
|
3873 |
|
3874 |
+
#: wpf-includes/wpf-phrases.php:666
|
3875 |
msgid "Done!"
|
3876 |
msgstr ""
|
3877 |
|
3878 |
+
#: wpf-includes/wpf-phrases.php:667
|
3879 |
msgid "You are not allowed to attach this file type"
|
3880 |
msgstr ""
|
3881 |
|
3882 |
+
#: wpf-includes/wpf-phrases.php:668
|
3883 |
msgid "Post is empty"
|
3884 |
msgstr ""
|
3885 |
|
3886 |
+
#: wpf-includes/wpf-phrases.php:669
|
3887 |
msgid "removed link"
|
3888 |
msgstr ""
|
3889 |
|
3890 |
+
#: wpf-includes/wpf-phrases.php:670
|
3891 |
msgid "Submit"
|
3892 |
msgstr ""
|
3893 |
|
3894 |
+
#: wpf-includes/wpf-phrases.php:673
|
3895 |
msgid "Usergroup"
|
3896 |
msgstr ""
|
3897 |
|
3898 |
+
#: wpf-includes/wpf-phrases.php:674
|
3899 |
msgid "Rating Title"
|
3900 |
msgstr ""
|
3901 |
|
3902 |
+
#: wpf-includes/wpf-phrases.php:675
|
3903 |
msgid "User Title"
|
3904 |
msgstr ""
|
3905 |
|
3906 |
+
#: wpf-includes/wpf-phrases.php:676
|
3907 |
msgid "Anonymous"
|
3908 |
msgstr ""
|
3909 |
|
3910 |
+
#: wpf-includes/wpf-phrases.php:679
|
3911 |
msgid "approved"
|
3912 |
msgstr ""
|
3913 |
|
3914 |
+
#: wpf-includes/wpf-phrases.php:680
|
3915 |
msgid "unapproved"
|
3916 |
msgstr ""
|
3917 |
|
3918 |
+
#: wpf-includes/wpf-phrases.php:683
|
3919 |
msgid "--- Choose ---"
|
3920 |
msgstr ""
|
3921 |
|
3922 |
+
#: wpf-includes/wpf-phrases.php:684
|
3923 |
msgid "Required field"
|
3924 |
msgstr ""
|
3925 |
|
3926 |
+
#: wpf-includes/wpf-phrases.php:687
|
3927 |
msgid "Add Reply"
|
3928 |
msgstr ""
|
3929 |
|
3930 |
+
#: wpf-includes/wpf-phrases.php:688
|
3931 |
msgid "Forums RSS Feed"
|
3932 |
msgstr ""
|
3933 |
|
3934 |
+
#: wpf-includes/wpf-phrases.php:689
|
3935 |
msgid "Topics RSS Feed"
|
3936 |
msgstr ""
|
3937 |
|
3938 |
+
#: wpf-includes/wpf-phrases.php:690
|
3939 |
msgid "Find a member"
|
3940 |
msgstr ""
|
3941 |
|
3942 |
+
#: wpf-includes/wpf-phrases.php:691
|
3943 |
msgid "Display Name or Nicename"
|
3944 |
msgstr ""
|
3945 |
|
3946 |
+
#: wpf-includes/wpf-phrases.php:692
|
3947 |
msgid "Reset Search"
|
3948 |
msgstr ""
|
3949 |
|
3950 |
+
#: wpf-includes/wpf-phrases.php:693
|
3951 |
msgid "Reset Result"
|
3952 |
msgstr ""
|
3953 |
|
3954 |
+
#: wpf-includes/wpf-phrases.php:698
|
3955 |
msgid "Recent Posts"
|
3956 |
msgstr ""
|
3957 |
|
3958 |
+
#: wpf-includes/wpf-phrases.php:699
|
3959 |
msgid "No posts were found here"
|
3960 |
msgstr ""
|
3961 |
|
3962 |
+
#: wpf-includes/wpf-phrases.php:702
|
3963 |
+
msgid "forum link"
|
3964 |
+
msgstr ""
|
3965 |
+
|
3966 |
+
#: wpf-includes/wpf-phrases.php:703
|
3967 |
+
msgid "in forum"
|
3968 |
+
msgstr ""
|
3969 |
+
|
3970 |
+
#: wpf-includes/wpf-phrases.php:704
|
3971 |
+
msgid ""
|
3972 |
+
"You can mention a person using @nicename in post content to send that person "
|
3973 |
+
"an email message. When you post a topic or reply, forum sends an email "
|
3974 |
+
"message to the user letting them know that they have been mentioned on the "
|
3975 |
+
"post."
|
3976 |
+
msgstr ""
|
3977 |
+
|
3978 |
+
#: wpf-themes/classic/functions.php:39
|
3979 |
+
msgid "Extended Layout - Recent topics"
|
3980 |
+
msgstr ""
|
3981 |
+
|
3982 |
+
#: wpf-themes/classic/functions.php:48
|
3983 |
+
msgid "Extended Layout - Number of Recent topics"
|
3984 |
+
msgstr ""
|
3985 |
+
|
3986 |
+
#: wpf-themes/classic/functions.php:55
|
3987 |
+
msgid "Extended Layout - Recent topic length"
|
3988 |
+
msgstr ""
|
3989 |
+
|
3990 |
+
#: wpf-themes/classic/functions.php:56 wpf-themes/classic/functions.php:86
|
3991 |
+
msgid ""
|
3992 |
+
"Set this option value 0 if you want to show the whole title in recent topic "
|
3993 |
+
"area."
|
3994 |
+
msgstr ""
|
3995 |
+
|
3996 |
+
#: wpf-themes/classic/functions.php:69
|
3997 |
+
msgid "Q&A layout - Recent topics"
|
3998 |
+
msgstr ""
|
3999 |
+
|
4000 |
+
#: wpf-themes/classic/functions.php:78
|
4001 |
+
msgid "Q&A Layout - Number of Recent topics"
|
4002 |
+
msgstr ""
|
4003 |
+
|
4004 |
+
#: wpf-themes/classic/functions.php:85
|
4005 |
+
msgid "Q&A Layout - Recent topic length"
|
4006 |
+
msgstr ""
|
4007 |
+
|
4008 |
+
#: wpf-themes/classic/functions.php:107
|
4009 |
+
msgid "Extended Layout - Recent posts"
|
4010 |
+
msgstr ""
|
4011 |
+
|
4012 |
+
#: wpf-themes/classic/functions.php:117
|
4013 |
+
msgid "Extended Layout - Number of Recent posts"
|
4014 |
+
msgstr ""
|
4015 |
+
|
4016 |
+
#: wpf-themes/classic/functions.php:118
|
4017 |
+
msgid ""
|
4018 |
+
"Set this option value 0 if you want to show all posts in recent posts area."
|
4019 |
+
msgstr ""
|
4020 |
+
|
4021 |
+
#: wpf-themes/classic/functions.php:126
|
4022 |
+
msgid "Extended Layout - Recent post length"
|
4023 |
+
msgstr ""
|
4024 |
+
|
4025 |
+
#: wpf-themes/classic/functions.php:127
|
4026 |
+
msgid ""
|
4027 |
+
"Set this option value 0 if you want to show the whole post content in recent "
|
4028 |
+
"post area."
|
4029 |
+
msgstr ""
|
4030 |
+
|
4031 |
+
#: wpforo.php:174
|
4032 |
msgid "Discussion Board"
|
4033 |
msgstr ""
|
4034 |
|
4035 |
+
#: wpforo.php:595
|
4036 |
msgid ""
|
4037 |
"Allows to embed hundreds of video, social network, audio and photo content "
|
4038 |
"providers in forum topics and posts."
|
4039 |
msgstr ""
|
4040 |
|
4041 |
+
#: wpforo.php:596
|
4042 |
+
msgid ""
|
4043 |
+
"wpForo Polls is a complete addon to help forum members create, vote and "
|
4044 |
+
"manage polls effectively. Comes with poll specific permissions and settings."
|
4045 |
+
msgstr ""
|
4046 |
+
|
4047 |
+
#: wpforo.php:597
|
4048 |
+
msgid ""
|
4049 |
+
"Awords myCRED points for forum activity. Integrates myCRED Badges and Ranks. "
|
4050 |
+
"Converts wpForo topic and posts, likes to myCRED points."
|
4051 |
+
msgstr ""
|
4052 |
+
|
4053 |
+
#: wpforo.php:598
|
4054 |
msgid ""
|
4055 |
"Advanced user profile builder system. Allows to add new fields and manage "
|
4056 |
"profile page. Creates custom Registration, Account, Member Search forms."
|
4057 |
msgstr ""
|
4058 |
|
4059 |
+
#: wpforo.php:599
|
4060 |
msgid ""
|
4061 |
"Adds an advanced file attachment system to forum topics and posts. AJAX "
|
4062 |
"powered media uploading and displaying system with user specific library."
|
4063 |
msgstr ""
|
4064 |
|
4065 |
+
#: wpforo.php:600
|
4066 |
msgid ""
|
4067 |
"Blog to Forum and Forum to Blog content synchronization. Blog posts with "
|
4068 |
"Forum topics and Blog comments with Forum replies."
|
4069 |
msgstr ""
|
4070 |
|
4071 |
+
#: wpforo.php:601
|
4072 |
msgid ""
|
4073 |
"Provides a safe way to communicate directly with other members. Messages are "
|
4074 |
"private and can only be viewed by conversation participants."
|
4075 |
msgstr ""
|
4076 |
|
4077 |
+
#: wpforo.php:602
|
4078 |
msgid ""
|
4079 |
"Ads Manager is a powerful yet simple advertisement management system, that "
|
4080 |
"allows you to add adverting banners between forums, topics and posts."
|
4081 |
msgstr ""
|
4082 |
|
4083 |
#. Plugin Name of the plugin/theme
|
4084 |
+
msgid "wpForo"
|
4085 |
msgstr ""
|
4086 |
|
4087 |
#. Plugin URI of the plugin/theme
|
wpf-themes/classic/colors.css
CHANGED
@@ -206,8 +206,8 @@
|
|
206 |
#wpforo-wrap .wpfl-3 .wpforo-comment{ background-color:#ffffff; }
|
207 |
#wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right{ background:#f5f5f5; }
|
208 |
|
209 |
-
#wpforo-wrap .wpforo-profile-wrap .wpf-profile-plugin-menu .wpf-pp-menu .wpf-pp-menu-item{
|
210 |
-
#wpforo-wrap .wpforo-profile-wrap .wpf-profile-plugin-menu .wpf-pp-menu .wpf-pp-menu-item:hover{
|
211 |
#wpforo-wrap .wpforo-profile-wrap .wpf-profile-plugin-menu #wpf-pp-forum-menu .wpf-pp-menu-item{color:#43a6df; border-right:1px solid #43a6df;}
|
212 |
#wpforo-wrap .wpf-profile-section{color: #666666;}
|
213 |
#wpforo-wrap .wpf-profile-section .wpf-profile-section-head{border-bottom:1px solid #dadada;}
|
@@ -271,7 +271,8 @@
|
|
271 |
#wpforo-wrap .wpforo-members-wrap td.wpf-members-regdate-head{ border-bottom:1px solid #e6e6e6; }
|
272 |
#wpforo-wrap .wpforo-members-wrap td.wpf-members-foot { border-top:1px solid #e6e6e6; }
|
273 |
|
274 |
-
#wpforo-wrap .wpforo-register-wrap .wpforo-register-content { border-top:#e6e6e6 1px solid; border-bottom:#e6e6e6 1px solid; border-top:
|
|
|
275 |
|
276 |
#wpforo-wrap .wpforo-login-wrap .wpforo-login-content { border-top:#e6e6e6 1px solid; border-bottom:#e6e6e6 1px solid; }
|
277 |
#wpforo-wrap .wpforo-login-wrap td.wpf-login-label{ border-right:#ffffff 1px solid; border-bottom:#ffffff 1px solid; }
|
@@ -348,14 +349,13 @@
|
|
348 |
|
349 |
#wpf-msg-box a{color:#ffffff;}
|
350 |
#wpf-msg-box a:hover{color:#e6e6e6;}
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
.wpf-msg-box-triangle-right.success:after{border-color:transparent #00a636;}
|
359 |
|
360 |
#wpforo-wrap .wpf-field { border-bottom: 1px solid #ffffff;}
|
361 |
#wpforo-wrap .wpf-field .wpf-label i{ color: #777777; }
|
@@ -383,6 +383,8 @@
|
|
383 |
#wpforo-wrap .wpf-field .wpf-field-wrap i{}
|
384 |
#wpforo-wrap .wpf-field .wpf-field-required-icon{color: #ff812d;}
|
385 |
|
|
|
|
|
386 |
@media screen and (max-width:600px) {
|
387 |
#wpforo-wrap #wpforo-menu .wpf-menu{background-color:#555555;}
|
388 |
#wpforo-wrap .wpfl-1 .wpforo-post .wpf-right .wpforo-post-content-top{border-top: 1px solid #e6e6e6;}
|
@@ -421,7 +423,7 @@
|
|
421 |
#wpforo-wrap.wpf-dark #wpf-post-create{background-color:#f5f5f5}
|
422 |
#wpforo-wrap.wpf-dark #wpf-post-create div.mce-toolbar-grp{background-color:#f5f5f5}
|
423 |
#wpforo-wrap.wpf-dark input[type="submit"], #wpforo-wrap.wpf-dark input[type="button"]{color:#3f7796!important;}
|
424 |
-
#wpforo-wrap.wpf-dark input[type="text"], #wpforo-wrap.wpf-dark .wpf-
|
425 |
#wpforo-wrap.wpf-dark input[type="text"].wpf-search-field{background-color:transparent; color:#3f7796; }
|
426 |
#wpforo-wrap.wpf-dark .wpf-field input::-webkit-input-placeholder, #wpforo-wrap.wpf-dark .wpf-field textarea::-webkit-input-placeholder { color: #cccccc;}
|
427 |
#wpforo-wrap.wpf-dark .wpf-field input::-moz-placeholder, #wpforo-wrap.wpf-dark .wpf-field textarea::-moz-placeholder {color: #cccccc;}
|
@@ -434,6 +436,13 @@
|
|
434 |
#wpforo-wrap.wpf-dark .wpf-field:nth-child(even) {background-color: #f5f5f5;}
|
435 |
#wpforo-wrap.wpf-dark .wpf-field .wpf-field-wrap { color:#777777}
|
436 |
#wpforo-wrap.wpf-dark .wpf-field .wpf-field-wrap i{ color:#cccccc}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
437 |
|
438 |
#wpforo-wrap {
|
439 |
font-size: 13px; width: 100%; padding:10px 20px; margin:0px;
|
206 |
#wpforo-wrap .wpfl-3 .wpforo-comment{ background-color:#ffffff; }
|
207 |
#wpforo-wrap .wpfl-3 .wpforo-comment .wpf-right{ background:#f5f5f5; }
|
208 |
|
209 |
+
#wpforo-wrap .wpforo-profile-wrap .wpf-profile-plugin-menu .wpf-pp-menu .wpf-pp-menu-item{background:#ffffff; color: #777777; }
|
210 |
+
#wpforo-wrap .wpforo-profile-wrap .wpf-profile-plugin-menu .wpf-pp-menu .wpf-pp-menu-item:hover{background:#ffffff; color: #43a6df;}
|
211 |
#wpforo-wrap .wpforo-profile-wrap .wpf-profile-plugin-menu #wpf-pp-forum-menu .wpf-pp-menu-item{color:#43a6df; border-right:1px solid #43a6df;}
|
212 |
#wpforo-wrap .wpf-profile-section{color: #666666;}
|
213 |
#wpforo-wrap .wpf-profile-section .wpf-profile-section-head{border-bottom:1px solid #dadada;}
|
271 |
#wpforo-wrap .wpforo-members-wrap td.wpf-members-regdate-head{ border-bottom:1px solid #e6e6e6; }
|
272 |
#wpforo-wrap .wpforo-members-wrap td.wpf-members-foot { border-top:1px solid #e6e6e6; }
|
273 |
|
274 |
+
#wpforo-wrap .wpforo-register-wrap .wpforo-register-content { border-top:#e6e6e6 1px solid; border-bottom:#e6e6e6 1px solid; border-top: 35px solid #cccccc!important; border-bottom: 2px solid #cccccc!important; }
|
275 |
+
#wpforo-wrap .wpforo-login-wrap .wpforo-login-content { border-top:#e6e6e6 1px solid; border-bottom:#e6e6e6 1px solid; border-top: 35px solid #cccccc!important; border-bottom: 2px solid #cccccc!important; }
|
276 |
|
277 |
#wpforo-wrap .wpforo-login-wrap .wpforo-login-content { border-top:#e6e6e6 1px solid; border-bottom:#e6e6e6 1px solid; }
|
278 |
#wpforo-wrap .wpforo-login-wrap td.wpf-login-label{ border-right:#ffffff 1px solid; border-bottom:#ffffff 1px solid; }
|
349 |
|
350 |
#wpf-msg-box a{color:#ffffff;}
|
351 |
#wpf-msg-box a:hover{color:#e6e6e6;}
|
352 |
+
#wpf-msg-box > p{color:#ffffff!important;background-color:#43a6df;background:-moz-linear-gradient(#43a6df);background:-o-linear-gradient(#43a6df);background:linear-gradient(#43a6df);}
|
353 |
+
#wpf-msg-box > p:after{border-color:transparent #43a6df;}
|
354 |
+
|
355 |
+
#wpf-msg-box > p.error{background-color:#f46464;background:-moz-linear-gradient(#f46464);background:-o-linear-gradient(#f46464);background:linear-gradient(#f46464);}
|
356 |
+
#wpf-msg-box > p.error:after{border-color:transparent #f46464;}
|
357 |
+
#wpf-msg-box > p.success{background-color:#00a636;background:-moz-linear-gradient(#00a636);background:-o-linear-gradient(#00a636);background:linear-gradient(#00a636);}
|
358 |
+
#wpf-msg-box > p.success:after{border-color:transparent #00a636;}
|
|
|
359 |
|
360 |
#wpforo-wrap .wpf-field { border-bottom: 1px solid #ffffff;}
|
361 |
#wpforo-wrap .wpf-field .wpf-label i{ color: #777777; }
|
383 |
#wpforo-wrap .wpf-field .wpf-field-wrap i{}
|
384 |
#wpforo-wrap .wpf-field .wpf-field-required-icon{color: #ff812d;}
|
385 |
|
386 |
+
#wpforo-wrap .wpf-table .wpfw-1 .wpf-field:nth-child(even) {background-color: #eeeeee;}
|
387 |
+
|
388 |
@media screen and (max-width:600px) {
|
389 |
#wpforo-wrap #wpforo-menu .wpf-menu{background-color:#555555;}
|
390 |
#wpforo-wrap .wpfl-1 .wpforo-post .wpf-right .wpforo-post-content-top{border-top: 1px solid #e6e6e6;}
|
423 |
#wpforo-wrap.wpf-dark #wpf-post-create{background-color:#f5f5f5}
|
424 |
#wpforo-wrap.wpf-dark #wpf-post-create div.mce-toolbar-grp{background-color:#f5f5f5}
|
425 |
#wpforo-wrap.wpf-dark input[type="submit"], #wpforo-wrap.wpf-dark input[type="button"]{color:#3f7796!important;}
|
426 |
+
#wpforo-wrap.wpf-dark input[type="text"], #wpforo-wrap.wpf-dark input[type="search"], #wpforo-wrap.wpf-dark input[type="email"], #wpforo-wrap.wpf-dark input[type="date"], #wpforo-wrap.wpf-dark input[type="number"], #wpforo-wrap.wpf-dark input[type="url"], #wpforo-wrap.wpf-dark input[type="tel"], #wpforo-wrap.wpf-dark input[type="password"], #wpforo-wrap.wpf-dark input[type="email"], #wpforo-wrap.wpf-dark textarea, #wpforo-wrap.wpf-dark select{color:#555555;background-color:#333333;}
|
427 |
#wpforo-wrap.wpf-dark input[type="text"].wpf-search-field{background-color:transparent; color:#3f7796; }
|
428 |
#wpforo-wrap.wpf-dark .wpf-field input::-webkit-input-placeholder, #wpforo-wrap.wpf-dark .wpf-field textarea::-webkit-input-placeholder { color: #cccccc;}
|
429 |
#wpforo-wrap.wpf-dark .wpf-field input::-moz-placeholder, #wpforo-wrap.wpf-dark .wpf-field textarea::-moz-placeholder {color: #cccccc;}
|
436 |
#wpforo-wrap.wpf-dark .wpf-field:nth-child(even) {background-color: #f5f5f5;}
|
437 |
#wpforo-wrap.wpf-dark .wpf-field .wpf-field-wrap { color:#777777}
|
438 |
#wpforo-wrap.wpf-dark .wpf-field .wpf-field-wrap i{ color:#cccccc}
|
439 |
+
#wpforo-wrap.wpf-dark .wpf-table .wpfw-1 .wpf-field:nth-child(even) {background-color: #cccccc;}
|
440 |
+
#wpforo-wrap .wpforo-login-wrap .wpforo-table .wpfw-1 .wpf-field:nth-child(even){background-color: transparent;}
|
441 |
+
#wpforo-wrap.wpf-dark .wpforo-profile-head .wpforo-active { color:#FFFFFF!important;}
|
442 |
+
#wpforo-wrap.wpf-dark. wpf-profile-section .wpf-statbox .wpf-statbox-value{color:#777777}
|
443 |
+
#wpforo-wrap.wpf-dark #wpf-post-create {border: none;}
|
444 |
+
#wpforo-wrap.wpf-dark #wpf-topic-create {border: none;}
|
445 |
+
#wpforo-wrap.wpf-dark #wpforo-description{color:#777777}
|
446 |
|
447 |
#wpforo-wrap {
|
448 |
font-size: 13px; width: 100%; padding:10px 20px; margin:0px;
|
wpf-themes/classic/footer.php
CHANGED
@@ -10,13 +10,13 @@
|
|
10 |
<div class="wpf-clear"></div>
|
11 |
|
12 |
<div id="wpforo-footer">
|
13 |
-
<?php do_action( 'wpforo_stat_bar_start',
|
14 |
-
<?php if( wpforo_feature('footer-stat'
|
15 |
<div id="wpforo-stat-header">
|
16 |
<i class="fa fa-bar-chart"></i> <span><?php wpforo_phrase('Forum Statistics') ?></span>
|
17 |
</div>
|
18 |
<div id="wpforo-stat-body">
|
19 |
-
<?php $stat =
|
20 |
<div class="wpforo-stat-table">
|
21 |
<div class="wpf-row wpf-stat-data">
|
22 |
<div class="wpf-stat-item">
|
@@ -69,12 +69,12 @@
|
|
69 |
</div>
|
70 |
</div>
|
71 |
<?php endif; ?>
|
72 |
-
<?php
|
73 |
-
<?php do_action( 'wpforo_stat_bar_end'
|
74 |
</div> <!-- wpforo-footer -->
|
75 |
|
76 |
<?php do_action( 'wpforo_bottom_hook' ) ?>
|
77 |
-
<?php wpforo_debug(
|
78 |
|
79 |
</div><!-- wpforo-wrap -->
|
80 |
|
@@ -84,5 +84,5 @@
|
|
84 |
</div>
|
85 |
|
86 |
<div id="wpf-msg-box">
|
87 |
-
<p
|
88 |
</div>
|
10 |
<div class="wpf-clear"></div>
|
11 |
|
12 |
<div id="wpforo-footer">
|
13 |
+
<?php do_action( 'wpforo_stat_bar_start', WPF() ); ?>
|
14 |
+
<?php if( wpforo_feature('footer-stat') ): ?>
|
15 |
<div id="wpforo-stat-header">
|
16 |
<i class="fa fa-bar-chart"></i> <span><?php wpforo_phrase('Forum Statistics') ?></span>
|
17 |
</div>
|
18 |
<div id="wpforo-stat-body">
|
19 |
+
<?php $stat = WPF()->statistic(); ?>
|
20 |
<div class="wpforo-stat-table">
|
21 |
<div class="wpf-row wpf-stat-data">
|
22 |
<div class="wpf-stat-item">
|
69 |
</div>
|
70 |
</div>
|
71 |
<?php endif; ?>
|
72 |
+
<?php WPF()->tpl->copyright() ?>
|
73 |
+
<?php do_action( 'wpforo_stat_bar_end'); ?>
|
74 |
</div> <!-- wpforo-footer -->
|
75 |
|
76 |
<?php do_action( 'wpforo_bottom_hook' ) ?>
|
77 |
+
<?php wpforo_debug(); ?>
|
78 |
|
79 |
</div><!-- wpforo-wrap -->
|
80 |
|
84 |
</div>
|
85 |
|
86 |
<div id="wpf-msg-box">
|
87 |
+
<p><?php echo sprintf( wpforo_phrase('Please %s or %s', FALSE), '<a href="' . wpforo_login_url() . '">'.wpforo_phrase('Login', FALSE).'</a>', '<a href="' . wpforo_register_url() . '">'.wpforo_phrase('Register', FALSE).'</a>' ) ?></p>
|
88 |
</div>
|
wpf-themes/classic/functions.php
CHANGED
@@ -10,7 +10,6 @@
|
|
10 |
*/
|
11 |
|
12 |
function wpforo_classic_wpforo_frontend_enqueue(){
|
13 |
-
global $wpforo;
|
14 |
if(function_exists('is_wpforo_page')){
|
15 |
if(is_wpforo_page()){
|
16 |
wp_register_style( 'wpforo-uidialog-style', WPFORO_URL . '/wpf-assets/css/jquery-ui.css', false, WPFORO_VERSION );
|
@@ -29,47 +28,65 @@ function wpforo_classic_wpforo_frontend_enqueue(){
|
|
29 |
}
|
30 |
add_action('wp_enqueue_scripts', 'wpforo_classic_wpforo_frontend_enqueue', 11);
|
31 |
|
32 |
-
function wpforo_classic_forum_options(
|
33 |
?>
|
34 |
-
<?php if(
|
35 |
<?php
|
36 |
-
if(!isset(
|
37 |
-
if(!isset(
|
38 |
?>
|
39 |
<tr>
|
40 |
-
<th><label><?php _e('Extended Layout -
|
41 |
<td>
|
42 |
<div class="wpf-switch-field">
|
43 |
-
<input id="show-tte" type="radio" name="wpforo_forum_options[layout_extended_intro_topics_toggle]" value="1" <?php wpfo_check(
|
44 |
-
<input id="hide-tte" type="radio" name="wpforo_forum_options[layout_extended_intro_topics_toggle]" value="0" <?php wpfo_check(
|
45 |
</div>
|
46 |
</td>
|
47 |
</tr>
|
48 |
<tr>
|
49 |
-
<th><label for="tdcs"><?php _e('Extended Layout - Number of
|
50 |
<td>
|
51 |
-
<input id="tdcs" name="wpforo_forum_options[layout_extended_intro_topics_count]" type="number" min="0" value="<?php wpfo(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
</td>
|
53 |
</tr>
|
54 |
<?php endif; ?>
|
55 |
-
<?php if(
|
56 |
<?php
|
57 |
-
if(!isset(
|
58 |
-
if(!isset(
|
59 |
?>
|
60 |
<tr>
|
61 |
-
<th><label><?php _e('Q&A layout -
|
62 |
<td>
|
63 |
<div class="wpf-switch-field">
|
64 |
-
<input id="show-ttq" type="radio" name="wpforo_forum_options[layout_qa_intro_topics_toggle]" value="1" <?php wpfo_check(
|
65 |
-
<input id="hide-ttq" type="radio" name="wpforo_forum_options[layout_qa_intro_topics_toggle]" value="0" <?php wpfo_check(
|
66 |
</div>
|
67 |
</td>
|
68 |
</tr>
|
69 |
<tr>
|
70 |
-
<th><label for="tdcq"><?php _e('Q&A Layout - Number of
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
71 |
<td>
|
72 |
-
<input id="tdcq" name="wpforo_forum_options[
|
73 |
</td>
|
74 |
</tr>
|
75 |
<?php endif; ?>
|
@@ -79,29 +96,38 @@ add_action('wpforo_settings_forums', 'wpforo_classic_forum_options');
|
|
79 |
|
80 |
|
81 |
|
82 |
-
function wpforo_classic_post_options(
|
83 |
?>
|
84 |
-
<?php if(
|
85 |
<?php
|
86 |
-
if(!isset(
|
87 |
-
if(!isset(
|
88 |
?>
|
89 |
<tr>
|
90 |
-
<th><label><?php _e('Extended Layout -
|
91 |
<td>
|
92 |
<div class="wpf-switch-field">
|
93 |
-
<input id="show-tte" type="radio" name="wpforo_post_options[layout_extended_intro_posts_toggle]" value="1" <?php wpfo_check(
|
94 |
-
<input id="hide-tte" type="radio" name="wpforo_post_options[layout_extended_intro_posts_toggle]" value="0" <?php wpfo_check(
|
95 |
</div>
|
96 |
</td>
|
97 |
</tr>
|
98 |
<tr>
|
99 |
<th>
|
100 |
-
<label for="tdcs"><?php _e('Extended Layout - Number of
|
101 |
-
<p class="wpf-info"><?php _e('Set this option value 0 if you want to show all posts
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
</th>
|
103 |
<td>
|
104 |
-
<input id="tdcs" name="wpforo_post_options[
|
105 |
</td>
|
106 |
</tr>
|
107 |
<?php endif; ?>
|
@@ -112,8 +138,7 @@ add_action('wpforo_settings_post_top', 'wpforo_classic_post_options');
|
|
112 |
|
113 |
|
114 |
function wpforo_classic_reply_form_head($string, $args){
|
115 |
-
|
116 |
-
if( $wpforo->tpl->layout_exists(3) ){
|
117 |
if( $args['layout'] == 3 ){
|
118 |
$string = preg_replace('|(<p[^><]*id="wpf-reply-form-title"[^><]*>)(.+?)(</p>)|is', '$1'.wpforo_phrase('Your Answer', false, 'default').'$3', $string);
|
119 |
}
|
@@ -125,8 +150,7 @@ add_filter('wpforo_reply_form_head', 'wpforo_classic_reply_form_head', 1, 2);
|
|
125 |
|
126 |
|
127 |
function wpforo_classic_reply_form_field_title($string, $args){
|
128 |
-
|
129 |
-
if( $wpforo->tpl->layout_exists(3) ){
|
130 |
if( $args['layout'] == 3 ){
|
131 |
$string = preg_replace('|[^\:]+\:|is', wpforo_phrase('Answer to', false, 'default') . ':', $string);
|
132 |
}
|
@@ -135,9 +159,8 @@ function wpforo_classic_reply_form_field_title($string, $args){
|
|
135 |
}
|
136 |
add_filter('wpforo_reply_form_field_title', 'wpforo_classic_reply_form_field_title', 1, 2);
|
137 |
|
138 |
-
function wpforo_classic_dark_class(
|
139 |
-
if(
|
140 |
-
if(isset($wpforo->tpl->options['style'])) echo 'wpf-' . esc_attr($wpforo->tpl->options['style']);
|
141 |
}
|
142 |
|
143 |
add_action('wpforo_wrap_class', 'wpforo_classic_dark_class');
|
10 |
*/
|
11 |
|
12 |
function wpforo_classic_wpforo_frontend_enqueue(){
|
|
|
13 |
if(function_exists('is_wpforo_page')){
|
14 |
if(is_wpforo_page()){
|
15 |
wp_register_style( 'wpforo-uidialog-style', WPFORO_URL . '/wpf-assets/css/jquery-ui.css', false, WPFORO_VERSION );
|
28 |
}
|
29 |
add_action('wp_enqueue_scripts', 'wpforo_classic_wpforo_frontend_enqueue', 11);
|
30 |
|
31 |
+
function wpforo_classic_forum_options(){
|
32 |
?>
|
33 |
+
<?php if(WPF()->tpl->layout_exists(1)): ?>
|
34 |
<?php
|
35 |
+
if(!isset(WPF()->forum->options['layout_extended_intro_topics_toggle'])) WPF()->forum->options['layout_extended_intro_topics_toggle'] = 1;
|
36 |
+
if(!isset(WPF()->forum->options['layout_extended_intro_topics_count'])) WPF()->forum->options['layout_extended_intro_topics_count'] = 3;
|
37 |
?>
|
38 |
<tr>
|
39 |
+
<th><label><?php _e('Extended Layout - Recent topics','wpforo'); ?>:</label></th>
|
40 |
<td>
|
41 |
<div class="wpf-switch-field">
|
42 |
+
<input id="show-tte" type="radio" name="wpforo_forum_options[layout_extended_intro_topics_toggle]" value="1" <?php wpfo_check(WPF()->forum->options['layout_extended_intro_topics_toggle'], 1); ?>/><label for="show-tte"><?php _e('Expanded','wpforo'); ?></label>
|
43 |
+
<input id="hide-tte" type="radio" name="wpforo_forum_options[layout_extended_intro_topics_toggle]" value="0" <?php wpfo_check(WPF()->forum->options['layout_extended_intro_topics_toggle'], 0); ?>/><label for="hide-tte"><?php _e('Collapsed','wpforo'); ?></label>
|
44 |
</div>
|
45 |
</td>
|
46 |
</tr>
|
47 |
<tr>
|
48 |
+
<th><label for="tdcs"><?php _e('Extended Layout - Number of Recent topics','wpforo'); ?>:</label></th>
|
49 |
<td>
|
50 |
+
<input id="tdcs" name="wpforo_forum_options[layout_extended_intro_topics_count]" type="number" min="0" value="<?php wpfo( WPF()->forum->options['layout_extended_intro_topics_count'] ) ?>" class="wpf-field-small" />
|
51 |
+
</td>
|
52 |
+
</tr>
|
53 |
+
<tr>
|
54 |
+
<th>
|
55 |
+
<label for="tdcs"><?php _e('Extended Layout - Recent topic length','wpforo'); ?>:</label>
|
56 |
+
<p class="wpf-info"><?php _e('Set this option value 0 if you want to show the whole title in recent topic area.','wpforo'); ?></p>
|
57 |
+
</th>
|
58 |
+
<td>
|
59 |
+
<input id="tdcs" name="wpforo_forum_options[layout_extended_intro_topics_length]" type="number" min="0" value="<?php wpfo( WPF()->forum->options['layout_extended_intro_topics_length'] ) ?>" class="wpf-field-small" />
|
60 |
</td>
|
61 |
</tr>
|
62 |
<?php endif; ?>
|
63 |
+
<?php if(WPF()->tpl->layout_exists(3)): ?>
|
64 |
<?php
|
65 |
+
if(!isset(WPF()->forum->options['layout_qa_intro_topics_toggle'])) WPF()->forum->options['layout_qa_intro_topics_toggle'] = 1;
|
66 |
+
if(!isset(WPF()->forum->options['layout_qa_intro_topics_count'])) WPF()->forum->options['layout_qa_intro_topics_count'] = 3;
|
67 |
?>
|
68 |
<tr>
|
69 |
+
<th><label><?php _e('Q&A layout - Recent topics','wpforo'); ?>:</label></th>
|
70 |
<td>
|
71 |
<div class="wpf-switch-field">
|
72 |
+
<input id="show-ttq" type="radio" name="wpforo_forum_options[layout_qa_intro_topics_toggle]" value="1" <?php wpfo_check(WPF()->forum->options['layout_qa_intro_topics_toggle'], 1); ?>/><label for="show-ttq"><?php _e('Expanded','wpforo'); ?></label>
|
73 |
+
<input id="hide-ttq" type="radio" name="wpforo_forum_options[layout_qa_intro_topics_toggle]" value="0" <?php wpfo_check(WPF()->forum->options['layout_qa_intro_topics_toggle'], 0); ?>/><label for="hide-ttq"><?php _e('Collapsed','wpforo'); ?></label>
|
74 |
</div>
|
75 |
</td>
|
76 |
</tr>
|
77 |
<tr>
|
78 |
+
<th><label for="tdcq"><?php _e('Q&A Layout - Number of Recent topics','wpforo'); ?>:</label></th>
|
79 |
+
<td>
|
80 |
+
<input id="tdcq" name="wpforo_forum_options[layout_qa_intro_topics_count]" type="number" min="0" value="<?php wpfo( WPF()->forum->options['layout_qa_intro_topics_count'] ) ?>" class="wpf-field-small" />
|
81 |
+
</td>
|
82 |
+
</tr>
|
83 |
+
<tr>
|
84 |
+
<th>
|
85 |
+
<label for="tdcq"><?php _e('Q&A Layout - Recent topic length','wpforo'); ?>:</label>
|
86 |
+
<p class="wpf-info"><?php _e('Set this option value 0 if you want to show the whole title in recent topic area.','wpforo'); ?></p>
|
87 |
+
</th>
|
88 |
<td>
|
89 |
+
<input id="tdcq" name="wpforo_forum_options[layout_qa_intro_topics_length]" type="number" min="0" value="<?php wpfo( WPF()->forum->options['layout_qa_intro_topics_length'] ) ?>" class="wpf-field-small" />
|
90 |
</td>
|
91 |
</tr>
|
92 |
<?php endif; ?>
|
96 |
|
97 |
|
98 |
|
99 |
+
function wpforo_classic_post_options(){
|
100 |
?>
|
101 |
+
<?php if(WPF()->tpl->layout_exists(1)): ?>
|
102 |
<?php
|
103 |
+
if(!isset(WPF()->post->options['layout_extended_intro_posts_toggle'])) WPF()->post->options['layout_extended_intro_posts_toggle'] = 1;
|
104 |
+
if(!isset(WPF()->post->options['layout_extended_intro_posts_count'])) WPF()->post->options['layout_extended_intro_posts_count'] = 4;
|
105 |
?>
|
106 |
<tr>
|
107 |
+
<th><label><?php _e('Extended Layout - Recent posts','wpforo'); ?></label></th>
|
108 |
<td>
|
109 |
<div class="wpf-switch-field">
|
110 |
+
<input id="show-tte" type="radio" name="wpforo_post_options[layout_extended_intro_posts_toggle]" value="1" <?php wpfo_check(WPF()->post->options['layout_extended_intro_posts_toggle'], 1); ?>/><label for="show-tte"><?php _e('Expanded','wpforo'); ?></label>
|
111 |
+
<input id="hide-tte" type="radio" name="wpforo_post_options[layout_extended_intro_posts_toggle]" value="0" <?php wpfo_check(WPF()->post->options['layout_extended_intro_posts_toggle'], 0); ?>/><label for="hide-tte"><?php _e('Collapsed','wpforo'); ?></label>
|
112 |
</div>
|
113 |
</td>
|
114 |
</tr>
|
115 |
<tr>
|
116 |
<th>
|
117 |
+
<label for="tdcs"><?php _e('Extended Layout - Number of Recent posts','wpforo'); ?></label>
|
118 |
+
<p class="wpf-info"><?php _e('Set this option value 0 if you want to show all posts in recent posts area.','wpforo'); ?></p>
|
119 |
+
</th>
|
120 |
+
<td>
|
121 |
+
<input id="tdcs" name="wpforo_post_options[layout_extended_intro_posts_count]" type="number" min="0" value="<?php wpfo( WPF()->post->options['layout_extended_intro_posts_count'] ) ?>" class="wpf-field-small" />
|
122 |
+
</td>
|
123 |
+
</tr>
|
124 |
+
<tr>
|
125 |
+
<th>
|
126 |
+
<label for="tdcs"><?php _e('Extended Layout - Recent post length','wpforo'); ?></label>
|
127 |
+
<p class="wpf-info"><?php _e('Set this option value 0 if you want to show the whole post content in recent post area.','wpforo'); ?></p>
|
128 |
</th>
|
129 |
<td>
|
130 |
+
<input id="tdcs" name="wpforo_post_options[layout_extended_intro_posts_length]" type="number" min="0" value="<?php wpfo( WPF()->post->options['layout_extended_intro_posts_length'] ) ?>" class="wpf-field-small" />
|
131 |
</td>
|
132 |
</tr>
|
133 |
<?php endif; ?>
|
138 |
|
139 |
|
140 |
function wpforo_classic_reply_form_head($string, $args){
|
141 |
+
if( WPF()->tpl->layout_exists(3) ){
|
|
|
142 |
if( $args['layout'] == 3 ){
|
143 |
$string = preg_replace('|(<p[^><]*id="wpf-reply-form-title"[^><]*>)(.+?)(</p>)|is', '$1'.wpforo_phrase('Your Answer', false, 'default').'$3', $string);
|
144 |
}
|
150 |
|
151 |
|
152 |
function wpforo_classic_reply_form_field_title($string, $args){
|
153 |
+
if( WPF()->tpl->layout_exists(3) ){
|
|
|
154 |
if( $args['layout'] == 3 ){
|
155 |
$string = preg_replace('|[^\:]+\:|is', wpforo_phrase('Answer to', false, 'default') . ':', $string);
|
156 |
}
|
159 |
}
|
160 |
add_filter('wpforo_reply_form_field_title', 'wpforo_classic_reply_form_field_title', 1, 2);
|
161 |
|
162 |
+
function wpforo_classic_dark_class(){
|
163 |
+
if(isset(WPF()->tpl->options['style'])) echo 'wpf-' . esc_attr(WPF()->tpl->options['style']);
|
|
|
164 |
}
|
165 |
|
166 |
add_action('wpforo_wrap_class', 'wpforo_classic_dark_class');
|
wpf-themes/classic/header.php
CHANGED
@@ -3,33 +3,33 @@
|
|
3 |
if( !defined( 'ABSPATH' ) ) exit;
|
4 |
?>
|
5 |
|
6 |
-
<div id="wpforo-wrap" class="<?php do_action(
|
7 |
|
8 |
<?php do_action( 'wpforo_top_hook' ); ?>
|
9 |
|
10 |
-
<?php if( wpforo_feature('top-bar'
|
11 |
<div id="wpforo-menu" style="display:table; width:100%;">
|
12 |
-
<?php do_action( 'wpforo_menu_bar_start'
|
13 |
<div class="wpf-left" style="display:table-cell">
|
14 |
-
<?php if(
|
15 |
<span class="wpf-res-menu"><i class="fa fa-bars"></i></span>
|
16 |
-
<?php
|
17 |
<?php endif; ?>
|
18 |
</div>
|
19 |
<div class="wpf-right wpf-search" style="display:table-cell; text-align:right; position:relative;">
|
20 |
-
<?php if( wpforo_feature('top-bar-search'
|
21 |
<form action="<?php echo wpforo_home_url() ?>" method="get">
|
22 |
<?php wpforo_make_hidden_fields_from_url( wpforo_home_url() ) ?>
|
23 |
<i class="fa fa-search"></i><input class="wpf-search-field" name="wpfs" type="text" value="" style="margin-right:10px;" />
|
24 |
</form>
|
25 |
<?php endif; ?>
|
26 |
</div>
|
27 |
-
<?php do_action(
|
28 |
</div>
|
29 |
<?php endif; ?>
|
30 |
|
31 |
-
<?php if( wpforo_feature('breadcrumb'
|
32 |
-
<?php
|
33 |
<?php endif; ?>
|
34 |
|
35 |
<?php do_action( 'wpforo_header_hook' ); ?>
|
3 |
if( !defined( 'ABSPATH' ) ) exit;
|
4 |
?>
|
5 |
|
6 |
+
<div id="wpforo-wrap" class="<?php do_action('wpforo_wrap_class'); ?>">
|
7 |
|
8 |
<?php do_action( 'wpforo_top_hook' ); ?>
|
9 |
|
10 |
+
<?php if( wpforo_feature('top-bar') ): ?>
|
11 |
<div id="wpforo-menu" style="display:table; width:100%;">
|
12 |
+
<?php do_action( 'wpforo_menu_bar_start' ); ?>
|
13 |
<div class="wpf-left" style="display:table-cell">
|
14 |
+
<?php if(WPF()->tpl->has_menu()): ?>
|
15 |
<span class="wpf-res-menu"><i class="fa fa-bars"></i></span>
|
16 |
+
<?php WPF()->tpl->nav_menu() ?>
|
17 |
<?php endif; ?>
|
18 |
</div>
|
19 |
<div class="wpf-right wpf-search" style="display:table-cell; text-align:right; position:relative;">
|
20 |
+
<?php if( wpforo_feature('top-bar-search') ): ?>
|
21 |
<form action="<?php echo wpforo_home_url() ?>" method="get">
|
22 |
<?php wpforo_make_hidden_fields_from_url( wpforo_home_url() ) ?>
|
23 |
<i class="fa fa-search"></i><input class="wpf-search-field" name="wpfs" type="text" value="" style="margin-right:10px;" />
|
24 |
</form>
|
25 |
<?php endif; ?>
|
26 |
</div>
|
27 |
+
<?php do_action('wpforo_menu_bar_end'); ?>
|
28 |
</div>
|
29 |
<?php endif; ?>
|
30 |
|
31 |
+
<?php if( wpforo_feature('breadcrumb') ): ?>
|
32 |
+
<?php WPF()->tpl->breadcrumb(WPF()->current_object) ?>
|
33 |
<?php endif; ?>
|
34 |
|
35 |
<?php do_action( 'wpforo_header_hook' ); ?>
|
wpf-themes/classic/index.php
CHANGED
@@ -7,12 +7,13 @@
|
|
7 |
* Template Name: WpForo Index (Forums List)
|
8 |
*/
|
9 |
?>
|
10 |
-
<?php if(
|
11 |
-
<?php extract(
|
12 |
<?php include("header.php"); ?>
|
13 |
-
<div class="wpforo-main">
|
14 |
<div class="wpforo-content"<?php echo is_active_sidebar('forum-sidebar') ? '' : 'style="width:100%"' ?>>
|
15 |
-
|
|
|
16 |
<p class="wpf-p-error"><?php wpforo_phrase('You have been banned. Please contact to forum administrators for more information.') ?></p>
|
17 |
<?php else : ?>
|
18 |
<?php
|
@@ -31,11 +32,11 @@
|
|
31 |
}elseif($template == 'members'){
|
32 |
if( !empty($_GET['_wpfms']) ){
|
33 |
$users_include = array();
|
34 |
-
$search_fields_names =
|
35 |
|
36 |
$wpfms = (isset($_GET['wpfms'])) ? sanitize_text_field($_GET['wpfms']) : '';
|
37 |
if($wpfms){
|
38 |
-
$users_include =
|
39 |
}else{
|
40 |
if( $filters = array_filter($_GET) ){
|
41 |
$args = array();
|
@@ -44,40 +45,40 @@
|
|
44 |
$args[$filter_key] = $filter;
|
45 |
}
|
46 |
}
|
47 |
-
$users_include =
|
48 |
}
|
49 |
}
|
50 |
|
51 |
$users_include = apply_filters('wpforo_member_search_users_include', $users_include);
|
52 |
}
|
53 |
$args = array(
|
54 |
-
'offset' => ($paged - 1) *
|
55 |
-
'row_count' =>
|
56 |
'orderby' => 'posts',
|
57 |
'order' => 'DESC'
|
58 |
);
|
59 |
if(!empty($users_include)) $args['include'] = $users_include;
|
60 |
$items_count = 0;
|
61 |
-
$members =
|
62 |
if(isset($users_include) && empty($users_include)){ $members = array(); $items_count = 0; }
|
63 |
|
64 |
include( wpftpl('members.php') );
|
65 |
-
}elseif( isset(
|
66 |
include( wpftpl('profile.php') );
|
67 |
}else{
|
68 |
if( $template == 'forum' || $template == 'topic' ) : ?>
|
69 |
<?php if(!isset($forum_slug)) : ?>
|
70 |
<h1 id="wpforo-title">
|
71 |
-
<?php echo esc_html(
|
72 |
-
<?php if( wpforo_feature('rss-feed'
|
73 |
<div class="wpforo-feed">
|
74 |
<span class="wpf-feed-forums">
|
75 |
-
<a href="<?php
|
76 |
<span><?php wpforo_phrase('Forums') ?></span> <i class="fa fa-rss fa-0x"></i>
|
77 |
</a>
|
78 |
</span><sep> | </sep>
|
79 |
<span class="wpf-feed-topics">
|
80 |
-
<a href="<?php
|
81 |
<span><?php wpforo_phrase('Topics') ?></span> <i class="fa fa-rss fa-0x"></i>
|
82 |
</a>
|
83 |
</span>
|
@@ -85,13 +86,13 @@
|
|
85 |
<?php endif; ?>
|
86 |
</h1>
|
87 |
<?php endif; ?>
|
88 |
-
<?php $cats =
|
89 |
|
90 |
<?php if(is_array($cats) && !empty($cats)) : ?>
|
91 |
|
92 |
<?php foreach($cats as $key => $cat) : ?>
|
93 |
-
<?php if(
|
94 |
-
<?php $forums =
|
95 |
<?php if(is_array($forums) && !empty($forums)) : ?>
|
96 |
<?php do_action( 'wpforo_category_loop_start', $cat, $key ) ?>
|
97 |
<?php include( wpftpl('layouts/'.($cat['cat_layout'] ? $cat['cat_layout'] : 1).'/forum.php') ); ?>
|
@@ -112,11 +113,11 @@
|
|
112 |
|
113 |
<?php if( isset($forum_slug) && $forum_slug ) : ?>
|
114 |
|
115 |
-
<?php $forum =
|
116 |
|
117 |
<?php if(is_array($forum) && !empty($forum)) : ?>
|
118 |
|
119 |
-
<?php if(
|
120 |
|
121 |
<div class="wpf-head-bar">
|
122 |
<div class="wpf-head-bar-left">
|
@@ -127,48 +128,48 @@
|
|
127 |
<div class="wpf-action-link">
|
128 |
<?php if ( is_user_logged_in() ): ?>
|
129 |
<?php
|
130 |
-
$args = array( "userid" =>
|
131 |
-
$subscribe =
|
132 |
if( isset( $subscribe['subid'] ) ): ?>
|
133 |
<span class="wpf-unsubscribe-forum wpf-action" id="wpfsubscribe-<?php echo intval($forum['forumid']) ?>"><?php wpforo_phrase('Unsubscribe') ?></span>
|
134 |
<?php else: ?>
|
135 |
<span class="wpf-subscribe-forum wpf-action" id="wpfsubscribe-<?php echo intval($forum['forumid']) ?>"><?php wpforo_phrase('Subscribe for new topics') ?></span>
|
136 |
<?php endif; ?>
|
137 |
<?php endif; ?>
|
138 |
-
<?php if( wpforo_feature('rss-feed'
|
139 |
-
<span class="wpf-feed">| <a href="<?php
|
140 |
<?php endif; ?>
|
141 |
</div>
|
142 |
</div>
|
143 |
-
<?php if(
|
144 |
<div class="wpf-head-bar-right"><button class="wpf-button" id="add_wpftopic"><?php wpforo_phrase('Add topic') ?></button></div>
|
145 |
-
<?php elseif(
|
146 |
<div class="wpf-head-bar-right"><button class="wpf-button not_reg_user" id="add_wpftopic"><?php wpforo_phrase('Add topic') ?></button></div>
|
147 |
<?php endif; ?>
|
148 |
<div class="wpf-clear"></div>
|
149 |
</div>
|
150 |
|
151 |
-
<?php if( is_user_logged_in() &&
|
152 |
|
153 |
<?php
|
154 |
$args = array(
|
155 |
-
'offset' => ($paged - 1) *
|
156 |
-
'row_count' =>
|
157 |
'forumid' => $cat['forumid'],
|
158 |
'orderby' => 'type, modified',
|
159 |
'order' => 'DESC'
|
160 |
);
|
161 |
$items_count = 0;
|
162 |
-
$topics =
|
163 |
?>
|
164 |
|
165 |
<?php if( is_array($topics) && !empty($topics) ) : ?>
|
166 |
|
167 |
-
<?php
|
168 |
|
169 |
<?php include( wpftpl('layouts/'.($cat['cat_layout'] ? $cat['cat_layout'] : 1).'/topic.php') ); ?>
|
170 |
|
171 |
-
<?php
|
172 |
|
173 |
<?php else : ?>
|
174 |
<p class="wpf-p-error"><?php wpforo_phrase('No topics were found here') ?> </p>
|
@@ -191,34 +192,34 @@
|
|
191 |
<?php
|
192 |
if( is_array($forum) && !empty($forum) ) :
|
193 |
|
194 |
-
if(
|
195 |
|
196 |
if( is_array($topic) && !empty($topic) ) : ?>
|
197 |
|
198 |
-
<?php if( isset($topic['private']) && $topic['private'] && !wpforo_is_owner($topic['userid']) &&
|
199 |
<p class="wpf-p-error"><?php wpforo_phrase('Permission denied') ?></p>
|
200 |
<?php else: ?>
|
201 |
|
202 |
<?php
|
203 |
-
$cat_layout =
|
204 |
$args = array(
|
205 |
-
'offset' => ($paged - 1) *
|
206 |
-
'row_count' =>
|
207 |
'topicid' => $topic['topicid'],
|
208 |
'forumid' => $forum['forumid']
|
209 |
);
|
210 |
$items_count = 0;
|
211 |
-
$posts =
|
212 |
?>
|
213 |
|
214 |
<?php if( is_array($posts) && !empty($posts) ) : ?>
|
215 |
<div class="wpf-head-bar">
|
216 |
-
<h1 id="wpforo-title"><?php $icon_title =
|
217 |
<?php if ( is_user_logged_in() ): ?>
|
218 |
<div class="wpf-action-link">
|
219 |
<?php
|
220 |
-
$args = array( "userid" =>
|
221 |
-
$subscribe =
|
222 |
if( isset( $subscribe['subid'] ) ): ?>
|
223 |
<span class="wpf-unsubscribe-topic wpf-action" id="wpfsubscribe-<?php echo intval($topic['topicid']) ?>" ><?php wpforo_phrase('Unsubscribe') ?></span>
|
224 |
<?php else: ?>
|
@@ -228,11 +229,11 @@
|
|
228 |
<?php endif; ?>
|
229 |
</div>
|
230 |
|
231 |
-
<?php
|
232 |
|
233 |
<?php include( wpftpl('layouts/'.($cat_layout ? $cat_layout : 1).'/post.php') ); ?>
|
234 |
|
235 |
-
<?php
|
236 |
|
237 |
<?php
|
238 |
if(is_user_logged_in()){
|
@@ -243,7 +244,7 @@
|
|
243 |
"layout" => ($cat_layout ? $cat_layout : 1),
|
244 |
"topic_title" => $topic['title']
|
245 |
);
|
246 |
-
|
247 |
}
|
248 |
?>
|
249 |
<?php else : ?>
|
@@ -275,4 +276,4 @@
|
|
275 |
</div>
|
276 |
<?php include("footer.php") ?>
|
277 |
|
278 |
-
<?php if(
|
7 |
* Template Name: WpForo Index (Forums List)
|
8 |
*/
|
9 |
?>
|
10 |
+
<?php if( WPF()->use_home_url ) get_header(); ?>
|
11 |
+
<?php extract(WPF()->current_object, EXTR_OVERWRITE); ?>
|
12 |
<?php include("header.php"); ?>
|
13 |
+
<div class="wpforo-main <?php echo 'wpft-' . $template ?>">
|
14 |
<div class="wpforo-content"<?php echo is_active_sidebar('forum-sidebar') ? '' : 'style="width:100%"' ?>>
|
15 |
+
<?php do_action( 'wpforo_content_start' ); ?>
|
16 |
+
<?php if( WPF()->current_user_status == 'banned' || WPF()->current_user_status == 'trashed' ) : ?>
|
17 |
<p class="wpf-p-error"><?php wpforo_phrase('You have been banned. Please contact to forum administrators for more information.') ?></p>
|
18 |
<?php else : ?>
|
19 |
<?php
|
32 |
}elseif($template == 'members'){
|
33 |
if( !empty($_GET['_wpfms']) ){
|
34 |
$users_include = array();
|
35 |
+
$search_fields_names = WPF()->member->get_search_fields_names(true);
|
36 |
|
37 |
$wpfms = (isset($_GET['wpfms'])) ? sanitize_text_field($_GET['wpfms']) : '';
|
38 |
if($wpfms){
|
39 |
+
$users_include = WPF()->member->search($wpfms, $search_fields_names);
|
40 |
}else{
|
41 |
if( $filters = array_filter($_GET) ){
|
42 |
$args = array();
|
45 |
$args[$filter_key] = $filter;
|
46 |
}
|
47 |
}
|
48 |
+
$users_include = WPF()->member->filter($args);
|
49 |
}
|
50 |
}
|
51 |
|
52 |
$users_include = apply_filters('wpforo_member_search_users_include', $users_include);
|
53 |
}
|
54 |
$args = array(
|
55 |
+
'offset' => ($paged - 1) * WPF()->post->options['posts_per_page'],
|
56 |
+
'row_count' => WPF()->post->options['posts_per_page'],
|
57 |
'orderby' => 'posts',
|
58 |
'order' => 'DESC'
|
59 |
);
|
60 |
if(!empty($users_include)) $args['include'] = $users_include;
|
61 |
$items_count = 0;
|
62 |
+
$members = WPF()->member->get_members($args, $items_count);
|
63 |
if(isset($users_include) && empty($users_include)){ $members = array(); $items_count = 0; }
|
64 |
|
65 |
include( wpftpl('members.php') );
|
66 |
+
}elseif( isset(WPF()->member_tpls[$template]) && WPF()->member_tpls[$template] ){
|
67 |
include( wpftpl('profile.php') );
|
68 |
}else{
|
69 |
if( $template == 'forum' || $template == 'topic' ) : ?>
|
70 |
<?php if(!isset($forum_slug)) : ?>
|
71 |
<h1 id="wpforo-title">
|
72 |
+
<?php echo esc_html(WPF()->general_options['title']) ?>
|
73 |
+
<?php if( wpforo_feature('rss-feed') ): ?>
|
74 |
<div class="wpforo-feed">
|
75 |
<span class="wpf-feed-forums">
|
76 |
+
<a href="<?php WPF()->feed->rss2_url( true, 'forum' ); ?>" title="<?php wpforo_phrase('Forums RSS Feed') ?>" target="_blank">
|
77 |
<span><?php wpforo_phrase('Forums') ?></span> <i class="fa fa-rss fa-0x"></i>
|
78 |
</a>
|
79 |
</span><sep> | </sep>
|
80 |
<span class="wpf-feed-topics">
|
81 |
+
<a href="<?php WPF()->feed->rss2_url( true, 'topic' ); ?>" title="<?php wpforo_phrase('Topics RSS Feed') ?>" target="_blank">
|
82 |
<span><?php wpforo_phrase('Topics') ?></span> <i class="fa fa-rss fa-0x"></i>
|
83 |
</a>
|
84 |
</span>
|
86 |
<?php endif; ?>
|
87 |
</h1>
|
88 |
<?php endif; ?>
|
89 |
+
<?php $cats = WPF()->forum->get_forums( (isset($forum_slug) && $forum_slug != '' ? array( "parent_slug" => $forum_slug ) : array( "type" => 'category' ) ) ); ?>
|
90 |
|
91 |
<?php if(is_array($cats) && !empty($cats)) : ?>
|
92 |
|
93 |
<?php foreach($cats as $key => $cat) : ?>
|
94 |
+
<?php if( WPF()->perm->forum_can( 'vf', $cat['forumid'] ) ): ?>
|
95 |
+
<?php $forums = WPF()->forum->get_forums( array( "parentid" => $cat['forumid'], "type" => 'forum' ) ); ?>
|
96 |
<?php if(is_array($forums) && !empty($forums)) : ?>
|
97 |
<?php do_action( 'wpforo_category_loop_start', $cat, $key ) ?>
|
98 |
<?php include( wpftpl('layouts/'.($cat['cat_layout'] ? $cat['cat_layout'] : 1).'/forum.php') ); ?>
|
113 |
|
114 |
<?php if( isset($forum_slug) && $forum_slug ) : ?>
|
115 |
|
116 |
+
<?php $forum = WPF()->forum->get_forum( array( 'slug' => $forum_slug ) ); ?>
|
117 |
|
118 |
<?php if(is_array($forum) && !empty($forum)) : ?>
|
119 |
|
120 |
+
<?php if( WPF()->perm->forum_can( 'vf', $forum['forumid'] ) ): ?>
|
121 |
|
122 |
<div class="wpf-head-bar">
|
123 |
<div class="wpf-head-bar-left">
|
128 |
<div class="wpf-action-link">
|
129 |
<?php if ( is_user_logged_in() ): ?>
|
130 |
<?php
|
131 |
+
$args = array( "userid" => WPF()->current_userid , "itemid" => $forum['forumid'], "type" => "forum" );
|
132 |
+
$subscribe = WPF()->sbscrb->get_subscribe( $args );
|
133 |
if( isset( $subscribe['subid'] ) ): ?>
|
134 |
<span class="wpf-unsubscribe-forum wpf-action" id="wpfsubscribe-<?php echo intval($forum['forumid']) ?>"><?php wpforo_phrase('Unsubscribe') ?></span>
|
135 |
<?php else: ?>
|
136 |
<span class="wpf-subscribe-forum wpf-action" id="wpfsubscribe-<?php echo intval($forum['forumid']) ?>"><?php wpforo_phrase('Subscribe for new topics') ?></span>
|
137 |
<?php endif; ?>
|
138 |
<?php endif; ?>
|
139 |
+
<?php if( wpforo_feature('rss-feed') ): ?>
|
140 |
+
<span class="wpf-feed">| <a href="<?php WPF()->feed->rss2_url(); ?>" title="<?php wpforo_phrase('Forum RSS Feed') ?>" target="_blank"><span><?php wpforo_phrase('RSS') ?></span> <i class="fa fa-rss fa-0x"></i></a></span>
|
141 |
<?php endif; ?>
|
142 |
</div>
|
143 |
</div>
|
144 |
+
<?php if( WPF()->perm->forum_can( 'ct', $cat['forumid']) ): ?>
|
145 |
<div class="wpf-head-bar-right"><button class="wpf-button" id="add_wpftopic"><?php wpforo_phrase('Add topic') ?></button></div>
|
146 |
+
<?php elseif( WPF()->current_user_groupid == 4 ) : ?>
|
147 |
<div class="wpf-head-bar-right"><button class="wpf-button not_reg_user" id="add_wpftopic"><?php wpforo_phrase('Add topic') ?></button></div>
|
148 |
<?php endif; ?>
|
149 |
<div class="wpf-clear"></div>
|
150 |
</div>
|
151 |
|
152 |
+
<?php if( is_user_logged_in() && WPF()->perm->forum_can( 'ct', $cat['forumid'] ) ) WPF()->tpl->topic_form($forum['forumid']); ?>
|
153 |
|
154 |
<?php
|
155 |
$args = array(
|
156 |
+
'offset' => ($paged - 1) * WPF()->post->options['topics_per_page'],
|
157 |
+
'row_count' => WPF()->post->options['topics_per_page'],
|
158 |
'forumid' => $cat['forumid'],
|
159 |
'orderby' => 'type, modified',
|
160 |
'order' => 'DESC'
|
161 |
);
|
162 |
$items_count = 0;
|
163 |
+
$topics = WPF()->topic->get_topics( $args, $items_count );
|
164 |
?>
|
165 |
|
166 |
<?php if( is_array($topics) && !empty($topics) ) : ?>
|
167 |
|
168 |
+
<?php WPF()->tpl->pagenavi($paged, $items_count, true, 'wpf-navi-topic-top'); ?>
|
169 |
|
170 |
<?php include( wpftpl('layouts/'.($cat['cat_layout'] ? $cat['cat_layout'] : 1).'/topic.php') ); ?>
|
171 |
|
172 |
+
<?php WPF()->tpl->pagenavi($paged, $items_count, true, 'wpf-navi-topic-bottom'); ?>
|
173 |
|
174 |
<?php else : ?>
|
175 |
<p class="wpf-p-error"><?php wpforo_phrase('No topics were found here') ?> </p>
|
192 |
<?php
|
193 |
if( is_array($forum) && !empty($forum) ) :
|
194 |
|
195 |
+
if( WPF()->perm->forum_can( 'vt', $forum['forumid'] ) ):
|
196 |
|
197 |
if( is_array($topic) && !empty($topic) ) : ?>
|
198 |
|
199 |
+
<?php if( isset($topic['private']) && $topic['private'] && !wpforo_is_owner($topic['userid']) && !WPF()->perm->forum_can( 'vp', $forum['forumid'] ) ): ?>
|
200 |
<p class="wpf-p-error"><?php wpforo_phrase('Permission denied') ?></p>
|
201 |
<?php else: ?>
|
202 |
|
203 |
<?php
|
204 |
+
$cat_layout = WPF()->forum->get_layout( array( 'topicid' => $topic['topicid'] ) );
|
205 |
$args = array(
|
206 |
+
'offset' => ($paged - 1) * WPF()->post->options['posts_per_page'],
|
207 |
+
'row_count' => WPF()->post->options['posts_per_page'],
|
208 |
'topicid' => $topic['topicid'],
|
209 |
'forumid' => $forum['forumid']
|
210 |
);
|
211 |
$items_count = 0;
|
212 |
+
$posts = WPF()->post->get_posts( $args, $items_count);
|
213 |
?>
|
214 |
|
215 |
<?php if( is_array($posts) && !empty($posts) ) : ?>
|
216 |
<div class="wpf-head-bar">
|
217 |
+
<h1 id="wpforo-title"><?php $icon_title = WPF()->tpl->icon('topic', $topic, false, 'title'); if( $icon_title ) echo '<span class="wpf-status-title">[' . esc_html($icon_title) . ']</span> ' ?><?php echo esc_html($topic['title']) ?> </h1>
|
218 |
<?php if ( is_user_logged_in() ): ?>
|
219 |
<div class="wpf-action-link">
|
220 |
<?php
|
221 |
+
$args = array( "userid" => WPF()->current_userid , "itemid" => $topic['topicid'], "type" => "topic" );
|
222 |
+
$subscribe = WPF()->sbscrb->get_subscribe( $args );
|
223 |
if( isset( $subscribe['subid'] ) ): ?>
|
224 |
<span class="wpf-unsubscribe-topic wpf-action" id="wpfsubscribe-<?php echo intval($topic['topicid']) ?>" ><?php wpforo_phrase('Unsubscribe') ?></span>
|
225 |
<?php else: ?>
|
229 |
<?php endif; ?>
|
230 |
</div>
|
231 |
|
232 |
+
<?php WPF()->tpl->pagenavi( $paged, $items_count, true, 'wpf-navi-post-top' ); ?>
|
233 |
|
234 |
<?php include( wpftpl('layouts/'.($cat_layout ? $cat_layout : 1).'/post.php') ); ?>
|
235 |
|
236 |
+
<?php WPF()->tpl->pagenavi($paged, $items_count, true, 'wpf-navi-post-bottom'); ?>
|
237 |
|
238 |
<?php
|
239 |
if(is_user_logged_in()){
|
244 |
"layout" => ($cat_layout ? $cat_layout : 1),
|
245 |
"topic_title" => $topic['title']
|
246 |
);
|
247 |
+
WPF()->tpl->reply_form( $default );
|
248 |
}
|
249 |
?>
|
250 |
<?php else : ?>
|
276 |
</div>
|
277 |
<?php include("footer.php") ?>
|
278 |
|
279 |
+
<?php if( WPF()->use_home_url ) get_footer() ?>
|
wpf-themes/classic/layouts/1/forum.php
CHANGED
@@ -21,18 +21,18 @@
|
|
21 |
<br class="wpf-clear" />
|
22 |
</div><!-- wpforo-category -->
|
23 |
<?php foreach($forums as $key => $forum) :
|
24 |
-
if(
|
25 |
-
$sub_forums =
|
26 |
$has_sub_forums = ( is_array($sub_forums) && !empty($sub_forums) ? TRUE : FALSE );
|
27 |
|
28 |
$data = wpforo_forum($forum['forumid'], 'childs');
|
29 |
$counts = wpforo_forum($forum['forumid'], 'counts');
|
30 |
-
$topics =
|
31 |
|
32 |
$has_topics = ( is_array($topics) && !empty($topics) ? TRUE : FALSE );
|
33 |
|
34 |
$forum_url = wpforo_forum($forum['forumid'], 'url');
|
35 |
-
$topic_toglle =
|
36 |
|
37 |
$forum_icon = ( isset($forum['icon']) && $forum['icon']) ? $forum['icon'] : 'fa-comments';
|
38 |
?>
|
@@ -49,7 +49,7 @@
|
|
49 |
<ul>
|
50 |
<li class="first wpfcl-2"><?php wpforo_phrase('Subforums'); ?>:</li>
|
51 |
<?php foreach($sub_forums as $sub_forum) :
|
52 |
-
if(
|
53 |
$sub_forum_icon = ( isset($sub_forum['icon']) && $sub_forum['icon']) ? $sub_forum['icon'] : 'fa-comments'; ?>
|
54 |
<li class="<?php wpforo_unread_forum($sub_forum['forumid']) ?>"><i class="fa <?php echo esc_attr($sub_forum_icon) ?> wpfcl-0"></i> <a href="<?php echo esc_url( wpforo_forum($sub_forum['forumid'], 'url') ) ?>"><?php echo esc_html($sub_forum['title']); ?></a></li>
|
55 |
|
@@ -88,14 +88,14 @@
|
|
88 |
<?php $last_post = wpforo_post($topic['last_post']) ?>
|
89 |
<?php $member = wpforo_member($last_post); ?>
|
90 |
<li>
|
91 |
-
<div class="wpforo-last-topic-title <?php wpforo_unread_topic($topic['topicid']) ?>" title="<?php $icon_title =
|
92 |
-
<a href="<?php echo esc_url($last_post['url']) ?>"><?php echo esc_html(wpforo_text($topic['title'],
|
93 |
<div class="wpforo-last-topic-user" title="<?php echo esc_attr($member['display_name']) ?>"><?php wpforo_member_link($member, 'by', 9); ?></div>
|
94 |
<div class="wpforo-last-topic-date"><?php wpforo_date($topic['modified']); ?></div>
|
95 |
<br class="wpf-clear" />
|
96 |
</li>
|
97 |
<?php endforeach; ?>
|
98 |
-
<?php if( intval($forum['topics']) >
|
99 |
<li>
|
100 |
<div class="wpforo-last-topic-user wpf-vat">
|
101 |
<a href="<?php echo esc_url($forum_url) ?>"><?php wpforo_phrase('view all topics', true, 'lower'); ?> <i class="fa fa-angle-right" aria-hidden="true"></i></a>
|
21 |
<br class="wpf-clear" />
|
22 |
</div><!-- wpforo-category -->
|
23 |
<?php foreach($forums as $key => $forum) :
|
24 |
+
if( !WPF()->perm->forum_can( 'vf', $forum['forumid'] ) ) continue;
|
25 |
+
$sub_forums = WPF()->forum->get_forums( array( "parentid" => $forum['forumid'], "type" => 'forum' ) );
|
26 |
$has_sub_forums = ( is_array($sub_forums) && !empty($sub_forums) ? TRUE : FALSE );
|
27 |
|
28 |
$data = wpforo_forum($forum['forumid'], 'childs');
|
29 |
$counts = wpforo_forum($forum['forumid'], 'counts');
|
30 |
+
$topics = WPF()->topic->get_topics( array("forumids" => $data, "orderby" => "type, modified", "order" => "DESC", "row_count" => WPF()->forum->options['layout_extended_intro_topics_count'] ) );
|
31 |
|
32 |
$has_topics = ( is_array($topics) && !empty($topics) ? TRUE : FALSE );
|
33 |
|
34 |
$forum_url = wpforo_forum($forum['forumid'], 'url');
|
35 |
+
$topic_toglle = WPF()->forum->options['layout_extended_intro_topics_toggle'];
|
36 |
|
37 |
$forum_icon = ( isset($forum['icon']) && $forum['icon']) ? $forum['icon'] : 'fa-comments';
|
38 |
?>
|
49 |
<ul>
|
50 |
<li class="first wpfcl-2"><?php wpforo_phrase('Subforums'); ?>:</li>
|
51 |
<?php foreach($sub_forums as $sub_forum) :
|
52 |
+
if( !WPF()->perm->forum_can( 'vf', $sub_forum['forumid'] ) ) continue;
|
53 |
$sub_forum_icon = ( isset($sub_forum['icon']) && $sub_forum['icon']) ? $sub_forum['icon'] : 'fa-comments'; ?>
|
54 |
<li class="<?php wpforo_unread_forum($sub_forum['forumid']) ?>"><i class="fa <?php echo esc_attr($sub_forum_icon) ?> wpfcl-0"></i> <a href="<?php echo esc_url( wpforo_forum($sub_forum['forumid'], 'url') ) ?>"><?php echo esc_html($sub_forum['title']); ?></a></li>
|
55 |
|
88 |
<?php $last_post = wpforo_post($topic['last_post']) ?>
|
89 |
<?php $member = wpforo_member($last_post); ?>
|
90 |
<li>
|
91 |
+
<div class="wpforo-last-topic-title <?php wpforo_unread_topic($topic['topicid']) ?>" title="<?php $icon_title = WPF()->tpl->icon('topic', $topic, false, 'title'); if( $icon_title ) echo esc_html($icon_title) ?>"><i class="fa <?php WPF()->tpl->icon('topic', $topic); ?> wpfcl-0"></i>
|
92 |
+
<a href="<?php echo esc_url($last_post['url']) ?>"><?php echo esc_html(wpforo_text($topic['title'], WPF()->forum->options['layout_extended_intro_topics_length'], false)) ?></a></div>
|
93 |
<div class="wpforo-last-topic-user" title="<?php echo esc_attr($member['display_name']) ?>"><?php wpforo_member_link($member, 'by', 9); ?></div>
|
94 |
<div class="wpforo-last-topic-date"><?php wpforo_date($topic['modified']); ?></div>
|
95 |
<br class="wpf-clear" />
|
96 |
</li>
|
97 |
<?php endforeach; ?>
|
98 |
+
<?php if( intval($forum['topics']) > WPF()->forum->options['layout_extended_intro_topics_count'] ): ?>
|
99 |
<li>
|
100 |
<div class="wpforo-last-topic-user wpf-vat">
|
101 |
<a href="<?php echo esc_url($forum_url) ?>"><?php wpforo_phrase('view all topics', true, 'lower'); ?> <i class="fa fa-angle-right" aria-hidden="true"></i></a>
|
wpf-themes/classic/layouts/1/post.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
<div class="wpfl-1">
|
7 |
<div class="wpforo-post-head">
|
8 |
<div class="wpf-left"> <a href="<?php echo esc_url( wpforo_post($topic['last_post'],'url') ); ?>" class="wpfcl-2"><i class="fa fa-caret-square-o-down fa-0x wpfcl-3"></i> <span class="wpfcl-3"><?php wpforo_phrase('Last Post'); ?></span></a> </div>
|
9 |
-
<div class="wpf-right"> <?php if( wpforo_feature('rss-feed'
|
10 |
<br class="wpf-clear" />
|
11 |
</div>
|
12 |
<?php
|
@@ -17,14 +17,13 @@
|
|
17 |
<div id="post-<?php echo intval($post['postid']) ?>" class="post-wrap">
|
18 |
<div class="wpforo-post wpfcl-1">
|
19 |
<div class="wpf-left">
|
20 |
-
<?php if(
|
21 |
-
<div class="author-avatar"><?php echo
|
22 |
<?php endif ?>
|
23 |
<div class="author-data">
|
24 |
-
<div class="author-name"><span><?php
|
25 |
-
|
26 |
-
|
27 |
-
</div>
|
28 |
<?php wpforo_member_badge($member) ?>
|
29 |
<div class="author-joined"><?php wpforo_phrase('Joined') ?>:<?php wpforo_date($member['user_registered']); ?></div>
|
30 |
<div class="author-posts"><?php wpforo_phrase('Posts') ?>: <?php echo intval($member['posts']) ?></div>
|
@@ -35,8 +34,8 @@
|
|
35 |
</div>
|
36 |
<div id="wpforo-memberinfo-<?php echo intval($post['postid']) ?>" class="wpforo-memberinfo">
|
37 |
<div class="wpf-member-profile-buttons">
|
38 |
-
<?php
|
39 |
-
<?php
|
40 |
</div>
|
41 |
</div>
|
42 |
</div><!-- left -->
|
@@ -49,22 +48,22 @@
|
|
49 |
</div>
|
50 |
<?php wpforo_post_edited($post); ?>
|
51 |
<?php do_action( 'wpforo_tpl_post_loop_after_content', $post, $member ) ?>
|
52 |
-
<?php if( wpforo_feature('signature'
|
53 |
<?php if($member['signature']): ?><div class="wpforo-post-signature"><?php echo wpautop(wpforo_kses(stripslashes($member['signature']), 'user_description')) ?></div><?php endif; ?>
|
54 |
<?php endif; ?>
|
55 |
</div><!-- right -->
|
56 |
<br class="wpf-clear" />
|
57 |
<div class="bottom">
|
58 |
<div class="bleft">
|
59 |
-
<?php echo
|
60 |
</div>
|
61 |
<div class="bright">
|
62 |
<?php if( $post['is_first_post'] ){
|
63 |
$buttons = array( 'reply', 'quote', 'like', 'solved', 'sticky', 'private', 'close', 'report', 'move', 'approved', 'edit', 'delete' );
|
64 |
-
|
65 |
}else{
|
66 |
$buttons = array( 'reply', 'quote', 'like', 'report', 'approved', 'edit', 'delete' );
|
67 |
-
|
68 |
} ?>
|
69 |
</div>
|
70 |
<div class="wpf-clear"></div>
|
6 |
<div class="wpfl-1">
|
7 |
<div class="wpforo-post-head">
|
8 |
<div class="wpf-left"> <a href="<?php echo esc_url( wpforo_post($topic['last_post'],'url') ); ?>" class="wpfcl-2"><i class="fa fa-caret-square-o-down fa-0x wpfcl-3"></i> <span class="wpfcl-3"><?php wpforo_phrase('Last Post'); ?></span></a> </div>
|
9 |
+
<div class="wpf-right"> <?php if( wpforo_feature('rss-feed') ): ?><a href="<?php WPF()->feed->rss2_url(); ?>" class="wpfcl-2" title="<?php wpforo_phrase('Topic RSS Feed') ?>" target="_blank"><span class="wpfcl-3">RSS</span> <i class="fa fa-rss fa-0x wpfcl-3"></i></a><?php endif; ?></div>
|
10 |
<br class="wpf-clear" />
|
11 |
</div>
|
12 |
<?php
|
17 |
<div id="post-<?php echo intval($post['postid']) ?>" class="post-wrap">
|
18 |
<div class="wpforo-post wpfcl-1">
|
19 |
<div class="wpf-left">
|
20 |
+
<?php if( WPF()->perm->usergroup_can('va') && wpforo_feature('avatars') ): ?>
|
21 |
+
<div class="author-avatar"><?php echo WPF()->member->avatar( $member, 'alt="'.esc_attr($member['display_name']).'"', 80 ) ?></div>
|
22 |
<?php endif ?>
|
23 |
<div class="author-data">
|
24 |
+
<div class="author-name"><span><?php WPF()->member->show_online_indicator($member['userid']) ?></span> <?php wpforo_member_link($member); ?></div>
|
25 |
+
<?php wpforo_member_nicename($member, '@'); ?>
|
26 |
+
<div class="author-title"><?php wpforo_member_title($member) ?></div>
|
|
|
27 |
<?php wpforo_member_badge($member) ?>
|
28 |
<div class="author-joined"><?php wpforo_phrase('Joined') ?>:<?php wpforo_date($member['user_registered']); ?></div>
|
29 |
<div class="author-posts"><?php wpforo_phrase('Posts') ?>: <?php echo intval($member['posts']) ?></div>
|
34 |
</div>
|
35 |
<div id="wpforo-memberinfo-<?php echo intval($post['postid']) ?>" class="wpforo-memberinfo">
|
36 |
<div class="wpf-member-profile-buttons">
|
37 |
+
<?php WPF()->tpl->member_buttons($member) ?>
|
38 |
+
<?php WPF()->tpl->member_social_buttons($member) ?>
|
39 |
</div>
|
40 |
</div>
|
41 |
</div><!-- left -->
|
48 |
</div>
|
49 |
<?php wpforo_post_edited($post); ?>
|
50 |
<?php do_action( 'wpforo_tpl_post_loop_after_content', $post, $member ) ?>
|
51 |
+
<?php if( wpforo_feature('signature') ): ?>
|
52 |
<?php if($member['signature']): ?><div class="wpforo-post-signature"><?php echo wpautop(wpforo_kses(stripslashes($member['signature']), 'user_description')) ?></div><?php endif; ?>
|
53 |
<?php endif; ?>
|
54 |
</div><!-- right -->
|
55 |
<br class="wpf-clear" />
|
56 |
<div class="bottom">
|
57 |
<div class="bleft">
|
58 |
+
<?php echo WPF()->tpl->likers($post['postid']); ?>
|
59 |
</div>
|
60 |
<div class="bright">
|
61 |
<?php if( $post['is_first_post'] ){
|
62 |
$buttons = array( 'reply', 'quote', 'like', 'solved', 'sticky', 'private', 'close', 'report', 'move', 'approved', 'edit', 'delete' );
|
63 |
+
WPF()->tpl->buttons( $buttons, $forum, $topic, $post, TRUE );
|
64 |
}else{
|
65 |
$buttons = array( 'reply', 'quote', 'like', 'report', 'approved', 'edit', 'delete' );
|
66 |
+
WPF()->tpl->buttons( $buttons, $forum, $topic, $post );
|
67 |
} ?>
|
68 |
</div>
|
69 |
<div class="wpf-clear"></div>
|
wpf-themes/classic/layouts/1/topic.php
CHANGED
@@ -21,20 +21,20 @@
|
|
21 |
}
|
22 |
if(isset($topic['first_postid']) && $topic['first_postid'] != 0){
|
23 |
$first_post = wpforo_post($topic['first_postid']);
|
24 |
-
$intro_posts =
|
25 |
$first_poster = wpforo_member($first_post);
|
26 |
-
$posts =
|
27 |
$posts = array_reverse($posts);
|
28 |
}
|
29 |
$topic_url = wpforo_topic($topic['topicid'], 'url');
|
30 |
-
$post_toglle =
|
31 |
-
$classes =
|
32 |
$class = explode( ' ', $classes); $class = ( isset($class[0]) ) ? 'wpf-' . str_replace('fa-', '', $class[0]) : '';
|
33 |
?>
|
34 |
|
35 |
<div class="topic-wrap <?php echo $class ?>">
|
36 |
<div class="wpforo-topic">
|
37 |
-
<div class="wpforo-topic-icon" title="<?php $icon_title =
|
38 |
<i class="fa fa-1x <?php echo $classes ?>"></i>
|
39 |
</div>
|
40 |
<div class="wpforo-topic-info">
|
@@ -57,7 +57,7 @@
|
|
57 |
<div class="wpforo-last-posts-list">
|
58 |
<ul>
|
59 |
<li>
|
60 |
-
<div class="wpforo-last-post-title"><i class="fa fa-comments fa-flip-horizontal fa-0x wpfcl-0"></i> <a href="<?php echo esc_url($first_post['url']) ?>"><?php echo esc_html( wpforo_text($first_post['body'],
|
61 |
<div class="wpforo-last-post-user"><?php wpforo_member_link($first_poster, 'by %s', 9); ?></div>
|
62 |
<div class="wpforo-last-post-date"><?php wpforo_date($first_post['created']); ?></div>
|
63 |
<br class="wpf-clear">
|
@@ -66,7 +66,7 @@
|
|
66 |
<?php foreach($posts as $post) : ?>
|
67 |
<?php $poster = wpforo_member($post); ?>
|
68 |
<li>
|
69 |
-
<div class="wpforo-last-post-title"><i class="fa fa-reply fa-rotate-180 fa-0x wpfcl-0"></i> <a href="<?php echo esc_url( wpforo_post($post['postid'], 'url') ); ?>" title="<?php wpforo_phrase('REPLY:') ?> <?php echo esc_html( wpforo_text($post['body'], 100, false)) ?>"><?php echo (( $post_body = esc_html(wpforo_text($post['body'],
|
70 |
<div class="wpforo-last-post-user"><?php wpforo_member_link($poster, 'by %s', 9); ?></div>
|
71 |
<div class="wpforo-last-post-date"><?php wpforo_date($post['created']); ?></div>
|
72 |
<br class="wpf-clear">
|
21 |
}
|
22 |
if(isset($topic['first_postid']) && $topic['first_postid'] != 0){
|
23 |
$first_post = wpforo_post($topic['first_postid']);
|
24 |
+
$intro_posts = WPF()->post->options['layout_extended_intro_posts_count']; if( $intro_posts < 1 ){ $intro_posts = NULL; } else { $intro_posts = ($intro_posts > 1) ? ($intro_posts - 1) : $intro_posts = 0; }
|
25 |
$first_poster = wpforo_member($first_post);
|
26 |
+
$posts = WPF()->post->get_posts( array('topicid' => $topic['topicid'], 'exclude' => $topic['first_postid'], 'order' => 'DESC', 'row_count' => $intro_posts) );
|
27 |
$posts = array_reverse($posts);
|
28 |
}
|
29 |
$topic_url = wpforo_topic($topic['topicid'], 'url');
|
30 |
+
$post_toglle = WPF()->post->options['layout_extended_intro_posts_toggle'];
|
31 |
+
$classes = WPF()->tpl->icon('topic', $topic, false);
|
32 |
$class = explode( ' ', $classes); $class = ( isset($class[0]) ) ? 'wpf-' . str_replace('fa-', '', $class[0]) : '';
|
33 |
?>
|
34 |
|
35 |
<div class="topic-wrap <?php echo $class ?>">
|
36 |
<div class="wpforo-topic">
|
37 |
+
<div class="wpforo-topic-icon" title="<?php $icon_title = WPF()->tpl->icon('topic', $topic, false, 'title'); if( $icon_title ) echo esc_html($icon_title) ?>">
|
38 |
<i class="fa fa-1x <?php echo $classes ?>"></i>
|
39 |
</div>
|
40 |
<div class="wpforo-topic-info">
|
57 |
<div class="wpforo-last-posts-list">
|
58 |
<ul>
|
59 |
<li>
|
60 |
+
<div class="wpforo-last-post-title"><i class="fa fa-comments fa-flip-horizontal fa-0x wpfcl-0"></i> <a href="<?php echo esc_url($first_post['url']) ?>"><?php echo esc_html( wpforo_text($first_post['body'], WPF()->post->options['layout_extended_intro_posts_length'], false)) ?></a></div>
|
61 |
<div class="wpforo-last-post-user"><?php wpforo_member_link($first_poster, 'by %s', 9); ?></div>
|
62 |
<div class="wpforo-last-post-date"><?php wpforo_date($first_post['created']); ?></div>
|
63 |
<br class="wpf-clear">
|
66 |
<?php foreach($posts as $post) : ?>
|
67 |
<?php $poster = wpforo_member($post); ?>
|
68 |
<li>
|
69 |
+
<div class="wpforo-last-post-title"><i class="fa fa-reply fa-rotate-180 fa-0x wpfcl-0"></i> <a href="<?php echo esc_url( wpforo_post($post['postid'], 'url') ); ?>" title="<?php wpforo_phrase('REPLY:') ?> <?php echo esc_html( wpforo_text($post['body'], 100, false)) ?>"><?php echo (( $post_body = esc_html(wpforo_text($post['body'], WPF()->post->options['layout_extended_intro_posts_length'], FALSE)) ) ? $post_body : esc_html($post['title'])) ?></a></div>
|
70 |
<div class="wpforo-last-post-user"><?php wpforo_member_link($poster, 'by %s', 9); ?></div>
|
71 |
<div class="wpforo-last-post-date"><?php wpforo_date($post['created']); ?></div>
|
72 |
<br class="wpf-clear">
|
wpf-themes/classic/layouts/2/forum.php
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
</div><!-- wpforo-category -->
|
22 |
|
23 |
<?php foreach($forums as $key => $forum) :
|
24 |
-
if(
|
25 |
$forum_icon = ( isset($forum['icon']) && $forum['icon']) ? $forum['icon'] : 'fa-comments';
|
26 |
?>
|
27 |
|
@@ -35,7 +35,7 @@
|
|
35 |
$data = wpforo_forum($forum['forumid'], 'childs');
|
36 |
$counts = wpforo_forum($forum['forumid'], 'counts');
|
37 |
if(!isset($forum['last_postid']) || !$forum['last_postid']){
|
38 |
-
$lastinfo =
|
39 |
if(!empty($lastinfo) && is_array($lastinfo)) $forum = array_merge($forum, $lastinfo);
|
40 |
}
|
41 |
?>
|
@@ -43,7 +43,7 @@
|
|
43 |
<?php wpforo_phrase('Topics') ?>: <?php echo wpforo_print_number($counts['topics']) ?> <span class="wpfcl-1">|</span> <?php wpforo_phrase('Posts'); ?>: <?php echo wpforo_print_number($counts['posts']) ?>
|
44 |
</span>
|
45 |
|
46 |
-
<?php $sub_forums =
|
47 |
<?php if(is_array($sub_forums) && !empty($sub_forums)) : ?>
|
48 |
|
49 |
<div class="wpforo-subforum">
|
@@ -51,7 +51,7 @@
|
|
51 |
<li class="first wpfcl-0"><?php wpforo_phrase('Subforums'); ?>: </li>
|
52 |
|
53 |
<?php foreach($sub_forums as $sub_forum) :
|
54 |
-
if(
|
55 |
$sub_forum_icon = ( isset($sub_forum['icon']) && $sub_forum['icon']) ? $sub_forum['icon'] : 'fa-comments'; ?>
|
56 |
|
57 |
<li class="<?php wpforo_unread_forum($sub_forum['forumid']) ?>"><i class="fa <?php echo esc_attr($sub_forum_icon) ?> wpfcl-0"></i> <a href="<?php echo esc_url( wpforo_forum($sub_forum['forumid'],'url') ) ?>"><?php echo esc_html($sub_forum['title']); ?></a></li>
|
@@ -74,14 +74,14 @@
|
|
74 |
<p class="wpforo-last-post-title"><a href="<?php echo esc_url($last_post['url']) ?>"><?php if(isset($last_post_topic['title'])) wpforo_text($last_post_topic['title'], 30); ?></a></p>
|
75 |
<p class="wpforo-last-post-info"><?php wpforo_member_link($member, 'by'); ?>, <?php wpforo_date($forum['last_post_date']) ?></p>
|
76 |
</div>
|
77 |
-
<?php if(
|
78 |
<div class="wpforo-last-post-avatar">
|
79 |
<?php if( isset($member['profile_url']) && $member['profile_url'] ): ?>
|
80 |
<a href="<?php echo esc_url($member['profile_url']) ?>">
|
81 |
-
<?php echo
|
82 |
</a>
|
83 |
<?php else: ?>
|
84 |
-
<?php echo
|
85 |
<?php endif; ?>
|
86 |
</div>
|
87 |
<?php endif; ?>
|
21 |
</div><!-- wpforo-category -->
|
22 |
|
23 |
<?php foreach($forums as $key => $forum) :
|
24 |
+
if( !WPF()->perm->forum_can( 'vf', $forum['forumid'] ) ) continue;
|
25 |
$forum_icon = ( isset($forum['icon']) && $forum['icon']) ? $forum['icon'] : 'fa-comments';
|
26 |
?>
|
27 |
|
35 |
$data = wpforo_forum($forum['forumid'], 'childs');
|
36 |
$counts = wpforo_forum($forum['forumid'], 'counts');
|
37 |
if(!isset($forum['last_postid']) || !$forum['last_postid']){
|
38 |
+
$lastinfo = WPF()->forum->get_lastinfo( $data );
|
39 |
if(!empty($lastinfo) && is_array($lastinfo)) $forum = array_merge($forum, $lastinfo);
|
40 |
}
|
41 |
?>
|
43 |
<?php wpforo_phrase('Topics') ?>: <?php echo wpforo_print_number($counts['topics']) ?> <span class="wpfcl-1">|</span> <?php wpforo_phrase('Posts'); ?>: <?php echo wpforo_print_number($counts['posts']) ?>
|
44 |
</span>
|
45 |
|
46 |
+
<?php $sub_forums = WPF()->forum->get_forums( array( "parentid" => $forum['forumid'], "type" => 'forum' ) ); ?>
|
47 |
<?php if(is_array($sub_forums) && !empty($sub_forums)) : ?>
|
48 |
|
49 |
<div class="wpforo-subforum">
|
51 |
<li class="first wpfcl-0"><?php wpforo_phrase('Subforums'); ?>: </li>
|
52 |
|
53 |
<?php foreach($sub_forums as $sub_forum) :
|
54 |
+
if( !WPF()->perm->forum_can( 'vf', $sub_forum['forumid'] ) ) continue;
|
55 |
$sub_forum_icon = ( isset($sub_forum['icon']) && $sub_forum['icon']) ? $sub_forum['icon'] : 'fa-comments'; ?>
|
56 |
|
57 |
<li class="<?php wpforo_unread_forum($sub_forum['forumid']) ?>"><i class="fa <?php echo esc_attr($sub_forum_icon) ?> wpfcl-0"></i> <a href="<?php echo esc_url( wpforo_forum($sub_forum['forumid'],'url') ) ?>"><?php echo esc_html($sub_forum['title']); ?></a></li>
|
74 |
<p class="wpforo-last-post-title"><a href="<?php echo esc_url($last_post['url']) ?>"><?php if(isset($last_post_topic['title'])) wpforo_text($last_post_topic['title'], 30); ?></a></p>
|
75 |
<p class="wpforo-last-post-info"><?php wpforo_member_link($member, 'by'); ?>, <?php wpforo_date($forum['last_post_date']) ?></p>
|
76 |
</div>
|
77 |
+
<?php if( WPF()->perm->usergroup_can('va') && wpforo_feature('avatars') ): ?>
|
78 |
<div class="wpforo-last-post-avatar">
|
79 |
<?php if( isset($member['profile_url']) && $member['profile_url'] ): ?>
|
80 |
<a href="<?php echo esc_url($member['profile_url']) ?>">
|
81 |
+
<?php echo WPF()->member->get_avatar($forum['last_userid'], 'alt="'.esc_attr($member['display_name']).'" title="'.esc_attr($member['display_name']).'"', 40) ?>
|
82 |
</a>
|
83 |
<?php else: ?>
|
84 |
+
<?php echo WPF()->member->get_avatar($forum['last_userid'], 'alt="'.esc_attr($member['display_name']).'" title="'.esc_attr($member['display_name']).'"', 40) ?>
|
85 |
<?php endif; ?>
|
86 |
</div>
|
87 |
<?php endif; ?>
|
wpf-themes/classic/layouts/2/post.php
CHANGED
@@ -7,7 +7,7 @@
|
|
7 |
|
8 |
<div class="wpforo-post-head">
|
9 |
<div class="wpf-left"> <a href="<?php echo esc_url( wpforo_post($topic['last_post'], 'url') ); ?>" class="wpfcl-2"><i class="fa fa-caret-square-o-down fa-0x wpfcl-3"></i> <span class="wpfcl-3"><?php wpforo_phrase('Last Post'); ?></span></a></div>
|
10 |
-
<div class="wpf-right"> <?php if( wpforo_feature('rss-feed'
|
11 |
<div class="wpf-clear"></div>
|
12 |
</div>
|
13 |
|
@@ -17,13 +17,14 @@
|
|
17 |
<div id="post-<?php echo intval($post['postid']) ?>" class="post-wrap">
|
18 |
<div class="wpforo-post wpfcl-1">
|
19 |
<div class="wpf-left">
|
20 |
-
<?php if(
|
21 |
-
<div class="author-avatar"><?php echo
|
22 |
<?php endif; ?>
|
23 |
<div class="author-data">
|
24 |
-
<div class="author-name"><span><?php
|
|
|
25 |
<div class="wpf-member-profile-buttons">
|
26 |
-
<?php
|
27 |
</div>
|
28 |
<div class="author-title">
|
29 |
<?php wpforo_member_title($member) ?>
|
@@ -37,10 +38,10 @@
|
|
37 |
<div class="wpf-post-actions">
|
38 |
<?php if( $post['is_first_post'] ){
|
39 |
$buttons = array( 'solved', 'sticky', 'private', 'close', 'report', 'move', 'delete' );
|
40 |
-
|
41 |
}else{
|
42 |
$buttons = array( 'report', 'delete' );
|
43 |
-
|
44 |
} ?>
|
45 |
</div>
|
46 |
<a href="<?php echo esc_url( wpforo_post($post['postid'], 'url') ); ?>"><i class="fa fa-link fa-0x"></i></a>
|
@@ -49,23 +50,23 @@
|
|
49 |
<?php echo wpforo_content_filter( wpforo_kses($post['body'], 'post') ) ?>
|
50 |
<?php wpforo_post_edited($post); ?>
|
51 |
<?php do_action( 'wpforo_tpl_post_loop_after_content', $post, $member ) ?>
|
52 |
-
<?php if( wpforo_feature('signature'
|
53 |
<?php if($member['signature']): ?><div class="wpforo-post-signature"><?php echo wpautop(wpforo_kses(stripslashes($member['signature']), 'user_description')) ?></div><?php endif; ?>
|
54 |
<?php endif; ?>
|
55 |
<div class="wpf-post-button-actions">
|
56 |
<?php if( $post['is_first_post'] ){
|
57 |
$buttons = array( 'reply', 'quote', 'approved', 'edit', 'like' );
|
58 |
-
|
59 |
}else{
|
60 |
$buttons = array( 'reply', 'quote', 'approved', 'edit', 'like' );
|
61 |
-
|
62 |
} ?>
|
63 |
-
<?php if($post['status']): ?><span class="wpf-mod-message"><i class="fa fa-exclamation-circle" aria-hidden="true"></i> <?php wpforo_phrase('Awaiting moderation') ?></span
|
64 |
</div>
|
65 |
</div>
|
66 |
<div class="wpforo-post-content-bottom">
|
67 |
<div class="cbleft wpfcl-0"><?php wpforo_phrase('Posted') ?> : <?php wpforo_date($post['created'], 'd/m/Y g:i a') ?>
|
68 |
-
<span class="bleft"><?php echo
|
69 |
</div>
|
70 |
<div class="wpf-clear"></div>
|
71 |
</div>
|
7 |
|
8 |
<div class="wpforo-post-head">
|
9 |
<div class="wpf-left"> <a href="<?php echo esc_url( wpforo_post($topic['last_post'], 'url') ); ?>" class="wpfcl-2"><i class="fa fa-caret-square-o-down fa-0x wpfcl-3"></i> <span class="wpfcl-3"><?php wpforo_phrase('Last Post'); ?></span></a></div>
|
10 |
+
<div class="wpf-right"> <?php if( wpforo_feature('rss-feed') ): ?><a href="<?php WPF()->feed->rss2_url(); ?>" class="wpfcl-2" title="<?php wpforo_phrase('Topic RSS Feed') ?>"><span class="wpfcl-3"><?php wpforo_phrase('RSS') ?></span> <i class="fa fa-rss fa-0x wpfcl-3"></i></a><?php endif; ?></div>
|
11 |
<div class="wpf-clear"></div>
|
12 |
</div>
|
13 |
|
17 |
<div id="post-<?php echo intval($post['postid']) ?>" class="post-wrap">
|
18 |
<div class="wpforo-post wpfcl-1">
|
19 |
<div class="wpf-left">
|
20 |
+
<?php if( WPF()->perm->usergroup_can('va') && wpforo_feature('avatars') ): ?>
|
21 |
+
<div class="author-avatar"><?php echo WPF()->member->avatar($member, 'alt="'.esc_attr($member['display_name']).'"', 110) ?></div>
|
22 |
<?php endif; ?>
|
23 |
<div class="author-data">
|
24 |
+
<div class="author-name"><span><?php WPF()->member->show_online_indicator($member['userid']) ?></span> <?php wpforo_member_link($member); ?></div>
|
25 |
+
<?php wpforo_member_nicename($member, '@'); ?>
|
26 |
<div class="wpf-member-profile-buttons">
|
27 |
+
<?php WPF()->tpl->member_buttons($member) ?>
|
28 |
</div>
|
29 |
<div class="author-title">
|
30 |
<?php wpforo_member_title($member) ?>
|
38 |
<div class="wpf-post-actions">
|
39 |
<?php if( $post['is_first_post'] ){
|
40 |
$buttons = array( 'solved', 'sticky', 'private', 'close', 'report', 'move', 'delete' );
|
41 |
+
WPF()->tpl->buttons( $buttons, $forum, $topic, $post, TRUE );
|
42 |
}else{
|
43 |
$buttons = array( 'report', 'delete' );
|
44 |
+
WPF()->tpl->buttons( $buttons, $forum, $topic, $post );
|
45 |
} ?>
|
46 |
</div>
|
47 |
<a href="<?php echo esc_url( wpforo_post($post['postid'], 'url') ); ?>"><i class="fa fa-link fa-0x"></i></a>
|
50 |
<?php echo wpforo_content_filter( wpforo_kses($post['body'], 'post') ) ?>
|
51 |
<?php wpforo_post_edited($post); ?>
|
52 |
<?php do_action( 'wpforo_tpl_post_loop_after_content', $post, $member ) ?>
|
53 |
+
<?php if( wpforo_feature('signature') ): ?>
|
54 |
<?php if($member['signature']): ?><div class="wpforo-post-signature"><?php echo wpautop(wpforo_kses(stripslashes($member['signature']), 'user_description')) ?></div><?php endif; ?>
|
55 |
<?php endif; ?>
|
56 |
<div class="wpf-post-button-actions">
|
57 |
<?php if( $post['is_first_post'] ){
|
58 |
$buttons = array( 'reply', 'quote', 'approved', 'edit', 'like' );
|
59 |
+
WPF()->tpl->buttons( $buttons, $forum, $topic, $post, TRUE );
|
60 |
}else{
|
61 |
$buttons = array( 'reply', 'quote', 'approved', 'edit', 'like' );
|
62 |
+
WPF()->tpl->buttons( $buttons, $forum, $topic, $post );
|
63 |
} ?>
|
64 |
+
<?php if($post['status']): ?><span class="wpf-mod-message"><i class="fa fa-exclamation-circle" aria-hidden="true"></i> <?php wpforo_phrase('Awaiting moderation') ?></span><?php endif; ?>
|
65 |
</div>
|
66 |
</div>
|
67 |
<div class="wpforo-post-content-bottom">
|
68 |
<div class="cbleft wpfcl-0"><?php wpforo_phrase('Posted') ?> : <?php wpforo_date($post['created'], 'd/m/Y g:i a') ?>
|
69 |
+
<span class="bleft"><?php echo WPF()->tpl->likers($post['postid']); ?></span>
|
70 |
</div>
|
71 |
<div class="wpf-clear"></div>
|
72 |
</div>
|
wpf-themes/classic/layouts/2/topic.php
CHANGED
@@ -15,30 +15,32 @@
|
|
15 |
|
16 |
<?php foreach($topics as $key => $topic) : ?>
|
17 |
|
18 |
-
<?php
|
|
|
|
|
19 |
$member = wpforo_member($topic);
|
20 |
if(isset($topic['last_post']) && $topic['last_post'] != 0){
|
21 |
$last_post = wpforo_post($topic['last_post']);
|
22 |
$last_poster = wpforo_member($last_post);
|
23 |
}
|
24 |
-
$classes =
|
25 |
$class = explode( ' ', $classes); $class = ( isset($class[0]) ) ? 'wpf-' . str_replace('fa-', '', $class[0]) : '';
|
26 |
?>
|
27 |
|
28 |
<div class="topic-wrap <?php echo $class ?>">
|
29 |
<div class="wpforo-topic">
|
30 |
-
<?php if(
|
31 |
-
<div class="wpforo-topic-avatar"><?php echo
|
32 |
<?php endif; ?>
|
33 |
<div class="wpforo-topic-info">
|
34 |
-
<p class="wpforo-topic-title <?php wpforo_unread_topic($topic['topicid']); ?>"><a href="<?php echo esc_url( wpforo_topic($topic['topicid'], 'url') ) ?>"><i class="fa fa-1x <?php echo $classes ?>" title="<?php $icon_title =
|
35 |
<p class="wpforo-topic-start-info wpfcl-2"><?php wpforo_member_link($member); ?>, <?php wpforo_date($topic['created']); ?></p>
|
36 |
<div class="wpforo-topic-badges"><?php wpforo_hook('wpforo_topic_info_end', $topic); ?></div>
|
37 |
</div>
|
38 |
<?php if(isset($topic['last_post']) && $topic['last_post'] != 0) : ?>
|
39 |
<div class="wpforo-topic-stat-lastpost"><span><?php wpforo_member_link($last_poster, 'by'); ?> <a href="<?php echo esc_url($last_post['url']) ?>" title="<?php wpforo_phrase('View the latest post') ?>"><i class="fa fa-chevron-right fa-sx wpfcl-a"></i></a></span><br> <?php wpforo_date($last_post['created']); ?></div>
|
40 |
<?php else: ?>
|
41 |
-
<div class="wpforo-topic-stat-lastpost"
|
42 |
<?php endif; ?>
|
43 |
<div class="wpforo-topic-stat-views"><?php echo intval($topic['views']) ?></div>
|
44 |
<div class="wpforo-topic-stat-posts"><?php echo intval($topic['posts']) ?></div>
|
15 |
|
16 |
<?php foreach($topics as $key => $topic) : ?>
|
17 |
|
18 |
+
<?php
|
19 |
+
$last_poster = array();
|
20 |
+
$last_post = array();
|
21 |
$member = wpforo_member($topic);
|
22 |
if(isset($topic['last_post']) && $topic['last_post'] != 0){
|
23 |
$last_post = wpforo_post($topic['last_post']);
|
24 |
$last_poster = wpforo_member($last_post);
|
25 |
}
|
26 |
+
$classes = WPF()->tpl->icon('topic', $topic, false);
|
27 |
$class = explode( ' ', $classes); $class = ( isset($class[0]) ) ? 'wpf-' . str_replace('fa-', '', $class[0]) : '';
|
28 |
?>
|
29 |
|
30 |
<div class="topic-wrap <?php echo $class ?>">
|
31 |
<div class="wpforo-topic">
|
32 |
+
<?php if( WPF()->perm->usergroup_can('va') && wpforo_feature('avatars') ): ?>
|
33 |
+
<div class="wpforo-topic-avatar"><?php echo WPF()->member->avatar($member, 'alt="'.esc_attr($member['display_name']).'"', 48) ?></div>
|
34 |
<?php endif; ?>
|
35 |
<div class="wpforo-topic-info">
|
36 |
+
<p class="wpforo-topic-title <?php wpforo_unread_topic($topic['topicid']); ?>"><a href="<?php echo esc_url( wpforo_topic($topic['topicid'], 'url') ) ?>"><i class="fa fa-1x <?php echo $classes ?>" title="<?php $icon_title = WPF()->tpl->icon('topic', $topic, false, 'title'); if( $icon_title ) echo esc_html($icon_title) ?>"></i> <?php echo esc_html($topic['title']) ?></a></p>
|
37 |
<p class="wpforo-topic-start-info wpfcl-2"><?php wpforo_member_link($member); ?>, <?php wpforo_date($topic['created']); ?></p>
|
38 |
<div class="wpforo-topic-badges"><?php wpforo_hook('wpforo_topic_info_end', $topic); ?></div>
|
39 |
</div>
|
40 |
<?php if(isset($topic['last_post']) && $topic['last_post'] != 0) : ?>
|
41 |
<div class="wpforo-topic-stat-lastpost"><span><?php wpforo_member_link($last_poster, 'by'); ?> <a href="<?php echo esc_url($last_post['url']) ?>" title="<?php wpforo_phrase('View the latest post') ?>"><i class="fa fa-chevron-right fa-sx wpfcl-a"></i></a></span><br> <?php wpforo_date($last_post['created']); ?></div>
|
42 |
<?php else: ?>
|
43 |
+
<div class="wpforo-topic-stat-lastpost"><?php wpforo_phrase('Replies not found') ?></div>
|
44 |
<?php endif; ?>
|
45 |
<div class="wpforo-topic-stat-views"><?php echo intval($topic['views']) ?></div>
|
46 |
<div class="wpforo-topic-stat-posts"><?php echo intval($topic['posts']) ?></div>
|
wpf-themes/classic/layouts/3/forum.php
CHANGED
@@ -23,19 +23,19 @@
|
|
23 |
</div>
|
24 |
|
25 |
<?php foreach($forums as $key =>$forum) :
|
26 |
-
if(
|
27 |
|
28 |
-
$sub_forums =
|
29 |
$has_sub_forums = ( is_array($sub_forums) && !empty($sub_forums) ? TRUE : FALSE );
|
30 |
|
31 |
-
$topics =
|
32 |
$has_topics = ( is_array($topics) && !empty($topics) ? TRUE : FALSE );
|
33 |
|
34 |
$data = wpforo_forum($forum['forumid'], 'childs');
|
35 |
$counts = wpforo_forum($forum['forumid'], 'counts');
|
36 |
|
37 |
$forum_url = wpforo_forum($forum['forumid'],'url');
|
38 |
-
$topic_toglle =
|
39 |
|
40 |
$forum_icon = ( isset($forum['icon']) && $forum['icon']) ? $forum['icon'] : 'fa-comments';
|
41 |
?>
|
@@ -54,7 +54,7 @@
|
|
54 |
<li class="first"><?php wpforo_phrase('Subforums') ?>:</li>
|
55 |
|
56 |
<?php foreach($sub_forums as $sub_forum) :
|
57 |
-
if(
|
58 |
$sub_forum_icon = ( isset($sub_forum['icon']) && $sub_forum['icon']) ? $sub_forum['icon'] : 'fa-comments'; ?>
|
59 |
|
60 |
<li class="<?php wpforo_unread_forum($sub_forum['forumid']) ?>"><i class="fa <?php echo esc_attr($sub_forum_icon) ?> wpfcl-0"></i> <a href="<?php echo esc_url( wpforo_forum($sub_forum['forumid'],'url') ) ?>"><?php echo esc_html($sub_forum['title']); ?></a></li>
|
@@ -79,7 +79,7 @@
|
|
79 |
</div><!-- wpforo-forum-info -->
|
80 |
|
81 |
<div class="wpforo-forum-stat-questions"><?php echo wpforo_print_number($counts['topics']) ?></div>
|
82 |
-
<div class="wpforo-forum-stat-answers"><?php echo wpforo_print_number(
|
83 |
<div class="wpforo-forum-stat-posts"><?php echo wpforo_print_number($counts['posts']) ?></div>
|
84 |
</div><!-- wpforo-forum -->
|
85 |
|
@@ -99,13 +99,13 @@
|
|
99 |
<div class="views"><div class="count"><?php echo intval($topic['views']) ?></div><div class="wpforo-label"><?php wpforo_phrase('Views') ?></div></div>
|
100 |
</div>
|
101 |
<div class="wpforo-last-topic-title">
|
102 |
-
<a href="<?php echo esc_url( wpforo_topic($topic['topicid'], 'url') ) ?>" class="<?php wpforo_unread_topic($topic['topicid']) ?>"><?php echo esc_html($topic['title']) ?></a><br />
|
103 |
<span class="wpforo-last-topic-info wpfcl-2"><?php wpforo_member_link($member, 'by'); ?>, <?php wpforo_date($topic['modified']); ?></span>
|
104 |
</div>
|
105 |
<div class="wpforo-last-topic-posts wpfcl-2"><div class="count"><?php echo intval($topic['posts']) ?></div><div class="wpforo-label"><?php wpforo_phrase('replies') ?></div></div>
|
106 |
</li>
|
107 |
<?php endforeach; ?>
|
108 |
-
<?php if( intval($forum['topics']) >
|
109 |
<li>
|
110 |
<div class="wpforo-last-topic-title wpf-vat">
|
111 |
<a href="<?php echo esc_url($forum_url) ?>"><?php wpforo_phrase('view all questions', true, 'lower'); ?> <i class="fa fa-angle-right" aria-hidden="true"></i></a>
|
23 |
</div>
|
24 |
|
25 |
<?php foreach($forums as $key =>$forum) :
|
26 |
+
if( !WPF()->perm->forum_can( 'vf', $forum['forumid'] ) ) continue;
|
27 |
|
28 |
+
$sub_forums = WPF()->forum->get_forums( array( "parentid" => $forum['forumid'], "type" => 'forum' ) );
|
29 |
$has_sub_forums = ( is_array($sub_forums) && !empty($sub_forums) ? TRUE : FALSE );
|
30 |
|
31 |
+
$topics = WPF()->topic->get_topics( array("forumid" => $forum['forumid'], "orderby" => "type, modified", "order" => "DESC", "row_count" => WPF()->forum->options['layout_qa_intro_topics_count'] ) );
|
32 |
$has_topics = ( is_array($topics) && !empty($topics) ? TRUE : FALSE );
|
33 |
|
34 |
$data = wpforo_forum($forum['forumid'], 'childs');
|
35 |
$counts = wpforo_forum($forum['forumid'], 'counts');
|
36 |
|
37 |
$forum_url = wpforo_forum($forum['forumid'],'url');
|
38 |
+
$topic_toglle = WPF()->forum->options['layout_qa_intro_topics_toggle'];
|
39 |
|
40 |
$forum_icon = ( isset($forum['icon']) && $forum['icon']) ? $forum['icon'] : 'fa-comments';
|
41 |
?>
|
54 |
<li class="first"><?php wpforo_phrase('Subforums') ?>:</li>
|
55 |
|
56 |
<?php foreach($sub_forums as $sub_forum) :
|
57 |
+
if( !WPF()->perm->forum_can( 'vf', $sub_forum['forumid'] ) ) continue;
|
58 |
$sub_forum_icon = ( isset($sub_forum['icon']) && $sub_forum['icon']) ? $sub_forum['icon'] : 'fa-comments'; ?>
|
59 |
|
60 |
<li class="<?php wpforo_unread_forum($sub_forum['forumid']) ?>"><i class="fa <?php echo esc_attr($sub_forum_icon) ?> wpfcl-0"></i> <a href="<?php echo esc_url( wpforo_forum($sub_forum['forumid'],'url') ) ?>"><?php echo esc_html($sub_forum['title']); ?></a></li>
|
79 |
</div><!-- wpforo-forum-info -->
|
80 |
|
81 |
<div class="wpforo-forum-stat-questions"><?php echo wpforo_print_number($counts['topics']) ?></div>
|
82 |
+
<div class="wpforo-forum-stat-answers"><?php echo wpforo_print_number(WPF()->topic->get_sum_answer($data)) ?></div>
|
83 |
<div class="wpforo-forum-stat-posts"><?php echo wpforo_print_number($counts['posts']) ?></div>
|
84 |
</div><!-- wpforo-forum -->
|
85 |
|
99 |
<div class="views"><div class="count"><?php echo intval($topic['views']) ?></div><div class="wpforo-label"><?php wpforo_phrase('Views') ?></div></div>
|
100 |
</div>
|
101 |
<div class="wpforo-last-topic-title">
|
102 |
+
<a href="<?php echo esc_url( wpforo_topic($topic['topicid'], 'url') ) ?>" class="<?php wpforo_unread_topic($topic['topicid']) ?>"><?php echo esc_html(wpforo_text($topic['title'], WPF()->forum->options['layout_qa_intro_topics_length'], false)) ?></a><br />
|
103 |
<span class="wpforo-last-topic-info wpfcl-2"><?php wpforo_member_link($member, 'by'); ?>, <?php wpforo_date($topic['modified']); ?></span>
|
104 |
</div>
|
105 |
<div class="wpforo-last-topic-posts wpfcl-2"><div class="count"><?php echo intval($topic['posts']) ?></div><div class="wpforo-label"><?php wpforo_phrase('replies') ?></div></div>
|
106 |
</li>
|
107 |
<?php endforeach; ?>
|
108 |
+
<?php if( intval($forum['topics']) > WPF()->forum->options['layout_qa_intro_topics_count'] ): ?>
|
109 |
<li>
|
110 |
<div class="wpforo-last-topic-title wpf-vat">
|
111 |
<a href="<?php echo esc_url($forum_url) ?>"><?php wpforo_phrase('view all questions', true, 'lower'); ?> <i class="fa fa-angle-right" aria-hidden="true"></i></a>
|
wpf-themes/classic/layouts/3/post.php
CHANGED
@@ -6,7 +6,7 @@
|
|
6 |
<div class="wpfl-3">
|
7 |
<div class="wpforo-post-head">
|
8 |
<div class="wpf-left"> <a href="<?php echo esc_url( wpforo_post($topic['last_post'], 'url') ); ?>" class="wpfcl-2"><i class="fa fa-caret-square-o-down fa-0x wpfcl-3"></i> <span class="wpfcl-3"><?php wpforo_phrase('Last Post'); ?></span></a></div>
|
9 |
-
<div class="wpf-right"> <?php if( wpforo_feature('rss-feed'
|
10 |
<br class="wpf-clear" />
|
11 |
</div>
|
12 |
<?php foreach($posts as $key => $post ) : $is_topic = ( $key ? FALSE : TRUE ); ?>
|
@@ -20,25 +20,25 @@
|
|
20 |
<div class="wpf-positive">
|
21 |
<?php
|
22 |
$buttons = array('positivevote');
|
23 |
-
|
24 |
?>
|
25 |
</div>
|
26 |
<div class="wpf-vote-number">
|
27 |
-
<span id="wpfvote-num-<?php echo
|
28 |
-
<?php echo $
|
29 |
</span>
|
30 |
</div>
|
31 |
<div class="wpf-negative">
|
32 |
<?php
|
33 |
$buttons = array('negativevote');
|
34 |
-
|
35 |
?>
|
36 |
</div>
|
37 |
|
38 |
<?php
|
39 |
if( !$post['is_first_post'] ){
|
40 |
$buttons = array( 'isanswer' );
|
41 |
-
|
42 |
}
|
43 |
?>
|
44 |
</div>
|
@@ -46,7 +46,7 @@
|
|
46 |
<div class="wpf-right">
|
47 |
<div class="wpforo-post-content-top">
|
48 |
<?php if($post['status']): ?><span class="wpf-mod-message"><i class="fa fa-exclamation-circle" aria-hidden="true"></i> <?php wpforo_phrase('Awaiting moderation') ?></span><?php endif; ?>
|
49 |
-
<div class="wpforo-post-link"><?php $buttons = array( 'link' );
|
50 |
<div class="wpforo-post-date"><?php wpforo_date($post['created']); ?></div>
|
51 |
<div class="wpf-clear-right"></div>
|
52 |
</div>
|
@@ -54,7 +54,7 @@
|
|
54 |
<?php echo wpforo_content_filter( wpforo_kses($post['body'], 'post') ) ?>
|
55 |
<?php wpforo_post_edited($post); ?>
|
56 |
<?php do_action( 'wpforo_tpl_post_loop_after_content', $post, $member ) ?>
|
57 |
-
<?php if( wpforo_feature('signature'
|
58 |
<?php if( trim($member['signature'])): ?><div class="wpforo-post-signature"><?php echo wpautop(wpforo_kses(stripslashes($member['signature']), 'user_description')) ?></div><?php endif ?>
|
59 |
<?php endif; ?>
|
60 |
</div>
|
@@ -64,12 +64,12 @@
|
|
64 |
if( $post['is_first_post'] ){
|
65 |
$buttons = array( 'answer' );
|
66 |
echo '<div class="wpf-answer-button">';
|
67 |
-
|
68 |
echo '</div>';
|
69 |
}
|
70 |
$buttons = array( 'comment' );
|
71 |
echo '<div class="wpf-add-comment-button">';
|
72 |
-
|
73 |
echo '</div>';
|
74 |
?>
|
75 |
</div>
|
@@ -77,21 +77,20 @@
|
|
77 |
<div class="wpforo-box-l3a-wrap wpforo-post-author-data-content">
|
78 |
<div class="wpforo-box-l3a-top"></div>
|
79 |
<div class="wpforo-box-l3a-lr">
|
80 |
-
<?php if(
|
81 |
-
<div class="wpforo-box-l3a-left"><?php echo
|
82 |
<?php else: $rsz = 'style="margin-left:10px;"'; endif; ?>
|
83 |
<div class="wpforo-box-l3a-right" <?php echo $rsz; //This is a HTML content// ?>>
|
84 |
-
<span class="author-name"><?php wpforo_member_link($member); ?></span> <span><?php
|
85 |
-
|
|
|
86 |
<?php wpforo_member_title($member) ?>
|
87 |
</span><br />
|
88 |
<?php wpforo_member_badge($member, ' | ') ?>
|
89 |
-
<span class="author-posts"
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
<span class="author-stat-item"><i class="fa fa-comment wpfcl-0" title="<?php wpforo_phrase('Comments') ?>"></i><?php echo intval($member['comments']) ?></span>
|
94 |
-
</span>
|
95 |
</div>
|
96 |
<div class="wpf-clear"></div>
|
97 |
</div>
|
@@ -101,10 +100,10 @@
|
|
101 |
<div class="wpforo-post-tool-bar">
|
102 |
<?php if( $post['is_first_post'] ){
|
103 |
$buttons = array( 'report', 'sticky', 'private', 'close', 'move', 'approved', 'edit', 'delete' );
|
104 |
-
|
105 |
}else{
|
106 |
$buttons = array( 'report', 'edit', 'approved', 'delete' );
|
107 |
-
|
108 |
} ?>
|
109 |
</div>
|
110 |
</div><!-- right -->
|
@@ -113,7 +112,7 @@
|
|
113 |
</div><!-- post-wrap -->
|
114 |
|
115 |
<?php
|
116 |
-
$comments =
|
117 |
if(is_array($comments) && !empty($comments)):
|
118 |
foreach($comments as $comment) : ?>
|
119 |
<?php $comment_member = wpforo_member($comment); ?>
|
@@ -134,7 +133,7 @@
|
|
134 |
<div class="wpforo-comment-action-links">
|
135 |
<?php
|
136 |
$buttons = array( 'report', 'approved', 'edit', 'delete', 'link' );
|
137 |
-
|
138 |
?>
|
139 |
</div>
|
140 |
</div>
|
6 |
<div class="wpfl-3">
|
7 |
<div class="wpforo-post-head">
|
8 |
<div class="wpf-left"> <a href="<?php echo esc_url( wpforo_post($topic['last_post'], 'url') ); ?>" class="wpfcl-2"><i class="fa fa-caret-square-o-down fa-0x wpfcl-3"></i> <span class="wpfcl-3"><?php wpforo_phrase('Last Post'); ?></span></a></div>
|
9 |
+
<div class="wpf-right"> <?php if( wpforo_feature('rss-feed') ): ?><a href="<?php WPF()->feed->rss2_url(); ?>" class="wpfcl-2" title="<?php wpforo_phrase('Topic RSS Feed') ?>"><span class="wpfcl-3"><?php wpforo_phrase('RSS') ?></span> <i class="fa fa-rss fa-0x wpfcl-3"></i></a><?php endif; ?></div>
|
10 |
<br class="wpf-clear" />
|
11 |
</div>
|
12 |
<?php foreach($posts as $key => $post ) : $is_topic = ( $key ? FALSE : TRUE ); ?>
|
20 |
<div class="wpf-positive">
|
21 |
<?php
|
22 |
$buttons = array('positivevote');
|
23 |
+
WPF()->tpl->buttons( $buttons, $forum, $topic, $post, $is_topic );
|
24 |
?>
|
25 |
</div>
|
26 |
<div class="wpf-vote-number">
|
27 |
+
<span id="wpfvote-num-<?php echo wpforo_bigintval($post['postid']) ?>" class="wpfcl-0">
|
28 |
+
<?php echo $post['votes']; ?>
|
29 |
</span>
|
30 |
</div>
|
31 |
<div class="wpf-negative">
|
32 |
<?php
|
33 |
$buttons = array('negativevote');
|
34 |
+
WPF()->tpl->buttons( $buttons, $forum, $topic, $post, $is_topic );
|
35 |
?>
|
36 |
</div>
|
37 |
|
38 |
<?php
|
39 |
if( !$post['is_first_post'] ){
|
40 |
$buttons = array( 'isanswer' );
|
41 |
+
WPF()->tpl->buttons( $buttons, $forum, $topic, $post, $is_topic );
|
42 |
}
|
43 |
?>
|
44 |
</div>
|
46 |
<div class="wpf-right">
|
47 |
<div class="wpforo-post-content-top">
|
48 |
<?php if($post['status']): ?><span class="wpf-mod-message"><i class="fa fa-exclamation-circle" aria-hidden="true"></i> <?php wpforo_phrase('Awaiting moderation') ?></span><?php endif; ?>
|
49 |
+
<div class="wpforo-post-link"><?php $buttons = array( 'link' ); WPF()->tpl->buttons( $buttons, $forum, $topic, $post, $is_topic ); ?></div>
|
50 |
<div class="wpforo-post-date"><?php wpforo_date($post['created']); ?></div>
|
51 |
<div class="wpf-clear-right"></div>
|
52 |
</div>
|
54 |
<?php echo wpforo_content_filter( wpforo_kses($post['body'], 'post') ) ?>
|
55 |
<?php wpforo_post_edited($post); ?>
|
56 |
<?php do_action( 'wpforo_tpl_post_loop_after_content', $post, $member ) ?>
|
57 |
+
<?php if( wpforo_feature('signature') ): ?>
|
58 |
<?php if( trim($member['signature'])): ?><div class="wpforo-post-signature"><?php echo wpautop(wpforo_kses(stripslashes($member['signature']), 'user_description')) ?></div><?php endif ?>
|
59 |
<?php endif; ?>
|
60 |
</div>
|
64 |
if( $post['is_first_post'] ){
|
65 |
$buttons = array( 'answer' );
|
66 |
echo '<div class="wpf-answer-button">';
|
67 |
+
WPF()->tpl->buttons( $buttons, $forum, $topic, $post, $is_topic );
|
68 |
echo '</div>';
|
69 |
}
|
70 |
$buttons = array( 'comment' );
|
71 |
echo '<div class="wpf-add-comment-button">';
|
72 |
+
WPF()->tpl->buttons( $buttons, $forum, $topic, $post, $is_topic );
|
73 |
echo '</div>';
|
74 |
?>
|
75 |
</div>
|
77 |
<div class="wpforo-box-l3a-wrap wpforo-post-author-data-content">
|
78 |
<div class="wpforo-box-l3a-top"></div>
|
79 |
<div class="wpforo-box-l3a-lr">
|
80 |
+
<?php if( WPF()->perm->usergroup_can('va') && wpforo_feature('avatars') ): $rsz =''; ?>
|
81 |
+
<div class="wpforo-box-l3a-left"><?php echo WPF()->member->avatar($member, 'alt="'.esc_attr($member['display_name']).'"', 96) ?></div>
|
82 |
<?php else: $rsz = 'style="margin-left:10px;"'; endif; ?>
|
83 |
<div class="wpforo-box-l3a-right" <?php echo $rsz; //This is a HTML content// ?>>
|
84 |
+
<span class="author-name"><?php wpforo_member_link($member); ?></span> <span><?php WPF()->member->show_online_indicator($member['userid']) ?></span><br />
|
85 |
+
<?php wpforo_member_nicename($member, '@'); ?>
|
86 |
+
<span class="author-title">
|
87 |
<?php wpforo_member_title($member) ?>
|
88 |
</span><br />
|
89 |
<?php wpforo_member_badge($member, ' | ') ?>
|
90 |
+
<span class="author-posts"><?php echo intval($member['posts']) ?> <?php wpforo_phrase('Posts') ?></span><br />
|
91 |
+
<span class="author-stat-item"><i class="fa fa-question-circle wpfcl-6" title="<?php wpforo_phrase('Questions') ?>"></i><?php echo intval($member['questions']) ?></span>
|
92 |
+
<span class="author-stat-item"><i class="fa fa-check-square wpfcl-5" title="<?php wpforo_phrase('Answers') ?>"></i><?php echo intval($member['answers']) ?></span>
|
93 |
+
<span class="author-stat-item"><i class="fa fa-comment wpfcl-0" title="<?php wpforo_phrase('Comments') ?>"></i><?php echo intval($member['comments']) ?></span>
|
|
|
|
|
94 |
</div>
|
95 |
<div class="wpf-clear"></div>
|
96 |
</div>
|
100 |
<div class="wpforo-post-tool-bar">
|
101 |
<?php if( $post['is_first_post'] ){
|
102 |
$buttons = array( 'report', 'sticky', 'private', 'close', 'move', 'approved', 'edit', 'delete' );
|
103 |
+
WPF()->tpl->buttons( $buttons, $forum, $topic, $post, $is_topic );
|
104 |
}else{
|
105 |
$buttons = array( 'report', 'edit', 'approved', 'delete' );
|
106 |
+
WPF()->tpl->buttons( $buttons, $forum, $topic, $post );
|
107 |
} ?>
|
108 |
</div>
|
109 |
</div><!-- right -->
|
112 |
</div><!-- post-wrap -->
|
113 |
|
114 |
<?php
|
115 |
+
$comments = WPF()->post->get_posts( array( 'parentid' => $post['postid'] ) );
|
116 |
if(is_array($comments) && !empty($comments)):
|
117 |
foreach($comments as $comment) : ?>
|
118 |
<?php $comment_member = wpforo_member($comment); ?>
|
133 |
<div class="wpforo-comment-action-links">
|
134 |
<?php
|
135 |
$buttons = array( 'report', 'approved', 'edit', 'delete', 'link' );
|
136 |
+
WPF()->tpl->buttons( $buttons, $forum, $comment, $comment );
|
137 |
?>
|
138 |
</div>
|
139 |
</div>
|
wpf-themes/classic/layouts/3/topic.php
CHANGED
@@ -19,16 +19,16 @@
|
|
19 |
$last_poster = wpforo_member($last_post);
|
20 |
}
|
21 |
$topic_url = wpforo_topic($topic['topicid'], 'url');
|
22 |
-
$classes =
|
23 |
|
19 |
$last_poster = wpforo_member($last_post);
|
20 |
}
|
21 |
$topic_url = wpforo_topic($topic['topicid'], 'url');
|
22 |
+
$classes = WPF()->tpl->icon('topic', $topic, false);
|
23 |
|