Version Description
Download this release
Release Info
Developer | Tomdever |
Plugin | wpForo Forum |
Version | 1.4.7 |
Comparing to | |
See all releases |
Code changes from version 1.4.6 to 1.4.7
- readme.txt +19 -2
- wpf-admin/forum.php +7 -7
- wpf-admin/usergroup.php +3 -3
- wpf-admin/xml/english.xml +1 -0
- wpf-assets/js/ajax.js +1 -1
- wpf-includes/class-forums.php +22 -2
- wpf-includes/class-members.php +2 -2
- wpf-includes/class-moderation.php +1 -1
- wpf-includes/class-phrases.php +1 -1
- wpf-includes/class-posts.php +5 -5
- wpf-includes/class-topics.php +19 -12
- wpf-includes/functions-installation.php +6 -0
- wpf-includes/functions-integration.php +20 -5
- wpf-includes/functions-template.php +15 -1
- wpf-includes/functions.php +2 -0
- wpf-includes/install-sql.php +3 -4
- wpf-includes/wpf-actions.php +17 -6
- wpf-includes/wpf-hooks.php +7 -3
- wpf-includes/wpf-phrases.php +1 -0
- wpf-languages/wpforo.pot +34 -30
- wpf-themes/classic/layouts/1/post.php +1 -1
- wpf-themes/classic/layouts/1/topic.php +1 -1
- wpf-themes/classic/layouts/2/post.php +1 -1
- wpf-themes/classic/layouts/3/post.php +2 -1
- wpf-themes/classic/recent.php +1 -1
- wpf-themes/classic/style-rtl.css +5 -1
- wpf-themes/classic/style.css +6 -3
- wpforo.php +5 -5
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: gVectors Team
|
|
3 |
Tags: forum, forums, forum plugin, WordPress forum plugin, community, discussion
|
4 |
Requires at least: 4.1
|
5 |
Tested up to: 4.9
|
6 |
-
Stable tag: 1.4.
|
7 |
Requires PHP: 5.4 and higher
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
@@ -144,12 +144,29 @@ Find wpForo forum plugin addons on [gVectors Team website...](https://gvectors.c
|
|
144 |
|
145 |
== Changelog ==
|
146 |
|
147 |
-
= wpForo Forum 1.4.6 |
|
148 |
|
|
|
149 |
[wpForo v1.4.6 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-4-6-is-released/)
|
150 |
|
151 |
IMPORTANT: wpForo Font Awesome lib is updated to version 5. If your theme doesn't have v5 and you've disabled wpForo Font Awesome lib, please enable it back in Settings > Features admin page. If you've changed forum icons, member fields and reputation icons, please edit and insert new values using [Font Awesome 5](https://fontawesome.com/icons?d=gallery&m=free) new classes.
|
152 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
153 |
* Added: Font Awesome 5
|
154 |
* Added: Moderation Tools
|
155 |
- Move Topic
|
3 |
Tags: forum, forums, forum plugin, WordPress forum plugin, community, discussion
|
4 |
Requires at least: 4.1
|
5 |
Tested up to: 4.9
|
6 |
+
Stable tag: 1.4.7
|
7 |
Requires PHP: 5.4 and higher
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
144 |
|
145 |
== Changelog ==
|
146 |
|
147 |
+
= wpForo Forum 1.4.6 / 1.4.7 | 09.03.2018 =
|
148 |
|
149 |
+
[wpForo v1.4.7 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-4-7-is-released/)
|
150 |
[wpForo v1.4.6 Release Summary](https://wpforo.com/community/wpforo-announcements/wpforo-1-4-6-is-released/)
|
151 |
|
152 |
IMPORTANT: wpForo Font Awesome lib is updated to version 5. If your theme doesn't have v5 and you've disabled wpForo Font Awesome lib, please enable it back in Settings > Features admin page. If you've changed forum icons, member fields and reputation icons, please edit and insert new values using [Font Awesome 5](https://fontawesome.com/icons?d=gallery&m=free) new classes.
|
153 |
|
154 |
+
* wpForo Forum v1.4.7
|
155 |
+
* Changed: Loading icon on first click of Topic Tool button
|
156 |
+
* Changed: Disable comment button for wpForo activity in BuddyPress
|
157 |
+
* Changed: Don't post an activity from Private Forums in BuddyPress
|
158 |
+
* Changed: Display forum slug field (don't hide in screen options)
|
159 |
+
* Changed: Don't allow set Guest and Admin usergroups as Default
|
160 |
+
* Fixed Bug: Topic Tools only work on first page
|
161 |
+
* Fixed Bug: Sync forum profile avatar with blog comments avatar
|
162 |
+
* Fixed Bug: Missing reply icon and incorrect topic icons
|
163 |
+
* Fixed Bug: Update topics order by moved, split, merged replies date
|
164 |
+
* Fixed Bug: Last post information from private forum in forum stat
|
165 |
+
* Fixed Bug: Wrong order of posts in Profile Activity
|
166 |
+
* Fixed Bug: Wrong order of last posts in Extended Layout Topic
|
167 |
+
* Fixed Bug: Password reset URL problem with Usernames with space
|
168 |
+
* ----------
|
169 |
+
* wpForo Forum v1.4.6
|
170 |
* Added: Font Awesome 5
|
171 |
* Added: Moderation Tools
|
172 |
- Move Topic
|
wpf-admin/forum.php
CHANGED
@@ -14,7 +14,7 @@
|
|
14 |
<div class="metabox-prefs">
|
15 |
<label for="forum_cat-hide"><input class="hide-postbox-tog" name="forum_cat-hide" type="checkbox" id="forum_cat-hide" value="forum_cat" checked="checked"><?php _e('Forum Options', 'wpforo'); ?></label>
|
16 |
<label for="forum_permissions-hide"><input class="hide-postbox-tog" name="forum_permissions-hide" type="checkbox" id="forum_permissions-hide" value="forum_permissions" checked="checked"><?php _e('Permissions', 'wpforo'); ?></label>
|
17 |
-
<label for="forum_slug-hide"><input class="hide-postbox-tog" name="forum_slug-hide" type="checkbox" id="forum_slug-hide" value="forum_slug"><?php _e('Slug', 'wpforo'); ?></label>
|
18 |
<label for="forum_meta-hide"><input class="hide-postbox-tog" name="forum_meta-hide" type="checkbox" id="forum_meta-hide" value="forum_meta" checked="checked"><?php _e('Forum Meta', 'wpforo'); ?></label>
|
19 |
<br class="clear">
|
20 |
</div>
|
@@ -124,7 +124,7 @@
|
|
124 |
<div id="side-sortables" class="meta-box-sortables ui-sortable">
|
125 |
|
126 |
|
127 |
-
<div id="forum_cat" class="postbox"
|
128 |
<div class="handlediv" title="Click to toggle"><br></div>
|
129 |
<h3 class="hndle"><span><?php _e('Forum Options', 'wpforo'); ?></span></h3>
|
130 |
<div class="inside">
|
@@ -154,7 +154,7 @@
|
|
154 |
</div>
|
155 |
</div>
|
156 |
|
157 |
-
<div id="submitdiv" class="postbox"
|
158 |
<div class="handlediv" title="Click to toggle"><br></div>
|
159 |
<h3 class="hndle"><span><?php _e('Publish', 'wpforo'); ?></span></h3>
|
160 |
<div class="inside">
|
@@ -170,7 +170,7 @@
|
|
170 |
</div>
|
171 |
|
172 |
|
173 |
-
<div id="forum_permissions" class="postbox"
|
174 |
<div class="handlediv" title="Click to toggle"><br></div>
|
175 |
<h3 class="hndle"><span>Forum Permissions</span></h3>
|
176 |
<div class="inside">
|
@@ -186,7 +186,7 @@
|
|
186 |
<div id="postbox-container-2" class="postbox-container">
|
187 |
<div id="normal-sortables" class="meta-box-sortables ui-sortable">
|
188 |
|
189 |
-
<div id="forum_slug" class="postbox
|
190 |
<div class="handlediv" title="Click to toggle"><br></div>
|
191 |
<h3 class="hndle"><span><?php _e('Forum Slug', 'wpforo'); ?></span></h3>
|
192 |
<div class="inside">
|
@@ -195,7 +195,7 @@
|
|
195 |
</div>
|
196 |
</div>
|
197 |
|
198 |
-
<div id="forum_icon" class="postbox
|
199 |
<div class="handlediv" title="Click to toggle"><br></div>
|
200 |
<h3 class="hndle"><span><?php _e('Forum Icon', 'wpforo'); ?></span></h3>
|
201 |
<div class="inside" style="padding-top:10px;">
|
@@ -207,7 +207,7 @@
|
|
207 |
</div>
|
208 |
</div>
|
209 |
|
210 |
-
<div id="forum_meta" class="postbox
|
211 |
<div class="handlediv" title="Click to toggle"><br></div>
|
212 |
<h3 class="hndle"><span><?php _e('Forum SEO', 'wpforo'); ?></span></h3>
|
213 |
<div class="inside" style="padding-top:10px;">
|
14 |
<div class="metabox-prefs">
|
15 |
<label for="forum_cat-hide"><input class="hide-postbox-tog" name="forum_cat-hide" type="checkbox" id="forum_cat-hide" value="forum_cat" checked="checked"><?php _e('Forum Options', 'wpforo'); ?></label>
|
16 |
<label for="forum_permissions-hide"><input class="hide-postbox-tog" name="forum_permissions-hide" type="checkbox" id="forum_permissions-hide" value="forum_permissions" checked="checked"><?php _e('Permissions', 'wpforo'); ?></label>
|
17 |
+
<label for="forum_slug-hide"><input class="hide-postbox-tog" name="forum_slug-hide" type="checkbox" id="forum_slug-hide" value="forum_slug" checked="checked"><?php _e('Slug', 'wpforo'); ?></label>
|
18 |
<label for="forum_meta-hide"><input class="hide-postbox-tog" name="forum_meta-hide" type="checkbox" id="forum_meta-hide" value="forum_meta" checked="checked"><?php _e('Forum Meta', 'wpforo'); ?></label>
|
19 |
<br class="clear">
|
20 |
</div>
|
124 |
<div id="side-sortables" class="meta-box-sortables ui-sortable">
|
125 |
|
126 |
|
127 |
+
<div id="forum_cat" class="postbox">
|
128 |
<div class="handlediv" title="Click to toggle"><br></div>
|
129 |
<h3 class="hndle"><span><?php _e('Forum Options', 'wpforo'); ?></span></h3>
|
130 |
<div class="inside">
|
154 |
</div>
|
155 |
</div>
|
156 |
|
157 |
+
<div id="submitdiv" class="postbox">
|
158 |
<div class="handlediv" title="Click to toggle"><br></div>
|
159 |
<h3 class="hndle"><span><?php _e('Publish', 'wpforo'); ?></span></h3>
|
160 |
<div class="inside">
|
170 |
</div>
|
171 |
|
172 |
|
173 |
+
<div id="forum_permissions" class="postbox">
|
174 |
<div class="handlediv" title="Click to toggle"><br></div>
|
175 |
<h3 class="hndle"><span>Forum Permissions</span></h3>
|
176 |
<div class="inside">
|
186 |
<div id="postbox-container-2" class="postbox-container">
|
187 |
<div id="normal-sortables" class="meta-box-sortables ui-sortable">
|
188 |
|
189 |
+
<div id="forum_slug" class="postbox">
|
190 |
<div class="handlediv" title="Click to toggle"><br></div>
|
191 |
<h3 class="hndle"><span><?php _e('Forum Slug', 'wpforo'); ?></span></h3>
|
192 |
<div class="inside">
|
195 |
</div>
|
196 |
</div>
|
197 |
|
198 |
+
<div id="forum_icon" class="postbox">
|
199 |
<div class="handlediv" title="Click to toggle"><br></div>
|
200 |
<h3 class="hndle"><span><?php _e('Forum Icon', 'wpforo'); ?></span></h3>
|
201 |
<div class="inside" style="padding-top:10px;">
|
207 |
</div>
|
208 |
</div>
|
209 |
|
210 |
+
<div id="forum_meta" class="postbox">
|
211 |
<div class="handlediv" title="Click to toggle"><br></div>
|
212 |
<h3 class="hndle"><span><?php _e('Forum SEO', 'wpforo'); ?></span></h3>
|
213 |
<div class="inside" style="padding-top:10px;">
|
wpf-admin/usergroup.php
CHANGED
@@ -51,9 +51,9 @@
|
|
51 |
</td>
|
52 |
<td class="column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; padding-left:20px; background:<?php echo esc_html($bgcolor) ?>;">
|
53 |
<strong style="color: #00a636">
|
54 |
-
<?php if( $ugroup['groupid'] == WPF()->usergroup->default_groupid ) :
|
55 |
-
|
56 |
-
|
57 |
<a class="row-title" href="<?php echo admin_url('admin.php?page=wpforo-usergroups&default=' . intval($ugroup['groupid'])) ?>" title="<?php _e('DO NOT set this option on higher level user groups !!!', 'wpforo') ?>"><?php _e('Set as Default', 'wpforo') ?></a>
|
58 |
<?php endif ?>
|
59 |
</strong>
|
51 |
</td>
|
52 |
<td class="column-title" style="border-bottom:1px dotted #CCCCCC; vertical-align:middle; padding-left:20px; background:<?php echo esc_html($bgcolor) ?>;">
|
53 |
<strong style="color: #00a636">
|
54 |
+
<?php if( $ugroup['groupid'] == WPF()->usergroup->default_groupid ) : _e( 'is Default', 'wpforo' ); ?>
|
55 |
+
<?php elseif( $ugroup['groupid'] == 4 || $ugroup['groupid'] == 1) : ?>
|
56 |
+
<?php else : ?>
|
57 |
<a class="row-title" href="<?php echo admin_url('admin.php?page=wpforo-usergroups&default=' . intval($ugroup['groupid'])) ?>" title="<?php _e('DO NOT set this option on higher level user groups !!!', 'wpforo') ?>"><?php _e('Set as Default', 'wpforo') ?></a>
|
58 |
<?php endif ?>
|
59 |
</strong>
|
wpf-admin/xml/english.xml
CHANGED
@@ -426,6 +426,7 @@
|
|
426 |
<phrase name="Forum post like"><![CDATA[Forum post like]]></phrase>
|
427 |
<phrase name="Tools"><![CDATA[Tools]]></phrase>
|
428 |
<phrase name="Target Topic URL"><![CDATA[Target Topic URL]]></phrase>
|
|
|
429 |
<phrase name="Merge Topics"><![CDATA[Merge Topics]]></phrase>
|
430 |
<phrase name="Split Topic"><![CDATA[Split Topic]]></phrase>
|
431 |
<phrase name="Please copy the target topic URL from browser address bar and paste in the field below."><![CDATA[Please copy the target topic URL from browser address bar and paste in the field below.]]></phrase>
|
426 |
<phrase name="Forum post like"><![CDATA[Forum post like]]></phrase>
|
427 |
<phrase name="Tools"><![CDATA[Tools]]></phrase>
|
428 |
<phrase name="Target Topic URL"><![CDATA[Target Topic URL]]></phrase>
|
429 |
+
<phrase name="Target Topic not found"><![CDATA[Target Topic not found]]></phrase>
|
430 |
<phrase name="Merge Topics"><![CDATA[Merge Topics]]></phrase>
|
431 |
<phrase name="Split Topic"><![CDATA[Split Topic]]></phrase>
|
432 |
<phrase name="Please copy the target topic URL from browser address bar and paste in the field below."><![CDATA[Please copy the target topic URL from browser address bar and paste in the field below.]]></phrase>
|
wpf-assets/js/ajax.js
CHANGED
@@ -763,7 +763,7 @@ jQuery(document).ready(function ($) {
|
|
763 |
if( tools.is(':visible') ){
|
764 |
tools.slideUp(250, 'linear');
|
765 |
}else{
|
766 |
-
$("#wpf-msg-box").hide();
|
767 |
tools.find('.wpf-tool-tabs .wpf-tool-tab').removeClass('wpf-tt-active');
|
768 |
tools.find('.wpf-tool-tabs .wpf-tool-tab:first-child').addClass('wpf-tt-active');
|
769 |
wpforo_topic_tools_tab_load();
|
763 |
if( tools.is(':visible') ){
|
764 |
tools.slideUp(250, 'linear');
|
765 |
}else{
|
766 |
+
$("#wpf-msg-box").hide(); $('#wpforo-load').visible();
|
767 |
tools.find('.wpf-tool-tabs .wpf-tool-tab').removeClass('wpf-tt-active');
|
768 |
tools.find('.wpf-tool-tabs .wpf-tool-tab:first-child').addClass('wpf-tt-active');
|
769 |
wpforo_topic_tools_tab_load();
|
wpf-includes/class-forums.php
CHANGED
@@ -150,7 +150,7 @@ class wpForoForum{
|
|
150 |
){
|
151 |
$forumid = WPF()->db->insert_id;
|
152 |
$this->delete_tree_cache();
|
153 |
-
wpforo_clean_cache(
|
154 |
WPF()->notice->add('Your forum successfully added', 'success');
|
155 |
return $forumid;
|
156 |
}
|
@@ -237,7 +237,7 @@ class wpForoForum{
|
|
237 |
WPF()->db->query($sql);
|
238 |
}
|
239 |
$this->delete_tree_cache();
|
240 |
-
wpforo_clean_cache(
|
241 |
WPF()->notice->add('Forum successfully updated', 'success');
|
242 |
return $forumid;
|
243 |
}
|
@@ -949,4 +949,24 @@ class wpForoForum{
|
|
949 |
}
|
950 |
}
|
951 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
952 |
}
|
150 |
){
|
151 |
$forumid = WPF()->db->insert_id;
|
152 |
$this->delete_tree_cache();
|
153 |
+
wpforo_clean_cache();
|
154 |
WPF()->notice->add('Your forum successfully added', 'success');
|
155 |
return $forumid;
|
156 |
}
|
237 |
WPF()->db->query($sql);
|
238 |
}
|
239 |
$this->delete_tree_cache();
|
240 |
+
wpforo_clean_cache();
|
241 |
WPF()->notice->add('Forum successfully updated', 'success');
|
242 |
return $forumid;
|
243 |
}
|
949 |
}
|
950 |
}
|
951 |
|
952 |
+
function private_forum( $forumid, $usergroups = array() ){
|
953 |
+
if( $forumid ){
|
954 |
+
if( empty($usergroups) ) {
|
955 |
+
$groupid = WPF()->current_user_groupid;
|
956 |
+
$usergroups = array( $groupid );
|
957 |
+
}
|
958 |
+
elseif( is_numeric($usergroups) ){
|
959 |
+
$usergroups = array( $usergroups );
|
960 |
+
}
|
961 |
+
if( !empty($usergroups) && is_array($usergroups) ){
|
962 |
+
foreach( $usergroups as $usergroup ){
|
963 |
+
if( !WPF()->perm->forum_can('vf', $forumid, $usergroup) ){
|
964 |
+
return true;
|
965 |
+
}
|
966 |
+
}
|
967 |
+
}
|
968 |
+
}
|
969 |
+
return false;
|
970 |
+
}
|
971 |
+
|
972 |
}
|
wpf-includes/class-members.php
CHANGED
@@ -526,7 +526,7 @@ class wpForoMember{
|
|
526 |
$insert_timezone = (isset($_POST['wpforo_usertimezone'])) ? sanitize_text_field($_POST['wpforo_usertimezone']) : '';
|
527 |
$about = get_user_meta( $userid, 'description', true );
|
528 |
return $this->add_profile(
|
529 |
-
array( 'userid' =>
|
530 |
'username' => sanitize_user($user->user_login),
|
531 |
'groupid' => intval($insert_groupid),
|
532 |
'site' => esc_url($user->user_url),
|
@@ -1402,7 +1402,7 @@ class wpForoMember{
|
|
1402 |
}
|
1403 |
|
1404 |
if( $args['email'] ){
|
1405 |
-
$post_args = array( 'email' => $args['email'], 'orderby' => 'created
|
1406 |
$posts = WPF()->post->get_posts( $post_args );
|
1407 |
if( !empty($posts) ){
|
1408 |
$args['posts'] = count($posts);
|
526 |
$insert_timezone = (isset($_POST['wpforo_usertimezone'])) ? sanitize_text_field($_POST['wpforo_usertimezone']) : '';
|
527 |
$about = get_user_meta( $userid, 'description', true );
|
528 |
return $this->add_profile(
|
529 |
+
array( 'userid' => wpforo_bigintval($userid),
|
530 |
'username' => sanitize_user($user->user_login),
|
531 |
'groupid' => intval($insert_groupid),
|
532 |
'site' => esc_url($user->user_url),
|
1402 |
}
|
1403 |
|
1404 |
if( $args['email'] ){
|
1405 |
+
$post_args = array( 'email' => $args['email'], 'orderby' => '`created` ASC, `postid` ASC' );
|
1406 |
$posts = WPF()->post->get_posts( $post_args );
|
1407 |
if( !empty($posts) ){
|
1408 |
$args['posts'] = count($posts);
|
wpf-includes/class-moderation.php
CHANGED
@@ -56,7 +56,7 @@ class wpForoModeration
|
|
56 |
if (isset($_GET['filter_by_userid']) && wpforo_bigintval($_GET['filter_by_userid'])) $args['userid'] = wpforo_bigintval($_GET['filter_by_userid']);
|
57 |
$filter_by_status = intval((isset($_GET['filter_by_status']) ? $_GET['filter_by_status'] : 1));
|
58 |
$args['status'] = $filter_by_status;
|
59 |
-
if( !isset($_GET['order']) ) $args['
|
60 |
$posts = WPF()->post->get_posts($args, $items_count);
|
61 |
return $posts;
|
62 |
}
|
56 |
if (isset($_GET['filter_by_userid']) && wpforo_bigintval($_GET['filter_by_userid'])) $args['userid'] = wpforo_bigintval($_GET['filter_by_userid']);
|
57 |
$filter_by_status = intval((isset($_GET['filter_by_status']) ? $_GET['filter_by_status'] : 1));
|
58 |
$args['status'] = $filter_by_status;
|
59 |
+
if( !isset($_GET['order']) ) $args['orderby'] = '`created` DESC, `postid` DESC';
|
60 |
$posts = WPF()->post->get_posts($args, $items_count);
|
61 |
return $posts;
|
62 |
}
|
wpf-includes/class-phrases.php
CHANGED
@@ -138,7 +138,7 @@ class wpForoPhrase{
|
|
138 |
|
139 |
public function xml_import($xmlfile, $type = 'import'){
|
140 |
$file = WPFORO_DIR . '/wpf-admin/xml/' . $xmlfile;
|
141 |
-
if( file_exists( $file ) ) {
|
142 |
$xr = xml_parser_create();
|
143 |
$fp = fopen($file, "r");
|
144 |
$xml = fread($fp, filesize($file));
|
138 |
|
139 |
public function xml_import($xmlfile, $type = 'import'){
|
140 |
$file = WPFORO_DIR . '/wpf-admin/xml/' . $xmlfile;
|
141 |
+
if( file_exists( $file ) && function_exists('xml_parser_create') ) {
|
142 |
$xr = xml_parser_create();
|
143 |
$fp = fopen($file, "r");
|
144 |
$xml = fread($fp, filesize($file));
|
wpf-includes/class-posts.php
CHANGED
@@ -299,7 +299,7 @@ class wpForoPost{
|
|
299 |
|
300 |
//Delete post
|
301 |
if( WPF()->db->delete(WPF()->db->prefix . 'wpforo_posts', array( 'postid' => intval($postid) ), array( '%d' )) ){
|
302 |
-
$last_post = $this->get_posts( array('topicid' => intval($post['topicid']), 'orderby' => '
|
303 |
if(is_array($last_post) && !empty($last_post)){
|
304 |
$last_post = $last_post[0];
|
305 |
}else{
|
@@ -781,7 +781,7 @@ class wpForoPost{
|
|
781 |
$position = array();
|
782 |
|
783 |
if( isset($arg) && !is_array($arg) ){
|
784 |
-
$postid =
|
785 |
$post = $this->get_post($postid);
|
786 |
}
|
787 |
elseif( !empty($arg) && isset($arg['postid']) ){
|
@@ -792,15 +792,15 @@ class wpForoPost{
|
|
792 |
if( is_array($post) && !empty($post) && $postid ){
|
793 |
$url = $this->get_forumslug_byid($postid) . '/' . $this->get_topicslug_byid($postid);
|
794 |
if( $post['topicid'] ){
|
795 |
-
if( !$position ) $position = WPF()->db->get_var("SELECT COUNT(`postid`) FROM `".WPF()->db->prefix."wpforo_posts` WHERE `topicid` = ".
|
796 |
-
if( $position <= WPF()->post->options['posts_per_page'] ) return wpforo_home_url($url, false, $absolute ) . "#post-" .
|
797 |
if( $position && WPF()->post->options['posts_per_page'] ) {
|
798 |
$paged = ceil($position / WPF()->post->options['posts_per_page']);
|
799 |
}
|
800 |
else{
|
801 |
$paged = 1;
|
802 |
}
|
803 |
-
return wpforo_home_url( $url . "/paged/" . $paged, false, $absolute ) ."#post-" .
|
804 |
}
|
805 |
}
|
806 |
|
299 |
|
300 |
//Delete post
|
301 |
if( WPF()->db->delete(WPF()->db->prefix . 'wpforo_posts', array( 'postid' => intval($postid) ), array( '%d' )) ){
|
302 |
+
$last_post = $this->get_posts( array('topicid' => intval($post['topicid']), 'orderby' => '`created` DESC, `postid` DESC', 'row_count' => 1, 'status' => 0, 'private' => 0) );
|
303 |
if(is_array($last_post) && !empty($last_post)){
|
304 |
$last_post = $last_post[0];
|
305 |
}else{
|
781 |
$position = array();
|
782 |
|
783 |
if( isset($arg) && !is_array($arg) ){
|
784 |
+
$postid = wpforo_bigintval($arg);
|
785 |
$post = $this->get_post($postid);
|
786 |
}
|
787 |
elseif( !empty($arg) && isset($arg['postid']) ){
|
792 |
if( is_array($post) && !empty($post) && $postid ){
|
793 |
$url = $this->get_forumslug_byid($postid) . '/' . $this->get_topicslug_byid($postid);
|
794 |
if( $post['topicid'] ){
|
795 |
+
if( !$position ) $position = WPF()->db->get_var("SELECT COUNT(`postid`) FROM `".WPF()->db->prefix."wpforo_posts` WHERE `topicid` = ".wpforo_bigintval($post['topicid'])." AND `postid` <= " . ( $post['parentid'] && WPF()->forum->get_layout($post['forumid']) == 3 ? wpforo_bigintval($post['parentid']) : wpforo_bigintval($postid) ) );
|
796 |
+
if( $position <= WPF()->post->options['posts_per_page'] ) return wpforo_home_url($url, false, $absolute ) . "#post-" . wpforo_bigintval($postid);
|
797 |
if( $position && WPF()->post->options['posts_per_page'] ) {
|
798 |
$paged = ceil($position / WPF()->post->options['posts_per_page']);
|
799 |
}
|
800 |
else{
|
801 |
$paged = 1;
|
802 |
}
|
803 |
+
return wpforo_home_url( $url . "/paged/" . $paged, false, $absolute ) ."#post-" . wpforo_bigintval($postid);
|
804 |
}
|
805 |
}
|
806 |
|
wpf-includes/class-topics.php
CHANGED
@@ -581,7 +581,8 @@ class wpForoTopic{
|
|
581 |
'order' => 'DESC', // ASC DESC
|
582 |
'offset' => NULL, // this use when you give row_count
|
583 |
'row_count' => NULL, // 4 or 1 ...
|
584 |
-
'
|
|
|
585 |
);
|
586 |
|
587 |
$args = wpforo_parse_args( $args, $default );
|
@@ -611,13 +612,13 @@ class wpForoTopic{
|
|
611 |
if(!is_user_logged_in()) $guest = WPF()->member->get_guest_cookies();
|
612 |
|
613 |
if(empty($forumids)){
|
614 |
-
if( isset($forumid) && !WPF()->perm->forum_can('vf', $forumid) ){
|
615 |
return array();
|
616 |
}
|
617 |
}
|
618 |
|
619 |
if( isset($forumid) && $forumid ){
|
620 |
-
if( WPF()->perm->forum_can('vp', $forumid) ){
|
621 |
if(!is_null($private)) $wheres[] = " `private` = " . intval($private);
|
622 |
}
|
623 |
elseif( isset(WPF()->current_userid) && WPF()->current_userid ){
|
@@ -630,9 +631,12 @@ class wpForoTopic{
|
|
630 |
$wheres[] = " `private` = 0";
|
631 |
}
|
632 |
}
|
|
|
|
|
|
|
633 |
|
634 |
if( isset($forumid) && $forumid ){
|
635 |
-
if( WPF()->perm->forum_can('au', $forumid) ){
|
636 |
if(!is_null($status)) $wheres[] = " `status` = " . intval($status);
|
637 |
}
|
638 |
elseif( isset(WPF()->current_userid) && WPF()->current_userid ){
|
@@ -645,6 +649,9 @@ class wpForoTopic{
|
|
645 |
$wheres[] = " `status` = 0";
|
646 |
}
|
647 |
}
|
|
|
|
|
|
|
648 |
|
649 |
if( function_exists('WPF_POLL') ){
|
650 |
if( !is_null($pollid) ) $wheres[] = " `pollid` <> 0";
|
@@ -675,16 +682,16 @@ class wpForoTopic{
|
|
675 |
|
676 |
if(!empty($forumids) || !$forumid){
|
677 |
foreach($topics as $key => $topic){
|
678 |
-
if( !WPF()->perm->forum_can('vf', $topic['forumid']) ){
|
679 |
unset($topics[$key]);
|
680 |
}
|
681 |
if( isset($topics[$key]) && isset($topic['private']) && $topic['private'] && !wpforo_is_owner($topic['userid'], $topic['email']) ){
|
682 |
-
if( !WPF()->perm->forum_can('vp', $topic['forumid']) ){
|
683 |
unset($topics[$key]);
|
684 |
}
|
685 |
}
|
686 |
if( isset($topics[$key]) && isset($topic['status']) && $topic['status'] && !wpforo_is_owner($topic['userid'], $topic['email']) ){
|
687 |
-
if( !WPF()->perm->forum_can('au', $topic['forumid']) ){
|
688 |
unset($topics[$key]);
|
689 |
}
|
690 |
}
|
@@ -1147,17 +1154,17 @@ class wpForoTopic{
|
|
1147 |
$first_postid = 0;
|
1148 |
}
|
1149 |
|
1150 |
-
$sql = "SELECT `postid` FROM `". WPF()->db->prefix ."wpforo_posts` WHERE `topicid` = %d ORDER BY `is_first_post` ASC, `created` DESC, `postid` DESC LIMIT 1";
|
1151 |
-
if( !$last_post = WPF()->db->
|
1152 |
|
1153 |
if( false !== WPF()->db->update(
|
1154 |
WPF()->db->prefix . "wpforo_topics",
|
1155 |
-
array('first_postid' => $first_postid, 'last_post' => $last_post),
|
1156 |
array('topicid' => $topic['topicid']),
|
1157 |
-
array('%d','%d'),
|
1158 |
array('%d')
|
1159 |
) ) {
|
1160 |
-
wpforo_clean_cache('
|
1161 |
return true;
|
1162 |
}
|
1163 |
return false;
|
581 |
'order' => 'DESC', // ASC DESC
|
582 |
'offset' => NULL, // this use when you give row_count
|
583 |
'row_count' => NULL, // 4 or 1 ...
|
584 |
+
'permgroup' => NULL, //Тreat permissions based on attribute value not on current user usergroup
|
585 |
+
'where' => NULL,
|
586 |
);
|
587 |
|
588 |
$args = wpforo_parse_args( $args, $default );
|
612 |
if(!is_user_logged_in()) $guest = WPF()->member->get_guest_cookies();
|
613 |
|
614 |
if(empty($forumids)){
|
615 |
+
if( isset($forumid) && !WPF()->perm->forum_can('vf', $forumid, $permgroup) ){
|
616 |
return array();
|
617 |
}
|
618 |
}
|
619 |
|
620 |
if( isset($forumid) && $forumid ){
|
621 |
+
if( WPF()->perm->forum_can('vp', $forumid, $permgroup) ){
|
622 |
if(!is_null($private)) $wheres[] = " `private` = " . intval($private);
|
623 |
}
|
624 |
elseif( isset(WPF()->current_userid) && WPF()->current_userid ){
|
631 |
$wheres[] = " `private` = 0";
|
632 |
}
|
633 |
}
|
634 |
+
else{
|
635 |
+
if(!is_null($private)) $wheres[] = " `private` = " . intval($private);
|
636 |
+
}
|
637 |
|
638 |
if( isset($forumid) && $forumid ){
|
639 |
+
if( WPF()->perm->forum_can('au', $forumid, $permgroup) ){
|
640 |
if(!is_null($status)) $wheres[] = " `status` = " . intval($status);
|
641 |
}
|
642 |
elseif( isset(WPF()->current_userid) && WPF()->current_userid ){
|
649 |
$wheres[] = " `status` = 0";
|
650 |
}
|
651 |
}
|
652 |
+
else{
|
653 |
+
if(!is_null($status)) $wheres[] = " `status` = " . intval($status);
|
654 |
+
}
|
655 |
|
656 |
if( function_exists('WPF_POLL') ){
|
657 |
if( !is_null($pollid) ) $wheres[] = " `pollid` <> 0";
|
682 |
|
683 |
if(!empty($forumids) || !$forumid){
|
684 |
foreach($topics as $key => $topic){
|
685 |
+
if( !WPF()->perm->forum_can('vf', $topic['forumid'], $permgroup) ){
|
686 |
unset($topics[$key]);
|
687 |
}
|
688 |
if( isset($topics[$key]) && isset($topic['private']) && $topic['private'] && !wpforo_is_owner($topic['userid'], $topic['email']) ){
|
689 |
+
if( !WPF()->perm->forum_can('vp', $topic['forumid'], $permgroup) ){
|
690 |
unset($topics[$key]);
|
691 |
}
|
692 |
}
|
693 |
if( isset($topics[$key]) && isset($topic['status']) && $topic['status'] && !wpforo_is_owner($topic['userid'], $topic['email']) ){
|
694 |
+
if( !WPF()->perm->forum_can('au', $topic['forumid'], $permgroup) ){
|
695 |
unset($topics[$key]);
|
696 |
}
|
697 |
}
|
1154 |
$first_postid = 0;
|
1155 |
}
|
1156 |
|
1157 |
+
$sql = "SELECT `postid`, `created` FROM `". WPF()->db->prefix ."wpforo_posts` WHERE `topicid` = %d ORDER BY `is_first_post` ASC, `created` DESC, `postid` DESC LIMIT 1";
|
1158 |
+
if( !$last_post = WPF()->db->get_row( WPF()->db->prepare($sql, $topic['topicid']), ARRAY_A ) ) $last_post = array( 'postid' => 0, 'created' => $topic['modified']);
|
1159 |
|
1160 |
if( false !== WPF()->db->update(
|
1161 |
WPF()->db->prefix . "wpforo_topics",
|
1162 |
+
array('first_postid' => $first_postid, 'last_post' => $last_post['postid'], 'modified' => $last_post['created']),
|
1163 |
array('topicid' => $topic['topicid']),
|
1164 |
+
array('%d','%d','%s'),
|
1165 |
array('%d')
|
1166 |
) ) {
|
1167 |
+
wpforo_clean_cache('topic');
|
1168 |
return true;
|
1169 |
}
|
1170 |
return false;
|
wpf-includes/functions-installation.php
CHANGED
@@ -489,6 +489,12 @@ function wpforo_activation(){
|
|
489 |
if( !wpforo_db_check( $args ) ){
|
490 |
@$wpdb->query( "ALTER TABLE `" . $wpdb->prefix . "wpforo_profiles` ADD `online_time` INT UNSIGNED NOT NULL DEFAULT 0 AFTER `last_login`, ADD KEY (`online_time`)" );
|
491 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
492 |
#################################################################
|
493 |
// ADD `private` field in post TABLE ///////////////////////////
|
494 |
$args = array( 'table' => $wpdb->prefix . 'wpforo_posts', 'col' => 'private', 'check' => 'col_exists' );
|
489 |
if( !wpforo_db_check( $args ) ){
|
490 |
@$wpdb->query( "ALTER TABLE `" . $wpdb->prefix . "wpforo_profiles` ADD `online_time` INT UNSIGNED NOT NULL DEFAULT 0 AFTER `last_login`, ADD KEY (`online_time`)" );
|
491 |
}
|
492 |
+
#################################################################
|
493 |
+
// DROP uname unique key from profiles TABLE ///////////////////////////
|
494 |
+
$args = array( 'table' => $wpdb->prefix . 'wpforo_profiles', 'col' => 'UNIQUE USERNAME', 'check' => 'key_exists' );
|
495 |
+
if( wpforo_db_check( $args ) ){
|
496 |
+
@$wpdb->query( "ALTER TABLE `" . $wpdb->prefix . "wpforo_profiles` DROP KEY `UNIQUE USERNAME`" );
|
497 |
+
}
|
498 |
#################################################################
|
499 |
// ADD `private` field in post TABLE ///////////////////////////
|
500 |
$args = array( 'table' => $wpdb->prefix . 'wpforo_posts', 'col' => 'private', 'check' => 'col_exists' );
|
wpf-includes/functions-integration.php
CHANGED
@@ -84,7 +84,7 @@ function wpforo_bp_activity( $args = array() ){
|
|
84 |
$default = array( 'action' => '',
|
85 |
'title' => '',
|
86 |
'content' => '',
|
87 |
-
'component' => '
|
88 |
'type' => false,
|
89 |
'primary_link' => '',
|
90 |
'user_id' => '',
|
@@ -126,7 +126,7 @@ function wpforo_bp_activity_delete( $args = array() ){
|
|
126 |
$default = array( 'action' => '',
|
127 |
'title' => '',
|
128 |
'content' => '',
|
129 |
-
'component' => '
|
130 |
'type' => false,
|
131 |
'primary_link' => '',
|
132 |
'user_id' => '',
|
@@ -140,10 +140,25 @@ function wpforo_bp_activity_delete( $args = array() ){
|
|
140 |
}
|
141 |
}
|
142 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
143 |
//Register BuddyPress Activities
|
144 |
function wpforo_bp_register_activity_actions() {
|
145 |
-
bp_activity_set_action( '
|
146 |
-
bp_activity_set_action( '
|
147 |
-
bp_activity_set_action( '
|
148 |
}
|
149 |
add_action( 'bp_register_activity_actions', 'wpforo_bp_register_activity_actions' );
|
|
84 |
$default = array( 'action' => '',
|
85 |
'title' => '',
|
86 |
'content' => '',
|
87 |
+
'component' => 'WPForo',
|
88 |
'type' => false,
|
89 |
'primary_link' => '',
|
90 |
'user_id' => '',
|
126 |
$default = array( 'action' => '',
|
127 |
'title' => '',
|
128 |
'content' => '',
|
129 |
+
'component' => 'WPForo',
|
130 |
'type' => false,
|
131 |
'primary_link' => '',
|
132 |
'user_id' => '',
|
140 |
}
|
141 |
}
|
142 |
|
143 |
+
//Disable comment button for wpForo activity
|
144 |
+
function wpforo_bp_activity_disable_comment( $can_comment = true ){
|
145 |
+
if ( false === $can_comment ) return $can_comment;
|
146 |
+
if( function_exists('bp_get_activity_action_name') ){
|
147 |
+
$action_name = bp_get_activity_action_name();
|
148 |
+
$disabled_actions = array( 'wpforo_topic', 'wpforo_post', 'wpforo_like' );
|
149 |
+
$disabled_actions = apply_filters( 'wpforo_bp_activity_disable_comment', $disabled_actions );
|
150 |
+
if ( in_array( $action_name, $disabled_actions ) ) {
|
151 |
+
$can_comment = false;
|
152 |
+
}
|
153 |
+
}
|
154 |
+
return $can_comment;
|
155 |
+
}
|
156 |
+
|
157 |
//Register BuddyPress Activities
|
158 |
function wpforo_bp_register_activity_actions() {
|
159 |
+
bp_activity_set_action( 'WPForo', 'wpforo_topic', wpforo_phrase( 'Forum topic', false ), '', wpforo_phrase( 'Forum topic', false ), array( 'member' ));
|
160 |
+
bp_activity_set_action( 'WPForo', 'wpforo_post', wpforo_phrase( 'Forum post', false ), '', wpforo_phrase( 'Forum post', false ), array( 'member' ));
|
161 |
+
bp_activity_set_action( 'WPForo', 'wpforo_like', wpforo_phrase( 'Forum post like', false ), '', wpforo_phrase( 'Forum post like', false ), array( 'member' ));
|
162 |
}
|
163 |
add_action( 'bp_register_activity_actions', 'wpforo_bp_register_activity_actions' );
|
164 |
+
add_filter( 'bp_activity_can_comment', 'wpforo_bp_activity_disable_comment');
|
wpf-includes/functions-template.php
CHANGED
@@ -1319,7 +1319,7 @@ function wpforo_moderation_tools(){
|
|
1319 |
*/
|
1320 |
function wpforo_activity( $args = array() ){
|
1321 |
|
1322 |
-
$default = array( 'action' => '', 'title' => '', 'content' => '', 'component' => '
|
1323 |
$args = wpforo_parse_args( $args, $default );
|
1324 |
|
1325 |
//BuddyPress Member Activity
|
@@ -1344,6 +1344,13 @@ function wpforo_activity_content( $item = array() ){
|
|
1344 |
$args = array();
|
1345 |
if( empty($item) ) return false;
|
1346 |
if((isset($item['status']) && $item['status']) || (isset($item['private']) && $item['private'])) return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1347 |
if( isset($item['first_postid']) && $item['first_postid'] ) {
|
1348 |
$args['item_id'] = $item['first_postid'];
|
1349 |
}
|
@@ -1399,6 +1406,13 @@ function wpforo_activity_like( $item = array() ){
|
|
1399 |
$args = array();
|
1400 |
if( empty($item) ) return false;
|
1401 |
if((isset($item['status']) && $item['status']) || (isset($item['private']) && $item['private'])) return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1402 |
if( isset($item['postid']) && $item['postid'] ) $args['item_id'] = $item['postid'];
|
1403 |
$args['user_id'] = WPF()->current_userid;
|
1404 |
$member = wpforo_member( $args['user_id'] );
|
1319 |
*/
|
1320 |
function wpforo_activity( $args = array() ){
|
1321 |
|
1322 |
+
$default = array( 'action' => '', 'title' => '', 'content' => '', 'component' => 'WPForo', 'type' => '', 'primary_link' => '', 'user_id' => '', 'item_id'=> '', 'date_recorded' => '');
|
1323 |
$args = wpforo_parse_args( $args, $default );
|
1324 |
|
1325 |
//BuddyPress Member Activity
|
1344 |
$args = array();
|
1345 |
if( empty($item) ) return false;
|
1346 |
if((isset($item['status']) && $item['status']) || (isset($item['private']) && $item['private'])) return false;
|
1347 |
+
if( isset($item['forumid']) && $item['forumid'] ){
|
1348 |
+
$private_for_usergroups = array(3, 4, 5);
|
1349 |
+
$private_for_usergroups = apply_filters( 'wpforo_activity_private_for_usergroups', $private_for_usergroups );
|
1350 |
+
if( !empty($private_for_usergroups) && WPF()->forum->private_forum($item['forumid'], $private_for_usergroups) ){
|
1351 |
+
return false;
|
1352 |
+
}
|
1353 |
+
}
|
1354 |
if( isset($item['first_postid']) && $item['first_postid'] ) {
|
1355 |
$args['item_id'] = $item['first_postid'];
|
1356 |
}
|
1406 |
$args = array();
|
1407 |
if( empty($item) ) return false;
|
1408 |
if((isset($item['status']) && $item['status']) || (isset($item['private']) && $item['private'])) return false;
|
1409 |
+
if( isset($item['forumid']) && $item['forumid'] ){
|
1410 |
+
$private_for_usergroups = array(3, 4, 5);
|
1411 |
+
$private_for_usergroups = apply_filters( 'wpforo_activity_private_for_usergroups', $private_for_usergroups );
|
1412 |
+
if( !empty($private_for_usergroups) && WPF()->forum->private_forum($item['forumid'], $private_for_usergroups) ){
|
1413 |
+
return false;
|
1414 |
+
}
|
1415 |
+
}
|
1416 |
if( isset($item['postid']) && $item['postid'] ) $args['item_id'] = $item['postid'];
|
1417 |
$args['user_id'] = WPF()->current_userid;
|
1418 |
$member = wpforo_member( $args['user_id'] );
|
wpf-includes/functions.php
CHANGED
@@ -1626,6 +1626,8 @@ function wpforo_db_check( $args = array() ){
|
|
1626 |
$col = $wpdb->get_row("SHOW COLUMNS FROM `$table` LIKE '$col'", ARRAY_A);
|
1627 |
return $col['Type'];
|
1628 |
}
|
|
|
|
|
1629 |
}
|
1630 |
|
1631 |
function wpforo_is_owner( $userid, $email = '' ){
|
1626 |
$col = $wpdb->get_row("SHOW COLUMNS FROM `$table` LIKE '$col'", ARRAY_A);
|
1627 |
return $col['Type'];
|
1628 |
}
|
1629 |
+
|
1630 |
+
return false;
|
1631 |
}
|
1632 |
|
1633 |
function wpforo_is_owner( $userid, $email = '' ){
|
wpf-includes/install-sql.php
CHANGED
@@ -136,7 +136,6 @@
|
|
136 |
`timezone` VARCHAR(255),
|
137 |
PRIMARY KEY (`userid`),
|
138 |
UNIQUE KEY `UNIQUE ID` (`userid`),
|
139 |
-
UNIQUE KEY `UNIQUE USERNAME` (`username`(191)),
|
140 |
KEY `groupid` (`groupid`),
|
141 |
KEY `online_time` (`online_time`),
|
142 |
KEY `posts` (`posts`),
|
@@ -213,10 +212,10 @@
|
|
213 |
`confirmkey` varchar(32) NOT NULL,
|
214 |
`userid` BIGINT UNSIGNED NOT NULL,
|
215 |
`active` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
|
216 |
-
`user_name` VARCHAR(
|
217 |
-
`user_email` VARCHAR(
|
218 |
PRIMARY KEY (`subid`),
|
219 |
-
UNIQUE KEY `
|
220 |
UNIQUE KEY `confirmkey` (`confirmkey`),
|
221 |
KEY `itemid_2` (`itemid`),
|
222 |
KEY `userid` (`userid`)
|
136 |
`timezone` VARCHAR(255),
|
137 |
PRIMARY KEY (`userid`),
|
138 |
UNIQUE KEY `UNIQUE ID` (`userid`),
|
|
|
139 |
KEY `groupid` (`groupid`),
|
140 |
KEY `online_time` (`online_time`),
|
141 |
KEY `posts` (`posts`),
|
212 |
`confirmkey` varchar(32) NOT NULL,
|
213 |
`userid` BIGINT UNSIGNED NOT NULL,
|
214 |
`active` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
|
215 |
+
`user_name` VARCHAR(60) NOT NULL,
|
216 |
+
`user_email` VARCHAR(60) NOT NULL,
|
217 |
PRIMARY KEY (`subid`),
|
218 |
+
UNIQUE KEY `fld_group_unq` (`itemid`,`type`,`userid`,`user_email`(60)),
|
219 |
UNIQUE KEY `confirmkey` (`confirmkey`),
|
220 |
KEY `itemid_2` (`itemid`),
|
221 |
KEY `userid` (`userid`)
|
wpf-includes/wpf-actions.php
CHANGED
@@ -8,8 +8,11 @@ function wpforo_actions(){
|
|
8 |
if( isset($_POST['wpfreg']) && !empty($_POST['wpfreg']) && $userid = WPF()->member->create($_POST['wpfreg'])){
|
9 |
wpforo_verify_form('ref');
|
10 |
WPF()->member->reset($userid);
|
11 |
-
|
12 |
-
|
|
|
|
|
|
|
13 |
wp_redirect($redirect_url);
|
14 |
exit();
|
15 |
}
|
@@ -27,8 +30,11 @@ function wpforo_actions(){
|
|
27 |
}
|
28 |
$wpf_login_times++;
|
29 |
update_user_meta( $user->ID, '_wpf_login_times', $wpf_login_times );
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
32 |
wp_redirect($redirect_url);
|
33 |
exit();
|
34 |
}else{
|
@@ -147,6 +153,8 @@ function wpforo_actions(){
|
|
147 |
|
148 |
if( WPF()->topic->merge( WPF()->current_object['topic'], $target, array(), $to_target_title, $append ) )
|
149 |
$redirect_to = WPF()->topic->get_topic_url($target);
|
|
|
|
|
150 |
}
|
151 |
}
|
152 |
wp_redirect( $redirect_to );
|
@@ -177,6 +185,8 @@ function wpforo_actions(){
|
|
177 |
|
178 |
if( WPF()->topic->merge( WPF()->current_object['topic'], $target, $_POST['wpforo']['posts'], $to_target_title, $append ) )
|
179 |
$redirect_to = WPF()->topic->get_topic_url($target);
|
|
|
|
|
180 |
}
|
181 |
}
|
182 |
}
|
@@ -251,6 +261,7 @@ function wpforo_actions(){
|
|
251 |
WPF()->forum->rebuild_stats($forumid);
|
252 |
WPF()->db->query("DELETE FROM `" . WPF()->db->prefix . "options` WHERE `option_name` LIKE 'wpforo_stat%'" );
|
253 |
}
|
|
|
254 |
WPF()->notice->add('Updated Successfully!', 'success');
|
255 |
}
|
256 |
}
|
@@ -800,7 +811,7 @@ function wpforo_actions(){
|
|
800 |
|
801 |
if(isset($_GET['topic']) && $_GET['topic']){
|
802 |
if( $_GET['topic'] == 'g' ){
|
803 |
-
$posts = WPF()->post->get_posts( array( 'row_count' => $topic_rss_items, 'orderby' => 'created
|
804 |
$topic['title'] = '';
|
805 |
$topic['topicurl'] = '#';
|
806 |
}
|
@@ -808,7 +819,7 @@ function wpforo_actions(){
|
|
808 |
$topicid = intval($_GET['topic']);
|
809 |
$topic = wpforo_topic($topicid); //WPF()->topic->get_topic($topicid);
|
810 |
$topic['topicurl'] = ( $topic['url'] ) ? $topic['url'] : WPF()->topic->get_topic_url($topicid);
|
811 |
-
$posts = WPF()->post->get_posts( array( 'topicid' => $topicid, 'row_count' => $topic_rss_items, 'orderby' => 'created
|
812 |
}
|
813 |
foreach($posts as $key => $post){
|
814 |
$member = wpforo_member( $post );
|
8 |
if( isset($_POST['wpfreg']) && !empty($_POST['wpfreg']) && $userid = WPF()->member->create($_POST['wpfreg'])){
|
9 |
wpforo_verify_form('ref');
|
10 |
WPF()->member->reset($userid);
|
11 |
+
if( WPF()->member->options['redirect_url_after_register'] ){
|
12 |
+
$redirect_url = WPF()->member->options['redirect_url_after_register'];
|
13 |
+
}else{
|
14 |
+
$redirect_url = ( wpforo_feature('user-register-email-confirm') ? wpforo_home_url() : WPF()->member->get_profile_url( $userid, 'account' ) );
|
15 |
+
}
|
16 |
wp_redirect($redirect_url);
|
17 |
exit();
|
18 |
}
|
30 |
}
|
31 |
$wpf_login_times++;
|
32 |
update_user_meta( $user->ID, '_wpf_login_times', $wpf_login_times );
|
33 |
+
if( WPF()->member->options['redirect_url_after_login'] ){
|
34 |
+
$redirect_url = WPF()->member->options['redirect_url_after_login'];
|
35 |
+
}else{
|
36 |
+
$redirect_url = wpforo_home_url( preg_replace('#\?.*$#is', '', wpforo_get_request_uri()) );
|
37 |
+
}
|
38 |
wp_redirect($redirect_url);
|
39 |
exit();
|
40 |
}else{
|
153 |
|
154 |
if( WPF()->topic->merge( WPF()->current_object['topic'], $target, array(), $to_target_title, $append ) )
|
155 |
$redirect_to = WPF()->topic->get_topic_url($target);
|
156 |
+
}else{
|
157 |
+
WPF()->notice->add('Target Topic not found', 'error');
|
158 |
}
|
159 |
}
|
160 |
wp_redirect( $redirect_to );
|
185 |
|
186 |
if( WPF()->topic->merge( WPF()->current_object['topic'], $target, $_POST['wpforo']['posts'], $to_target_title, $append ) )
|
187 |
$redirect_to = WPF()->topic->get_topic_url($target);
|
188 |
+
}else{
|
189 |
+
WPF()->notice->add('Target Topic not found', 'error');
|
190 |
}
|
191 |
}
|
192 |
}
|
261 |
WPF()->forum->rebuild_stats($forumid);
|
262 |
WPF()->db->query("DELETE FROM `" . WPF()->db->prefix . "options` WHERE `option_name` LIKE 'wpforo_stat%'" );
|
263 |
}
|
264 |
+
WPF()->forum->delete_tree_cache();
|
265 |
WPF()->notice->add('Updated Successfully!', 'success');
|
266 |
}
|
267 |
}
|
811 |
|
812 |
if(isset($_GET['topic']) && $_GET['topic']){
|
813 |
if( $_GET['topic'] == 'g' ){
|
814 |
+
$posts = WPF()->post->get_posts( array( 'row_count' => $topic_rss_items, 'orderby' => '`created` DESC, `postid` DESC', 'check_private' => true ) );
|
815 |
$topic['title'] = '';
|
816 |
$topic['topicurl'] = '#';
|
817 |
}
|
819 |
$topicid = intval($_GET['topic']);
|
820 |
$topic = wpforo_topic($topicid); //WPF()->topic->get_topic($topicid);
|
821 |
$topic['topicurl'] = ( $topic['url'] ) ? $topic['url'] : WPF()->topic->get_topic_url($topicid);
|
822 |
+
$posts = WPF()->post->get_posts( array( 'topicid' => $topicid, 'row_count' => $topic_rss_items, 'orderby' => '`created` DESC, `postid` DESC', 'check_private' => true ) );
|
823 |
}
|
824 |
foreach($posts as $key => $post){
|
825 |
$member = wpforo_member( $post );
|
wpf-includes/wpf-hooks.php
CHANGED
@@ -1249,10 +1249,14 @@ function wpforo_avatar( $avatar, $id_or_email, $size, $default, $alt ) {
|
|
1249 |
$id = (int) $id_or_email;
|
1250 |
$user = get_user_by( 'id' , $id );
|
1251 |
}elseif( is_object( $id_or_email ) ) {
|
1252 |
-
if ( ! empty( $id_or_email->
|
1253 |
-
$id = (int) $id_or_email->
|
1254 |
$user = get_user_by( 'id' , $id );
|
1255 |
}
|
|
|
|
|
|
|
|
|
1256 |
}else{
|
1257 |
$user = get_user_by( 'email', $id_or_email );
|
1258 |
}
|
@@ -1912,7 +1916,7 @@ function wpforo_redirect_to_custom_password_reset(){
|
|
1912 |
exit;
|
1913 |
}
|
1914 |
|
1915 |
-
$redirect_url = wpforo_home_url( '?wpforo=resetpassword&rp_key='.esc_attr( $_REQUEST['key'] ).'&rp_login='.esc_attr( $_REQUEST['login'] ) );
|
1916 |
|
1917 |
wp_redirect( $redirect_url );
|
1918 |
exit;
|
1249 |
$id = (int) $id_or_email;
|
1250 |
$user = get_user_by( 'id' , $id );
|
1251 |
}elseif( is_object( $id_or_email ) ) {
|
1252 |
+
if ( ! empty( $id_or_email->user_id ) ) {
|
1253 |
+
$id = (int) $id_or_email->user_id;
|
1254 |
$user = get_user_by( 'id' , $id );
|
1255 |
}
|
1256 |
+
elseif ( ! empty( $id_or_email->ID ) ) {
|
1257 |
+
$id = (int) $id_or_email->ID;
|
1258 |
+
$user = get_user_by( 'id' , $id );
|
1259 |
+
}
|
1260 |
}else{
|
1261 |
$user = get_user_by( 'email', $id_or_email );
|
1262 |
}
|
1916 |
exit;
|
1917 |
}
|
1918 |
|
1919 |
+
$redirect_url = wpforo_home_url( '?wpforo=resetpassword&rp_key='.esc_attr( urlencode($_REQUEST['key']) ).'&rp_login='.esc_attr( urlencode($_REQUEST['login']) ) );
|
1920 |
|
1921 |
wp_redirect( $redirect_url );
|
1922 |
exit;
|
wpf-includes/wpf-phrases.php
CHANGED
@@ -728,6 +728,7 @@ $wpforo_phrases = array(
|
|
728 |
'Forum post like' => __('Forum post like', 'wpforo'),
|
729 |
'Tools' => __('Tools', 'wpforo'),
|
730 |
'Target Topic URL' => __('Target Topic URL', 'wpforo'),
|
|
|
731 |
'Merge Topics' => __('Merge Topics', 'wpforo'),
|
732 |
'Split Topic' => __('Split Topic', 'wpforo'),
|
733 |
'Please copy the target topic URL from browser address bar and paste in the field below.' => __('Please copy the target topic URL from browser address bar and paste in the field below.', 'wpforo'),
|
728 |
'Forum post like' => __('Forum post like', 'wpforo'),
|
729 |
'Tools' => __('Tools', 'wpforo'),
|
730 |
'Target Topic URL' => __('Target Topic URL', 'wpforo'),
|
731 |
+
'Target Topic not found' => __('Target Topic not found', 'wpforo'),
|
732 |
'Merge Topics' => __('Merge Topics', 'wpforo'),
|
733 |
'Split Topic' => __('Split Topic', 'wpforo'),
|
734 |
'Please copy the target topic URL from browser address bar and paste in the field below.' => __('Please copy the target topic URL from browser address bar and paste in the field below.', 'wpforo'),
|
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: 2018-03-
|
9 |
"PO-Revision-Date: 2016-06-28 21:09+0400\n"
|
10 |
"Last-Translator: \n"
|
11 |
"Language-Team: \n"
|
@@ -1733,7 +1733,7 @@ msgstr ""
|
|
1733 |
msgid "Count of users in this usergroup"
|
1734 |
msgstr ""
|
1735 |
|
1736 |
-
#: wpf-admin/usergroup.php:
|
1737 |
msgid "is Default"
|
1738 |
msgstr ""
|
1739 |
|
@@ -1932,41 +1932,41 @@ msgstr ""
|
|
1932 |
msgid "Open link in a new tab"
|
1933 |
msgstr ""
|
1934 |
|
1935 |
-
#: wpf-includes/class-template.php:
|
1936 |
msgid "Theme file not readable"
|
1937 |
msgstr ""
|
1938 |
|
1939 |
-
#: wpf-includes/functions-installation.php:
|
1940 |
msgid "Start Profile Synchronization"
|
1941 |
msgstr ""
|
1942 |
|
1943 |
-
#: wpf-includes/functions-installation.php:
|
1944 |
msgid "Continue Synchronization"
|
1945 |
msgstr ""
|
1946 |
|
1947 |
-
#: wpf-includes/functions-installation.php:
|
1948 |
msgid ""
|
1949 |
"This process may take a few seconds or dozens of minutes, please be patient "
|
1950 |
"and don't close this page."
|
1951 |
msgstr ""
|
1952 |
|
1953 |
-
#: wpf-includes/functions-installation.php:
|
1954 |
msgid ""
|
1955 |
"You can permanently disable this message in Dashboard > Forums > Features "
|
1956 |
"admin page."
|
1957 |
msgstr ""
|
1958 |
|
1959 |
-
#: wpf-includes/functions-installation.php:
|
1960 |
msgid "wpForo Forum Installation | "
|
1961 |
msgstr ""
|
1962 |
|
1963 |
-
#: wpf-includes/functions-installation.php:
|
1964 |
msgid ""
|
1965 |
"Forum users' profile data are not synchronized yet, this step is required! "
|
1966 |
"Please click the button below to complete installation."
|
1967 |
msgstr ""
|
1968 |
|
1969 |
-
#: wpf-includes/functions-installation.php:
|
1970 |
msgid ""
|
1971 |
"This process may take a few seconds or dozens of minutes, please be patient "
|
1972 |
"and don't close this page. Database backup is not required. If you got 500 "
|
@@ -1974,15 +1974,15 @@ msgid ""
|
|
1974 |
"in MySQL server."
|
1975 |
msgstr ""
|
1976 |
|
1977 |
-
#: wpf-includes/functions-installation.php:
|
1978 |
msgid "Updater Database"
|
1979 |
msgstr ""
|
1980 |
|
1981 |
-
#: wpf-includes/functions-installation.php:
|
1982 |
msgid "wpForo - Update Database "
|
1983 |
msgstr ""
|
1984 |
|
1985 |
-
#: wpf-includes/functions-installation.php:
|
1986 |
msgid "Please click the button below to complete wpForo update."
|
1987 |
msgstr ""
|
1988 |
|
@@ -4221,20 +4221,24 @@ msgid "Target Topic URL"
|
|
4221 |
msgstr ""
|
4222 |
|
4223 |
#: wpf-includes/wpf-phrases.php:731
|
4224 |
-
msgid "
|
4225 |
msgstr ""
|
4226 |
|
4227 |
#: wpf-includes/wpf-phrases.php:732
|
4228 |
-
msgid "
|
4229 |
msgstr ""
|
4230 |
|
4231 |
#: wpf-includes/wpf-phrases.php:733
|
|
|
|
|
|
|
|
|
4232 |
msgid ""
|
4233 |
"Please copy the target topic URL from browser address bar and paste in the "
|
4234 |
"field below."
|
4235 |
msgstr ""
|
4236 |
|
4237 |
-
#: wpf-includes/wpf-phrases.php:
|
4238 |
msgid ""
|
4239 |
"All posts will be merged and displayed (ordered) in target topic according "
|
4240 |
"to posts dates. If you want to append merged posts to the end of the target "
|
@@ -4242,63 +4246,63 @@ msgid ""
|
|
4242 |
"option below."
|
4243 |
msgstr ""
|
4244 |
|
4245 |
-
#: wpf-includes/wpf-phrases.php:
|
4246 |
msgid ""
|
4247 |
"Update post dates (current date) to allow append posts to the end of the "
|
4248 |
"target topic."
|
4249 |
msgstr ""
|
4250 |
|
4251 |
-
#: wpf-includes/wpf-phrases.php:
|
4252 |
msgid "Update post titles with target topic title."
|
4253 |
msgstr ""
|
4254 |
|
4255 |
-
#: wpf-includes/wpf-phrases.php:
|
4256 |
msgid ""
|
4257 |
"Topics once merged cannot be unmerged. This topic URL will no longer be "
|
4258 |
"available."
|
4259 |
msgstr ""
|
4260 |
|
4261 |
-
#: wpf-includes/wpf-phrases.php:
|
4262 |
msgid "Create New Topic"
|
4263 |
msgstr ""
|
4264 |
|
4265 |
-
#: wpf-includes/wpf-phrases.php:
|
4266 |
msgid ""
|
4267 |
"Create new topic with split posts. The first post of new topic becomes the "
|
4268 |
"earliest reply."
|
4269 |
msgstr ""
|
4270 |
|
4271 |
-
#: wpf-includes/wpf-phrases.php:
|
4272 |
msgid "New Topic Title"
|
4273 |
msgstr ""
|
4274 |
|
4275 |
-
#: wpf-includes/wpf-phrases.php:
|
4276 |
msgid "New Topic Forum"
|
4277 |
msgstr ""
|
4278 |
|
4279 |
-
#: wpf-includes/wpf-phrases.php:
|
4280 |
msgid "Select Posts to Split"
|
4281 |
msgstr ""
|
4282 |
|
4283 |
-
#: wpf-includes/wpf-phrases.php:
|
4284 |
msgid ""
|
4285 |
"Topic once split cannot be unsplit. The first post of new topic becomes the "
|
4286 |
"earliest reply."
|
4287 |
msgstr ""
|
4288 |
|
4289 |
-
#: wpf-includes/wpf-phrases.php:
|
4290 |
msgid "Merge"
|
4291 |
msgstr ""
|
4292 |
|
4293 |
-
#: wpf-includes/wpf-phrases.php:
|
4294 |
msgid "Split"
|
4295 |
msgstr ""
|
4296 |
|
4297 |
-
#: wpf-includes/wpf-phrases.php:
|
4298 |
msgid "Move Reply"
|
4299 |
msgstr ""
|
4300 |
|
4301 |
-
#: wpf-includes/wpf-phrases.php:
|
4302 |
msgid ""
|
4303 |
"This action changes topic URL. Once the topic is moved to other forum the "
|
4304 |
"old URL of this topic will no longer be available."
|
@@ -4410,7 +4414,7 @@ msgid ""
|
|
4410 |
msgstr ""
|
4411 |
|
4412 |
#. Plugin Name of the plugin/theme
|
4413 |
-
msgid "wpForo
|
4414 |
msgstr ""
|
4415 |
|
4416 |
#. Plugin URI of the plugin/theme
|
5 |
msgstr ""
|
6 |
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
|
7 |
"Project-Id-Version: Forum - wpForo\n"
|
8 |
+
"POT-Creation-Date: 2018-03-09 11:03+0400\n"
|
9 |
"PO-Revision-Date: 2016-06-28 21:09+0400\n"
|
10 |
"Last-Translator: \n"
|
11 |
"Language-Team: \n"
|
1733 |
msgid "Count of users in this usergroup"
|
1734 |
msgstr ""
|
1735 |
|
1736 |
+
#: wpf-admin/usergroup.php:54
|
1737 |
msgid "is Default"
|
1738 |
msgstr ""
|
1739 |
|
1932 |
msgid "Open link in a new tab"
|
1933 |
msgstr ""
|
1934 |
|
1935 |
+
#: wpf-includes/class-template.php:1412 wpf-includes/wpf-phrases.php:327
|
1936 |
msgid "Theme file not readable"
|
1937 |
msgstr ""
|
1938 |
|
1939 |
+
#: wpf-includes/functions-installation.php:671
|
1940 |
msgid "Start Profile Synchronization"
|
1941 |
msgstr ""
|
1942 |
|
1943 |
+
#: wpf-includes/functions-installation.php:671
|
1944 |
msgid "Continue Synchronization"
|
1945 |
msgstr ""
|
1946 |
|
1947 |
+
#: wpf-includes/functions-installation.php:674
|
1948 |
msgid ""
|
1949 |
"This process may take a few seconds or dozens of minutes, please be patient "
|
1950 |
"and don't close this page."
|
1951 |
msgstr ""
|
1952 |
|
1953 |
+
#: wpf-includes/functions-installation.php:675
|
1954 |
msgid ""
|
1955 |
"You can permanently disable this message in Dashboard > Forums > Features "
|
1956 |
"admin page."
|
1957 |
msgstr ""
|
1958 |
|
1959 |
+
#: wpf-includes/functions-installation.php:677
|
1960 |
msgid "wpForo Forum Installation | "
|
1961 |
msgstr ""
|
1962 |
|
1963 |
+
#: wpf-includes/functions-installation.php:678
|
1964 |
msgid ""
|
1965 |
"Forum users' profile data are not synchronized yet, this step is required! "
|
1966 |
"Please click the button below to complete installation."
|
1967 |
msgstr ""
|
1968 |
|
1969 |
+
#: wpf-includes/functions-installation.php:690
|
1970 |
msgid ""
|
1971 |
"This process may take a few seconds or dozens of minutes, please be patient "
|
1972 |
"and don't close this page. Database backup is not required. If you got 500 "
|
1974 |
"in MySQL server."
|
1975 |
msgstr ""
|
1976 |
|
1977 |
+
#: wpf-includes/functions-installation.php:691
|
1978 |
msgid "Updater Database"
|
1979 |
msgstr ""
|
1980 |
|
1981 |
+
#: wpf-includes/functions-installation.php:692
|
1982 |
msgid "wpForo - Update Database "
|
1983 |
msgstr ""
|
1984 |
|
1985 |
+
#: wpf-includes/functions-installation.php:693
|
1986 |
msgid "Please click the button below to complete wpForo update."
|
1987 |
msgstr ""
|
1988 |
|
4221 |
msgstr ""
|
4222 |
|
4223 |
#: wpf-includes/wpf-phrases.php:731
|
4224 |
+
msgid "Target Topic not found"
|
4225 |
msgstr ""
|
4226 |
|
4227 |
#: wpf-includes/wpf-phrases.php:732
|
4228 |
+
msgid "Merge Topics"
|
4229 |
msgstr ""
|
4230 |
|
4231 |
#: wpf-includes/wpf-phrases.php:733
|
4232 |
+
msgid "Split Topic"
|
4233 |
+
msgstr ""
|
4234 |
+
|
4235 |
+
#: wpf-includes/wpf-phrases.php:734
|
4236 |
msgid ""
|
4237 |
"Please copy the target topic URL from browser address bar and paste in the "
|
4238 |
"field below."
|
4239 |
msgstr ""
|
4240 |
|
4241 |
+
#: wpf-includes/wpf-phrases.php:735
|
4242 |
msgid ""
|
4243 |
"All posts will be merged and displayed (ordered) in target topic according "
|
4244 |
"to posts dates. If you want to append merged posts to the end of the target "
|
4246 |
"option below."
|
4247 |
msgstr ""
|
4248 |
|
4249 |
+
#: wpf-includes/wpf-phrases.php:736
|
4250 |
msgid ""
|
4251 |
"Update post dates (current date) to allow append posts to the end of the "
|
4252 |
"target topic."
|
4253 |
msgstr ""
|
4254 |
|
4255 |
+
#: wpf-includes/wpf-phrases.php:737
|
4256 |
msgid "Update post titles with target topic title."
|
4257 |
msgstr ""
|
4258 |
|
4259 |
+
#: wpf-includes/wpf-phrases.php:738
|
4260 |
msgid ""
|
4261 |
"Topics once merged cannot be unmerged. This topic URL will no longer be "
|
4262 |
"available."
|
4263 |
msgstr ""
|
4264 |
|
4265 |
+
#: wpf-includes/wpf-phrases.php:739
|
4266 |
msgid "Create New Topic"
|
4267 |
msgstr ""
|
4268 |
|
4269 |
+
#: wpf-includes/wpf-phrases.php:740
|
4270 |
msgid ""
|
4271 |
"Create new topic with split posts. The first post of new topic becomes the "
|
4272 |
"earliest reply."
|
4273 |
msgstr ""
|
4274 |
|
4275 |
+
#: wpf-includes/wpf-phrases.php:741
|
4276 |
msgid "New Topic Title"
|
4277 |
msgstr ""
|
4278 |
|
4279 |
+
#: wpf-includes/wpf-phrases.php:742
|
4280 |
msgid "New Topic Forum"
|
4281 |
msgstr ""
|
4282 |
|
4283 |
+
#: wpf-includes/wpf-phrases.php:743
|
4284 |
msgid "Select Posts to Split"
|
4285 |
msgstr ""
|
4286 |
|
4287 |
+
#: wpf-includes/wpf-phrases.php:744
|
4288 |
msgid ""
|
4289 |
"Topic once split cannot be unsplit. The first post of new topic becomes the "
|
4290 |
"earliest reply."
|
4291 |
msgstr ""
|
4292 |
|
4293 |
+
#: wpf-includes/wpf-phrases.php:745
|
4294 |
msgid "Merge"
|
4295 |
msgstr ""
|
4296 |
|
4297 |
+
#: wpf-includes/wpf-phrases.php:746
|
4298 |
msgid "Split"
|
4299 |
msgstr ""
|
4300 |
|
4301 |
+
#: wpf-includes/wpf-phrases.php:747
|
4302 |
msgid "Move Reply"
|
4303 |
msgstr ""
|
4304 |
|
4305 |
+
#: wpf-includes/wpf-phrases.php:748
|
4306 |
msgid ""
|
4307 |
"This action changes topic URL. Once the topic is moved to other forum the "
|
4308 |
"old URL of this topic will no longer be available."
|
4414 |
msgstr ""
|
4415 |
|
4416 |
#. Plugin Name of the plugin/theme
|
4417 |
+
msgid "wpForo"
|
4418 |
msgstr ""
|
4419 |
|
4420 |
#. Plugin URI of the plugin/theme
|
wpf-themes/classic/layouts/1/post.php
CHANGED
@@ -12,6 +12,7 @@
|
|
12 |
</div>
|
13 |
<br class="wpf-clear" />
|
14 |
</div>
|
|
|
15 |
<?php
|
16 |
|
17 |
foreach($posts as $key => $post) : ?>
|
@@ -19,7 +20,6 @@
|
|
19 |
<?php $member = wpforo_member($post); ?>
|
20 |
<div id="post-<?php echo intval($post['postid']) ?>" class="post-wrap">
|
21 |
<div class="wpforo-post wpfcl-1">
|
22 |
-
<?php if($post['is_first_post']) wpforo_moderation_tools(); ?>
|
23 |
<div class="wpf-left">
|
24 |
<?php if( WPF()->perm->usergroup_can('va') && wpforo_feature('avatars') ): ?>
|
25 |
<div class="author-avatar"><?php echo WPF()->member->avatar( $member, 'alt="'.esc_attr($member['display_name']).'"', 80 ) ?></div>
|
12 |
</div>
|
13 |
<br class="wpf-clear" />
|
14 |
</div>
|
15 |
+
<?php wpforo_moderation_tools(); ?>
|
16 |
<?php
|
17 |
|
18 |
foreach($posts as $key => $post) : ?>
|
20 |
<?php $member = wpforo_member($post); ?>
|
21 |
<div id="post-<?php echo intval($post['postid']) ?>" class="post-wrap">
|
22 |
<div class="wpforo-post wpfcl-1">
|
|
|
23 |
<div class="wpf-left">
|
24 |
<?php if( WPF()->perm->usergroup_can('va') && wpforo_feature('avatars') ): ?>
|
25 |
<div class="author-avatar"><?php echo WPF()->member->avatar( $member, 'alt="'.esc_attr($member['display_name']).'"', 80 ) ?></div>
|
wpf-themes/classic/layouts/1/topic.php
CHANGED
@@ -23,7 +23,7 @@
|
|
23 |
$first_post = wpforo_post($topic['first_postid']);
|
24 |
$intro_posts = WPF()->post->options['layout_extended_intro_posts_count']; if( $intro_posts < 1 ){ $intro_posts = NULL; } else { $intro_posts = ($intro_posts > 1) ? ($intro_posts - 1) : $intro_posts = 0; }
|
25 |
$first_poster = wpforo_member($first_post);
|
26 |
-
$posts = WPF()->post->get_posts( array('topicid' => $topic['topicid'], 'exclude' => $topic['first_postid'], '
|
27 |
$posts = array_reverse($posts);
|
28 |
}
|
29 |
$topic_url = wpforo_topic($topic['topicid'], 'url');
|
23 |
$first_post = wpforo_post($topic['first_postid']);
|
24 |
$intro_posts = WPF()->post->options['layout_extended_intro_posts_count']; if( $intro_posts < 1 ){ $intro_posts = NULL; } else { $intro_posts = ($intro_posts > 1) ? ($intro_posts - 1) : $intro_posts = 0; }
|
25 |
$first_poster = wpforo_member($first_post);
|
26 |
+
$posts = WPF()->post->get_posts( array('topicid' => $topic['topicid'], 'exclude' => $topic['first_postid'], 'orderby' => '`is_first_post` ASC, `created` DESC, `postid` DESC', 'row_count' => $intro_posts) );
|
27 |
$posts = array_reverse($posts);
|
28 |
}
|
29 |
$topic_url = wpforo_topic($topic['topicid'], 'url');
|
wpf-themes/classic/layouts/2/post.php
CHANGED
@@ -13,13 +13,13 @@
|
|
13 |
</div>
|
14 |
<div class="wpf-clear"></div>
|
15 |
</div>
|
|
|
16 |
|
17 |
<?php foreach($posts as $key => $post) : ?>
|
18 |
|
19 |
<?php $member = wpforo_member($post); ?>
|
20 |
<div id="post-<?php echo intval($post['postid']) ?>" class="post-wrap">
|
21 |
<div class="wpforo-post wpfcl-1">
|
22 |
-
<?php if($post['is_first_post']) wpforo_moderation_tools(); ?>
|
23 |
<div class="wpf-left">
|
24 |
<?php if( WPF()->perm->usergroup_can('va') && wpforo_feature('avatars') ): ?>
|
25 |
<div class="author-avatar"><?php echo WPF()->member->avatar($member, 'alt="'.esc_attr($member['display_name']).'"', 110) ?></div>
|
13 |
</div>
|
14 |
<div class="wpf-clear"></div>
|
15 |
</div>
|
16 |
+
<?php wpforo_moderation_tools(); ?>
|
17 |
|
18 |
<?php foreach($posts as $key => $post) : ?>
|
19 |
|
20 |
<?php $member = wpforo_member($post); ?>
|
21 |
<div id="post-<?php echo intval($post['postid']) ?>" class="post-wrap">
|
22 |
<div class="wpforo-post wpfcl-1">
|
|
|
23 |
<div class="wpf-left">
|
24 |
<?php if( WPF()->perm->usergroup_can('va') && wpforo_feature('avatars') ): ?>
|
25 |
<div class="author-avatar"><?php echo WPF()->member->avatar($member, 'alt="'.esc_attr($member['display_name']).'"', 110) ?></div>
|
wpf-themes/classic/layouts/3/post.php
CHANGED
@@ -12,13 +12,14 @@
|
|
12 |
</div>
|
13 |
<br class="wpf-clear" />
|
14 |
</div>
|
|
|
|
|
15 |
<?php foreach($posts as $key => $post ) : $is_topic = ( $key ? FALSE : TRUE ); ?>
|
16 |
|
17 |
<?php if($post['parentid'] == 0): ?>
|
18 |
<?php $member = wpforo_member($post); ?>
|
19 |
<div id="post-<?php echo intval($post['postid']) ?>" class="post-wrap <?php if( !$post['is_first_post'] ) echo 'wpf-answer-wrap' ?>">
|
20 |
<div class="wpforo-post wpfcl-1">
|
21 |
-
<?php if($post['is_first_post']) wpforo_moderation_tools(); ?>
|
22 |
<div class="wpf-left">
|
23 |
<div class="wpforo-post-voting">
|
24 |
<div class="wpf-positive">
|
12 |
</div>
|
13 |
<br class="wpf-clear" />
|
14 |
</div>
|
15 |
+
<?php wpforo_moderation_tools(); ?>
|
16 |
+
|
17 |
<?php foreach($posts as $key => $post ) : $is_topic = ( $key ? FALSE : TRUE ); ?>
|
18 |
|
19 |
<?php if($post['parentid'] == 0): ?>
|
20 |
<?php $member = wpforo_member($post); ?>
|
21 |
<div id="post-<?php echo intval($post['postid']) ?>" class="post-wrap <?php if( !$post['is_first_post'] ) echo 'wpf-answer-wrap' ?>">
|
22 |
<div class="wpforo-post wpfcl-1">
|
|
|
23 |
<div class="wpf-left">
|
24 |
<div class="wpforo-post-voting">
|
25 |
<div class="wpf-positive">
|
wpf-themes/classic/recent.php
CHANGED
@@ -75,7 +75,7 @@ else{
|
|
75 |
$first_post = wpforo_post($topic['first_postid']);
|
76 |
$intro_posts = WPF()->post->options['layout_extended_intro_posts_count']; if( $intro_posts < 1 ){ $intro_posts = NULL; } else { $intro_posts = ($intro_posts > 1) ? ($intro_posts - 1) : $intro_posts = 0; }
|
77 |
$first_poster = wpforo_member($first_post);
|
78 |
-
$posts = WPF()->post->get_posts( array('topicid' => $topic['topicid'], '
|
79 |
}
|
80 |
$topic_url = wpforo_topic($topic['topicid'], 'url');
|
81 |
$post_toglle = WPF()->post->options['layout_extended_intro_posts_toggle'];
|
75 |
$first_post = wpforo_post($topic['first_postid']);
|
76 |
$intro_posts = WPF()->post->options['layout_extended_intro_posts_count']; if( $intro_posts < 1 ){ $intro_posts = NULL; } else { $intro_posts = ($intro_posts > 1) ? ($intro_posts - 1) : $intro_posts = 0; }
|
77 |
$first_poster = wpforo_member($first_post);
|
78 |
+
$posts = WPF()->post->get_posts( array('topicid' => $topic['topicid'], 'orderby' => '`is_first_post` ASC, `created` DESC, `postid` DESC', 'row_count' => $intro_posts) );
|
79 |
}
|
80 |
$topic_url = wpforo_topic($topic['topicid'], 'url');
|
81 |
$post_toglle = WPF()->post->options['layout_extended_intro_posts_toggle'];
|
wpf-themes/classic/style-rtl.css
CHANGED
@@ -878,7 +878,7 @@ RTL Style of Classic Theme
|
|
878 |
/************* Topic Tools *************************/
|
879 |
/****************************************************/
|
880 |
#wpforo-wrap #wpf_moderation_tools{display: none;}
|
881 |
-
#wpforo-wrap .wpf-tools {padding: 20px; margin: -2px auto
|
882 |
#wpforo-wrap .wpf-tools .wpf-tool-tabs{display: block; width: 100%; margin-bottom: 1px;}
|
883 |
#wpforo-wrap .wpf-tools .wpf-tool-tabs .wpf-tool-tab{ display: inline-block; margin-left: 2px; padding: 10px 15px 5px 15px; font-size: 14px; cursor: pointer; border: 1px solid transparent; border-top-width: 2px;}
|
884 |
#wpforo-wrap .wpf-tools .wpf-tool-tabs .wpf-tool-tab:first-letter{text-transform: uppercase;}
|
@@ -1198,3 +1198,7 @@ RTL Style of Classic Theme
|
|
1198 |
#wpforo-wrap .wpf-extra-fields #wpforo_recaptcha_widget{ -webkit-transform:scale(0.85); transform:scale(0.85); -webkit-transform-origin:right 0; transform-origin:right 0; }
|
1199 |
@media screen and (max-width:1000px){ #wpforo-wrap .wpf-extra-fields #wpforo_recaptcha_widget{ transform:scale(0.75);-webkit-transform:scale(0.75); transform-origin:right 0;-webkit-transform-origin:right 0; }}
|
1200 |
@media screen and (max-width:420px){ #wpforo-wrap .wpf-extra-fields #wpforo_recaptcha_widget{ transform:scale(0.65);-webkit-transform:scale(0.65); transform-origin:right 0;-webkit-transform-origin:right 0; }}
|
|
|
|
|
|
|
|
878 |
/************* Topic Tools *************************/
|
879 |
/****************************************************/
|
880 |
#wpforo-wrap #wpf_moderation_tools{display: none;}
|
881 |
+
#wpforo-wrap .wpf-tools {padding: 20px; margin: -2px auto 10px;}
|
882 |
#wpforo-wrap .wpf-tools .wpf-tool-tabs{display: block; width: 100%; margin-bottom: 1px;}
|
883 |
#wpforo-wrap .wpf-tools .wpf-tool-tabs .wpf-tool-tab{ display: inline-block; margin-left: 2px; padding: 10px 15px 5px 15px; font-size: 14px; cursor: pointer; border: 1px solid transparent; border-top-width: 2px;}
|
884 |
#wpforo-wrap .wpf-tools .wpf-tool-tabs .wpf-tool-tab:first-letter{text-transform: uppercase;}
|
1198 |
#wpforo-wrap .wpf-extra-fields #wpforo_recaptcha_widget{ -webkit-transform:scale(0.85); transform:scale(0.85); -webkit-transform-origin:right 0; transform-origin:right 0; }
|
1199 |
@media screen and (max-width:1000px){ #wpforo-wrap .wpf-extra-fields #wpforo_recaptcha_widget{ transform:scale(0.75);-webkit-transform:scale(0.75); transform-origin:right 0;-webkit-transform-origin:right 0; }}
|
1200 |
@media screen and (max-width:420px){ #wpforo-wrap .wpf-extra-fields #wpforo_recaptcha_widget{ transform:scale(0.65);-webkit-transform:scale(0.65); transform-origin:right 0;-webkit-transform-origin:right 0; }}
|
1201 |
+
|
1202 |
+
/* Font Awesome Fixes */
|
1203 |
+
#wpforo-wrap .fa-reply:before { content: "\f3e5" !important; }
|
1204 |
+
#wpforo-wrap .fas.far{font-weight: normal;}
|
wpf-themes/classic/style.css
CHANGED
@@ -880,7 +880,7 @@ Author: gVectors Team
|
|
880 |
/************* Topic Tools *************************/
|
881 |
/****************************************************/
|
882 |
#wpforo-wrap #wpf_moderation_tools{display: none;}
|
883 |
-
#wpforo-wrap .wpf-tools {padding: 20px; margin: -2px auto
|
884 |
#wpforo-wrap .wpf-tools .wpf-tool-tabs{display: block; width: 100%; margin-bottom: 1px;}
|
885 |
#wpforo-wrap .wpf-tools .wpf-tool-tabs .wpf-tool-tab{ display: inline-block; margin-right: 2px; padding: 10px 15px 5px 15px; font-size: 14px; cursor: pointer; border: 1px solid transparent; border-top-width: 2px; }
|
886 |
#wpforo-wrap .wpf-tools .wpf-tool-tabs .wpf-tool-tab:first-letter{text-transform: uppercase;}
|
@@ -1192,7 +1192,6 @@ Author: gVectors Team
|
|
1192 |
#wpforo-wrap .mce-toolbar .mce-btn-group #mceu_0.mce-btn.mce-listbox {background: transparent;}
|
1193 |
#wpforo-wrap .mce-toolbar #mceu_0.mce-listbox button i{display:none;}
|
1194 |
|
1195 |
-
/* reCAPTCHA */
|
1196 |
/* reCAPTCHA */
|
1197 |
#wpforo-wrap #wpforo_recaptcha_widget{ -webkit-transform:scale(0.9); transform:scale(0.9); }
|
1198 |
@media screen and (max-width:1000px){ #wpforo-wrap #wpforo_recaptcha_widget{ transform:scale(0.75);-webkit-transform:scale(0.75); }}
|
@@ -1200,4 +1199,8 @@ Author: gVectors Team
|
|
1200 |
|
1201 |
#wpforo-wrap .wpf-extra-fields #wpforo_recaptcha_widget{ -webkit-transform:scale(0.85); transform:scale(0.85); -webkit-transform-origin:left 0; transform-origin:left 0; }
|
1202 |
@media screen and (max-width:800px){ #wpforo-wrap .wpf-extra-fields #wpforo_recaptcha_widget{ transform:scale(0.75);-webkit-transform:scale(0.75); transform-origin:left 0;-webkit-transform-origin:left 0; }}
|
1203 |
-
@media screen and (max-width:420px){ #wpforo-wrap .wpf-extra-fields #wpforo_recaptcha_widget{ transform:scale(0.65);-webkit-transform:scale(0.65); transform-origin:left 0;-webkit-transform-origin:left 0; }}
|
|
|
|
|
|
|
|
880 |
/************* Topic Tools *************************/
|
881 |
/****************************************************/
|
882 |
#wpforo-wrap #wpf_moderation_tools{display: none;}
|
883 |
+
#wpforo-wrap .wpf-tools {padding: 20px; margin: -2px auto 10px;}
|
884 |
#wpforo-wrap .wpf-tools .wpf-tool-tabs{display: block; width: 100%; margin-bottom: 1px;}
|
885 |
#wpforo-wrap .wpf-tools .wpf-tool-tabs .wpf-tool-tab{ display: inline-block; margin-right: 2px; padding: 10px 15px 5px 15px; font-size: 14px; cursor: pointer; border: 1px solid transparent; border-top-width: 2px; }
|
886 |
#wpforo-wrap .wpf-tools .wpf-tool-tabs .wpf-tool-tab:first-letter{text-transform: uppercase;}
|
1192 |
#wpforo-wrap .mce-toolbar .mce-btn-group #mceu_0.mce-btn.mce-listbox {background: transparent;}
|
1193 |
#wpforo-wrap .mce-toolbar #mceu_0.mce-listbox button i{display:none;}
|
1194 |
|
|
|
1195 |
/* reCAPTCHA */
|
1196 |
#wpforo-wrap #wpforo_recaptcha_widget{ -webkit-transform:scale(0.9); transform:scale(0.9); }
|
1197 |
@media screen and (max-width:1000px){ #wpforo-wrap #wpforo_recaptcha_widget{ transform:scale(0.75);-webkit-transform:scale(0.75); }}
|
1199 |
|
1200 |
#wpforo-wrap .wpf-extra-fields #wpforo_recaptcha_widget{ -webkit-transform:scale(0.85); transform:scale(0.85); -webkit-transform-origin:left 0; transform-origin:left 0; }
|
1201 |
@media screen and (max-width:800px){ #wpforo-wrap .wpf-extra-fields #wpforo_recaptcha_widget{ transform:scale(0.75);-webkit-transform:scale(0.75); transform-origin:left 0;-webkit-transform-origin:left 0; }}
|
1202 |
+
@media screen and (max-width:420px){ #wpforo-wrap .wpf-extra-fields #wpforo_recaptcha_widget{ transform:scale(0.65);-webkit-transform:scale(0.65); transform-origin:left 0;-webkit-transform-origin:left 0; }}
|
1203 |
+
|
1204 |
+
/* Font Awesome Fixes */
|
1205 |
+
#wpforo-wrap .fa-reply:before { content: "\f3e5" !important; }
|
1206 |
+
#wpforo-wrap .fas.far{font-weight: normal;}
|
wpforo.php
CHANGED
@@ -5,14 +5,14 @@
|
|
5 |
* Description: WordPress Forum plugin. wpForo is a full-fledged forum solution for your community. Comes with multiple modern forum layouts.
|
6 |
* Author: gVectors Team (A. Chakhoyan, R. Hovhannisyan)
|
7 |
* Author URI: https://gvectors.com/
|
8 |
-
* Version: 1.4.
|
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.
|
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' );
|
@@ -339,9 +339,9 @@ if( !class_exists( 'wpForo' ) ) {
|
|
339 |
$stats['members'] = $this->member->get_count();
|
340 |
$stats['online_members_count'] = $this->member->online_members_count();
|
341 |
|
342 |
-
$posts = $this->topic->get_topics(array('orderby' => 'modified', 'order' => 'DESC', 'row_count' =>
|
343 |
$first = key($posts);
|
344 |
-
if ( isset($posts[$first]) && !empty($posts[$first]) && $this->perm->forum_can('vf', $posts[$first]['forumid']) ) {
|
345 |
$stats['last_post_title'] = $posts[$first]['title'];
|
346 |
$stats['last_post_url'] = $this->post->get_post_url($posts[$first]['last_post']);
|
347 |
}
|
@@ -522,7 +522,7 @@ if( !class_exists( 'wpForo' ) ) {
|
|
522 |
'offset' => ($current_object['paged'] - 1) * $this->post->options['posts_per_page'],
|
523 |
'row_count' => $this->post->options['posts_per_page'],
|
524 |
'userid' => $current_object['userid'],
|
525 |
-
'
|
526 |
'check_private' => true
|
527 |
);
|
528 |
$current_object['items_count'] = 0;
|
5 |
* Description: WordPress Forum plugin. wpForo is a full-fledged forum solution for your community. Comes with multiple modern forum layouts.
|
6 |
* Author: gVectors Team (A. Chakhoyan, R. Hovhannisyan)
|
7 |
* Author URI: https://gvectors.com/
|
8 |
+
* Version: 1.4.7
|
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.7');
|
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' );
|
339 |
$stats['members'] = $this->member->get_count();
|
340 |
$stats['online_members_count'] = $this->member->online_members_count();
|
341 |
|
342 |
+
$posts = $this->topic->get_topics(array('orderby' => 'modified', 'order' => 'DESC', 'row_count' => 20, 'private' => 0, 'status' => 0, 'permgroup' => 4 ));
|
343 |
$first = key($posts);
|
344 |
+
if ( isset($posts[$first]) && !empty($posts[$first]) && $this->perm->forum_can('vf', $posts[$first]['forumid'], 4) ) {
|
345 |
$stats['last_post_title'] = $posts[$first]['title'];
|
346 |
$stats['last_post_url'] = $this->post->get_post_url($posts[$first]['last_post']);
|
347 |
}
|
522 |
'offset' => ($current_object['paged'] - 1) * $this->post->options['posts_per_page'],
|
523 |
'row_count' => $this->post->options['posts_per_page'],
|
524 |
'userid' => $current_object['userid'],
|
525 |
+
'orderby' => '`created` DESC, `postid` DESC',
|
526 |
'check_private' => true
|
527 |
);
|
528 |
$current_object['items_count'] = 0;
|