wpForo Forum - Version 1.9.6

Version Description

Download this release

Release Info

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

Code changes from version 1.9.5 to 1.9.6

readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: gVectors Team
3
  Tags: forum, forums, forum plugin, WordPress forum plugin, community, discussion
4
  Requires at least: 4.1
5
- Tested up to: 5.6
6
- Stable tag: 1.9.5
7
  Requires PHP: 5.6 and higher
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -165,6 +165,26 @@ Find wpForo forum plugin addons on [gVectors Team website...](https://gvectors.c
165
 
166
  == Changelog ==
167
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  = wpForo Forum 1.9.4 / 1.9.5 | 25.02.2021 =
169
 
170
  [wpForo Forum v1.9.4 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-9-4-is-released/)
@@ -192,13 +212,6 @@ Find wpForo forum plugin addons on [gVectors Team website...](https://gvectors.c
192
  * New Addon: [wpForo Syntax Highlighter](https://gvectors.com/product/wpforo-syntax-highlighter/)
193
  * New Addon: [wpForo Topic Prefix & Tag Manager](https://gvectors.com/product/wpforo-topic-prefix/)
194
 
195
- IMPORTANT NOTES for UPDATE
196
-
197
- - After the update, please delete all caches.
198
- - If you have a Minifier/Optimizer plugins please delete all caches.
199
- - If you use CDN and found some issues please purge it.
200
- - Some JS and CSS files are changed, please refresh (press Ctrl+F5) on forum front-end twice to reset browser cache, otherwise you'll see crashed design.
201
-
202
 
203
  = wpForo Forum 1.9.2 / 1.9.3 | 19.12.2020 =
204
 
2
  Contributors: gVectors Team
3
  Tags: forum, forums, forum plugin, WordPress forum plugin, community, discussion
4
  Requires at least: 4.1
5
+ Tested up to: 5.7
6
+ Stable tag: 1.9.6
7
  Requires PHP: 5.6 and higher
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
165
 
166
  == Changelog ==
167
 
168
+ = wpForo Forum 1.9.6 | 12.03.2021 =
169
+
170
+ [wpForo Forum v1.9.6 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-9-6-is-released/)
171
+
172
+ * Added: WordPress 5.7 compatibility
173
+ * Fixed Bug: Problem with the filter 'not replied posts' in recent posts page
174
+ * Fixed Bug: Inactive user is shown in the footer latest member section
175
+ * Fixed Bug: Wrong link to font-awesome icons
176
+ * Fixed Bug: Threaded layout avatars size issue on high resolution screens
177
+ * Core Update: Important changes for wpForo Private Message addon
178
+ * Core Update: Important changes for wpForo Topic Custom Fields addon
179
+
180
+ IMPORTANT NOTES for UPDATE
181
+
182
+ - After the update, please delete all caches.
183
+ - If you have a Minifier/Optimizer plugins please delete all caches.
184
+ - If you use CDN and found some issues please purge it.
185
+ - Some JS and CSS files are changed, please refresh (press Ctrl+F5) on forum front-end twice to reset browser cache, otherwise you'll see crashed design.
186
+
187
+
188
  = wpForo Forum 1.9.4 / 1.9.5 | 25.02.2021 =
189
 
190
  [wpForo Forum v1.9.4 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-9-4-is-released/)
212
  * New Addon: [wpForo Syntax Highlighter](https://gvectors.com/product/wpforo-syntax-highlighter/)
213
  * New Addon: [wpForo Topic Prefix & Tag Manager](https://gvectors.com/product/wpforo-topic-prefix/)
214
 
 
 
 
 
 
 
 
215
 
216
  = wpForo Forum 1.9.2 / 1.9.3 | 19.12.2020 =
217
 
wpf-admin/css/admin.css CHANGED
@@ -377,4 +377,8 @@ body{
377
  margin: 0;
378
  line-height: 1.4;
379
  border-bottom: 1px solid #ccd0d4;
 
 
 
 
380
  }
377
  margin: 0;
378
  line-height: 1.4;
379
  border-bottom: 1px solid #ccd0d4;
380
+ }
381
+
382
+ body[class*=forums_page_wpforo] #wpfooter{
383
+ position: static;
384
  }
wpf-admin/options-tabs/members.php CHANGED
@@ -114,7 +114,7 @@
114
  <th style="text-align:center;width:10%;"><?php _e('Short Badge', 'wpforo'); ?></th>
115
  <th style="text-align:center;width:10%;"><?php _e('Full Badge', 'wpforo'); ?></th>
116
  <th style="text-align:center;width:10%;"><?php _e('Rating Color', 'wpforo'); ?></th>
117
- <th style="width:20%;"><?php _e('Rating Icon', 'wpforo'); ?> | <a href="https://fontawesome.io/icons/" target="_blank" style="text-decoration:none;"><?php _e('More', 'wpforo'); ?>&raquo;</a></th>
118
  </tr>
119
  <?php $levels = WPF()->member->levels(); ?>
120
  <?php foreach( $levels as $level ): ?>
114
  <th style="text-align:center;width:10%;"><?php _e('Short Badge', 'wpforo'); ?></th>
115
  <th style="text-align:center;width:10%;"><?php _e('Full Badge', 'wpforo'); ?></th>
116
  <th style="text-align:center;width:10%;"><?php _e('Rating Color', 'wpforo'); ?></th>
117
+ <th style="width:20%;"><?php _e('Rating Icon', 'wpforo'); ?> | <a href="https://fontawesome.com/icons?d=gallery&p=2&m=free" target="_blank" style="text-decoration:none;"><?php _e('More', 'wpforo'); ?>&raquo;</a></th>
118
  </tr>
119
  <?php $levels = WPF()->member->levels(); ?>
120
  <?php foreach( $levels as $level ): ?>
wpf-includes/class-cache.php CHANGED
@@ -58,7 +58,7 @@ class wpForoCache{
58
  }
59
 
60
  public function on( $type = 'object_cashe' ){
61
- if( $type == 'html_cashe' ){
62
  if( wpforo_feature('output-buffer') && function_exists('ob_start') ){
63
  return wpforo_feature( 'html_cashe');
64
  }
58
  }
59
 
60
  public function on( $type = 'object_cashe' ){
61
+ if( $type === 'html_cashe' ){
62
  if( wpforo_feature('output-buffer') && function_exists('ob_start') ){
63
  return wpforo_feature( 'html_cashe');
64
  }
wpf-includes/class-forms.php CHANGED
@@ -815,8 +815,12 @@ class wpForoForm{
815
  $file_name = esc_attr( $file_name );
816
  $extension = pathinfo($f['value'], PATHINFO_EXTENSION);
817
  if( wpforo_is_image( $extension ) ){
818
- $f['value'] = sprintf('<a href="%s" target="_blank" title="%s"><img src="%s" alt="%s" class="wpf-field-file-img" style="max-width:120px; max-height:120px" /></a>', $file_url, $file_name, $file_url, $file_name );
819
- } else {
 
 
 
 
820
  $f['value'] = sprintf('<a href="%s" target="_blank">%s</a>', $file_url, $file_name );
821
  }
822
  }
815
  $file_name = esc_attr( $file_name );
816
  $extension = pathinfo($f['value'], PATHINFO_EXTENSION);
817
  if( wpforo_is_image( $extension ) ){
818
+ $f['value'] = sprintf('<a href="%1$s" target="_blank" title="%2$s"><img src="%1$s" alt="%2$s" class="wpf-field-file-img" style="max-width:120px; max-height:120px" /></a>', $file_url, $file_name );
819
+ }elseif( wpforo_is_audio($extension) ) {
820
+ $f['value'] = sprintf('<audio src="%1$s" controls title="%2$s"></audio>', $file_url, $file_name );
821
+ }elseif( wpforo_is_video($extension) ) {
822
+ $f['value'] = sprintf('<video src="%1$s" controls title="%2$s"></video>', $file_url, $file_name );
823
+ }else{
824
  $f['value'] = sprintf('<a href="%s" target="_blank">%s</a>', $file_url, $file_name );
825
  }
826
  }
wpf-includes/class-forums.php CHANGED
@@ -683,11 +683,11 @@ class wpForoForum{
683
  WHERE @id IS NOT NULL";
684
  $sql = WPF()->db->prepare($sql, implode(',', $forumids));
685
 
686
- if( WPF()->sql_cache->is_exist($sql) ){
687
- $grouped_forumids = WPF()->sql_cache->get($sql);
688
  }else{
689
  $grouped_forumids = WPF()->db->get_var($sql);
690
- WPF()->sql_cache->set($sql, $grouped_forumids);
691
  }
692
 
693
  if($grouped_forumids){
@@ -712,11 +712,11 @@ class wpForoForum{
712
  $sql = "SELECT `parentid` FROM `".WPF()->tables->forums."` WHERE `forumid` = %d AND `parentid` <> %d";
713
  $sql = WPF()->db->prepare($sql, intval($forumid), intval($forumid));
714
 
715
- if( WPF()->sql_cache->is_exist($sql) ){
716
- $parentid = WPF()->sql_cache->get($sql);
717
  }else{
718
  $parentid = WPF()->db->get_var($sql);
719
- WPF()->sql_cache->set($sql, $parentid);
720
  }
721
 
722
  if($parentid){
683
  WHERE @id IS NOT NULL";
684
  $sql = WPF()->db->prepare($sql, implode(',', $forumids));
685
 
686
+ if( WPF()->ram_cache->is_exist($sql) ){
687
+ $grouped_forumids = WPF()->ram_cache->get($sql);
688
  }else{
689
  $grouped_forumids = WPF()->db->get_var($sql);
690
+ WPF()->ram_cache->set($sql, $grouped_forumids);
691
  }
692
 
693
  if($grouped_forumids){
712
  $sql = "SELECT `parentid` FROM `".WPF()->tables->forums."` WHERE `forumid` = %d AND `parentid` <> %d";
713
  $sql = WPF()->db->prepare($sql, intval($forumid), intval($forumid));
714
 
715
+ if( WPF()->ram_cache->is_exist($sql) ){
716
+ $parentid = WPF()->ram_cache->get($sql);
717
  }else{
718
  $parentid = WPF()->db->get_var($sql);
719
+ WPF()->ram_cache->set($sql, $parentid);
720
  }
721
 
722
  if($parentid){
wpf-includes/class-members.php CHANGED
@@ -836,6 +836,8 @@ class wpForoMember{
836
  $profile_fields_types[] = '%d';
837
  }
838
 
 
 
839
  if( !empty($profile_fields) ){
840
  $result_profile = WPF()->db->update(
841
  WPF()->tables->profiles,
@@ -1930,6 +1932,7 @@ class wpForoMember{
1930
  WPF()->current_usermeta = $user_meta;
1931
  WPF()->current_user_groupid = WPF()->current_user['groupid'];
1932
  WPF()->current_user_secondary_groupids = ( wpfkey(WPF()->current_user, 'secondary_groups') ) ? WPF()->current_user['secondary_groups'] : '';
 
1933
  WPF()->current_user_status = ( isset($user['status']) ? $user['status'] : '' );;
1934
  $this->update_online_time();
1935
  }elseif ( $guest = $this->get_guest_cookies() ){
836
  $profile_fields_types[] = '%d';
837
  }
838
 
839
+ $profile_fields = apply_filters('wpforo_before_update_profile_fields', $profile_fields, $userid, $data, $check_permissions);
840
+
841
  if( !empty($profile_fields) ){
842
  $result_profile = WPF()->db->update(
843
  WPF()->tables->profiles,
1932
  WPF()->current_usermeta = $user_meta;
1933
  WPF()->current_user_groupid = WPF()->current_user['groupid'];
1934
  WPF()->current_user_secondary_groupids = ( wpfkey(WPF()->current_user, 'secondary_groups') ) ? WPF()->current_user['secondary_groups'] : '';
1935
+ WPF()->current_user_groupids = array_unique( array_filter( array_merge( (array) WPF()->current_user_groupid, array_map('intval', (array) ( is_scalar(WPF()->current_user_secondary_groupids) ? explode(',', WPF()->current_user_secondary_groupids) : WPF()->current_user_secondary_groupids ))) ) );
1936
  WPF()->current_user_status = ( isset($user['status']) ? $user['status'] : '' );;
1937
  $this->update_online_time();
1938
  }elseif ( $guest = $this->get_guest_cookies() ){
wpf-includes/class-postmeta.php CHANGED
@@ -240,13 +240,13 @@ class wpForoPostMeta {
240
  if( !$metaid = wpforo_bigintval($metaid) ) return null;
241
 
242
  $key = 'get_postmeta_by_id_' . $metaid;
243
- if( WPF()->sql_cache->is_exist($key) ) return WPF()->sql_cache->get($key);
244
 
245
  if( $postmeta = (array) WPF()->db->get_row( $this->build_sql_select( array('include' => $metaid) ), ARRAY_A ) ){
246
  $postmeta = $this->fix_postmeta($postmeta);
247
  }
248
 
249
- WPF()->sql_cache->set($key, $postmeta);
250
  return $postmeta;
251
  }
252
 
@@ -277,11 +277,11 @@ class wpForoPostMeta {
277
  if( empty($args) ) return array();
278
 
279
  $key = 'get_postmetas_' . json_encode($args) . '_' . $field;
280
- if( WPF()->sql_cache->is_exist($key) ) return WPF()->sql_cache->get($key);
281
 
282
  $postmetas = (array) WPF()->db->get_col( $this->build_sql_select($args, "`{$field}`") );
283
 
284
- WPF()->sql_cache->set($key, $postmetas);
285
  return $postmetas;
286
  }
287
 
@@ -295,13 +295,13 @@ class wpForoPostMeta {
295
  if( empty($args) ) return array();
296
 
297
  $key = 'get_postmetas_' . json_encode($args);
298
- if( WPF()->sql_cache->is_exist($key) ) return WPF()->sql_cache->get($key);
299
 
300
  if( $postmetas = (array) WPF()->db->get_results( $this->build_sql_select($args), ARRAY_A ) ){
301
  $postmetas = array_map( array($this, 'fix_postmeta'), $postmetas );
302
  }
303
 
304
- WPF()->sql_cache->set($key, $postmetas);
305
  return $postmetas;
306
  }
307
 
@@ -317,7 +317,7 @@ class wpForoPostMeta {
317
  $metakeys = array_filter((array) $metakeys);
318
 
319
  $key = 'get_postmeta_' . $postid . '_'. json_encode($metakeys) . '_' . (string) $single;
320
- if( WPF()->sql_cache->is_exist($key) ) return WPF()->sql_cache->get($key);
321
 
322
  $postmeta = null;
323
 
@@ -348,7 +348,7 @@ class wpForoPostMeta {
348
  }
349
  }
350
 
351
- WPF()->sql_cache->set($key, $postmeta);
352
  return $postmeta;
353
  }
354
 
@@ -419,7 +419,7 @@ class wpForoPostMeta {
419
  $allowed_mime_types = get_allowed_mime_types();
420
  foreach( $_FILES['data']['type'] as $k => $mime_type ){
421
  if( in_array($k, $fields_list) ){
422
- $field = WPF()->post->get_field($k);
423
  $label = ($field['label'] ? $field['label'] : $field['fieldKey']);
424
 
425
  if( $error = intval( wpfval($_FILES, 'data', 'error', $k) ) ){
240
  if( !$metaid = wpforo_bigintval($metaid) ) return null;
241
 
242
  $key = 'get_postmeta_by_id_' . $metaid;
243
+ if( WPF()->ram_cache->is_exist($key) ) return WPF()->ram_cache->get($key);
244
 
245
  if( $postmeta = (array) WPF()->db->get_row( $this->build_sql_select( array('include' => $metaid) ), ARRAY_A ) ){
246
  $postmeta = $this->fix_postmeta($postmeta);
247
  }
248
 
249
+ WPF()->ram_cache->set($key, $postmeta);
250
  return $postmeta;
251
  }
252
 
277
  if( empty($args) ) return array();
278
 
279
  $key = 'get_postmetas_' . json_encode($args) . '_' . $field;
280
+ if( WPF()->ram_cache->is_exist($key) ) return WPF()->ram_cache->get($key);
281
 
282
  $postmetas = (array) WPF()->db->get_col( $this->build_sql_select($args, "`{$field}`") );
283
 
284
+ WPF()->ram_cache->set($key, $postmetas);
285
  return $postmetas;
286
  }
287
 
295
  if( empty($args) ) return array();
296
 
297
  $key = 'get_postmetas_' . json_encode($args);
298
+ if( WPF()->ram_cache->is_exist($key) ) return WPF()->ram_cache->get($key);
299
 
300
  if( $postmetas = (array) WPF()->db->get_results( $this->build_sql_select($args), ARRAY_A ) ){
301
  $postmetas = array_map( array($this, 'fix_postmeta'), $postmetas );
302
  }
303
 
304
+ WPF()->ram_cache->set($key, $postmetas);
305
  return $postmetas;
306
  }
307
 
317
  $metakeys = array_filter((array) $metakeys);
318
 
319
  $key = 'get_postmeta_' . $postid . '_'. json_encode($metakeys) . '_' . (string) $single;
320
+ if( WPF()->ram_cache->is_exist($key) ) return WPF()->ram_cache->get($key);
321
 
322
  $postmeta = null;
323
 
348
  }
349
  }
350
 
351
+ WPF()->ram_cache->set($key, $postmeta);
352
  return $postmeta;
353
  }
354
 
419
  $allowed_mime_types = get_allowed_mime_types();
420
  foreach( $_FILES['data']['type'] as $k => $mime_type ){
421
  if( in_array($k, $fields_list) ){
422
+ $field = WPF()->post->get_field($k, $forum);
423
  $label = ($field['label'] ? $field['label'] : $field['fieldKey']);
424
 
425
  if( $error = intval( wpfval($_FILES, 'data', 'error', $k) ) ){
wpf-includes/class-posts.php CHANGED
@@ -968,7 +968,7 @@ class wpForoPost{
968
 
969
  function search( $args = array(), &$items_count = 0 ){
970
  if(!is_array($args)) $args = array('needle' => $args);
971
- if(!wpfval($args, 'needle')) return array();
972
 
973
  $args = array_filter($args);
974
 
@@ -1555,7 +1555,11 @@ class wpForoPost{
1555
  return $unread_posts;
1556
  }
1557
 
1558
- private function init_fields(){
 
 
 
 
1559
  if( $this->fields ) return;
1560
  $all_groupids = WPF()->usergroup->get_usergroups('groupid');
1561
  $all_groupids = array_map('intval', $all_groupids);
@@ -1749,7 +1753,7 @@ class wpForoPost{
1749
  'isSearchable' => 0
1750
  );*/
1751
 
1752
- $this->fields = (array) apply_filters( 'wpforo_post_after_init_fields', $this->fields );
1753
 
1754
  $this->fields = array_map(array($this, 'fix_field'), $this->fields);
1755
  }
@@ -1760,16 +1764,16 @@ class wpForoPost{
1760
  return $field;
1761
  }
1762
 
1763
- public function get_fields($only_defaults = false){
1764
- $this->init_fields();
1765
  $fields = $this->fields;
1766
  if($only_defaults) foreach ($fields as $k => $v) if( !wpfval($v, 'isDefault') ) unset($fields[$k]);
1767
  return $fields;
1768
  }
1769
 
1770
- public function get_field($key){
1771
  if( is_string($key) ){
1772
- $this->init_fields();
1773
  return (array) wpfval($this->fields, $key);
1774
  }elseif( $this->is_field($key) ){
1775
  return $key;
@@ -1785,7 +1789,7 @@ class wpForoPost{
1785
  return is_string($field) ? $field : (string) wpfval($field, 'fieldKey');
1786
  }
1787
 
1788
- public function fields_structure_full_array($fields, &$used_fields = array() ){
1789
  if(is_string($fields)) $fields = maybe_unserialize($fields);
1790
  $fs = array(array(array()));
1791
  if(!is_array($fields)) return $fs;
@@ -1795,7 +1799,7 @@ class wpForoPost{
1795
  if( is_array($cols) ){
1796
  foreach( $cols as $kf => $field ){
1797
  $used_fields[] = $field_key = $this->get_field_key($field);
1798
- $fs[$kr][$kc][$field_key] = $this->get_field($field);
1799
  }
1800
  }
1801
  }
@@ -1816,9 +1820,9 @@ class wpForoPost{
1816
  }
1817
 
1818
  public function get_topic_fields($forum, $values = array(), $guest = false ){
1819
- $fields = $this->fields_structure_full_array( $this->get_topic_fields_structure(false, $forum, $guest), $used_fields );
1820
- if( !in_array('title', $used_fields, true) ) $fields[][][] = $this->get_field('title');
1821
- if( !in_array('body', $used_fields, true) ) $fields[][][] = $this->get_field('body');
1822
 
1823
  /**
1824
  * apply old options to fields
@@ -2087,10 +2091,10 @@ class wpForoPost{
2087
  public function get_search_fields($values){
2088
  $values = (array) $values;
2089
  $values = wp_slash($values);
2090
- $fields = $this->get_fields();
2091
 
2092
  $topic_fields = WPF()->post->get_topic_fields_list();
2093
  $topic_fields = array_flip($topic_fields);
 
2094
  $fields = array_intersect_key($fields, $topic_fields);
2095
 
2096
  $search_fields = array();
@@ -2112,7 +2116,7 @@ class wpForoPost{
2112
  $fields = WPF()->post->get_topic_fields_list(false, $forum);
2113
  foreach ( $fields as $field ){
2114
  if( $postmeta = wpfval($postmetas, $field) ){
2115
- $field = WPF()->post->get_field($field);
2116
  if( !(int) wpfval($field, 'isDefault') ){
2117
  $field['value'] = $postmeta;
2118
  $field = WPF()->form->prepare_values( WPF()->form->esc_field($field) );
968
 
969
  function search( $args = array(), &$items_count = 0 ){
970
  if(!is_array($args)) $args = array('needle' => $args);
971
+ if(!wpfval($args, 'needle') && !wpfval($args, 'postids')) return array();
972
 
973
  $args = array_filter($args);
974
 
1555
  return $unread_posts;
1556
  }
1557
 
1558
+ public function reset_fields(){
1559
+ $this->fields = array();
1560
+ }
1561
+
1562
+ private function init_fields( $forum = array() ){
1563
  if( $this->fields ) return;
1564
  $all_groupids = WPF()->usergroup->get_usergroups('groupid');
1565
  $all_groupids = array_map('intval', $all_groupids);
1753
  'isSearchable' => 0
1754
  );*/
1755
 
1756
+ $this->fields = (array) apply_filters( 'wpforo_post_after_init_fields', $this->fields, $forum );
1757
 
1758
  $this->fields = array_map(array($this, 'fix_field'), $this->fields);
1759
  }
1764
  return $field;
1765
  }
1766
 
1767
+ public function get_fields($only_defaults = false, $forum = array()){
1768
+ $this->init_fields($forum);
1769
  $fields = $this->fields;
1770
  if($only_defaults) foreach ($fields as $k => $v) if( !wpfval($v, 'isDefault') ) unset($fields[$k]);
1771
  return $fields;
1772
  }
1773
 
1774
+ public function get_field($key, $forum = array()){
1775
  if( is_string($key) ){
1776
+ $this->init_fields($forum);
1777
  return (array) wpfval($this->fields, $key);
1778
  }elseif( $this->is_field($key) ){
1779
  return $key;
1789
  return is_string($field) ? $field : (string) wpfval($field, 'fieldKey');
1790
  }
1791
 
1792
+ public function fields_structure_full_array($fields, &$used_fields = array(), $forum = array() ){
1793
  if(is_string($fields)) $fields = maybe_unserialize($fields);
1794
  $fs = array(array(array()));
1795
  if(!is_array($fields)) return $fs;
1799
  if( is_array($cols) ){
1800
  foreach( $cols as $kf => $field ){
1801
  $used_fields[] = $field_key = $this->get_field_key($field);
1802
+ $fs[$kr][$kc][$field_key] = $this->get_field($field, $forum);
1803
  }
1804
  }
1805
  }
1820
  }
1821
 
1822
  public function get_topic_fields($forum, $values = array(), $guest = false ){
1823
+ $fields = $this->fields_structure_full_array( $this->get_topic_fields_structure(false, $forum, $guest), $used_fields, $forum );
1824
+ if( !in_array('title', $used_fields, true) ) $fields[][][] = $this->get_field('title', $forum);
1825
+ if( !in_array('body', $used_fields, true) ) $fields[][][] = $this->get_field('body', $forum);
1826
 
1827
  /**
1828
  * apply old options to fields
2091
  public function get_search_fields($values){
2092
  $values = (array) $values;
2093
  $values = wp_slash($values);
 
2094
 
2095
  $topic_fields = WPF()->post->get_topic_fields_list();
2096
  $topic_fields = array_flip($topic_fields);
2097
+ $fields = $this->get_fields();
2098
  $fields = array_intersect_key($fields, $topic_fields);
2099
 
2100
  $search_fields = array();
2116
  $fields = WPF()->post->get_topic_fields_list(false, $forum);
2117
  foreach ( $fields as $field ){
2118
  if( $postmeta = wpfval($postmetas, $field) ){
2119
+ $field = WPF()->post->get_field($field, $forum);
2120
  if( !(int) wpfval($field, 'isDefault') ){
2121
  $field['value'] = $postmeta;
2122
  $field = WPF()->form->prepare_values( WPF()->form->esc_field($field) );
wpf-includes/class-ramcache.php ADDED
@@ -0,0 +1,78 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly
3
+ if( !defined( 'ABSPATH' ) ) exit;
4
+
5
+ class wpForoRamCache {
6
+ /**
7
+ * @var array
8
+ */
9
+ private static $sql_cache;
10
+
11
+ /**
12
+ * wpForoSqlCache constructor.
13
+ */
14
+ public function __construct() {
15
+ $this->reset();
16
+ }
17
+
18
+ /**
19
+ * set empty array to static $sql_cache
20
+ *
21
+ * @param mixed $key
22
+ *
23
+ * @return void
24
+ */
25
+ public function reset( $key = null ) {
26
+ if( is_null($key) ){
27
+ self::$sql_cache = array();
28
+ }else{
29
+ unset( self::$sql_cache[ $this->fix_key($key) ] );
30
+ }
31
+ }
32
+
33
+ /**
34
+ * @param mixed $key
35
+ *
36
+ * @return string
37
+ */
38
+ private function fix_key( $key ) {
39
+ if( !is_scalar($key) ) $key = json_encode($key);
40
+ return md5($key);
41
+ }
42
+
43
+ /**
44
+ * checking if this sql query already cached
45
+ *
46
+ * @param mixed $key string SQL query
47
+ *
48
+ * @return bool
49
+ */
50
+ public function is_exist( $key ) {
51
+ return array_key_exists( $this->fix_key($key), self::$sql_cache );
52
+ }
53
+
54
+ /**
55
+ * return already cached SQL data
56
+ *
57
+ * @param mixed $key string sql query
58
+ *
59
+ * @return mixed
60
+ */
61
+ public function get( $key ) {
62
+ if( $this->is_exist($key) ){
63
+ return self::$sql_cache[ $this->fix_key($key) ];
64
+ }else{
65
+ return null;
66
+ }
67
+ }
68
+
69
+ /**
70
+ * storing a cache of provided SQL data
71
+ *
72
+ * @param mixed $key string sql query
73
+ * @param mixed $data
74
+ */
75
+ public function set( $key, $data ) {
76
+ self::$sql_cache[ $this->fix_key($key) ] = $data;
77
+ }
78
+ }
wpf-includes/class-sqlcache.php DELETED
@@ -1,60 +0,0 @@
1
- <?php
2
- // Exit if accessed directly
3
- if( !defined( 'ABSPATH' ) ) exit;
4
-
5
- class wpForoSqlCache {
6
- /**
7
- * @var array
8
- */
9
- private static $sql_cache;
10
-
11
- /**
12
- * wpForoSqlCache constructor.
13
- */
14
- public function __construct() {
15
- $this->reset();
16
- }
17
-
18
- /**
19
- * set empty array to static $sql_cache
20
- */
21
- public function reset() {
22
- self::$sql_cache = array();
23
- }
24
-
25
- /**
26
- * checking if this sql query already cached
27
- *
28
- * @param string $key string SQL query
29
- *
30
- * @return bool
31
- */
32
- public function is_exist( $key ) {
33
- return array_key_exists( md5( $key ), self::$sql_cache );
34
- }
35
-
36
- /**
37
- * return already cached SQL data
38
- *
39
- * @param string $key string sql query
40
- *
41
- * @return mixed
42
- */
43
- public function get( $key ) {
44
- if( $this->is_exist($key) ){
45
- return self::$sql_cache[ md5( $key ) ];
46
- }else{
47
- return null;
48
- }
49
- }
50
-
51
- /**
52
- * storing a cache of provided SQL data
53
- *
54
- * @param string $key string sql query
55
- * @param mixed $data
56
- */
57
- public function set( $key, $data ) {
58
- self::$sql_cache[ md5( $key ) ] = $data;
59
- }
60
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
wpf-includes/class-subscribes.php CHANGED
@@ -269,11 +269,11 @@ class wpForoSubscribe{
269
  return FALSE;
270
  }
271
  $sql = "SELECT * FROM `".WPF()->tables->subscribes."` WHERE " . $where;
272
- if( $cache && WPF()->sql_cache->is_exist($sql) ){
273
- $subscribe = WPF()->sql_cache->get($sql);
274
  }else{
275
  $subscribe = WPF()->db->get_row($sql, ARRAY_A);
276
- if($cache) WPF()->sql_cache->set($sql, $subscribe);
277
  }
278
  return $subscribe;
279
  }
269
  return FALSE;
270
  }
271
  $sql = "SELECT * FROM `".WPF()->tables->subscribes."` WHERE " . $where;
272
+ if( $cache && WPF()->ram_cache->is_exist($sql) ){
273
+ $subscribe = WPF()->ram_cache->get($sql);
274
  }else{
275
  $subscribe = WPF()->db->get_row($sql, ARRAY_A);
276
+ if($cache) WPF()->ram_cache->set($sql, $subscribe);
277
  }
278
  return $subscribe;
279
  }
wpf-includes/class-template.php CHANGED
@@ -40,16 +40,6 @@ class wpForoTemplate{
40
  add_action('wpforo_reply_form_extra_fields_after', array($this, 'add_default_attach_input'), 10, 1);
41
  add_action('wpforo_portable_form_extra_fields_after', array($this, 'add_default_attach_input'));
42
 
43
- add_action('wpforo_register_form_end', function(){
44
- echo '<input type="hidden" name="wpfaction" value="wpforo_registration">';
45
- });
46
- add_action('wpforo_login_form_end', function(){
47
- echo '<input type="hidden" name="wpfaction" value="wpforo_login">';
48
- });
49
- add_action('wpforo_profile_account_bottom', function(){
50
- echo '<input type="hidden" name="wpfaction" value="wpforo_profile_update">';
51
- });
52
-
53
  add_filter('is_wpforo_attach_page_templates', function($templates){ $templates[] = 'add-topic'; return $templates; });
54
  add_filter('wpforo_emoticons_loading_template', function($templates){ $templates[] = 'add-topic'; return $templates; });
55
 
@@ -59,6 +49,15 @@ class wpForoTemplate{
59
  //ajax actions hooks
60
  add_action('wp_ajax_wpforo_active_tab_content_ajax', array($this, 'ajx_active_tab_content'));
61
  }
 
 
 
 
 
 
 
 
 
62
  }
63
 
64
  private function init_defaults() {
40
  add_action('wpforo_reply_form_extra_fields_after', array($this, 'add_default_attach_input'), 10, 1);
41
  add_action('wpforo_portable_form_extra_fields_after', array($this, 'add_default_attach_input'));
42
 
 
 
 
 
 
 
 
 
 
 
43
  add_filter('is_wpforo_attach_page_templates', function($templates){ $templates[] = 'add-topic'; return $templates; });
44
  add_filter('wpforo_emoticons_loading_template', function($templates){ $templates[] = 'add-topic'; return $templates; });
45
 
49
  //ajax actions hooks
50
  add_action('wp_ajax_wpforo_active_tab_content_ajax', array($this, 'ajx_active_tab_content'));
51
  }
52
+ add_action('wpforo_register_form_end', function(){
53
+ echo '<input type="hidden" name="wpfaction" value="wpforo_registration">';
54
+ });
55
+ add_action('wpforo_login_form_end', function(){
56
+ echo '<input type="hidden" name="wpfaction" value="wpforo_login">';
57
+ });
58
+ add_action('wpforo_profile_account_bottom', function(){
59
+ echo '<input type="hidden" name="wpfaction" value="wpforo_profile_update">';
60
+ });
61
  }
62
 
63
  private function init_defaults() {
wpf-includes/class-topics.php CHANGED
@@ -1665,11 +1665,11 @@ class wpForoTopic{
1665
  $sql .= " WHERE " . implode(" AND ", $wheres);
1666
 
1667
  $cache = WPF()->cache->on('memory_cashe');
1668
- if( $cache && WPF()->sql_cache->is_exist($sql) ){
1669
- $tag = WPF()->sql_cache->get($sql);
1670
  }else{
1671
  $tag = WPF()->db->get_row($sql, ARRAY_A);
1672
- if($cache) WPF()->sql_cache->set($sql, $tag);
1673
  }
1674
  return $tag;
1675
  }
1665
  $sql .= " WHERE " . implode(" AND ", $wheres);
1666
 
1667
  $cache = WPF()->cache->on('memory_cashe');
1668
+ if( $cache && WPF()->ram_cache->is_exist($sql) ){
1669
+ $tag = WPF()->ram_cache->get($sql);
1670
  }else{
1671
  $tag = WPF()->db->get_row($sql, ARRAY_A);
1672
+ if($cache) WPF()->ram_cache->set($sql, $tag);
1673
  }
1674
  return $tag;
1675
  }
wpf-includes/class-usergroups.php CHANGED
@@ -312,7 +312,7 @@ class wpForoUsergroup{
312
  $html .= sprintf('<option value="%1$s" %2$s>%3$s</option>',
313
  intval($group['groupid']),
314
  in_array($group['groupid'], $selected) ? ' selected ' : '',
315
- esc_html($group['name'])
316
  );
317
  }
318
  return $html;
312
  $html .= sprintf('<option value="%1$s" %2$s>%3$s</option>',
313
  intval($group['groupid']),
314
  in_array($group['groupid'], $selected) ? ' selected ' : '',
315
+ esc_html($group['name']) . "\t(". $group['count'] .")"
316
  );
317
  }
318
  return $html;
wpf-includes/functions-template.php CHANGED
@@ -15,7 +15,7 @@ function wpforo_login_url(){
15
  $wp_login_url = wpforo_home_url('?foro=signin&redirect_to=' . urlencode( preg_replace( '#/?\?.*$#isu', '', wpforo_get_request_uri() ) ) );
16
  }
17
  $wp_login_url = apply_filters('wpforo_login_url', $wp_login_url);
18
- return esc_url($wp_login_url);
19
  }
20
 
21
 
@@ -26,7 +26,7 @@ function wpforo_register_url(){
26
  $wp_register_url = wpforo_home_url('?foro=signup&redirect_to=' . urlencode( preg_replace( '#/?\?.*$#isu', '', wpforo_get_request_uri() ) ));
27
  }
28
  $wp_register_url = apply_filters('wpforo_register_url', $wp_register_url);
29
- return esc_url($wp_register_url);
30
  }
31
 
32
 
@@ -3033,7 +3033,7 @@ function wpforo_topic_starter($topic, $post, $type = 'full'){
3033
  }
3034
 
3035
  function wpforo_get_not_replied_topicids(){
3036
- $sql = "SELECT `topicid`, COUNT(DISTINCT userid) AS userid_count FROM `wp_wpforo_posts` GROUP BY `topicid` HAVING userid_count = 1";
3037
  return (array) WPF()->db->get_col($sql, 0);
3038
  }
3039
 
15
  $wp_login_url = wpforo_home_url('?foro=signin&redirect_to=' . urlencode( preg_replace( '#/?\?.*$#isu', '', wpforo_get_request_uri() ) ) );
16
  }
17
  $wp_login_url = apply_filters('wpforo_login_url', $wp_login_url);
18
+ return esc_url_raw($wp_login_url);
19
  }
20
 
21
 
26
  $wp_register_url = wpforo_home_url('?foro=signup&redirect_to=' . urlencode( preg_replace( '#/?\?.*$#isu', '', wpforo_get_request_uri() ) ));
27
  }
28
  $wp_register_url = apply_filters('wpforo_register_url', $wp_register_url);
29
+ return esc_url_raw($wp_register_url);
30
  }
31
 
32
 
3033
  }
3034
 
3035
  function wpforo_get_not_replied_topicids(){
3036
+ $sql = "SELECT `topicid`, COUNT(DISTINCT userid) AS userid_count FROM `". WPF()->tables->posts ."` GROUP BY `topicid` HAVING userid_count = 1";
3037
  return (array) WPF()->db->get_col($sql, 0);
3038
  }
3039
 
wpf-includes/functions.php CHANGED
@@ -71,19 +71,19 @@ function wpforo_is_admin($url = ''){
71
 
72
  function is_wpforo_page($url = ''){
73
  $key = 'is_wpforo_page_' . $url;
74
- if( WPF()->sql_cache->is_exist($key) ) return WPF()->sql_cache->get($key);
75
 
76
  if(!$url) $url = wpforo_get_request_uri();
77
  $result = ( !(wpforo_is_admin($url) || (is_wpforo_exclude_url($url) && !is_wpforo_shortcode_page($url))) && (is_wpforo_url($url) || is_wpforo_shortcode_page($url)) );
78
  $result = apply_filters( 'is_wpforo_page', $result, $url );
79
 
80
- WPF()->sql_cache->set($key, $result);
81
  return $result;
82
  }
83
 
84
  function is_wpforo_exclude_url($url = ''){
85
  $key = 'is_wpforo_exclude_url_' . $url;
86
- if( WPF()->sql_cache->is_exist($key) ) return WPF()->sql_cache->get($key);
87
 
88
  $result = false;
89
  if(!$url) $url = wpforo_get_request_uri();
@@ -106,13 +106,13 @@ function is_wpforo_exclude_url($url = ''){
106
  }
107
  }
108
 
109
- WPF()->sql_cache->set($key, $result);
110
  return $result;
111
  }
112
 
113
  function is_wpforo_url($url = ''){
114
  $key = 'is_wpforo_url_' . $url;
115
- if( WPF()->sql_cache->is_exist($key) ) return WPF()->sql_cache->get($key);
116
 
117
  $result = false;
118
  if( wpforo_is_admin($url) ){
@@ -129,7 +129,7 @@ function is_wpforo_url($url = ''){
129
  }
130
  }
131
 
132
- WPF()->sql_cache->set($key, $result);
133
  return $result;
134
  }
135
 
@@ -139,18 +139,18 @@ function is_wpforo_url($url = ''){
139
  */
140
  function is_wpforo_shortcode_page($url = ''){
141
  $key = 'is_wpforo_shortcode_page_' . $url;
142
- if( WPF()->sql_cache->is_exist($key) ) return WPF()->sql_cache->get($key);
143
 
144
  $result = !wpforo_is_admin($url) && !is_wpforo_url($url) && has_shortcode( wpforo_get_wp_post_content($url), 'wpforo' );
145
 
146
- WPF()->sql_cache->set($key, $result);
147
  return $result;
148
  }
149
 
150
  function wpforo_get_wp_post_content($url = ''){
151
  if(!$url) $url = wpforo_get_request_uri();
152
  $key = 'wpforo_get_wp_post_content_' . $url;
153
- if( WPF()->sql_cache->is_exist($key) ) return WPF()->sql_cache->get($key);
154
 
155
  $post_content = '';
156
  global $post;
@@ -160,7 +160,7 @@ function wpforo_get_wp_post_content($url = ''){
160
  $post_content = get_post_field('post_content', $postid );
161
  }
162
 
163
- WPF()->sql_cache->set($key, $post_content);
164
  return $post_content;
165
  }
166
 
@@ -1117,12 +1117,15 @@ function wpforo_deep_merge($default, $current = array()){
1117
  }
1118
 
1119
  function wpforo_is_image($e){
1120
- $is_image = false;
1121
- $e = strtolower($e);
1122
- if( $e === 'jpg' || $e === 'jpeg' || $e === 'png' || $e === 'gif' ){
1123
- $is_image = true;
1124
- }
1125
- return $is_image;
 
 
 
1126
  }
1127
 
1128
  function get_wpf_option( $option, $default = null ){
@@ -1322,28 +1325,43 @@ function wpforo_update_db(){
1322
  update_option('wpforo_version_db', WPFORO_VERSION);
1323
  }
1324
 
 
 
 
 
 
1325
  function wpforo_db_check( $args = array() ){
 
 
 
1326
  global $wpdb;
1327
 
1328
  $col = esc_sql(trim( wpfval($args, 'col') ));
1329
  $table = esc_sql(trim( wpfval($args, 'table') ));
1330
 
 
1331
  switch( trim( wpfval($args, 'check') ) ){
1332
  case 'table_exists':
1333
- return (bool) $wpdb->get_var("SHOW TABLES LIKE '{$table}'");
 
1334
  case 'col_exists':
1335
- return (bool) $wpdb->get_var("SHOW COLUMNS FROM `{$table}` LIKE '{$col}'");
1336
- case 'key_exists':
1337
- return (bool) $wpdb->get_var("SHOW KEYS FROM `{$table}` WHERE `Key_name` = '{$col}'");
 
 
1338
  case 'default_value':
1339
  $c = (array) $wpdb->get_row("SHOW COLUMNS FROM `{$table}` LIKE '{$col}'", ARRAY_A);
1340
- return wpfval($c, 'Default');
 
1341
  case 'col_type':
1342
  $c = (array) $wpdb->get_row("SHOW COLUMNS FROM `{$table}` LIKE '{$col}'", ARRAY_A);
1343
- return wpfval($c, 'Type');
 
1344
  }
1345
 
1346
- return null;
 
1347
  }
1348
 
1349
 
@@ -1890,6 +1908,11 @@ if( !function_exists('sanitize_textarea_field') && !function_exists('_sanitize_t
1890
  }
1891
  }
1892
 
 
 
 
 
 
1893
  function wpforo_current_user_is( $role ) {
1894
  $role = strtolower( $role );
1895
 
@@ -1927,6 +1950,54 @@ function wpforo_current_user_is( $role ) {
1927
  return false;
1928
  }
1929
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1930
  function wpforo_random_colors(){
1931
  mt_srand((double)microtime()*1000000); $color = '';
1932
  while(strlen($color)<6){$color .= sprintf("%02X", mt_rand(0, 255));}
@@ -2084,10 +2155,10 @@ function wpforo_get_callbacks_for_action( $hook = '' ) {
2084
  */
2085
  function wpforo_wp_url_to_postid($url) {
2086
  $key = 'wpforo_wp_url_to_postid_' . $url;
2087
- if( WPF()->sql_cache->is_exist($key) ) return WPF()->sql_cache->get($key);
2088
 
2089
  if( strpos($url, admin_url()) !== false ){
2090
- WPF()->sql_cache->set($key, 0);
2091
  return 0;
2092
  }
2093
 
@@ -2096,7 +2167,7 @@ function wpforo_wp_url_to_postid($url) {
2096
 
2097
  // Bail early if the URL does not belong to this site.
2098
  if ( $url_host && $url_host !== $home_url_host ) {
2099
- WPF()->sql_cache->set($key, 0);
2100
  return 0;
2101
  }
2102
 
@@ -2104,7 +2175,7 @@ function wpforo_wp_url_to_postid($url) {
2104
  if ( preg_match( '#[?&](p|page_id|post_id|post|attachment_id)=(\d+)#', $url, $values ) ) {
2105
  $id = absint( $values[2] );
2106
  if ( $id ) {
2107
- WPF()->sql_cache->set($key, $id);
2108
  return $id;
2109
  }
2110
  }
@@ -2137,7 +2208,7 @@ function wpforo_wp_url_to_postid($url) {
2137
  $page_on_front = get_option( 'page_on_front' );
2138
 
2139
  if ( $page_on_front && get_post( $page_on_front ) instanceof WP_Post ) {
2140
- WPF()->sql_cache->set($key, (int) $page_on_front);
2141
  return (int) $page_on_front;
2142
  }
2143
  }
@@ -2147,7 +2218,7 @@ function wpforo_wp_url_to_postid($url) {
2147
 
2148
  // Not using rewrite rules, and 'p=N' and 'page_id=N' methods failed, so we're out of options.
2149
  if ( empty( $rewrite ) ) {
2150
- WPF()->sql_cache->set($key, 0);
2151
  return 0;
2152
  }
2153
 
@@ -2230,11 +2301,11 @@ function wpforo_wp_url_to_postid($url) {
2230
 
2231
  // Do the query.
2232
  if( $p = wpforo_bigintval( wpfval($query, 'p') ) ){
2233
- WPF()->sql_cache->set($key, $p);
2234
  return $p;
2235
  }
2236
  if( $page_id = wpforo_bigintval( wpfval($query, 'page_id') ) ){
2237
- WPF()->sql_cache->set($key, $page_id);
2238
  return $page_id;
2239
  }
2240
 
@@ -2250,14 +2321,14 @@ function wpforo_wp_url_to_postid($url) {
2250
  $sql = WPF()->db->prepare($sql, $slug);
2251
  $postid = WPF()->db->get_var($sql);
2252
  if( $postid = wpforo_bigintval($postid) ) {
2253
- WPF()->sql_cache->set($key, $postid);
2254
  return $postid;
2255
  }else{
2256
- WPF()->sql_cache->set($key, 0);
2257
  return 0;
2258
  }
2259
  }else{
2260
- WPF()->sql_cache->set($key, 0);
2261
  return 0;
2262
  }
2263
 
@@ -2265,7 +2336,7 @@ function wpforo_wp_url_to_postid($url) {
2265
  }
2266
  }
2267
 
2268
- WPF()->sql_cache->set($key, 0);
2269
  return 0;
2270
  }
2271
 
@@ -2391,4 +2462,13 @@ function wpforo_clean_folder( $directory ) {
2391
  @unlink( $item );
2392
  }
2393
  }
 
 
 
 
 
 
 
 
 
2394
  }
71
 
72
  function is_wpforo_page($url = ''){
73
  $key = 'is_wpforo_page_' . $url;
74
+ if( WPF()->ram_cache->is_exist($key) ) return WPF()->ram_cache->get($key);
75
 
76
  if(!$url) $url = wpforo_get_request_uri();
77
  $result = ( !(wpforo_is_admin($url) || (is_wpforo_exclude_url($url) && !is_wpforo_shortcode_page($url))) && (is_wpforo_url($url) || is_wpforo_shortcode_page($url)) );
78
  $result = apply_filters( 'is_wpforo_page', $result, $url );
79
 
80
+ WPF()->ram_cache->set($key, $result);
81
  return $result;
82
  }
83
 
84
  function is_wpforo_exclude_url($url = ''){
85
  $key = 'is_wpforo_exclude_url_' . $url;
86
+ if( WPF()->ram_cache->is_exist($key) ) return WPF()->ram_cache->get($key);
87
 
88
  $result = false;
89
  if(!$url) $url = wpforo_get_request_uri();
106
  }
107
  }
108
 
109
+ WPF()->ram_cache->set($key, $result);
110
  return $result;
111
  }
112
 
113
  function is_wpforo_url($url = ''){
114
  $key = 'is_wpforo_url_' . $url;
115
+ if( WPF()->ram_cache->is_exist($key) ) return WPF()->ram_cache->get($key);
116
 
117
  $result = false;
118
  if( wpforo_is_admin($url) ){
129
  }
130
  }
131
 
132
+ WPF()->ram_cache->set($key, $result);
133
  return $result;
134
  }
135
 
139
  */
140
  function is_wpforo_shortcode_page($url = ''){
141
  $key = 'is_wpforo_shortcode_page_' . $url;
142
+ if( WPF()->ram_cache->is_exist($key) ) return WPF()->ram_cache->get($key);
143
 
144
  $result = !wpforo_is_admin($url) && !is_wpforo_url($url) && has_shortcode( wpforo_get_wp_post_content($url), 'wpforo' );
145
 
146
+ WPF()->ram_cache->set($key, $result);
147
  return $result;
148
  }
149
 
150
  function wpforo_get_wp_post_content($url = ''){
151
  if(!$url) $url = wpforo_get_request_uri();
152
  $key = 'wpforo_get_wp_post_content_' . $url;
153
+ if( WPF()->ram_cache->is_exist($key) ) return WPF()->ram_cache->get($key);
154
 
155
  $post_content = '';
156
  global $post;
160
  $post_content = get_post_field('post_content', $postid );
161
  }
162
 
163
+ WPF()->ram_cache->set($key, $post_content);
164
  return $post_content;
165
  }
166
 
1117
  }
1118
 
1119
  function wpforo_is_image($e){
1120
+ return (bool) preg_match('#^(jpe?g|png|gif|bmp|tiff?)$#i', $e);
1121
+ }
1122
+
1123
+ function wpforo_is_video($e){
1124
+ return (bool) preg_match('#^(mp4|webm|ogg)$#i', $e);
1125
+ }
1126
+
1127
+ function wpforo_is_audio($e){
1128
+ return (bool) preg_match('#^(mp3|wav|ogg)$#i', $e);
1129
  }
1130
 
1131
  function get_wpf_option( $option, $default = null ){
1325
  update_option('wpforo_version_db', WPFORO_VERSION);
1326
  }
1327
 
1328
+ /**
1329
+ * @param array $args
1330
+ *
1331
+ * @return bool|string|null
1332
+ */
1333
  function wpforo_db_check( $args = array() ){
1334
+ $key = array('wpforo_db_check', $args);
1335
+ if( WPF()->ram_cache->is_exist($key) ) return WPF()->ram_cache->get($key);
1336
+
1337
  global $wpdb;
1338
 
1339
  $col = esc_sql(trim( wpfval($args, 'col') ));
1340
  $table = esc_sql(trim( wpfval($args, 'table') ));
1341
 
1342
+ $result = null;
1343
  switch( trim( wpfval($args, 'check') ) ){
1344
  case 'table_exists':
1345
+ $result = (bool) $wpdb->get_var("SHOW TABLES LIKE '{$table}'");
1346
+ break;
1347
  case 'col_exists':
1348
+ $result = (bool) $wpdb->get_var("SHOW COLUMNS FROM `{$table}` LIKE '{$col}'");
1349
+ break;
1350
+ case 'key_exists':
1351
+ $result = (bool) $wpdb->get_var("SHOW KEYS FROM `{$table}` WHERE `Key_name` = '{$col}'");
1352
+ break;
1353
  case 'default_value':
1354
  $c = (array) $wpdb->get_row("SHOW COLUMNS FROM `{$table}` LIKE '{$col}'", ARRAY_A);
1355
+ $result = wpfval($c, 'Default');
1356
+ break;
1357
  case 'col_type':
1358
  $c = (array) $wpdb->get_row("SHOW COLUMNS FROM `{$table}` LIKE '{$col}'", ARRAY_A);
1359
+ $result = wpfval($c, 'Type');
1360
+ break;
1361
  }
1362
 
1363
+ WPF()->ram_cache->set($key, $result);
1364
+ return $result;
1365
  }
1366
 
1367
 
1908
  }
1909
  }
1910
 
1911
+ /**
1912
+ * @param string $role
1913
+ *
1914
+ * @return bool
1915
+ */
1916
  function wpforo_current_user_is( $role ) {
1917
  $role = strtolower( $role );
1918
 
1950
  return false;
1951
  }
1952
 
1953
+ /**
1954
+ * @param int $userid
1955
+ * @param string $role
1956
+ *
1957
+ * @return bool
1958
+ */
1959
+ function wpforo_user_is( $userid, $role ) {
1960
+ $userid = wpforo_bigintval( $userid );
1961
+ $role = strtolower( $role );
1962
+
1963
+ $filter_result = apply_filters('wpforo_user_is', NULL, $userid, $role);
1964
+ if( !is_null($filter_result) ) return (bool) $filter_result;
1965
+
1966
+ switch( $role ){
1967
+ case 'admin':
1968
+ if ( user_can( $userid, 'activate_plugins' ) ) {
1969
+ return true;
1970
+ }
1971
+ if ( user_can( $userid, 'install_plugins' ) ) {
1972
+ return true;
1973
+ }
1974
+ if ( user_can( $userid, 'create_sites' ) ) {
1975
+ return true;
1976
+ }
1977
+ break;
1978
+ case 'moderator':
1979
+ if ( user_can( $userid, 'moderate_comments' ) ) {
1980
+ return true;
1981
+ }
1982
+ if ( user_can( $userid, 'edit_published_posts' ) ) {
1983
+ return true;
1984
+ }
1985
+ if ( user_can( $userid,'manage_categories' ) ) {
1986
+ return true;
1987
+ }
1988
+ if( $user = WPF()->member->get_member($userid) ){
1989
+ $groupid = (int) wpfval($user, 'groupid');
1990
+ $second_groupids = wpfval($user, 'secondary_groups');
1991
+ if( WPF()->perm->usergroup_can( 'aum', $groupid, $second_groupids ) ){
1992
+ return true;
1993
+ }
1994
+ }
1995
+ break;
1996
+ }
1997
+
1998
+ return false;
1999
+ }
2000
+
2001
  function wpforo_random_colors(){
2002
  mt_srand((double)microtime()*1000000); $color = '';
2003
  while(strlen($color)<6){$color .= sprintf("%02X", mt_rand(0, 255));}
2155
  */
2156
  function wpforo_wp_url_to_postid($url) {
2157
  $key = 'wpforo_wp_url_to_postid_' . $url;
2158
+ if( WPF()->ram_cache->is_exist($key) ) return WPF()->ram_cache->get($key);
2159
 
2160
  if( strpos($url, admin_url()) !== false ){
2161
+ WPF()->ram_cache->set($key, 0);
2162
  return 0;
2163
  }
2164
 
2167
 
2168
  // Bail early if the URL does not belong to this site.
2169
  if ( $url_host && $url_host !== $home_url_host ) {
2170
+ WPF()->ram_cache->set($key, 0);
2171
  return 0;
2172
  }
2173
 
2175
  if ( preg_match( '#[?&](p|page_id|post_id|post|attachment_id)=(\d+)#', $url, $values ) ) {
2176
  $id = absint( $values[2] );
2177
  if ( $id ) {
2178
+ WPF()->ram_cache->set($key, $id);
2179
  return $id;
2180
  }
2181
  }
2208
  $page_on_front = get_option( 'page_on_front' );
2209
 
2210
  if ( $page_on_front && get_post( $page_on_front ) instanceof WP_Post ) {
2211
+ WPF()->ram_cache->set($key, (int) $page_on_front);
2212
  return (int) $page_on_front;
2213
  }
2214
  }
2218
 
2219
  // Not using rewrite rules, and 'p=N' and 'page_id=N' methods failed, so we're out of options.
2220
  if ( empty( $rewrite ) ) {
2221
+ WPF()->ram_cache->set($key, 0);
2222
  return 0;
2223
  }
2224
 
2301
 
2302
  // Do the query.
2303
  if( $p = wpforo_bigintval( wpfval($query, 'p') ) ){
2304
+ WPF()->ram_cache->set($key, $p);
2305
  return $p;
2306
  }
2307
  if( $page_id = wpforo_bigintval( wpfval($query, 'page_id') ) ){
2308
+ WPF()->ram_cache->set($key, $page_id);
2309
  return $page_id;
2310
  }
2311
 
2321
  $sql = WPF()->db->prepare($sql, $slug);
2322
  $postid = WPF()->db->get_var($sql);
2323
  if( $postid = wpforo_bigintval($postid) ) {
2324
+ WPF()->ram_cache->set($key, $postid);
2325
  return $postid;
2326
  }else{
2327
+ WPF()->ram_cache->set($key, 0);
2328
  return 0;
2329
  }
2330
  }else{
2331
+ WPF()->ram_cache->set($key, 0);
2332
  return 0;
2333
  }
2334
 
2336
  }
2337
  }
2338
 
2339
+ WPF()->ram_cache->set($key, 0);
2340
  return 0;
2341
  }
2342
 
2462
  @unlink( $item );
2463
  }
2464
  }
2465
+ }
2466
+
2467
+ /**
2468
+ * @param string $basename
2469
+ *
2470
+ * @return string
2471
+ */
2472
+ function wpforo_fix_table_name($basename){
2473
+ return WPF()->fix_table_name($basename);
2474
  }
wpf-includes/wpf-hooks.php CHANGED
@@ -203,24 +203,6 @@ function wpforo_load($atts){
203
  WPF()->init_current_object();
204
  wpforo_frontend_enqueue_scripts();
205
  }
206
- /*if( !is_wpforo_page() ) {
207
- return sprintf(
208
- '<div style="width: 100%%; border: 1px solid #a3a3a3; box-sizing: border-box; font-weight: bold;">
209
- <div style="width: 100%%; padding: 10px 20px; color: white; background: #00A3F5; box-sizing: border-box;">%s</div>
210
- <div style="width: 100%%; padding: 10px; box-sizing: border-box;">
211
- <ol>
212
- <li>%s<br>%s</li>
213
- <li>%s<br>%s</li>
214
- </ol>
215
- </div>
216
- </div>',
217
- __('wpForo Forum is hidden', 'wpforo'),
218
- __('If you\'re currently in the page editing process and are using a page bulder or other editors, please save the page to see the forum.', 'wpforo'),
219
- __('wpForo cannot be displied in the page editing mode.', 'wpforo'),
220
- __('If this is not the page editing mode, please make sure you use a Page content type.', 'wpforo'),
221
- __('wpForo doesn\'t support other content types.', 'wpforo')
222
- );
223
- }*/
224
  if( apply_filters('on_wpforo_load_remove_the_content_all_filters', false) ) remove_all_filters('the_content');
225
  if(wpforo_feature('output-buffer') && function_exists('ob_start')){
226
  if( wpforo_feature('html_cashe') ){
@@ -1749,39 +1731,46 @@ add_filter( 'get_avatar' , 'wpforo_avatar' , 10, 5 );
1749
 
1750
  function wpforo_pre_get_avatar_data($args, $id_or_email){
1751
  if( wpforo_feature('replace-avatar') ){
1752
- $user = false;
1753
- if ( is_object( $id_or_email ) && isset( $id_or_email->comment_ID ) ) {
1754
- $id_or_email = get_comment( $id_or_email );
1755
- }
1756
- // Process the user identifier.
1757
- if ( is_numeric( $id_or_email ) ) {
1758
- $user = get_user_by( 'id', absint( $id_or_email ) );
1759
- } elseif ( is_string( $id_or_email ) ) {
1760
- if ( !strpos( $id_or_email, '@md5.gravatar.com' ) ) {
1761
- $user = get_user_by( 'email', $id_or_email );
1762
- }
1763
- } elseif ( $id_or_email instanceof WP_User ) {
1764
- // User Object
1765
- $user = $id_or_email;
1766
- } elseif ( $id_or_email instanceof WP_Post ) {
1767
- // Post Object
1768
- $user = get_user_by( 'id', (int) $id_or_email->post_author );
1769
- } elseif ( function_exists('is_avatar_comment_type') && $id_or_email instanceof WP_Comment ) {
1770
- if ( is_avatar_comment_type( get_comment_type( $id_or_email ) ) ) {
1771
- if ( ! empty( $id_or_email->user_id ) ) {
1772
- $user = get_user_by( 'id', (int) $id_or_email->user_id );
1773
- }
1774
- if ( ( ! $user || is_wp_error( $user ) ) && ! empty( $id_or_email->comment_author_email ) ) {
1775
- $user = get_user_by( 'email', $id_or_email->comment_author_email );
1776
- }
1777
- }
1778
- }
1779
-
1780
- if( $user && is_object( $user ) ){
1781
- if( $avatar_url = WPF()->member->get_avatar_url($user->data->ID) ) $args['url'] = $avatar_url;
1782
- }
 
 
 
 
 
 
 
 
1783
  }
1784
-
1785
  return $args;
1786
  }
1787
  add_filter('pre_get_avatar_data', 'wpforo_pre_get_avatar_data', 10, 2);
203
  WPF()->init_current_object();
204
  wpforo_frontend_enqueue_scripts();
205
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  if( apply_filters('on_wpforo_load_remove_the_content_all_filters', false) ) remove_all_filters('the_content');
207
  if(wpforo_feature('output-buffer') && function_exists('ob_start')){
208
  if( wpforo_feature('html_cashe') ){
1731
 
1732
  function wpforo_pre_get_avatar_data($args, $id_or_email){
1733
  if( wpforo_feature('replace-avatar') ){
1734
+ $key = array('wpforo_pre_get_avatar_data', $id_or_email);
1735
+ if( WPF()->ram_cache->is_exist($key) ){
1736
+ $args['url'] = WPF()->ram_cache->get($key);
1737
+ }else{
1738
+ $user = false;
1739
+ if ( is_object( $id_or_email ) && isset( $id_or_email->comment_ID ) ) {
1740
+ $id_or_email = get_comment( $id_or_email );
1741
+ }
1742
+ // Process the user identifier.
1743
+ if ( is_numeric( $id_or_email ) ) {
1744
+ $user = get_user_by( 'id', absint( $id_or_email ) );
1745
+ } elseif ( is_string( $id_or_email ) ) {
1746
+ if ( !strpos( $id_or_email, '@md5.gravatar.com' ) ) {
1747
+ $user = get_user_by( 'email', $id_or_email );
1748
+ }
1749
+ } elseif ( $id_or_email instanceof WP_User ) {
1750
+ // User Object
1751
+ $user = $id_or_email;
1752
+ } elseif ( $id_or_email instanceof WP_Post ) {
1753
+ // Post Object
1754
+ $user = get_user_by( 'id', (int) $id_or_email->post_author );
1755
+ } elseif ( function_exists('is_avatar_comment_type') && $id_or_email instanceof WP_Comment ) {
1756
+ if ( is_avatar_comment_type( get_comment_type( $id_or_email ) ) ) {
1757
+ if ( ! empty( $id_or_email->user_id ) ) {
1758
+ $user = get_user_by( 'id', (int) $id_or_email->user_id );
1759
+ }
1760
+ if ( ( ! $user || is_wp_error( $user ) ) && ! empty( $id_or_email->comment_author_email ) ) {
1761
+ $user = get_user_by( 'email', $id_or_email->comment_author_email );
1762
+ }
1763
+ }
1764
+ }
1765
+
1766
+ if( $user && is_object( $user ) ){
1767
+ if( $avatar_url = WPF()->member->get_avatar_url($user->data->ID) ) {
1768
+ WPF()->ram_cache->set($key, $avatar_url);
1769
+ $args['url'] = $avatar_url;
1770
+ }
1771
+ }
1772
+ }
1773
  }
 
1774
  return $args;
1775
  }
1776
  add_filter('pre_get_avatar_data', 'wpforo_pre_get_avatar_data', 10, 2);
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: 2021-02-05 20:21+0400\n"
9
  "PO-Revision-Date: 2016-06-28 21:09+0400\n"
10
  "Last-Translator: \n"
11
  "Language-Team: \n"
@@ -73,49 +73,49 @@ msgstr ""
73
  #: wpf-admin/options.php:15 wpf-admin/tools-tabs/misc.php:94
74
  #: wpf-includes/integration/buddypress.php:11
75
  #: wpf-includes/integration/buddypress.php:57
76
- #: wpf-includes/integration/buddypress.php:129 wpf-includes/wpf-hooks.php:2694
77
  #: wpf-includes/wpf-phrases.php:309
78
  msgid "Forums"
79
  msgstr ""
80
 
81
  #: wpf-admin/admin.php:42 wpf-includes/wpf-hooks.php:22
82
- #: wpf-includes/wpf-hooks.php:2700
83
  msgid "Settings"
84
  msgstr ""
85
 
86
- #: wpf-admin/admin.php:45 wpf-includes/wpf-hooks.php:2704
87
  #: wpf-includes/wpf-phrases.php:916
88
  msgid "Tools"
89
  msgstr ""
90
 
91
- #: wpf-admin/admin.php:48 wpf-includes/wpf-hooks.php:2708
92
  msgid "Moderation"
93
  msgstr ""
94
 
95
  #: wpf-admin/admin.php:51 wpf-admin/dashboard.php:132 wpf-admin/member.php:10
96
  #: wpf-admin/options.php:18 wpf-admin/tools-tabs/misc.php:114
97
- #: wpf-admin/usergroup.php:36 wpf-includes/wpf-hooks.php:2712
98
  #: wpf-includes/wpf-phrases.php:364
99
  msgid "Members"
100
  msgstr ""
101
 
102
  #: wpf-admin/admin.php:54 wpf-admin/usergroup.php:11 wpf-admin/usergroup.php:155
103
- #: wpf-includes/wpf-hooks.php:2716
104
  msgid "Usergroups"
105
  msgstr ""
106
 
107
- #: wpf-admin/admin.php:57 wpf-includes/wpf-hooks.php:2722
108
  #: wpf-includes/wpf-phrases.php:791
109
  msgid "Phrases"
110
  msgstr ""
111
 
112
- #: wpf-admin/admin.php:60 wpf-includes/wpf-hooks.php:2728
113
  #: wpf-includes/wpf-phrases.php:792
114
  msgid "Themes"
115
  msgstr ""
116
 
117
  #: wpf-admin/admin.php:63 wpf-admin/options.php:24
118
- #: wpf-includes/wpf-hooks.php:2732 wpf-includes/wpf-phrases.php:211
119
  msgid "Addons"
120
  msgstr ""
121
 
@@ -190,13 +190,13 @@ msgid "Board Statistic"
190
  msgstr ""
191
 
192
  #: wpf-admin/dashboard.php:124 wpf-admin/options-tabs/posts.php:45
193
- #: wpf-admin/options-tabs/styles.php:23 wpf-includes/class-forums.php:781
194
  #: wpf-includes/wpf-phrases.php:524
195
  msgid "Topics"
196
  msgstr ""
197
 
198
  #: wpf-admin/dashboard.php:128 wpf-admin/options-tabs/posts.php:46
199
- #: wpf-includes/class-forums.php:781 wpf-includes/wpf-phrases.php:418
200
  msgid "Posts"
201
  msgstr ""
202
 
@@ -370,7 +370,7 @@ msgstr ""
370
  msgid "Other"
371
  msgstr ""
372
 
373
- #: wpf-admin/deactivation-dialog.php:142 wpf-includes/wpf-hooks.php:1441
374
  msgid "Please provide more information"
375
  msgstr ""
376
 
@@ -533,13 +533,13 @@ msgstr ""
533
  #: wpf-admin/includes/moderation-listtable.php:92
534
  #: wpf-admin/includes/moderation-listtable.php:193 wpf-admin/themes.php:68
535
  #: wpf-admin/tools-tabs/antispam.php:313 wpf-admin/usergroup.php:75
536
- #: wpf-admin/usergroup.php:276 wpf-includes/wpf-hooks.php:1434
537
  #: wpf-includes/wpf-phrases.php:252
538
  msgid "Delete"
539
  msgstr ""
540
 
541
  #: wpf-admin/forum.php:222 wpf-admin/includes/moderation-listtable.php:83
542
- #: wpf-admin/usergroup.php:77 wpf-includes/class-forums.php:801
543
  #: wpf-includes/wpf-phrases.php:541
544
  msgid "View"
545
  msgstr ""
@@ -897,7 +897,7 @@ msgstr ""
897
  msgid "Admin"
898
  msgstr ""
899
 
900
- #: wpf-admin/options-tabs/accesses.php:51 wpf-includes/class-forums.php:789
901
  #: wpf-includes/wpf-phrases.php:567
902
  msgid "edit"
903
  msgstr ""
@@ -908,7 +908,7 @@ msgid ""
908
  "this access will lost all forum permissions."
909
  msgstr ""
910
 
911
- #: wpf-admin/options-tabs/accesses.php:58 wpf-includes/class-forums.php:795
912
  #: wpf-includes/wpf-phrases.php:566
913
  msgid "delete"
914
  msgstr ""
@@ -1762,7 +1762,7 @@ msgid ""
1762
  msgstr ""
1763
 
1764
  #: wpf-admin/options-tabs/features.php:81 wpf-admin/usergroup.php:37
1765
- #: wpf-includes/wpf-hooks.php:1428
1766
  msgid "Default"
1767
  msgstr ""
1768
 
@@ -1798,7 +1798,7 @@ msgid "Sitewide"
1798
  msgstr ""
1799
 
1800
  #: wpf-admin/options-tabs/features.php:88 wpf-includes/class-subscribes.php:25
1801
- #: wpf-includes/wpf-phrases.php:287 wpforo.php:414
1802
  msgid "Forum"
1803
  msgstr ""
1804
 
@@ -1856,7 +1856,7 @@ msgstr ""
1856
  msgid "one URL per line"
1857
  msgstr ""
1858
 
1859
- #: wpf-admin/options-tabs/general.php:48 wpf-includes/wpf-hooks.php:2682
1860
  msgid "Visit Forum"
1861
  msgstr ""
1862
 
@@ -2012,7 +2012,7 @@ msgstr ""
2012
  msgid "Member Custom Title by default"
2013
  msgstr ""
2014
 
2015
- #: wpf-admin/options-tabs/members.php:111 wpf-includes/wpf-hooks.php:1619
2016
  #: wpf-includes/wpf-phrases.php:433
2017
  msgid "Rating Level"
2018
  msgstr ""
@@ -2045,7 +2045,7 @@ msgstr ""
2045
  msgid "More"
2046
  msgstr ""
2047
 
2048
- #: wpf-admin/options-tabs/members.php:122 wpf-includes/wpf-hooks.php:1627
2049
  #: wpf-includes/wpf-phrases.php:344
2050
  msgid "Level"
2051
  msgstr ""
@@ -2571,7 +2571,7 @@ msgstr ""
2571
  msgid "Do not allow to attach files with following extensions:"
2572
  msgstr ""
2573
 
2574
- #: wpf-admin/tools-tabs/antispam.php:118 wpf-includes/wpf-hooks.php:2817
2575
  msgid "Google reCAPTCHA"
2576
  msgstr ""
2577
 
@@ -3710,11 +3710,11 @@ msgstr ""
3710
  msgid "Can view poll result"
3711
  msgstr ""
3712
 
3713
- #: wpf-includes/class-forums.php:784
3714
  msgid "Add a new Subforum"
3715
  msgstr ""
3716
 
3717
- #: wpf-includes/class-forums.php:784
3718
  msgid "Add a new Forum in this Category"
3719
  msgstr ""
3720
 
@@ -3752,19 +3752,19 @@ msgid ""
3752
  "another one."
3753
  msgstr ""
3754
 
3755
- #: wpf-includes/class-members.php:1977
3756
  msgid "What should be done with wpForo content owned by this user?"
3757
  msgstr ""
3758
 
3759
- #: wpf-includes/class-members.php:1979
3760
  msgid "What should be done with wpForo content owned by these users?"
3761
  msgstr ""
3762
 
3763
- #: wpf-includes/class-members.php:1983
3764
  msgid "Delete all wpForo content."
3765
  msgstr ""
3766
 
3767
- #: wpf-includes/class-members.php:1985
3768
  msgid "Attribute all content to:"
3769
  msgstr ""
3770
 
@@ -3924,27 +3924,27 @@ msgid ""
3924
  " Post URL: [post-url]"
3925
  msgstr ""
3926
 
3927
- #: wpf-includes/class-template.php:819
3928
  msgid "Insert link"
3929
  msgstr ""
3930
 
3931
- #: wpf-includes/class-template.php:820
3932
  msgid "Link Text"
3933
  msgstr ""
3934
 
3935
- #: wpf-includes/class-template.php:821
3936
  msgid "Open link in a new tab"
3937
  msgstr ""
3938
 
3939
- #: wpf-includes/class-template.php:822
3940
  msgid "Insert Spoiler"
3941
  msgstr ""
3942
 
3943
- #: wpf-includes/class-template.php:823
3944
  msgid "Spoiler"
3945
  msgstr ""
3946
 
3947
- #: wpf-includes/class-template.php:2340 wpf-includes/wpf-phrases.php:513
3948
  msgid "Theme file not readable"
3949
  msgstr ""
3950
 
@@ -4269,17 +4269,17 @@ msgstr ""
4269
  msgid "Could not write file %s"
4270
  msgstr ""
4271
 
4272
- #: wpf-includes/functions.php:2354
4273
  msgid "Action Required!"
4274
  msgstr ""
4275
 
4276
- #: wpf-includes/functions.php:2354
4277
  msgid ""
4278
  "Please update wpForo addons CSS style to make compatible with the current "
4279
  "version of wpForo."
4280
  msgstr ""
4281
 
4282
- #: wpf-includes/functions.php:2355
4283
  msgid "Update CSS >>"
4284
  msgstr ""
4285
 
@@ -4376,66 +4376,66 @@ msgstr ""
4376
  msgid "Uninstall"
4377
  msgstr ""
4378
 
4379
- #: wpf-includes/wpf-hooks.php:1428
4380
  msgid "Clear"
4381
  msgstr ""
4382
 
4383
- #: wpf-includes/wpf-hooks.php:1428
4384
  msgid "Select Color"
4385
  msgstr ""
4386
 
4387
- #: wpf-includes/wpf-hooks.php:1433 wpf-includes/wpf-phrases.php:183
4388
  msgid "Move"
4389
  msgstr ""
4390
 
4391
- #: wpf-includes/wpf-hooks.php:1440
4392
  msgid "Please choose one reasons before sending a feedback!"
4393
  msgstr ""
4394
 
4395
- #: wpf-includes/wpf-hooks.php:1442
4396
  msgid ""
4397
  "With the email address, please check the \"I agree to receive email\" checkbox "
4398
  "to proceed."
4399
  msgstr ""
4400
 
4401
- #: wpf-includes/wpf-hooks.php:1443
4402
  msgid "Please fill your email address for feedback"
4403
  msgstr ""
4404
 
4405
- #: wpf-includes/wpf-hooks.php:1444
4406
  msgid "Your email address is not valid"
4407
  msgstr ""
4408
 
4409
- #: wpf-includes/wpf-hooks.php:1502
4410
  msgid ""
4411
  "IMPORTANT: wpForo can't work with default permalink, please change permalink "
4412
  "structure"
4413
  msgstr ""
4414
 
4415
- #: wpf-includes/wpf-hooks.php:1538
4416
  msgid "Forum Profile Fields - wpForo"
4417
  msgstr ""
4418
 
4419
- #: wpf-includes/wpf-hooks.php:1546
4420
  msgid "Forum - Usergroup"
4421
  msgstr ""
4422
 
4423
- #: wpf-includes/wpf-hooks.php:1551
4424
  #, php-format
4425
  msgid ""
4426
  "Forum Usergroups are synched with User Roles based on the %s. When you change "
4427
  "this user Role the Usergroup is automatically changed according to that table."
4428
  msgstr ""
4429
 
4430
- #: wpf-includes/wpf-hooks.php:1558
4431
  msgid "Synced with user role"
4432
  msgstr ""
4433
 
4434
- #: wpf-includes/wpf-hooks.php:1562
4435
  msgid "Role-Usergroup Synchronization is Turned ON!"
4436
  msgstr ""
4437
 
4438
- #: wpf-includes/wpf-hooks.php:1563
4439
  msgid ""
4440
  "This user Usergroup is automatically changed according to current Role. If you "
4441
  "want to disable Role-Usergroup synchronization and manage Usergroups and User "
@@ -4443,19 +4443,19 @@ msgid ""
4443
  "admin page and disable \"Role-Usergroup Synchronization\" option."
4444
  msgstr ""
4445
 
4446
- #: wpf-includes/wpf-hooks.php:1574
4447
  msgid "Forum - Secondary Usergroups"
4448
  msgstr ""
4449
 
4450
- #: wpf-includes/wpf-hooks.php:1596
4451
  msgid "Forum - User Timezone"
4452
  msgstr ""
4453
 
4454
- #: wpf-includes/wpf-hooks.php:1607
4455
  msgid "User Reputation"
4456
  msgstr ""
4457
 
4458
- #: wpf-includes/wpf-hooks.php:1608
4459
  msgid ""
4460
  "By default all members get rating badges and titles based on number of posts. "
4461
  "However, using this option you can grant lower or higher rating to certain "
@@ -4463,59 +4463,59 @@ msgid ""
4463
  "be managed in Forums > Settings > Members Tab."
4464
  msgstr ""
4465
 
4466
- #: wpf-includes/wpf-hooks.php:1612
4467
  msgid "Default Rating"
4468
  msgstr ""
4469
 
4470
- #: wpf-includes/wpf-hooks.php:1613
4471
  msgid "Custom Rating"
4472
  msgstr ""
4473
 
4474
- #: wpf-includes/wpf-hooks.php:1620 wpf-includes/wpf-phrases.php:865
4475
  msgid "Rating Title"
4476
  msgstr ""
4477
 
4478
- #: wpf-includes/wpf-hooks.php:1621 wpf-includes/wpf-phrases.php:430
4479
  msgid "Rating Badge"
4480
  msgstr ""
4481
 
4482
- #: wpf-includes/wpf-hooks.php:2037 wpf-includes/wpf-hooks.php:2137
4483
  msgid "Please Moderate: "
4484
  msgstr ""
4485
 
4486
- #: wpf-includes/wpf-hooks.php:2038
4487
  msgid ""
4488
  "This topic is currently unapproved. You can approve topics in Dashboard "
4489
  "&raquo; Forums &raquo; Moderation admin page."
4490
  msgstr ""
4491
 
4492
- #: wpf-includes/wpf-hooks.php:2138
4493
  msgid ""
4494
  "This post is currently unapproved. You can approve posts in Dashboard &raquo; "
4495
  "Forums &raquo; Moderation admin page."
4496
  msgstr ""
4497
 
4498
- #: wpf-includes/wpf-hooks.php:2674 wpf-includes/wpf-hooks.php:2696
4499
  msgid "New Forum"
4500
  msgstr ""
4501
 
4502
- #: wpf-includes/wpf-hooks.php:2676
4503
  msgid "New User Group"
4504
  msgstr ""
4505
 
4506
- #: wpf-includes/wpf-hooks.php:2678 wpf-includes/wpf-hooks.php:2724
4507
  msgid "New Phrase"
4508
  msgstr ""
4509
 
4510
- #: wpf-includes/wpf-hooks.php:2690
4511
  msgid "Forum Dashboard"
4512
  msgstr ""
4513
 
4514
- #: wpf-includes/wpf-hooks.php:2718
4515
  msgid "New Usergroup"
4516
  msgstr ""
4517
 
4518
- #: wpf-includes/wpf-hooks.php:2816 wpf-includes/wpf-phrases.php:1086
4519
  #, php-format
4520
  msgid ""
4521
  "IMPORTANT! The forum registration form is probably under risk of spam attacks. "
@@ -4525,17 +4525,17 @@ msgid ""
4525
  "dismiss this message."
4526
  msgstr ""
4527
 
4528
- #: wpf-includes/wpf-hooks.php:2847
4529
  msgid "wpForo Polls addon is disabled!"
4530
  msgstr ""
4531
 
4532
- #: wpf-includes/wpf-hooks.php:2847
4533
  msgid ""
4534
  " Your addon version is not compatible with the current version of wpForo. "
4535
  "Please update the addon or downgrade wpForo to 1.7.7"
4536
  msgstr ""
4537
 
4538
- #: wpf-includes/wpf-hooks.php:2848
4539
  msgid "dismiss"
4540
  msgstr ""
4541
 
@@ -7826,78 +7826,78 @@ msgid ""
7826
  "of that topic. You can manage this option by forum layouts."
7827
  msgstr ""
7828
 
7829
- #: wpforo.php:415
7830
  msgid "Discussion Board"
7831
  msgstr ""
7832
 
7833
- #: wpforo.php:1133
7834
  msgid ""
7835
  "Allows you to create topic prefixes and prefix groups to categorize topics. "
7836
  "Also, it allows you to add, edit, delete topic tags and convert them to "
7837
  "prefixes."
7838
  msgstr ""
7839
 
7840
- #: wpforo.php:1134
7841
  msgid ""
7842
  "Syntax highlighting for forum posts, automatic language detection and multi-"
7843
  "language code highlighting."
7844
  msgstr ""
7845
 
7846
- #: wpforo.php:1135
7847
  msgid ""
7848
  "Allows to embed hundreds of video, social network, audio and photo content "
7849
  "providers in forum topics and posts."
7850
  msgstr ""
7851
 
7852
- #: wpforo.php:1136
7853
  msgid ""
7854
  "wpForo Polls is a complete addon to help forum members create, vote and manage "
7855
  "polls effectively. Comes with poll specific permissions and settings."
7856
  msgstr ""
7857
 
7858
- #: wpforo.php:1137
7859
  msgid ""
7860
  "Allows to create topic custom fields and manage topic form layout with a form "
7861
  "builder. Adds topic search options by custom fields"
7862
  msgstr ""
7863
 
7864
- #: wpforo.php:1138
7865
  msgid ""
7866
  "Awards myCRED points for forum activity. Integrates myCRED Badges and Ranks. "
7867
  "Converts wpForo topic and posts, likes to myCRED points."
7868
  msgstr ""
7869
 
7870
- #: wpforo.php:1139
7871
  msgid ""
7872
  "Advanced user profile builder system. Allows to add new fields and manage "
7873
  "profile page. Creates custom Registration, Account, Member Search forms."
7874
  msgstr ""
7875
 
7876
- #: wpforo.php:1140
7877
  msgid ""
7878
  "Adds an advanced file attachment system to forum topics and posts. AJAX "
7879
  "powered media uploading and displaying system with user specific library."
7880
  msgstr ""
7881
 
7882
- #: wpforo.php:1141
7883
  msgid ""
7884
  "Provides a safe way to communicate directly with other members. Messages are "
7885
  "private and can only be viewed by conversation participants."
7886
  msgstr ""
7887
 
7888
- #: wpforo.php:1142
7889
  msgid ""
7890
  "Blog to Forum and Forum to Blog content synchronization. Blog posts with Forum "
7891
  "topics and Blog comments with Forum replies."
7892
  msgstr ""
7893
 
7894
- #: wpforo.php:1143
7895
  msgid ""
7896
  "Ads Manager is a powerful yet simple advertisement management system, that "
7897
  "allows you to add adverting banners between forums, topics and posts."
7898
  msgstr ""
7899
 
7900
- #: wpforo.php:1144
7901
  msgid ""
7902
  "Adds awesome Sticker and Emoticons packs to editor. Allows to create new "
7903
  "custom emoticons packs."
5
  msgstr ""
6
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
7
  "Project-Id-Version: Forum - wpForo\n"
8
+ "POT-Creation-Date: 2021-03-12 06:27+0300\n"
9
  "PO-Revision-Date: 2016-06-28 21:09+0400\n"
10
  "Last-Translator: \n"
11
  "Language-Team: \n"
73
  #: wpf-admin/options.php:15 wpf-admin/tools-tabs/misc.php:94
74
  #: wpf-includes/integration/buddypress.php:11
75
  #: wpf-includes/integration/buddypress.php:57
76
+ #: wpf-includes/integration/buddypress.php:129 wpf-includes/wpf-hooks.php:2683
77
  #: wpf-includes/wpf-phrases.php:309
78
  msgid "Forums"
79
  msgstr ""
80
 
81
  #: wpf-admin/admin.php:42 wpf-includes/wpf-hooks.php:22
82
+ #: wpf-includes/wpf-hooks.php:2689
83
  msgid "Settings"
84
  msgstr ""
85
 
86
+ #: wpf-admin/admin.php:45 wpf-includes/wpf-hooks.php:2693
87
  #: wpf-includes/wpf-phrases.php:916
88
  msgid "Tools"
89
  msgstr ""
90
 
91
+ #: wpf-admin/admin.php:48 wpf-includes/wpf-hooks.php:2697
92
  msgid "Moderation"
93
  msgstr ""
94
 
95
  #: wpf-admin/admin.php:51 wpf-admin/dashboard.php:132 wpf-admin/member.php:10
96
  #: wpf-admin/options.php:18 wpf-admin/tools-tabs/misc.php:114
97
+ #: wpf-admin/usergroup.php:36 wpf-includes/wpf-hooks.php:2701
98
  #: wpf-includes/wpf-phrases.php:364
99
  msgid "Members"
100
  msgstr ""
101
 
102
  #: wpf-admin/admin.php:54 wpf-admin/usergroup.php:11 wpf-admin/usergroup.php:155
103
+ #: wpf-includes/wpf-hooks.php:2705
104
  msgid "Usergroups"
105
  msgstr ""
106
 
107
+ #: wpf-admin/admin.php:57 wpf-includes/wpf-hooks.php:2711
108
  #: wpf-includes/wpf-phrases.php:791
109
  msgid "Phrases"
110
  msgstr ""
111
 
112
+ #: wpf-admin/admin.php:60 wpf-includes/wpf-hooks.php:2717
113
  #: wpf-includes/wpf-phrases.php:792
114
  msgid "Themes"
115
  msgstr ""
116
 
117
  #: wpf-admin/admin.php:63 wpf-admin/options.php:24
118
+ #: wpf-includes/wpf-hooks.php:2721 wpf-includes/wpf-phrases.php:211
119
  msgid "Addons"
120
  msgstr ""
121
 
190
  msgstr ""
191
 
192
  #: wpf-admin/dashboard.php:124 wpf-admin/options-tabs/posts.php:45
193
+ #: wpf-admin/options-tabs/styles.php:23 wpf-includes/class-forums.php:780
194
  #: wpf-includes/wpf-phrases.php:524
195
  msgid "Topics"
196
  msgstr ""
197
 
198
  #: wpf-admin/dashboard.php:128 wpf-admin/options-tabs/posts.php:46
199
+ #: wpf-includes/class-forums.php:780 wpf-includes/wpf-phrases.php:418
200
  msgid "Posts"
201
  msgstr ""
202
 
370
  msgid "Other"
371
  msgstr ""
372
 
373
+ #: wpf-admin/deactivation-dialog.php:142 wpf-includes/wpf-hooks.php:1423
374
  msgid "Please provide more information"
375
  msgstr ""
376
 
533
  #: wpf-admin/includes/moderation-listtable.php:92
534
  #: wpf-admin/includes/moderation-listtable.php:193 wpf-admin/themes.php:68
535
  #: wpf-admin/tools-tabs/antispam.php:313 wpf-admin/usergroup.php:75
536
+ #: wpf-admin/usergroup.php:276 wpf-includes/wpf-hooks.php:1416
537
  #: wpf-includes/wpf-phrases.php:252
538
  msgid "Delete"
539
  msgstr ""
540
 
541
  #: wpf-admin/forum.php:222 wpf-admin/includes/moderation-listtable.php:83
542
+ #: wpf-admin/usergroup.php:77 wpf-includes/class-forums.php:800
543
  #: wpf-includes/wpf-phrases.php:541
544
  msgid "View"
545
  msgstr ""
897
  msgid "Admin"
898
  msgstr ""
899
 
900
+ #: wpf-admin/options-tabs/accesses.php:51 wpf-includes/class-forums.php:788
901
  #: wpf-includes/wpf-phrases.php:567
902
  msgid "edit"
903
  msgstr ""
908
  "this access will lost all forum permissions."
909
  msgstr ""
910
 
911
+ #: wpf-admin/options-tabs/accesses.php:58 wpf-includes/class-forums.php:794
912
  #: wpf-includes/wpf-phrases.php:566
913
  msgid "delete"
914
  msgstr ""
1762
  msgstr ""
1763
 
1764
  #: wpf-admin/options-tabs/features.php:81 wpf-admin/usergroup.php:37
1765
+ #: wpf-includes/wpf-hooks.php:1410
1766
  msgid "Default"
1767
  msgstr ""
1768
 
1798
  msgstr ""
1799
 
1800
  #: wpf-admin/options-tabs/features.php:88 wpf-includes/class-subscribes.php:25
1801
+ #: wpf-includes/wpf-phrases.php:287 wpforo.php:427
1802
  msgid "Forum"
1803
  msgstr ""
1804
 
1856
  msgid "one URL per line"
1857
  msgstr ""
1858
 
1859
+ #: wpf-admin/options-tabs/general.php:48 wpf-includes/wpf-hooks.php:2671
1860
  msgid "Visit Forum"
1861
  msgstr ""
1862
 
2012
  msgid "Member Custom Title by default"
2013
  msgstr ""
2014
 
2015
+ #: wpf-admin/options-tabs/members.php:111 wpf-includes/wpf-hooks.php:1601
2016
  #: wpf-includes/wpf-phrases.php:433
2017
  msgid "Rating Level"
2018
  msgstr ""
2045
  msgid "More"
2046
  msgstr ""
2047
 
2048
+ #: wpf-admin/options-tabs/members.php:122 wpf-includes/wpf-hooks.php:1609
2049
  #: wpf-includes/wpf-phrases.php:344
2050
  msgid "Level"
2051
  msgstr ""
2571
  msgid "Do not allow to attach files with following extensions:"
2572
  msgstr ""
2573
 
2574
+ #: wpf-admin/tools-tabs/antispam.php:118 wpf-includes/wpf-hooks.php:2806
2575
  msgid "Google reCAPTCHA"
2576
  msgstr ""
2577
 
3710
  msgid "Can view poll result"
3711
  msgstr ""
3712
 
3713
+ #: wpf-includes/class-forums.php:783
3714
  msgid "Add a new Subforum"
3715
  msgstr ""
3716
 
3717
+ #: wpf-includes/class-forums.php:783
3718
  msgid "Add a new Forum in this Category"
3719
  msgstr ""
3720
 
3752
  "another one."
3753
  msgstr ""
3754
 
3755
+ #: wpf-includes/class-members.php:1980
3756
  msgid "What should be done with wpForo content owned by this user?"
3757
  msgstr ""
3758
 
3759
+ #: wpf-includes/class-members.php:1982
3760
  msgid "What should be done with wpForo content owned by these users?"
3761
  msgstr ""
3762
 
3763
+ #: wpf-includes/class-members.php:1986
3764
  msgid "Delete all wpForo content."
3765
  msgstr ""
3766
 
3767
+ #: wpf-includes/class-members.php:1988
3768
  msgid "Attribute all content to:"
3769
  msgstr ""
3770
 
3924
  " Post URL: [post-url]"
3925
  msgstr ""
3926
 
3927
+ #: wpf-includes/class-template.php:818
3928
  msgid "Insert link"
3929
  msgstr ""
3930
 
3931
+ #: wpf-includes/class-template.php:819
3932
  msgid "Link Text"
3933
  msgstr ""
3934
 
3935
+ #: wpf-includes/class-template.php:820
3936
  msgid "Open link in a new tab"
3937
  msgstr ""
3938
 
3939
+ #: wpf-includes/class-template.php:821
3940
  msgid "Insert Spoiler"
3941
  msgstr ""
3942
 
3943
+ #: wpf-includes/class-template.php:822
3944
  msgid "Spoiler"
3945
  msgstr ""
3946
 
3947
+ #: wpf-includes/class-template.php:2339 wpf-includes/wpf-phrases.php:513
3948
  msgid "Theme file not readable"
3949
  msgstr ""
3950
 
4269
  msgid "Could not write file %s"
4270
  msgstr ""
4271
 
4272
+ #: wpf-includes/functions.php:2428
4273
  msgid "Action Required!"
4274
  msgstr ""
4275
 
4276
+ #: wpf-includes/functions.php:2428
4277
  msgid ""
4278
  "Please update wpForo addons CSS style to make compatible with the current "
4279
  "version of wpForo."
4280
  msgstr ""
4281
 
4282
+ #: wpf-includes/functions.php:2429
4283
  msgid "Update CSS >>"
4284
  msgstr ""
4285
 
4376
  msgid "Uninstall"
4377
  msgstr ""
4378
 
4379
+ #: wpf-includes/wpf-hooks.php:1410
4380
  msgid "Clear"
4381
  msgstr ""
4382
 
4383
+ #: wpf-includes/wpf-hooks.php:1410
4384
  msgid "Select Color"
4385
  msgstr ""
4386
 
4387
+ #: wpf-includes/wpf-hooks.php:1415 wpf-includes/wpf-phrases.php:183
4388
  msgid "Move"
4389
  msgstr ""
4390
 
4391
+ #: wpf-includes/wpf-hooks.php:1422
4392
  msgid "Please choose one reasons before sending a feedback!"
4393
  msgstr ""
4394
 
4395
+ #: wpf-includes/wpf-hooks.php:1424
4396
  msgid ""
4397
  "With the email address, please check the \"I agree to receive email\" checkbox "
4398
  "to proceed."
4399
  msgstr ""
4400
 
4401
+ #: wpf-includes/wpf-hooks.php:1425
4402
  msgid "Please fill your email address for feedback"
4403
  msgstr ""
4404
 
4405
+ #: wpf-includes/wpf-hooks.php:1426
4406
  msgid "Your email address is not valid"
4407
  msgstr ""
4408
 
4409
+ #: wpf-includes/wpf-hooks.php:1484
4410
  msgid ""
4411
  "IMPORTANT: wpForo can't work with default permalink, please change permalink "
4412
  "structure"
4413
  msgstr ""
4414
 
4415
+ #: wpf-includes/wpf-hooks.php:1520
4416
  msgid "Forum Profile Fields - wpForo"
4417
  msgstr ""
4418
 
4419
+ #: wpf-includes/wpf-hooks.php:1528
4420
  msgid "Forum - Usergroup"
4421
  msgstr ""
4422
 
4423
+ #: wpf-includes/wpf-hooks.php:1533
4424
  #, php-format
4425
  msgid ""
4426
  "Forum Usergroups are synched with User Roles based on the %s. When you change "
4427
  "this user Role the Usergroup is automatically changed according to that table."
4428
  msgstr ""
4429
 
4430
+ #: wpf-includes/wpf-hooks.php:1540
4431
  msgid "Synced with user role"
4432
  msgstr ""
4433
 
4434
+ #: wpf-includes/wpf-hooks.php:1544
4435
  msgid "Role-Usergroup Synchronization is Turned ON!"
4436
  msgstr ""
4437
 
4438
+ #: wpf-includes/wpf-hooks.php:1545
4439
  msgid ""
4440
  "This user Usergroup is automatically changed according to current Role. If you "
4441
  "want to disable Role-Usergroup synchronization and manage Usergroups and User "
4443
  "admin page and disable \"Role-Usergroup Synchronization\" option."
4444
  msgstr ""
4445
 
4446
+ #: wpf-includes/wpf-hooks.php:1556
4447
  msgid "Forum - Secondary Usergroups"
4448
  msgstr ""
4449
 
4450
+ #: wpf-includes/wpf-hooks.php:1578
4451
  msgid "Forum - User Timezone"
4452
  msgstr ""
4453
 
4454
+ #: wpf-includes/wpf-hooks.php:1589
4455
  msgid "User Reputation"
4456
  msgstr ""
4457
 
4458
+ #: wpf-includes/wpf-hooks.php:1590
4459
  msgid ""
4460
  "By default all members get rating badges and titles based on number of posts. "
4461
  "However, using this option you can grant lower or higher rating to certain "
4463
  "be managed in Forums > Settings > Members Tab."
4464
  msgstr ""
4465
 
4466
+ #: wpf-includes/wpf-hooks.php:1594
4467
  msgid "Default Rating"
4468
  msgstr ""
4469
 
4470
+ #: wpf-includes/wpf-hooks.php:1595
4471
  msgid "Custom Rating"
4472
  msgstr ""
4473
 
4474
+ #: wpf-includes/wpf-hooks.php:1602 wpf-includes/wpf-phrases.php:865
4475
  msgid "Rating Title"
4476
  msgstr ""
4477
 
4478
+ #: wpf-includes/wpf-hooks.php:1603 wpf-includes/wpf-phrases.php:430
4479
  msgid "Rating Badge"
4480
  msgstr ""
4481
 
4482
+ #: wpf-includes/wpf-hooks.php:2026 wpf-includes/wpf-hooks.php:2126
4483
  msgid "Please Moderate: "
4484
  msgstr ""
4485
 
4486
+ #: wpf-includes/wpf-hooks.php:2027
4487
  msgid ""
4488
  "This topic is currently unapproved. You can approve topics in Dashboard "
4489
  "&raquo; Forums &raquo; Moderation admin page."
4490
  msgstr ""
4491
 
4492
+ #: wpf-includes/wpf-hooks.php:2127
4493
  msgid ""
4494
  "This post is currently unapproved. You can approve posts in Dashboard &raquo; "
4495
  "Forums &raquo; Moderation admin page."
4496
  msgstr ""
4497
 
4498
+ #: wpf-includes/wpf-hooks.php:2663 wpf-includes/wpf-hooks.php:2685
4499
  msgid "New Forum"
4500
  msgstr ""
4501
 
4502
+ #: wpf-includes/wpf-hooks.php:2665
4503
  msgid "New User Group"
4504
  msgstr ""
4505
 
4506
+ #: wpf-includes/wpf-hooks.php:2667 wpf-includes/wpf-hooks.php:2713
4507
  msgid "New Phrase"
4508
  msgstr ""
4509
 
4510
+ #: wpf-includes/wpf-hooks.php:2679
4511
  msgid "Forum Dashboard"
4512
  msgstr ""
4513
 
4514
+ #: wpf-includes/wpf-hooks.php:2707
4515
  msgid "New Usergroup"
4516
  msgstr ""
4517
 
4518
+ #: wpf-includes/wpf-hooks.php:2805 wpf-includes/wpf-phrases.php:1086
4519
  #, php-format
4520
  msgid ""
4521
  "IMPORTANT! The forum registration form is probably under risk of spam attacks. "
4525
  "dismiss this message."
4526
  msgstr ""
4527
 
4528
+ #: wpf-includes/wpf-hooks.php:2836
4529
  msgid "wpForo Polls addon is disabled!"
4530
  msgstr ""
4531
 
4532
+ #: wpf-includes/wpf-hooks.php:2836
4533
  msgid ""
4534
  " Your addon version is not compatible with the current version of wpForo. "
4535
  "Please update the addon or downgrade wpForo to 1.7.7"
4536
  msgstr ""
4537
 
4538
+ #: wpf-includes/wpf-hooks.php:2837
4539
  msgid "dismiss"
4540
  msgstr ""
4541
 
7826
  "of that topic. You can manage this option by forum layouts."
7827
  msgstr ""
7828
 
7829
+ #: wpforo.php:428
7830
  msgid "Discussion Board"
7831
  msgstr ""
7832
 
7833
+ #: wpforo.php:1152
7834
  msgid ""
7835
  "Allows you to create topic prefixes and prefix groups to categorize topics. "
7836
  "Also, it allows you to add, edit, delete topic tags and convert them to "
7837
  "prefixes."
7838
  msgstr ""
7839
 
7840
+ #: wpforo.php:1153
7841
  msgid ""
7842
  "Syntax highlighting for forum posts, automatic language detection and multi-"
7843
  "language code highlighting."
7844
  msgstr ""
7845
 
7846
+ #: wpforo.php:1154
7847
  msgid ""
7848
  "Allows to embed hundreds of video, social network, audio and photo content "
7849
  "providers in forum topics and posts."
7850
  msgstr ""
7851
 
7852
+ #: wpforo.php:1155
7853
  msgid ""
7854
  "wpForo Polls is a complete addon to help forum members create, vote and manage "
7855
  "polls effectively. Comes with poll specific permissions and settings."
7856
  msgstr ""
7857
 
7858
+ #: wpforo.php:1156
7859
  msgid ""
7860
  "Allows to create topic custom fields and manage topic form layout with a form "
7861
  "builder. Adds topic search options by custom fields"
7862
  msgstr ""
7863
 
7864
+ #: wpforo.php:1157
7865
  msgid ""
7866
  "Awards myCRED points for forum activity. Integrates myCRED Badges and Ranks. "
7867
  "Converts wpForo topic and posts, likes to myCRED points."
7868
  msgstr ""
7869
 
7870
+ #: wpforo.php:1158
7871
  msgid ""
7872
  "Advanced user profile builder system. Allows to add new fields and manage "
7873
  "profile page. Creates custom Registration, Account, Member Search forms."
7874
  msgstr ""
7875
 
7876
+ #: wpforo.php:1159
7877
  msgid ""
7878
  "Adds an advanced file attachment system to forum topics and posts. AJAX "
7879
  "powered media uploading and displaying system with user specific library."
7880
  msgstr ""
7881
 
7882
+ #: wpforo.php:1160
7883
  msgid ""
7884
  "Provides a safe way to communicate directly with other members. Messages are "
7885
  "private and can only be viewed by conversation participants."
7886
  msgstr ""
7887
 
7888
+ #: wpforo.php:1161
7889
  msgid ""
7890
  "Blog to Forum and Forum to Blog content synchronization. Blog posts with Forum "
7891
  "topics and Blog comments with Forum replies."
7892
  msgstr ""
7893
 
7894
+ #: wpforo.php:1162
7895
  msgid ""
7896
  "Ads Manager is a powerful yet simple advertisement management system, that "
7897
  "allows you to add adverting banners between forums, topics and posts."
7898
  msgstr ""
7899
 
7900
+ #: wpforo.php:1163
7901
  msgid ""
7902
  "Adds awesome Sticker and Emoticons packs to editor. Allows to create new "
7903
  "custom emoticons packs."
wpf-themes/classic/colors.css CHANGED
@@ -726,14 +726,47 @@ body.wpf-dark #wpf-msg-box a:hover, body.wpf-dark #wpf-msg-box a:active{color:#6
726
  #wpforo #wpforo-wrap.wpf-dark .wpf-acp-footer a.wpf-button-secondary {background: #777;color: #fff;}
727
  #wpforo #wpforo-wrap.wpf-dark .wpf-acp-footer a.wpf-button-secondary:last-child{color: #fff!important; background: #e22d00;}
728
 
729
-
730
- #wpforo #wpforo-wrap .wpf-topic-create .mce-top-part{position:absolute!important;bottom:-40px !important;z-index: 100; width: 100% !important;}
731
- #wpforo #wpforo-wrap .wpf-topic-create .wp-editor-wrap {margin-bottom: 40px;}
732
- #wpforo #wpforo-wrap .wpf-topic-create .mce-toolbar .mce-btn-group {padding-top: 8px;}
733
-
734
- #wpforo #wpforo-wrap .wpf-post-create .mce-top-part{position:absolute!important;bottom:-40px !important;z-index: 100; width: 100% !important;}
735
- #wpforo #wpforo-wrap .wpf-post-create .wp-editor-wrap {margin-bottom: 40px;}
736
- #wpforo #wpforo-wrap .wpf-post-create .mce-toolbar .mce-btn-group {padding-top: 8px;}
737
  #wpforo #wpforo-wrap {
738
  font-size: 13px; width: 100%; padding:10px 0; margin:0px;
739
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
726
  #wpforo #wpforo-wrap.wpf-dark .wpf-acp-footer a.wpf-button-secondary {background: #777;color: #fff;}
727
  #wpforo #wpforo-wrap.wpf-dark .wpf-acp-footer a.wpf-button-secondary:last-child{color: #fff!important; background: #e22d00;}
728
 
 
 
 
 
 
 
 
 
729
  #wpforo #wpforo-wrap {
730
  font-size: 13px; width: 100%; padding:10px 0; margin:0px;
731
+ }
732
+
733
+ #wpforo #wpforo-wrap #wpf-pm-load-more{color: #0099cc;}
734
+ #wpforo #wpforo-wrap .wpforo-messages-content .whr{ border-top: 1px solid #e6e6e6 !important; color: #cccccc; }
735
+ #wpforo #wpforo-wrap .wpforo-messages-content .whr abbr{ background-color: #ffffff; }
736
+ #wpforo #wpforo-wrap .wpfpm-msg-inner{border-color: #e6e6e6; background-color: #e6e6e6; color:#555555}
737
+ #wpforo #wpforo-wrap .wpfpm-msg-before:before{border-top-color: #e6e6e6;}
738
+ #wpforo #wpforo-wrap .wpfpm-me .wpfpm-msg-inner{ background-color: #f5f5f5; border-color: #f5f5f5; color: #555555; }
739
+ #wpforo #wpforo-wrap .wpfpm-me .wpfpm-msg-before:before{border-top-color: #f5f5f5;}
740
+ #wpforo #wpforo-wrap .wpforo-messages-content .wpfpm-left{border-color: #e6e6e6 }
741
+ #wpforo #wpforo-wrap .wpforo-messages-content .wpfpm-main{background-color: #ffffff;}
742
+ #wpforo #wpforo-wrap .wpforo-messages-content .wpfpm-main .wpfpm-form-wrapper{ border-top: #43a6df 1px dotted;}
743
+ #wpforo #wpforo-wrap .wpfpm-uli{ background-color: #f5f5f5; border-top-color: #e6e6e6; border-bottom-color: #ffffff;}
744
+ #wpforo #wpforo-wrap .wpfpm-uli-active, #wpforo #wpforo-wrap .wpfpm-uli:hover{background-color: #43a6df;}
745
+ #wpforo #wpforo-wrap .wpfpm-uli-active a, .wpfpm-uli:hover a, .wpfpm-uli a:hover{color: #ffffff !important;}
746
+ #wpforo #wpforo-wrap .wpfpm-content{ background-color: #ffffff !important; }
747
+ #wpforo #wpforo-wrap .wpforo-messages-content *::-webkit-scrollbar-track { -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); }
748
+ #wpforo #wpforo-wrap .wpforo-messages-content *::-webkit-scrollbar-thumb { background: #555555; -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); }
749
+ #wpforo #wpforo-wrap .wpforo-messages-content *::-webkit-scrollbar-thumb:window-inactive { background: #555555; }
750
+ #wpforo #wpforo-wrap .wpforo-profile-wrap .wpfpm-toolbar{ background-color: #f5f5f5; color: #555555; }
751
+ #wpforo #wpforo-wrap .wpforo-profile-wrap .wpfpm-toolbar #wpfpm-tools li a{ color: #555555; }
752
+ #wpforo #wpforo-wrap .wpforo-profile-wrap #wpfpm-ul-users-tooltip-wrap:hover,
753
+ #wpforo #wpforo-wrap .wpforo-profile-wrap #wpfpm_left_toggle_button:hover,
754
+ #wpforo #wpforo-wrap .wpforo-profile-wrap .wpfpm-toolbar #wpfpm-tools li:hover a,
755
+ #wpforo #wpforo-wrap .wpforo-profile-wrap .wpfpm-toolbar #wpfpm-tools li:hover,
756
+ #wpforo #wpforo-wrap .wpfpm-add-user:hover, #wpforo #wpforo-wrap .wpfpm-add-user .wpfpm-add-user-go{ color: #43a6df; }
757
+ #wpforo #wpforo-wrap .wpfpm-uli-cog-tooltip li:hover{ background-color: #0099cc; color: white; }
758
+ #wpforo #wpforo-wrap #wpfpm-uli-users-wrap .wpfpm-ul-users-tooltip li:hover{ background-color: #0099cc; color: white; }
759
+ #wpforo #wpforo-wrap #wpfpm-users-datalist > li.wpfpm-datalist-user:hover, #wpforo #wpforo-wrap #wpfpm-users-datalist > li.wpfpm-datalist-user:focus{ background-color: #0099cc; color: white; }
760
+ #wpforo #wpforo-wrap .wpfpm-uli-avatar .wpfpm-add{ border-color: #43a6df; background: #ffffff; color: #43a6df; }
761
+ #wpforo #wpforo-wrap .wpfpm-uli-has-message{border-bottom: 2px solid #ff812d !important;}
762
+ #wpforo #wpforo-wrap .wpfpm-uli-unread-count{background-color: #ff812d; color: #ffffff;}
763
+ #wpforo #wpforo-wrap .wpfpm_avatar_ban{color:#ff812d;}
764
+ #wpforo #wpforo-wrap .wpfpm-form-blocked{border-bottom: 1px solid #ff812d;color: #ff812d;}
765
+ #wpforo #wpforo-wrap .wpforo-messages-content{border:#e6e6e6 1px solid;}
766
+ #wpforo #wpforo-wrap.wpf-dark .wpforo-profile-wrap .wpfpm-toolbar, #wpforo #wpforo-wrap.wpf-dark #wpfpm_left_toggle_button{color:#dadada;}
767
+ #wpforo #wpforo-wrap.wpf-dark .wpfpm-msg-inner, #wpforo #wpforo-wrap.wpf-dark .wpfpm-msg-inner p{color:#dadada;}
768
+ #wpforo #wpforo-wrap.wpf-dark .wpf-post-create{border:none;}
769
+ #wpforo #wpforo-wrap.wpf-dark .wpfpm-uli-avatar .wpfpm-add{background:#dadada;}
770
+ #wpforo #wpforo-wrap.wpf-dark .wpfpm-uli-details{color:#dadada;}
771
+ #wpforo #wpforo-wrap.wpf-dark .wpforo-messages-content *::-webkit-scrollbar-thumb,
772
+ #wpforo #wpforo-wrap.wpf-dark .wpforo-messages-content *::-webkit-scrollbar-thumb:window-inactive { background: #0099cc; }
wpf-themes/classic/style-rtl.css CHANGED
@@ -1561,6 +1561,13 @@ body.wpforo-dialog-visible #wpforo-dialog-extra-wrap{display: block;}
1561
  #wpforo #wpforo-wrap .wpf-please-login{padding: 10px 30px; margin-top: 15px; text-align: center;}
1562
  #wpforo #wpforo-wrap #wpf-profile-action{font-size: smaller; margin-top: 0; float: left;}
1563
 
 
 
 
 
 
 
 
1564
  @media screen and (max-width:800px) {
1565
  #wpforo #wpforo-wrap .wpforo-content{width:100% !important; float:none; }
1566
  #wpforo #wpforo-wrap .wpforo-right-sidebar{width:100% !important; float:none; margin-top:25px;}
1561
  #wpforo #wpforo-wrap .wpf-please-login{padding: 10px 30px; margin-top: 15px; text-align: center;}
1562
  #wpforo #wpforo-wrap #wpf-profile-action{font-size: smaller; margin-top: 0; float: left;}
1563
 
1564
+ @media only screen and (min-width: 2000px) {
1565
+ #wpforo #wpforo-wrap .wpfl-4 .wpf-thread-users .wpf-circle.wpf-m img {
1566
+ width: 34px;
1567
+ height: 34px;
1568
+ }
1569
+ }
1570
+
1571
  @media screen and (max-width:800px) {
1572
  #wpforo #wpforo-wrap .wpforo-content{width:100% !important; float:none; }
1573
  #wpforo #wpforo-wrap .wpforo-right-sidebar{width:100% !important; float:none; margin-top:25px;}
wpf-themes/classic/style.css CHANGED
@@ -1570,6 +1570,13 @@ body.wpforo-dialog-visible #wpforo-dialog-extra-wrap{display: block;}
1570
  #wpforo #wpforo-wrap .wpf-please-login{padding: 10px 30px; margin-top: 15px; text-align: center;}
1571
  #wpforo #wpforo-wrap #wpf-profile-action{font-size: smaller; margin-top: 0; float: right;}
1572
 
 
 
 
 
 
 
 
1573
  @media screen and (max-width:800px) {
1574
  #wpforo #wpforo-wrap .wpforo-content{width:100% !important; float:none; }
1575
  #wpforo #wpforo-wrap .wpforo-right-sidebar{width:100% !important; float:none; margin-top:25px;}
1570
  #wpforo #wpforo-wrap .wpf-please-login{padding: 10px 30px; margin-top: 15px; text-align: center;}
1571
  #wpforo #wpforo-wrap #wpf-profile-action{font-size: smaller; margin-top: 0; float: right;}
1572
 
1573
+ @media only screen and (min-width: 2000px) {
1574
+ #wpforo #wpforo-wrap .wpfl-4 .wpf-thread-users .wpf-circle.wpf-m img {
1575
+ width: 34px;
1576
+ height: 34px;
1577
+ }
1578
+ }
1579
+
1580
  @media screen and (max-width:800px) {
1581
  #wpforo #wpforo-wrap .wpforo-content{width:100% !important; float:none; }
1582
  #wpforo #wpforo-wrap .wpforo-right-sidebar{width:100% !important; float:none; margin-top:25px;}
wpforo.php CHANGED
@@ -5,14 +5,14 @@
5
  * Description: WordPress Forum plugin. wpForo is a full-fledged forum solution for your community. Comes with multiple modern forum layouts.
6
  * Author: gVectors Team
7
  * Author URI: https://gvectors.com/
8
- * Version: 1.9.5
9
  * Text Domain: wpforo
10
  * Domain Path: /wpf-languages
11
  */
12
 
13
  //Exit if accessed directly
14
  if( !defined( 'ABSPATH' ) ) exit;
15
- if( !defined( 'WPFORO_VERSION' ) ) define('WPFORO_VERSION', '1.9.5');
16
 
17
  function wpforo_load_plugin_textdomain() { load_plugin_textdomain( 'wpforo', FALSE, basename( dirname( __FILE__ ) ) . '/wpf-languages/' ); }
18
  add_action( 'plugins_loaded', 'wpforo_load_plugin_textdomain' );
@@ -36,7 +36,7 @@ if( !class_exists( 'wpForo' ) ) {
36
 
37
  public $tables;
38
  public $blog_prefix;
39
- private $prefix = "wpforo_";
40
  private $_tables = array( 'accesses', 'activity', 'forums', 'languages', 'likes', 'phrases', 'postmeta', 'posts', 'post_revisions', 'profiles',
41
  'subscribes', 'topics', 'tags', 'usergroups', 'views', 'visits', 'votes', 'logs' );
42
  public $upload_dir_folders = array();
@@ -50,15 +50,16 @@ if( !class_exists( 'wpForo' ) ) {
50
  public $data = array();
51
  public $default;
52
 
53
- public $wp_current_user = array();
54
- public $current_user = array();
55
- public $current_usermeta = array();
56
- public $current_user_groupid = 4;
57
- public $current_user_secondary_groupids = '';
58
- public $current_userid = 0;
59
- public $current_username = '';
60
- public $current_user_email = '';
61
- public $current_user_display_name = '';
 
62
  public $current_user_status = '';
63
  public $current_user_accesses = array();
64
  public $session_token = '';
@@ -79,6 +80,7 @@ if( !class_exists( 'wpForo' ) ) {
79
  public $tools_legal;
80
 
81
  public $sql_cache;
 
82
  public $action;
83
  public $cache;
84
  public $phrase;
@@ -126,29 +128,30 @@ if( !class_exists( 'wpForo' ) ) {
126
  $this->setup();
127
  $this->init_hooks();
128
 
129
- $this->sql_cache = new wpForoSqlCache();
130
- $this->action = new wpForoAction();
131
- $this->cache = new wpForoCache();
132
- $this->phrase = new wpForoPhrase();
133
- $this->forum = new wpForoForum();
134
- $this->topic = new wpForoTopic();
135
- $this->postmeta = new wpForoPostMeta();
136
- $this->post = new wpForoPost();
137
- $this->usergroup = new wpForoUsergroup();
138
- $this->member = new wpForoMember();
139
- $this->perm = new wpForoPermissions();
140
- $this->sbscrb = new wpForoSubscribe();
141
- $this->tpl = new wpForoTemplate();
142
- $this->notice = new wpForoNotices();
143
- $this->api = new wpForoAPI();
144
- $this->log = new wpForoLogs();
145
- $this->feed = new wpForoFeed();
146
- $this->form = new wpForoForm();
147
- $this->moderation = new wpForoModeration();
148
- $this->activity = new wpForoActivity();
149
- $this->revision = new wpForoRevision();
150
- $this->seo = new wpForoSEO();
151
- $this->add = new stdClass(); // Integrations
 
152
  }
153
 
154
  private function init_hooks(){
@@ -169,7 +172,7 @@ if( !class_exists( 'wpForo' ) ) {
169
  }
170
  }
171
 
172
- private function init_db_tables($blog_id = 0){
173
  $this->db->query("SET SESSION group_concat_max_len = 1000000");
174
  $blog_id = apply_filters('wpforo_current_blog_id', $blog_id);
175
  $this->tables = new stdClass;
@@ -177,7 +180,16 @@ if( !class_exists( 'wpForo' ) ) {
177
  $this->blog_prefix = $this->db->get_blog_prefix( $blog_id );
178
  $this->_tables = apply_filters('wpforo_init_db_tables', $this->_tables);
179
  foreach ( $this->_tables as $table )
180
- $this->tables->$table = $this->blog_prefix . $this->prefix . $table;
 
 
 
 
 
 
 
 
 
181
  }
182
 
183
  private function includes(){
@@ -189,7 +201,7 @@ if( !class_exists( 'wpForo' ) ) {
189
 
190
  if( wpforo_is_admin() ) require_once( WPFORO_DIR .'/wpf-admin/admin.php' );
191
 
192
- require_once( WPFORO_DIR . '/wpf-includes/class-sqlcache.php' );
193
  require_once( WPFORO_DIR . '/wpf-includes/class-actions.php' );
194
  require_once( WPFORO_DIR . '/wpf-includes/class-cache.php' );
195
  require_once( WPFORO_DIR . '/wpf-includes/class-forums.php' );
@@ -653,7 +665,7 @@ if( !class_exists( 'wpForo' ) ) {
653
  $stats['last_post_url'] = $this->post->get_post_url($posts[$first]['last_post']);
654
  }
655
 
656
- $members = $this->member->get_members(array('orderby' => 'userid', 'order' => 'DESC', 'row_count' => 1, 'groupids' => $this->usergroup->get_visible_usergroup_ids()));
657
  if (isset($members[0]) && !empty($members[0])) {
658
  $members[0]['profile_url'] = $this->member->profile_url($members[0]);
659
  $stats['newest_member'] = $members[0];
@@ -702,6 +714,10 @@ if( !class_exists( 'wpForo' ) ) {
702
  $stats = wpforo_array_args_cast_and_merge($stats, $this->default->stats);
703
  update_option( $key, $stats );
704
  return $stats;
 
 
 
 
705
  }
706
 
707
  public function init_current_object(){
@@ -770,36 +786,6 @@ if( !class_exists( 'wpForo' ) ) {
770
 
771
  $wpf_url_parse = array_values($wpf_url_parse);
772
 
773
- if( wpfval($current_object, 'template') === 'search' ){
774
- $args = array(
775
- 'needle' => sanitize_text_field( wpfval($get, 'wpfs') ),
776
- 'type' => sanitize_text_field( wpfval($get, 'wpfin') ),
777
- 'date_period' => intval( wpfval($get, 'wpfd') ),
778
- 'forumids' => (array) wpfval($get, 'wpff'),
779
- 'offset' => ($current_object['paged'] - 1) * $this->current_object['items_per_page'],
780
- 'row_count' => $this->current_object['items_per_page'],
781
- 'orderby' => 'relevancy',
782
- 'order' => 'desc',
783
- 'postids' => array()
784
- );
785
- if( !empty($get['wpfob']) ){
786
- $args['orderby'] = sanitize_text_field( $get['wpfob'] );
787
- }elseif( in_array(wpfval( $args, 'type' ), array('tag','user-posts','user-topics'), true) ) {
788
- $args['orderby'] = 'date';
789
- }
790
- $wpfo = strtolower(wpfval($get, 'wpfo'));
791
- if( in_array($wpfo, array('asc','desc'), true) ) $args['order'] = $wpfo;
792
- $sdata = array_filter( (array) wpfval($get, 'data') );
793
- $args['postids'] = WPF()->postmeta->search($sdata);
794
- $current_object['args'] = $args;
795
- if( $sdata && !$args['postids'] ){
796
- $current_object['items_count'] = 0;
797
- $current_object['posts'] = array();
798
- }else{
799
- $current_object['posts'] = WPF()->post->search($args, $current_object['items_count']);
800
- }
801
- }
802
-
803
  if( !wpfval($current_object, 'template') ){
804
  $current_object = apply_filters('wpforo_before_init_current_object', $current_object, $wpf_url_parse);
805
  }
@@ -819,6 +805,25 @@ if( !class_exists( 'wpForo' ) ) {
819
  }
820
  }
821
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
822
  if( wpfval($current_object, 'template') ){
823
  if( !wpfval($current_object, 'userid') && !wpfval($current_object, 'user_nicename') && wpforo_is_member_template($current_object['template']) ){
824
  if( $qvar0 = wpfval($current_object['qvars'], 0) ){
@@ -835,6 +840,34 @@ if( !class_exists( 'wpForo' ) ) {
835
  exit();
836
  }
837
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
838
  }elseif($current_object['template'] === 'recent'){
839
  $current_object['items_per_page'] = $this->post->options['topics_per_page'];
840
  }elseif($current_object['template'] === 'tags'){
@@ -895,21 +928,6 @@ if( !class_exists( 'wpForo' ) ) {
895
  }
896
  }
897
  }
898
- }else{
899
- $current_object['template'] = 'forum';
900
- $this->data['varname'] = 'topic';
901
- if( isset($wpf_url_parse[0]) ){
902
- if( isset($wpf_url_parse[1]) ){
903
- $current_object['topic_slug'] = $wpf_url_parse[0];
904
- $current_object['forum_slug'] = $wpf_url_parse[1];
905
- $current_object['template'] = 'post';
906
- $this->data['varname'] = 'post';
907
- }else{
908
- $current_object['forum_slug'] = $wpf_url_parse[0];
909
- $current_object['template'] = 'topic';
910
- $this->data['varname'] = 'topic';
911
- }
912
- }
913
  }
914
 
915
  if( wpfval($current_object, 'userid') || wpfval($current_object, 'user_nicename') ){
5
  * Description: WordPress Forum plugin. wpForo is a full-fledged forum solution for your community. Comes with multiple modern forum layouts.
6
  * Author: gVectors Team
7
  * Author URI: https://gvectors.com/
8
+ * Version: 1.9.6
9
  * Text Domain: wpforo
10
  * Domain Path: /wpf-languages
11
  */
12
 
13
  //Exit if accessed directly
14
  if( !defined( 'ABSPATH' ) ) exit;
15
+ if( !defined( 'WPFORO_VERSION' ) ) define('WPFORO_VERSION', '1.9.6');
16
 
17
  function wpforo_load_plugin_textdomain() { load_plugin_textdomain( 'wpforo', FALSE, basename( dirname( __FILE__ ) ) . '/wpf-languages/' ); }
18
  add_action( 'plugins_loaded', 'wpforo_load_plugin_textdomain' );
36
 
37
  public $tables;
38
  public $blog_prefix;
39
+ public $prefix = "wpforo_";
40
  private $_tables = array( 'accesses', 'activity', 'forums', 'languages', 'likes', 'phrases', 'postmeta', 'posts', 'post_revisions', 'profiles',
41
  'subscribes', 'topics', 'tags', 'usergroups', 'views', 'visits', 'votes', 'logs' );
42
  public $upload_dir_folders = array();
50
  public $data = array();
51
  public $default;
52
 
53
+ public $wp_current_user = array();
54
+ public $current_user = array();
55
+ public $current_usermeta = array();
56
+ public $current_user_groupid = 4;
57
+ public $current_user_groupids = array(4);
58
+ public $current_user_secondary_groupids = '';
59
+ public $current_userid = 0;
60
+ public $current_username = '';
61
+ public $current_user_email = '';
62
+ public $current_user_display_name = '';
63
  public $current_user_status = '';
64
  public $current_user_accesses = array();
65
  public $session_token = '';
80
  public $tools_legal;
81
 
82
  public $sql_cache;
83
+ public $ram_cache;
84
  public $action;
85
  public $cache;
86
  public $phrase;
128
  $this->setup();
129
  $this->init_hooks();
130
 
131
+ $this->sql_cache =
132
+ $this->ram_cache = new wpForoRamCache();
133
+ $this->action = new wpForoAction();
134
+ $this->cache = new wpForoCache();
135
+ $this->phrase = new wpForoPhrase();
136
+ $this->forum = new wpForoForum();
137
+ $this->topic = new wpForoTopic();
138
+ $this->postmeta = new wpForoPostMeta();
139
+ $this->post = new wpForoPost();
140
+ $this->usergroup = new wpForoUsergroup();
141
+ $this->member = new wpForoMember();
142
+ $this->perm = new wpForoPermissions();
143
+ $this->sbscrb = new wpForoSubscribe();
144
+ $this->tpl = new wpForoTemplate();
145
+ $this->notice = new wpForoNotices();
146
+ $this->api = new wpForoAPI();
147
+ $this->log = new wpForoLogs();
148
+ $this->feed = new wpForoFeed();
149
+ $this->form = new wpForoForm();
150
+ $this->moderation = new wpForoModeration();
151
+ $this->activity = new wpForoActivity();
152
+ $this->revision = new wpForoRevision();
153
+ $this->seo = new wpForoSEO();
154
+ $this->add = new stdClass(); // Integrations
155
  }
156
 
157
  private function init_hooks(){
172
  }
173
  }
174
 
175
+ public function init_db_tables($blog_id = 0){
176
  $this->db->query("SET SESSION group_concat_max_len = 1000000");
177
  $blog_id = apply_filters('wpforo_current_blog_id', $blog_id);
178
  $this->tables = new stdClass;
180
  $this->blog_prefix = $this->db->get_blog_prefix( $blog_id );
181
  $this->_tables = apply_filters('wpforo_init_db_tables', $this->_tables);
182
  foreach ( $this->_tables as $table )
183
+ $this->tables->$table = $this->fix_table_name($table);
184
+ }
185
+
186
+ /**
187
+ * @param string $basename
188
+ *
189
+ * @return string
190
+ */
191
+ public function fix_table_name($basename){
192
+ return $this->blog_prefix . $this->prefix . $basename;
193
  }
194
 
195
  private function includes(){
201
 
202
  if( wpforo_is_admin() ) require_once( WPFORO_DIR .'/wpf-admin/admin.php' );
203
 
204
+ require_once( WPFORO_DIR . '/wpf-includes/class-ramcache.php' );
205
  require_once( WPFORO_DIR . '/wpf-includes/class-actions.php' );
206
  require_once( WPFORO_DIR . '/wpf-includes/class-cache.php' );
207
  require_once( WPFORO_DIR . '/wpf-includes/class-forums.php' );
665
  $stats['last_post_url'] = $this->post->get_post_url($posts[$first]['last_post']);
666
  }
667
 
668
+ $members = $this->member->get_members(array('orderby' => 'userid', 'status' => array('active'), 'order' => 'DESC', 'row_count' => 1, 'groupids' => $this->usergroup->get_visible_usergroup_ids()));
669
  if (isset($members[0]) && !empty($members[0])) {
670
  $members[0]['profile_url'] = $this->member->profile_url($members[0]);
671
  $stats['newest_member'] = $members[0];
714
  $stats = wpforo_array_args_cast_and_merge($stats, $this->default->stats);
715
  update_option( $key, $stats );
716
  return $stats;
717
+ }
718
+
719
+ public function init_current_template(){
720
+
721
  }
722
 
723
  public function init_current_object(){
786
 
787
  $wpf_url_parse = array_values($wpf_url_parse);
788
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
789
  if( !wpfval($current_object, 'template') ){
790
  $current_object = apply_filters('wpforo_before_init_current_object', $current_object, $wpf_url_parse);
791
  }
805
  }
806
  }
807
 
808
+ if( !wpfval($current_object, 'template') ){
809
+ $current_object['template'] = 'forum';
810
+ $this->data['varname'] = 'topic';
811
+ if( isset($wpf_url_parse[0]) ){
812
+ if( isset($wpf_url_parse[1]) ){
813
+ $current_object['topic_slug'] = $wpf_url_parse[0];
814
+ $current_object['forum_slug'] = $wpf_url_parse[1];
815
+ $current_object['template'] = 'post';
816
+ $this->data['varname'] = 'post';
817
+ }else{
818
+ $current_object['forum_slug'] = $wpf_url_parse[0];
819
+ $current_object['template'] = 'topic';
820
+ $this->data['varname'] = 'topic';
821
+ }
822
+ }
823
+ }
824
+
825
+ $current_object = apply_filters('wpforo_after_init_current_template', $current_object, $wpf_url_parse, $get);
826
+
827
  if( wpfval($current_object, 'template') ){
828
  if( !wpfval($current_object, 'userid') && !wpfval($current_object, 'user_nicename') && wpforo_is_member_template($current_object['template']) ){
829
  if( $qvar0 = wpfval($current_object['qvars'], 0) ){
840
  exit();
841
  }
842
  }
843
+ }elseif($current_object['template'] === 'search'){
844
+ $args = array(
845
+ 'needle' => sanitize_text_field( wpfval($get, 'wpfs') ),
846
+ 'type' => sanitize_text_field( wpfval($get, 'wpfin') ),
847
+ 'date_period' => intval( wpfval($get, 'wpfd') ),
848
+ 'forumids' => (array) wpfval($get, 'wpff'),
849
+ 'offset' => ($current_object['paged'] - 1) * $this->current_object['items_per_page'],
850
+ 'row_count' => $this->current_object['items_per_page'],
851
+ 'orderby' => 'relevancy',
852
+ 'order' => 'desc',
853
+ 'postids' => array()
854
+ );
855
+ if( !empty($get['wpfob']) ){
856
+ $args['orderby'] = sanitize_text_field( $get['wpfob'] );
857
+ }elseif( in_array(wpfval( $args, 'type' ), array('tag','user-posts','user-topics'), true) ) {
858
+ $args['orderby'] = 'date';
859
+ }
860
+ $wpfo = strtolower(wpfval($get, 'wpfo'));
861
+ if( in_array($wpfo, array('asc','desc'), true) ) $args['order'] = $wpfo;
862
+ $sdata = array_filter( (array) wpfval($get, 'data') );
863
+ $args['postids'] = WPF()->postmeta->search($sdata);
864
+ $current_object['args'] = $args;
865
+ if( $sdata && !$args['postids'] ){
866
+ $current_object['items_count'] = 0;
867
+ $current_object['posts'] = array();
868
+ }else{
869
+ $current_object['posts'] = WPF()->post->search($args, $current_object['items_count']);
870
+ }
871
  }elseif($current_object['template'] === 'recent'){
872
  $current_object['items_per_page'] = $this->post->options['topics_per_page'];
873
  }elseif($current_object['template'] === 'tags'){
928
  }
929
  }
930
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
931
  }
932
 
933
  if( wpfval($current_object, 'userid') || wpfval($current_object, 'user_nicename') ){