Version Description
- Fix upload URL in activity
Download this release
Release Info
Developer | rtcamp |
Plugin | rtMedia for WordPress, BuddyPress and bbPress |
Version | 3.8.5 |
Comparing to | |
See all releases |
Code changes from version 3.8.4 to 3.8.5
- app/main/controllers/activity/RTMediaBuddyPressActivity.php +16 -4
- index.php +1 -1
- readme.txt +7 -4
app/main/controllers/activity/RTMediaBuddyPressActivity.php
CHANGED
@@ -161,11 +161,21 @@ class RTMediaBuddyPressActivity {
|
|
161 |
}
|
162 |
|
163 |
function bp_after_activity_post_form(){
|
164 |
-
$url
|
165 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
166 |
if ( rtmedia_is_uploader_view_allowed( true, 'activity' ) ){
|
167 |
$params = array(
|
168 |
-
'url' =>
|
|
|
169 |
'container' => 'rtmedia-whts-new-upload-container', 'drop_element' => 'whats-new-textarea', // drag-drop area assigned to activity update textarea
|
170 |
'filters' => apply_filters( 'rtmedia_plupload_files_filter', array( array( 'title' => __( 'Media Files', 'rtmedia' ), 'extensions' => get_rtmedia_allowed_upload_type() ) ) ), 'max_file_size' => min( array( ini_get( 'upload_max_filesize' ), ini_get( 'post_max_size' ) ) ), 'multipart' => true, 'urlstream_upload' => true, 'flash_swf_url' => includes_url( 'js/plupload/plupload.flash.swf' ), 'silverlight_xap_url' => includes_url( 'js/plupload/plupload.silverlight.xap' ), 'file_data_name' => 'rtmedia_file', // key passed to $_FILE.
|
171 |
'multi_selection' => true, 'multipart_params' => apply_filters( 'rtmedia-multi-params', array( 'redirect' => 'no', 'rtmedia_update' => 'true', 'action' => 'wp_handle_upload', '_wp_http_referer' => $_SERVER['REQUEST_URI'], 'mode' => 'file_upload', 'rtmedia_upload_nonce' => RTMediaUploadView::upload_nonce_generator( false, true ) ) ), 'max_file_size_msg' => apply_filters( 'rtmedia_plupload_file_size_msg', min( array( ini_get( 'upload_max_filesize' ), ini_get( 'post_max_size' ) ) ) )
|
@@ -322,7 +332,9 @@ class RTMediaBuddyPressActivity {
|
|
322 |
$activities[ $index ]->action = sprintf( __( '%s added a %s', 'rtmedia' ), $user_link, $media_str );
|
323 |
} else {
|
324 |
// Checking all the media linked with activity are of same type
|
325 |
-
if(
|
|
|
|
|
326 |
$activities[ $index ]->action = sprintf( __( '%s added %d %s', 'rtmedia' ), $user_link, $count, $media_str );
|
327 |
} else {
|
328 |
$activities[ $index ]->action = sprintf( __( '%s added %d %s', 'rtmedia' ), $user_link, $count, __( 'media', 'rtmedia' ) );
|
161 |
}
|
162 |
|
163 |
function bp_after_activity_post_form(){
|
164 |
+
$url = trailingslashit ( $_SERVER[ "REQUEST_URI" ] );
|
165 |
+
$slug_split = explode( '/', $url );
|
166 |
+
// check position of media slug for end of the URL
|
167 |
+
if ( $slug_split[ sizeof( $slug_split ) - 1 ] == RTMEDIA_MEDIA_SLUG ) {
|
168 |
+
// replace media slug with the blank space
|
169 |
+
$slug_split[ sizeof( $slug_split ) - 1 ] = '';
|
170 |
+
$url_upload = implode( '/', $slug_split );
|
171 |
+
$url = trailingslashit ( $url_upload ) . "upload/";
|
172 |
+
} else {
|
173 |
+
$url = trailingslashit ( $url ) . "upload/";
|
174 |
+
}
|
175 |
if ( rtmedia_is_uploader_view_allowed( true, 'activity' ) ){
|
176 |
$params = array(
|
177 |
+
'url' => $url,
|
178 |
+
'runtimes' => 'html5,flash,html4', 'browse_button' => 'rtmedia-add-media-button-post-update', // browse button assigned to "Attach Files" Button.
|
179 |
'container' => 'rtmedia-whts-new-upload-container', 'drop_element' => 'whats-new-textarea', // drag-drop area assigned to activity update textarea
|
180 |
'filters' => apply_filters( 'rtmedia_plupload_files_filter', array( array( 'title' => __( 'Media Files', 'rtmedia' ), 'extensions' => get_rtmedia_allowed_upload_type() ) ) ), 'max_file_size' => min( array( ini_get( 'upload_max_filesize' ), ini_get( 'post_max_size' ) ) ), 'multipart' => true, 'urlstream_upload' => true, 'flash_swf_url' => includes_url( 'js/plupload/plupload.flash.swf' ), 'silverlight_xap_url' => includes_url( 'js/plupload/plupload.silverlight.xap' ), 'file_data_name' => 'rtmedia_file', // key passed to $_FILE.
|
181 |
'multi_selection' => true, 'multipart_params' => apply_filters( 'rtmedia-multi-params', array( 'redirect' => 'no', 'rtmedia_update' => 'true', 'action' => 'wp_handle_upload', '_wp_http_referer' => $_SERVER['REQUEST_URI'], 'mode' => 'file_upload', 'rtmedia_upload_nonce' => RTMediaUploadView::upload_nonce_generator( false, true ) ) ), 'max_file_size_msg' => apply_filters( 'rtmedia_plupload_file_size_msg', min( array( ini_get( 'upload_max_filesize' ), ini_get( 'post_max_size' ) ) ) )
|
332 |
$activities[ $index ]->action = sprintf( __( '%s added a %s', 'rtmedia' ), $user_link, $media_str );
|
333 |
} else {
|
334 |
// Checking all the media linked with activity are of same type
|
335 |
+
if( isset( $rtmedia_media_type_array[ $activities[ $index ]->id ] )
|
336 |
+
&& !empty( $rtmedia_media_type_array[ $activities[ $index ]->id ] )
|
337 |
+
&& count( array_unique( $rtmedia_media_type_array[ $activities[ $index ]->id ] ) ) == 1 ) {
|
338 |
$activities[ $index ]->action = sprintf( __( '%s added %d %s', 'rtmedia' ), $user_link, $count, $media_str );
|
339 |
} else {
|
340 |
$activities[ $index ]->action = sprintf( __( '%s added %d %s', 'rtmedia' ), $user_link, $count, __( 'media', 'rtmedia' ) );
|
index.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
|
5 |
Plugin URI: http://rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
|
6 |
Description: This plugin adds missing media rich features like photos, videos and audio uploading to BuddyPress which are essential if you are building social network, seriously!
|
7 |
-
Version: 3.8.
|
8 |
Author: rtCamp
|
9 |
Text Domain: rtmedia
|
10 |
Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
|
4 |
Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
|
5 |
Plugin URI: http://rtcamp.com/rtmedia/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
|
6 |
Description: This plugin adds missing media rich features like photos, videos and audio uploading to BuddyPress which are essential if you are building social network, seriously!
|
7 |
+
Version: 3.8.5
|
8 |
Author: rtCamp
|
9 |
Text Domain: rtmedia
|
10 |
Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
|
readme.txt
CHANGED
@@ -5,8 +5,8 @@ Tags: BuddyPress, media, multimedia, album, audio, songs, music, video, photo, i
|
|
5 |
License: GPLv2 or later
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
Requires at least: WordPress 3.6
|
8 |
-
Tested up to: WordPress 4.2.2 + BuddyPress 2.
|
9 |
-
Stable tag: 3.8.
|
10 |
|
11 |
Add albums, photo, audio/video encoding, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices.
|
12 |
|
@@ -142,6 +142,9 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
|
|
142 |
|
143 |
Please visit [rtMedia's Roadmap page](http://rtcamp.com/rtmedia/roadmap/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media "Visit rtMedia's Features page") to get some details about future releases.
|
144 |
|
|
|
|
|
|
|
145 |
= 3.8.4 =
|
146 |
* Fix syntax error on Support Page
|
147 |
|
@@ -999,8 +1002,8 @@ Please visit [rtMedia's Roadmap page](http://rtcamp.com/rtmedia/roadmap/?utm_sou
|
|
999 |
|
1000 |
== Upgrade Notice ==
|
1001 |
|
1002 |
-
= 3.8.
|
1003 |
-
Requires BuddyPress 1.7 or higher, if using BuddyPress. Fix
|
1004 |
|
1005 |
== Sponsors ==
|
1006 |
|
5 |
License: GPLv2 or later
|
6 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
7 |
Requires at least: WordPress 3.6
|
8 |
+
Tested up to: WordPress 4.2.2 + BuddyPress 2.3.1
|
9 |
+
Stable tag: 3.8.5
|
10 |
|
11 |
Add albums, photo, audio/video encoding, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices.
|
12 |
|
142 |
|
143 |
Please visit [rtMedia's Roadmap page](http://rtcamp.com/rtmedia/roadmap/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media "Visit rtMedia's Features page") to get some details about future releases.
|
144 |
|
145 |
+
= 3.8.5 =
|
146 |
+
* Fix upload URL in activity
|
147 |
+
|
148 |
= 3.8.4 =
|
149 |
* Fix syntax error on Support Page
|
150 |
|
1002 |
|
1003 |
== Upgrade Notice ==
|
1004 |
|
1005 |
+
= 3.8.5 =
|
1006 |
+
Requires BuddyPress 1.7 or higher, if using BuddyPress. Fix upload URL in activity
|
1007 |
|
1008 |
== Sponsors ==
|
1009 |
|