Skip to content

Commit 7e5071e

Browse files
author
Siddharth Tikekar
committed
Merge branch 'develop' of github.com:rtMediaWP/rtMedia into develop
2 parents ea11b7c + 28602a2 commit 7e5071e

File tree

8 files changed

+80
-61
lines changed

8 files changed

+80
-61
lines changed

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212

1313
* **License:** [GPL v2 or later]( http://www.gnu.org/licenses/gpl-2.0.html)
1414

15-
* **Donate Link:** http://rtcamp.com/donate/
16-
1715
Add albums, photo, audio/video upload, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices.
1816

1917
## Description ##

app/helper/RTMediaAddon.php

-22
Original file line numberDiff line numberDiff line change
@@ -487,28 +487,6 @@ public function plugins_content( $args = '' ) {
487487
'category' => 'photo',
488488
'purchased' => ( defined( 'RTMEDIA_INSTAGRAM_URL' ) || file_exists( WP_PLUGIN_DIR . '/bpm-instagram/index.php' ) || defined( 'RTMEDIA_PHOTO_FILTERS_URL' ) || file_exists( WP_PLUGIN_DIR . '/rtmedia-photo-filters/index.php' ) ) ? true : false,
489489
),
490-
array(
491-
'title' => esc_html__( 'Kaltura Add-on', 'buddypress-media' ),
492-
'img_src' => $rtcamp_upload_url . 'edd/2015/08/rtMedia-Kaltura-Add-on.png',
493-
'product_link' => 'https://rtmedia.io/products/rtmedia-kaltura-add-on/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
494-
'desc' => '<p>' . esc_html__( 'Add support for more video formats using Kaltura video solution. It works with Kaltura.com, self-hosted Kaltura-CE and Kaltura-on-premise.', 'buddypress-media' ) . '</p>',
495-
'price' => '$499',
496-
'demo_link' => $rtmedia_demo_url . 'bpm-kaltura/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
497-
'buy_now' => 'https://rtmedia.io/products/rtmedia-kaltura/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
498-
'category' => 'video',
499-
'purchased' => ( defined( 'RTMEDIA_KALTURA_PATH' ) || file_exists( WP_PLUGIN_DIR . '/bpm-kaltura/index.php' ) ) ? true : false,
500-
),
501-
array(
502-
'title' => esc_html__( 'FFMPEG Add-on', 'buddypress-media' ),
503-
'img_src' => $rtcamp_upload_url . 'edd/2015/08/rtMedia-FFMPEG-Addon.png',
504-
'product_link' => 'https://rtmedia.io/products/buddypress-media-ffmpeg-converter/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
505-
'desc' => '<p>' . esc_html__( 'Add supports for more audio & video formats using open-source media-node. Media node comes with automated setup script for Ubuntu/Debian.', 'buddypress-media' ) . '</p>',
506-
'price' => '$499',
507-
'demo_link' => $rtmedia_demo_url . 'bpm-media/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
508-
'buy_now' => 'https://rtmedia.io/products/rtmedia-ffmpeg/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
509-
'category' => 'video',
510-
'purchased' => ( defined( 'RTMEDIA_FFMPEG_URL' ) || file_exists( WP_PLUGIN_DIR . '/bpm-ffmpeg/index.php' ) ) ? true : false,
511-
),
512490
array(
513491
'title' => esc_html__( 'Membership Add-on', 'buddypress-media' ),
514492
'img_src' => $rtcamp_upload_url . 'edd/2015/08/rtMedia-Membership.png',

app/helper/RTMediaSettings.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ public function rtmedia_support_intro() {
428428
'<a target="_blank" href="https://rtmedia.io/support/">' . esc_html__( 'rtMedia Support Page', 'buddypress-media' ) . '</a>.' .
429429
'</p>';
430430
echo '<p>' . esc_html__( 'If you have any suggestions, enhancements or bug reports, then you can open a new issue on ', 'buddypress-media' ) .
431-
'<a target="_blank" href="https://github.com/rtCamp/rtmedia/issues/new">' . esc_html__( 'GitHub', 'buddypress-media' ) . '</a>.' .
431+
'<a target="_blank" href="https://github.com/rtMediaWP/rtmedia/issues/new">' . esc_html__( 'GitHub', 'buddypress-media' ) . '</a>.' .
432432
'</p>';
433433
}
434434
}

app/helper/RTMediaSupport.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@ public function get_form( $form = '' ) {
465465
$content .= '<p>' .
466466
sprintf(
467467
esc_html__( 'If you have any suggestions, enhancements or bug reports, then you can open a new issue on %s', 'buddypress-media' ),
468-
'<a target="_blank" href="https://github.com/rtCamp/rtmedia/issues/new">' . esc_html__( 'GitHub', 'buddypress-media' ) . '</a>.'
468+
'<a target="_blank" href="https://github.com/rtMediaWP/rtmedia/issues/new">' . esc_html__( 'GitHub', 'buddypress-media' ) . '</a>.'
469469
) .
470470
'</p>';
471471

app/main/RTMedia.php

+68-9
Original file line numberDiff line numberDiff line change
@@ -332,18 +332,77 @@ function custom_style_for_activity_image_size() {
332332
$media_width = 'auto';
333333
}
334334

335-
?>
336-
.rtmedia-activity-container .media-type-photo .rtmedia-item-thumbnail {
337-
max-width: <?php echo esc_attr( $media_width ); ?>;
338-
max-height: <?php echo esc_attr( $media_height ); ?>;
339-
overflow: hidden;
335+
$video_height = ( isset( $this->options['defaultSizes_video_activityPlayer_height'] ) ? $this->options['defaultSizes_video_activityPlayer_height'] : '240' );
336+
$video_width = ( isset( $this->options['defaultSizes_video_activityPlayer_width'] ) ? $this->options['defaultSizes_video_activityPlayer_width'] : '320' );
337+
338+
if ( '0' === $video_height ) {
339+
$video_height = '240';
340340
}
341341

342-
.rtmedia-comment-media-container .mejs-container.mejs-video,
343-
.rtmedia-activity-container .mejs-container.mejs-video{
344-
min-height: <?php echo esc_attr( $this->options['defaultSizes_video_activityPlayer_height'] ); ?>px;
345-
min-width: <?php echo esc_attr( $this->options['defaultSizes_video_activityPlayer_width'] ); ?>px;
342+
if ( '0' === $video_width ) {
343+
$video_width = '320';
346344
}
345+
346+
$music_width = ( isset( $this->options['defaultSizes_music_activityPlayer_width'] ) ? $this->options['defaultSizes_music_activityPlayer_width'] : '320' );
347+
348+
if ( '0' === $music_width ) {
349+
$music_width = '320';
350+
}
351+
352+
?>
353+
.rtmedia-activity-container ul.rtm-activity-media-list{
354+
overflow: auto;
355+
}
356+
357+
div.rtmedia-activity-container ul.rtm-activity-media-list li.media-type-document,
358+
div.rtmedia-activity-container ul.rtm-activity-media-list li.media-type-other{
359+
margin-left: 0.6em !important;
360+
}
361+
362+
.rtmedia-activity-container li.media-type-video{
363+
height: <?php echo esc_attr( $video_height ); ?>px !important;
364+
width: <?php echo esc_attr( $video_width ); ?>px !important;
365+
}
366+
367+
.rtmedia-activity-container li.media-type-video div.rtmedia-item-thumbnail,
368+
.rtmedia-activity-container li.media-type-photo a{
369+
width: 100% !important;
370+
height: 98% !important;
371+
}
372+
373+
.rtmedia-activity-container li.media-type-video div.rtmedia-item-thumbnail video{
374+
width: 100% !important;
375+
height: 100% !important;
376+
}
377+
378+
.rtmedia-activity-container li.media-type-video div.rtmedia-item-thumbnail .mejs-video,
379+
.rtmedia-activity-container li.media-type-video div.rtmedia-item-thumbnail .mejs-video video,
380+
.rtmedia-activity-container li.media-type-video div.rtmedia-item-thumbnail .mejs-video .mejs-overlay-play{
381+
width: 100% !important;
382+
height: 100% !important;
383+
}
384+
385+
.rtmedia-activity-container li.media-type-music{
386+
width: <?php echo esc_attr( $music_width ); ?>px !important;
387+
}
388+
389+
.rtmedia-activity-container li.media-type-music .rtmedia-item-thumbnail,
390+
.rtmedia-activity-container li.media-type-music .rtmedia-item-thumbnail .mejs-audio,
391+
.rtmedia-activity-container li.media-type-music .rtmedia-item-thumbnail audio{
392+
width: 100% !important;
393+
}
394+
395+
.rtmedia-activity-container li.media-type-photo{
396+
width: <?php echo esc_attr( $media_width ); ?> !important;
397+
height: <?php echo esc_attr( $media_height ); ?> !important;
398+
}
399+
400+
.rtmedia-activity-container .media-type-photo .rtmedia-item-thumbnail,
401+
.rtmedia-activity-container .media-type-photo .rtmedia-item-thumbnail img {
402+
width: 100% !important;
403+
height: 100% !important;
404+
overflow: hidden;
405+
}
347406
<?php
348407
global $rtmedia;
349408
if ( rtmedia_check_comment_media_allow() && ! rtmedia_check_comment_in_commented_media_allow() ) { ?>

app/main/controllers/activity/RTMediaBuddyPressActivity.php

+6-19
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ function __construct() {
2727
add_action( 'bp_activity_delete_comment', array( $this, 'delete_comment_sync' ), 10, 2 );
2828
add_filter( 'bp_activity_allowed_tags', array( &$this, 'override_allowed_tags' ) );
2929
add_filter( 'bp_get_activity_parent_content', array( &$this, 'bp_get_activity_parent_content' ) );
30-
add_filter( 'bp_activity_type_before_save', array( $this, 'bp_activity_type_before_save' ) );
3130
add_filter( 'bp_activity_content_before_save', array( $this, 'bp_activity_content_before_save' ) );
3231
add_action( 'bp_activity_deleted_activities', array( &$this, 'bp_activity_deleted_activities' ) );
3332

@@ -252,23 +251,7 @@ function bp_get_activity_parent_content( $content ) {
252251
}
253252

254253
/**
255-
* This function will check for the media file attached to the actitvity and accordingly will set type.
256-
*
257-
* @param string $type Type of the Activity.
258-
*
259-
* @return string Filtered value of the activity type.
260-
*/
261-
public function bp_activity_type_before_save( $type ) {
262-
263-
$rtmedia_attached_files = filter_input( INPUT_POST, 'rtMedia_attached_files', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
264-
if ( ( ! empty( $rtmedia_attached_files ) ) && is_array( $rtmedia_attached_files ) ) {
265-
$type = 'rtmedia_update';
266-
}
267-
return $type;
268-
}
269-
270-
/**
271-
* This function will check for the media file attached to the actitvity and accordingly will set content.
254+
* This function will check for the media file attached to the activity and accordingly will set content.
272255
*
273256
* @param string $content Content of the Activity.
274257
*
@@ -279,7 +262,11 @@ public function bp_activity_content_before_save( $content ) {
279262
$rtmedia_attached_files = filter_input( INPUT_POST, 'rtMedia_attached_files', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
280263
if ( ( ! empty( $rtmedia_attached_files ) ) && is_array( $rtmedia_attached_files ) ) {
281264
$obj_activity = new RTMediaActivity( $rtmedia_attached_files, 0, $content );
282-
$content = $obj_activity->create_activity_html();
265+
266+
// Remove action to fix duplication issue of comment content.
267+
remove_action( 'bp_activity_content_before_save', 'rtmedia_bp_activity_comment_content_callback', 1001, 1 );
268+
269+
$content = $obj_activity->create_activity_html();
283270
}
284271
return $content;
285272
}

app/main/controllers/upload/RTMediaUploadEndpoint.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ function template_redirect( $create_activity = true ) {
109109
$media = $media_obj->model->get( array( 'activity_id' => $current_media_id ) );
110110
}
111111

112-
if ( $media[0]->album_id ) {
112+
if ( ! empty( $media[0] ) && $media[0]->album_id ) {
113113
$album_id = $media[0]->album_id;
114114
$privacy = $media[0]->privacy;
115115
$context = $media[0]->context;

readme.txt

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
=== rtMedia for WordPress, BuddyPress and bbPress ===
22
Contributors: rtcamp, mangeshp, sanket.parmar, pranalipatel, jignesh.nakrani, manishsongirkar36, kiranpotphode, yahil, 1naveengiri, bhargavbhandari90, raftaar1191, rittesh.patel, sagarjadhav, pushpak.pop, faishal, desaiuditd, rahul286, JoshuaAbenazer, gagan0123, saurabhshukla, nitun.lanjewar, umesh.nevase, suhasgirgaonkar, neerukoul, hrishiv90, kanakiyajay, jarretc, tobiaskluge, rafaelfunchal, UmeshSingla, mehulkaklotar, tannermirabel, kishores, chandrapatel, rahul3883, nomnom99, sayanchakraborty, milindmore22, thrijith, abhijitrakas, sid177, montu3366, jashwini, juhise, ravatparmar, dharmin16, malavvasita, pooja1210, krupajnanda
3-
Donate link: http://rtcamp.com/donate/
4-
Tags: BuddyPress, media, multimedia, album, audio, songs, music, video, photo, image, upload, share, MediaElement.js, ffmpeg, kaltura, media-node, rtMedia, WordPress, bbPress, masonry
3+
Tags: BuddyPress, media, multimedia, album, audio, songs, music, video, photo, image, upload, share, MediaElement.js, media-node, rtMedia, WordPress, bbPress, masonry
54
License: GPLv2 or later
65
License URI: http://www.gnu.org/licenses/gpl-2.0.html
76
Requires at least: WordPress 4.1
@@ -44,11 +43,9 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
4443

4544
= Audio/Video Conversion =
4645

47-
rtMedia has 3 premium solutions to take care of audio/video conversion.
46+
rtMedia has a premium solution to take care of audio/video conversion.
4847

49-
1. **[Audio/Video Transcoding Service](https://wordpress.org/plugins/transcoder/ "Audio/Video Transcoding Service")** - If free plan is not enough for you, there is monthly subscription service also. Easiest to setup.
50-
2. **[FFMPEG-Addon](https://rtmedia.io/products/rtmedia-ffmpeg-addon/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media "rtMedia FFMPEG Addon")** - Requires FFMPEG & Media-Node installed on a VPS/Dedicated server.
51-
3. **[Kaltura-Addon](https://rtmedia.io/products/rtmedia-kaltura-add-on/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media "rtMedia Kaltura Addon for Kaltura.com/Kaltura-CE/Kaltura On-Prem version")** - Requires a Kaltura.com account or Kaltura-CE or Kaltura-on-Prem server.
48+
* [Audio/Video Transcoding Service](https://wordpress.org/plugins/transcoder/ "Audio/Video Transcoding Service") - If free plan is not enough for you, there is monthly subscription service also. Easiest to setup.
5249

5350
= rtMedia Premium Addons =
5451

0 commit comments

Comments
 (0)