wpForo Forum - Version 1.4.2

Version Description

| 22.10.2017 =

wpForo v1.4.2 Release Summary

  • Added: Recent Posts page, menu, footer link,
  • Fixed Bug: Topic views counting. Guest logging.
  • Fixed Bug: Reset Password page and URL redirection,
  • Fixed Bug: User custom field management issues,
  • Fixed Bug: CSS issues...
  • Fixed Bug: Missing phrases,
  • Fixed Bug: Login/Register pop-up window when guest clicks on Add Topic button

NOTE: IF YOU UPDATE FROM 1.4.1

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

NOTE: IF YOU UPDATE FROM OLDER VERSIONS

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

Release Info

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

Code changes from version 1.4.1 to 1.4.2

readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: gVectors Team
3
  Tags: forums, forum, forum plugin, community, discussion, WordPress forum plugin
4
  Requires at least: 4.1
5
- Tested up to: 4.8
6
- Stable tag: 1.4.1
7
  License: GPLv2 or later
8
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -11,7 +11,7 @@ First professional forum plugin for WordPress. Full-fledged forum solution with
11
 
12
  == Description ==
13
 
14
- The Best WordPress forum plugin made by [gVectors Team](https://gvectors.com/). Everything you need to run an efficient forum. Powerful and beautiful forum with unique features.
15
 
16
  Support Forum and Demo: [https://wpforo.com/community/](https://wpforo.com/community/)
17
  Forum Documentation: [https://wpforo.com/documentation/](https://wpforo.com/documentation/)
@@ -131,21 +131,22 @@ wpForo Support Forum: <https://wpforo.com/community/>
131
 
132
  == Changelog ==
133
 
134
- = 1.4.1 | 12.10.2017 =
135
 
136
- [wpForo v1.4.1 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-4-1-is-released/)
137
 
138
- * Added: Bold titles when Forum and Topic is not visited/read
139
- * Added: Option to enable/disable forum RSS Feed
140
- * Added: Option to enable/disable WP to wpForo forum reset pass URL
141
- * Fixed Bug: Guests permission to view forum users avatar is disabled
142
- * Fixed Bug: Unable to change forum user Email and Display Name
143
- * Fixed Bug: Forum search form problem, empty forum field on some servers
144
- * Fixed Bug: Forum widget avatar doesn't reflect view avatar permission
145
 
146
 
147
- NOTE: IF YOU UPDATE FROM 1.4.0
148
 
 
149
  - To load your customized colors please refresh forum front-end page twice.
150
  - If you have a Cache Plugin, please delete all caches after wpForo update.
151
  - If you use CDN and found some issue please purge it.
@@ -158,6 +159,19 @@ NOTE: IF YOU UPDATE FROM OLDER VERSIONS
158
  - In case you update forum and you have a large database, please make your forum faster [using this instruction...](https://wpforo.com/community/faq/forum-is-slow/)
159
 
160
 
 
 
 
 
 
 
 
 
 
 
 
 
 
161
  = 1.4.0 | 07.10.2017 =
162
 
163
  [wpForo v1.4.0 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-4-0-is-released/)
2
  Contributors: gVectors Team
3
  Tags: forums, forum, forum plugin, community, discussion, WordPress forum plugin
4
  Requires at least: 4.1
5
+ Tested up to: 4.9
6
+ Stable tag: 1.4.2
7
  License: GPLv2 or later
8
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
9
 
11
 
12
  == Description ==
13
 
14
+ The Best WordPress forum plugin made by [gVectors Team](https://gvectors.com/). Everything you need to run an efficient and professional community. Powerful and beautiful forum with unique features.
15
 
16
  Support Forum and Demo: [https://wpforo.com/community/](https://wpforo.com/community/)
17
  Forum Documentation: [https://wpforo.com/documentation/](https://wpforo.com/documentation/)
131
 
132
  == Changelog ==
133
 
134
+ = 1.4.2 | 22.10.2017 =
135
 
136
+ [wpForo v1.4.2 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-4-2-is-released/)
137
 
138
+ * Added: Recent Posts page, menu, footer link,
139
+ * Fixed Bug: Topic views counting. Guest logging.
140
+ * Fixed Bug: Reset Password page and URL redirection,
141
+ * Fixed Bug: User custom field management issues,
142
+ * Fixed Bug: CSS issues...
143
+ * Fixed Bug: Missing phrases,
144
+ * Fixed Bug: Login/Register pop-up window when guest clicks on Add Topic button
145
 
146
 
147
+ NOTE: IF YOU UPDATE FROM 1.4.1
148
 
149
+ - After wpForo update, you'll see a message "wpForo - Update Database". Please click on [Update Database] button to complete update process. This is a data synchronization action, it doesn't delete forum data.
150
  - To load your customized colors please refresh forum front-end page twice.
151
  - If you have a Cache Plugin, please delete all caches after wpForo update.
152
  - If you use CDN and found some issue please purge it.
159
  - In case you update forum and you have a large database, please make your forum faster [using this instruction...](https://wpforo.com/community/faq/forum-is-slow/)
160
 
161
 
162
+ = 1.4.1 | 12.10.2017 =
163
+
164
+ [wpForo v1.4.1 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-4-1-is-released/)
165
+
166
+ * Added: Bold titles when Forum and Topic is not visited/read
167
+ * Added: Option to enable/disable forum RSS Feed
168
+ * Added: Option to enable/disable WP to wpForo forum reset pass URL
169
+ * Fixed Bug: Guests permission to view forum users avatar is disabled
170
+ * Fixed Bug: Unable to change forum user Email and Display Name
171
+ * Fixed Bug: Forum search form problem, empty forum field on some servers
172
+ * Fixed Bug: Forum widget avatar doesn't reflect view avatar permission
173
+
174
+
175
  = 1.4.0 | 07.10.2017 =
176
 
177
  [wpForo v1.4.0 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-4-0-is-released/)
wpf-admin/xml/english.xml CHANGED
@@ -390,4 +390,13 @@
390
  <phrase name="--- Choose ---"><![CDATA[--- Choose ---]]></phrase>
391
  <phrase name="New"><![CDATA[New]]></phrase>
392
  <phrase name="Required field"><![CDATA[Required field]]></phrase>
 
 
 
 
 
 
 
 
 
393
  </language>
390
  <phrase name="--- Choose ---"><![CDATA[--- Choose ---]]></phrase>
391
  <phrase name="New"><![CDATA[New]]></phrase>
392
  <phrase name="Required field"><![CDATA[Required field]]></phrase>
393
+ <phrase name="Add Reply"><![CDATA[Add Reply]]></phrase>
394
+ <phrase name="Forums RSS Feed"><![CDATA[Forums RSS Feed]]></phrase>
395
+ <phrase name="Topics RSS Feed"><![CDATA[Topics RSS Feed]]></phrase>
396
+ <phrase name="Find a member"><![CDATA[Find a member]]></phrase>
397
+ <phrase name="Display Name or Nicename"><![CDATA[Display Name or Nicename]]></phrase>
398
+ <phrase name="Reset Search"><![CDATA[Reset Search]]></phrase>
399
+ <phrase name="Reset Result"><![CDATA[Reset Result]]></phrase>
400
+ <phrase name="Recently Added"><![CDATA[Recent Posts]]></phrase>
401
+ <phrase name="No posts were found here"><![CDATA[No posts were found here]]></phrase>
402
  </language>
wpf-assets/js/ajax.js CHANGED
@@ -21,7 +21,7 @@ jQuery(document).ready(function($){
21
  if( response.stat == 1 ){
22
  $("#" + postid_value).removeClass('wpforo-like').addClass('wpforo-unlike');
23
  $("#likeicon" + postid).removeClass('fa-thumbs-o-up').addClass('fa-thumbs-o-down');
24
- $("#liketext" + postid).text(' ' + wpf_ajax_obj.phrases['unlike']);
25
  $("#post-" + postid + " .bleft").html(response.likers);
26
  }
27
  $('#wpforo-load').invisible();
@@ -51,7 +51,7 @@ jQuery(document).ready(function($){
51
  if( response.stat == 1 ){
52
  $("#" + postid_value).removeClass('wpforo-unlike').addClass('wpforo-like');
53
  $("#likeicon" + postid).removeClass('fa-thumbs-o-down').addClass('fa-thumbs-o-up');
54
- $("#liketext" + postid).text(' ' + wpf_ajax_obj.phrases['like']);
55
  $("#post-" + postid + " .bleft").html(response.likers);
56
  }
57
  $('#wpforo-load').invisible();
@@ -199,8 +199,8 @@ jQuery(document).ready(function($){
199
  $( "#formbutton" ).attr('name', 'post[save]');
200
  $( "#formtopicid" ).attr('name', 'post[topicid]');
201
  $( "#title" ).attr('name', 'post[title]');
202
- $( "#formbutton" ).val( wpf_ajax_obj.phrases.save );
203
- $( "#title").val( wpf_ajax_obj.phrases['re'] + ": " + $("#title").attr('placeholder').replace( wpf_ajax_obj.phrases['re'] + ": ", "").replace( wpf_ajax_obj.phrases['answer to'] + ": ", "") );
204
  $('html, body').animate({scrollTop: $("#wpf-form-wrapper").offset().top}, 1000);
205
 
206
  tinymce.execCommand('mceFocus',false,'postbody');
@@ -290,7 +290,7 @@ jQuery(document).ready(function($){
290
  }).done(function(response){
291
  if(response != 0){
292
  $("#" + postid_value).removeClass('wpforo-sticky').addClass('wpforo-unsticky');
293
- $("#stickytext" + postid).text(' ' + wpf_ajax_obj.phrases.unsticky);
294
  }
295
  $('#wpforo-load').invisible();
296
  });
@@ -314,7 +314,7 @@ jQuery(document).ready(function($){
314
  }).done(function(response){
315
  if(response != 0){
316
  $("#" + postid_value).removeClass('wpforo-unsticky').addClass('wpforo-sticky');
317
- $("#stickytext" + postid).text(' ' + wpf_ajax_obj.phrases.sticky);
318
  }
319
  $('#wpforo-load').invisible();
320
  });
@@ -341,7 +341,7 @@ jQuery(document).ready(function($){
341
  $("#approveicon" + postid).removeClass('fa-check').addClass('fa-exclamation-circle');
342
  $("#wpforo-wrap #post-" + postid + " .wpf-mod-message").hide();
343
  $("#wpforo-wrap .wpf-status-title").hide();
344
- $("#approvetext" + postid).text(' ' + wpf_ajax_obj.phrases.unapprove);
345
  }
346
  $('#wpforo-load').invisible();
347
  });
@@ -368,7 +368,7 @@ jQuery(document).ready(function($){
368
  $("#approveicon" + postid).removeClass('fa-exclamation-circle').addClass('fa-check');
369
  $('#wpforo-wrap #post-' + postid + ' .wpf-mod-message').visible();
370
  $('#wpforo-wrap .wpf-status-title').visible();
371
- $("#approvetext" + postid).text(' ' + wpf_ajax_obj.phrases.approve);
372
  }
373
  $('#wpforo-load').invisible();
374
  location.reload();
@@ -395,7 +395,7 @@ jQuery(document).ready(function($){
395
  if(response != 0){
396
  $("#" + postid_value).removeClass('wpforo-private').addClass('wpforo-public');
397
  $("#privateicon" + postid).removeClass('fa-eye-slash').addClass('fa-eye');
398
- $("#privatetext" + postid).text(' ' + wpf_ajax_obj.phrases.public);
399
  }
400
  $('#wpforo-load').invisible();
401
  });
@@ -419,7 +419,7 @@ jQuery(document).ready(function($){
419
  if(response != 0){
420
  $("#" + postid_value).removeClass('wpforo-public').addClass('wpforo-private');
421
  $("#privateicon" + postid).removeClass('fa-eye').addClass('fa-eye-slash');
422
- $("#privatetext" + postid).text(' ' + wpf_ajax_obj.phrases.private);
423
  }
424
  $('#wpforo-load').invisible();
425
  });
@@ -443,7 +443,7 @@ jQuery(document).ready(function($){
443
  }).done(function(response){
444
  if(response != 0){
445
  $("#" + postid_value).removeClass('wpforo-solved').addClass('wpforo-unsolved');
446
- $("#solvedtext" + postid).text(' ' + wpf_ajax_obj.phrases.unsolved);
447
  }
448
  $('#wpforo-load').invisible();
449
  });
@@ -466,7 +466,7 @@ jQuery(document).ready(function($){
466
  }).done(function(response){
467
  if(response != 0){
468
  $("#" + postid_value).removeClass('wpforo-unsolved').addClass('wpforo-solved');
469
- $("#solvedtext" + postid).text(' ' + wpf_ajax_obj.phrases.solved);
470
  }
471
  $('#wpforo-load').invisible();
472
  });
@@ -491,7 +491,7 @@ jQuery(document).ready(function($){
491
  if(response != 0){
492
  $("#" + postid_value).removeClass('wpforo-close').addClass('wpforo-open');
493
  $("#closeicon" + postid).removeClass('fa-lock').addClass('fa-unlock');
494
- $("#closetext" + postid).text(' ' + wpf_ajax_obj.phrases.open);
495
  $("#wpf-form-wrapper").remove();
496
  $(".wpforo-reply").remove();
497
  $(".wpforo-quote").remove();
@@ -518,7 +518,7 @@ jQuery(document).ready(function($){
518
  if(response != 0){
519
  /*$("#" + postid_value).removeClass('wpforo-open').addClass('wpforo-close');
520
  $("#closeicon" + postid).removeClass('fa-unlock').addClass('fa-lock');
521
- $("#closetext" + postid).text(' ' + wpf_ajax_obj.phrases.close);*/
522
  window.location.assign(response);
523
  }
524
  $('#wpforo-load').invisible();
@@ -559,7 +559,7 @@ jQuery(document).ready(function($){
559
 
560
  $( "#formaction" ).val( 'edit' );
561
  $( "#formpostid" ).val( postid );
562
- $( "#formbutton" ).val( wpf_ajax_obj.phrases.update );
563
  $( 'html, body' ).animate({scrollTop: $("#wpf-form-wrapper").offset().top}, 1000);
564
  if(is_topic == -1){
565
  // $( "#title" ).prop( "disabled", true );
@@ -594,7 +594,7 @@ jQuery(document).ready(function($){
594
  $(document).on('click','.wpforo-delete', function(){
595
  $("#wpf-msg-box").hide(); $('#wpforo-load').visible();
596
 
597
- var ok = confirm(wpforo_ucwords(wpf_ajax_obj.phrases["are you sure you want to delete?"]));
598
 
599
  if (ok == true){
600
  var postid_value = $(this).attr('id');
@@ -678,7 +678,7 @@ jQuery(document).ready(function($){
678
  }
679
  if( response.stat == 1 ){
680
  $("#wpfsubscribe-" + itemid).removeClass('wpf-subscribe-' + type).addClass('wpf-unsubscribe-' + type);
681
- $("#wpfsubscribe-" + itemid).text( ' ' + wpf_ajax_obj.phrases.unsubscribe );
682
  $('#wpforo-load').invisible();
683
  }else{
684
  $('#wpforo-load').invisible();
@@ -697,11 +697,11 @@ jQuery(document).ready(function($){
697
  var clases = $(this).attr('class');
698
  if( clases.indexOf("wpf-unsubscribe-forum") > -1 ){
699
  type = 'forum';
700
- button_phrase = wpforo_ucwords(wpf_ajax_obj.phrases["subscribe for new topics"]);
701
  }
702
  if( clases.indexOf("wpf-unsubscribe-topic") > -1 ){
703
  type = 'topic';
704
- button_phrase = wpforo_ucwords(wpf_ajax_obj.phrases["subscribe for new replies"]);
705
  }
706
  var postid_value = $(this).attr('id');
707
  var itemid = postid_value.replace("wpfsubscribe-", "");
21
  if( response.stat == 1 ){
22
  $("#" + postid_value).removeClass('wpforo-like').addClass('wpforo-unlike');
23
  $("#likeicon" + postid).removeClass('fa-thumbs-o-up').addClass('fa-thumbs-o-down');
24
+ $("#liketext" + postid).text( ' ' + wpforo_phrase('Unlike') );
25
  $("#post-" + postid + " .bleft").html(response.likers);
26
  }
27
  $('#wpforo-load').invisible();
51
  if( response.stat == 1 ){
52
  $("#" + postid_value).removeClass('wpforo-unlike').addClass('wpforo-like');
53
  $("#likeicon" + postid).removeClass('fa-thumbs-o-down').addClass('fa-thumbs-o-up');
54
+ $("#liketext" + postid).text( ' ' + wpforo_phrase('Like') );
55
  $("#post-" + postid + " .bleft").html(response.likers);
56
  }
57
  $('#wpforo-load').invisible();
199
  $( "#formbutton" ).attr('name', 'post[save]');
200
  $( "#formtopicid" ).attr('name', 'post[topicid]');
201
  $( "#title" ).attr('name', 'post[title]');
202
+ $( "#formbutton" ).val( wpforo_phrase('Save') );
203
+ $( "#title").val( wpforo_phrase('re') + ": " + $("#title").attr('placeholder').replace( wpforo_phrase('re') + ": ", "").replace( wpforo_phrase('answer to') + ": ", "") );
204
  $('html, body').animate({scrollTop: $("#wpf-form-wrapper").offset().top}, 1000);
205
 
206
  tinymce.execCommand('mceFocus',false,'postbody');
290
  }).done(function(response){
291
  if(response != 0){
292
  $("#" + postid_value).removeClass('wpforo-sticky').addClass('wpforo-unsticky');
293
+ $("#stickytext" + postid).text( ' ' + wpforo_phrase('Unsticky') );
294
  }
295
  $('#wpforo-load').invisible();
296
  });
314
  }).done(function(response){
315
  if(response != 0){
316
  $("#" + postid_value).removeClass('wpforo-unsticky').addClass('wpforo-sticky');
317
+ $("#stickytext" + postid).text( ' ' + wpforo_phrase('Sticky') );
318
  }
319
  $('#wpforo-load').invisible();
320
  });
341
  $("#approveicon" + postid).removeClass('fa-check').addClass('fa-exclamation-circle');
342
  $("#wpforo-wrap #post-" + postid + " .wpf-mod-message").hide();
343
  $("#wpforo-wrap .wpf-status-title").hide();
344
+ $("#approvetext" + postid).text( ' ' + wpforo_phrase('Unapprove') );
345
  }
346
  $('#wpforo-load').invisible();
347
  });
368
  $("#approveicon" + postid).removeClass('fa-exclamation-circle').addClass('fa-check');
369
  $('#wpforo-wrap #post-' + postid + ' .wpf-mod-message').visible();
370
  $('#wpforo-wrap .wpf-status-title').visible();
371
+ $("#approvetext" + postid).text( ' ' + wpforo_phrase('Approve') );
372
  }
373
  $('#wpforo-load').invisible();
374
  location.reload();
395
  if(response != 0){
396
  $("#" + postid_value).removeClass('wpforo-private').addClass('wpforo-public');
397
  $("#privateicon" + postid).removeClass('fa-eye-slash').addClass('fa-eye');
398
+ $("#privatetext" + postid).text( ' ' + wpforo_phrase('Public') );
399
  }
400
  $('#wpforo-load').invisible();
401
  });
419
  if(response != 0){
420
  $("#" + postid_value).removeClass('wpforo-public').addClass('wpforo-private');
421
  $("#privateicon" + postid).removeClass('fa-eye').addClass('fa-eye-slash');
422
+ $("#privatetext" + postid).text( ' ' + wpforo_phrase('Private') );
423
  }
424
  $('#wpforo-load').invisible();
425
  });
443
  }).done(function(response){
444
  if(response != 0){
445
  $("#" + postid_value).removeClass('wpforo-solved').addClass('wpforo-unsolved');
446
+ $("#solvedtext" + postid).text( ' ' + wpforo_phrase('Unsolved') );
447
  }
448
  $('#wpforo-load').invisible();
449
  });
466
  }).done(function(response){
467
  if(response != 0){
468
  $("#" + postid_value).removeClass('wpforo-unsolved').addClass('wpforo-solved');
469
+ $("#solvedtext" + postid).text( ' ' + wpforo_phrase('Solved') );
470
  }
471
  $('#wpforo-load').invisible();
472
  });
491
  if(response != 0){
492
  $("#" + postid_value).removeClass('wpforo-close').addClass('wpforo-open');
493
  $("#closeicon" + postid).removeClass('fa-lock').addClass('fa-unlock');
494
+ $("#closetext" + postid).text( ' ' + wpforo_phrase('Open') );
495
  $("#wpf-form-wrapper").remove();
496
  $(".wpforo-reply").remove();
497
  $(".wpforo-quote").remove();
518
  if(response != 0){
519
  /*$("#" + postid_value).removeClass('wpforo-open').addClass('wpforo-close');
520
  $("#closeicon" + postid).removeClass('fa-unlock').addClass('fa-lock');
521
+ $("#closetext" + postid).text( ' ' + wpforo_phrase('Close') );*/
522
  window.location.assign(response);
523
  }
524
  $('#wpforo-load').invisible();
559
 
560
  $( "#formaction" ).val( 'edit' );
561
  $( "#formpostid" ).val( postid );
562
+ $( "#formbutton" ).val( wpforo_phrase('Update') );
563
  $( 'html, body' ).animate({scrollTop: $("#wpf-form-wrapper").offset().top}, 1000);
564
  if(is_topic == -1){
565
  // $( "#title" ).prop( "disabled", true );
594
  $(document).on('click','.wpforo-delete', function(){
595
  $("#wpf-msg-box").hide(); $('#wpforo-load').visible();
596
 
597
+ var ok = confirm(wpforo_ucwords( wpforo_phrase('are you sure you want to delete?') ));
598
 
599
  if (ok == true){
600
  var postid_value = $(this).attr('id');
678
  }
679
  if( response.stat == 1 ){
680
  $("#wpfsubscribe-" + itemid).removeClass('wpf-subscribe-' + type).addClass('wpf-unsubscribe-' + type);
681
+ $("#wpfsubscribe-" + itemid).text( ' ' + wpforo_phrase('Unsubscribe') );
682
  $('#wpforo-load').invisible();
683
  }else{
684
  $('#wpforo-load').invisible();
697
  var clases = $(this).attr('class');
698
  if( clases.indexOf("wpf-unsubscribe-forum") > -1 ){
699
  type = 'forum';
700
+ button_phrase = wpforo_ucwords( wpforo_phrase('Subscribe for new topics') );
701
  }
702
  if( clases.indexOf("wpf-unsubscribe-topic") > -1 ){
703
  type = 'topic';
704
+ button_phrase = wpforo_ucwords( wpforo_phrase('Subscribe for new replies') );
705
  }
706
  var postid_value = $(this).attr('id');
707
  var itemid = postid_value.replace("wpfsubscribe-", "");
wpf-assets/js/frontend.js CHANGED
@@ -30,9 +30,10 @@ function wpforo_notice_show(notice){
30
  }
31
 
32
  function wpforo_phrase(phrase_key){
33
- phrase_key = phrase_key.toLowerCase();
34
- var wpfaPhrases = wpf_ajax_obj.phrases;
35
- if( wpfaPhrases[phrase_key] !== undefined ) phrase_key = wpfaPhrases[phrase_key];
 
36
  return phrase_key;
37
  }
38
 
@@ -43,7 +44,7 @@ jQuery(document).ready(function($){
43
  $('html, body').scrollTop(_m.offset().top - 25);
44
  }
45
 
46
- $(document).on('click', '#add_wpftopic', function(){
47
  var stat = $( ".wpf-topic-create" ).is( ":hidden" );
48
  $( ".wpf-topic-create" ).slideToggle( "slow" );
49
  var add_wpftopic = '<i class="fa fa-times" aria-hidden="true"></i>';
@@ -106,7 +107,7 @@ jQuery(document).ready(function($){
106
  $( ".wpforo-reply" ).click(function(){
107
 
108
  $("#wpf-msg-box").hide(); $('#wpforo-load').visible();
109
- $("#wpf-reply-form-title").html(wpf_ajax_obj.phrases['leave a reply']);
110
 
111
  var parentpostid = $(this).attr('id');
112
  parentpostid = parentpostid.replace("parentpostid", "");
@@ -122,8 +123,8 @@ jQuery(document).ready(function($){
122
  $( "#title" ).attr('name', 'post[title]');
123
  $( "#formaction" ).val( 'add' );
124
  $( "#formpostid" ).val( '' );
125
- $( "#formbutton" ).val( wpf_ajax_obj.phrases.save );
126
- $( "#title").val( wpf_ajax_obj.phrases['re'] + ": " + $("#title").attr('placeholder').replace( wpf_ajax_obj.phrases['re'] + ": ", ""));
127
 
128
  $('html, body').animate({ scrollTop: $("#wpf-form-wrapper").offset().top }, 500);
129
 
@@ -139,7 +140,7 @@ jQuery(document).ready(function($){
139
  $( ".wpforo-answer" ).click(function(){
140
 
141
  $("#wpf-msg-box").hide(); $('#wpforo-load').visible();
142
- $("#wpf-reply-form-title").html(wpf_ajax_obj.phrases['your answer']);
143
 
144
  tinyMCE.activeEditor.setContent('');
145
  $( "#formaction" ).attr('name', 'post[action]');
@@ -148,8 +149,8 @@ jQuery(document).ready(function($){
148
  $( "#title" ).attr('name', 'post[title]');
149
  $( "#formaction" ).val( 'add' );
150
  $( "#formpostid" ).val( '' );
151
- $( "#formbutton" ).val( wpf_ajax_obj.phrases.save );
152
- $( "#title").val( wpf_ajax_obj.phrases['answer to'] + ": " + $("#title").attr('placeholder').replace(wpf_ajax_obj.phrases['re'] + ": ", "").replace(wpf_ajax_obj.phrases['answer to'] + ": ", ""));
153
  $('html, body').animate({ scrollTop: $("#wpf-form-wrapper").offset().top }, 500);
154
 
155
  tinymce.execCommand('mceFocus',false,'postbody');
@@ -163,7 +164,7 @@ jQuery(document).ready(function($){
163
  //Comment
164
  $( ".wpforo-childreply" ).click(function(){
165
  $("#wpf-msg-box").hide(); $('#wpforo-load').visible();
166
- $("#wpf-reply-form-title").html(wpf_ajax_obj.phrases['leave a comment']);
167
 
168
  var parentpostid = $(this).attr('id');
169
  var postid = parentpostid.replace("parentpostid", "");
@@ -179,8 +180,8 @@ jQuery(document).ready(function($){
179
  $( "#title" ).attr('name', 'post[title]');
180
  $( "#formaction" ).val( 'add' );
181
  $( "#formpostid" ).val( '' );
182
- $( "#formbutton" ).val( wpf_ajax_obj.phrases.save );
183
- $( "#title").val( wpf_ajax_obj.phrases['re'] + ": " + $("#title").attr('placeholder').replace( wpf_ajax_obj.phrases['re'] + ": ", "").replace( wpf_ajax_obj.phrases['answer to'] + ": ", "") );
184
  $('html, body').animate({ scrollTop: $("#wpf-form-wrapper").offset().top }, 800);
185
 
186
  tinymce.execCommand('mceFocus',false,'postbody');
30
  }
31
 
32
  function wpforo_phrase(phrase_key){
33
+ if( typeof wpforo_phrases !== 'undefined' ){
34
+ phrase_key = phrase_key.toLowerCase();
35
+ if( wpforo_phrases[phrase_key] !== undefined ) phrase_key = wpforo_phrases[phrase_key];
36
+ }
37
  return phrase_key;
38
  }
39
 
44
  $('html, body').scrollTop(_m.offset().top - 25);
45
  }
46
 
47
+ $(document).on('click', '#add_wpftopic:not(.not_reg_user)', function(){
48
  var stat = $( ".wpf-topic-create" ).is( ":hidden" );
49
  $( ".wpf-topic-create" ).slideToggle( "slow" );
50
  var add_wpftopic = '<i class="fa fa-times" aria-hidden="true"></i>';
107
  $( ".wpforo-reply" ).click(function(){
108
 
109
  $("#wpf-msg-box").hide(); $('#wpforo-load').visible();
110
+ $("#wpf-reply-form-title").html( wpforo_phrase('Leave a reply') );
111
 
112
  var parentpostid = $(this).attr('id');
113
  parentpostid = parentpostid.replace("parentpostid", "");
123
  $( "#title" ).attr('name', 'post[title]');
124
  $( "#formaction" ).val( 'add' );
125
  $( "#formpostid" ).val( '' );
126
+ $( "#formbutton" ).val( wpforo_phrase('Save') );
127
+ $( "#title").val( wpforo_phrase('re') + ": " + $("#title").attr('placeholder').replace( wpforo_phrase('re') + ": ", ""));
128
 
129
  $('html, body').animate({ scrollTop: $("#wpf-form-wrapper").offset().top }, 500);
130
 
140
  $( ".wpforo-answer" ).click(function(){
141
 
142
  $("#wpf-msg-box").hide(); $('#wpforo-load').visible();
143
+ $("#wpf-reply-form-title").html( wpforo_phrase('Your answer') );
144
 
145
  tinyMCE.activeEditor.setContent('');
146
  $( "#formaction" ).attr('name', 'post[action]');
149
  $( "#title" ).attr('name', 'post[title]');
150
  $( "#formaction" ).val( 'add' );
151
  $( "#formpostid" ).val( '' );
152
+ $( "#formbutton" ).val( wpforo_phrase('Save') );
153
+ $( "#title").val( wpforo_phrase('Answer to') + ": " + $("#title").attr('placeholder').replace( wpforo_phrase('re') + ": ", "").replace( wpforo_phrase('Answer to') + ": ", ""));
154
  $('html, body').animate({ scrollTop: $("#wpf-form-wrapper").offset().top }, 500);
155
 
156
  tinymce.execCommand('mceFocus',false,'postbody');
164
  //Comment
165
  $( ".wpforo-childreply" ).click(function(){
166
  $("#wpf-msg-box").hide(); $('#wpforo-load').visible();
167
+ $("#wpf-reply-form-title").html( wpforo_phrase('Leave a comment') );
168
 
169
  var parentpostid = $(this).attr('id');
170
  var postid = parentpostid.replace("parentpostid", "");
180
  $( "#title" ).attr('name', 'post[title]');
181
  $( "#formaction" ).val( 'add' );
182
  $( "#formpostid" ).val( '' );
183
+ $( "#formbutton" ).val( wpforo_phrase('Save') );
184
+ $( "#title").val( wpforo_phrase('re') + ": " + $("#title").attr('placeholder').replace( wpforo_phrase('re') + ": ", "").replace( wpforo_phrase('Answer to') + ": ", "") );
185
  $('html, body').animate({ scrollTop: $("#wpf-form-wrapper").offset().top }, 800);
186
 
187
  tinymce.execCommand('mceFocus',false,'postbody');
wpf-includes/class-members.php CHANGED
@@ -326,56 +326,69 @@ class wpForoMember{
326
  }
327
 
328
  extract($args, EXTR_OVERWRITE);
329
-
330
- if( isset($userid) && isset($display_name) && isset($user_email) && isset($user_nicename) ){
331
- $userid = intval($userid);
332
- $user_email = sanitize_email($user_email);
333
- if ( ! is_email( $user_email ) ) {
334
- $this->wpforo->notice->add('Invalid Email address', 'error');
335
- $user_email = '';
336
- return FALSE;
337
- }elseif ( ( $owner_id = email_exists( $user_email ) ) && ( $owner_id != $userid ) ) {
338
- $this->wpforo->notice->add('This email address is already registered. Please insert another.', 'error');
339
- return FALSE;
340
- }
341
-
342
- $user_nicename = sanitize_title($user_nicename);
343
- if( is_numeric($user_nicename) ){
344
- $this->wpforo->notice->add('Numerical nicknames are not allowed. Please insert another.', 'error');
345
- return FALSE;
346
- }
347
- $sql = "SELECT `ID` FROM `".$this->wpforo->db->base_prefix."users` WHERE `ID` != ". intval($userid) ." AND ( `user_nicename` LIKE '".esc_sql($user_nicename)."' OR `ID` LIKE '".esc_sql($user_nicename)."' )";
348
- if( $this->wpforo->db->get_var($sql)){
349
- $this->wpforo->notice->add('This nickname is already registered. Please insert another.', 'error');
350
- return FALSE;
351
- }
352
-
353
- $isRegister = ( isset($args['template']) && $args['template'] == 'register' ) ? true : false;
354
-
355
- if ( !$isRegister && ( !is_user_logged_in() || !$this->wpforo->perm->user_can_manage_user( $this->wpforo->current_userid, $userid ) ) ) {
356
- $this->wpforo->notice->add('Permission denied', 'error');
357
- return FALSE;
358
- }
359
-
360
- if( $display_name && $user_email && $user_nicename ){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
361
  $this->wpforo->db->update(
362
  $this->wpforo->db->base_prefix."users",
363
- array(
364
- 'display_name' => sanitize_text_field($display_name),
365
- 'user_nicename' => sanitize_title($user_nicename),
366
- 'user_email' => sanitize_email($user_email)
367
- ),
368
  array('ID' => $userid),
369
- array('%s','%s','%s'),
370
  array('%d')
371
  );
372
- $this->wpforo->db->update(
373
- $this->wpforo->db->base_prefix."usermeta",
374
- array('meta_value' => sanitize_title($user_nicename)),
375
- array('user_id' => $userid, 'meta_key' => 'nickname'),
376
- array('%s'),
377
- array('%d', '%s')
378
- );
379
  $this->reset($userid);
380
  }
381
 
@@ -571,8 +584,7 @@ class wpForoMember{
571
  $do_db_cache = wpforo_feature('member_cashe', $this->wpforo);
572
 
573
  $userid = intval($userid);
574
- $username = sanitize_user($username);
575
-
576
  if( $do_db_cache ){
577
  if( $username ){
578
  $user_obj = get_user_by( 'user_nicename', $username );
@@ -1482,6 +1494,7 @@ class wpForoMember{
1482
  'faIcon' => 'fa-envelope',
1483
  'name' => 'user_email',
1484
  'canBeInactive' => array(
 
1485
  'profile',
1486
  'search'
1487
  ),
326
  }
327
 
328
  extract($args, EXTR_OVERWRITE);
329
+
330
+ $fields = array();
331
+ $fields_types = array();
332
+
333
+ if( isset($userid) && $userid ){
334
+ $userid = intval($userid);
335
+
336
+ $isRegister = ( isset($args['template']) && $args['template'] == 'register' ) ? true : false;
337
+ if ( !$isRegister && ( !is_user_logged_in() || !$this->wpforo->perm->user_can_manage_user( $this->wpforo->current_userid, $userid ) ) ) {
338
+ $this->wpforo->notice->add('Permission denied', 'error');
339
+ return FALSE;
340
+ }
341
+
342
+ if( isset($display_name) && $display_name ){
343
+ $fields['display_name'] = sanitize_text_field(trim($display_name));
344
+ $fields_types[] = '%s';
345
+ }
346
+ if( isset($user_email) && $user_email ){
347
+ $user_email = sanitize_email($user_email);
348
+ if ( ! is_email( $user_email ) ) {
349
+ $this->wpforo->notice->add('Invalid Email address', 'error');
350
+ return FALSE;
351
+ }elseif ( ( $owner_id = email_exists( $user_email ) ) && ( $owner_id != $userid ) ) {
352
+ $this->wpforo->notice->add('This email address is already registered. Please insert another.', 'error');
353
+ return FALSE;
354
+ }
355
+
356
+ $fields['user_email'] = $user_email;
357
+ $fields_types[] = '%s';
358
+ }
359
+ if( isset($user_nicename) && $user_nicename ){
360
+ $user_nicename = sanitize_title( trim($user_nicename) );
361
+ if( is_numeric($user_nicename) ){
362
+ $this->wpforo->notice->add('Numerical nicknames are not allowed. Please insert another.', 'error');
363
+ return FALSE;
364
+ }
365
+ $sql = "SELECT `ID` FROM `".$this->wpforo->db->base_prefix."users` WHERE `ID` != ". intval($userid) ." AND ( `user_nicename` LIKE '".esc_sql($user_nicename)."' OR `ID` LIKE '".esc_sql($user_nicename)."' )";
366
+ if( $this->wpforo->db->get_var($sql)){
367
+ $this->wpforo->notice->add('This nickname is already registered. Please insert another.', 'error');
368
+ return FALSE;
369
+ }
370
+
371
+ $fields['user_nicename'] = $user_nicename;
372
+ $fields_types[] = '%s';
373
+
374
+ $this->wpforo->db->update(
375
+ $this->wpforo->db->base_prefix."usermeta",
376
+ array('meta_value' => $user_nicename),
377
+ array('user_id' => $userid, 'meta_key' => 'nickname'),
378
+ array('%s'),
379
+ array('%d', '%s')
380
+ );
381
+ }
382
+
383
+ if( $fields ){
384
  $this->wpforo->db->update(
385
  $this->wpforo->db->base_prefix."users",
386
+ $fields,
 
 
 
 
387
  array('ID' => $userid),
388
+ $fields_types,
389
  array('%d')
390
  );
391
+
 
 
 
 
 
 
392
  $this->reset($userid);
393
  }
394
 
584
  $do_db_cache = wpforo_feature('member_cashe', $this->wpforo);
585
 
586
  $userid = intval($userid);
587
+
 
588
  if( $do_db_cache ){
589
  if( $username ){
590
  $user_obj = get_user_by( 'user_nicename', $username );
1494
  'faIcon' => 'fa-envelope',
1495
  'name' => 'user_email',
1496
  'canBeInactive' => array(
1497
+ 'account',
1498
  'profile',
1499
  'search'
1500
  ),
wpf-includes/class-posts.php CHANGED
@@ -97,6 +97,7 @@ class wpForoPost{
97
  if(isset($userid)) $userid = intval($userid);
98
  if(isset($body)) $body = wpforo_kses(trim($body), 'post');
99
  if(isset($status)) $status = intval($status);
 
100
  if(isset($name)) $name = strip_tags(trim($name));
101
  if(isset($email)) $email = strip_tags(trim($email));
102
 
@@ -115,10 +116,11 @@ class wpForoPost{
115
  'created' => $created,
116
  'modified' => $created,
117
  'status' => (isset($status) ? $status : 0),
 
118
  'name' => $name,
119
  'email' => $email
120
  ),
121
- array('%d','%d','%d','%d','%s','%s','%s','%s','%d','%s','%s')
122
  )
123
  ){
124
  $postid = $this->wpforo->db->insert_id;
@@ -201,6 +203,7 @@ class wpForoPost{
201
  if(isset($userid)) $userid = intval($userid);
202
  if(isset($body)) $body = wpforo_kses(trim($body), 'post');
203
  if(isset($status)) $status = intval($status);
 
204
  if(isset($name)) $name = strip_tags(trim($name));
205
  if(isset($email)) $email = strip_tags(trim($email));
206
 
@@ -225,7 +228,7 @@ class wpForoPost{
225
  array('%d')
226
  )
227
  ){
228
- do_action( 'wpforo_after_edit_post', array( 'postid' => $postid, 'topicid' => $topicid, 'title' => $title, 'body' => $body, 'status' => $status, 'name' => $name, 'email' => $email) );
229
 
230
  wpforo_clean_cache($postid, 'post', $post);
231
  $this->wpforo->notice->add('This post successfully edited', 'success');
@@ -377,9 +380,9 @@ class wpForoPost{
377
  'offset' => NULL, // this use when you give row_count
378
  'row_count' => NULL, // 4 or 1 ...
379
  'status' => NULL, // 0 or 1 ...
380
- 'email' => NULL, // example@example.com ...
381
-
382
- 'check_private' => FALSE
383
  );
384
 
385
  $args = wpforo_parse_args( $args, $default );
@@ -403,6 +406,7 @@ class wpForoPost{
403
  if($parentid != -1) $wheres[] = $table_as_prefix . "`parentid` = " . intval($parentid);
404
  if(!is_null($userid)) $wheres[] = $table_as_prefix . "`userid` = " . intval($userid);
405
  if(!is_null($status)) $wheres[] = $table_as_prefix . "`status` = " . intval($status);
 
406
  if(!is_null($email)) $wheres[] = $table_as_prefix . "`email` = '" . esc_sql($email) . "' ";
407
 
408
  if( isset($forumid) && $forumid ){
@@ -417,6 +421,7 @@ class wpForoPost{
417
  }
418
  }
419
 
 
420
  if( $check_private ){
421
  $sql = "SELECT DISTINCT `".$this->wpforo->db->prefix."wpforo_posts`.*, `".$this->wpforo->db->prefix."wpforo_topics`.`private` FROM `".$this->wpforo->db->prefix."wpforo_posts`, `".$this->wpforo->db->prefix."wpforo_topics`";
422
  if(!empty($wheres)){
@@ -429,13 +434,14 @@ class wpForoPost{
429
  $item_count_sql = preg_replace('#SELECT.+?FROM#isu', 'SELECT count(*) FROM', $sql);
430
  }
431
  else{
 
432
  $sql = "SELECT * FROM `".$this->wpforo->db->prefix."wpforo_posts`";
433
  if(!empty($wheres)){
434
  $sql .= " WHERE " . implode(" AND ", $wheres);
435
  }
436
  $sql .= " ORDER BY `$orderby` " . $order;
437
  $item_count_sql = preg_replace('#SELECT.+?FROM#isu', 'SELECT count(*) FROM', $sql);
438
- }
439
 
440
  if( $item_count_sql ) $items_count = $this->wpforo->db->get_var($item_count_sql);
441
 
97
  if(isset($userid)) $userid = intval($userid);
98
  if(isset($body)) $body = wpforo_kses(trim($body), 'post');
99
  if(isset($status)) $status = intval($status);
100
+ if(isset($private)) $private = intval($private);
101
  if(isset($name)) $name = strip_tags(trim($name));
102
  if(isset($email)) $email = strip_tags(trim($email));
103
 
116
  'created' => $created,
117
  'modified' => $created,
118
  'status' => (isset($status) ? $status : 0),
119
+ 'private' => (isset($private) ? $private : 0),
120
  'name' => $name,
121
  'email' => $email
122
  ),
123
+ array('%d','%d','%d','%d','%s','%s','%s','%s','%d','%d','%s','%s')
124
  )
125
  ){
126
  $postid = $this->wpforo->db->insert_id;
203
  if(isset($userid)) $userid = intval($userid);
204
  if(isset($body)) $body = wpforo_kses(trim($body), 'post');
205
  if(isset($status)) $status = intval($status);
206
+ if(isset($private)) $private = intval($private);
207
  if(isset($name)) $name = strip_tags(trim($name));
208
  if(isset($email)) $email = strip_tags(trim($email));
209
 
228
  array('%d')
229
  )
230
  ){
231
+ do_action( 'wpforo_after_edit_post', array( 'postid' => $postid, 'topicid' => $topicid, 'title' => $title, 'body' => $body, 'status' => $status, 'private' => $private, 'name' => $name, 'email' => $email) );
232
 
233
  wpforo_clean_cache($postid, 'post', $post);
234
  $this->wpforo->notice->add('This post successfully edited', 'success');
380
  'offset' => NULL, // this use when you give row_count
381
  'row_count' => NULL, // 4 or 1 ...
382
  'status' => NULL, // 0 or 1 ...
383
+ 'private' => NULL, // 0 or 1 ...
384
+ 'email' => NULL, // example@example.com ...
385
+ 'check_private' => TRUE
386
  );
387
 
388
  $args = wpforo_parse_args( $args, $default );
406
  if($parentid != -1) $wheres[] = $table_as_prefix . "`parentid` = " . intval($parentid);
407
  if(!is_null($userid)) $wheres[] = $table_as_prefix . "`userid` = " . intval($userid);
408
  if(!is_null($status)) $wheres[] = $table_as_prefix . "`status` = " . intval($status);
409
+ if(!is_null($private)) $wheres[] = $table_as_prefix . "`private` = " . intval($private);
410
  if(!is_null($email)) $wheres[] = $table_as_prefix . "`email` = '" . esc_sql($email) . "' ";
411
 
412
  if( isset($forumid) && $forumid ){
421
  }
422
  }
423
 
424
+ /*
425
  if( $check_private ){
426
  $sql = "SELECT DISTINCT `".$this->wpforo->db->prefix."wpforo_posts`.*, `".$this->wpforo->db->prefix."wpforo_topics`.`private` FROM `".$this->wpforo->db->prefix."wpforo_posts`, `".$this->wpforo->db->prefix."wpforo_topics`";
427
  if(!empty($wheres)){
434
  $item_count_sql = preg_replace('#SELECT.+?FROM#isu', 'SELECT count(*) FROM', $sql);
435
  }
436
  else{
437
+ */
438
  $sql = "SELECT * FROM `".$this->wpforo->db->prefix."wpforo_posts`";
439
  if(!empty($wheres)){
440
  $sql .= " WHERE " . implode(" AND ", $wheres);
441
  }
442
  $sql .= " ORDER BY `$orderby` " . $order;
443
  $item_count_sql = preg_replace('#SELECT.+?FROM#isu', 'SELECT count(*) FROM', $sql);
444
+ /*}*/
445
 
446
  if( $item_count_sql ) $items_count = $this->wpforo->db->get_var($item_count_sql);
447
 
wpf-includes/class-template.php CHANGED
@@ -569,6 +569,17 @@ class wpForoTemplate{
569
  <a href="#" class="wpf-end">&nbsp;</a>
570
  </div>
571
 
 
 
 
 
 
 
 
 
 
 
 
572
  <?php break;
573
  case 'profile': ?>
574
 
@@ -974,6 +985,13 @@ class wpForoTemplate{
974
  );
975
  }
976
 
 
 
 
 
 
 
 
977
  if( is_user_logged_in() ){
978
 
979
  $this->wpforo->menu['wpforo-profile-home'] = array(
@@ -1570,6 +1588,9 @@ class wpForoTemplate{
1570
  elseif( $type == 'html' ){
1571
  $field_html = stripslashes($html);
1572
  }
 
 
 
1573
  else{
1574
  $field_html = '<input ' . $isRequired . ' type="' . $type .'" value="' . esc_attr($value) . '" name="' . esc_attr($fieldName) .'" id="' . esc_attr($fieldId) . '" class="' . esc_attr($class) . '" ' . $isDisabled . ' '.$attributes.' ' . trim($minmax) . ' placeholder="' . esc_attr($placeholder) . '"/>';
1575
  }
@@ -1651,7 +1672,7 @@ class wpForoTemplate{
1651
  $field_wrap_html .= '<div class="wpf-field-cl"></div></div>';
1652
  }
1653
  elseif( $template == 'profile' ){
1654
- if( !isset($value) || empty($value) || !$value ){ return; }
1655
  if( $type == 'textarea' ) $value = wpautop(wpforo_kses(stripslashes($value)));
1656
  $field_wrap_html .= '<div class="wpf-field wpf-field-type-' . esc_attr($type) . ' wpf-field-name-' . esc_attr($field_name_class) . ' ' . esc_attr($field_required_class) . '" title="' . esc_attr($title) . '">';
1657
  if( $type == 'html' ){
@@ -1734,53 +1755,22 @@ class wpForoTemplate{
1734
 
1735
 
1736
  public function form_fields( $fields ){
1737
-
1738
  if(empty($fields)) return '';
1739
- $rows = $fields;
1740
  $html = '';
1741
- $rowClasses = '';
1742
- $colClasses = '';
1743
-
1744
- for ($i = 0; $i < count($rows); $i++) {
1745
-
1746
- if( !isset($rows[$i])) continue; $row = $rows[$i]; $rowClasses .= "row-$i "; $rowClasses .= apply_filters('wpforo_row_classes', '', $i);
1747
-
1748
- ///////////////////////// ROW START /////////////////////////////////////
1749
-
1750
- $html .= '<div class="wpf-tr ' . esc_attr( $rowClasses ) . '">';
1751
- $cell_count = count($row);
1752
-
1753
- for ($j = 0; $j < $cell_count; $j++) {
1754
-
1755
- if( !isset($row[$j])) continue; $col = $row[$j]; $colClasses = "row_$i-col_$j "; $colClasses .= apply_filters('wpforo_col_classes', '', $i, $j);
1756
-
1757
- ///////////////////////// COL START /////////////////////////////////
1758
-
1759
- $html .= '<div class="wpf-td wpfw-' . $cell_count . ' ' . esc_attr( $colClasses ) . '">';
1760
-
1761
- for ($k = 0; $k < count($col); $k++) {
1762
-
1763
- ///////////////////////// FIELD START ///////////////////////////
1764
-
1765
- $field = $col[$k];
1766
- if( !empty($field) ) {
1767
- $html .= $this->field( $field );
1768
- }
1769
-
1770
- ///////////////////////// FIELD END /////////////////////////////
1771
-
1772
- }
1773
-
1774
- $html .= '</div>';
1775
-
1776
- ///////////////////////// COL END ///////////////////////////////////
1777
- }
1778
-
1779
- $html .= '<div class="wpf-cl"></div></div>';
1780
-
1781
- ///////////////////////// ROW END ////////////////////////////////////////
1782
- }
1783
-
1784
  return $html;
1785
  }
1786
 
569
  <a href="#" class="wpf-end">&nbsp;</a>
570
  </div>
571
 
572
+ <?php break;
573
+ case 'recent': ?>
574
+
575
+ <div class="wpf-breadcrumb">
576
+ <a href="<?php echo wpforo_home_url() ?>" class="wpf-root" title="<?php esc_attr( wpforo_phrase('Forums') ) ?>"><i class="fa fa-home"></i></a>
577
+
578
+ <a href="#" class="active"><?php wpforo_phrase('Recently Added') ?></a>
579
+
580
+ <a href="#" class="wpf-end">&nbsp;</a>
581
+ </div>
582
+
583
  <?php break;
584
  case 'profile': ?>
585
 
985
  );
986
  }
987
 
988
+ $this->wpforo->menu['wpforo-recent'] = array(
989
+ 'href' => wpforo_home_url('recent'),
990
+ 'label' => wpforo_phrase('Recent Posts', FALSE),
991
+ 'attr' => ( $template == 'recent' ? ' class="wpforo-active"' : '' ),
992
+ 'submenues' => array()
993
+ );
994
+
995
  if( is_user_logged_in() ){
996
 
997
  $this->wpforo->menu['wpforo-profile-home'] = array(
1588
  elseif( $type == 'html' ){
1589
  $field_html = stripslashes($html);
1590
  }
1591
+ elseif( $type == 'url' || $name == 'user_nicename' ){
1592
+ $field_html = '<input ' . $isRequired . ' type="' . $type .'" value="' . esc_attr( urldecode($value) ) . '" name="' . esc_attr($fieldName) .'" id="' . esc_attr($fieldId) . '" class="' . esc_attr($class) . '" ' . $isDisabled . ' '.$attributes.' ' . trim($minmax) . ' placeholder="' . esc_attr($placeholder) . '"/>';
1593
+ }
1594
  else{
1595
  $field_html = '<input ' . $isRequired . ' type="' . $type .'" value="' . esc_attr($value) . '" name="' . esc_attr($fieldName) .'" id="' . esc_attr($fieldId) . '" class="' . esc_attr($class) . '" ' . $isDisabled . ' '.$attributes.' ' . trim($minmax) . ' placeholder="' . esc_attr($placeholder) . '"/>';
1596
  }
1672
  $field_wrap_html .= '<div class="wpf-field-cl"></div></div>';
1673
  }
1674
  elseif( $template == 'profile' ){
1675
+ if( !isset($value) || empty($value) || !$value || ( !$is_owner && !in_array( $this->wpforo->current_user_groupid, $canView )) ){ return ''; }
1676
  if( $type == 'textarea' ) $value = wpautop(wpforo_kses(stripslashes($value)));
1677
  $field_wrap_html .= '<div class="wpf-field wpf-field-type-' . esc_attr($type) . ' wpf-field-name-' . esc_attr($field_name_class) . ' ' . esc_attr($field_required_class) . '" title="' . esc_attr($title) . '">';
1678
  if( $type == 'html' ){
1755
 
1756
 
1757
  public function form_fields( $fields ){
 
1758
  if(empty($fields)) return '';
 
1759
  $html = '';
1760
+ foreach ($fields as $row_key => $row){
1761
+ $rowClasses = "row-$row_key " . apply_filters('wpforo_row_classes', '', $row_key);
1762
+ $html .= '<div class="wpf-tr ' . esc_attr( $rowClasses ) . '">';
1763
+ foreach ( $row as $col_key => $col ){
1764
+ $colClasses = "row_$row_key-col_$col_key " . apply_filters('wpforo_col_classes', '', $row_key, $col_key);
1765
+ $html .= '<div class="wpf-td wpfw-' . count($row) . ' ' . esc_attr( $colClasses ) . '">';
1766
+ foreach ( $col as $field ){
1767
+ if( !empty($field) ) $html .= $this->field( $field );
1768
+ }
1769
+ $html .= '</div>';
1770
+ }
1771
+ $html .= '<div class="wpf-cl"></div></div>';
1772
+ }
1773
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1774
  return $html;
1775
  }
1776
 
wpf-includes/class-topics.php CHANGED
@@ -125,10 +125,11 @@ class wpForoTopic{
125
  'modified' => $created,
126
  'is_first_post' => 1,
127
  'status' => (isset($status) ? $status : 0),
 
128
  'name' => $name,
129
  'email' => $email
130
  ),
131
- array('%d','%d','%d','%s','%s','%s','%s','%d','%d','%s','%s')
132
  )
133
  ){
134
  $first_postid = $this->wpforo->db->insert_id;
@@ -266,11 +267,12 @@ class wpForoTopic{
266
  'body' => $body,
267
  'modified' => current_time( 'mysql', 1 ),
268
  'status' => $status,
 
269
  'name' => $name,
270
  'email' => $email,
271
  ),
272
  array( 'postid' => intval($topic['first_postid']) ),
273
- array( '%s','%s','%s','%d','%s','%s' ),
274
  array( '%d' )
275
  );
276
 
125
  'modified' => $created,
126
  'is_first_post' => 1,
127
  'status' => (isset($status) ? $status : 0),
128
+ 'private' => ((isset($private) && $private) ? 1 : 0),
129
  'name' => $name,
130
  'email' => $email
131
  ),
132
+ array('%d','%d','%d','%s','%s','%s','%s','%d','%d','%d','%s','%s')
133
  )
134
  ){
135
  $first_postid = $this->wpforo->db->insert_id;
267
  'body' => $body,
268
  'modified' => current_time( 'mysql', 1 ),
269
  'status' => $status,
270
+ 'private' => $private,
271
  'name' => $name,
272
  'email' => $email,
273
  ),
274
  array( 'postid' => intval($topic['first_postid']) ),
275
+ array( '%s','%s','%s','%d','%d','%s','%s' ),
276
  array( '%d' )
277
  );
278
 
wpf-includes/functions-installation.php CHANGED
@@ -112,6 +112,14 @@ function wpforo_activation(){
112
  'menu-item-parent-id' => 0,
113
  'menu-item-position' => 0));
114
 
 
 
 
 
 
 
 
 
115
  $id['wpforo-profile'] = wp_update_nav_menu_item($menu_id, 0, array(
116
  'menu-item-title' => wpforo_phrase('My Profile', false),
117
  'menu-item-classes' => 'wpforo-profile',
@@ -305,7 +313,7 @@ function wpforo_activation(){
305
  if( !empty($default) ){
306
  $data_update = array_merge($default, $current);
307
  if( !empty($data_update) ){
308
- if( strtolower($usergroup['name']) == 'guest' && $data_update['vprf'] && WPFORO_VERSION == '1.4.1' ) $data_update['va'] = 1;
309
  $data_update = serialize($data_update);
310
  $wpforo->db->query("UPDATE `".$wpforo->db->prefix."wpforo_usergroups` SET `cans` = '" . $wpforo->db->_real_escape($data_update) . "' WHERE `groupid` = " . intval($usergroup['groupid']) );
311
  }
@@ -453,6 +461,12 @@ function wpforo_activation(){
453
  @$wpdb->query( "UPDATE `" . $wpdb->prefix . "wpforo_usergroups` SET `utitle` = 'Customer', `role` = 'customer', `access` = 'standard' WHERE `groupid` = 5");
454
  @$wpdb->query( "UPDATE `" . $wpdb->prefix . "wpforo_usergroups` SET `utitle` = 'name', `role` = 'subscriber', `access` = 'standard' WHERE `utitle` IS NULL OR `utitle` = ''");
455
  }
 
 
 
 
 
 
456
 
457
  #################################################################
458
  // UPDATE VERSION - END /////////////////////////////////////////
@@ -586,15 +600,35 @@ function wpforo_profile_notice(){
586
  echo '<div class="' . $class . '" style="padding:15px 20px;"><h2 style="margin:0px;">' . esc_html($header) . $status . ' </h2><p style="font-size:15px;margin:5px 0px;">' . $message . '</p><p style="margin:0px 0px 10px 0px;">' . $button . '</p><hr /><p style="margin:0px;color:#dd0000;">' . $note . '</p><p style="margin:0px;color:#999; font-size:12px;">' . $info . '</p></div>';
587
  }
588
 
589
- function wpforo_update_db_indexes(){
590
- global $wpdb;
 
 
 
 
 
 
 
 
 
 
 
591
 
592
- // ADD INDEXES in wpforo_views TABLE///////////////////////////
593
- $args = array( 'table' => $wpdb->prefix . 'wpforo_views', 'col' => 'topicid', 'check' => 'key_exists' );
594
- if( !wpforo_db_check( $args ) ){
595
- @$wpdb->query( "ALTER TABLE `".$wpdb->prefix."wpforo_views` ADD INDEX(`userid`);" );
596
- @$wpdb->query( "ALTER TABLE `".$wpdb->prefix."wpforo_views` ADD INDEX(`topicid`);" );
597
- @$wpdb->query( "ALTER TABLE `".$wpdb->prefix."wpforo_views` ADD UNIQUE( `userid`, `topicid`);" );
598
- @$wpdb->query( "ALTER TABLE `".$wpdb->prefix."wpforo_likes` ADD UNIQUE( `userid`, `postid`);" );
599
- }
600
- }
 
 
 
 
 
 
 
 
 
112
  'menu-item-parent-id' => 0,
113
  'menu-item-position' => 0));
114
 
115
+ $id['wpforo-recent'] = wp_update_nav_menu_item($menu_id, 0, array(
116
+ 'menu-item-title' => wpforo_phrase('Recent Posts', false),
117
+ 'menu-item-classes' => 'wpforo-recent',
118
+ 'menu-item-url' => '/%wpforo-recent%/',
119
+ 'menu-item-status' => 'publish',
120
+ 'menu-item-parent-id' => 0,
121
+ 'menu-item-position' => 0));
122
+
123
  $id['wpforo-profile'] = wp_update_nav_menu_item($menu_id, 0, array(
124
  'menu-item-title' => wpforo_phrase('My Profile', false),
125
  'menu-item-classes' => 'wpforo-profile',
313
  if( !empty($default) ){
314
  $data_update = array_merge($default, $current);
315
  if( !empty($data_update) ){
316
+ if( strtolower($usergroup['name']) == 'guest' && $data_update['vprf'] && WPFORO_VERSION == '1.4.2' ) $data_update['va'] = 1;
317
  $data_update = serialize($data_update);
318
  $wpforo->db->query("UPDATE `".$wpforo->db->prefix."wpforo_usergroups` SET `cans` = '" . $wpforo->db->_real_escape($data_update) . "' WHERE `groupid` = " . intval($usergroup['groupid']) );
319
  }
461
  @$wpdb->query( "UPDATE `" . $wpdb->prefix . "wpforo_usergroups` SET `utitle` = 'Customer', `role` = 'customer', `access` = 'standard' WHERE `groupid` = 5");
462
  @$wpdb->query( "UPDATE `" . $wpdb->prefix . "wpforo_usergroups` SET `utitle` = 'name', `role` = 'subscriber', `access` = 'standard' WHERE `utitle` IS NULL OR `utitle` = ''");
463
  }
464
+ #################################################################
465
+ // ADD `private` field in post TABLE ///////////////////////////
466
+ $args = array( 'table' => $wpdb->prefix . 'wpforo_posts', 'col' => 'private', 'check' => 'col_exists' );
467
+ if( !wpforo_db_check( $args ) ){
468
+ @$wpdb->query( "ALTER TABLE `" . $wpdb->prefix . "wpforo_posts` ADD `private` TINYINT(1) NOT NULL DEFAULT '0' AFTER `email`, ADD INDEX `is_private` (`private`);" );
469
+ }
470
 
471
  #################################################################
472
  // UPDATE VERSION - END /////////////////////////////////////////
600
  echo '<div class="' . $class . '" style="padding:15px 20px;"><h2 style="margin:0px;">' . esc_html($header) . $status . ' </h2><p style="font-size:15px;margin:5px 0px;">' . $message . '</p><p style="margin:0px 0px 10px 0px;">' . $button . '</p><hr /><p style="margin:0px;color:#dd0000;">' . $note . '</p><p style="margin:0px;color:#999; font-size:12px;">' . $info . '</p></div>';
601
  }
602
 
603
+ function wpforo_update_db_notice(){
604
+ global $wpforo, $wpdb;
605
+ $private_topics = $wpdb->get_var("SELECT `topicid` FROM `" . $wpdb->prefix . "wpforo_topics` WHERE `private` = 1");
606
+ if( $private_topics ){
607
+ $private_posts = $wpdb->get_var("SELECT `postid` FROM `" . $wpdb->prefix . "wpforo_posts` WHERE `private` = 1");
608
+ if( !$private_posts ){
609
+ $url = admin_url('admin.php?page=wpforo-community&action=wpfdb&wpfv=142');
610
+ $class = 'wpforo-mnote notice notice-warning is-dismissible';
611
+ $note = __( 'This process may take a few seconds or dozens of minutes, please be patient and don\'t close this page. Database backup is not required. If you got 500 Server Error please don\'t worry, the data updating process is still working in MySQL server.', 'wpforo');
612
+ $button = '<a href="' . $url . '" class="button button-primary button-large" style="font-size:14px;">' . __( 'Updater Database', 'wpforo') . ' &gt;&gt;</a>';
613
+ $header = __( 'wpForo - Update Database ', 'wpforo' );
614
+ $message = __( 'Please click the button below to complete wpForo update.', 'wpforo' );
615
+ echo '<div class="' . $class . '" style="padding:15px 20px;"><h2 style="margin:0px;">' . esc_html($header) . ' </h2><p style="font-size:15px;margin:5px 0px;">' . $message . '</p><p style="margin:0px 0px 10px 0px;">' . $button . '</p><hr /><p style="margin:0px;color:#ed7600;">' . $note . '</p></div>';
616
 
617
+ }
618
+ }
619
+ }
620
+
621
+ function wpforo_update_db(){
622
+ global $wpforo, $wpdb;
623
+ // ADD posts' private values from TOPICS table ///////////////////////////
624
+ @$wpdb->query( "UPDATE `" . $wpdb->prefix . "wpforo_posts`, `" . $wpdb->prefix . "wpforo_topics` SET `" . $wpdb->prefix . "wpforo_posts`.`private` = `" . $wpdb->prefix . "wpforo_topics`.`private` WHERE `" . $wpdb->prefix . "wpforo_posts`.`topicid` = `" . $wpdb->prefix . "wpforo_topics`.`topicid`");
625
+ // ADD INDEXES in wpforo_views TABLE///////////////////////////
626
+ $args = array( 'table' => $wpdb->prefix . 'wpforo_views', 'col' => 'topicid', 'check' => 'key_exists' );
627
+ if( !wpforo_db_check( $args ) ){
628
+ @$wpdb->query( "ALTER TABLE `".$wpdb->prefix."wpforo_views` ADD INDEX(`userid`);" );
629
+ @$wpdb->query( "ALTER TABLE `".$wpdb->prefix."wpforo_views` ADD INDEX(`topicid`);" );
630
+ @$wpdb->query( "ALTER TABLE `".$wpdb->prefix."wpforo_views` ADD UNIQUE( `userid`, `topicid`);" );
631
+ @$wpdb->query( "ALTER TABLE `".$wpdb->prefix."wpforo_likes` ADD UNIQUE( `userid`, `postid`);" );
632
+ }
633
+ update_option('wpforo_version_db', WPFORO_VERSION);
634
+ }
wpf-includes/functions-template.php CHANGED
@@ -404,10 +404,14 @@ class wpForo_Widget_recent_topics extends WP_Widget {
404
  echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title'];//This is a HTML content//
405
  }
406
  // widget content from front end
 
 
407
  $topic_args = array( // forumid, order, parentid
408
  'orderby' => 'created',
409
  'order' => 'DESC', // ASC DESC
410
- 'row_count' => $instance['count'] // 4 or 1 ...
 
 
411
  );
412
  $topics = $wpforo->topic->get_topics_filtered($topic_args);
413
  $ug_can_va = $wpforo->perm->usergroup_can('va');
@@ -482,12 +486,15 @@ class wpForo_Widget_recent_replies extends WP_Widget {
482
  if ( ! empty( $instance['title'] ) ) {
483
  echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title'];//This is a HTML content//
484
  }
 
 
485
  // widget content from front end
486
  $posts_args = array(
487
  'orderby' => 'created',
488
  'order' => 'DESC',
489
  'row_count' => $instance['count'],
490
- 'check_private' => true
 
491
  );
492
  $recent_posts = $wpforo->post->get_posts_filtered($posts_args);
493
  $ug_can_va = $wpforo->perm->usergroup_can('va');
@@ -1194,4 +1201,26 @@ function wpforo_unread_topic( $logid, $return = 'class', $echo = true ){
1194
  if( empty($viwed_ids) ) $unread = true;
1195
  if( is_array($viwed_ids) && !in_array( $logid, $viwed_ids ) ) $unread = true;
1196
  if( $unread ){ if( $return == 'class' ){ $log = 'wpf_topic_unread'; } else{ $log = true; } if( $echo ){ echo $log; } else { return $log; } }
1197
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
404
  echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title'];//This is a HTML content//
405
  }
406
  // widget content from front end
407
+ $private = (!is_user_logged_in() || !$wpforo->perm->usergroup_can('em')) ? 0 : NULL;
408
+ $status = (!is_user_logged_in() || !$wpforo->perm->usergroup_can('em')) ? 0 : NULL;
409
  $topic_args = array( // forumid, order, parentid
410
  'orderby' => 'created',
411
  'order' => 'DESC', // ASC DESC
412
+ 'row_count' => $instance['count'], // 4 or 1 ...
413
+ 'private' => $private,
414
+ 'status' => $status
415
  );
416
  $topics = $wpforo->topic->get_topics_filtered($topic_args);
417
  $ug_can_va = $wpforo->perm->usergroup_can('va');
486
  if ( ! empty( $instance['title'] ) ) {
487
  echo $args['before_title'] . apply_filters( 'widget_title', $instance['title'] ). $args['after_title'];//This is a HTML content//
488
  }
489
+ $private = (!is_user_logged_in() || !$wpforo->perm->usergroup_can('em')) ? 0 : NULL;
490
+ $status = (!is_user_logged_in() || !$wpforo->perm->usergroup_can('em')) ? 0 : NULL;
491
  // widget content from front end
492
  $posts_args = array(
493
  'orderby' => 'created',
494
  'order' => 'DESC',
495
  'row_count' => $instance['count'],
496
+ 'private' => $private,
497
+ 'status' => $status
498
  );
499
  $recent_posts = $wpforo->post->get_posts_filtered($posts_args);
500
  $ug_can_va = $wpforo->perm->usergroup_can('va');
1201
  if( empty($viwed_ids) ) $unread = true;
1202
  if( is_array($viwed_ids) && !in_array( $logid, $viwed_ids ) ) $unread = true;
1203
  if( $unread ){ if( $return == 'class' ){ $log = 'wpf_topic_unread'; } else{ $log = true; } if( $echo ){ echo $log; } else { return $log; } }
1204
+ }
1205
+
1206
+ if( !function_exists('custom_wpforo_get_account_fields') ){
1207
+ function custom_wpforo_get_account_fields($fields){
1208
+ $hide = array(
1209
+ 'user_email',
1210
+ 'user_nicename'
1211
+ );
1212
+
1213
+ foreach ( $fields as $row_key => $row ){
1214
+ foreach ( $row as $col_key => $col ){
1215
+ foreach ( $col as $key => $field ){
1216
+ if( in_array($field['fieldKey'], $hide) ){
1217
+ unset($fields[$row_key][$col_key][$key]);
1218
+ }
1219
+ }
1220
+ }
1221
+ }
1222
+
1223
+ return $fields;
1224
+ }
1225
+ // add_filter('wpforo_get_account_fields', 'custom_wpforo_get_account_fields', 20);
1226
+ }
wpf-includes/functions.php CHANGED
@@ -925,18 +925,27 @@ function wpforo_user_logging(){
925
  if( $data['template'] == 'post' && isset($data['topicid']) && $data['topicid'] ){
926
  $current_user_id = get_current_user_id();
927
  $current_time = current_time( 'timestamp', 1 );
928
- if( $current_user_id ){
929
- //registered user
930
- $view = $wpforo->db->get_row("SELECT `vid`, `created` FROM `". $wpforo->db->prefix . "wpforo_views` WHERE `topicid` = " . intval($data['topicid']) ." AND `userid` = " . intval($current_user_id), ARRAY_A);
931
- if( !$view['vid'] ){
932
- $sql = "INSERT INTO ". $wpforo->db->prefix ."wpforo_views( `userid` , `topicid` , `created` ) VALUES ( '".intval($current_user_id)."', " . intval($data['topicid']) . ", '" . esc_sql($current_time) . "' ) ";
933
- $wpforo->db->query($sql);
934
  $wpforo->db->query("UPDATE `".$wpforo->db->prefix."wpforo_topics` SET `views` = `views` + 1 WHERE `topicid` = " . intval($data['topicid']));
935
- }else{
936
- $sql = "UPDATE ". $wpforo->db->prefix ."wpforo_views SET `created` = " . intval($current_time) . " WHERE `userid` = " . intval($current_user_id) . " AND `topicid` = " . intval($data['topicid']);
937
- $wpforo->db->query($sql);
938
- if( $current_time - $view['created'] > 86400 ){
 
 
 
 
 
939
  $wpforo->db->query("UPDATE `".$wpforo->db->prefix."wpforo_topics` SET `views` = `views` + 1 WHERE `topicid` = " . intval($data['topicid']));
 
 
 
 
 
 
940
  }
941
  }
942
  }
925
  if( $data['template'] == 'post' && isset($data['topicid']) && $data['topicid'] ){
926
  $current_user_id = get_current_user_id();
927
  $current_time = current_time( 'timestamp', 1 );
928
+
929
+ if( wpforo_feature('view-logging', $wpforo)){
930
+ $viwed_ids = wpforo_getcookie( 'wpf_viewed_topics', true );
931
+ if( empty($viwed_ids) || ( is_array($viwed_ids) && !in_array($data['topicid'] , $viwed_ids ))){
 
 
932
  $wpforo->db->query("UPDATE `".$wpforo->db->prefix."wpforo_topics` SET `views` = `views` + 1 WHERE `topicid` = " . intval($data['topicid']));
933
+ }
934
+ }
935
+ else{
936
+ if( $current_user_id ){
937
+ //registered user
938
+ $view = $wpforo->db->get_row("SELECT `vid`, `created` FROM `". $wpforo->db->prefix . "wpforo_views` WHERE `topicid` = " . intval($data['topicid']) ." AND `userid` = " . intval($current_user_id), ARRAY_A);
939
+ if( !$view['vid'] ){
940
+ $sql = "INSERT INTO ". $wpforo->db->prefix ."wpforo_views( `userid` , `topicid` , `created` ) VALUES ( '".intval($current_user_id)."', " . intval($data['topicid']) . ", '" . esc_sql($current_time) . "' ) ";
941
+ $wpforo->db->query($sql);
942
  $wpforo->db->query("UPDATE `".$wpforo->db->prefix."wpforo_topics` SET `views` = `views` + 1 WHERE `topicid` = " . intval($data['topicid']));
943
+ }else{
944
+ $sql = "UPDATE ". $wpforo->db->prefix ."wpforo_views SET `created` = " . intval($current_time) . " WHERE `userid` = " . intval($current_user_id) . " AND `topicid` = " . intval($data['topicid']);
945
+ $wpforo->db->query($sql);
946
+ if( $current_time - $view['created'] > 86400 ){
947
+ $wpforo->db->query("UPDATE `".$wpforo->db->prefix."wpforo_topics` SET `views` = `views` + 1 WHERE `topicid` = " . intval($data['topicid']));
948
+ }
949
  }
950
  }
951
  }
wpf-includes/install-sql.php CHANGED
@@ -89,6 +89,7 @@
89
  `status` tinyint(1) UNSIGNED NOT NULL DEFAULT 0,
90
  `name` VARCHAR(50) NOT NULL DEFAULT '',
91
  `email` VARCHAR(50) NOT NULL DEFAULT '',
 
92
  PRIMARY KEY (`postid`),
93
  FULLTEXT KEY `title`(`title`(191)),
94
  FULLTEXT KEY `body` (`body`),
@@ -100,7 +101,8 @@
100
  KEY `is_answer` (`is_answer`),
101
  KEY `is_first_post` (`is_first_post`),
102
  KEY `status` (`status`),
103
- KEY `email` (`email`)
 
104
  ) ENGINE=$engine $charset_collate;",
105
  "CREATE TABLE IF NOT EXISTS `{$wpforo->db->prefix}wpforo_profiles` (
106
  `userid` INT UNSIGNED NOT NULL,
89
  `status` tinyint(1) UNSIGNED NOT NULL DEFAULT 0,
90
  `name` VARCHAR(50) NOT NULL DEFAULT '',
91
  `email` VARCHAR(50) NOT NULL DEFAULT '',
92
+ `private` tinyint(1) UNSIGNED NOT NULL DEFAULT 0,
93
  PRIMARY KEY (`postid`),
94
  FULLTEXT KEY `title`(`title`(191)),
95
  FULLTEXT KEY `body` (`body`),
101
  KEY `is_answer` (`is_answer`),
102
  KEY `is_first_post` (`is_first_post`),
103
  KEY `status` (`status`),
104
+ KEY `email` (`email`),
105
+ KEY `is_private` (`private`)
106
  ) ENGINE=$engine $charset_collate;",
107
  "CREATE TABLE IF NOT EXISTS `{$wpforo->db->prefix}wpforo_profiles` (
108
  `userid` INT UNSIGNED NOT NULL,
wpf-includes/wpf-actions.php CHANGED
@@ -184,6 +184,11 @@ function wpforo_actions(){
184
  wp_redirect(admin_url('admin.php?page=wpforo-community'));
185
  exit();
186
  }
 
 
 
 
 
187
  if( $_GET['action'] == 'reset_fstat' && check_admin_referer( 'wpforo_reset_forums_stat' ) ){
188
  $forums = $wpforo->db->get_results("SELECT `forumid` FROM " . $wpforo->db->prefix . "wpforo_forums ORDER BY `forumid` ASC", ARRAY_A);
189
  if(!empty($forums)){
@@ -222,6 +227,9 @@ function wpforo_actions(){
222
  $wpforo->phrase->clear_cache();
223
  $wpforo->member->clear_db_cache();
224
  wpforo_clean_cache(0);
 
 
 
225
  $wpforo->notice->add('Deleted Successfully!', 'success');
226
  }
227
  }
184
  wp_redirect(admin_url('admin.php?page=wpforo-community'));
185
  exit();
186
  }
187
+ if( $_GET['action'] == 'wpfdb' ){
188
+ if( function_exists('set_time_limit') ) set_time_limit( 3600 ); wpforo_update_db();
189
+ wp_redirect(admin_url('admin.php?page=wpforo-community'));
190
+ exit();
191
+ }
192
  if( $_GET['action'] == 'reset_fstat' && check_admin_referer( 'wpforo_reset_forums_stat' ) ){
193
  $forums = $wpforo->db->get_results("SELECT `forumid` FROM " . $wpforo->db->prefix . "wpforo_forums ORDER BY `forumid` ASC", ARRAY_A);
194
  if(!empty($forums)){
227
  $wpforo->phrase->clear_cache();
228
  $wpforo->member->clear_db_cache();
229
  wpforo_clean_cache(0);
230
+ $current_time = time();
231
+ $month_ago = $current_time - 2592000;
232
+ $wpforo->db->query("DELETE FROM `" . $wpforo->db->prefix . "wpforo_views` WHERE `created` < " . intval($month_ago) );
233
  $wpforo->notice->add('Deleted Successfully!', 'success');
234
  }
235
  }
wpf-includes/wpf-hooks.php CHANGED
@@ -264,6 +264,10 @@ function wpforo_meta_title($title) {
264
  $meta_title = array(wpforo_phrase( 'Member', false), wpforo_phrase( ucfirst($template), false), $wpforo->general_options['title']);
265
  }
266
  }
 
 
 
 
267
  elseif($template){
268
  $wpfpaged = ( isset($_GET['wpfpaged']) && $_GET['wpfpaged'] > 1 ) ? ' - ' . wpforo_phrase( 'page', false) . ' ' . $_GET['wpfpaged'] .' ' : '';
269
  $meta_title = array(wpforo_phrase( ucfirst($template), false) . $wpfpaged, $wpforo->general_options['title']);
@@ -351,6 +355,9 @@ function wpforo_add_meta_tags(){
351
  }elseif(isset($wpforo->current_object['template']) && $wpforo->current_object['template'] == 'member'){
352
  $wpfpaged = ( isset($_GET['wpfpaged']) && $_GET['wpfpaged'] > 1 ) ? wpforo_phrase( 'Page', false) . ' ' . $_GET['wpfpaged'] .' | ' : '';
353
  $description = $wpfpaged . wpforo_phrase( 'Forum Members List', false);
 
 
 
354
  }
355
  else{
356
  if( isset($wpforo->general_options['title']) ) $title = $paged . $wpforo->general_options['title'];
@@ -638,9 +645,13 @@ function wpf_private(){
638
  if( $_POST['status'] == 'private' ){
639
  $sql = "UPDATE " . $wpforo->db->prefix . "wpforo_topics SET private = 1 WHERE topicid = " . intval($p_id);
640
  $wpforo->db->query( $sql );
 
 
641
  }elseif( $_POST['status'] == 'public' ){
642
  $sql = "UPDATE ".$wpforo->db->prefix ."wpforo_topics SET private = 0 WHERE topicid = " . intval($p_id);
643
  $wpforo->db->query( $sql );
 
 
644
  }
645
  wpforo_clean_cache();
646
  echo 1;
@@ -935,24 +946,25 @@ function wpforo_frontend_enqueue(){
935
  global $wpforo;
936
 
937
  if( is_wpforo_page() ){
938
- wp_enqueue_script('jquery-ui-core');
939
- wp_enqueue_script('jquery-ui-dialog');
940
- wp_register_script( 'wpforo-frontend-js', WPFORO_URL . '/wpf-assets/js/frontend.js', array('jquery'), WPFORO_VERSION, false );
941
- wp_enqueue_script('wpforo-frontend-js');
942
- if( wpforo_feature( 'font-awesome', $wpforo) ){
943
- wp_register_style('wpforo-font-awesome', WPFORO_URL . '/wpf-assets/css/font-awesome/css/font-awesome.min.css', false, '4.7' );
944
- wp_enqueue_style('wpforo-font-awesome');
945
- if (is_rtl()) {
946
- wp_register_style('wpforo-font-awesome-rtl', WPFORO_URL . '/wpf-assets/css/font-awesome/font-awesome-rtl.css', false, WPFORO_VERSION );
947
- wp_enqueue_style('wpforo-font-awesome-rtl');
948
- }
949
- }
950
- if(is_user_logged_in()){
951
- wp_register_script('wpforo-ajax', WPFORO_URL . '/wpf-assets/js/ajax.js', array('jquery'), WPFORO_VERSION, false);
952
- wp_enqueue_script('wpforo-ajax');
953
- wp_localize_script('wpforo-ajax', 'wpf_ajax_obj', array( 'url' => admin_url('admin-ajax.php'), 'phrases' => $wpforo->phrase->phrases ));
954
- }
955
- if (is_rtl()) {
 
956
  wp_register_style('wpforo-style-rtl', WPFORO_TEMPLATE_URL . '/style-rtl.css', false, WPFORO_VERSION );
957
  wp_enqueue_style('wpforo-style-rtl');
958
  }
264
  $meta_title = array(wpforo_phrase( 'Member', false), wpforo_phrase( ucfirst($template), false), $wpforo->general_options['title']);
265
  }
266
  }
267
+ elseif( $template == 'recent' ){
268
+ $wpfpaged = ( isset($_GET['wpfpaged']) && $_GET['wpfpaged'] > 1 ) ? ' - ' . wpforo_phrase( 'page', false) . ' ' . $_GET['wpfpaged'] .' ' : '';
269
+ $meta_title = array( wpforo_phrase( 'Recent Posts', false) . $wpfpaged, $wpforo->general_options['title']);
270
+ }
271
  elseif($template){
272
  $wpfpaged = ( isset($_GET['wpfpaged']) && $_GET['wpfpaged'] > 1 ) ? ' - ' . wpforo_phrase( 'page', false) . ' ' . $_GET['wpfpaged'] .' ' : '';
273
  $meta_title = array(wpforo_phrase( ucfirst($template), false) . $wpfpaged, $wpforo->general_options['title']);
355
  }elseif(isset($wpforo->current_object['template']) && $wpforo->current_object['template'] == 'member'){
356
  $wpfpaged = ( isset($_GET['wpfpaged']) && $_GET['wpfpaged'] > 1 ) ? wpforo_phrase( 'Page', false) . ' ' . $_GET['wpfpaged'] .' | ' : '';
357
  $description = $wpfpaged . wpforo_phrase( 'Forum Members List', false);
358
+ }elseif(isset($wpforo->current_object['template']) && $wpforo->current_object['template'] == 'recent'){
359
+ $wpfpaged = ( isset($_GET['wpfpaged']) && $_GET['wpfpaged'] > 1 ) ? wpforo_phrase( 'Page', false) . ' ' . $_GET['wpfpaged'] .' | ' : '';
360
+ $description = $wpfpaged . wpforo_phrase( 'Recent Posts', false);
361
  }
362
  else{
363
  if( isset($wpforo->general_options['title']) ) $title = $paged . $wpforo->general_options['title'];
645
  if( $_POST['status'] == 'private' ){
646
  $sql = "UPDATE " . $wpforo->db->prefix . "wpforo_topics SET private = 1 WHERE topicid = " . intval($p_id);
647
  $wpforo->db->query( $sql );
648
+ $sql = "UPDATE " . $wpforo->db->prefix . "wpforo_posts SET private = 1 WHERE topicid = " . intval($p_id);
649
+ $wpforo->db->query( $sql );
650
  }elseif( $_POST['status'] == 'public' ){
651
  $sql = "UPDATE ".$wpforo->db->prefix ."wpforo_topics SET private = 0 WHERE topicid = " . intval($p_id);
652
  $wpforo->db->query( $sql );
653
+ $sql = "UPDATE ".$wpforo->db->prefix ."wpforo_posts SET private = 0 WHERE topicid = " . intval($p_id);
654
+ $wpforo->db->query( $sql );
655
  }
656
  wpforo_clean_cache();
657
  echo 1;
946
  global $wpforo;
947
 
948
  if( is_wpforo_page() ){
949
+ wp_enqueue_script('jquery-ui-core');
950
+ wp_enqueue_script('jquery-ui-dialog');
951
+ wp_register_script( 'wpforo-frontend-js', WPFORO_URL . '/wpf-assets/js/frontend.js', array('jquery'), WPFORO_VERSION, false );
952
+ wp_enqueue_script('wpforo-frontend-js');
953
+ wp_localize_script('wpforo-frontend-js', 'wpforo_phrases', $wpforo->phrase->phrases);
954
+ if( wpforo_feature( 'font-awesome', $wpforo) ){
955
+ wp_register_style('wpforo-font-awesome', WPFORO_URL . '/wpf-assets/css/font-awesome/css/font-awesome.min.css', false, '4.7' );
956
+ wp_enqueue_style('wpforo-font-awesome');
957
+ if (is_rtl()) {
958
+ wp_register_style('wpforo-font-awesome-rtl', WPFORO_URL . '/wpf-assets/css/font-awesome/font-awesome-rtl.css', false, WPFORO_VERSION );
959
+ wp_enqueue_style('wpforo-font-awesome-rtl');
960
+ }
961
+ }
962
+ if(is_user_logged_in()){
963
+ wp_register_script('wpforo-ajax', WPFORO_URL . '/wpf-assets/js/ajax.js', array('jquery'), WPFORO_VERSION, false);
964
+ wp_enqueue_script('wpforo-ajax');
965
+ wp_localize_script('wpforo-ajax', 'wpf_ajax_obj', array( 'url' => admin_url('admin-ajax.php') ));
966
+ }
967
+ if (is_rtl()) {
968
  wp_register_style('wpforo-style-rtl', WPFORO_TEMPLATE_URL . '/style-rtl.css', false, WPFORO_VERSION );
969
  wp_enqueue_style('wpforo-style-rtl');
970
  }
wpf-includes/wpf-phrases.php CHANGED
@@ -685,4 +685,18 @@ $wpforo_phrases = array(
685
  'New' => __('New', 'wpforo'),
686
  'Required field' => __('Required field', 'wpforo'),
687
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
688
  );
685
  'New' => __('New', 'wpforo'),
686
  'Required field' => __('Required field', 'wpforo'),
687
 
688
+ // 1.4.0
689
+ 'Add Reply' => __('Add Reply', 'wpforo'),
690
+ 'Forums RSS Feed' => __('Forums RSS Feed', 'wpforo'),
691
+ 'Topics RSS Feed' => __('Topics RSS Feed', 'wpforo'),
692
+ 'Find a member' => __('Find a member', 'wpforo'),
693
+ 'Display Name or Nicename' => __('Display Name or Nicename', 'wpforo'),
694
+ 'Reset Search' => __('Reset Search', 'wpforo'),
695
+ 'Reset Result' => __('Reset Result', 'wpforo'),
696
+ 'Log Viewed Forums and Topics' => __('Log Viewed Forums and Topics', 'wpforo'),
697
+ 'Replace WP Reset Password URL to Forum reset password page' => __('Replace WP Reset Password URL to Forum reset password page', 'wpforo'),
698
+ 'Enable RSS Feed' => __('Enable RSS Feed', 'wpforo'),
699
+ 'Members Search Type:' => __('Members Search Type', 'wpforo'),
700
+ 'Recent Posts' => __('Recent Posts', 'wpforo'),
701
+ 'Recent Posts' => __('No posts were found here', 'wpforo'),
702
  );
wpf-languages/wpforo.pot CHANGED
@@ -5,7 +5,7 @@ msgid ""
5
  msgstr ""
6
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
7
  "Project-Id-Version: Forum - wpForo\n"
8
- "POT-Creation-Date: 2017-10-12 23:07+0400\n"
9
  "PO-Revision-Date: 2016-06-28 21:09+0400\n"
10
  "Last-Translator: \n"
11
  "Language-Team: \n"
@@ -67,46 +67,46 @@ msgstr ""
67
 
68
  #: wpf-admin/admin.php:26 wpf-admin/admin.php:28 wpf-admin/dashboard.php:138
69
  #: wpf-admin/options-tabs/styles.php:16 wpf-admin/options.php:15
70
- #: wpf-includes/wpf-hooks.php:1668 wpf-includes/wpf-phrases.php:123
71
  msgid "Forums"
72
  msgstr ""
73
 
74
  #: wpf-admin/admin.php:29 wpf-includes/wpf-hooks.php:22
75
- #: wpf-includes/wpf-hooks.php:1684
76
  msgid "Settings"
77
  msgstr ""
78
 
79
- #: wpf-admin/admin.php:30 wpf-includes/wpf-hooks.php:1693
80
  msgid "Tools"
81
  msgstr ""
82
 
83
- #: wpf-admin/admin.php:31 wpf-includes/wpf-hooks.php:1702
84
  msgid "Moderation"
85
  msgstr ""
86
 
87
  #: wpf-admin/admin.php:32 wpf-admin/dashboard.php:150 wpf-admin/member.php:10
88
- #: wpf-admin/options.php:18 wpf-includes/wpf-hooks.php:1711
89
  #: wpf-includes/wpf-phrases.php:178
90
  msgid "Members"
91
  msgstr ""
92
 
93
  #: wpf-admin/admin.php:33 wpf-admin/usergroup.php:8
94
- #: wpf-includes/wpf-hooks.php:1720
95
  msgid "Usergroups"
96
  msgstr ""
97
 
98
- #: wpf-admin/admin.php:34 wpf-includes/wpf-hooks.php:1736
99
  #: wpf-includes/wpf-phrases.php:600
100
  msgid "Phrases"
101
  msgstr ""
102
 
103
- #: wpf-admin/admin.php:35 wpf-includes/wpf-hooks.php:1752
104
  #: wpf-includes/wpf-phrases.php:601
105
  msgid "Themes"
106
  msgstr ""
107
 
108
  #: wpf-admin/admin.php:36 wpf-admin/options.php:23
109
- #: wpf-includes/wpf-hooks.php:1761 wpf-includes/wpf-phrases.php:25
110
  msgid "Addons"
111
  msgstr ""
112
 
@@ -356,7 +356,7 @@ msgstr ""
356
 
357
  #: wpf-admin/forum.php:153 wpf-admin/themes.php:73
358
  #: wpf-admin/tools-tabs/antispam.php:139 wpf-admin/usergroup.php:34
359
- #: wpf-admin/usergroup.php:181 wpf-includes/wpf-hooks.php:1087
360
  #: wpf-includes/wpf-phrases.php:66
361
  msgid "Delete"
362
  msgstr ""
@@ -631,7 +631,7 @@ msgstr ""
631
  msgid "Show Forum Statistic"
632
  msgstr ""
633
 
634
- #: wpf-admin/options-tabs/features.php:15
635
  msgid "Log Viewed Forums and Topics"
636
  msgstr ""
637
 
@@ -672,7 +672,7 @@ msgstr ""
672
  msgid "Replace Login Page URL to Forum URL"
673
  msgstr ""
674
 
675
- #: wpf-admin/options-tabs/features.php:22
676
  msgid "Replace WP Reset Password URL to Forum reset password page"
677
  msgstr ""
678
 
@@ -728,7 +728,7 @@ msgstr ""
728
  msgid "Enable User Profile Page indexing"
729
  msgstr ""
730
 
731
- #: wpf-admin/options-tabs/features.php:36
732
  msgid "Enable RSS Feed"
733
  msgstr ""
734
 
@@ -920,7 +920,7 @@ msgstr ""
920
  msgid "Members URL structure"
921
  msgstr ""
922
 
923
- #: wpf-admin/options-tabs/members.php:29
924
  msgid "Members Search Type"
925
  msgstr ""
926
 
@@ -1531,19 +1531,19 @@ msgid ""
1531
  "another one."
1532
  msgstr ""
1533
 
1534
- #: wpf-includes/class-members.php:1295
1535
  msgid "What should be done with wpForo content owned by this user?"
1536
  msgstr ""
1537
 
1538
- #: wpf-includes/class-members.php:1297
1539
  msgid "What should be done with wpForo content owned by these users?"
1540
  msgstr ""
1541
 
1542
- #: wpf-includes/class-members.php:1301
1543
  msgid "Delete all wpForo content."
1544
  msgstr ""
1545
 
1546
- #: wpf-includes/class-members.php:1303
1547
  msgid "Attribute all content to:"
1548
  msgstr ""
1549
 
@@ -1604,40 +1604,60 @@ msgstr ""
1604
  msgid "Open link in a new tab"
1605
  msgstr ""
1606
 
1607
- #: wpf-includes/class-template.php:1149 wpf-includes/wpf-phrases.php:328
1608
  msgid "Theme file not readable"
1609
  msgstr ""
1610
 
1611
- #: wpf-includes/functions-installation.php:578
1612
  msgid "Start Profile Synchronization"
1613
  msgstr ""
1614
 
1615
- #: wpf-includes/functions-installation.php:578
1616
  msgid "Continue Synchronization"
1617
  msgstr ""
1618
 
1619
- #: wpf-includes/functions-installation.php:581
1620
  msgid ""
1621
  "This process may take a few seconds or dozens of minutes, please be patient "
1622
  "and don't close this page."
1623
  msgstr ""
1624
 
1625
- #: wpf-includes/functions-installation.php:582
1626
  msgid ""
1627
  "You can permanently disable this message in Dashboard > Forums > Features "
1628
  "admin page."
1629
  msgstr ""
1630
 
1631
- #: wpf-includes/functions-installation.php:584
1632
  msgid "wpForo Forum Installation | "
1633
  msgstr ""
1634
 
1635
- #: wpf-includes/functions-installation.php:585
1636
  msgid ""
1637
  "Forum users' profile data are not synchronized yet, this step is required! "
1638
  "Please click the button below to complete installation."
1639
  msgstr ""
1640
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1641
  #: wpf-includes/functions-template.php:7
1642
  msgid "wpForo Menu"
1643
  msgstr ""
@@ -1655,15 +1675,15 @@ msgstr ""
1655
  #: wpf-includes/functions-template.php:199
1656
  #: wpf-includes/functions-template.php:306
1657
  #: wpf-includes/functions-template.php:369
1658
- #: wpf-includes/functions-template.php:448
1659
- #: wpf-includes/functions-template.php:529
1660
- #: wpf-includes/functions-template.php:576 wpf-includes/wpf-phrases.php:335
1661
  msgid "Title"
1662
  msgstr ""
1663
 
1664
  #: wpf-includes/functions-template.php:372
1665
- #: wpf-includes/functions-template.php:451
1666
- #: wpf-includes/functions-template.php:532 wpf-includes/wpf-phrases.php:211
1667
  msgid "Number of Items"
1668
  msgstr ""
1669
 
@@ -1671,8 +1691,8 @@ msgstr ""
1671
  msgid "Display Avatars"
1672
  msgstr ""
1673
 
1674
- #: wpf-includes/functions-template.php:455
1675
- #: wpf-includes/functions-template.php:536 wpf-includes/wpf-phrases.php:72
1676
  msgid "Display with Avatars"
1677
  msgstr ""
1678
 
@@ -1807,7 +1827,7 @@ msgstr ""
1807
  msgid "Items"
1808
  msgstr ""
1809
 
1810
- #: wpf-includes/functions.php:1106
1811
  #, php-format
1812
  msgid "Could not write file %s"
1813
  msgstr ""
@@ -1826,69 +1846,69 @@ msgstr ""
1826
  msgid "Uninstall"
1827
  msgstr ""
1828
 
1829
- #: wpf-includes/wpf-hooks.php:1086 wpf-includes/wpf-phrases.php:188
1830
  msgid "Move"
1831
  msgstr ""
1832
 
1833
- #: wpf-includes/wpf-hooks.php:1121
1834
  msgid "Clear"
1835
  msgstr ""
1836
 
1837
- #: wpf-includes/wpf-hooks.php:1121
1838
  msgid "Default"
1839
  msgstr ""
1840
 
1841
- #: wpf-includes/wpf-hooks.php:1121
1842
  msgid "Select Color"
1843
  msgstr ""
1844
 
1845
- #: wpf-includes/wpf-hooks.php:1144
1846
  msgid ""
1847
  "IMPORTANT: wpForo can't work with default permalink, please change permalink "
1848
  "structure"
1849
  msgstr ""
1850
 
1851
- #: wpf-includes/wpf-hooks.php:1165 wpf-includes/wpf-phrases.php:413
1852
  msgid "wpForo Usergroup"
1853
  msgstr ""
1854
 
1855
- #: wpf-includes/wpf-hooks.php:1173 wpf-includes/wpf-phrases.php:412
1856
  msgid "wpForo User Timezone"
1857
  msgstr ""
1858
 
1859
- #: wpf-includes/wpf-hooks.php:1362 wpf-includes/wpf-hooks.php:1451
1860
  msgid "Please Moderate: "
1861
  msgstr ""
1862
 
1863
- #: wpf-includes/wpf-hooks.php:1363
1864
  msgid ""
1865
  "This topic is currently unapproved. You can approve topics in Dashboard "
1866
  "&raquo; Forums &raquo; Moderation admin page."
1867
  msgstr ""
1868
 
1869
- #: wpf-includes/wpf-hooks.php:1452
1870
  msgid ""
1871
  "This post is currently unapproved. You can approve posts in Dashboard "
1872
  "&raquo; Forums &raquo; Moderation admin page."
1873
  msgstr ""
1874
 
1875
- #: wpf-includes/wpf-hooks.php:1629 wpf-includes/wpf-hooks.php:1675
1876
  msgid "New Forum"
1877
  msgstr ""
1878
 
1879
- #: wpf-includes/wpf-hooks.php:1637
1880
  msgid "New User Group"
1881
  msgstr ""
1882
 
1883
- #: wpf-includes/wpf-hooks.php:1645 wpf-includes/wpf-hooks.php:1743
1884
  msgid "New Phrase"
1885
  msgstr ""
1886
 
1887
- #: wpf-includes/wpf-hooks.php:1660
1888
  msgid "Community"
1889
  msgstr ""
1890
 
1891
- #: wpf-includes/wpf-hooks.php:1727
1892
  msgid "New UserGroup"
1893
  msgstr ""
1894
 
@@ -3735,41 +3755,77 @@ msgstr ""
3735
  msgid "Required field"
3736
  msgstr ""
3737
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3738
  #: wpforo.php:89
3739
  msgid "Discussion Board"
3740
  msgstr ""
3741
 
3742
- #: wpforo.php:504
3743
  msgid ""
3744
  "Allows to embed hundreds of video, social network, audio and photo content "
3745
  "providers in forum topics and posts."
3746
  msgstr ""
3747
 
3748
- #: wpforo.php:505
3749
  msgid ""
3750
  "Advanced user profile builder system. Allows to add new fields and manage "
3751
  "profile page. Creates custom Registration, Account, Member Search forms."
3752
  msgstr ""
3753
 
3754
- #: wpforo.php:506
3755
  msgid ""
3756
  "Adds an advanced file attachment system to forum topics and posts. AJAX "
3757
  "powered media uploading and displaying system with user specific library."
3758
  msgstr ""
3759
 
3760
- #: wpforo.php:507
3761
  msgid ""
3762
  "Blog to Forum and Forum to Blog content synchronization. Blog posts with "
3763
  "Forum topics and Blog comments with Forum replies."
3764
  msgstr ""
3765
 
3766
- #: wpforo.php:508
3767
  msgid ""
3768
  "Provides a safe way to communicate directly with other members. Messages are "
3769
  "private and can only be viewed by conversation participants."
3770
  msgstr ""
3771
 
3772
- #: wpforo.php:509
3773
  msgid ""
3774
  "Ads Manager is a powerful yet simple advertisement management system, that "
3775
  "allows you to add adverting banners between forums, topics and posts."
5
  msgstr ""
6
  "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
7
  "Project-Id-Version: Forum - wpForo\n"
8
+ "POT-Creation-Date: 2017-10-22 19:01+0400\n"
9
  "PO-Revision-Date: 2016-06-28 21:09+0400\n"
10
  "Last-Translator: \n"
11
  "Language-Team: \n"
67
 
68
  #: wpf-admin/admin.php:26 wpf-admin/admin.php:28 wpf-admin/dashboard.php:138
69
  #: wpf-admin/options-tabs/styles.php:16 wpf-admin/options.php:15
70
+ #: wpf-includes/wpf-hooks.php:1673 wpf-includes/wpf-phrases.php:123
71
  msgid "Forums"
72
  msgstr ""
73
 
74
  #: wpf-admin/admin.php:29 wpf-includes/wpf-hooks.php:22
75
+ #: wpf-includes/wpf-hooks.php:1689
76
  msgid "Settings"
77
  msgstr ""
78
 
79
+ #: wpf-admin/admin.php:30 wpf-includes/wpf-hooks.php:1698
80
  msgid "Tools"
81
  msgstr ""
82
 
83
+ #: wpf-admin/admin.php:31 wpf-includes/wpf-hooks.php:1707
84
  msgid "Moderation"
85
  msgstr ""
86
 
87
  #: wpf-admin/admin.php:32 wpf-admin/dashboard.php:150 wpf-admin/member.php:10
88
+ #: wpf-admin/options.php:18 wpf-includes/wpf-hooks.php:1716
89
  #: wpf-includes/wpf-phrases.php:178
90
  msgid "Members"
91
  msgstr ""
92
 
93
  #: wpf-admin/admin.php:33 wpf-admin/usergroup.php:8
94
+ #: wpf-includes/wpf-hooks.php:1725
95
  msgid "Usergroups"
96
  msgstr ""
97
 
98
+ #: wpf-admin/admin.php:34 wpf-includes/wpf-hooks.php:1741
99
  #: wpf-includes/wpf-phrases.php:600
100
  msgid "Phrases"
101
  msgstr ""
102
 
103
+ #: wpf-admin/admin.php:35 wpf-includes/wpf-hooks.php:1757
104
  #: wpf-includes/wpf-phrases.php:601
105
  msgid "Themes"
106
  msgstr ""
107
 
108
  #: wpf-admin/admin.php:36 wpf-admin/options.php:23
109
+ #: wpf-includes/wpf-hooks.php:1766 wpf-includes/wpf-phrases.php:25
110
  msgid "Addons"
111
  msgstr ""
112
 
356
 
357
  #: wpf-admin/forum.php:153 wpf-admin/themes.php:73
358
  #: wpf-admin/tools-tabs/antispam.php:139 wpf-admin/usergroup.php:34
359
+ #: wpf-admin/usergroup.php:181 wpf-includes/wpf-hooks.php:1092
360
  #: wpf-includes/wpf-phrases.php:66
361
  msgid "Delete"
362
  msgstr ""
631
  msgid "Show Forum Statistic"
632
  msgstr ""
633
 
634
+ #: wpf-admin/options-tabs/features.php:15 wpf-includes/wpf-phrases.php:696
635
  msgid "Log Viewed Forums and Topics"
636
  msgstr ""
637
 
672
  msgid "Replace Login Page URL to Forum URL"
673
  msgstr ""
674
 
675
+ #: wpf-admin/options-tabs/features.php:22 wpf-includes/wpf-phrases.php:697
676
  msgid "Replace WP Reset Password URL to Forum reset password page"
677
  msgstr ""
678
 
728
  msgid "Enable User Profile Page indexing"
729
  msgstr ""
730
 
731
+ #: wpf-admin/options-tabs/features.php:36 wpf-includes/wpf-phrases.php:698
732
  msgid "Enable RSS Feed"
733
  msgstr ""
734
 
920
  msgid "Members URL structure"
921
  msgstr ""
922
 
923
+ #: wpf-admin/options-tabs/members.php:29 wpf-includes/wpf-phrases.php:699
924
  msgid "Members Search Type"
925
  msgstr ""
926
 
1531
  "another one."
1532
  msgstr ""
1533
 
1534
+ #: wpf-includes/class-members.php:1307
1535
  msgid "What should be done with wpForo content owned by this user?"
1536
  msgstr ""
1537
 
1538
+ #: wpf-includes/class-members.php:1309
1539
  msgid "What should be done with wpForo content owned by these users?"
1540
  msgstr ""
1541
 
1542
+ #: wpf-includes/class-members.php:1313
1543
  msgid "Delete all wpForo content."
1544
  msgstr ""
1545
 
1546
+ #: wpf-includes/class-members.php:1315
1547
  msgid "Attribute all content to:"
1548
  msgstr ""
1549
 
1604
  msgid "Open link in a new tab"
1605
  msgstr ""
1606
 
1607
+ #: wpf-includes/class-template.php:1167 wpf-includes/wpf-phrases.php:328
1608
  msgid "Theme file not readable"
1609
  msgstr ""
1610
 
1611
+ #: wpf-includes/functions-installation.php:592
1612
  msgid "Start Profile Synchronization"
1613
  msgstr ""
1614
 
1615
+ #: wpf-includes/functions-installation.php:592
1616
  msgid "Continue Synchronization"
1617
  msgstr ""
1618
 
1619
+ #: wpf-includes/functions-installation.php:595
1620
  msgid ""
1621
  "This process may take a few seconds or dozens of minutes, please be patient "
1622
  "and don't close this page."
1623
  msgstr ""
1624
 
1625
+ #: wpf-includes/functions-installation.php:596
1626
  msgid ""
1627
  "You can permanently disable this message in Dashboard > Forums > Features "
1628
  "admin page."
1629
  msgstr ""
1630
 
1631
+ #: wpf-includes/functions-installation.php:598
1632
  msgid "wpForo Forum Installation | "
1633
  msgstr ""
1634
 
1635
+ #: wpf-includes/functions-installation.php:599
1636
  msgid ""
1637
  "Forum users' profile data are not synchronized yet, this step is required! "
1638
  "Please click the button below to complete installation."
1639
  msgstr ""
1640
 
1641
+ #: wpf-includes/functions-installation.php:611
1642
+ msgid ""
1643
+ "This process may take a few seconds or dozens of minutes, please be patient "
1644
+ "and don't close this page. Database backup is not required. If you got 500 "
1645
+ "Server Error please don't worry, the data updating process is still working "
1646
+ "in MySQL server."
1647
+ msgstr ""
1648
+
1649
+ #: wpf-includes/functions-installation.php:612
1650
+ msgid "Updater Database"
1651
+ msgstr ""
1652
+
1653
+ #: wpf-includes/functions-installation.php:613
1654
+ msgid "wpForo - Update Database "
1655
+ msgstr ""
1656
+
1657
+ #: wpf-includes/functions-installation.php:614
1658
+ msgid "Please click the button below to complete wpForo update."
1659
+ msgstr ""
1660
+
1661
  #: wpf-includes/functions-template.php:7
1662
  msgid "wpForo Menu"
1663
  msgstr ""
1675
  #: wpf-includes/functions-template.php:199
1676
  #: wpf-includes/functions-template.php:306
1677
  #: wpf-includes/functions-template.php:369
1678
+ #: wpf-includes/functions-template.php:452
1679
+ #: wpf-includes/functions-template.php:536
1680
+ #: wpf-includes/functions-template.php:583 wpf-includes/wpf-phrases.php:335
1681
  msgid "Title"
1682
  msgstr ""
1683
 
1684
  #: wpf-includes/functions-template.php:372
1685
+ #: wpf-includes/functions-template.php:455
1686
+ #: wpf-includes/functions-template.php:539 wpf-includes/wpf-phrases.php:211
1687
  msgid "Number of Items"
1688
  msgstr ""
1689
 
1691
  msgid "Display Avatars"
1692
  msgstr ""
1693
 
1694
+ #: wpf-includes/functions-template.php:459
1695
+ #: wpf-includes/functions-template.php:543 wpf-includes/wpf-phrases.php:72
1696
  msgid "Display with Avatars"
1697
  msgstr ""
1698
 
1827
  msgid "Items"
1828
  msgstr ""
1829
 
1830
+ #: wpf-includes/functions.php:1115
1831
  #, php-format
1832
  msgid "Could not write file %s"
1833
  msgstr ""
1846
  msgid "Uninstall"
1847
  msgstr ""
1848
 
1849
+ #: wpf-includes/wpf-hooks.php:1091 wpf-includes/wpf-phrases.php:188
1850
  msgid "Move"
1851
  msgstr ""
1852
 
1853
+ #: wpf-includes/wpf-hooks.php:1126
1854
  msgid "Clear"
1855
  msgstr ""
1856
 
1857
+ #: wpf-includes/wpf-hooks.php:1126
1858
  msgid "Default"
1859
  msgstr ""
1860
 
1861
+ #: wpf-includes/wpf-hooks.php:1126
1862
  msgid "Select Color"
1863
  msgstr ""
1864
 
1865
+ #: wpf-includes/wpf-hooks.php:1149
1866
  msgid ""
1867
  "IMPORTANT: wpForo can't work with default permalink, please change permalink "
1868
  "structure"
1869
  msgstr ""
1870
 
1871
+ #: wpf-includes/wpf-hooks.php:1170 wpf-includes/wpf-phrases.php:413
1872
  msgid "wpForo Usergroup"
1873
  msgstr ""
1874
 
1875
+ #: wpf-includes/wpf-hooks.php:1178 wpf-includes/wpf-phrases.php:412
1876
  msgid "wpForo User Timezone"
1877
  msgstr ""
1878
 
1879
+ #: wpf-includes/wpf-hooks.php:1367 wpf-includes/wpf-hooks.php:1456
1880
  msgid "Please Moderate: "
1881
  msgstr ""
1882
 
1883
+ #: wpf-includes/wpf-hooks.php:1368
1884
  msgid ""
1885
  "This topic is currently unapproved. You can approve topics in Dashboard "
1886
  "&raquo; Forums &raquo; Moderation admin page."
1887
  msgstr ""
1888
 
1889
+ #: wpf-includes/wpf-hooks.php:1457
1890
  msgid ""
1891
  "This post is currently unapproved. You can approve posts in Dashboard "
1892
  "&raquo; Forums &raquo; Moderation admin page."
1893
  msgstr ""
1894
 
1895
+ #: wpf-includes/wpf-hooks.php:1634 wpf-includes/wpf-hooks.php:1680
1896
  msgid "New Forum"
1897
  msgstr ""
1898
 
1899
+ #: wpf-includes/wpf-hooks.php:1642
1900
  msgid "New User Group"
1901
  msgstr ""
1902
 
1903
+ #: wpf-includes/wpf-hooks.php:1650 wpf-includes/wpf-hooks.php:1748
1904
  msgid "New Phrase"
1905
  msgstr ""
1906
 
1907
+ #: wpf-includes/wpf-hooks.php:1665
1908
  msgid "Community"
1909
  msgstr ""
1910
 
1911
+ #: wpf-includes/wpf-hooks.php:1732
1912
  msgid "New UserGroup"
1913
  msgstr ""
1914
 
3755
  msgid "Required field"
3756
  msgstr ""
3757
 
3758
+ #: wpf-includes/wpf-phrases.php:689
3759
+ msgid "Add Reply"
3760
+ msgstr ""
3761
+
3762
+ #: wpf-includes/wpf-phrases.php:690
3763
+ msgid "Forums RSS Feed"
3764
+ msgstr ""
3765
+
3766
+ #: wpf-includes/wpf-phrases.php:691
3767
+ msgid "Topics RSS Feed"
3768
+ msgstr ""
3769
+
3770
+ #: wpf-includes/wpf-phrases.php:692
3771
+ msgid "Find a member"
3772
+ msgstr ""
3773
+
3774
+ #: wpf-includes/wpf-phrases.php:693
3775
+ msgid "Display Name or Nicename"
3776
+ msgstr ""
3777
+
3778
+ #: wpf-includes/wpf-phrases.php:694
3779
+ msgid "Reset Search"
3780
+ msgstr ""
3781
+
3782
+ #: wpf-includes/wpf-phrases.php:695
3783
+ msgid "Reset Result"
3784
+ msgstr ""
3785
+
3786
+ #: wpf-includes/wpf-phrases.php:700
3787
+ msgid "Recent Posts"
3788
+ msgstr ""
3789
+
3790
+ #: wpf-includes/wpf-phrases.php:701
3791
+ msgid "No posts were found here"
3792
+ msgstr ""
3793
+
3794
  #: wpforo.php:89
3795
  msgid "Discussion Board"
3796
  msgstr ""
3797
 
3798
+ #: wpforo.php:510
3799
  msgid ""
3800
  "Allows to embed hundreds of video, social network, audio and photo content "
3801
  "providers in forum topics and posts."
3802
  msgstr ""
3803
 
3804
+ #: wpforo.php:511
3805
  msgid ""
3806
  "Advanced user profile builder system. Allows to add new fields and manage "
3807
  "profile page. Creates custom Registration, Account, Member Search forms."
3808
  msgstr ""
3809
 
3810
+ #: wpforo.php:512
3811
  msgid ""
3812
  "Adds an advanced file attachment system to forum topics and posts. AJAX "
3813
  "powered media uploading and displaying system with user specific library."
3814
  msgstr ""
3815
 
3816
+ #: wpforo.php:513
3817
  msgid ""
3818
  "Blog to Forum and Forum to Blog content synchronization. Blog posts with "
3819
  "Forum topics and Blog comments with Forum replies."
3820
  msgstr ""
3821
 
3822
+ #: wpforo.php:514
3823
  msgid ""
3824
  "Provides a safe way to communicate directly with other members. Messages are "
3825
  "private and can only be viewed by conversation participants."
3826
  msgstr ""
3827
 
3828
+ #: wpforo.php:515
3829
  msgid ""
3830
  "Ads Manager is a powerful yet simple advertisement management system, that "
3831
  "allows you to add adverting banners between forums, topics and posts."
wpf-themes/classic/colors.css CHANGED
@@ -293,6 +293,17 @@
293
  #wpforo-wrap .wpforo-search-wrap .wpforo-search-content td.wpf-shead-icon{ border-right:1px solid #ffffff;}
294
  #wpforo-wrap .wpforo-search-wrap .wpforo-search-content td.wpf-spost-icon { border-right:1px solid #ffffff;}
295
 
 
 
 
 
 
 
 
 
 
 
 
296
  #wpforo-wrap .wpf-action{ color: #3f7796; }
297
  #wpforo-wrap .wpf-action:hover{ cursor: pointer; color: #659fbe; }
298
 
293
  #wpforo-wrap .wpforo-search-wrap .wpforo-search-content td.wpf-shead-icon{ border-right:1px solid #ffffff;}
294
  #wpforo-wrap .wpforo-search-wrap .wpforo-search-content td.wpf-spost-icon { border-right:1px solid #ffffff;}
295
 
296
+ #wpforo-wrap #wpforo-recent-title { color:#333333; }
297
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar{ background:#f5f5f5; border:#e6e6e6 1px solid; }
298
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar .wpfltd{ border-bottom:1px dotted #ffffff; }
299
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar .wpfrtd{ border-bottom:1px dotted #ffffff; }
300
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content { border-bottom:#e6e6e6 1px solid; }
301
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content .wpf-htr{ background-color:#43a6df; color:#ffffff; }
302
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content .wpf-ttr{ background:#f5f5f5 }
303
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-shead-icon{ border-right:1px solid #ffffff;}
304
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-spost-icon { border-right:1px solid #ffffff;}
305
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-stext{color:#666666}
306
+
307
  #wpforo-wrap .wpf-action{ color: #3f7796; }
308
  #wpforo-wrap .wpf-action:hover{ cursor: pointer; color: #659fbe; }
309
 
wpf-themes/classic/footer.php CHANGED
@@ -48,8 +48,9 @@
48
  <div class="wpf-row wpf-last-info">
49
  <?php if(isset($stat['last_post_title']) && $stat['last_post_title']): ?>
50
  <p class="wpf-stat-other">
51
- <span ><i class="fa fa-pencil"></i> <?php wpforo_phrase('Latest Post') ?>: <a href="<?php echo esc_url($stat['last_post_url']) ?>"><?php echo esc_html($stat['last_post_title']) ?></a></span>
52
  <span><i class="fa fa-user-plus"></i> <?php wpforo_phrase('Our newest member') ?>: <a href="<?php echo esc_url($stat['newest_member_profile_url']) ?>"><?php echo esc_html($stat['newest_member_dname']) ?></a></span>
 
53
  </p>
54
  <?php endif; ?>
55
  <p class="wpf-topic-icons">
48
  <div class="wpf-row wpf-last-info">
49
  <?php if(isset($stat['last_post_title']) && $stat['last_post_title']): ?>
50
  <p class="wpf-stat-other">
51
+ <?php if( isset($stat['posts']) && $stat['posts'] ): ?><span ><i class="fa fa-pencil"></i> <?php wpforo_phrase('Latest Post') ?>: <a href="<?php echo esc_url($stat['last_post_url']) ?>"><?php echo esc_html($stat['last_post_title']) ?></a></span><?php endif; ?>
52
  <span><i class="fa fa-user-plus"></i> <?php wpforo_phrase('Our newest member') ?>: <a href="<?php echo esc_url($stat['newest_member_profile_url']) ?>"><?php echo esc_html($stat['newest_member_dname']) ?></a></span>
53
+ <?php if( isset($stat['posts']) && $stat['posts'] ): ?><span class="wpf-stat-recent-posts"><i class="fa fa-list-ul"></i> <a href="<?php echo esc_url(wpforo_home_url('recent')) ?>"><?php wpforo_phrase('Recent Posts') ?></a></span><?php endif; ?>
54
  </p>
55
  <?php endif; ?>
56
  <p class="wpf-topic-icons">
wpf-themes/classic/index.php CHANGED
@@ -18,6 +18,8 @@
18
  <?php
19
  if($template == 'search'){
20
  include( wpftpl('search.php') );
 
 
21
  }elseif($template == 'register'){
22
  include( wpftpl('register.php') );
23
  }elseif($template == 'login'){
18
  <?php
19
  if($template == 'search'){
20
  include( wpftpl('search.php') );
21
+ }elseif($template == 'recent'){
22
+ include( wpftpl('recent.php') );
23
  }elseif($template == 'register'){
24
  include( wpftpl('register.php') );
25
  }elseif($template == 'login'){
wpf-themes/classic/profile.php CHANGED
@@ -7,7 +7,8 @@
7
  <?php if( !empty($user) && ( $wpforo->current_userid == $user['userid'] || $wpforo->perm->usergroup_can('vprf')) ) :
8
  $filtered_user = apply_filters('wpforo_profile_header_obj', $user);
9
  extract($filtered_user);
10
- $enabled_for_usergroup = ( isset($wpforo->member->options['rating_badge_ug'][$groupid]) && $wpforo->member->options['rating_badge_ug'][$groupid] ) ? true : false ;
 
11
  ?>
12
 
13
  <div class="wpforo-profile-head-wrap">
@@ -20,7 +21,7 @@
20
  <div id="m_" class="wpforo-profile-head">
21
  <?php do_action( 'wpforo_profile_plugin_menu_action', $userid ); ?>
22
  <div class="h-header">
23
- <div class="wpfy" <?php if( !$enabled_for_usergroup ) echo ' style="height:125px;" ' ?>></div>
24
  <div class="wpf-profile-info-wrap">
25
 
26
  <div class="h-picture">
@@ -43,7 +44,7 @@
43
  <div class="h-top">
44
  <div class="profile-stat-data">
45
  <?php do_action( 'wpforo_profile_data_item', $wpforo->current_object ) ?>
46
- <?php if( wpforo_feature('rating', $wpforo) && $enabled_for_usergroup ): ?>
47
  <div class="profile-rating-bar">
48
  <div class="profile-rating-bar-wrap" title="<?php wpforo_phrase('Member Rating') ?>">
49
  <?php $levels = $wpforo->member->levels(); ?>
7
  <?php if( !empty($user) && ( $wpforo->current_userid == $user['userid'] || $wpforo->perm->usergroup_can('vprf')) ) :
8
  $filtered_user = apply_filters('wpforo_profile_header_obj', $user);
9
  extract($filtered_user);
10
+ $rating_enabled = ( wpforo_feature('rating', $wpforo) && isset($wpforo->member->options['rating_badge_ug'][$groupid]) && $wpforo->member->options['rating_badge_ug'][$groupid] ) ? true : false ;
11
+
12
  ?>
13
 
14
  <div class="wpforo-profile-head-wrap">
21
  <div id="m_" class="wpforo-profile-head">
22
  <?php do_action( 'wpforo_profile_plugin_menu_action', $userid ); ?>
23
  <div class="h-header">
24
+ <div class="wpfy" <?php if( !$rating_enabled ) echo ' style="height:140px;" ' ?>></div>
25
  <div class="wpf-profile-info-wrap">
26
 
27
  <div class="h-picture">
44
  <div class="h-top">
45
  <div class="profile-stat-data">
46
  <?php do_action( 'wpforo_profile_data_item', $wpforo->current_object ) ?>
47
+ <?php if( $rating_enabled ): ?>
48
  <div class="profile-rating-bar">
49
  <div class="profile-rating-bar-wrap" title="<?php wpforo_phrase('Member Rating') ?>">
50
  <?php $levels = $wpforo->member->levels(); ?>
wpf-themes/classic/recent.php ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ // Exit if accessed directly
3
+ if( !defined( 'ABSPATH' ) ) exit;
4
+
5
+ if(!empty($_GET['wpfpaged'])) $paged = intval($_GET['wpfpaged']);
6
+ if(!empty($_GET['wpff'])) $args['forumid'] = intval($_GET['wpff']);
7
+ $args = array( 'offset' => ($paged - 1) * $wpforo->post->options['posts_per_page'], 'row_count' => $wpforo->post->options['posts_per_page']);
8
+ $args['orderby'] = (!empty($_GET['wpfob'])) ? sanitize_text_field($_GET['wpfob']) : 'created';
9
+ $args['order'] = (!empty($_GET['wpfo'])) ? sanitize_text_field($_GET['wpfo']) : 'DESC';
10
+ if(!is_user_logged_in() || !$wpforo->perm->usergroup_can('em')){ $args['private'] = 0; $args['status'] = 0; }
11
+
12
+ $items_count = 0;
13
+ $posts = $wpforo->post->get_posts($args, $items_count);
14
+ ?>
15
+ <div class="wpforo-recent-wrap">
16
+ <div class="wpf-head-bar">
17
+ <h1 id="wpforo-title" style="padding-bottom:0px; margin-bottom:0px;">
18
+ <?php wpforo_phrase('Recent Posts') ?>
19
+ <?php if( wpforo_feature('rss-feed', $wpforo) ): ?>
20
+ <div class="wpforo-feed">
21
+ <span class="wpf-feed-forums">
22
+ <a href="<?php $wpforo->feed->rss2_url( true, 'forum' ); ?>" title="<?php wpforo_phrase('Forums RSS Feed') ?>" target="_blank">
23
+ <span><?php wpforo_phrase('Forums') ?></span> <i class="fa fa-rss fa-0x"></i>
24
+ </a>
25
+ </span><sep> | </sep>
26
+ <span class="wpf-feed-topics">
27
+ <a href="<?php $wpforo->feed->rss2_url( true, 'topic' ); ?>" title="<?php wpforo_phrase('Topics RSS Feed') ?>" target="_blank">
28
+ <span><?php wpforo_phrase('Topics') ?></span> <i class="fa fa-rss fa-0x"></i>
29
+ </a>
30
+ </span>
31
+ </div>
32
+ <?php endif; ?>
33
+ </h1>
34
+ <div class="wpf-snavi">
35
+ <?php $wpforo->tpl->pagenavi($paged, $items_count, FALSE); ?>
36
+ </div>
37
+ </div>
38
+ <div class="wpforo-recent-content">
39
+ <?php if( !empty($posts) ): ?>
40
+ <table width="100%" border="0" cellspacing="0" cellpadding="0">
41
+ <tr class="wpf-htr">
42
+ <td class="wpf-shead-avatar">&nbsp;</td>
43
+ <td class="wpf-shead-title"><?php wpforo_phrase('Post Title') ?></td>
44
+ <td class="wpf-shead-forum"><?php wpforo_phrase('Forum') ?></td>
45
+ </tr>
46
+ <?php foreach($posts as $post) : extract($post, EXTR_OVERWRITE); ?>
47
+ <?php
48
+ $member = wpforo_member($post);
49
+ $forum = wpforo_forum($post['forumid']);
50
+ ?>
51
+ <tr class="wpf-ttr">
52
+ <td class="wpf-spost-avatar">
53
+ <?php if( $wpforo->perm->usergroup_can('va') && wpforo_feature('avatars', $wpforo) ): ?>
54
+ <?php echo $wpforo->member->avatar($member, 'alt="'.esc_attr($member['display_name']).'"', 40, true) ?>
55
+ <?php endif; ?>
56
+ </td>
57
+ <td class="wpf-spost-title">
58
+ <a href="<?php echo esc_url($wpforo->post->get_post_url($postid)) ?>" class="wpf-spost-title-link <?php wpforo_unread_topic($post['topicid']); ?>" title="<?php wpforo_phrase('View entire post') ?>"><?php echo esc_html($title) ?> &nbsp;<i class="fa fa-chevron-right" style="font-weight:100; font-size:11px;"></i></a>
59
+ <p style="font-size:12px"><?php wpforo_member_link($member, 'by'); ?>, <?php wpforo_date($post['created']); ?></p>
60
+ </td>
61
+ <td class="wpf-spost-forum"><a href="<?php echo $forum['url'] ?>"><?php echo esc_html($forum['title']); ?></a></td>
62
+ </tr>
63
+ <tr class="wpf-ptr">
64
+ <td class="wpf-spost-icon">&nbsp;</td>
65
+ <td colspan="2" class="wpf-stext">
66
+ <?php
67
+ $body = wpforo_content_filter( $body );
68
+ $body = preg_replace('#\[attach\][^\[\]]*\[\/attach\]#is', '', strip_tags($body));
69
+ wpforo_text($body, 200);
70
+ ?>
71
+ </td>
72
+ </tr>
73
+ <?php endforeach ?>
74
+ </table>
75
+ <?php else: ?>
76
+ <p class="wpf-p-error"><?php wpforo_phrase('No posts were found here') ?> </p>
77
+ <?php endif; ?>
78
+ </div>
79
+ <div class="wpf-snavi">
80
+ <?php $wpforo->tpl->pagenavi($paged, $items_count, FALSE); ?>
81
+ </div>
82
+ </div>
83
+ <p>&nbsp;</p>
84
+ <p>&nbsp;</p>
85
+ <p>&nbsp;</p>
wpf-themes/classic/style-rtl.css CHANGED
@@ -671,6 +671,31 @@ RTL Style of Classic Theme
671
  #wpforo-wrap .wpforo-search-wrap .wpforo-search-content td.wpf-stext{padding:10px;word-break: break-all;}
672
  #wpforo-wrap .wpforo-search-wrap .wpf-snavi{width:100%; margin:5px auto 1px 0px; text-align:left; padding:5px 5px;}
673
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
674
  /******************************************************/
675
  /******************** Pagination **********************/
676
  /******************************************************/
671
  #wpforo-wrap .wpforo-search-wrap .wpforo-search-content td.wpf-stext{padding:10px;word-break: break-all;}
672
  #wpforo-wrap .wpforo-search-wrap .wpf-snavi{width:100%; margin:5px auto 1px 0px; text-align:left; padding:5px 5px;}
673
 
674
+ /****************************************************/
675
+ /******************* wpForo Recent ******************/
676
+ /****************************************************/
677
+ #wpforo-wrap #wpforo-recent-title {padding-bottom:16px; font-size:16px; font-weight:100; padding:20px 0px;}
678
+ #wpforo-wrap .wpforo-recent-wrap table{border-spacing:0; border-collapse:collapse; padding:0; background:transparent; border:none;}
679
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar{padding:5px 10px;}
680
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar .wpfltd{padding:10px 5px; vertical-align:top;}
681
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar .wpfrtd{padding:10px 5px; vertical-align:top;}
682
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar .wpf-last{border-bottom:none!important;}
683
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar .wpf-last{border-bottom:none!important;}
684
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar .wpff{height:150px;}
685
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar .wpfd{margin-bottom:10px;}
686
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar .wpf-recent-label{font-size:13px; line-height:16px;}
687
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content {margin-top:5px; padding-top:5px; padding-bottom:0px;}
688
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-shead-avatar{width:60px; text-align:center;}
689
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-shead-title{padding:15px 5px;}
690
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-shead-forum{padding:15px 5px; width:30%;}
691
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-spost-avatar {width:60px; text-align:center; padding:10px;}
692
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-spost-avatar img.avatar{ max-width:40px; }
693
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-spost-title {padding:10px 5px; vertical-align:top;}
694
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-spost-title .wpf-spost-title-link{font-size:16px;}
695
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-spost-forum {padding:10px 5px; vertical-align:top; width:30%;}
696
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-stext{padding:10px;word-break: break-all; font-size:12px; line-height:15px;}
697
+ #wpforo-wrap .wpforo-recent-wrap .wpf-snavi{width:100%; margin:1px auto -10px 0px; text-align:right; padding:1px 0px;}
698
+
699
  /******************************************************/
700
  /******************** Pagination **********************/
701
  /******************************************************/
wpf-themes/classic/style.css CHANGED
@@ -673,6 +673,31 @@ Author: gVectors Team
673
  #wpforo-wrap .wpforo-search-wrap .wpforo-search-content td.wpf-stext{padding:10px;word-break: break-all;}
674
  #wpforo-wrap .wpforo-search-wrap .wpf-snavi{width:100%; margin:5px 0px 1px auto; text-align:right; padding:5px 5px;}
675
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
676
  /******************************************************/
677
  /******************** Pagination **********************/
678
  /******************************************************/
673
  #wpforo-wrap .wpforo-search-wrap .wpforo-search-content td.wpf-stext{padding:10px;word-break: break-all;}
674
  #wpforo-wrap .wpforo-search-wrap .wpf-snavi{width:100%; margin:5px 0px 1px auto; text-align:right; padding:5px 5px;}
675
 
676
+ /****************************************************/
677
+ /******************* wpForo Recent ******************/
678
+ /****************************************************/
679
+ #wpforo-wrap #wpforo-recent-title {padding-bottom:16px; font-size:16px; font-weight:100; padding:20px 0px;}
680
+ #wpforo-wrap .wpforo-recent-wrap table{border-spacing:0; border-collapse:collapse; padding:0; background:transparent; border:none;}
681
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar{padding:5px 10px;}
682
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar .wpfltd{padding:10px 5px; vertical-align:top;}
683
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar .wpfrtd{padding:10px 5px; vertical-align:top;}
684
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar .wpf-last{border-bottom:none!important;}
685
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar .wpf-last{border-bottom:none!important;}
686
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar .wpff{height:150px;}
687
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar .wpfd{margin-bottom:10px;}
688
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar .wpf-recent-label{font-size:13px; line-height:16px;}
689
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content {margin-top:5px; padding-top:5px; padding-bottom:0px;}
690
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-shead-avatar{width:60px; text-align:center;}
691
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-shead-title{padding:15px 5px;}
692
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-shead-forum{padding:15px 5px; width:30%;}
693
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-spost-avatar {width:60px; text-align:center; padding:10px;}
694
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-spost-avatar img.avatar{ max-width:40px; }
695
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-spost-title {padding:10px 5px; vertical-align:top;}
696
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-spost-title .wpf-spost-title-link{font-size:16px;}
697
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-spost-forum {padding:10px 5px; vertical-align:top; width:30%;}
698
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-stext{padding:10px;word-break: break-all; font-size:12px; line-height:15px;}
699
+ #wpforo-wrap .wpforo-recent-wrap .wpf-snavi{width:100%; margin:1px 0px -10px auto; text-align:right; padding:1px 0px;}
700
+
701
  /******************************************************/
702
  /******************** Pagination **********************/
703
  /******************************************************/
wpf-themes/classic/styles/css.php CHANGED
@@ -304,6 +304,17 @@ $css = '/* wpForo Dynamic CSS Document */
304
  #wpforo-wrap .wpforo-search-wrap .wpforo-search-content td.wpf-shead-icon{ border-right:1px solid '. $WPFCOLOR_1 .';}
305
  #wpforo-wrap .wpforo-search-wrap .wpforo-search-content td.wpf-spost-icon { border-right:1px solid '. $WPFCOLOR_1 .';}
306
 
 
 
 
 
 
 
 
 
 
 
 
307
  #wpforo-wrap .wpf-action{ color: '. $WPFCOLOR_15 .'; }
308
  #wpforo-wrap .wpf-action:hover{ cursor: pointer; color: '. $WPFCOLOR_11 .'; }
309
 
304
  #wpforo-wrap .wpforo-search-wrap .wpforo-search-content td.wpf-shead-icon{ border-right:1px solid '. $WPFCOLOR_1 .';}
305
  #wpforo-wrap .wpforo-search-wrap .wpforo-search-content td.wpf-spost-icon { border-right:1px solid '. $WPFCOLOR_1 .';}
306
 
307
+ #wpforo-wrap #wpforo-recent-title { color:'. $WPFCOLOR_2 .'; }
308
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar{ background:'. $WPFCOLOR_9 .'; border:'. $WPFCOLOR_8 .' 1px solid; }
309
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar .wpfltd{ border-bottom:1px dotted '. $WPFCOLOR_1 .'; }
310
+ #wpforo-wrap .wpforo-recent-wrap .wpf-recent-bar .wpfrtd{ border-bottom:1px dotted '. $WPFCOLOR_1 .'; }
311
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content { border-bottom:'. $WPFCOLOR_8 .' 1px solid; }
312
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content .wpf-htr{ background-color:'. $WPFCOLOR_12 .'; color:'. $WPFCOLOR_1 .'; }
313
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content .wpf-ttr{ background:'. $WPFCOLOR_9 .' }
314
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-shead-icon{ border-right:1px solid '. $WPFCOLOR_1 .';}
315
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-spost-icon { border-right:1px solid '. $WPFCOLOR_1 .';}
316
+ #wpforo-wrap .wpforo-recent-wrap .wpforo-recent-content td.wpf-stext{color:'. $WPFCOLOR_4 .'}
317
+
318
  #wpforo-wrap .wpf-action{ color: '. $WPFCOLOR_15 .'; }
319
  #wpforo-wrap .wpf-action:hover{ cursor: pointer; color: '. $WPFCOLOR_11 .'; }
320
 
wpforo.php CHANGED
@@ -1,18 +1,18 @@
1
  <?php
2
  /*
3
- * Plugin Name: Forum - wpForo
4
  * Plugin URI: https://wpforo.com
5
  * Description: Forums wpForo is a new generation of forum plugins. It's full-fledged forum solution for your community. Comes with multiple modern forum layouts.
6
  * Author: gVectors Team (A. Chakhoyan, R. Hovhannisyan)
7
  * Author URI: https://gvectors.com/
8
- * Version: 1.4.1
9
  * Text Domain: wpforo
10
  * Domain Path: /wpf-languages
11
  */
12
 
13
  //Exit if accessed directly
14
  if( !defined( 'ABSPATH' ) ) exit;
15
- if( !defined( 'WPFORO_VERSION' ) ) define('WPFORO_VERSION', '1.4.1');
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' );
@@ -104,7 +104,7 @@ if( !class_exists( 'wpForo' ) ) {
104
  'user-register-email-confirm' => 0,
105
  'register-url' => 0,
106
  'login-url' => 0,
107
- 'resetpass-url' => 1,
108
  'replace-avatar' => 1,
109
  'avatars' => 1,
110
  'custom-avatars' => 1,
@@ -205,6 +205,10 @@ if( !class_exists( 'wpForo' ) ) {
205
  $delta = $users - $profiles;
206
  if( $users > 100 && $delta > 2 ){ add_action( 'admin_notices', 'wpforo_profile_notice' ); }
207
  }
 
 
 
 
208
  register_deactivation_hook($this->basename, 'do_wpforo_deactivation');
209
  }
210
  }
@@ -357,6 +361,8 @@ if( !class_exists( 'wpForo' ) ) {
357
  if( !isset($current_object['template']) || !$current_object['template'] ) {
358
  if(in_array('members', $wpf_url_parse) && $wpf_url_parse[0] == 'members'){
359
  $current_object['template'] = 'members';
 
 
360
  }elseif(in_array('profile', $wpf_url_parse)){
361
  $current_object['template'] = 'profile';
362
  foreach($wpf_url_parse as $value){
1
  <?php
2
  /*
3
+ * Plugin Name: Forums - wpForo
4
  * Plugin URI: https://wpforo.com
5
  * Description: Forums wpForo is a new generation of forum plugins. It's full-fledged forum solution for your community. Comes with multiple modern forum layouts.
6
  * Author: gVectors Team (A. Chakhoyan, R. Hovhannisyan)
7
  * Author URI: https://gvectors.com/
8
+ * Version: 1.4.2
9
  * Text Domain: wpforo
10
  * Domain Path: /wpf-languages
11
  */
12
 
13
  //Exit if accessed directly
14
  if( !defined( 'ABSPATH' ) ) exit;
15
+ if( !defined( 'WPFORO_VERSION' ) ) define('WPFORO_VERSION', '1.4.2');
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' );
104
  'user-register-email-confirm' => 0,
105
  'register-url' => 0,
106
  'login-url' => 0,
107
+ 'resetpass-url' => 0, //In most cases incompatible with security and antispam plugins
108
  'replace-avatar' => 1,
109
  'avatars' => 1,
110
  'custom-avatars' => 1,
205
  $delta = $users - $profiles;
206
  if( $users > 100 && $delta > 2 ){ add_action( 'admin_notices', 'wpforo_profile_notice' ); }
207
  }
208
+ $db_version = get_option('wpforo_version_db');
209
+ if( !$db_version || version_compare( $db_version, WPFORO_VERSION, '<') ){
210
+ add_action( 'admin_notices', 'wpforo_update_db_notice' );
211
+ }
212
  register_deactivation_hook($this->basename, 'do_wpforo_deactivation');
213
  }
214
  }
361
  if( !isset($current_object['template']) || !$current_object['template'] ) {
362
  if(in_array('members', $wpf_url_parse) && $wpf_url_parse[0] == 'members'){
363
  $current_object['template'] = 'members';
364
+ }elseif(in_array('recent', $wpf_url_parse) && $wpf_url_parse[0] == 'recent'){
365
+ $current_object['template'] = 'recent';
366
  }elseif(in_array('profile', $wpf_url_parse)){
367
  $current_object['template'] = 'profile';
368
  foreach($wpf_url_parse as $value){