rtMedia for WordPress, BuddyPress and bbPress - Version 2.6.7

Version Description

  • Fixes modular compatibility with friends component. Thanks to Cat555 for reporting this.
  • Fixes modular compatibility with friends component.
  • Fixes default privacy levels.
  • Minor Admin UI revisions.
  • Fixes load more on albums.
Download this release

Release Info

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

Code changes from version 2.6.6 to 2.6.7

app/admin/BPMediaAdmin.php CHANGED
@@ -36,7 +36,6 @@ if (!class_exists('BPMediaAdmin')) {
36
  if (is_multisite())
37
  add_action('network_admin_edit_bp_media', array($this, 'save_multisite_options'));
38
  }
39
- $this->bp_media_upgrade = new BPMediaUpgrade();
40
  $this->bp_media_settings = new BPMediaSettings();
41
  }
42
 
@@ -153,7 +152,7 @@ if (!class_exists('BPMediaAdmin')) {
153
  do_settings_sections($page);
154
  }
155
  ?>
156
- <div class="rt-link alignright"><?php _e('By', BP_MEDIA_TXT_DOMAIN); ?> <a href="http://rtcamp.com" title="<?php _e('Empowering The Web With WordPress', BP_MEDIA_TXT_DOMAIN); ?>"><img src="<?php echo BP_MEDIA_URL; ?>app/assets/img/rtcamp-logo.png"></a></div>
157
  </div>
158
 
159
  </form>
@@ -329,10 +328,8 @@ if (!class_exists('BPMediaAdmin')) {
329
 
330
  $message = sprintf(__('I use @buddypressmedia http://goo.gl/8Upmv on %s', BP_MEDIA_TXT_DOMAIN), home_url());
331
  $addons = '<label for="bp-media-add-linkback"><input' . checked(bp_get_option('bp_media_add_linkback', false), true, false) . ' type="checkbox" name="bp-media-add-linkback" value="1" id="bp-media-add-linkback"/> ' . __('Add link to footer', BP_MEDIA_TXT_DOMAIN) . '</label>
332
- <ul>
333
- <li><a href="http://twitter.com/home/?status=' . $message . '" target= "_blank"><input type="button" value="' . __('Tweet', BP_MEDIA_TXT_DOMAIN) . '" class="button button-tweet"></a></li>
334
- <li><a href="http://wordpress.org/support/view/plugin-reviews/buddypress-media?rate=5#postform" target= "_blank"><input type="button" value="' . __('Rate on WordPress.org', BP_MEDIA_TXT_DOMAIN) . '" class="button button-rating"></a></li>
335
- </ul>';
336
  new BPMediaAdminWidget('spread-the-word', __('Spread the Word', BP_MEDIA_TXT_DOMAIN), $addons);
337
 
338
  $donate = '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
36
  if (is_multisite())
37
  add_action('network_admin_edit_bp_media', array($this, 'save_multisite_options'));
38
  }
 
39
  $this->bp_media_settings = new BPMediaSettings();
40
  }
41
 
152
  do_settings_sections($page);
153
  }
154
  ?>
155
+ <div class="rt-link alignright"><?php _e('By', BP_MEDIA_TXT_DOMAIN); ?> <a href="http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media" title="<?php _e('Empowering The Web With WordPress', BP_MEDIA_TXT_DOMAIN); ?>"><img src="<?php echo BP_MEDIA_URL; ?>app/assets/img/rtcamp-logo.png"></a></div>
156
  </div>
157
 
158
  </form>
328
 
329
  $message = sprintf(__('I use @buddypressmedia http://goo.gl/8Upmv on %s', BP_MEDIA_TXT_DOMAIN), home_url());
330
  $addons = '<label for="bp-media-add-linkback"><input' . checked(bp_get_option('bp_media_add_linkback', false), true, false) . ' type="checkbox" name="bp-media-add-linkback" value="1" id="bp-media-add-linkback"/> ' . __('Add link to footer', BP_MEDIA_TXT_DOMAIN) . '</label>
331
+ <a href="http://twitter.com/home/?status=' . $message . '" class="button button-tweet" target= "_blank">'. __('Tweet', BP_MEDIA_TXT_DOMAIN).'</a>
332
+ <a href="http://wordpress.org/support/view/plugin-reviews/buddypress-media?rate=5#postform" class="button button-rating" target= "_blank">' . __('Rate on WordPress.org', BP_MEDIA_TXT_DOMAIN) . '</a>';
 
 
333
  new BPMediaAdminWidget('spread-the-word', __('Spread the Word', BP_MEDIA_TXT_DOMAIN), $addons);
334
 
335
  $donate = '<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
app/assets/css/main.css CHANGED
@@ -108,7 +108,8 @@ li #bp-media-uploaded-files{left: 0;position: absolute;top: 155px;}
108
  #debug-info{border:1px solid #CCC; overflow: hidden; padding: 10px; margin-top: 10px; -webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px; float: left; width: 588px;}
109
  .nav-tab-wrapper a#bp-media{background:url('../img/bpm-icon-32.png') transparent no-repeat; padding-left:32px;}
110
  .nav-tab-wrapper a#bp-media:hover,.nav-tab-wrapper a#bp-media.nav-tab-active{background-position:left -32px;}
111
- .metabox-holder .postbox#latest-news .inside ul li{background: transparent url('../img/rtCamp-bullet.png') left 4px no-repeat; padding-left: 26px;}
 
112
  #branding #logo{text-align:center;padding: 10px 0;display:block;}
113
  ul#social{display:block;text-align:center;margin:0;clear: both;}
114
  #branding #mc-embedded-subscribe-form{float: left;width: 100%;}
@@ -116,11 +117,13 @@ ul#social{display:block;text-align:center;margin:0;clear: both;}
116
  #branding #mc-embedded-subscribe{float: right;padding: 0 3px;}
117
  #branding #mce-EMAIL{float: left;}
118
  ul#social li{display:inline;}
 
 
119
  #spread-the-word .inside{text-align: center;}
120
- .wp-admin .button-tweet{background: #33ACE6; border-color: #3399DD #3399DD #2288CC; color: #FFFFFF !important; text-shadow: -1px -1px 0 #3399DD;}
121
- .wp-admin .button-tweet:hover{background: #3399DD;border-color: #2288CC;box-shadow: 0 0 4px rgba(82, 168, 236, 0.75);}
122
- .wp-admin .button-rating{background: #8A8A8A; border-color: #222; color: #FFFFFF !important; text-shadow: -1px -1px 0 #444;}
123
- .wp-admin .button-rating:hover{background: #7E7E7E;border-color: #444;box-shadow: 0 0 4px rgba(128,128,128, 0.75);}
124
  #bp-media-show-more{width: 200px;margin-left: auto;margin-right: auto;display: block;height: 30px;line-height: 30px;font-size: 20px;}
125
  #bp-media-upload-ui.activity-component{margin-left: 74px;margin-top: 10px;}
126
  ul#activity-stream li.media.album_updated ul{}
108
  #debug-info{border:1px solid #CCC; overflow: hidden; padding: 10px; margin-top: 10px; -webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px; float: left; width: 588px;}
109
  .nav-tab-wrapper a#bp-media{background:url('../img/bpm-icon-32.png') transparent no-repeat; padding-left:32px;}
110
  .nav-tab-wrapper a#bp-media:hover,.nav-tab-wrapper a#bp-media.nav-tab-active{background-position:left -32px;}
111
+ .metabox-holder .postbox#latest-news .inside ul li{background: transparent url('../img/bpm-icon-32.png') -5px 0px no-repeat; padding-left: 32px;}
112
+ .metabox-holder .postbox#latest-news .inside ul li:hover{background-position-y: -32px;}
113
  #branding #logo{text-align:center;padding: 10px 0;display:block;}
114
  ul#social{display:block;text-align:center;margin:0;clear: both;}
115
  #branding #mc-embedded-subscribe-form{float: left;width: 100%;}
117
  #branding #mc-embedded-subscribe{float: right;padding: 0 3px;}
118
  #branding #mce-EMAIL{float: left;}
119
  ul#social li{display:inline;}
120
+ #spread-the-word .button{display:inline-block; margin: 9px 5px 0 5px;}
121
+ #spread-the-word label{display:block;}
122
  #spread-the-word .inside{text-align: center;}
123
+ #spread-the-word .button-tweet{background: #33ACE6; border-color: #3399DD #3399DD #2288CC; color: #FFFFFF !important; text-shadow: -1px -1px 0 #3399DD;}
124
+ #spread-the-word .button-tweet:hover{background: #3399DD;border-color: #2288CC;box-shadow: 0 0 4px rgba(82, 168, 236, 0.75);}
125
+ #spread-the-word .button-rating{background: #8A8A8A; border-color: #222; color: #FFFFFF !important; text-shadow: -1px -1px 0 #444;}
126
+ #spread-the-word .button-rating:hover{background: #7E7E7E;border-color: #444;box-shadow: 0 0 4px rgba(128,128,128, 0.75);}
127
  #bp-media-show-more{width: 200px;margin-left: auto;margin-right: auto;display: block;height: 30px;line-height: 30px;font-size: 20px;}
128
  #bp-media-upload-ui.activity-component{margin-left: 74px;margin-top: 10px;}
129
  ul#activity-stream li.media.album_updated ul{}
app/helper/BPMediaAddon.php CHANGED
@@ -13,7 +13,7 @@ if (!class_exists('BPMediaAddon')) {
13
 
14
  class BPMediaAddon {
15
 
16
- public $enquiry_link = 'http://rtcamp.com/contact';
17
 
18
  public function coming_soon_div() {
19
  return
@@ -28,22 +28,22 @@ if (!class_exists('BPMediaAddon')) {
28
  array(
29
  'title' => __('BuddyPress-Media Kaltura Add-on', BP_MEDIA_TXT_DOMAIN),
30
  'img_src' => 'http://cdn.rtcamp.com/files/2012/10/new-buddypress-media-kaltura-logo-240x184.png',
31
- 'product_link' => 'http://rtcamp.com/store/buddypress-media-kaltura/',
32
  'desc' => '<p>' . __('Add support for more video formats using Kaltura video solution.', BP_MEDIA_TXT_DOMAIN) . '</p>
33
  <p>' . __('Works with Kaltura.com, self-hosted Kaltura-CE and Kaltura-on-premise.', BP_MEDIA_TXT_DOMAIN) . '</p>',
34
  'price' => '$99',
35
- 'demo_link' => 'http://demo.rtcamp.com/bpm-kaltura/',
36
- 'buy_now' => 'http://rtcamp.com/store/?add-to-cart=15446'
37
  ),
38
  array(
39
  'title' => __('BuddyPress-Media FFMPEG Add-on', BP_MEDIA_TXT_DOMAIN),
40
  'img_src' => 'http://cdn.rtcamp.com/files/2012/09/ffmpeg-logo-240x184.png',
41
- 'product_link' => 'http://rtcamp.com/store/buddypress-media-ffmpeg-converter/',
42
  'desc' => '<p>' . __('Add supports for more audio & video formats using open-source media-node.', BP_MEDIA_TXT_DOMAIN) . '</p>
43
  <p>' . __('Media node comes with automated setup script for Ubuntu/Debian.', BP_MEDIA_TXT_DOMAIN) . '</p>',
44
  'price' => '$49',
45
- 'demo_link' => 'http://demo.rtcamp.com/bpm-media',
46
- 'buy_now' => 'http://rtcamp.com/store/?add-to-cart=13677'
47
  )
48
  );
49
  $addons = apply_filters('bp_media_addons', $addons);
@@ -53,7 +53,7 @@ if (!class_exists('BPMediaAddon')) {
53
  }
54
 
55
  /**
56
- *
57
  * @global type $bp_media
58
  * @param type $args
59
  */
13
 
14
  class BPMediaAddon {
15
 
16
+ public $enquiry_link = 'http://rtcamp.com/contact/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media';
17
 
18
  public function coming_soon_div() {
19
  return
28
  array(
29
  'title' => __('BuddyPress-Media Kaltura Add-on', BP_MEDIA_TXT_DOMAIN),
30
  'img_src' => 'http://cdn.rtcamp.com/files/2012/10/new-buddypress-media-kaltura-logo-240x184.png',
31
+ 'product_link' => 'http://rtcamp.com/store/buddypress-media-kaltura/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
32
  'desc' => '<p>' . __('Add support for more video formats using Kaltura video solution.', BP_MEDIA_TXT_DOMAIN) . '</p>
33
  <p>' . __('Works with Kaltura.com, self-hosted Kaltura-CE and Kaltura-on-premise.', BP_MEDIA_TXT_DOMAIN) . '</p>',
34
  'price' => '$99',
35
+ 'demo_link' => 'http://demo.rtcamp.com/bpm-kaltura/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
36
+ 'buy_now' => 'http://rtcamp.com/store/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media&add-to-cart=15446'
37
  ),
38
  array(
39
  'title' => __('BuddyPress-Media FFMPEG Add-on', BP_MEDIA_TXT_DOMAIN),
40
  'img_src' => 'http://cdn.rtcamp.com/files/2012/09/ffmpeg-logo-240x184.png',
41
+ 'product_link' => 'http://rtcamp.com/store/buddypress-media-ffmpeg-converter/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
42
  'desc' => '<p>' . __('Add supports for more audio & video formats using open-source media-node.', BP_MEDIA_TXT_DOMAIN) . '</p>
43
  <p>' . __('Media node comes with automated setup script for Ubuntu/Debian.', BP_MEDIA_TXT_DOMAIN) . '</p>',
44
  'price' => '$49',
45
+ 'demo_link' => 'http://demo.rtcamp.com/bpm-media/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media',
46
+ 'buy_now' => 'http://rtcamp.com/store/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media&add-to-cart=13677'
47
  )
48
  );
49
  $addons = apply_filters('bp_media_addons', $addons);
53
  }
54
 
55
  /**
56
+ *
57
  * @global type $bp_media
58
  * @param type $args
59
  */
app/helper/BPMediaFeed.php CHANGED
@@ -8,7 +8,7 @@
8
  */
9
  class BPMediaFeed {
10
 
11
- public $feed_url = 'http://rtcamp.com/tag/buddypress/feed/';
12
 
13
  public function __construct($feed_url = '') {
14
  if ($feed_url)
@@ -20,7 +20,7 @@ class BPMediaFeed {
20
  */
21
 
22
  /**
23
- *
24
  * @global type $bp_media
25
  */
26
  public function fetch_feed() {
8
  */
9
  class BPMediaFeed {
10
 
11
+ public $feed_url = 'http://rtcamp.com/tag/buddypress/feed/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media';
12
 
13
  public function __construct($feed_url = '') {
14
  if ($feed_url)
20
  */
21
 
22
  /**
23
+ *
24
  * @global type $bp_media
25
  */
26
  public function fetch_feed() {
app/helper/BPMediaSettings.php CHANGED
@@ -5,216 +5,222 @@
5
  * @author Gagandeep Singh <gagandeep.singh@rtcamp.com>
6
  * @author Joshua Abenazer <joshua.abenazer@rtcamp.com>
7
  */
8
- if (!class_exists('BPMediaSettings')) {
9
-
10
- class BPMediaSettings {
11
-
12
- public function __construct() {
13
- add_action('admin_init', array($this, 'settings'));
14
- if (is_multisite()) {
15
- add_action('network_admin_notices', array($this, 'privacy_notice'));
16
- } else {
17
- add_action('admin_notices', array($this, 'privacy_notice'));
18
- }
19
- }
20
-
21
- /**
22
- * Register Settings
23
- *
24
- * @global string BP_MEDIA_TXT_DOMAIN
25
- */
26
-
27
- /**
28
- *
29
- * @global BPMediaAddon $bp_media_addon
30
- */
31
- public function settings() {
32
- global $bp_media, $bp_media_addon;
33
- add_settings_section('bpm-media-type', __('Activate BuddyPress Media', BP_MEDIA_TXT_DOMAIN), '', 'bp-media-settings');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
  // add_settings_field('bpm-admin-profile', __('User profiles', BP_MEDIA_TXT_DOMAIN), array($this, 'checkbox'), 'bp-media-settings', 'bpm-media-type', array(
35
  // 'setting' => 'bp_media_options',
36
  // 'option' => 'enable_on_profile',
37
  // 'desc' => __('Check to enable BuddyPress Media on User profiles', BP_MEDIA_TXT_DOMAIN)
38
  // )
39
  // );
40
- add_settings_field('bpm-admin-group', __('Groups', BP_MEDIA_TXT_DOMAIN), array($this, 'checkbox'), 'bp-media-settings', 'bpm-media-type', array(
41
- 'setting' => 'bp_media_options',
42
- 'option' => 'enable_on_group',
43
- 'desc' => __('Enable BuddyPress Media in Groups', BP_MEDIA_TXT_DOMAIN)
44
- )
45
- );
46
-
47
- add_settings_section('bpm-settings', __('Enabled Media Types', BP_MEDIA_TXT_DOMAIN), is_multisite() ? array($this, 'network_notices') : '', 'bp-media-settings');
48
- add_settings_field('bpm-video', __('Video', BP_MEDIA_TXT_DOMAIN), array($this, 'checkbox'), 'bp-media-settings', 'bpm-settings', array(
49
- 'setting' => 'bp_media_options',
50
- 'option' => 'videos_enabled',
51
- 'desc' => __('Enable videos', BP_MEDIA_TXT_DOMAIN)
52
- ));
53
- add_settings_field('bpm-audio', __('Audio', BP_MEDIA_TXT_DOMAIN), array($this, 'checkbox'), 'bp-media-settings', 'bpm-settings', array(
54
- 'setting' => 'bp_media_options',
55
- 'option' => 'audio_enabled',
56
- 'desc' => __('Enable audio', BP_MEDIA_TXT_DOMAIN)
57
- ));
58
- add_settings_field('bpm-image', __('Images', BP_MEDIA_TXT_DOMAIN), array($this, 'checkbox'), 'bp-media-settings', 'bpm-settings', array(
59
- 'setting' => 'bp_media_options',
60
- 'option' => 'images_enabled',
61
- 'desc' => __('Enable images', BP_MEDIA_TXT_DOMAIN)
62
- ));
63
-
64
- add_settings_section('bpm-media-fine', __('Media Display', BP_MEDIA_TXT_DOMAIN), '', 'bp-media-settings');
65
- add_settings_field('bpm-media-count', __('No. of media items per view', BP_MEDIA_TXT_DOMAIN), array($this, 'textbox'), 'bp-media-settings', 'bpm-media-fine', array(
66
- 'setting' => 'bp_media_options',
67
- 'option' => 'default_count',
68
- 'desc' => __('No. of media items displayed per view (defaults to 10)', BP_MEDIA_TXT_DOMAIN)
69
- ));
70
- add_settings_field('bpm-download', __('Download Button', BP_MEDIA_TXT_DOMAIN), array($this, 'checkbox'), 'bp-media-settings', 'bpm-media-fine', array(
71
- 'setting' => 'bp_media_options',
72
- 'option' => 'download_enabled',
73
- 'desc' => __('Display download button under media', BP_MEDIA_TXT_DOMAIN)
74
- ));
75
-
76
- if (BPMediaPrivacy::is_installed()) {
77
- add_settings_section('bpm-privacy', __('Privacy', BP_MEDIA_TXT_DOMAIN), '', 'bp-media-settings');
78
- add_settings_field('bpm-privacy-enabled', __('Enable Privacy', BP_MEDIA_TXT_DOMAIN), array($this, 'checkbox'), 'bp-media-settings', 'bpm-privacy', array(
79
- 'setting' => 'bp_media_options',
80
- 'option' => 'privacy_enabled',
81
- 'desc' => __('Enable privacy', BP_MEDIA_TXT_DOMAIN)
82
- ));
83
-
84
- add_settings_section('bpm-privacy-levels', __('Default Privacy Levels', BP_MEDIA_TXT_DOMAIN), '', 'bp-media-settings');
85
- add_settings_field('bpm-privacy-override-enabled', __('User Override', BP_MEDIA_TXT_DOMAIN), array($this, 'checkbox'), 'bp-media-settings', 'bpm-privacy-levels', array(
86
- 'setting' => 'bp_media_options',
87
- 'option' => 'privacy_override_enabled',
88
- 'desc' => __('Allow users to set privacy and override the defaults', BP_MEDIA_TXT_DOMAIN)
89
- ));
90
- add_settings_field('bpm-privacy-private-enabled', __('Default Privacy', BP_MEDIA_TXT_DOMAIN), array($this, 'radio'), 'bp-media-settings', 'bpm-privacy-levels', array(
91
- 'setting' => 'bp_media_options',
92
- 'option' => 'default_privacy_level',
93
- 'radios' => array(
94
- 6 => __('<strong>Private</strong>, Visible only to the user', BP_MEDIA_TXT_DOMAIN),
95
- 4 => __('<strong>Friends</strong>, Visible to user\'s friends', BP_MEDIA_TXT_DOMAIN),
96
- 2 => __('<strong>Users</strong>, Visible to registered users', BP_MEDIA_TXT_DOMAIN),
97
- 0 => __('<strong>Public</strong>, Visible to the world', BP_MEDIA_TXT_DOMAIN)
98
- ),
99
- 'default' => 0,
100
- ));
101
- }
102
- add_settings_section('bpm-miscellaneous', __('Miscellaneous Settings', BP_MEDIA_TXT_DOMAIN), '', 'bp-media-settings');
103
-
104
- add_settings_field('bpm-admin-bar-menu', __('Admin bar menu', BP_MEDIA_TXT_DOMAIN), array($this, 'checkbox'), 'bp-media-settings', 'bpm-miscellaneous', array(
105
- 'setting' => 'bp_media_options',
106
- 'option' => 'show_admin_menu',
107
- 'desc' => __('Enable menu in WordPress admin bar', BP_MEDIA_TXT_DOMAIN)
108
- )
109
- );
110
- add_settings_field('bpm-other-settings', __('Re-Count Media Entries', BP_MEDIA_TXT_DOMAIN), array($this, 'button'), 'bp-media-settings', 'bpm-miscellaneous', array(
111
- 'option' => 'refresh-count',
112
- 'name' => __('Re-Count', BP_MEDIA_TXT_DOMAIN),
113
- 'desc' => __('It will re-count all media entries of all users and correct any discrepancies.', BP_MEDIA_TXT_DOMAIN)
114
- ));
115
-
116
- $bp_media_addon = new BPMediaAddon();
117
- add_settings_section('bpm-addons', __('BuddyPress Media Addons for Audio/Video Conversion', BP_MEDIA_TXT_DOMAIN), array($bp_media_addon, 'get_addons'), 'bp-media-addons');
118
- add_settings_section('bpm-support', __('Submit a request form', BP_MEDIA_TXT_DOMAIN), '', 'bp-media-support');
119
- add_settings_field('bpm-request', __('Request Type', BP_MEDIA_TXT_DOMAIN), array($this, 'dropdown'), 'bp-media-support', 'bpm-support', array('option' => 'select-request', 'none' => false, 'values' => array(
120
- '' => '-- ' . __('Select One', BP_MEDIA_TXT_DOMAIN) . ' --',
121
- 'premium_support' => __('Premium Support', BP_MEDIA_TXT_DOMAIN),
122
- 'new_feature' => __('Suggest a New Feature', BP_MEDIA_TXT_DOMAIN),
123
- 'bug_report' => __('Submit a Bug Report', BP_MEDIA_TXT_DOMAIN))
124
- ));
125
- if (!BPMediaPrivacy::is_installed()) {
126
- $bp_media_privacy = new BPMediaPrivacySettings();
127
- add_filter('bp_media_add_sub_tabs', array($bp_media_privacy, 'ui'), 99, 2);
128
- add_settings_section('bpm-privacy', __('Update Database', BP_MEDIA_TXT_DOMAIN), array($bp_media_privacy, 'init'), 'bp-media-privacy');
129
- }
130
-
131
- add_settings_section('bpm-convert-videos', '', array($this, 'convert_videos_form'), 'bp-media-convert-videos');
132
-
133
- register_setting('bp_media', 'bp_media_options', array($this, 'sanitize'));
134
- }
135
-
136
- public function convert_videos_form() {
137
- global $current_user;
138
- get_currentuserinfo();
139
- ?>
140
- <div id="video-transcoding-main-container">
141
- <h2>Survey</h2>
142
- <p class="para-blockquote">We are planning an encoding service where you can convert videos without having to install/configure anything on your server.</p>
143
- <h3>Would you be interested?</h3>
144
- <label><input class="interested" name="interested" type="radio" value="Yes" required="required" /> Yes</label>&nbsp;&nbsp;&nbsp;
145
- <label><input class="not-interested" name="interested" type="radio" value="No" required="required" /> No</label>
146
- <div class="interested-container hidden">
147
- <p class="para-blockquote">Glad to see your interest.<br />
148
- Please provide a little more information to help us plan this service better.</p>
149
- <label><h3>Email</h3> <input class="email" type="email" name="email" size="35" value="<?php echo $current_user->user_email; ?>" placeholder="Email" /></label>
150
-
151
- <h3>How would you use this feature?</h3>
152
- <ul>
153
- <li><label><input class="choice-free" type="radio" name="choice" value="Free" /> Free-only. I will use free-encoding quota only.</label></li>
154
- <li><label><input type="radio" name="choice" value="$9" /> I am ready to pay $9 per month for generous encoding quota.</label></li>
155
- <li><label><input type="radio" name="choice" value="$99" /> I am ready to pay $99 per month for unlimited video encoding!</label></li>
156
- </div>
157
- <input class="url" type="hidden" name="url" value="<?php echo home_url(); ?>" />
158
- <br />
159
- <br />
160
- <input class="button button-primary video-transcoding-survey" type="submit" value="Submit" />
161
- </div><?php
162
- }
163
-
164
- public function network_notices() {
165
- $flag = 1;
166
- if (get_site_option('bpm-media-enable', false)) {
167
- echo '<div id="setting-error-bpm-media-enable" class="error"><p><strong>' . get_site_option('bpm-media-enable') . '</strong></p></div>';
168
- delete_site_option('bpm-media-enable');
169
- $flag = 0;
170
- }
171
- if (get_site_option('bpm-media-type', false)) {
172
- echo '<div id="setting-error-bpm-media-type" class="error"><p><strong>' . get_site_option('bpm-media-type') . '</strong></p></div>';
173
- delete_site_option('bpm-media-type');
174
- $flag = 0;
175
- }
176
-
177
- if (get_site_option('bpm-recount-success', false)) {
178
- echo '<div id="setting-error-bpm-recount-success" class="updated"><p><strong>' . get_site_option('bpm-recount-success') . '</strong></p></div>';
179
- delete_site_option('bpm-recount-success');
180
- $flag = 0;
181
- } elseif (get_site_option('bpm-recount-fail', false)) {
182
- echo '<div id="setting-error-bpm-recount-fail" class="error"><p><strong>' . get_site_option('bpm-recount-fail') . '</strong></p></div>';
183
- delete_site_option('bpm-recount-fail');
184
- $flag = 0;
185
- }
186
-
187
- if (get_site_option('bpm-settings-saved') && $flag) {
188
- echo '<div id="setting-error-bpm-settings-saved" class="updated"><p><strong>' . get_site_option('bpm-settings-saved') . '</strong></p></div>';
189
- }
190
- delete_site_option('bpm-settings-saved');
191
- }
192
-
193
- /**
194
- * Sanitizes the settings
195
- */
196
-
197
- /**
198
- *
199
- * @global type $bp_media_admin
200
- * @param type $input
201
- * @return type
202
- */
203
- public function sanitize($input) {
204
- global $bp_media_admin;
205
- if (isset($_POST['refresh-count'])) {
206
- if ($bp_media_admin->update_count()) {
207
- if (is_multisite())
208
- update_site_option('bpm-recount-success', __('Recounting of media files done successfully', BP_MEDIA_TXT_DOMAIN));
209
- else
210
- add_settings_error(__('Recount Success', BP_MEDIA_TXT_DOMAIN), 'bpm-recount-success', __('Recounting of media files done successfully', BP_MEDIA_TXT_DOMAIN), 'updated');
211
- } else {
212
- if (is_multisite())
213
- update_site_option('bpm-recount-fail', __('Recounting Failed', BP_MEDIA_TXT_DOMAIN));
214
- else
215
- add_settings_error(__('Recount Fail', BP_MEDIA_TXT_DOMAIN), 'bpm-recount-fail', __('Recounting Failed', BP_MEDIA_TXT_DOMAIN));
216
- }
217
- }
218
  // if (!isset($_POST['bp_media_options']['enable_on_profile']) && !isset($_POST['bp_media_options']['enable_on_group'])) {
219
  // if (is_multisite())
220
  // update_site_option('bpm-media-enable', __('Enable BuddyPress Media on either User Profiles or Groups or both. Atleast one should be selected.', BP_MEDIA_TXT_DOMAIN));
@@ -222,259 +228,259 @@ if (!class_exists('BPMediaSettings')) {
222
  // add_settings_error(__('Enable BuddyPress Media', BP_MEDIA_TXT_DOMAIN), 'bpm-media-enable', __('Enable BuddyPress Media on either User Profiles or Groups or both. Atleast one should be selected.', BP_MEDIA_TXT_DOMAIN));
223
  // $input['enable_on_profile'] = 1;
224
  // }
225
- if (!isset($_POST['bp_media_options']['videos_enabled']) && !isset($_POST['bp_media_options']['audio_enabled']) && !isset($_POST['bp_media_options']['images_enabled'])) {
226
- if (is_multisite())
227
- update_site_option('bpm-media-type', __('Atleast one Media Type Must be selected', BP_MEDIA_TXT_DOMAIN));
228
- else
229
- add_settings_error(__('Media Type', BP_MEDIA_TXT_DOMAIN), 'bpm-media-type', __('Atleast one Media Type Must be selected', BP_MEDIA_TXT_DOMAIN));
230
- $input['images_enabled'] = 1;
231
- }
232
- if (is_multisite())
233
- update_site_option('bpm-settings-saved', __('Settings saved.', BP_MEDIA_TXT_DOMAIN));
234
- do_action('bp_media_sanitize_settings', $_POST, $input);
235
- return $input;
236
- }
237
-
238
- /**
239
- * Output a checkbox
240
- *
241
- * @global array $bp_media
242
- * @param array $args
243
- */
244
-
245
- /**
246
- *
247
- * @global array $bp_media
248
- * @param type $args
249
- * @return type
250
- */
251
- public function checkbox($args) {
252
- global $bp_media;
253
- $options = $bp_media->options;
254
- $defaults = array(
255
- 'setting' => '',
256
- 'option' => '',
257
- 'desc' => '',
258
- );
259
- $args = wp_parse_args($args, $defaults);
260
- extract($args);
261
- if (empty($option)) {
262
- trigger_error(__('Please provide "option" value ( required ) in the argument. Pass argument to add_settings_field in the following format array( \'option\' => \'option_name\' ) ', BP_MEDIA_TXT_DOMAIN));
263
- return;
264
- }
265
-
266
- if (!empty($setting)) {
267
- $name = $setting . '[' . $option . ']';
268
- $options = bp_get_option($setting);
269
- } else
270
- $name = $option;
271
-
272
- if (!isset($options[$option]))
273
- $options[$option] = '';
274
- ?>
275
- <label for="<?php echo $option; ?>">
276
- <input<?php checked($options[$option]); ?> name="<?php echo $name; ?>" id="<?php echo $option; ?>" value="1" type="checkbox" />
277
- <?php echo $desc; ?>
278
- </label><?php
279
- }
280
-
281
- /**
282
- * Outputs Radio Buttons
283
- *
284
- * @global array $bp_media
285
- * @param array $args
286
- */
287
-
288
- /**
289
- *
290
- * @global array $bp_media
291
- * @param type $args
292
- * @return type
293
- */
294
- public function radio($args) {
295
- global $bp_media;
296
- $options = $bp_media->options;
297
- $defaults = array(
298
- 'setting' => '',
299
- 'option' => '',
300
- 'radios' => array(),
301
- 'default' => '',
302
- );
303
- $args = wp_parse_args($args, $defaults);
304
- extract($args);
305
- if (empty($option) || ( 2 > count($radios) )) {
306
- if (empty($option))
307
- trigger_error(__('Please provide "option" value ( required ) in the argument. Pass argument to add_settings_field in the following format array( \'option\' => \'option_name\' )', BP_MEDIA_TXT_DOMAIN));
308
- if (2 > count($radios))
309
- trigger_error(__('Need to specify atleast to radios else use a checkbox instead', BP_MEDIA_TXT_DOMAIN));
310
- return;
311
- }
312
-
313
- if (!empty($setting)) {
314
- $name = $setting . '[' . $option . ']';
315
- $options = bp_get_option($setting);
316
- } else
317
- $name = $option;
318
-
319
- if ((isset($options[$option]) && empty($options[$option])) || !isset($options[$option])) {
320
- $options[$option] = $default;
321
- }
322
-
323
- foreach ($radios as $value => $desc) {
324
- ?>
325
- <label for="<?php echo sanitize_title($desc); ?>"><input<?php checked($options[$option], $value); ?> value="<?php echo $value; ?>" name="<?php echo $name; ?>" id="<?php echo sanitize_title($desc); ?>" type="radio" /><?php echo $desc; ?></label><br /><?php
326
- }
327
- }
328
-
329
- /**
330
- * Outputs Textbox
331
- *
332
- * @global array $bp_media
333
- * @param array $args
334
- */
335
-
336
- /**
337
- *
338
- * @global array $bp_media
339
- * @param type $args
340
- * @return type
341
- */
342
- public function textbox($args) {
343
- global $bp_media;
344
- $options = $bp_media->options;
345
- $defaults = array(
346
- 'setting' => '',
347
- 'option' => '',
348
- 'desc' => '',
349
- 'password' => false,
350
- 'hidden' => false,
351
- );
352
- $args = wp_parse_args($args, $defaults);
353
- extract($args);
354
- if (empty($option)) {
355
- trigger_error(__('Please provide "option" value ( required ) in the argument. Pass argument to add_settings_field in the following format array( \'option\' => \'option_name\' )', BP_MEDIA_TXT_DOMAIN));
356
- return;
357
- }
358
-
359
- if (!empty($setting)) {
360
- $name = $setting . '[' . $option . ']';
361
- $options = bp_get_option($setting);
362
- } else
363
- $name = $option;
364
-
365
- if ((isset($options[$option]) && empty($options[$option])) || !isset($options[$option])) {
366
- $options[$option] = '';
367
- }
368
- ?>
369
- <label for="<?php echo sanitize_title($option); ?>"><input value="<?php echo $options[$option]; ?>" name="<?php echo $name; ?>" id="<?php echo sanitize_title($option); ?>" type="<?php echo $password ? 'password' : ($hidden ? $hidden : 'text'); ?>" /><?php
370
- if (!empty($desc)) {
371
- echo '<br /><span class="description">' . $desc . '</span>';
372
- }
373
- ?></label><br /><?php
374
- }
375
-
376
- /**
377
- * Outputs Dropdown
378
- *
379
- * @global array $bp_media
380
- * @param array $args
381
- */
382
-
383
- /**
384
- *
385
- * @param type $args
386
- * @return type
387
- */
388
- public function dropdown($args) {
389
- $defaults = array(
390
- 'setting' => '',
391
- 'option' => '',
392
- 'none' => true,
393
- 'values' => ''
394
- );
395
- $args = wp_parse_args($args, $defaults);
396
- extract($args);
397
- if (empty($option) || empty($values)) {
398
- if (empty($option))
399
- trigger_error(__('Please provide "option" value ( required ) in the argument. Pass argument to add_settings_field in the following format array( \'option\' => \'option_name\' )', BP_MEDIA_TXT_DOMAIN));
400
- if (empty($values))
401
- trigger_error(__('Please provide some values to populate the dropdown. Format : array( \'value\' => \'option\' )', BP_MEDIA_TXT_DOMAIN));
402
- return;
403
- }
404
-
405
- if (!empty($setting)) {
406
- $name = $setting . '[' . $option . ']';
407
- $options = bp_get_option($setting);
408
- } else
409
- $name = $option;
410
-
411
- if ((isset($options[$option]) && empty($options[$option])) || !isset($options[$option])) {
412
- $options[$option] = '';
413
- }
414
- ?>
415
- <select name="<?php echo $name; ?>" id="<?php echo $option; ?>"><?php if ($none) { ?>
416
- <option><?php __e('None', BP_MEDIA_TXT_DOMAIN); ?></option><?php
417
- }
418
- foreach ($values as $value => $text) {
419
- ?>
420
- <option<?php selected($options[$option], $value); ?> value="<?php echo $value; ?>"><?php echo $text; ?></option><?php }
421
- ?>
422
- </select><?php
423
- }
424
-
425
- /**
426
- * Outputs a Button
427
- *
428
- * @global array $bp_media
429
- * @param array $args
430
- */
431
-
432
- /**
433
- *
434
- * @param type $args
435
- * @return type
436
- */
437
- public function button($args) {
438
- $defaults = array(
439
- 'setting' => '',
440
- 'option' => '',
441
- 'name' => 'Save Changes',
442
- 'desc' => '',
443
- );
444
- $args = wp_parse_args($args, $defaults);
445
- extract($args);
446
- if (empty($option)) {
447
- trigger_error('Please provide "option" value ( Required ) in the argument. Pass argument to add_settings_field in the following format array( \'option\' => \'option_name\', \'link\' => \'linkurl\' )');
448
- return;
449
- }
450
- if (!empty($setting)) {
451
- $button = $setting . '[' . $option . ']';
452
- } else
453
- $button = $option;
454
- submit_button($name, '', $button, false);
455
- if (!empty($desc)) {
456
- ?>
457
- <span class="description"><?php echo $desc; ?></a><?php
458
- }
459
- }
460
-
461
- public function privacy_notice() {
462
- if (BPMediaPrivacy::is_installed())
463
- return;
464
- $url = add_query_arg(
465
- array('page' => 'bp-media-privacy'), (is_multisite() ? network_admin_url('admin.php') : admin_url('admin.php'))
466
- );
467
-
468
- $notice = '
469
  <div class="error">
470
- <p>' . __('BuddyPress Media 2.6 requires a database upgrade. ', BP_MEDIA_TXT_DOMAIN)
471
- . '<a href="' . $url . '">' . __('Update Database', BP_MEDIA_TXT_DOMAIN) . '.</a></p>
472
  </div>
473
  ';
474
- echo $notice;
475
- }
476
 
477
- }
478
 
479
  }
480
- ?>
5
  * @author Gagandeep Singh <gagandeep.singh@rtcamp.com>
6
  * @author Joshua Abenazer <joshua.abenazer@rtcamp.com>
7
  */
8
+ if ( ! class_exists( 'BPMediaSettings' ) ) {
9
+
10
+ class BPMediaSettings {
11
+
12
+ public function __construct() {
13
+ add_action( 'admin_init', array( $this, 'settings' ) );
14
+ if ( is_multisite() ) {
15
+ add_action( 'network_admin_notices', array( $this, 'privacy_notice' ) );
16
+ } else {
17
+ add_action( 'admin_notices', array( $this, 'privacy_notice' ) );
18
+ }
19
+ }
20
+
21
+ /**
22
+ * Register Settings
23
+ *
24
+ * @global string BP_MEDIA_TXT_DOMAIN
25
+ */
26
+
27
+ /**
28
+ *
29
+ * @global BPMediaAddon $bp_media_addon
30
+ */
31
+ public function settings() {
32
+ global $bp_media, $bp_media_addon;
33
+ add_settings_section( 'bpm-settings', __( 'Enabled Media Types', BP_MEDIA_TXT_DOMAIN ), is_multisite() ? array( $this, 'network_notices' ) : '', 'bp-media-settings' );
34
+ add_settings_field( 'bpm-image', __( 'Photos', BP_MEDIA_TXT_DOMAIN ), array( $this, 'checkbox' ), 'bp-media-settings', 'bpm-settings', array(
35
+ 'setting' => 'bp_media_options',
36
+ 'option' => 'images_enabled',
37
+ 'desc' => __( 'Enable Photos', BP_MEDIA_TXT_DOMAIN )
38
+ ) );
39
+ add_settings_field( 'bpm-video', __( 'Video', BP_MEDIA_TXT_DOMAIN ), array( $this, 'checkbox' ), 'bp-media-settings', 'bpm-settings', array(
40
+ 'setting' => 'bp_media_options',
41
+ 'option' => 'videos_enabled',
42
+ 'desc' => __( 'Enable Video', BP_MEDIA_TXT_DOMAIN )
43
+ ) );
44
+ add_settings_field( 'bpm-audio', __( 'Audio', BP_MEDIA_TXT_DOMAIN ), array( $this, 'checkbox' ), 'bp-media-settings', 'bpm-settings', array(
45
+ 'setting' => 'bp_media_options',
46
+ 'option' => 'audio_enabled',
47
+ 'desc' => __( 'Enable Audio', BP_MEDIA_TXT_DOMAIN )
48
+ ) );
49
+
50
+ if ( bp_is_active( 'groups' ) ) {
51
+ add_settings_section( 'bpm-media-type', __( 'Groups Integration', BP_MEDIA_TXT_DOMAIN ), '', 'bp-media-settings' );
52
  // add_settings_field('bpm-admin-profile', __('User profiles', BP_MEDIA_TXT_DOMAIN), array($this, 'checkbox'), 'bp-media-settings', 'bpm-media-type', array(
53
  // 'setting' => 'bp_media_options',
54
  // 'option' => 'enable_on_profile',
55
  // 'desc' => __('Check to enable BuddyPress Media on User profiles', BP_MEDIA_TXT_DOMAIN)
56
  // )
57
  // );
58
+ add_settings_field( 'bpm-admin-group', __( 'Groups', BP_MEDIA_TXT_DOMAIN ), array( $this, 'checkbox' ), 'bp-media-settings', 'bpm-media-type', array(
59
+ 'setting' => 'bp_media_options',
60
+ 'option' => 'enable_on_group',
61
+ 'desc' => __( 'Allow Media in Groups', BP_MEDIA_TXT_DOMAIN )
62
+ )
63
+ );
64
+ }
65
+
66
+
67
+
68
+ add_settings_section( 'bpm-media-fine', __( 'Display Settings', BP_MEDIA_TXT_DOMAIN ), '', 'bp-media-settings' );
69
+ add_settings_field( 'bpm-media-count', __( 'Number of media', BP_MEDIA_TXT_DOMAIN ), array( $this, 'textbox' ), 'bp-media-settings', 'bpm-media-fine', array(
70
+ 'setting' => 'bp_media_options',
71
+ 'option' => 'default_count'
72
+ ) );
73
+ add_settings_field( 'bpm-download', __( 'Download Button', BP_MEDIA_TXT_DOMAIN ), array( $this, 'checkbox' ), 'bp-media-settings', 'bpm-media-fine', array(
74
+ 'setting' => 'bp_media_options',
75
+ 'option' => 'download_enabled',
76
+ 'desc' => __( 'Display download button under media', BP_MEDIA_TXT_DOMAIN )
77
+ ) );
78
+
79
+ if ( BPMediaPrivacy::is_installed() ) {
80
+ add_settings_section( 'bpm-privacy', __( 'Privacy Settings', BP_MEDIA_TXT_DOMAIN ), '', 'bp-media-settings' );
81
+ add_settings_field( 'bpm-privacy-enabled', __( 'Enable Privacy', BP_MEDIA_TXT_DOMAIN ), array( $this, 'checkbox' ), 'bp-media-settings', 'bpm-privacy', array(
82
+ 'setting' => 'bp_media_options',
83
+ 'option' => 'privacy_enabled',
84
+ 'desc' => __( 'Enable privacy', BP_MEDIA_TXT_DOMAIN )
85
+ ) );
86
+
87
+ $settings = array(
88
+ 6 => __( '<strong>Private</strong> - Visible only to the user', BP_MEDIA_TXT_DOMAIN ),
89
+ 4 => __( '<strong>Friends</strong> - Visible to user\'s friends', BP_MEDIA_TXT_DOMAIN ),
90
+ 2 => __( '<strong>Users</strong> - Visible to registered users', BP_MEDIA_TXT_DOMAIN ),
91
+ 0 => __( '<strong>Public</strong> - Visible to the world', BP_MEDIA_TXT_DOMAIN )
92
+ );
93
+ if ( ! bp_is_active( 'friends' ) ) {
94
+ unset( $settings[ 4 ] );
95
+ }
96
+ add_settings_field( 'bpm-privacy-private-enabled', __( 'Default Privacy', BP_MEDIA_TXT_DOMAIN ), array( $this, 'radio' ), 'bp-media-settings', 'bpm-privacy', array(
97
+ 'setting' => 'bp_media_options',
98
+ 'option' => 'default_privacy_level',
99
+ 'radios' => $settings,
100
+ 'default' => 0,
101
+ ) );
102
+ add_settings_field( 'bpm-privacy-override-enabled', __( 'User Override', BP_MEDIA_TXT_DOMAIN ), array( $this, 'checkbox' ), 'bp-media-settings', 'bpm-privacy', array(
103
+ 'setting' => 'bp_media_options',
104
+ 'option' => 'privacy_override_enabled',
105
+ 'desc' => __( 'Allow users to override admin defaults (<em>Recommended</em>)', BP_MEDIA_TXT_DOMAIN )
106
+ ) );
107
+ }
108
+ add_settings_section( 'bpm-miscellaneous', __( 'Other Settings', BP_MEDIA_TXT_DOMAIN ), '', 'bp-media-settings' );
109
+
110
+ add_settings_field( 'bpm-admin-bar-menu', __( 'Admin bar menu', BP_MEDIA_TXT_DOMAIN ), array( $this, 'checkbox' ), 'bp-media-settings', 'bpm-miscellaneous', array(
111
+ 'setting' => 'bp_media_options',
112
+ 'option' => 'show_admin_menu',
113
+ 'desc' => __( 'Enable menu in WordPress admin bar', BP_MEDIA_TXT_DOMAIN )
114
+ )
115
+ );
116
+ add_settings_field( 'bpm-other-settings', __( 'Recount', BP_MEDIA_TXT_DOMAIN ), array( $this, 'button' ), 'bp-media-settings', 'bpm-miscellaneous', array(
117
+ 'option' => 'refresh-count',
118
+ 'name' => __( 'Recount', BP_MEDIA_TXT_DOMAIN ),
119
+ 'desc' => __( 'Repair media counts', BP_MEDIA_TXT_DOMAIN )
120
+ ) );
121
+
122
+ $bp_media_addon = new BPMediaAddon();
123
+ add_settings_section( 'bpm-addons', __( 'BuddyPress Media Addons for Audio/Video Conversion', BP_MEDIA_TXT_DOMAIN ), array( $bp_media_addon, 'get_addons' ), 'bp-media-addons' );
124
+ add_settings_section( 'bpm-support', __( 'Submit a request form', BP_MEDIA_TXT_DOMAIN ), '', 'bp-media-support' );
125
+ add_settings_field( 'bpm-request', __( 'Request Type', BP_MEDIA_TXT_DOMAIN ), array( $this, 'dropdown' ), 'bp-media-support', 'bpm-support', array( 'option' => 'select-request', 'none' => false, 'values' => array(
126
+ '' => '-- ' . __( 'Select One', BP_MEDIA_TXT_DOMAIN ) . ' --',
127
+ 'premium_support' => __( 'Premium Support', BP_MEDIA_TXT_DOMAIN ),
128
+ 'new_feature' => __( 'Suggest a New Feature', BP_MEDIA_TXT_DOMAIN ),
129
+ 'bug_report' => __( 'Submit a Bug Report', BP_MEDIA_TXT_DOMAIN ) )
130
+ ) );
131
+ if ( ! BPMediaPrivacy::is_installed() ) {
132
+ $bp_media_privacy = new BPMediaPrivacySettings();
133
+ add_filter( 'bp_media_add_sub_tabs', array( $bp_media_privacy, 'ui' ), 99, 2 );
134
+ add_settings_section( 'bpm-privacy', __( 'Update Database', BP_MEDIA_TXT_DOMAIN ), array( $bp_media_privacy, 'init' ), 'bp-media-privacy' );
135
+ }
136
+
137
+ add_settings_section( 'bpm-convert-videos', '', array( $this, 'convert_videos_form' ), 'bp-media-convert-videos' );
138
+
139
+ register_setting( 'bp_media', 'bp_media_options', array( $this, 'sanitize' ) );
140
+ }
141
+
142
+ public function convert_videos_form() {
143
+ global $current_user;
144
+ get_currentuserinfo();
145
+ ?>
146
+ <div id="video-transcoding-main-container">
147
+ <h2>Survey</h2>
148
+ <p class="para-blockquote">We are planning an encoding service where you can convert videos without having to install/configure anything on your server.</p>
149
+ <h3>Would you be interested?</h3>
150
+ <label><input class="interested" name="interested" type="radio" value="Yes" required="required" /> Yes</label>&nbsp;&nbsp;&nbsp;
151
+ <label><input class="not-interested" name="interested" type="radio" value="No" required="required" /> No</label>
152
+ <div class="interested-container hidden">
153
+ <p class="para-blockquote">Glad to see your interest.<br />
154
+ Please provide a little more information to help us plan this service better.</p>
155
+ <label><h3>Email</h3> <input class="email" type="email" name="email" size="35" value="<?php echo $current_user->user_email; ?>" placeholder="Email" /></label>
156
+
157
+ <h3>How would you use this feature?</h3>
158
+ <ul>
159
+ <li><label><input class="choice-free" type="radio" name="choice" value="Free" /> Free-only. I will use free-encoding quota only.</label></li>
160
+ <li><label><input type="radio" name="choice" value="$9" /> I am ready to pay $9 per month for generous encoding quota.</label></li>
161
+ <li><label><input type="radio" name="choice" value="$99" /> I am ready to pay $99 per month for unlimited video encoding!</label></li>
162
+ </div>
163
+ <input class="url" type="hidden" name="url" value="<?php echo home_url(); ?>" />
164
+ <br />
165
+ <br />
166
+ <input class="button button-primary video-transcoding-survey" type="submit" value="Submit" />
167
+ </div><?php
168
+ }
169
+
170
+ public function network_notices() {
171
+ $flag = 1;
172
+ if ( get_site_option( 'bpm-media-enable', false ) ) {
173
+ echo '<div id="setting-error-bpm-media-enable" class="error"><p><strong>' . get_site_option( 'bpm-media-enable' ) . '</strong></p></div>';
174
+ delete_site_option( 'bpm-media-enable' );
175
+ $flag = 0;
176
+ }
177
+ if ( get_site_option( 'bpm-media-type', false ) ) {
178
+ echo '<div id="setting-error-bpm-media-type" class="error"><p><strong>' . get_site_option( 'bpm-media-type' ) . '</strong></p></div>';
179
+ delete_site_option( 'bpm-media-type' );
180
+ $flag = 0;
181
+ }
182
+
183
+ if ( get_site_option( 'bpm-recount-success', false ) ) {
184
+ echo '<div id="setting-error-bpm-recount-success" class="updated"><p><strong>' . get_site_option( 'bpm-recount-success' ) . '</strong></p></div>';
185
+ delete_site_option( 'bpm-recount-success' );
186
+ $flag = 0;
187
+ } elseif ( get_site_option( 'bpm-recount-fail', false ) ) {
188
+ echo '<div id="setting-error-bpm-recount-fail" class="error"><p><strong>' . get_site_option( 'bpm-recount-fail' ) . '</strong></p></div>';
189
+ delete_site_option( 'bpm-recount-fail' );
190
+ $flag = 0;
191
+ }
192
+
193
+ if ( get_site_option( 'bpm-settings-saved' ) && $flag ) {
194
+ echo '<div id="setting-error-bpm-settings-saved" class="updated"><p><strong>' . get_site_option( 'bpm-settings-saved' ) . '</strong></p></div>';
195
+ }
196
+ delete_site_option( 'bpm-settings-saved' );
197
+ }
198
+
199
+ /**
200
+ * Sanitizes the settings
201
+ */
202
+
203
+ /**
204
+ *
205
+ * @global type $bp_media_admin
206
+ * @param type $input
207
+ * @return type
208
+ */
209
+ public function sanitize( $input ) {
210
+ global $bp_media_admin;
211
+ if ( isset( $_POST[ 'refresh-count' ] ) ) {
212
+ if ( $bp_media_admin->update_count() ) {
213
+ if ( is_multisite() )
214
+ update_site_option( 'bpm-recount-success', __( 'Recounting of media files done successfully', BP_MEDIA_TXT_DOMAIN ) );
215
+ else
216
+ add_settings_error( __( 'Recount Success', BP_MEDIA_TXT_DOMAIN ), 'bpm-recount-success', __( 'Recounting of media files done successfully', BP_MEDIA_TXT_DOMAIN ), 'updated' );
217
+ } else {
218
+ if ( is_multisite() )
219
+ update_site_option( 'bpm-recount-fail', __( 'Recounting Failed', BP_MEDIA_TXT_DOMAIN ) );
220
+ else
221
+ add_settings_error( __( 'Recount Fail', BP_MEDIA_TXT_DOMAIN ), 'bpm-recount-fail', __( 'Recounting Failed', BP_MEDIA_TXT_DOMAIN ) );
222
+ }
223
+ }
 
 
 
 
 
 
 
 
 
 
 
 
224
  // if (!isset($_POST['bp_media_options']['enable_on_profile']) && !isset($_POST['bp_media_options']['enable_on_group'])) {
225
  // if (is_multisite())
226
  // update_site_option('bpm-media-enable', __('Enable BuddyPress Media on either User Profiles or Groups or both. Atleast one should be selected.', BP_MEDIA_TXT_DOMAIN));
228
  // add_settings_error(__('Enable BuddyPress Media', BP_MEDIA_TXT_DOMAIN), 'bpm-media-enable', __('Enable BuddyPress Media on either User Profiles or Groups or both. Atleast one should be selected.', BP_MEDIA_TXT_DOMAIN));
229
  // $input['enable_on_profile'] = 1;
230
  // }
231
+ if ( ! isset( $_POST[ 'bp_media_options' ][ 'videos_enabled' ] ) && ! isset( $_POST[ 'bp_media_options' ][ 'audio_enabled' ] ) && ! isset( $_POST[ 'bp_media_options' ][ 'images_enabled' ] ) ) {
232
+ if ( is_multisite() )
233
+ update_site_option( 'bpm-media-type', __( 'Atleast one Media Type Must be selected', BP_MEDIA_TXT_DOMAIN ) );
234
+ else
235
+ add_settings_error( __( 'Media Type', BP_MEDIA_TXT_DOMAIN ), 'bpm-media-type', __( 'Atleast one Media Type Must be selected', BP_MEDIA_TXT_DOMAIN ) );
236
+ $input[ 'images_enabled' ] = 1;
237
+ }
238
+ if ( is_multisite() )
239
+ update_site_option( 'bpm-settings-saved', __( 'Settings saved.', BP_MEDIA_TXT_DOMAIN ) );
240
+ do_action( 'bp_media_sanitize_settings', $_POST, $input );
241
+ return $input;
242
+ }
243
+
244
+ /**
245
+ * Output a checkbox
246
+ *
247
+ * @global array $bp_media
248
+ * @param array $args
249
+ */
250
+
251
+ /**
252
+ *
253
+ * @global array $bp_media
254
+ * @param type $args
255
+ * @return type
256
+ */
257
+ public function checkbox( $args ) {
258
+ global $bp_media;
259
+ $options = $bp_media->options;
260
+ $defaults = array(
261
+ 'setting' => '',
262
+ 'option' => '',
263
+ 'desc' => '',
264
+ );
265
+ $args = wp_parse_args( $args, $defaults );
266
+ extract( $args );
267
+ if ( empty( $option ) ) {
268
+ trigger_error( __( 'Please provide "option" value ( required ) in the argument. Pass argument to add_settings_field in the following format array( \'option\' => \'option_name\' ) ', BP_MEDIA_TXT_DOMAIN ) );
269
+ return;
270
+ }
271
+
272
+ if ( ! empty( $setting ) ) {
273
+ $name = $setting . '[' . $option . ']';
274
+ $options = bp_get_option( $setting );
275
+ } else
276
+ $name = $option;
277
+
278
+ if ( ! isset( $options[ $option ] ) )
279
+ $options[ $option ] = '';
280
+ ?>
281
+ <label for="<?php echo $option; ?>">
282
+ <input<?php checked( $options[ $option ] ); ?> name="<?php echo $name; ?>" id="<?php echo $option; ?>" value="1" type="checkbox" />
283
+ <?php echo $desc; ?>
284
+ </label><?php
285
+ }
286
+
287
+ /**
288
+ * Outputs Radio Buttons
289
+ *
290
+ * @global array $bp_media
291
+ * @param array $args
292
+ */
293
+
294
+ /**
295
+ *
296
+ * @global array $bp_media
297
+ * @param type $args
298
+ * @return type
299
+ */
300
+ public function radio( $args ) {
301
+ global $bp_media;
302
+ $options = $bp_media->options;
303
+ $defaults = array(
304
+ 'setting' => '',
305
+ 'option' => '',
306
+ 'radios' => array( ),
307
+ 'default' => '',
308
+ );
309
+ $args = wp_parse_args( $args, $defaults );
310
+ extract( $args );
311
+ if ( empty( $option ) || ( 2 > count( $radios ) ) ) {
312
+ if ( empty( $option ) )
313
+ trigger_error( __( 'Please provide "option" value ( required ) in the argument. Pass argument to add_settings_field in the following format array( \'option\' => \'option_name\' )', BP_MEDIA_TXT_DOMAIN ) );
314
+ if ( 2 > count( $radios ) )
315
+ trigger_error( __( 'Need to specify atleast to radios else use a checkbox instead', BP_MEDIA_TXT_DOMAIN ) );
316
+ return;
317
+ }
318
+
319
+ if ( ! empty( $setting ) ) {
320
+ $name = $setting . '[' . $option . ']';
321
+ $options = bp_get_option( $setting );
322
+ } else
323
+ $name = $option;
324
+
325
+ if ( (isset( $options[ $option ] ) && empty( $options[ $option ] )) || ! isset( $options[ $option ] ) ) {
326
+ $options[ $option ] = $default;
327
+ }
328
+
329
+ foreach ( $radios as $value => $desc ) {
330
+ ?>
331
+ <label for="<?php echo sanitize_title( $desc ); ?>"><input<?php checked( $options[ $option ], $value ); ?> value="<?php echo $value; ?>" name="<?php echo $name; ?>" id="<?php echo sanitize_title( $desc ); ?>" type="radio" />&nbsp;<?php echo $desc; ?></label><br /><?php
332
+ }
333
+ }
334
+
335
+ /**
336
+ * Outputs Textbox
337
+ *
338
+ * @global array $bp_media
339
+ * @param array $args
340
+ */
341
+
342
+ /**
343
+ *
344
+ * @global array $bp_media
345
+ * @param type $args
346
+ * @return type
347
+ */
348
+ public function textbox( $args ) {
349
+ global $bp_media;
350
+ $options = $bp_media->options;
351
+ $defaults = array(
352
+ 'setting' => '',
353
+ 'option' => '',
354
+ 'desc' => '',
355
+ 'password' => false,
356
+ 'hidden' => false,
357
+ );
358
+ $args = wp_parse_args( $args, $defaults );
359
+ extract( $args );
360
+ if ( empty( $option ) ) {
361
+ trigger_error( __( 'Please provide "option" value ( required ) in the argument. Pass argument to add_settings_field in the following format array( \'option\' => \'option_name\' )', BP_MEDIA_TXT_DOMAIN ) );
362
+ return;
363
+ }
364
+
365
+ if ( ! empty( $setting ) ) {
366
+ $name = $setting . '[' . $option . ']';
367
+ $options = bp_get_option( $setting );
368
+ } else
369
+ $name = $option;
370
+
371
+ if ( (isset( $options[ $option ] ) && empty( $options[ $option ] )) || ! isset( $options[ $option ] ) ) {
372
+ $options[ $option ] = '';
373
+ }
374
+ ?>
375
+ <label for="<?php echo sanitize_title( $option ); ?>"><input value="<?php echo $options[ $option ]; ?>" name="<?php echo $name; ?>" id="<?php echo sanitize_title( $option ); ?>" type="<?php echo $password ? 'password' : ($hidden ? $hidden : 'text'); ?>" /><?php
376
+ if ( ! empty( $desc ) ) {
377
+ echo '<br /><span class="description">' . $desc . '</span>';
378
+ }
379
+ ?></label><br /><?php
380
+ }
381
+
382
+ /**
383
+ * Outputs Dropdown
384
+ *
385
+ * @global array $bp_media
386
+ * @param array $args
387
+ */
388
+
389
+ /**
390
+ *
391
+ * @param type $args
392
+ * @return type
393
+ */
394
+ public function dropdown( $args ) {
395
+ $defaults = array(
396
+ 'setting' => '',
397
+ 'option' => '',
398
+ 'none' => true,
399
+ 'values' => ''
400
+ );
401
+ $args = wp_parse_args( $args, $defaults );
402
+ extract( $args );
403
+ if ( empty( $option ) || empty( $values ) ) {
404
+ if ( empty( $option ) )
405
+ trigger_error( __( 'Please provide "option" value ( required ) in the argument. Pass argument to add_settings_field in the following format array( \'option\' => \'option_name\' )', BP_MEDIA_TXT_DOMAIN ) );
406
+ if ( empty( $values ) )
407
+ trigger_error( __( 'Please provide some values to populate the dropdown. Format : array( \'value\' => \'option\' )', BP_MEDIA_TXT_DOMAIN ) );
408
+ return;
409
+ }
410
+
411
+ if ( ! empty( $setting ) ) {
412
+ $name = $setting . '[' . $option . ']';
413
+ $options = bp_get_option( $setting );
414
+ } else
415
+ $name = $option;
416
+
417
+ if ( (isset( $options[ $option ] ) && empty( $options[ $option ] )) || ! isset( $options[ $option ] ) ) {
418
+ $options[ $option ] = '';
419
+ }
420
+ ?>
421
+ <select name="<?php echo $name; ?>" id="<?php echo $option; ?>"><?php if ( $none ) { ?>
422
+ <option><?php _e( 'None', BP_MEDIA_TXT_DOMAIN ); ?></option><?php
423
+ }
424
+ foreach ( $values as $value => $text ) {
425
+ ?>
426
+ <option<?php selected( $options[ $option ], $value ); ?> value="<?php echo $value; ?>"><?php echo $text; ?></option><?php }
427
+ ?>
428
+ </select><?php
429
+ }
430
+
431
+ /**
432
+ * Outputs a Button
433
+ *
434
+ * @global array $bp_media
435
+ * @param array $args
436
+ */
437
+
438
+ /**
439
+ *
440
+ * @param type $args
441
+ * @return type
442
+ */
443
+ public function button( $args ) {
444
+ $defaults = array(
445
+ 'setting' => '',
446
+ 'option' => '',
447
+ 'name' => 'Save Changes',
448
+ 'desc' => '',
449
+ );
450
+ $args = wp_parse_args( $args, $defaults );
451
+ extract( $args );
452
+ if ( empty( $option ) ) {
453
+ trigger_error( 'Please provide "option" value ( Required ) in the argument. Pass argument to add_settings_field in the following format array( \'option\' => \'option_name\', \'link\' => \'linkurl\' )' );
454
+ return;
455
+ }
456
+ if ( ! empty( $setting ) ) {
457
+ $button = $setting . '[' . $option . ']';
458
+ } else
459
+ $button = $option;
460
+ submit_button( $name, '', $button, false );
461
+ if ( ! empty( $desc ) ) {
462
+ ?>
463
+ <span class="description"><?php echo $desc; ?></a><?php
464
+ }
465
+ }
466
+
467
+ public function privacy_notice() {
468
+ if ( BPMediaPrivacy::is_installed() )
469
+ return;
470
+ $url = add_query_arg(
471
+ array( 'page' => 'bp-media-privacy' ), (is_multisite() ? network_admin_url( 'admin.php' ) : admin_url( 'admin.php' ) )
472
+ );
473
+
474
+ $notice = '
475
  <div class="error">
476
+ <p>' . __( 'BuddyPress Media 2.6 requires a database upgrade. ', BP_MEDIA_TXT_DOMAIN )
477
+ . '<a href="' . $url . '">' . __( 'Update Database', BP_MEDIA_TXT_DOMAIN ) . '.</a></p>
478
  </div>
479
  ';
480
+ echo $notice;
481
+ }
482
 
483
+ }
484
 
485
  }
486
+ ?>
app/helper/BPMediaSupport.php CHANGED
@@ -70,7 +70,7 @@ if (!class_exists('BPMediaSupport')) {
70
  }
71
 
72
  /**
73
- *
74
  * @global type $current_user
75
  * @param type $form
76
  */
@@ -92,7 +92,7 @@ if (!class_exists('BPMediaSupport')) {
92
  }
93
  ?>
94
  <h3><?php echo $meta_title; ?></h3>
95
- <div id="support-form" class="bp-media-form">
96
  <ul>
97
  <li>
98
  <label class="bp-media-label" for="name"><?php _e('Name', BP_MEDIA_TXT_DOMAIN); ?>:</label><input class="bp-media-input" id="name" type="text" name="name" value="<?php echo (isset($_REQUEST['name'])) ? esc_attr(stripslashes(trim($_REQUEST['name']))) : $current_user->display_name; ?>" required />
@@ -114,15 +114,15 @@ if (!class_exists('BPMediaSupport')) {
114
  </li>
115
  <input type="hidden" name="request_type" value="<?php echo $form; ?>"/>
116
  <input type="hidden" name="request_id" value="<?php echo wp_create_nonce(date('YmdHis')); ?>"/>
117
- <input type="hidden" name="server_address" value="<?php echo $_SERVER['SERVER_ADDR']; ?>"/>
118
- <input type="hidden" name="ip_address" value="<?php echo $_SERVER['REMOTE_ADDR']; ?>"/>
119
  <input type="hidden" name="server_type" value="<?php echo $_SERVER['SERVER_SOFTWARE']; ?>"/>
120
  <input type="hidden" name="user_agent" value="<?php echo $_SERVER['HTTP_USER_AGENT']; ?>"/>
121
 
122
  </ul>
123
- </div><!-- .submit-bug-box --><?php if ($form == 'bug_report') { ?>
124
  <h3><?php _e('Additional Information', BP_MEDIA_TXT_DOMAIN); ?></h3>
125
- <div id="support-form" class="bp-media-form">
126
  <ul>
127
 
128
  <li>
@@ -153,7 +153,7 @@ if (!class_exists('BPMediaSupport')) {
153
  }
154
 
155
  /**
156
- *
157
  * @global type $bp_media
158
  */
159
  public function submit_request() {
70
  }
71
 
72
  /**
73
+ *
74
  * @global type $current_user
75
  * @param type $form
76
  */
92
  }
93
  ?>
94
  <h3><?php echo $meta_title; ?></h3>
95
+ <div id="support-form" class="bp-media-form">
96
  <ul>
97
  <li>
98
  <label class="bp-media-label" for="name"><?php _e('Name', BP_MEDIA_TXT_DOMAIN); ?>:</label><input class="bp-media-input" id="name" type="text" name="name" value="<?php echo (isset($_REQUEST['name'])) ? esc_attr(stripslashes(trim($_REQUEST['name']))) : $current_user->display_name; ?>" required />
114
  </li>
115
  <input type="hidden" name="request_type" value="<?php echo $form; ?>"/>
116
  <input type="hidden" name="request_id" value="<?php echo wp_create_nonce(date('YmdHis')); ?>"/>
117
+ <input type="hidden" name="server_address" value="<?php echo $_SERVER['SERVER_ADDR']; ?>"/>
118
+ <input type="hidden" name="ip_address" value="<?php echo $_SERVER['REMOTE_ADDR']; ?>"/>
119
  <input type="hidden" name="server_type" value="<?php echo $_SERVER['SERVER_SOFTWARE']; ?>"/>
120
  <input type="hidden" name="user_agent" value="<?php echo $_SERVER['HTTP_USER_AGENT']; ?>"/>
121
 
122
  </ul>
123
+ </div><!-- .submit-bug-box --><?php if ($form == 'bug_report') { ?>
124
  <h3><?php _e('Additional Information', BP_MEDIA_TXT_DOMAIN); ?></h3>
125
+ <div id="support-form" class="bp-media-form">
126
  <ul>
127
 
128
  <li>
153
  }
154
 
155
  /**
156
+ *
157
  * @global type $bp_media
158
  */
159
  public function submit_request() {
app/main/BuddyPressMedia.php CHANGED
@@ -42,7 +42,7 @@ class BuddyPressMedia {
42
  *
43
  * @var string Support forum url
44
  */
45
- public $support_url = 'http://rtcamp.com/support/forum/buddypress-media/';
46
 
47
  /**
48
  *
@@ -602,6 +602,7 @@ class BuddyPressMedia {
602
  if (array_key_exists('default_count', $this->options)) {
603
  $count = $this->options['default_count'];
604
  }
 
605
  return (!$count) ? 10 : $count;
606
  }
607
 
42
  *
43
  * @var string Support forum url
44
  */
45
+ public $support_url = 'http://rtcamp.com/support/forum/buddypress-media/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media';
46
 
47
  /**
48
  *
602
  if (array_key_exists('default_count', $this->options)) {
603
  $count = $this->options['default_count'];
604
  }
605
+ $count =( !is_int( $count ))?0:$count;
606
  return (!$count) ? 10 : $count;
607
  }
608
 
app/main/includes/BPMediaActions.php CHANGED
@@ -447,7 +447,7 @@ class BPMediaActions {
447
  */
448
  function footer() {
449
  ?>
450
- <div id="bp-media-footer"><p>Using <a title="BuddyPress Media adds photos, video and audio upload/management feature" href="http://rtcamp.com/buddypress-media/">BuddyPress Media</a>.</p></div>
451
  <?php
452
  }
453
 
@@ -565,7 +565,7 @@ class BPMediaActions {
565
  */
566
  function load_more() {
567
 
568
- global $bp, $bp_media_query, $bp_media;
569
  $page = isset( $_POST[ 'page' ] ) ? $_POST[ 'page' ] : die();
570
  $current_action = isset( $_POST[ 'current_action' ] ) ? $_POST[ 'current_action' ] : null;
571
  $action_variables = isset( $_POST[ 'action_variables' ] ) ? $_POST[ 'action_variables' ] : null;
@@ -598,13 +598,29 @@ class BPMediaActions {
598
  case BP_MEDIA_VIDEOS_SLUG:
599
  $type = 'video';
600
  break;
 
 
 
601
  default :
602
  $type = null;
603
  }
604
 
605
  $query = new BPMediaQuery();
606
  $args = $query->init( $type, $album_id, false, $page );
607
- $bp_media_query = new WP_Query( $args );
 
 
 
 
 
 
 
 
 
 
 
 
 
608
  if ( isset( $bp_media_query->posts ) && is_array( $bp_media_query->posts ) && count( $bp_media_query->posts ) ) {
609
  foreach ( $bp_media_query->posts as $attachment ) {
610
  try {
@@ -615,6 +631,7 @@ class BPMediaActions {
615
  }
616
  }
617
  }
 
618
  die();
619
  }
620
 
447
  */
448
  function footer() {
449
  ?>
450
+ <div id="bp-media-footer"><p>Using <a title="BuddyPress Media adds photos, video and audio upload/management feature" href="http://rtcamp.com/buddypress-media/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media">BuddyPress Media</a>.</p></div>
451
  <?php
452
  }
453
 
565
  */
566
  function load_more() {
567
 
568
+ global $bp, $bp_media_query, $bp_media, $bp_media_albums_query;
569
  $page = isset( $_POST[ 'page' ] ) ? $_POST[ 'page' ] : die();
570
  $current_action = isset( $_POST[ 'current_action' ] ) ? $_POST[ 'current_action' ] : null;
571
  $action_variables = isset( $_POST[ 'action_variables' ] ) ? $_POST[ 'action_variables' ] : null;
598
  case BP_MEDIA_VIDEOS_SLUG:
599
  $type = 'video';
600
  break;
601
+ case BP_MEDIA_ALBUMS_SLUG:
602
+ $type = 'album';
603
+ break;
604
  default :
605
  $type = null;
606
  }
607
 
608
  $query = new BPMediaQuery();
609
  $args = $query->init( $type, $album_id, false, $page );
610
+ if($type=='album'){
611
+ $bp_media_albums_query = new WP_Query( $args );
612
+ if ( isset( $bp_media_albums_query->posts ) && is_array( $bp_media_albums_query->posts ) && count( $bp_media_albums_query->posts ) ) {
613
+ foreach ( $bp_media_albums_query->posts as $attachment ) {
614
+ try {
615
+ $media = new BPMediaAlbum( $attachment->ID );
616
+ echo $media->get_album_gallery_content();
617
+ } catch ( exception $e ) {
618
+ die();
619
+ }
620
+ }
621
+ }
622
+ }else{
623
+ $bp_media_query = new WP_Query( $args );
624
  if ( isset( $bp_media_query->posts ) && is_array( $bp_media_query->posts ) && count( $bp_media_query->posts ) ) {
625
  foreach ( $bp_media_query->posts as $attachment ) {
626
  try {
631
  }
632
  }
633
  }
634
+ }
635
  die();
636
  }
637
 
app/main/includes/BPMediaFunction.php CHANGED
@@ -10,15 +10,15 @@ class BPMediaFunction {
10
  }
11
 
12
  /**
13
- *
14
  * @global type $bp
15
  * @param type $args
16
  * @return boolean
17
  */
18
  static function record_activity($args = '') {
19
  global $bp;
20
- if (!function_exists('bp_activity_add'))
21
- return false;
22
  $defaults = array(
23
  'component' => BP_MEDIA_SLUG, // The name/ID of the component e.g. groups, profile, mycomponent
24
  );
@@ -29,7 +29,7 @@ class BPMediaFunction {
29
  }
30
 
31
  /**
32
- *
33
  * @param type $activity_allowedtags
34
  * @return array
35
  */
@@ -68,7 +68,7 @@ class BPMediaFunction {
68
  }
69
 
70
  /**
71
- *
72
  * @param type $messages
73
  * @param type $type
74
  */
@@ -89,7 +89,7 @@ class BPMediaFunction {
89
  }
90
 
91
  /**
92
- *
93
  * @global type $bp_media
94
  * @param type $content
95
  * @param type $activity
@@ -107,7 +107,7 @@ class BPMediaFunction {
107
 
108
  /**
109
  * Updates the media count of all users.
110
- *
111
  * @global type $wpdb
112
  * @return boolean
113
  */
@@ -146,7 +146,7 @@ class BPMediaFunction {
146
  }
147
 
148
  /**
149
- *
150
  * @global type $bp_media_current_entry
151
  */
152
  static function update_media() {
@@ -184,7 +184,7 @@ class BPMediaFunction {
184
  }
185
 
186
  /**
187
- *
188
  * @param BPMediaAlbum $album
189
  * @param type $current_time
190
  * @param type $delete_media_id
@@ -236,7 +236,7 @@ class BPMediaFunction {
236
  }
237
 
238
  /**
239
- *
240
  * @global type $bp_media_current_entry
241
  */
242
  static function wp_comment_form_mod() {
@@ -255,7 +255,7 @@ class BPMediaFunction {
255
  */
256
 
257
  /**
258
- *
259
  * @param type $location
260
  * @param type $message
261
  * @param type $type
10
  }
11
 
12
  /**
13
+ *
14
  * @global type $bp
15
  * @param type $args
16
  * @return boolean
17
  */
18
  static function record_activity($args = '') {
19
  global $bp;
20
+ if(!bp_is_active('activity'))
21
+ return false;
22
  $defaults = array(
23
  'component' => BP_MEDIA_SLUG, // The name/ID of the component e.g. groups, profile, mycomponent
24
  );
29
  }
30
 
31
  /**
32
+ *
33
  * @param type $activity_allowedtags
34
  * @return array
35
  */
68
  }
69
 
70
  /**
71
+ *
72
  * @param type $messages
73
  * @param type $type
74
  */
89
  }
90
 
91
  /**
92
+ *
93
  * @global type $bp_media
94
  * @param type $content
95
  * @param type $activity
107
 
108
  /**
109
  * Updates the media count of all users.
110
+ *
111
  * @global type $wpdb
112
  * @return boolean
113
  */
146
  }
147
 
148
  /**
149
+ *
150
  * @global type $bp_media_current_entry
151
  */
152
  static function update_media() {
184
  }
185
 
186
  /**
187
+ *
188
  * @param BPMediaAlbum $album
189
  * @param type $current_time
190
  * @param type $delete_media_id
236
  }
237
 
238
  /**
239
+ *
240
  * @global type $bp_media_current_entry
241
  */
242
  static function wp_comment_form_mod() {
255
  */
256
 
257
  /**
258
+ *
259
  * @param type $location
260
  * @param type $message
261
  * @param type $type
app/main/privacy/BPMediaPrivacy.php CHANGED
@@ -18,10 +18,10 @@ class BPMediaPrivacy {
18
  *
19
  */
20
  function __construct() {
21
- add_action( 'bp_media_after_update_media', array( $this, 'save_privacy_by_object' ),99 );
22
- add_action( 'bp_media_after_add_media', array( $this, 'save_privacy_by_object' ),99 );
23
- add_action( 'bp_media_after_add_album', array( $this, 'save_privacy_by_object' ),99 );
24
- add_action( 'bp_media_after_edit_album', array( $this, 'save_privacy_by_object' ),99 );
25
  add_action( 'wp_ajax_bp_media_privacy_install', 'BPMediaPrivacy::install' );
26
  add_action( 'wp_ajax_bp_media_privacy_redirect', array( $this, 'set_option_redirect' ) );
27
  add_action( 'bp_has_activities', array( $this, 'activity' ), 10, 2 );
@@ -76,7 +76,7 @@ class BPMediaPrivacy {
76
  return $installed;
77
  }
78
 
79
- static function get_privacy($id){
80
  return get_post_meta( $id, 'bp_media_privacy', TRUE );
81
  }
82
 
@@ -107,7 +107,7 @@ class BPMediaPrivacy {
107
  }
108
 
109
  static function get_settings() {
110
- return array(
111
  6 => array(
112
  'private',
113
  __( '<strong>Private</strong>, Visible only to myself', BP_MEDIA_TXT_DOMAIN )
@@ -125,13 +125,17 @@ class BPMediaPrivacy {
125
  __( '<strong>Public</strong>, Visible to the world', BP_MEDIA_TXT_DOMAIN )
126
  )
127
  );
 
 
 
 
128
  }
129
 
130
  function ui() {
131
  if ( BPMediaPrivacy::is_enabled() == false )
132
  return;
133
  global $bp_media_current_entry;
134
- $privacy_level = BPMediaPrivacy::get_privacy( $bp_media_current_entry->get_id());
135
  BPMediaPrivacy::ui_html( $privacy_level );
136
  }
137
 
@@ -181,12 +185,16 @@ class BPMediaPrivacy {
181
  if ( ! is_object( $object ) ) {
182
  return false;
183
  }
184
- if($level==false){
185
- if($object->get_type()!='album'){
186
- $album_id = $object->get_album_id();
187
- $level = BPMediaPrivacy::get_privacy($album_id);
188
  }
 
189
 
 
 
 
190
  }
191
 
192
  $media_id = $object->get_id();
@@ -197,6 +205,7 @@ class BPMediaPrivacy {
197
  function save( $level = 0, $object_id = false ) {
198
  if ( $object_id == false )
199
  return false;
 
200
  if ( ! array_key_exists( $level, BPMediaPrivacy::get_settings() ) )
201
  $level = 0;
202
 
@@ -251,7 +260,7 @@ class BPMediaPrivacy {
251
  return;
252
  if ( $object_id == false )
253
  return;
254
- $privacy = BPMediaPrivacy::get_privacy( $object_id);
255
  $parent = get_post_field( 'post_parent', $object_id, 'raw' );
256
  $parent_privacy = BPMediaPrivacy::get_privacy( $parent );
257
 
@@ -265,7 +274,6 @@ class BPMediaPrivacy {
265
  return $privacy;
266
  }
267
 
268
-
269
  static function current_access() {
270
  global $bp;
271
  $current_privacy = 0;
@@ -279,9 +287,11 @@ class BPMediaPrivacy {
279
  if ( ! (bp_is_my_profile()) ) {
280
  if ( bp_is_active( 'groups' ) && class_exists( 'BP_Group_Extension' ) ) {
281
  if ( bp_get_current_group_id() == 0 ) {
282
- $is_friend = friends_check_friendship_status( $bp->loggedin_user->id, $bp->displayed_user->id );
283
- if ( $is_friend == 'is_friend' ) {
284
- $current_privacy = 4;
 
 
285
  }
286
  }
287
  }
@@ -338,5 +348,6 @@ class BPMediaPrivacy {
338
  }
339
  die( $page );
340
  }
 
341
  }
342
  ?>
18
  *
19
  */
20
  function __construct() {
21
+ add_action( 'bp_media_after_update_media', array( $this, 'save_privacy_by_object' ), 99 );
22
+ add_action( 'bp_media_after_add_media', array( $this, 'save_privacy_by_object' ), 99 );
23
+ add_action( 'bp_media_after_add_album', array( $this, 'save_privacy_by_object' ), 99 );
24
+ add_action( 'bp_media_after_edit_album', array( $this, 'save_privacy_by_object' ), 99 );
25
  add_action( 'wp_ajax_bp_media_privacy_install', 'BPMediaPrivacy::install' );
26
  add_action( 'wp_ajax_bp_media_privacy_redirect', array( $this, 'set_option_redirect' ) );
27
  add_action( 'bp_has_activities', array( $this, 'activity' ), 10, 2 );
76
  return $installed;
77
  }
78
 
79
+ static function get_privacy( $id ) {
80
  return get_post_meta( $id, 'bp_media_privacy', TRUE );
81
  }
82
 
107
  }
108
 
109
  static function get_settings() {
110
+ $settings = array(
111
  6 => array(
112
  'private',
113
  __( '<strong>Private</strong>, Visible only to myself', BP_MEDIA_TXT_DOMAIN )
125
  __( '<strong>Public</strong>, Visible to the world', BP_MEDIA_TXT_DOMAIN )
126
  )
127
  );
128
+ if(!bp_is_active('friends')){
129
+ unset($settings[4]);
130
+ }
131
+ return $settings;
132
  }
133
 
134
  function ui() {
135
  if ( BPMediaPrivacy::is_enabled() == false )
136
  return;
137
  global $bp_media_current_entry;
138
+ $privacy_level = BPMediaPrivacy::get_privacy( $bp_media_current_entry->get_id() );
139
  BPMediaPrivacy::ui_html( $privacy_level );
140
  }
141
 
185
  if ( ! is_object( $object ) ) {
186
  return false;
187
  }
188
+ if ( $level == false ) {
189
+ if ( $object->get_type() != 'album' ) {
190
+ $album_id = $object->get_album_id();
191
+ $level = BPMediaPrivacy::get_privacy( $album_id );
192
  }
193
+ }
194
 
195
+ $default_level= BPMediaPrivacy::default_privacy();
196
+ if($level == false){
197
+ $level = $default_level;
198
  }
199
 
200
  $media_id = $object->get_id();
205
  function save( $level = 0, $object_id = false ) {
206
  if ( $object_id == false )
207
  return false;
208
+ if(!$level)$level = 0;
209
  if ( ! array_key_exists( $level, BPMediaPrivacy::get_settings() ) )
210
  $level = 0;
211
 
260
  return;
261
  if ( $object_id == false )
262
  return;
263
+ $privacy = BPMediaPrivacy::get_privacy( $object_id );
264
  $parent = get_post_field( 'post_parent', $object_id, 'raw' );
265
  $parent_privacy = BPMediaPrivacy::get_privacy( $parent );
266
 
274
  return $privacy;
275
  }
276
 
 
277
  static function current_access() {
278
  global $bp;
279
  $current_privacy = 0;
287
  if ( ! (bp_is_my_profile()) ) {
288
  if ( bp_is_active( 'groups' ) && class_exists( 'BP_Group_Extension' ) ) {
289
  if ( bp_get_current_group_id() == 0 ) {
290
+ if ( bp_is_active( 'friends' ) ) {
291
+ $is_friend = friends_check_friendship_status( $bp->loggedin_user->id, $bp->displayed_user->id );
292
+ if ( $is_friend == 'is_friend' ) {
293
+ $current_privacy = 4;
294
+ }
295
  }
296
  }
297
  }
348
  }
349
  die( $page );
350
  }
351
+
352
  }
353
  ?>
app/main/privacy/BPMediaPrivacySettings.php CHANGED
@@ -54,8 +54,8 @@ class BPMediaPrivacySettings {
54
  WHERE
55
  $wpdb->postmeta.meta_key = 'bp-media-key' AND
56
  ( $wpdb->posts.post_type LIKE 'attachment' OR $wpdb->posts.post_type LIKE 'bp_media_album')";
57
- $result = $wpdb->get_results($query);
58
- return $result;
59
  }
60
 
61
 
54
  WHERE
55
  $wpdb->postmeta.meta_key = 'bp-media-key' AND
56
  ( $wpdb->posts.post_type LIKE 'attachment' OR $wpdb->posts.post_type LIKE 'bp_media_album')";
57
+ $result = $wpdb->get_results($query);
58
+ return $result;
59
  }
60
 
61
 
app/main/profile/BPMediaAlbumScreen.php CHANGED
@@ -75,7 +75,7 @@ class BPMediaAlbumScreen extends BPMediaScreen {
75
  $this->template->the_album_content();
76
  endwhile;
77
  echo '</ul>';
78
- $this->template->show_more();
79
  else:
80
  BPMediaFunction::show_formatted_error_message(sprintf(__('Sorry, no %s were found.', BP_MEDIA_TXT_DOMAIN), $this->slug), 'info');
81
  endif;
75
  $this->template->the_album_content();
76
  endwhile;
77
  echo '</ul>';
78
+ $this->template->show_more('albums');
79
  else:
80
  BPMediaFunction::show_formatted_error_message(sprintf(__('Sorry, no %s were found.', BP_MEDIA_TXT_DOMAIN), $this->slug), 'info');
81
  endif;
app/main/profile/BPMediaScreen.php CHANGED
@@ -177,7 +177,6 @@ class BPMediaScreen {
177
 
178
  $this->set_query();
179
 
180
-
181
  $this->hook_before();
182
 
183
  if ($bp_media_query && $bp_media_query->have_posts()):
@@ -377,9 +376,10 @@ class BPMediaScreen {
377
  exit;
378
  }
379
  $post_id = $bp_media_current_entry->get_id();
380
- $activity_id = get_post_meta($post_id, 'bp_media_child_activity', true);
381
-
382
- bp_activity_delete_by_activity_id($activity_id);
 
383
  $bp_media_current_entry->delete_media();
384
 
385
  @setcookie('bp-message', __('Media deleted successfully', BP_MEDIA_TXT_DOMAIN), time() + 60 * 60 * 24, COOKIEPATH);
177
 
178
  $this->set_query();
179
 
 
180
  $this->hook_before();
181
 
182
  if ($bp_media_query && $bp_media_query->have_posts()):
376
  exit;
377
  }
378
  $post_id = $bp_media_current_entry->get_id();
379
+ if(bp_is_active('activity')){
380
+ $activity_id = get_post_meta($post_id, 'bp_media_child_activity', true);
381
+ bp_activity_delete_by_activity_id($activity_id);
382
+ }
383
  $bp_media_current_entry->delete_media();
384
 
385
  @setcookie('bp-message', __('Media deleted successfully', BP_MEDIA_TXT_DOMAIN), time() + 60 * 60 * 24, COOKIEPATH);
app/main/profile/BPMediaTemplate.php CHANGED
@@ -183,11 +183,7 @@ class BPMediaTemplate {
183
  break;
184
  case 'albums':
185
  global $bp_media_albums_query;
186
- if ( bp_is_my_profile() || BPMediaGroupLoader::can_upload() ) {
187
- if (isset($bp_media_albums_query->found_posts) && $bp_media_albums_query->found_posts > ($count-1) )
188
- $showmore = true;
189
- } else {
190
- if (isset($bp_media_albums_query->found_posts) && $bp_media_albums_query->found_posts > $count )
191
  $showmore = true;
192
  }
193
  break;
183
  break;
184
  case 'albums':
185
  global $bp_media_albums_query;
186
+ if (isset($bp_media_albums_query->found_posts) && $bp_media_albums_query->found_posts > $count ){
 
 
 
 
187
  $showmore = true;
188
  }
189
  break;
index.php CHANGED
@@ -1,12 +1,12 @@
1
  <?php
2
  /*
3
  Plugin Name: BuddyPress Media
4
- Plugin URI: http://rtcamp.com/buddypress-media/
5
  Description: This plugin adds missing media rich features like photos, videosand audios uploading to BuddyPress which are essential if you are building social network, seriously!
6
- Version: 2.6.6
7
  Author: rtCamp
8
  Text Domain: buddypress-media
9
- Author URI: http://rtcamp.com
10
  */
11
 
12
  /**
@@ -76,6 +76,7 @@ spl_autoload_register( 'buddypress_media_autoloader' );
76
  */
77
  global $bp_media;
78
  $bp_media = new BuddyPressMedia();
 
79
  //add_action('init','BPMediaBPAlbumImporter');
80
 
81
  //BPMediaBPAlbumImporter::bpmedia_ajax_import_callback();
1
  <?php
2
  /*
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, videosand audios uploading to BuddyPress which are essential if you are building social network, seriously!
6
+ Version: 2.6.7
7
  Author: rtCamp
8
  Text Domain: buddypress-media
9
+ Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
10
  */
11
 
12
  /**
76
  */
77
  global $bp_media;
78
  $bp_media = new BuddyPressMedia();
79
+
80
  //add_action('init','BPMediaBPAlbumImporter');
81
 
82
  //BPMediaBPAlbumImporter::bpmedia_ajax_import_callback();
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: 3.5
8
  Tested up to: 3.5
9
- Stable tag: 2.6.6
10
 
11
  Adds Photos, Music, Videos & Albums to BuddyPress. Supports mobile devices (iPhone/iPad, etc) and automatic audio/video conversion.
12
 
@@ -15,15 +15,15 @@ Adds Photos, Music, Videos & Albums to BuddyPress. Supports mobile devices (iPho
15
  BuddyPress Media adds Photos, Music, Videos & Albums to your BuddyPress powered social network. Supports mobile devices (Android/iPhone/iPad, etc) and automatic audio/video conversion.
16
 
17
  = Demo & Code =
18
- * [BuddyPress Media **Demo**](http://demo.rtcamp.com/buddypress-media/) (Stand-alone)
19
- * [BuddyPress Media Kaltura Add-on](http://demo.rtcamp.com/bpm-kaltura)
20
- * [BuddyPress Media FFMPEG Add-on](http://demo.rtcamp.com/bpm-media)
21
 
22
  * [Fork BuddyPress Media on **GitHub**](http://github.com/rtCamp/buddypress-media/)
23
 
24
  = Features =
25
 
26
- [BuddyPress Media's Features page](http://rtcamp.com/buddypress-media/#features "Visit BuddyPress Media's Features page")
27
 
28
  * **Media uploads**: Users can upload images, music and video straight from their profiles.
29
  * **Drag and drop**/ **Multiple** file uploader
@@ -33,11 +33,11 @@ BuddyPress Media adds Photos, Music, Videos & Albums to your BuddyPress powered
33
  * **Groups** Supported: Users can upload media on Groups, as well!
34
  * **HTML5 playback**: with fall back to flash/silverlight player support
35
  * **Privacy** [*new*]: Users can control access to their uploaded media
36
- * **Automatic conversion** (*premium*): of common audio & video formats to mp3/mp4 via [Kaltura Add-On](http://rtcamp.com/store/buddypress-media-kaltura/ "BuddyPress Media Kaltura Addon for Kaltura.com/Kaltura-CE/Kaltura On-Prem version"), and [FFMPEG Add-On](http://rtcamp.com/store/buddypress-media-ffmpeg/ "BuddyPress Media FFMPEG Addon")
37
 
38
  = Roadmap =
39
 
40
- [BuddyPress Media's Roadmap page](http://rtcamp.com/buddypress-media/roadmap/ "Visit BuddyPress Media's Roadmap page")
41
 
42
  * **Activity uploads**: Users wil be able to upload media straight from within an activity update
43
  * **Importers**: Site admins will be able to import media from other media plugins for BuddyPress
@@ -48,19 +48,19 @@ BuddyPress Media adds Photos, Music, Videos & Albums to your BuddyPress powered
48
 
49
  = Addons (Premium) =
50
 
51
- [**BuddyPress-Media Kaltura addon**](http://rtcamp.com/store/buddypress-media-kaltura/ "BuddyPress Media Kaltura Addon for Kaltura.com/Kaltura-CE/Kaltura On-Prem version")
52
 
53
  * Adds support for additional video formats including *.avi, *.mkv, *.asf, *.flv, *.wmv, *.rm, *.mpg.
54
  * You can use Kaltura.com/Kaltura On-Prem or self-hosted Kaltura-CE server with this.
55
 
56
- Available [here](http://rtcamp.com/store/buddypress-media-kaltura/ "BuddyPress Media Kaltura Addon for Kaltura.com/Kaltura-CE/Kaltura On-Prem version")
57
 
58
- [**BuddyPress-Media FFMPEG addon**](http://rtcamp.com/store/buddypress-media-ffmpeg-converter/ "BuddyPress Media FFMPEG Addon").
59
 
60
  * Adds support for additional video formats including *.avi, *.mkv, *.asf, *.flv, *.wmv, *.rm, *.mpg.
61
  * Adds support for additional audio formats including *.mp3, *.ogg, *.wav, *.aac, *.m4a, *.wma.
62
 
63
- Available [here](http://rtcamp.com/store/buddypress-media-ffmpeg-converter/ "BuddyPress Media FFMPEG Addon").
64
 
65
  **Coming Soon**
66
 
@@ -72,7 +72,7 @@ Available [here](http://rtcamp.com/store/buddypress-media-ffmpeg-converter/ "Bud
72
  **Important:** Please provide a **URL** of the site/web page when requesting support.
73
 
74
  * If you find something wrong on your site and feel it is due to BuddyPress Media:
75
- * [**rtCamp** Support Forum](http://rtcamp.com/support/forum/buddypress-media/)
76
 
77
  * If you are a developer and/or tester or would like to request a new feature:
78
  * [**GitHub** development issue log](http://github.com/rtCamp/buddypress-media/issues)
@@ -95,11 +95,11 @@ BuddyPress Media is now available in *Brazilian Portuguese*, *Spanish*, *Japanes
95
 
96
  == Frequently Asked Questions ==
97
 
98
- Please visit [BuddyPress Media's FAQ page](http://rtcamp.com/buddypress-media/faq/ "Visit BuddyPress Media's FAQ page").
99
 
100
  == Screenshots ==
101
 
102
- Please visit [BuddyPress Media's Features page](http://rtcamp.com/buddypress-media/#features "Visit BuddyPress Media's Features page").
103
 
104
  1. Media Settings
105
  2. Privacy Settings
@@ -115,7 +115,14 @@ Please visit [BuddyPress Media's Features page](http://rtcamp.com/buddypress-med
115
 
116
  == Changelog ==
117
 
118
- Please visit [BuddyPress Media's Roadmap page](http://rtcamp.com/buddypress-media/roadmap/ "Visit BuddyPress Media's Features page") to get some details about future releases.
 
 
 
 
 
 
 
119
 
120
  = 2.6.6 =
121
  * Fixes automatic count update.
@@ -295,5 +302,5 @@ Please visit [BuddyPress Media's Roadmap page](http://rtcamp.com/buddypress-medi
295
  * HTML5 Video Tag Support (with fallback)
296
 
297
  == Upgrade Notice ==
298
- = 2.6.5 =
299
- Bug fixes
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: 3.5
8
  Tested up to: 3.5
9
+ Stable tag: 2.6.7
10
 
11
  Adds Photos, Music, Videos & Albums to BuddyPress. Supports mobile devices (iPhone/iPad, etc) and automatic audio/video conversion.
12
 
15
  BuddyPress Media adds Photos, Music, Videos & Albums to your BuddyPress powered social network. Supports mobile devices (Android/iPhone/iPad, etc) and automatic audio/video conversion.
16
 
17
  = Demo & Code =
18
+ * [BuddyPress Media **Demo**](http://demo.rtcamp.com/buddypress-media/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media) (Stand-alone)
19
+ * [BuddyPress Media Kaltura Add-on](http://demo.rtcamp.com/bpm-kaltura/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media)
20
+ * [BuddyPress Media FFMPEG Add-on](http://demo.rtcamp.com/bpm-media/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media)
21
 
22
  * [Fork BuddyPress Media on **GitHub**](http://github.com/rtCamp/buddypress-media/)
23
 
24
  = Features =
25
 
26
+ [BuddyPress Media's Features page](http://rtcamp.com/buddypress-media/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media) "Visit BuddyPress Media's Features page")
27
 
28
  * **Media uploads**: Users can upload images, music and video straight from their profiles.
29
  * **Drag and drop**/ **Multiple** file uploader
33
  * **Groups** Supported: Users can upload media on Groups, as well!
34
  * **HTML5 playback**: with fall back to flash/silverlight player support
35
  * **Privacy** [*new*]: Users can control access to their uploaded media
36
+ * **Automatic conversion** (*premium*): of common audio & video formats to mp3/mp4 via [Kaltura Add-On](http://rtcamp.com/store/buddypress-media-kaltura/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media "BuddyPress Media Kaltura Addon for Kaltura.com/Kaltura-CE/Kaltura On-Prem version"), and [FFMPEG Add-On](http://rtcamp.com/store/buddypress-media-ffmpeg/ "BuddyPress Media FFMPEG Addon")
37
 
38
  = Roadmap =
39
 
40
+ [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 Roadmap page")
41
 
42
  * **Activity uploads**: Users wil be able to upload media straight from within an activity update
43
  * **Importers**: Site admins will be able to import media from other media plugins for BuddyPress
48
 
49
  = Addons (Premium) =
50
 
51
+ [**BuddyPress-Media Kaltura addon**](http://rtcamp.com/store/buddypress-media-kaltura/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media "BuddyPress Media Kaltura Addon for Kaltura.com/Kaltura-CE/Kaltura On-Prem version")
52
 
53
  * Adds support for additional video formats including *.avi, *.mkv, *.asf, *.flv, *.wmv, *.rm, *.mpg.
54
  * You can use Kaltura.com/Kaltura On-Prem or self-hosted Kaltura-CE server with this.
55
 
56
+ Available [here](http://rtcamp.com/store/buddypress-media-kaltura/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media "BuddyPress Media Kaltura Addon for Kaltura.com/Kaltura-CE/Kaltura On-Prem version")
57
 
58
+ [**BuddyPress-Media FFMPEG addon**](http://rtcamp.com/store/buddypress-media-ffmpeg-converter/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media "BuddyPress Media FFMPEG Addon").
59
 
60
  * Adds support for additional video formats including *.avi, *.mkv, *.asf, *.flv, *.wmv, *.rm, *.mpg.
61
  * Adds support for additional audio formats including *.mp3, *.ogg, *.wav, *.aac, *.m4a, *.wma.
62
 
63
+ Available [here](http://rtcamp.com/store/buddypress-media-ffmpeg-converter/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media "BuddyPress Media FFMPEG Addon").
64
 
65
  **Coming Soon**
66
 
72
  **Important:** Please provide a **URL** of the site/web page when requesting support.
73
 
74
  * If you find something wrong on your site and feel it is due to BuddyPress Media:
75
+ * [**rtCamp** Support Forum](http://rtcamp.com/support/forum/buddypress-media/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media)
76
 
77
  * If you are a developer and/or tester or would like to request a new feature:
78
  * [**GitHub** development issue log](http://github.com/rtCamp/buddypress-media/issues)
95
 
96
  == Frequently Asked Questions ==
97
 
98
+ Please visit [BuddyPress Media's FAQ page](http://rtcamp.com/buddypress-media/faq/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media "Visit BuddyPress Media's FAQ page").
99
 
100
  == Screenshots ==
101
 
102
+ Please visit [BuddyPress Media's Features page](http://rtcamp.com/buddypress-media/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media "Visit BuddyPress Media's Features page").
103
 
104
  1. Media Settings
105
  2. Privacy Settings
115
 
116
  == Changelog ==
117
 
118
+ 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.
119
+
120
+ = 2.6.7 =
121
+ * Fixes modular compatibility with friends component. Thanks to [Cat555](http://rtcamp.com/support/users/cat555/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media) for reporting this.
122
+ * Fixes modular compatibility with friends component.
123
+ * Fixes default privacy levels.
124
+ * Minor Admin UI revisions.
125
+ * Fixes load more on albums.
126
 
127
  = 2.6.6 =
128
  * Fixes automatic count update.
302
  * HTML5 Video Tag Support (with fallback)
303
 
304
  == Upgrade Notice ==
305
+ = 2.6.7 =
306
+ Important bug fixes