rtMedia for WordPress, BuddyPress and bbPress - Version 2.7.4

Version Description

  • Added french translation
  • Fixed Widget privacy
Download this release

Release Info

Developer saurabhshukla
Plugin Icon 128x128 rtMedia for WordPress, BuddyPress and bbPress
Version 2.7.4
Comparing to
See all releases

Code changes from version 2.7.3 to 2.7.4

app/assets/css/main.css CHANGED
@@ -219,9 +219,10 @@ position: relative;}
219
.media-tabs-container .ui-state-default a{text-decoration: none}
220
.media-tabs-container .ui-state-default.ui-state-active a{text-decoration: underline}
221
222
- .media-tabs-container .widget-item-listing li{margin-top: 10px;overflow: hidden;min-height: 52px}
223
- .media-tabs-container .widget-item-listing li img{max-width:52px; margin-right: 10px; float: left; display: block }
224
- .media-tabs-container .widget-item-listing li h3 {margin: 0}
225
.media-tabs-container .widget-item-listing li h3 a{font-size: 13px;font-weight: normal;word-wrap: break-word; }
226
227
#bp-media-show-more{width: 200px;margin-left: auto;margin-right: auto;display: block;height: 30px;line-height: 30px;font-size: 20px;}
219
.media-tabs-container .ui-state-default a{text-decoration: none}
220
.media-tabs-container .ui-state-default.ui-state-active a{text-decoration: underline}
221
222
+ .media-tabs-container .widget-item-listing li{position:relative; margin-top: 10px;overflow: hidden;min-height: 52px; float:left; width:50%;}
223
+ .media-tabs-container .widget-item-listing li img{max-width:90%; margin:0 auto; float: left; display: block }
224
+ .media-tabs-container .widget-item-listing li h3 {position:absolute; bottom:0;margin: 0; display:none; background:#fff none; width:100%;text-align:center;}
225
+ .media-tabs-container .widget-item-listing li:hover h3{display:block;}
226
.media-tabs-container .widget-item-listing li h3 a{font-size: 13px;font-weight: normal;word-wrap: break-word; }
227
228
#bp-media-show-more{width: 200px;margin-left: auto;margin-right: auto;display: block;height: 30px;line-height: 30px;font-size: 20px;}
app/main/widgets/BPMediaWidget.php CHANGED
@@ -31,29 +31,34 @@ if ( ! class_exists( 'BPMediaWidget' ) ) {
31
extract( $args );
32
echo $before_widget;
33
$title = apply_filters( 'widget_title', empty( $instance[ 'title' ] ) ? __( 'BuddyPress Media', BP_MEDIA_TXT_DOMAIN ) : $instance[ 'title' ], $instance, $this->id_base );
34
- $allow= array();
35
$allowed = array( );
36
if ( empty( $instance[ 'number' ] ) || ! $number = absint( $instance[ 'number' ] ) ) {
37
$number = 10;
38
}
39
$wdType = isset( $instance[ 'wdType' ] ) ? esc_attr( $instance[ 'wdType' ] ) : 'recent';
40
- if(isset( $instance[ 'allow_all' ] ) && (bool)$instance[ 'allow_all' ]===true)$allow[]='all';
41
- if(isset( $instance[ 'allow_image' ] ) && (bool)$instance[ 'allow_image' ]===true)$allow[]='image';
42
- if(isset( $instance[ 'allow_audio' ] ) && (bool)$instance[ 'allow_audio' ]===true)$allow[]='audio';
43
- if(isset( $instance[ 'allow_video' ] ) && (bool)$instance[ 'allow_video' ]===true)$allow[]='video';
44
45
global $bp_media;
46
$enabled = $bp_media->enabled();
47
- unset($enabled['album']);unset($enabled['upload']);
48
- foreach($allow as $type){
49
50
- if($type!='all'){
51
echo '<br>';
52
- if($enabled[$type]){
53
- $allowed[]= $type;
54
}
55
- }else{
56
- $allowed[]=$type;
57
}
58
}
59
echo $before_title . $title . $after_title;
@@ -85,47 +90,58 @@ if ( ! class_exists( 'BPMediaWidget' ) ) {
85
if ( count( $allowed ) > 3 ) {
86
unset( $allowed[ 'all' ] );
87
}
88
- $allowMimeType = array(); ?>
89
<div id="<?php echo $wdType; ?>-media-tabs" class="media-tabs-container media-tabs-container-tabs">
90
- <ul><?php
91
foreach ( $allowed as $type ) {
92
if ( $type != 'all' ) {
93
array_push( $allowMimeType, $type );
94
- } ?>
95
- <li><a href="#<?php echo $wdType; ?>-media-tabs-<?php echo $type; ?>-<?php echo $widgetid; ?>">
96
- <?php echo $strings[ $type ]; ?>
97
- </a></li><?php
98
- } ?>
99
- </ul><?php
100
- foreach ( $allowed as $type ) { ?>
101
- <div id="<?php echo $wdType; ?>-media-tabs-<?php echo $type; ?>-<?php echo $widgetid; ?>" class="bp-media-tab-panel"><?php
102
-
103
- $args = array(
104
- 'post_type' => 'attachment',
105
- 'post_status' => 'any',
106
- 'meta_key' => 'bp_media_privacy',
107
- 'meta_value' => 0,
108
- 'posts_per_page' => $number
109
- );
110
- if ( $type != 'all' )
111
- $args['post_mime_type'] = $type;
112
$bp_media_widget_query = new WP_Query( $args );
113
- if ( $bp_media_widget_query->have_posts() ) { ?>
114
- <ul class="widget-item-listing"><?php
115
while ( $bp_media_widget_query->have_posts() ) {
116
$bp_media_widget_query->the_post();
117
- try{
118
- $entry = new BPMediaHostWordpress( get_the_ID() );
119
- echo $entry->get_media_gallery_content();
120
- }catch (Exception $e){
121
echo '<li>';
122
- echo $e->getMessage();
123
- echo '<h3><a>Private</h3>';
124
- echo '</li>';
125
}
126
-
127
- } ?>
128
- </ul><?php
129
} else {
130
$media_string = $type;
131
if ( $type === 'all' ) {
@@ -133,10 +149,11 @@ if ( ! class_exists( 'BPMediaWidget' ) ) {
133
}
134
_e( 'No ' . $wdType . ' ' . $media_string . ' found', BP_MEDIA_TXT_DOMAIN );
135
}
136
- wp_reset_query(); ?>
137
138
- </div><?php
139
- } ?>
140
141
</div><?php
142
}
31
extract( $args );
32
echo $before_widget;
33
$title = apply_filters( 'widget_title', empty( $instance[ 'title' ] ) ? __( 'BuddyPress Media', BP_MEDIA_TXT_DOMAIN ) : $instance[ 'title' ], $instance, $this->id_base );
34
+ $allow = array( );
35
$allowed = array( );
36
if ( empty( $instance[ 'number' ] ) || ! $number = absint( $instance[ 'number' ] ) ) {
37
$number = 10;
38
}
39
$wdType = isset( $instance[ 'wdType' ] ) ? esc_attr( $instance[ 'wdType' ] ) : 'recent';
40
+ if ( isset( $instance[ 'allow_all' ] ) && (bool) $instance[ 'allow_all' ] === true )
41
+ $allow[ ] = 'all';
42
+ if ( isset( $instance[ 'allow_image' ] ) && (bool) $instance[ 'allow_image' ] === true )
43
+ $allow[ ] = 'image';
44
+ if ( isset( $instance[ 'allow_audio' ] ) && (bool) $instance[ 'allow_audio' ] === true )
45
+ $allow[ ] = 'audio';
46
+ if ( isset( $instance[ 'allow_video' ] ) && (bool) $instance[ 'allow_video' ] === true )
47
+ $allow[ ] = 'video';
48
49
global $bp_media;
50
$enabled = $bp_media->enabled();
51
+ unset( $enabled[ 'album' ] );
52
+ unset( $enabled[ 'upload' ] );
53
+ foreach ( $allow as $type ) {
54
55
+ if ( $type != 'all' ) {
56
echo '<br>';
57
+ if ( $enabled[ $type ] ) {
58
+ $allowed[ ] = $type;
59
}
60
+ } else {
61
+ $allowed[ ] = $type;
62
}
63
}
64
echo $before_title . $title . $after_title;
90
if ( count( $allowed ) > 3 ) {
91
unset( $allowed[ 'all' ] );
92
}
93
+ $allowMimeType = array( );
94
+ ?>
95
<div id="<?php echo $wdType; ?>-media-tabs" class="media-tabs-container media-tabs-container-tabs">
96
+ <ul><?php
97
foreach ( $allowed as $type ) {
98
if ( $type != 'all' ) {
99
array_push( $allowMimeType, $type );
100
+ }
101
+ ?>
102
+ <li><a href="#<?php echo $wdType; ?>-media-tabs-<?php echo $type; ?>-<?php echo $widgetid; ?>">
103
+ <?php echo $strings[ $type ]; ?>
104
+ </a></li><?php }
105
+ ?>
106
+ </ul><?php foreach ( $allowed as $type ) { ?>
107
+ <div id="<?php echo $wdType; ?>-media-tabs-<?php echo $type; ?>-<?php echo $widgetid; ?>" class="bp-media-tab-panel"><?php
108
+ $value = 0;
109
+ if ( is_user_logged_in() ) {
110
+ $value = 2;
111
+ }
112
+ $privacy_query = array(
113
+ array(
114
+ 'key' => 'bp_media_privacy',
115
+ 'value' => $value,
116
+ 'compare' => '<='
117
+ )
118
+ );
119
+ $args = array(
120
+ 'post_type' => 'attachment',
121
+ 'post_status' => 'any',
122
+ 'meta_query' => $privacy_query,
123
+ 'posts_per_page' => $number
124
+ );
125
+ if ( $type != 'all' )
126
+ $args[ 'post_mime_type' ] = $type;
127
$bp_media_widget_query = new WP_Query( $args );
128
+ if ( $bp_media_widget_query->have_posts() ) {
129
+ ?>
130
+ <ul class="widget-item-listing"><?php
131
while ( $bp_media_widget_query->have_posts() ) {
132
$bp_media_widget_query->the_post();
133
+ try {
134
+ $entry = new BPMediaHostWordpress( get_the_ID() );
135
+ echo $entry->get_media_gallery_content();
136
+ } catch ( Exception $e ) {
137
echo '<li>';
138
+ echo $e->getMessage();
139
+ echo '<h3><a>Private</h3>';
140
+ echo '</li>';
141
}
142
+ }
143
+ ?>
144
+ </ul><?php
145
} else {
146
$media_string = $type;
147
if ( $type === 'all' ) {
149
}
150
_e( 'No ' . $wdType . ' ' . $media_string . ' found', BP_MEDIA_TXT_DOMAIN );
151
}
152
+ wp_reset_query();
153
+ ?>
154
155
+ </div><?php }
156
+ ?>
157
158
</div><?php
159
}
index.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: BuddyPress Media
4
Plugin URI: http://rtcamp.com/buddypress-media/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
5
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!
6
- Version: 2.7.3
7
Author: rtCamp
8
Text Domain: buddypress-media
9
Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
3
Plugin Name: BuddyPress Media
4
Plugin URI: http://rtcamp.com/buddypress-media/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
5
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!
6
+ Version: 2.7.4
7
Author: rtCamp
8
Text Domain: buddypress-media
9
Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
languages/buddypress-media-de_DE.mo ADDED
Binary file
languages/buddypress-media-es_ES.mo ADDED
Binary file
languages/buddypress-media-fr_FR.mo ADDED
Binary file
languages/buddypress-media-it_IT.mo ADDED
Binary file
languages/buddypress-media-nl_NL.mo ADDED
Binary file
languages/buddypress-media-pl_PL.mo ADDED
Binary file
languages/buddypress-media-sr_SR.mo ADDED
Binary file
readme.txt CHANGED
@@ -6,7 +6,7 @@ License: GPLv2 or later
6
License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
Requires at least: WordPress 3.5 + BuddyPress 1.6
8
Tested up to: WordPress 3.5 + BuddyPress 1.6
9
- Stable tag: 2.7.3
10
11
Adds Photos, Music, Videos & Albums to BuddyPress. Supports mobile devices (iPhone/iPad, etc) and automatic audio/video conversion.
12
@@ -88,7 +88,8 @@ BuddyPress Media is now available in *Brazilian Portuguese*, *Spanish*, *Japanes
88
* [Japanese](https://rtcamp.com/translate/projects/buddypress-media/ja/default) translation by [Tetsu Yamaoka](http://twitter.com/ytetsu)
89
* [Polish](https://rtcamp.com/translate/projects/buddypress-media/pl/default) translation by [czemubynie](http://profiles.wordpress.org/czemubyniegmailcom/)
90
* [Serbian](https://rtcamp.com/translate/projects/buddypress-media/sr/default) translation by [nikolakica](http://profiles.wordpress.org/nikolakica/)
91
- * [German](https://rtcamp.com/translate/projects/buddypress-media/de/defaul) translation by [hannes.muc]
92
93
== Installation ==
94
@@ -121,8 +122,13 @@ Please visit [BuddyPress Media's Features page](http://rtcamp.com/buddypress-med
121
122
Please visit [BuddyPress Media's Roadmap page](http://rtcamp.com/buddypress-media/roadmap/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media "Visit BuddyPress Media's Features page") to get some details about future releases.
123
124
= 2.7.3 =
125
* Added option to toggle lightbox functionality to prevent theme conflicts
126
* Minor code revision
127
128
= 2.7.2 =
6
License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
Requires at least: WordPress 3.5 + BuddyPress 1.6
8
Tested up to: WordPress 3.5 + BuddyPress 1.6
9
+ Stable tag: 2.7.4
10
11
Adds Photos, Music, Videos & Albums to BuddyPress. Supports mobile devices (iPhone/iPad, etc) and automatic audio/video conversion.
12
88
* [Japanese](https://rtcamp.com/translate/projects/buddypress-media/ja/default) translation by [Tetsu Yamaoka](http://twitter.com/ytetsu)
89
* [Polish](https://rtcamp.com/translate/projects/buddypress-media/pl/default) translation by [czemubynie](http://profiles.wordpress.org/czemubyniegmailcom/)
90
* [Serbian](https://rtcamp.com/translate/projects/buddypress-media/sr/default) translation by [nikolakica](http://profiles.wordpress.org/nikolakica/)
91
+ * [German](https://rtcamp.com/translate/projects/buddypress-media/de/default) translation by [hannes.muc]
92
+ * [French](https://rtcamp.com/translate/projects/buddypress-media/fr/default) translation by [Peter Lewit](http://profiles.wordpress.org/deegan)
93
94
== Installation ==
95
122
123
Please visit [BuddyPress Media's Roadmap page](http://rtcamp.com/buddypress-media/roadmap/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media "Visit BuddyPress Media's Features page") to get some details about future releases.
124
125
+ = 2.7.4 =
126
+ * Added french translation
127
+ * Fixed Widget privacy
128
+
129
= 2.7.3 =
130
* Added option to toggle lightbox functionality to prevent theme conflicts
131
+ * Fixed conflict with Bottstrap based themes
132
* Minor code revision
133
134
= 2.7.2 =