Version Description
- Adds album management options (Merge/Move/Delete)
- Adds shortcode to display media [bpmedia]
- Adds localization to JS
- Added partial Arabic and Persion translations
Download this release
Release Info
Developer | JoshuaAbenazer |
Plugin | ![]() |
Version | 2.10 |
Comparing to | |
See all releases |
Code changes from version 2.9 to 2.10
- app/admin/BPMediaAdmin.php +100 -3
- app/assets/css/main.css +174 -125
- app/assets/js/admin.js +5 -5
- app/assets/js/bp-media-uploader.js +5 -6
- app/assets/js/main.js +242 -12
- app/helper/BPMediaSettings.php +8 -1
- app/main/group/BPMediaGroupElementExtension.php +0 -1
- app/main/includes/BPMediaActions.php +156 -17
- app/main/includes/BPMediaHostWordpress.php +23 -5
- app/main/profile/BPMediaAlbum.php +8 -0
- app/main/profile/BPMediaAlbumScreen.php +100 -31
- app/main/profile/BPMediaTemplate.php +1 -1
- app/main/profile/BPMediaUploadScreen.php +0 -4
- index.php +1 -1
- languages/buddypress-media-ar_AR.mo +0 -0
- languages/buddypress-media-de_DE.mo +0 -0
- languages/buddypress-media-es_ES.mo +0 -0
- languages/buddypress-media-fa_IR.mo +0 -0
- languages/buddypress-media-fr_FR.mo +0 -0
- languages/buddypress-media-it_IT.mo +0 -0
- languages/buddypress-media-nl_NL.mo +0 -0
- languages/buddypress-media-pl_PL.mo +0 -0
- languages/buddypress-media-pt_BR.mo +0 -0
- languages/buddypress-media-ro_RO.mo +0 -0
- languages/buddypress-media-sr_SR.mo +0 -0
- languages/buddypress-media.mo +0 -0
- languages/buddypress-media.po +373 -186
- readme.txt +14 -5
app/admin/BPMediaAdmin.php
CHANGED
@@ -19,6 +19,10 @@ if (!class_exists('BPMediaAdmin')) {
|
|
19 |
|
20 |
public function __construct() {
|
21 |
add_action('init', array($this, 'video_transcoding_survey_response'));
|
|
|
|
|
|
|
|
|
22 |
$bp_media_feed = new BPMediaFeed();
|
23 |
add_action('wp_ajax_bp_media_fetch_feed', array($bp_media_feed, 'fetch_feed'), 1);
|
24 |
$this->bp_media_support = new BPMediaSupport();
|
@@ -33,6 +37,7 @@ if (!class_exists('BPMediaAdmin')) {
|
|
33 |
add_action('wp_ajax_bp_media_bp_album_import_step_favorites', 'BPMediaAlbumimporter::bpmedia_ajax_import_step_favorites', 1);
|
34 |
add_action('wp_ajax_bp_media_bp_album_cleanup', 'BPMediaAlbumimporter::cleanup_after_install');
|
35 |
add_action('wp_ajax_bp_media_convert_videos_form', array($this, 'convert_videos_mailchimp_send'), 1);
|
|
|
36 |
add_filter('plugin_row_meta', array($this, 'plugin_meta_premium_addon_link'), 1, 4);
|
37 |
if (is_admin()) {
|
38 |
add_action('admin_enqueue_scripts', array($this, 'ui'));
|
@@ -59,6 +64,11 @@ if (!class_exists('BPMediaAdmin')) {
|
|
59 |
$admin_ajax = admin_url('admin-ajax.php');
|
60 |
wp_enqueue_script('bp-media-admin', BP_MEDIA_URL . 'app/assets/js/admin.js', '', BP_MEDIA_VERSION);
|
61 |
wp_localize_script('bp-media-admin', 'bp_media_admin_ajax', $admin_ajax);
|
|
|
|
|
|
|
|
|
|
|
62 |
wp_localize_script('bp-media-admin', 'settings_url', add_query_arg(
|
63 |
array('page' => 'bp-media-settings'), (is_multisite() ? network_admin_url('admin.php') : admin_url('admin.php'))
|
64 |
) . '#privacy_enabled');
|
@@ -80,9 +90,9 @@ if (!class_exists('BPMediaAdmin')) {
|
|
80 |
if (!BPMediaPrivacy::is_installed()) {
|
81 |
add_submenu_page('bp-media-settings', __('BuddyPress Media Database Update', 'buddypress-media'), __('Update Database', 'buddypress-media'), 'manage_options', 'bp-media-privacy', array($this, 'privacy_page'));
|
82 |
}
|
83 |
-
|
84 |
add_submenu_page('bp-media-settings', __('Importer', 'buddypress-media'), __('Importer', 'buddypress-media'), 'manage_options', 'bp-media-importer', array($this, 'bp_importer_page'));
|
85 |
-
|
86 |
add_submenu_page('bp-media-settings', __('BuddyPress Media Addons', 'buddypress-media'), __('Addons', 'buddypress-media'), 'manage_options', 'bp-media-addons', array($this, 'addons_page'));
|
87 |
add_submenu_page('bp-media-settings', __('BuddyPress Media Support', 'buddypress-media'), __('Support ', 'buddypress-media'), 'manage_options', 'bp-media-support', array($this, 'support_page'));
|
88 |
if (bp_get_option('bp-media-survey', true)) {
|
@@ -254,7 +264,7 @@ if (!class_exists('BPMediaAdmin')) {
|
|
254 |
'class' => ($tab == 'bp-media-convert-videos') ? $active_class : $idle_class . ' last_tab'
|
255 |
);
|
256 |
}
|
257 |
-
|
258 |
$tabs[] = array(
|
259 |
'href' => bp_get_admin_url(add_query_arg(array('page' => 'bp-media-importer'), 'admin.php')),
|
260 |
'title' => __('Importer', 'buddypress-media'),
|
@@ -431,6 +441,93 @@ if (!class_exists('BPMediaAdmin')) {
|
|
431 |
return $plugin_meta;
|
432 |
}
|
433 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
434 |
}
|
435 |
|
436 |
}
|
19 |
|
20 |
public function __construct() {
|
21 |
add_action('init', array($this, 'video_transcoding_survey_response'));
|
22 |
+
if (is_multisite()) {
|
23 |
+
add_action('network_admin_notices', array($this, 'upload_filetypes_error'));
|
24 |
+
add_action('admin_notices', array($this, 'upload_filetypes_error'));
|
25 |
+
}
|
26 |
$bp_media_feed = new BPMediaFeed();
|
27 |
add_action('wp_ajax_bp_media_fetch_feed', array($bp_media_feed, 'fetch_feed'), 1);
|
28 |
$this->bp_media_support = new BPMediaSupport();
|
37 |
add_action('wp_ajax_bp_media_bp_album_import_step_favorites', 'BPMediaAlbumimporter::bpmedia_ajax_import_step_favorites', 1);
|
38 |
add_action('wp_ajax_bp_media_bp_album_cleanup', 'BPMediaAlbumimporter::cleanup_after_install');
|
39 |
add_action('wp_ajax_bp_media_convert_videos_form', array($this, 'convert_videos_mailchimp_send'), 1);
|
40 |
+
add_action('wp_ajax_bp_media_correct_upload_filetypes', array($this, 'correct_upload_filetypes'), 1);
|
41 |
add_filter('plugin_row_meta', array($this, 'plugin_meta_premium_addon_link'), 1, 4);
|
42 |
if (is_admin()) {
|
43 |
add_action('admin_enqueue_scripts', array($this, 'ui'));
|
64 |
$admin_ajax = admin_url('admin-ajax.php');
|
65 |
wp_enqueue_script('bp-media-admin', BP_MEDIA_URL . 'app/assets/js/admin.js', '', BP_MEDIA_VERSION);
|
66 |
wp_localize_script('bp-media-admin', 'bp_media_admin_ajax', $admin_ajax);
|
67 |
+
$bp_media_admin_strings = array(
|
68 |
+
'no_refresh' => __('Please do not refresh this page.', 'buddypress-media'),
|
69 |
+
'something_went_wrong' => __('Something went wronng. Please <a href onclick="location.reload();">refresh</a> page.', 'buddypress-media')
|
70 |
+
);
|
71 |
+
wp_localize_script('bp-media-admin', 'bp_media_admin_strings', $bp_media_admin_strings);
|
72 |
wp_localize_script('bp-media-admin', 'settings_url', add_query_arg(
|
73 |
array('page' => 'bp-media-settings'), (is_multisite() ? network_admin_url('admin.php') : admin_url('admin.php'))
|
74 |
) . '#privacy_enabled');
|
90 |
if (!BPMediaPrivacy::is_installed()) {
|
91 |
add_submenu_page('bp-media-settings', __('BuddyPress Media Database Update', 'buddypress-media'), __('Update Database', 'buddypress-media'), 'manage_options', 'bp-media-privacy', array($this, 'privacy_page'));
|
92 |
}
|
93 |
+
|
94 |
add_submenu_page('bp-media-settings', __('Importer', 'buddypress-media'), __('Importer', 'buddypress-media'), 'manage_options', 'bp-media-importer', array($this, 'bp_importer_page'));
|
95 |
+
|
96 |
add_submenu_page('bp-media-settings', __('BuddyPress Media Addons', 'buddypress-media'), __('Addons', 'buddypress-media'), 'manage_options', 'bp-media-addons', array($this, 'addons_page'));
|
97 |
add_submenu_page('bp-media-settings', __('BuddyPress Media Support', 'buddypress-media'), __('Support ', 'buddypress-media'), 'manage_options', 'bp-media-support', array($this, 'support_page'));
|
98 |
if (bp_get_option('bp-media-survey', true)) {
|
264 |
'class' => ($tab == 'bp-media-convert-videos') ? $active_class : $idle_class . ' last_tab'
|
265 |
);
|
266 |
}
|
267 |
+
|
268 |
$tabs[] = array(
|
269 |
'href' => bp_get_admin_url(add_query_arg(array('page' => 'bp-media-importer'), 'admin.php')),
|
270 |
'title' => __('Importer', 'buddypress-media'),
|
441 |
return $plugin_meta;
|
442 |
}
|
443 |
|
444 |
+
public function upload_filetypes_error() {
|
445 |
+
global $bp_media;
|
446 |
+
$upload_filetypes = get_site_option('upload_filetypes', 'jpg jpeg png gif');
|
447 |
+
$upload_filetypes = explode(' ', $upload_filetypes);
|
448 |
+
$flag = false;
|
449 |
+
if (isset($bp_media->options['images_enabled']) && $bp_media->options['images_enabled']) {
|
450 |
+
$not_supported_image = array_diff(array('jpg', 'jpeg', 'png', 'gif'), $upload_filetypes);
|
451 |
+
if (!empty($not_supported_image)) {
|
452 |
+
echo '<div class="error upload-filetype-network-settings-error">
|
453 |
+
<p>
|
454 |
+
' . sprintf(__('You have images enabled on BuddyPress Media but your network allowed filetypes does not allow uploading of %s. Click <a href="%s">here</a> to change your settings manually.', 'buddypress-media'), implode(', ', $not_supported_image), network_admin_url('settings.php#upload_filetypes')) . '
|
455 |
+
<br /><strong>' . __('Recommended', 'buddypress-media') . ':</strong> <input type="button" class="button update-network-settings-upload-filetypes" class="button" value="' . __('Update Network Settings Automatically', 'buddypress-media') . '"> <img style="display:none;" src="' . admin_url('images/wpspin_light.gif') . '" />
|
456 |
+
</p>
|
457 |
+
</div>';
|
458 |
+
$flag = true;
|
459 |
+
}
|
460 |
+
}
|
461 |
+
if (isset($bp_media->options['videos_enabled']) && $bp_media->options['videos_enabled']) {
|
462 |
+
if (!in_array('mp4', $upload_filetypes)) {
|
463 |
+
echo '<div class="error upload-filetype-network-settings-error">
|
464 |
+
<p>
|
465 |
+
' . sprintf(__('You have video enabled on BuddyPress Media but your network allowed filetypes does not allow uploading of mp4. Click <a href="%s">here</a> to change your settings manually.', 'buddypress-media'), network_admin_url('settings.php#upload_filetypes')) . '
|
466 |
+
<br /><strong>' . __('Recommended', 'buddypress-media') . ':</strong> <input type="button" class="button update-network-settings-upload-filetypes" class="button" value="' . __('Update Network Settings Automatically', 'buddypress-media') . '"> <img style="display:none;" src="' . admin_url('images/wpspin_light.gif') . '" />
|
467 |
+
</p>
|
468 |
+
</div>';
|
469 |
+
$flag = true;
|
470 |
+
}
|
471 |
+
}
|
472 |
+
if (isset($bp_media->options['audio_enabled']) && $bp_media->options['audio_enabled']) {
|
473 |
+
if (!in_array('mp3', $upload_filetypes)) {
|
474 |
+
echo '<div class="error upload-filetype-network-settings-error"><p>' . sprintf(__('You have audio enabled on BuddyPress Media but your network allowed filetypes does not allow uploading of mp3. Click <a href="%s">here</a> to change your settings manually.', 'buddypress-media'), network_admin_url('settings.php#upload_filetypes')) . '
|
475 |
+
<br /><strong>' . __('Recommended', 'buddypress-media') . ':</strong> <input type="button" class="button update-network-settings-upload-filetypes" class="button" value="' . __('Update Network Settings Automatically', 'buddypress-media') . '"> <img style="display:none;" src="' . admin_url('images/wpspin_light.gif') . '" />
|
476 |
+
</p>
|
477 |
+
</div>';
|
478 |
+
$flag = true;
|
479 |
+
}
|
480 |
+
}
|
481 |
+
if ($flag) {
|
482 |
+
?>
|
483 |
+
<script type="text/javascript">
|
484 |
+
jQuery('.upload-filetype-network-settings-error').on('click','.update-network-settings-upload-filetypes', function(){
|
485 |
+
jQuery('.update-network-settings-upload-filetypes').siblings('img').show();
|
486 |
+
jQuery('.update-network-settings-upload-filetypes').prop('disabled',true);
|
487 |
+
jQuery.post(ajaxurl,{action: 'bp_media_correct_upload_filetypes'}, function(response){
|
488 |
+
if(response){
|
489 |
+
jQuery('.upload-filetype-network-settings-error:first').after('<div style="display: none;" class="updated bp-media-network-settings-updated-successfully"><p><?php _e('Network settings updated successfully.', 'buddypress-media'); ?></p></div>')
|
490 |
+
jQuery('.upload-filetype-network-settings-error').remove();
|
491 |
+
jQuery('.bp-media-network-settings-updated-successfully').show();
|
492 |
+
}
|
493 |
+
});
|
494 |
+
}); </script><?php
|
495 |
+
}
|
496 |
+
}
|
497 |
+
|
498 |
+
public function correct_upload_filetypes() {
|
499 |
+
global $bp_media;
|
500 |
+
$upload_filetypes_orig = $upload_filetypes = get_site_option('upload_filetypes', 'jpg jpeg png gif');
|
501 |
+
$upload_filetypes = explode(' ', $upload_filetypes);
|
502 |
+
if (isset($bp_media->options['images_enabled']) && $bp_media->options['images_enabled']) {
|
503 |
+
$not_supported_image = array_diff(array('jpg', 'jpeg', 'png', 'gif'), $upload_filetypes);
|
504 |
+
if (!empty($not_supported_image)) {
|
505 |
+
$update_image_support = NULL;
|
506 |
+
foreach ($not_supported_image as $ns) {
|
507 |
+
$update_image_support .= ' ' . $ns;
|
508 |
+
}
|
509 |
+
if ($update_image_support) {
|
510 |
+
$upload_filetypes_orig .= $update_image_support;
|
511 |
+
update_site_option('upload_filetypes', $upload_filetypes_orig);
|
512 |
+
}
|
513 |
+
}
|
514 |
+
}
|
515 |
+
if (isset($bp_media->options['videos_enabled']) && $bp_media->options['videos_enabled']) {
|
516 |
+
if (!in_array('mp4', $upload_filetypes)) {
|
517 |
+
$upload_filetypes_orig .= ' mp4';
|
518 |
+
update_site_option('upload_filetypes', $upload_filetypes_orig);
|
519 |
+
}
|
520 |
+
}
|
521 |
+
if (isset($bp_media->options['audio_enabled']) && $bp_media->options['audio_enabled']) {
|
522 |
+
if (!in_array('mp3', $upload_filetypes)) {
|
523 |
+
$upload_filetypes_orig .= ' mp3';
|
524 |
+
update_site_option('upload_filetypes', $upload_filetypes_orig);
|
525 |
+
}
|
526 |
+
}
|
527 |
+
echo true;
|
528 |
+
die();
|
529 |
+
}
|
530 |
+
|
531 |
}
|
532 |
|
533 |
}
|
app/assets/css/main.css
CHANGED
@@ -54,16 +54,16 @@ ul#social li{display:inline;}
|
|
54 |
/* Addons page Styling */
|
55 |
|
56 |
a.toplevel_page_bp-media-settings div.wp-menu-image{
|
57 |
-
|
58 |
}
|
59 |
|
60 |
#rt-donate-button, .rt-link img{vertical-align: middle;}
|
61 |
#adminmenu .menu-icon-generic.toplevel_page_bp-media-settings div.wp-menu-image{
|
62 |
-
|
63 |
}
|
64 |
#adminmenu .menu-icon-generic.wp-has-current-submenu.toplevel_page_bp-media-settings div.wp-menu-image,
|
65 |
#adminmenu .menu-icon-generic.toplevel_page_bp-media-settings:hover div.wp-menu-image{
|
66 |
-
|
67 |
}
|
68 |
|
69 |
#bp-media-addons-list_metabox {background: #ffffff}
|
@@ -97,33 +97,72 @@ div.bp-album-import-accept{ padding: 1px 2px; margin-bottom: 15px; }
|
|
97 |
.bp-album-importer-wizard { display: none; margin-top: 15px; }
|
98 |
#setting-error-bp-album-importer { line-height: 1.8em; }
|
99 |
.wp-core-ui .btn-warning {
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
}
|
115 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
.wp-core-ui .btn-warning:hover,
|
117 |
.wp-core-ui .btn-warning:focus,
|
118 |
.wp-core-ui .btn-warning:active,
|
119 |
.wp-core-ui .btn-warning.active,
|
120 |
.wp-core-ui .btn-warning.disabled,
|
121 |
.wp-core-ui .btn-warning[disabled] {
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
}
|
128 |
|
129 |
/* Admin bar Menu */
|
@@ -147,7 +186,7 @@ div.bp-album-import-accept{ padding: 1px 2px; margin-bottom: 15px; }
|
|
147 |
.bp-media-support-attachment .add-more-attachment-btn{clear: both;display: inline-block;margin-left: 160px;margin-top: 10px;}
|
148 |
.template_select_label{float: left}
|
149 |
.template_select_container{overflow-x:scroll; width:405px;float: left}
|
150 |
-
#bp_media_settings_form .
|
151 |
/* Miscellaneous */
|
152 |
#normal-sortables .postbox .bp-media-form .submit{float: none; margin-left: 150px}
|
153 |
.rt-success{background-color: #E1FFDF;border-color: #2ACF2A;}
|
@@ -158,26 +197,33 @@ img.bp-media-donation-image{display:block;margin: 10px auto;}
|
|
158 |
.para-blockquote { background: #E5E5E5; padding: 10px; font-style: italic; }
|
159 |
#latest-update img, #members-list .update img, #members-list .update {display:block; overflow: hidden;}
|
160 |
#rtprogressbar {
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
}
|
165 |
|
166 |
#rtprogressbar div {
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
}
|
172 |
|
173 |
|
174 |
.bp_media_content img{max-width:100%;}
|
175 |
.bp_media_content .mejs-poster img{max-width: 100%;}
|
176 |
-
.media
|
|
|
|
|
|
|
|
|
177 |
.media h3 {display:block;font-size:20px;font-weight:bold;}
|
178 |
ul.bp-media-gallery{overflow: hidden}
|
179 |
.bp_media_description {display:block;margin-top:20px;}
|
180 |
-
|
|
|
|
|
|
|
181 |
#item-body ul.bp-media-gallery li{float: left;margin: 1% 1% 0;width: 18%;border-bottom: none;padding: 0;position: static;height:auto; display:block;}
|
182 |
ul.bp-media-gallery li img{max-width:150px;width:100%;height:auto;-moz-box-shadow: 1px 1px 10px #a0a0a0;-webkit-box-shadow: 1px 1px 10px #a0a0a0;box-shadow: 1px 1px 10px #a0a0a0;-moz-transition: box-shadow 0.2s linear;-webkit-transition: box-shadow 0.2s linear;transition: box-shadow 0.2s linear;}
|
183 |
ul.bp-media-gallery li img:hover{-moz-box-shadow: 1px 1px 10px #333;-webkit-box-shadow: 1px 1px 10px #333;box-shadow: 1px 1px 10px #333;}
|
@@ -193,10 +239,12 @@ ul.bp-media-gallery li span img{height: 150px;}
|
|
193 |
#item-body:after,ul.bp-media-gallery.item-list:after{content: " ";clear: both;display: block;text-indent: -9999em;}
|
194 |
#item-body{position: relative;}
|
195 |
|
|
|
|
|
196 |
#bp-media-activity-upload-ui { width: 50%;}
|
197 |
.bp-media-area-allocate{height: 10px;width: 100%;display: block;}
|
198 |
li #bp-media-upload-ui {padding: 0;max-width: 158px;position: relative;}
|
199 |
-
#bp-media-upload-ui {margin-top: 10px;}
|
200 |
#bp-media-upload-ui #drag-drop-area{border: 4px dashed #DDD;text-align: center;background: #fafafa;overflow: hidden;padding: 15px 0;}
|
201 |
#bp-media-upload-ui.hover #drag-drop-area {border-color: #83b4d8;}
|
202 |
li #bp-media-upload-ui #drag-drop-area{max-width: 150px;min-height: auto;}
|
@@ -236,8 +284,8 @@ li #bp-media-uploaded-files{left: 0;position: absolute;top: 155px;}
|
|
236 |
.bpm-aligncenter{display: inline-block;text-align: center;width: 100%;}
|
237 |
#bp-media-premium-addons ul,#bp-media-premium-addons li{list-style:disc;margin-left:10px;}
|
238 |
.bp-media-single div.bp_media_content{text-align:center;width: auto;
|
239 |
-
margin: 0 auto;
|
240 |
-
position: relative;}
|
241 |
.bp-media-single .bp_media_content .mejs-container{margin-left:auto;margin-right:auto;}
|
242 |
|
243 |
.bp-media-actions{margin:20px 0;}
|
@@ -260,6 +308,7 @@ position: relative;}
|
|
260 |
.media-tabs-container .widget-item-listing li h3 a{font-size: 13px;font-weight: normal;word-wrap: break-word; }
|
261 |
|
262 |
#bp-media-show-more{width: 200px;margin-left: auto;margin-right: auto;display: block;height: 30px;line-height: 30px;font-size: 20px;}
|
|
|
263 |
#bp-media-upload-ui.activity-component{margin-left: 74px;margin-top: 10px;}
|
264 |
ul#activity-stream li.media.album_updated ul{}
|
265 |
ul#activity-stream li.media.album_updated ul li,ul.bp-media-list-media li{float: left;margin-right:2%}
|
@@ -273,177 +322,177 @@ body.media {overflow:auto;}
|
|
273 |
#bp-media-upload-set-privacy .album-set-privacy-label{margin: 0;font-weight: normal;}
|
274 |
|
275 |
.bp-media-single .delete-activity-single,.bp-media-single .delete-activity{
|
276 |
-
|
277 |
-
|
278 |
}
|
279 |
.simplemodal-overlay{
|
280 |
-
|
281 |
-
|
282 |
}
|
283 |
.simplemodal-container{
|
284 |
-
|
285 |
}
|
286 |
.bp-media-mod-title{
|
287 |
-
|
288 |
}
|
289 |
|
290 |
.bp-media-ajax-single{
|
291 |
-
|
292 |
}
|
293 |
.bp-media-ajax-single .lightbox-spinner{
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
}
|
301 |
.simplemodal-container .simplemodal-close{
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
}
|
311 |
.simplemodal-container .simplemodal-close:hover{
|
312 |
-
|
313 |
}
|
314 |
.simplemodal-container a.modal-ctrl{
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
}
|
323 |
.simplemodal-container a.modal-ctrl:hover{
|
324 |
-
|
325 |
}
|
326 |
.simplemodal-container a.modal-ctrl span.img-icon{
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
|
332 |
-
|
333 |
}
|
334 |
.simplemodal-container a.modal-next span.img-icon{
|
335 |
-
|
336 |
-
|
337 |
}
|
338 |
.simplemodal-container a.modal-prev:hover span.img-icon{
|
339 |
-
|
340 |
}
|
341 |
.simplemodal-container a.modal-next:hover span.img-icon{
|
342 |
-
|
343 |
}
|
344 |
.simplemodal-container a.modal-prev:hover,
|
345 |
.simplemodal-container a.modal-next:hover{
|
346 |
-
|
347 |
}
|
348 |
.simplemodal-container a.modal-prev{
|
349 |
-
|
350 |
}
|
351 |
.simplemodal-container a.modal-next{
|
352 |
-
|
353 |
}
|
354 |
|
355 |
.bp-media-ajax-single .bp-media-mod-title{
|
356 |
-
|
357 |
-
|
358 |
}
|
359 |
.bp-media-ajax-single .bp-media-mod-title h2{
|
360 |
-
|
361 |
-
|
362 |
}
|
363 |
.bp-media-ajax-single .bp-media-mod-title p{
|
364 |
-
|
365 |
}
|
366 |
.bp-media-ajax-single .bp_media_content img,
|
367 |
.bp-media-ajax-single .bp_media_content video,
|
368 |
.bp-media-ajax-single .bp_media_content audio{
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
}
|
376 |
.bp-media-ajax-single .bp_media_author{
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
}
|
381 |
.bp-media-ajax-single .bp-media-content-wrap,
|
382 |
.bp-media-ajax-single .bp_media_content{
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
|
393 |
}
|
394 |
.bp-media-ajax-single .bp_media_content{
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
}
|
399 |
.bp-media-ajax-single .bp-media-content-wrap .bp_media_description{
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
}
|
405 |
.bp-media-ajax-single .bp-media-meta-content-wrap{
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
}
|
413 |
.bp-media-ajax-single .bp-media-meta-content-wrap .activity-meta{
|
414 |
-
|
415 |
}
|
416 |
.bp-media-ajax-single .bp-media-meta-content-wrap .activity-meta a{
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
}
|
421 |
.bp-media-ajax-single .bp-media-meta-content-wrap div.activity-comments ul li > ul{
|
422 |
-
|
423 |
-
|
424 |
}
|
425 |
.bp-media-ajax-single .bp-media-meta-content-wrap div.activity-comments form div.ac-reply-content{
|
426 |
-
|
427 |
-
|
428 |
}
|
429 |
/*.bp-media-ajax-single .bp-media-meta-content-wrap div.activity-meta a {
|
430 |
padding: 0;
|
431 |
float:left;
|
432 |
}*/
|
433 |
.bp-media-ajax-preloader{
|
434 |
-
|
435 |
}
|
436 |
|
437 |
@media (min-width: 981px) and (max-width: 1096px) {
|
438 |
li #bp-media-upload-ui #drag-drop-area{padding: 10px 0;}
|
439 |
-
/* li #bp-media-upload-ui .drag-drop-inside{margin: 0 auto;}*/
|
440 |
li #bp-media-album-in, .albums li #bp-media-album-or{margin: 15px auto;}
|
441 |
li #bp-media-upload-ui .drag-drop-inside p.drag-drop-info{font-size: 17px;}
|
442 |
li #bp-media-upload-ui .drag-drop-buttons input{padding: 3px 8px;}
|
443 |
li #bp-media-uploaded-files{top: 130px}
|
444 |
li #bp-media-upload-ui #bp-media-album-prompt{margin-top: 0;}
|
445 |
li #bp-media-album-prompt input.button{padding: 3px;}
|
446 |
-
/* .albums li #bp-media-upload-ui #drag-drop-area{padding: 10px 0 0;}*/
|
447 |
}
|
448 |
@media (max-width: 980px) {
|
449 |
#item-body ul.bp-media-gallery li{width: 23%;}
|
@@ -470,7 +519,7 @@ float:left;
|
|
470 |
ul.bp-media-gallery li img,li #bp-media-upload-ui #drag-drop-area{max-width: 170px;width: 100%;}
|
471 |
li #bp-media-upload-ui #drag-drop-area{max-width: 162px;padding: 20px 0;}
|
472 |
#bp-media-upload-ui .drag-drop-area{padding: 23px 0 10px;}
|
473 |
-
/* li #bp-media-upload-ui .drag-drop-inside{margin: 0 auto 23px;}*/
|
474 |
}
|
475 |
@media (max-width: 379px) {
|
476 |
#bp-media-upload-ui{min-height: 190px;}
|
54 |
/* Addons page Styling */
|
55 |
|
56 |
a.toplevel_page_bp-media-settings div.wp-menu-image{
|
57 |
+
background:url('../img/admin-menu.png') 0 -32px no-repeat;
|
58 |
}
|
59 |
|
60 |
#rt-donate-button, .rt-link img{vertical-align: middle;}
|
61 |
#adminmenu .menu-icon-generic.toplevel_page_bp-media-settings div.wp-menu-image{
|
62 |
+
background-position: 0 -32px;
|
63 |
}
|
64 |
#adminmenu .menu-icon-generic.wp-has-current-submenu.toplevel_page_bp-media-settings div.wp-menu-image,
|
65 |
#adminmenu .menu-icon-generic.toplevel_page_bp-media-settings:hover div.wp-menu-image{
|
66 |
+
background-position-y:0;
|
67 |
}
|
68 |
|
69 |
#bp-media-addons-list_metabox {background: #ffffff}
|
97 |
.bp-album-importer-wizard { display: none; margin-top: 15px; }
|
98 |
#setting-error-bp-album-importer { line-height: 1.8em; }
|
99 |
.wp-core-ui .btn-warning {
|
100 |
+
color: #ffffff;
|
101 |
+
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
102 |
+
background-color: #faa732;
|
103 |
+
*background-color: #f89406;
|
104 |
+
background-image: -moz-linear-gradient(top, #fbb450, #f89406);
|
105 |
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
|
106 |
+
background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
|
107 |
+
background-image: -o-linear-gradient(top, #fbb450, #f89406);
|
108 |
+
background-image: linear-gradient(to bottom, #fbb450, #f89406);
|
109 |
+
background-repeat: repeat-x;
|
110 |
+
border-color: #f89406 #f89406 #ad6704;
|
111 |
+
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
112 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
|
113 |
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
114 |
}
|
115 |
|
116 |
+
#item-body a.btn-danger {
|
117 |
+
padding: 4px 10px;
|
118 |
+
color: #ffffff;
|
119 |
+
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
|
120 |
+
background-color: #da4f49;
|
121 |
+
*background-color: #bd362f;
|
122 |
+
background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
|
123 |
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
|
124 |
+
background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
|
125 |
+
background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
|
126 |
+
background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);
|
127 |
+
background-repeat: repeat-x;
|
128 |
+
border-color: #bd362f #bd362f #802420;
|
129 |
+
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
130 |
+
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);
|
131 |
+
filter: progid:DXImageTransform.Microsoft.gradient(enabled=false);
|
132 |
+
}
|
133 |
+
|
134 |
+
#item-body a.btn-danger:hover,
|
135 |
+
#item-body a.btn-danger:focus,
|
136 |
+
#item-body a.btn-danger:active,
|
137 |
+
#item-body a.btn-danger.active,
|
138 |
+
#item-body a.btn-danger.disabled,
|
139 |
+
#item-body a.btn-danger[disabled] {
|
140 |
+
color: #ffffff;
|
141 |
+
border-color: #bd362f #bd362f #802420;
|
142 |
+
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
143 |
+
background: #bd362f;
|
144 |
+
*background: #a9302a;
|
145 |
+
}
|
146 |
+
|
147 |
+
#item-body a.btn-danger:active,
|
148 |
+
#item-body a.btn-danger.active {
|
149 |
+
border-color: #bd362f #bd362f #802420;
|
150 |
+
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
151 |
+
background: #942a25 \9;
|
152 |
+
}
|
153 |
+
|
154 |
+
|
155 |
.wp-core-ui .btn-warning:hover,
|
156 |
.wp-core-ui .btn-warning:focus,
|
157 |
.wp-core-ui .btn-warning:active,
|
158 |
.wp-core-ui .btn-warning.active,
|
159 |
.wp-core-ui .btn-warning.disabled,
|
160 |
.wp-core-ui .btn-warning[disabled] {
|
161 |
+
color: #ffffff;
|
162 |
+
background: #f89406;
|
163 |
+
background-color: #f89406;
|
164 |
+
*background: #df8505;
|
165 |
+
*background-color: #df8505;
|
166 |
}
|
167 |
|
168 |
/* Admin bar Menu */
|
186 |
.bp-media-support-attachment .add-more-attachment-btn{clear: both;display: inline-block;margin-left: 160px;margin-top: 10px;}
|
187 |
.template_select_label{float: left}
|
188 |
.template_select_container{overflow-x:scroll; width:405px;float: left}
|
189 |
+
#bp_media_settings_form .support_form_loader{height: 100px; width: 200px; background: url("../img/loader.gif") no-repeat }
|
190 |
/* Miscellaneous */
|
191 |
#normal-sortables .postbox .bp-media-form .submit{float: none; margin-left: 150px}
|
192 |
.rt-success{background-color: #E1FFDF;border-color: #2ACF2A;}
|
197 |
.para-blockquote { background: #E5E5E5; padding: 10px; font-style: italic; }
|
198 |
#latest-update img, #members-list .update img, #members-list .update {display:block; overflow: hidden;}
|
199 |
#rtprogressbar {
|
200 |
+
background-color: #444;
|
201 |
+
border-radius: 13px;
|
202 |
+
padding: 3px;
|
203 |
}
|
204 |
|
205 |
#rtprogressbar div {
|
206 |
+
background-color: #fb6003;
|
207 |
+
width: 0;
|
208 |
+
height: 20px;
|
209 |
+
border-radius: 10px;
|
210 |
}
|
211 |
|
212 |
|
213 |
.bp_media_content img{max-width:100%;}
|
214 |
.bp_media_content .mejs-poster img{max-width: 100%;}
|
215 |
+
.media .album-edit{display:inline;}
|
216 |
+
.media #item-body h3 {float: left;}
|
217 |
+
.media #item-body .bp-media-gallery h3 { float:none; }
|
218 |
+
.media .bp-media-album-actions {float: left; margin-left: 15px;}
|
219 |
+
.media .bulk-move, .media .bulk-delete {display: none;}
|
220 |
.media h3 {display:block;font-size:20px;font-weight:bold;}
|
221 |
ul.bp-media-gallery{overflow: hidden}
|
222 |
.bp_media_description {display:block;margin-top:20px;}
|
223 |
+
#bp-media-upload-form, #message, .bp-media-action-wrapper, #bp-media-user-privacy {clear:left;}
|
224 |
+
.bp-media-album-action-ui { display:none; }
|
225 |
+
.bp-media-album-description {clear:left;font-size:1.2em}
|
226 |
+
ul.bp-media-gallery.item-list{clear:left;overflow:visible;margin: 1% 0;width: auto;}
|
227 |
#item-body ul.bp-media-gallery li{float: left;margin: 1% 1% 0;width: 18%;border-bottom: none;padding: 0;position: static;height:auto; display:block;}
|
228 |
ul.bp-media-gallery li img{max-width:150px;width:100%;height:auto;-moz-box-shadow: 1px 1px 10px #a0a0a0;-webkit-box-shadow: 1px 1px 10px #a0a0a0;box-shadow: 1px 1px 10px #a0a0a0;-moz-transition: box-shadow 0.2s linear;-webkit-transition: box-shadow 0.2s linear;transition: box-shadow 0.2s linear;}
|
229 |
ul.bp-media-gallery li img:hover{-moz-box-shadow: 1px 1px 10px #333;-webkit-box-shadow: 1px 1px 10px #333;box-shadow: 1px 1px 10px #333;}
|
239 |
#item-body:after,ul.bp-media-gallery.item-list:after{content: " ";clear: both;display: block;text-indent: -9999em;}
|
240 |
#item-body{position: relative;}
|
241 |
|
242 |
+
|
243 |
+
.bp-media-ajax-spinner { display: none; vertical-align: -3px;}
|
244 |
#bp-media-activity-upload-ui { width: 50%;}
|
245 |
.bp-media-area-allocate{height: 10px;width: 100%;display: block;}
|
246 |
li #bp-media-upload-ui {padding: 0;max-width: 158px;position: relative;}
|
247 |
+
#bp-media-upload-ui {margin-top: 10px; clear: left;}
|
248 |
#bp-media-upload-ui #drag-drop-area{border: 4px dashed #DDD;text-align: center;background: #fafafa;overflow: hidden;padding: 15px 0;}
|
249 |
#bp-media-upload-ui.hover #drag-drop-area {border-color: #83b4d8;}
|
250 |
li #bp-media-upload-ui #drag-drop-area{max-width: 150px;min-height: auto;}
|
284 |
.bpm-aligncenter{display: inline-block;text-align: center;width: 100%;}
|
285 |
#bp-media-premium-addons ul,#bp-media-premium-addons li{list-style:disc;margin-left:10px;}
|
286 |
.bp-media-single div.bp_media_content{text-align:center;width: auto;
|
287 |
+
margin: 0 auto;
|
288 |
+
position: relative;}
|
289 |
.bp-media-single .bp_media_content .mejs-container{margin-left:auto;margin-right:auto;}
|
290 |
|
291 |
.bp-media-actions{margin:20px 0;}
|
308 |
.media-tabs-container .widget-item-listing li h3 a{font-size: 13px;font-weight: normal;word-wrap: break-word; }
|
309 |
|
310 |
#bp-media-show-more{width: 200px;margin-left: auto;margin-right: auto;display: block;height: 30px;line-height: 30px;font-size: 20px;}
|
311 |
+
#bp-media-show-more-sc {display:block; margin: 0 auto;}
|
312 |
#bp-media-upload-ui.activity-component{margin-left: 74px;margin-top: 10px;}
|
313 |
ul#activity-stream li.media.album_updated ul{}
|
314 |
ul#activity-stream li.media.album_updated ul li,ul.bp-media-list-media li{float: left;margin-right:2%}
|
322 |
#bp-media-upload-set-privacy .album-set-privacy-label{margin: 0;font-weight: normal;}
|
323 |
|
324 |
.bp-media-single .delete-activity-single,.bp-media-single .delete-activity{
|
325 |
+
color: #ff0000;
|
326 |
+
font-weight:bold;
|
327 |
}
|
328 |
.simplemodal-overlay{
|
329 |
+
background:#333 none;
|
330 |
+
z-index: 100000;
|
331 |
}
|
332 |
.simplemodal-container{
|
333 |
+
background:#fff none;
|
334 |
}
|
335 |
.bp-media-mod-title{
|
336 |
+
display:none;
|
337 |
}
|
338 |
|
339 |
.bp-media-ajax-single{
|
340 |
+
padding:0;
|
341 |
}
|
342 |
.bp-media-ajax-single .lightbox-spinner{
|
343 |
+
height:24px;
|
344 |
+
width:24px;
|
345 |
+
background: url("../img/boxspinner.gif") center center;
|
346 |
+
left:50%;
|
347 |
+
top:50%;
|
348 |
+
position:absolute;
|
349 |
}
|
350 |
.simplemodal-container .simplemodal-close{
|
351 |
+
background: url("../img/bp-media-modal.png") right bottom no-repeat;
|
352 |
+
width:22px;
|
353 |
+
height:22px;
|
354 |
+
display:block;
|
355 |
+
position:absolute;
|
356 |
+
right:0px;
|
357 |
+
top:0px;
|
358 |
+
cursor: pointer;
|
359 |
}
|
360 |
.simplemodal-container .simplemodal-close:hover{
|
361 |
+
background-position: right top;
|
362 |
}
|
363 |
.simplemodal-container a.modal-ctrl{
|
364 |
+
position:absolute;
|
365 |
+
height:100%;
|
366 |
+
height:100px;
|
367 |
+
width:100px;
|
368 |
+
top:50%;
|
369 |
+
margin-top:-50px;
|
370 |
+
cursor: pointer;
|
371 |
}
|
372 |
.simplemodal-container a.modal-ctrl:hover{
|
373 |
+
background: #232323 none;
|
374 |
}
|
375 |
.simplemodal-container a.modal-ctrl span.img-icon{
|
376 |
+
display: block;
|
377 |
+
height:22px;
|
378 |
+
width:22px;
|
379 |
+
margin:39px auto 39px 10px;
|
380 |
|
381 |
+
background: url("../img/bp-media-modal.png") left bottom no-repeat;
|
382 |
}
|
383 |
.simplemodal-container a.modal-next span.img-icon{
|
384 |
+
background-position: center bottom;
|
385 |
+
margin:39px 10px 39px auto;
|
386 |
}
|
387 |
.simplemodal-container a.modal-prev:hover span.img-icon{
|
388 |
+
background-position: left top;
|
389 |
}
|
390 |
.simplemodal-container a.modal-next:hover span.img-icon{
|
391 |
+
background-position: center top;
|
392 |
}
|
393 |
.simplemodal-container a.modal-prev:hover,
|
394 |
.simplemodal-container a.modal-next:hover{
|
395 |
+
background:url("../img/") no-repeat;
|
396 |
}
|
397 |
.simplemodal-container a.modal-prev{
|
398 |
+
left: 0px;
|
399 |
}
|
400 |
.simplemodal-container a.modal-next{
|
401 |
+
right: 0px;
|
402 |
}
|
403 |
|
404 |
.bp-media-ajax-single .bp-media-mod-title{
|
405 |
+
display:block;
|
406 |
+
margin-top:22px;
|
407 |
}
|
408 |
.bp-media-ajax-single .bp-media-mod-title h2{
|
409 |
+
margin: 5px 0;
|
410 |
+
padding:0;
|
411 |
}
|
412 |
.bp-media-ajax-single .bp-media-mod-title p{
|
413 |
+
line-height:1.4em;
|
414 |
}
|
415 |
.bp-media-ajax-single .bp_media_content img,
|
416 |
.bp-media-ajax-single .bp_media_content video,
|
417 |
.bp-media-ajax-single .bp_media_content audio{
|
418 |
+
max-width: 100%;
|
419 |
+
display:inline-block;
|
420 |
+
margin:0 auto;
|
421 |
+
vertical-align: middle;
|
422 |
+
background:#fff none;
|
423 |
+
max-height:600px;
|
424 |
}
|
425 |
.bp-media-ajax-single .bp_media_author{
|
426 |
+
position:absolute;
|
427 |
+
top:0;
|
428 |
+
left:0;
|
429 |
}
|
430 |
.bp-media-ajax-single .bp-media-content-wrap,
|
431 |
.bp-media-ajax-single .bp_media_content{
|
432 |
+
float:left;
|
433 |
+
width:auto;
|
434 |
+
margin:0;
|
435 |
+
position:relative;
|
436 |
+
overflow:hidden;
|
437 |
+
height:480px;
|
438 |
+
min-width:640px;
|
439 |
+
background: #333 none;
|
440 |
+
display:table;
|
441 |
|
442 |
}
|
443 |
.bp-media-ajax-single .bp_media_content{
|
444 |
+
display:table-cell;
|
445 |
+
vertical-align: middle;
|
446 |
+
float:none;
|
447 |
}
|
448 |
.bp-media-ajax-single .bp-media-content-wrap .bp_media_description{
|
449 |
+
display:block;
|
450 |
+
position:absolute;
|
451 |
+
bottom:0;
|
452 |
+
left:0;
|
453 |
}
|
454 |
.bp-media-ajax-single .bp-media-meta-content-wrap{
|
455 |
+
float:left;
|
456 |
+
width:250px;
|
457 |
+
margin:0;
|
458 |
+
min-height:480px;
|
459 |
+
margin-left:10px;
|
460 |
+
overflow:auto;
|
461 |
}
|
462 |
.bp-media-ajax-single .bp-media-meta-content-wrap .activity-meta{
|
463 |
+
margin:0;
|
464 |
}
|
465 |
.bp-media-ajax-single .bp-media-meta-content-wrap .activity-meta a{
|
466 |
+
padding: 2px 8px;
|
467 |
+
margin: 5px 5px 0 0;
|
468 |
+
display:inline-block;
|
469 |
}
|
470 |
.bp-media-ajax-single .bp-media-meta-content-wrap div.activity-comments ul li > ul{
|
471 |
+
margin-left:0;
|
472 |
+
padding-left:0;
|
473 |
}
|
474 |
.bp-media-ajax-single .bp-media-meta-content-wrap div.activity-comments form div.ac-reply-content{
|
475 |
+
margin-left:0;
|
476 |
+
padding-left:0;
|
477 |
}
|
478 |
/*.bp-media-ajax-single .bp-media-meta-content-wrap div.activity-meta a {
|
479 |
padding: 0;
|
480 |
float:left;
|
481 |
}*/
|
482 |
.bp-media-ajax-preloader{
|
483 |
+
display:none;
|
484 |
}
|
485 |
|
486 |
@media (min-width: 981px) and (max-width: 1096px) {
|
487 |
li #bp-media-upload-ui #drag-drop-area{padding: 10px 0;}
|
488 |
+
/* li #bp-media-upload-ui .drag-drop-inside{margin: 0 auto;}*/
|
489 |
li #bp-media-album-in, .albums li #bp-media-album-or{margin: 15px auto;}
|
490 |
li #bp-media-upload-ui .drag-drop-inside p.drag-drop-info{font-size: 17px;}
|
491 |
li #bp-media-upload-ui .drag-drop-buttons input{padding: 3px 8px;}
|
492 |
li #bp-media-uploaded-files{top: 130px}
|
493 |
li #bp-media-upload-ui #bp-media-album-prompt{margin-top: 0;}
|
494 |
li #bp-media-album-prompt input.button{padding: 3px;}
|
495 |
+
/* .albums li #bp-media-upload-ui #drag-drop-area{padding: 10px 0 0;}*/
|
496 |
}
|
497 |
@media (max-width: 980px) {
|
498 |
#item-body ul.bp-media-gallery li{width: 23%;}
|
519 |
ul.bp-media-gallery li img,li #bp-media-upload-ui #drag-drop-area{max-width: 170px;width: 100%;}
|
520 |
li #bp-media-upload-ui #drag-drop-area{max-width: 162px;padding: 20px 0;}
|
521 |
#bp-media-upload-ui .drag-drop-area{padding: 23px 0 10px;}
|
522 |
+
/* li #bp-media-upload-ui .drag-drop-inside{margin: 0 auto 23px;}*/
|
523 |
}
|
524 |
@media (max-width: 379px) {
|
525 |
#bp-media-upload-ui{min-height: 190px;}
|
app/assets/js/admin.js
CHANGED
@@ -25,7 +25,7 @@ jQuery(document).ready(function(){
|
|
25 |
jQuery('#bp-media-settings-boxes').on('change', '#select-request', function(){
|
26 |
if(jQuery(this).val()){
|
27 |
jQuery('#bp_media_settings_form .bp-media-metabox-holder').html()
|
28 |
-
jQuery('#bp_media_settings_form .bp-media-metabox-holder').html('<div class="
|
29 |
var data = {
|
30 |
action: 'bp_media_select_request',
|
31 |
form: jQuery(this).val()
|
@@ -43,7 +43,7 @@ jQuery(document).ready(function(){
|
|
43 |
jQuery('#bp-media-settings-boxes').on('click', '#cancel-request', function(){
|
44 |
if(jQuery(this).val()){
|
45 |
jQuery('#bp_media_settings_form .bp-media-metabox-holder').html()
|
46 |
-
jQuery('#bp_media_settings_form .bp-media-metabox-holder').html('<div class="
|
47 |
var data = {
|
48 |
action: 'bp_media_cancel_request'
|
49 |
};
|
@@ -70,7 +70,7 @@ jQuery(document).ready(function(){
|
|
70 |
jQuery('#bp_media_settings_form .bp-media-metabox-holder').html(response).fadeIn('slow');
|
71 |
});
|
72 |
});
|
73 |
-
|
74 |
function fireRequest(data) {
|
75 |
return jQuery.post(ajaxurl, data, function(response){
|
76 |
if(response != 0){
|
@@ -272,7 +272,7 @@ jQuery(document).ready(function(){
|
|
272 |
}
|
273 |
wp_admin_url = ajaxurl.replace('admin-ajax.php','');
|
274 |
if (!jQuery('.bpm-ajax-loader').length)
|
275 |
-
jQuery(this).after(' <img class="bpm-ajax-loader" src="'+wp_admin_url+'images/wpspin_light.gif" /> <strong
|
276 |
|
277 |
|
278 |
$progress_parent = jQuery('#bpmedia-bpalbumimport');
|
@@ -347,7 +347,7 @@ jQuery(document).ready(function(){
|
|
347 |
if(response)
|
348 |
location.reload();
|
349 |
else
|
350 |
-
$bpalbum.parent().after('<p
|
351 |
});
|
352 |
});
|
353 |
|
25 |
jQuery('#bp-media-settings-boxes').on('change', '#select-request', function(){
|
26 |
if(jQuery(this).val()){
|
27 |
jQuery('#bp_media_settings_form .bp-media-metabox-holder').html()
|
28 |
+
jQuery('#bp_media_settings_form .bp-media-metabox-holder').html('<div class="support_form_loader"></div>');
|
29 |
var data = {
|
30 |
action: 'bp_media_select_request',
|
31 |
form: jQuery(this).val()
|
43 |
jQuery('#bp-media-settings-boxes').on('click', '#cancel-request', function(){
|
44 |
if(jQuery(this).val()){
|
45 |
jQuery('#bp_media_settings_form .bp-media-metabox-holder').html()
|
46 |
+
jQuery('#bp_media_settings_form .bp-media-metabox-holder').html('<div class="support_form_loader"></div>');
|
47 |
var data = {
|
48 |
action: 'bp_media_cancel_request'
|
49 |
};
|
70 |
jQuery('#bp_media_settings_form .bp-media-metabox-holder').html(response).fadeIn('slow');
|
71 |
});
|
72 |
});
|
73 |
+
|
74 |
function fireRequest(data) {
|
75 |
return jQuery.post(ajaxurl, data, function(response){
|
76 |
if(response != 0){
|
272 |
}
|
273 |
wp_admin_url = ajaxurl.replace('admin-ajax.php','');
|
274 |
if (!jQuery('.bpm-ajax-loader').length)
|
275 |
+
jQuery(this).after(' <img class="bpm-ajax-loader" src="'+wp_admin_url+'images/wpspin_light.gif" /> <strong>'+bp_media_admin_strings.no_refresh+'</strong>');
|
276 |
|
277 |
|
278 |
$progress_parent = jQuery('#bpmedia-bpalbumimport');
|
347 |
if(response)
|
348 |
location.reload();
|
349 |
else
|
350 |
+
$bpalbum.parent().after('<p>'+bp_media_admin_strings.something_went_wrong+'</p>');
|
351 |
});
|
352 |
});
|
353 |
|
app/assets/js/bp-media-uploader.js
CHANGED
@@ -26,7 +26,7 @@ jQuery(document).ready(function(){
|
|
26 |
}
|
27 |
var new_album_name = jQuery('#bp_media_album_new').val();
|
28 |
if(new_album_name.length==0){
|
29 |
-
alert
|
30 |
return false;
|
31 |
} else {
|
32 |
new_album_flag = 1;
|
@@ -39,9 +39,8 @@ jQuery(document).ready(function(){
|
|
39 |
jQuery.post(bp_media_vars.ajaxurl,data,function(response){
|
40 |
var album = parseInt(response);
|
41 |
if(album == 0){
|
42 |
-
alert
|
43 |
-
}
|
44 |
-
else {
|
45 |
jQuery('#bp-media-album-prompt select option').removeAttr('selected');
|
46 |
jQuery('#bp-media-selected-album').prepend('<option value='+album+' selected="selected">'+new_album_name+'</option>');
|
47 |
jQuery('#bp-media-album-prompt div.hide').hide();
|
@@ -69,7 +68,7 @@ jQuery(document).ready(function(){
|
|
69 |
|
70 |
bp_media_uploader.bind('FilesAdded', function(up, files) {
|
71 |
if ( jQuery('#bp-media-selected-album').val() == 'create_new' ) {
|
72 |
-
alert
|
73 |
return false;
|
74 |
}
|
75 |
//bp_media_is_multiple_upload = files.length==1&&jQuery('.bp-media-progressbar').length==0?false:true;
|
@@ -112,7 +111,7 @@ jQuery(document).ready(function(){
|
|
112 |
else
|
113 |
new_location = new_location.concat('0/');
|
114 |
window.location.replace(new_location);
|
115 |
-
} else
|
116 |
location.reload(true);
|
117 |
});
|
118 |
|
26 |
}
|
27 |
var new_album_name = jQuery('#bp_media_album_new').val();
|
28 |
if(new_album_name.length==0){
|
29 |
+
alert(bp_media_uploader_strings.no_name);
|
30 |
return false;
|
31 |
} else {
|
32 |
new_album_flag = 1;
|
39 |
jQuery.post(bp_media_vars.ajaxurl,data,function(response){
|
40 |
var album = parseInt(response);
|
41 |
if(album == 0){
|
42 |
+
alert(bp_media_uploader_strings.cant_upload_group_album);
|
43 |
+
} else {
|
|
|
44 |
jQuery('#bp-media-album-prompt select option').removeAttr('selected');
|
45 |
jQuery('#bp-media-selected-album').prepend('<option value='+album+' selected="selected">'+new_album_name+'</option>');
|
46 |
jQuery('#bp-media-album-prompt div.hide').hide();
|
68 |
|
69 |
bp_media_uploader.bind('FilesAdded', function(up, files) {
|
70 |
if ( jQuery('#bp-media-selected-album').val() == 'create_new' ) {
|
71 |
+
alert(bp_media_uploader_strings.select_album);
|
72 |
return false;
|
73 |
}
|
74 |
//bp_media_is_multiple_upload = files.length==1&&jQuery('.bp-media-progressbar').length==0?false:true;
|
111 |
else
|
112 |
new_location = new_location.concat('0/');
|
113 |
window.location.replace(new_location);
|
114 |
+
} else
|
115 |
location.reload(true);
|
116 |
});
|
117 |
|
app/assets/js/main.js
CHANGED
@@ -30,7 +30,219 @@ jQuery(document).ready(function(){
|
|
30 |
|
31 |
|
32 |
jQuery('#item-body').on('click','#bp-media-upload-button', function(){
|
33 |
-
jQuery
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
});
|
35 |
|
36 |
jQuery('#bp-media-upload-ui').bind('dragover', function(e){
|
@@ -67,9 +279,30 @@ jQuery(document).ready(function(){
|
|
67 |
jQuery('.bp-media-gallery').append(response);
|
68 |
});
|
69 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
setTimeout(function(){
|
71 |
jQuery('.media album_updated .delete-activity,.media_upload .delete-activity').unbind('click').click(function(e){
|
72 |
-
if(confirm
|
73 |
return true;
|
74 |
}
|
75 |
else{
|
@@ -99,12 +332,7 @@ jQuery(document).ready(function(){
|
|
99 |
});
|
100 |
|
101 |
if ( bp_media_vars.lightbox > 0 ) {
|
102 |
-
jQuery('#bp-media-list').on('click','li a',function(e){
|
103 |
-
e.preventDefault();
|
104 |
-
$current = jQuery(this);
|
105 |
-
load_media($current);
|
106 |
-
});
|
107 |
-
jQuery('.widget-item-listing').on('click','li a',function(e){
|
108 |
e.preventDefault();
|
109 |
$current = jQuery(this);
|
110 |
load_media($current);
|
@@ -119,7 +347,6 @@ jQuery(document).ready(function(){
|
|
119 |
e.preventDefault();
|
120 |
if(!$current.parent().hasClass('bp_media_content')){
|
121 |
$next_current = $current.closest('li').next().find('a');
|
122 |
-
console.log(jQuery('#bp-media-show-more').length);
|
123 |
if($next_current.length<1){
|
124 |
if(jQuery('#bp-media-show-more').length>0){
|
125 |
var args = load_more_data();
|
@@ -235,6 +462,10 @@ jQuery(document).ready(function(){
|
|
235 |
});
|
236 |
}
|
237 |
function load_more_data(){
|
|
|
|
|
|
|
|
|
238 |
var data = {
|
239 |
action: 'bp_media_load_more',
|
240 |
page:++bp_media_vars.page,
|
@@ -242,7 +473,8 @@ jQuery(document).ready(function(){
|
|
242 |
action_variables : bp_media_vars.action_variables,
|
243 |
displayed_user : bp_media_vars.displayed_user,
|
244 |
loggedin_user : bp_media_vars.loggedin_user,
|
245 |
-
current_group : bp_media_vars.current_group
|
|
|
246 |
};
|
247 |
return data;
|
248 |
}
|
@@ -288,10 +520,8 @@ jQuery(document).ready(function(){
|
|
288 |
);
|
289 |
}
|
290 |
|
291 |
-
|
292 |
/* Favoriting activity stream items */
|
293 |
if ( target.hasClass('fav') || target.hasClass('unfav') ) {
|
294 |
-
console.log('hua');
|
295 |
event.preventDefault();
|
296 |
var type = target.hasClass('fav') ? 'fav' : 'unfav';
|
297 |
var parent = target.closest('.activity_update');
|
30 |
|
31 |
|
32 |
jQuery('#item-body').on('click','#bp-media-upload-button', function(){
|
33 |
+
jQuery('#bp-media-move-merge-ui').slideUp();
|
34 |
+
jQuery('#bp-media-delete-ui').slideUp();
|
35 |
+
jQuery('#bp-media-list input').remove();
|
36 |
+
jQuery('#bp-media-show-more').attr('data-move',0);
|
37 |
+
$parent = jQuery('.bp-media-album-actions');
|
38 |
+
$wrapper = jQuery('.bp-media-upload-wrapper');
|
39 |
+
$description = jQuery('.bp-media-album-description');
|
40 |
+
if($parent.length>0 && $wrapper.length<=0 ){
|
41 |
+
if($description.length>0)
|
42 |
+
$description.after('<div class="bp-media-action-wrapper bp-media-upload-wrapper"></div>');
|
43 |
+
else
|
44 |
+
$parent.after('<div class="bp-media-action-wrapper bp-media-upload-wrapper"></div>');
|
45 |
+
jQuery('#bp-media-upload-ui').appendTo('.bp-media-upload-wrapper');
|
46 |
+
}
|
47 |
+
jQuery('#bp-media-upload-ui').slideToggle();
|
48 |
+
});
|
49 |
+
|
50 |
+
jQuery('#item-body').on('click','#bp-media-move-merge-button', function(){
|
51 |
+
jQuery('#bp-media-upload-ui').slideUp();
|
52 |
+
jQuery('#bp-media-delete-ui').slideUp();
|
53 |
+
$parent = jQuery('.bp-media-album-actions');
|
54 |
+
$wrapper = jQuery('.bp-media-move-merge-wrapper');
|
55 |
+
$description = jQuery('.bp-media-album-description');
|
56 |
+
if($parent.length>0 && $wrapper.length<=0 ){
|
57 |
+
if($description.length>0)
|
58 |
+
$description.after('<div class="bp-media-action-wrapper bp-media-move-merge-wrapper"></div>');
|
59 |
+
else
|
60 |
+
$parent.after('<div class="bp-media-action-wrapper bp-media-move-merge-wrapper"></div>');
|
61 |
+
jQuery('#bp-media-move-merge-ui').appendTo('.bp-media-move-merge-wrapper');
|
62 |
+
}
|
63 |
+
jQuery('#bp-media-move-merge-ui').slideToggle('slow',function(){
|
64 |
+
if(jQuery(this).css('display') == 'none' || jQuery('#bp-media-move-merge-select option:checked').val() == 'merge') {
|
65 |
+
jQuery('#bp-media-list input').remove();
|
66 |
+
jQuery('#bp-media-show-more').attr('data-move',0);
|
67 |
+
} else if ( !jQuery('#bp-media-list input').length ) {
|
68 |
+
jQuery('#bp-media-show-more').attr('data-move',1);
|
69 |
+
jQuery('#bp-media-list h3').each(function(){
|
70 |
+
$media_id = jQuery(this).parent().attr('id').replace('bp-media-item-','');
|
71 |
+
jQuery(this).prepend('<input type="checkbox" name="move" value="'+$media_id+'" />');
|
72 |
+
});
|
73 |
+
}
|
74 |
+
});
|
75 |
+
});
|
76 |
+
|
77 |
+
jQuery('#item-body').on('click','#bp-media-delete-button', function(){
|
78 |
+
jQuery('#bp-media-upload-ui').slideUp();
|
79 |
+
jQuery('#bp-media-move-merge-ui').slideUp();
|
80 |
+
$parent = jQuery('.bp-media-album-actions');
|
81 |
+
$wrapper = jQuery('.bp-media-delete-wrapper');
|
82 |
+
$description = jQuery('.bp-media-album-description');
|
83 |
+
if($parent.length>0 && $wrapper.length<=0 ){
|
84 |
+
if($description.length>0)
|
85 |
+
$description.after('<div class="bp-media-action-wrapper bp-media-delete-wrapper"></div>');
|
86 |
+
else
|
87 |
+
$parent.after('<div class="bp-media-action-wrapper bp-media-delete-wrapper"></div>');
|
88 |
+
jQuery('#bp-media-delete-ui').appendTo('.bp-media-delete-wrapper');
|
89 |
+
}
|
90 |
+
jQuery('#bp-media-delete-ui').slideToggle('slow',function(){
|
91 |
+
if(jQuery(this).css('display') == 'none') {
|
92 |
+
jQuery('#bp-media-list input').remove();
|
93 |
+
jQuery('#bp-media-show-more').attr('data-move',0);
|
94 |
+
} else if ( !jQuery('#bp-media-list input').length ) {
|
95 |
+
jQuery('#bp-media-show-more').attr('data-move',1);
|
96 |
+
jQuery('#bp-media-list h3').each(function(){
|
97 |
+
$media_id = jQuery(this).parent().attr('id').replace('bp-media-item-','');
|
98 |
+
jQuery(this).prepend('<input type="checkbox" name="move" value="'+$media_id+'" />');
|
99 |
+
});
|
100 |
+
}
|
101 |
+
});
|
102 |
+
});
|
103 |
+
|
104 |
+
jQuery('#bp-media-move-merge-ui,#bp-media-delete-ui').on('click','.select-all', function(e){
|
105 |
+
e.preventDefault();
|
106 |
+
jQuery('#bp-media-list input').each(function(){
|
107 |
+
jQuery(this).prop('checked',true);
|
108 |
+
});
|
109 |
+
});
|
110 |
+
|
111 |
+
jQuery('#bp-media-move-merge-ui,#bp-media-delete-ui').on('click','.unselect-all', function(e){
|
112 |
+
e.preventDefault();
|
113 |
+
jQuery('#bp-media-list input').each(function(){
|
114 |
+
jQuery(this).prop('checked',false);
|
115 |
+
});
|
116 |
+
});
|
117 |
+
|
118 |
+
jQuery('#bp-media-move-merge-ui').on('change','#bp-media-move-merge-select', function(){
|
119 |
+
$this = jQuery(this);
|
120 |
+
if ( $this.val() == 'move' ) {
|
121 |
+
if ( !jQuery('#bp-media-list input').length ) {
|
122 |
+
jQuery('#bp-media-list h3').each(function(){
|
123 |
+
$media_id = jQuery(this).parent().attr('id').replace('bp-media-item-','');
|
124 |
+
jQuery(this).prepend('<input type="checkbox" name="move" value="'+$media_id+'" />');
|
125 |
+
});
|
126 |
+
}
|
127 |
+
jQuery('#bp-media-show-more').attr('data-move',1);
|
128 |
+
jQuery('.bp-media-move-selected-checks').fadeIn();
|
129 |
+
} else if ( $this.val() == 'merge' ) {
|
130 |
+
jQuery('.bp-media-move-selected-checks').fadeOut();
|
131 |
+
jQuery('#bp-media-list input').remove();
|
132 |
+
jQuery('#bp-media-show-more').attr('data-move',0)
|
133 |
+
}
|
134 |
+
});
|
135 |
+
|
136 |
+
jQuery('#bp-media-move-merge-ui').on('click','#bp-media-move-merge-media',function(){
|
137 |
+
jQuery(this).siblings('.bp-media-ajax-spinner').show();
|
138 |
+
jQuery(this).prop('disabled',true);
|
139 |
+
jQuery(this).addClass('disabled');
|
140 |
+
$val = jQuery('#bp-media-move-merge-select option:checked').val();
|
141 |
+
if ( $val == 'merge' ) {
|
142 |
+
if(confirm(bp_media_main_strings.merge_confirmation)){
|
143 |
+
$delete_album = false;
|
144 |
+
// if ( jQuery('.bp-media-can-delete').length ) {
|
145 |
+
// if(confirm(bp_media_main_strings.delete_after_merge))
|
146 |
+
// $delete_album = true;
|
147 |
+
// }
|
148 |
+
$from = jQuery('#bp-media-selected-album').val();
|
149 |
+
$to = jQuery('.bp-media-selected-album-move-merge option:checked').val();
|
150 |
+
if ( $from && $to ) {
|
151 |
+
var data = {
|
152 |
+
action: 'bp_media_merge_album',
|
153 |
+
from: $from,
|
154 |
+
to: $to,
|
155 |
+
delete_album: $delete_album
|
156 |
+
};
|
157 |
+
jQuery.post(bp_media_vars.ajaxurl, data, function(response) {
|
158 |
+
if(response.length==0) {
|
159 |
+
jQuery('.item-list-tabs:last').after('<div id="message" class="error"><p>'+bp_media_main_strings.something_went_wrong+'</p></div>');
|
160 |
+
} else if( response == 'redirect' ) {
|
161 |
+
window.location = window.location.href.replace($from,$to);
|
162 |
+
} else {
|
163 |
+
location.reload();
|
164 |
+
}
|
165 |
+
});
|
166 |
+
}
|
167 |
+
} else {
|
168 |
+
jQuery(this).siblings('.bp-media-ajax-spinner').hide();
|
169 |
+
jQuery(this).prop('disabled',false);
|
170 |
+
jQuery(this).removeClass('disabled');
|
171 |
+
return false;
|
172 |
+
}
|
173 |
+
} else if( $val == 'move' ) {
|
174 |
+
$media = new Array();
|
175 |
+
jQuery('input:checkbox[name="move"]:checked').each(function(){
|
176 |
+
$media.push(jQuery(this).val());
|
177 |
+
});
|
178 |
+
if ($media.length) {
|
179 |
+
if(confirm(bp_media_main_strings.are_you_sure)){
|
180 |
+
var data = {
|
181 |
+
action: 'bp_media_move_selected_media',
|
182 |
+
media: $media,
|
183 |
+
parent: jQuery('.bp-media-selected-album-move-merge option:checked').val()
|
184 |
+
};
|
185 |
+
jQuery.post(bp_media_vars.ajaxurl, data, function(response) {
|
186 |
+
if(response.length==0) {
|
187 |
+
jQuery('.item-list-tabs:last').after('<div id="message" class="error"><p>'+bp_media_main_strings.something_went_wrong+'</p></div>');
|
188 |
+
} else {
|
189 |
+
location.reload();
|
190 |
+
}
|
191 |
+
});
|
192 |
+
} else {
|
193 |
+
jQuery(this).siblings('.bp-media-ajax-spinner').hide();
|
194 |
+
jQuery(this).prop('disabled',false);
|
195 |
+
jQuery(this).removeClass('disabled');
|
196 |
+
}
|
197 |
+
} else {
|
198 |
+
alert(bp_media_main_strings.select_media);
|
199 |
+
jQuery(this).siblings('.bp-media-ajax-spinner').hide();
|
200 |
+
jQuery(this).prop('disabled',false);
|
201 |
+
jQuery(this).removeClass('disabled');
|
202 |
+
}
|
203 |
+
} else {
|
204 |
+
alert(bp_media_main_strings.select_action);
|
205 |
+
jQuery(this).siblings('.bp-media-ajax-spinner').hide();
|
206 |
+
jQuery(this).prop('disabled',false);
|
207 |
+
jQuery(this).removeClass('disabled');
|
208 |
+
return false;
|
209 |
+
}
|
210 |
+
|
211 |
+
});
|
212 |
+
|
213 |
+
jQuery('#bp-media-delete-ui').on('click','#bp-media-delete-media',function(){
|
214 |
+
jQuery(this).siblings('.bp-media-ajax-spinner').show();
|
215 |
+
jQuery(this).prop('disabled',true);
|
216 |
+
jQuery(this).addClass('disabled');
|
217 |
+
$media = new Array();
|
218 |
+
jQuery('input:checkbox[name="move"]:checked').each(function(){
|
219 |
+
$media.push(jQuery(this).val());
|
220 |
+
});
|
221 |
+
if ($media.length) {
|
222 |
+
if(confirm(bp_media_main_strings.delete_selected_media)){
|
223 |
+
var data = {
|
224 |
+
action: 'bp_media_delete_selected_media',
|
225 |
+
media: $media
|
226 |
+
};
|
227 |
+
jQuery.post(bp_media_vars.ajaxurl, data, function(response) {
|
228 |
+
if(response.length==0) {
|
229 |
+
jQuery('.item-list-tabs:last').after('<div id="message" class="error"><p>'+bp_media_main_strings.something_went_wrong+'</p></div>');
|
230 |
+
} else {
|
231 |
+
location.reload();
|
232 |
+
}
|
233 |
+
});
|
234 |
+
} else {
|
235 |
+
jQuery(this).siblings('.bp-media-ajax-spinner').hide();
|
236 |
+
jQuery(this).prop('disabled',false);
|
237 |
+
jQuery(this).removeClass('disabled');
|
238 |
+
return false;
|
239 |
+
}
|
240 |
+
} else {
|
241 |
+
alert(bp_media_main_strings.select_media);
|
242 |
+
jQuery(this).siblings('.bp-media-ajax-spinner').hide();
|
243 |
+
jQuery(this).prop('disabled',false);
|
244 |
+
jQuery(this).removeClass('disabled');
|
245 |
+
}
|
246 |
});
|
247 |
|
248 |
jQuery('#bp-media-upload-ui').bind('dragover', function(e){
|
279 |
jQuery('.bp-media-gallery').append(response);
|
280 |
});
|
281 |
});
|
282 |
+
|
283 |
+
jQuery('#bp-media-show-more-sc').click(function(e){
|
284 |
+
e.preventDefault();
|
285 |
+
$this = jQuery(this);
|
286 |
+
$this.prop("disabled", true);
|
287 |
+
var data = {
|
288 |
+
action: 'bp_media_load_more_sc',
|
289 |
+
page: parseInt($this.attr('data-page'))+1,
|
290 |
+
media:$this.attr('data-media'),
|
291 |
+
count:$this.attr('data-count')
|
292 |
+
};
|
293 |
+
jQuery.get(bp_media_vars.ajaxurl, data, function(response) {
|
294 |
+
if(response.length==0) {
|
295 |
+
jQuery('#bp-media-show-more-sc').parent().remove();
|
296 |
+
}else{
|
297 |
+
$this.prop("disabled", false);
|
298 |
+
$this.attr('data-page',parseInt($this.attr('data-page'))+1);
|
299 |
+
jQuery('.bp-media-gallery').append(response);
|
300 |
+
}
|
301 |
+
});
|
302 |
+
});
|
303 |
setTimeout(function(){
|
304 |
jQuery('.media album_updated .delete-activity,.media_upload .delete-activity').unbind('click').click(function(e){
|
305 |
+
if(confirm(bp_media_main_strings.delete_activity_media)){
|
306 |
return true;
|
307 |
}
|
308 |
else{
|
332 |
});
|
333 |
|
334 |
if ( bp_media_vars.lightbox > 0 ) {
|
335 |
+
jQuery('#bp-media-list,.widget-item-listing,.bp-media-sc-list').on('click','li a',function(e){
|
|
|
|
|
|
|
|
|
|
|
336 |
e.preventDefault();
|
337 |
$current = jQuery(this);
|
338 |
load_media($current);
|
347 |
e.preventDefault();
|
348 |
if(!$current.parent().hasClass('bp_media_content')){
|
349 |
$next_current = $current.closest('li').next().find('a');
|
|
|
350 |
if($next_current.length<1){
|
351 |
if(jQuery('#bp-media-show-more').length>0){
|
352 |
var args = load_more_data();
|
462 |
});
|
463 |
}
|
464 |
function load_more_data(){
|
465 |
+
if (jQuery('#bp-media-show-more').attr('data-move') == 1)
|
466 |
+
$move = 1;
|
467 |
+
else
|
468 |
+
$move = 0;
|
469 |
var data = {
|
470 |
action: 'bp_media_load_more',
|
471 |
page:++bp_media_vars.page,
|
473 |
action_variables : bp_media_vars.action_variables,
|
474 |
displayed_user : bp_media_vars.displayed_user,
|
475 |
loggedin_user : bp_media_vars.loggedin_user,
|
476 |
+
current_group : bp_media_vars.current_group,
|
477 |
+
move : $move
|
478 |
};
|
479 |
return data;
|
480 |
}
|
520 |
);
|
521 |
}
|
522 |
|
|
|
523 |
/* Favoriting activity stream items */
|
524 |
if ( target.hasClass('fav') || target.hasClass('unfav') ) {
|
|
|
525 |
event.preventDefault();
|
526 |
var type = target.hasClass('fav') ? 'fav' : 'unfav';
|
527 |
var parent = target.closest('.activity_update');
|
app/helper/BPMediaSettings.php
CHANGED
@@ -30,7 +30,7 @@ if (!class_exists('BPMediaSettings')) {
|
|
30 |
*/
|
31 |
public function settings() {
|
32 |
global $bp_media, $bp_media_addon, $wpdb;
|
33 |
-
add_settings_section('bpm-settings', __('Enabled Media Types', 'buddypress-media'), is_multisite() ? array($this, '
|
34 |
add_settings_field('bpm-image', __('Photos', 'buddypress-media'), array($this, 'checkbox'), 'bp-media-settings', 'bpm-settings', array(
|
35 |
'setting' => 'bp_media_options',
|
36 |
'option' => 'images_enabled',
|
@@ -258,6 +258,13 @@ if (!class_exists('BPMediaSettings')) {
|
|
258 |
}
|
259 |
delete_site_option('bpm-settings-saved');
|
260 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
261 |
|
262 |
/**
|
263 |
* Sanitizes the settings
|
30 |
*/
|
31 |
public function settings() {
|
32 |
global $bp_media, $bp_media_addon, $wpdb;
|
33 |
+
add_settings_section('bpm-settings', __('Enabled Media Types', 'buddypress-media'), is_multisite() ? array($this, 'allowed_types') : '', 'bp-media-settings');
|
34 |
add_settings_field('bpm-image', __('Photos', 'buddypress-media'), array($this, 'checkbox'), 'bp-media-settings', 'bpm-settings', array(
|
35 |
'setting' => 'bp_media_options',
|
36 |
'option' => 'images_enabled',
|
258 |
}
|
259 |
delete_site_option('bpm-settings-saved');
|
260 |
}
|
261 |
+
|
262 |
+
public function allowed_types(){
|
263 |
+
$allowed_types = get_site_option('upload_filetypes', 'jpg jpeg png gif');
|
264 |
+
$allowed_types = explode(' ',$allowed_types);
|
265 |
+
$allowed_types = implode(', ',$allowed_types);
|
266 |
+
echo '<span class="description">'.sprintf(__('Currently your network allows uploading of the following file types. You can change the settings <a href="%s">here</a>.<br /><code>%s</code></span>','buddypress-media'),network_admin_url('settings.php#upload_filetypes'),$allowed_types);
|
267 |
+
}
|
268 |
|
269 |
/**
|
270 |
* Sanitizes the settings
|
app/main/group/BPMediaGroupElementExtension.php
CHANGED
@@ -98,7 +98,6 @@ if (class_exists('BP_Group_Extension')) :
|
|
98 |
$bp->action_variables[0] = BP_MEDIA_ALBUMS_VIEW_SLUG;
|
99 |
echo '<h3>'.get_the_title($bp->action_variables[1]).'</h3>';
|
100 |
$bp_media_content->entry_screen();
|
101 |
-
} else {
|
102 |
}
|
103 |
$bp_media_content->entry_screen_content();
|
104 |
|
98 |
$bp->action_variables[0] = BP_MEDIA_ALBUMS_VIEW_SLUG;
|
99 |
echo '<h3>'.get_the_title($bp->action_variables[1]).'</h3>';
|
100 |
$bp_media_content->entry_screen();
|
|
|
101 |
}
|
102 |
$bp_media_content->entry_screen_content();
|
103 |
|
app/main/includes/BPMediaActions.php
CHANGED
@@ -31,6 +31,11 @@ class BPMediaActions {
|
|
31 |
add_action('bp_media_after_add_media', 'BPMediaActions::activity_create_after_add_media', 10, 4);
|
32 |
add_action('wp_ajax_bp_media_load_more', array($this, 'load_more'));
|
33 |
add_action('wp_ajax_nopriv_bp_media_load_more', array($this, 'load_more'));
|
|
|
|
|
|
|
|
|
|
|
34 |
add_action('wp_ajax_bp_media_set_album_cover', array($this, 'set_album_cover'));
|
35 |
add_action('delete_attachment', array($this, 'delete_attachment_handler'));
|
36 |
add_action('wp_ajax_bp_media_add_album', array($this, 'add_album'));
|
@@ -41,7 +46,7 @@ class BPMediaActions {
|
|
41 |
add_action('bp_before_group_settings_creation_step', array($this, 'group_create_default_album'));
|
42 |
add_filter('intermediate_image_sizes_advanced', array($this, 'filter_image_sizes_details'));
|
43 |
add_filter('intermediate_image_sizes', array($this, 'filter_image_sizes'));
|
44 |
-
|
45 |
$linkback = bp_get_option('bp_media_add_linkback', false);
|
46 |
if ($linkback)
|
47 |
add_action('bp_footer', array($this, 'footer'));
|
@@ -174,8 +179,19 @@ class BPMediaActions {
|
|
174 |
'current_group' => $cur_group_id,
|
175 |
'lightbox' => $lightbox,
|
176 |
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
177 |
|
178 |
wp_localize_script('bp-media-default', 'bp_media_vars', $bp_media_vars);
|
|
|
179 |
wp_enqueue_style('bp-media-mecss', BP_MEDIA_URL . 'lib/media-element/mediaelementplayer.min.css', '', BP_MEDIA_VERSION);
|
180 |
wp_enqueue_style('bp-media-default', BP_MEDIA_URL . 'app/assets/css/main.css', '', BP_MEDIA_VERSION);
|
181 |
}
|
@@ -509,6 +525,12 @@ class BPMediaActions {
|
|
509 |
);
|
510 |
wp_enqueue_script('bp-media-uploader', BP_MEDIA_URL . 'app/assets/js/bp-media-uploader.js', array('plupload', 'plupload-html5', 'plupload-flash', 'plupload-silverlight', 'plupload-html4', 'plupload-handlers'), BP_MEDIA_VERSION, true);
|
511 |
wp_localize_script('bp-media-uploader', 'bp_media_uploader_params', $params);
|
|
|
|
|
|
|
|
|
|
|
|
|
512 |
}
|
513 |
}
|
514 |
wp_enqueue_style('bp-media-default', BP_MEDIA_URL . 'app/assets/css/main.css', '', BP_MEDIA_VERSION);
|
@@ -585,6 +607,7 @@ class BPMediaActions {
|
|
585 |
$displayed_user = isset($_GET['displayed_user']) ? $_GET['displayed_user'] : null;
|
586 |
$loggedin_user = isset($_GET['loggedin_user']) ? $_GET['loggedin_user'] : null;
|
587 |
$current_group = isset($_GET['current_group']) ? $_GET['current_group'] : null;
|
|
|
588 |
$album_id = isset($_GET['album_id']) ? $_GET['album_id'] : false;
|
589 |
if ($current_group && isset($action_variables[1])) {
|
590 |
$type_var = 'list';
|
@@ -628,7 +651,7 @@ class BPMediaActions {
|
|
628 |
foreach ($bp_media_albums_query->posts as $attachment) {
|
629 |
try {
|
630 |
$media = new BPMediaAlbum($attachment->ID);
|
631 |
-
echo $media->get_album_gallery_content
|
632 |
} catch (exception $e) {
|
633 |
die();
|
634 |
}
|
@@ -640,7 +663,7 @@ class BPMediaActions {
|
|
640 |
foreach ($bp_media_query->posts as $attachment) {
|
641 |
try {
|
642 |
$media = new BPMediaHostWordpress($attachment->ID);
|
643 |
-
echo $media->get_media_gallery_content
|
644 |
} catch (exception $e) {
|
645 |
die();
|
646 |
}
|
@@ -650,6 +673,112 @@ class BPMediaActions {
|
|
650 |
die();
|
651 |
}
|
652 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
653 |
/**
|
654 |
*
|
655 |
* @global type $bp_media_count
|
@@ -981,11 +1110,12 @@ class BPMediaActions {
|
|
981 |
}
|
982 |
|
983 |
function bpmedia_shortcode($atts) {
|
|
|
984 |
extract(shortcode_atts(array(
|
985 |
-
'
|
986 |
-
'count' =>
|
|
|
987 |
), $atts));
|
988 |
-
|
989 |
$value = 0;
|
990 |
if (is_user_logged_in()) {
|
991 |
$value = 2;
|
@@ -997,18 +1127,27 @@ class BPMediaActions {
|
|
997 |
'compare' => '<='
|
998 |
)
|
999 |
);
|
|
|
|
|
|
|
1000 |
$args = array(
|
|
|
|
|
1001 |
'post_type' => 'attachment',
|
1002 |
'post_status' => 'any',
|
1003 |
'meta_query' => $privacy_query,
|
1004 |
'posts_per_page' => $count
|
1005 |
);
|
1006 |
-
|
1007 |
-
|
|
|
|
|
|
|
1008 |
$query = new WP_Query($args);
|
1009 |
if ($query->have_posts()) {
|
1010 |
?>
|
1011 |
-
<div id="item-body
|
|
|
1012 |
while ($query->have_posts()) {
|
1013 |
$query->the_post();
|
1014 |
try {
|
@@ -1017,19 +1156,19 @@ class BPMediaActions {
|
|
1017 |
} catch (Exception $e) {
|
1018 |
echo '<li>';
|
1019 |
echo $e->getMessage();
|
1020 |
-
echo '<h3
|
1021 |
echo '</li>';
|
1022 |
}
|
1023 |
}
|
1024 |
?>
|
1025 |
-
</ul
|
1026 |
-
|
1027 |
-
|
1028 |
-
$
|
1029 |
-
|
1030 |
-
$media_string = 'media';
|
1031 |
}
|
1032 |
-
|
|
|
1033 |
}
|
1034 |
wp_reset_query();
|
1035 |
}
|
31 |
add_action('bp_media_after_add_media', 'BPMediaActions::activity_create_after_add_media', 10, 4);
|
32 |
add_action('wp_ajax_bp_media_load_more', array($this, 'load_more'));
|
33 |
add_action('wp_ajax_nopriv_bp_media_load_more', array($this, 'load_more'));
|
34 |
+
add_action('wp_ajax_bp_media_load_more_sc', array($this, 'load_more_sc'));
|
35 |
+
add_action('wp_ajax_nopriv_bp_media_load_more_sc', array($this, 'load_more_sc'));
|
36 |
+
add_action('wp_ajax_bp_media_move_selected_media', array($this, 'move_selected_media'));
|
37 |
+
add_action('wp_ajax_bp_media_delete_selected_media', array($this, 'delete_selected_media'));
|
38 |
+
add_action('wp_ajax_bp_media_merge_album', array($this, 'merge_album'));
|
39 |
add_action('wp_ajax_bp_media_set_album_cover', array($this, 'set_album_cover'));
|
40 |
add_action('delete_attachment', array($this, 'delete_attachment_handler'));
|
41 |
add_action('wp_ajax_bp_media_add_album', array($this, 'add_album'));
|
46 |
add_action('bp_before_group_settings_creation_step', array($this, 'group_create_default_album'));
|
47 |
add_filter('intermediate_image_sizes_advanced', array($this, 'filter_image_sizes_details'));
|
48 |
add_filter('intermediate_image_sizes', array($this, 'filter_image_sizes'));
|
49 |
+
add_shortcode('bpmedia', array($this, 'bpmedia_shortcode'));
|
50 |
$linkback = bp_get_option('bp_media_add_linkback', false);
|
51 |
if ($linkback)
|
52 |
add_action('bp_footer', array($this, 'footer'));
|
179 |
'current_group' => $cur_group_id,
|
180 |
'lightbox' => $lightbox,
|
181 |
);
|
182 |
+
$bp_media_main_strings = array(
|
183 |
+
'something_went_wrong' => __('Something went wrong. Please try again.', 'buddypress-media'),
|
184 |
+
'merge_confirmation' => __('Are you sure you want to merge this album?', 'buddypress-media'),
|
185 |
+
'delete_after_merge' => __('Would you like to delete this album after the merge?', 'buddypress-media'),
|
186 |
+
'delete_selected_media' => __('Are you sure you want to delete the selected media?', 'buddypress-media'),
|
187 |
+
'delete_activity_media' => __('Are you sure you want to delete this activity and associated media?', 'buddypress-media'),
|
188 |
+
'are_you_sure' => __('Are you sure?', 'buddypress-media'),
|
189 |
+
'select_media' => __('Please select media.', 'buddypress-media'),
|
190 |
+
'select_action' => __('Please select an action.', 'buddypress-media')
|
191 |
+
);
|
192 |
|
193 |
wp_localize_script('bp-media-default', 'bp_media_vars', $bp_media_vars);
|
194 |
+
wp_localize_script('bp-media-default', 'bp_media_main_strings', $bp_media_main_strings);
|
195 |
wp_enqueue_style('bp-media-mecss', BP_MEDIA_URL . 'lib/media-element/mediaelementplayer.min.css', '', BP_MEDIA_VERSION);
|
196 |
wp_enqueue_style('bp-media-default', BP_MEDIA_URL . 'app/assets/css/main.css', '', BP_MEDIA_VERSION);
|
197 |
}
|
525 |
);
|
526 |
wp_enqueue_script('bp-media-uploader', BP_MEDIA_URL . 'app/assets/js/bp-media-uploader.js', array('plupload', 'plupload-html5', 'plupload-flash', 'plupload-silverlight', 'plupload-html4', 'plupload-handlers'), BP_MEDIA_VERSION, true);
|
527 |
wp_localize_script('bp-media-uploader', 'bp_media_uploader_params', $params);
|
528 |
+
$bp_media_uploader_strings = array(
|
529 |
+
'no_name' => __('You have not filled the album name', 'buddypress-media'),
|
530 |
+
'cant_upload_group_album' => __('Sorry you cannot create albums in this group', 'buddypress-media'),
|
531 |
+
'select_album' => __('Please Select an Album !!', 'buddypress-media'),
|
532 |
+
);
|
533 |
+
wp_localize_script('bp-media-uploader', 'bp_media_uploader_strings', $bp_media_uploader_strings);
|
534 |
}
|
535 |
}
|
536 |
wp_enqueue_style('bp-media-default', BP_MEDIA_URL . 'app/assets/css/main.css', '', BP_MEDIA_VERSION);
|
607 |
$displayed_user = isset($_GET['displayed_user']) ? $_GET['displayed_user'] : null;
|
608 |
$loggedin_user = isset($_GET['loggedin_user']) ? $_GET['loggedin_user'] : null;
|
609 |
$current_group = isset($_GET['current_group']) ? $_GET['current_group'] : null;
|
610 |
+
$move = isset($_GET['move']) ? $_GET['move'] : null;
|
611 |
$album_id = isset($_GET['album_id']) ? $_GET['album_id'] : false;
|
612 |
if ($current_group && isset($action_variables[1])) {
|
613 |
$type_var = 'list';
|
651 |
foreach ($bp_media_albums_query->posts as $attachment) {
|
652 |
try {
|
653 |
$media = new BPMediaAlbum($attachment->ID);
|
654 |
+
echo $media->get_album_gallery_content($move);
|
655 |
} catch (exception $e) {
|
656 |
die();
|
657 |
}
|
663 |
foreach ($bp_media_query->posts as $attachment) {
|
664 |
try {
|
665 |
$media = new BPMediaHostWordpress($attachment->ID);
|
666 |
+
echo $media->get_media_gallery_content($move);
|
667 |
} catch (exception $e) {
|
668 |
die();
|
669 |
}
|
673 |
die();
|
674 |
}
|
675 |
|
676 |
+
function load_more_sc() {
|
677 |
+
global $bp, $bp_media_query, $bp_media, $bp_media_albums_query;
|
678 |
+
$page = isset($_GET['page']) ? $_GET['page'] : die();
|
679 |
+
$type = isset($_GET['media']) ? $_GET['media'] : 'all';
|
680 |
+
$count = isset($_GET['count']) ? $_GET['count'] : 1;
|
681 |
+
|
682 |
+
$value = 0;
|
683 |
+
if (is_user_logged_in()) {
|
684 |
+
$value = 2;
|
685 |
+
}
|
686 |
+
$privacy_query = array(
|
687 |
+
array(
|
688 |
+
'key' => 'bp_media_privacy',
|
689 |
+
'value' => $value,
|
690 |
+
'compare' => '<='
|
691 |
+
)
|
692 |
+
);
|
693 |
+
|
694 |
+
$args = array(
|
695 |
+
'paged' => $page,
|
696 |
+
'post_type' => 'attachment',
|
697 |
+
'post_status' => 'any',
|
698 |
+
'meta_query' => $privacy_query,
|
699 |
+
'posts_per_page' => $count
|
700 |
+
);
|
701 |
+
if ($type != 'all')
|
702 |
+
$args['post_mime_type'] = $type;
|
703 |
+
$bp_media_widget_query = new WP_Query($args);
|
704 |
+
if ($bp_media_widget_query->have_posts()) {
|
705 |
+
while ($bp_media_widget_query->have_posts()) {
|
706 |
+
$bp_media_widget_query->the_post();
|
707 |
+
try {
|
708 |
+
$entry = new BPMediaHostWordpress(get_the_ID());
|
709 |
+
echo $entry->get_media_gallery_content();
|
710 |
+
} catch (Exception $e) {
|
711 |
+
echo '<li>';
|
712 |
+
echo $e->getMessage();
|
713 |
+
echo '<h3><a>Private</h3>';
|
714 |
+
echo '</li>';
|
715 |
+
}
|
716 |
+
}
|
717 |
+
}
|
718 |
+
|
719 |
+
die();
|
720 |
+
}
|
721 |
+
|
722 |
+
function move_selected_media() {
|
723 |
+
$media = isset($_POST['media']) ? $_POST['media'] : array();
|
724 |
+
$parent = isset($_POST['parent']) ? $_POST['parent'] : 0;
|
725 |
+
if (!empty($media)) {
|
726 |
+
foreach ($media as $item) {
|
727 |
+
$post['ID'] = $item;
|
728 |
+
$post['post_parent'] = $parent;
|
729 |
+
wp_update_post($post);
|
730 |
+
}
|
731 |
+
echo true;
|
732 |
+
}
|
733 |
+
die();
|
734 |
+
}
|
735 |
+
|
736 |
+
function delete_selected_media() {
|
737 |
+
$media = isset($_POST['media']) ? $_POST['media'] : array();
|
738 |
+
if (!empty($media)) {
|
739 |
+
foreach ($media as $item) {
|
740 |
+
$delete_handler = new BPMediaHostWordpress($item);
|
741 |
+
$delete_handler->delete_media();
|
742 |
+
}
|
743 |
+
echo true;
|
744 |
+
}
|
745 |
+
die();
|
746 |
+
}
|
747 |
+
|
748 |
+
function merge_album() {
|
749 |
+
$to = isset($_POST['to']) ? $_POST['to'] : null;
|
750 |
+
$from = isset($_POST['from']) ? $_POST['from'] : null;
|
751 |
+
$delete = isset($_POST['delete_album']) ? $_POST['delete_album'] : null;
|
752 |
+
if ($to && $from) {
|
753 |
+
global $wpdb;
|
754 |
+
$results = $wpdb->get_results("SELECT ID FROM $wpdb->posts WHERE post_parent = $from");
|
755 |
+
if ($results) {
|
756 |
+
foreach ($results as $media) {
|
757 |
+
$post['ID'] = $media->ID;
|
758 |
+
$post['post_parent'] = $to;
|
759 |
+
wp_update_post($post);
|
760 |
+
}
|
761 |
+
$activity_id = get_post_meta($from, 'bp_media_child_activity', true);
|
762 |
+
if ($delete == 'true') {
|
763 |
+
if (bp_is_active('activity')) {
|
764 |
+
if ($activity_id) {
|
765 |
+
bp_activity_delete_by_activity_id($activity_id);
|
766 |
+
} else {
|
767 |
+
$delete_handler = new BPMediaAlbum($from);
|
768 |
+
$delete_handler->delete_album();
|
769 |
+
}
|
770 |
+
}
|
771 |
+
echo 'redirect';
|
772 |
+
die();
|
773 |
+
} elseif ($activity_id) {
|
774 |
+
BPMediaFunction::update_album_activity($from);
|
775 |
+
}
|
776 |
+
}
|
777 |
+
echo true;
|
778 |
+
}
|
779 |
+
die();
|
780 |
+
}
|
781 |
+
|
782 |
/**
|
783 |
*
|
784 |
* @global type $bp_media_count
|
1110 |
}
|
1111 |
|
1112 |
function bpmedia_shortcode($atts) {
|
1113 |
+
global $bp_media;
|
1114 |
extract(shortcode_atts(array(
|
1115 |
+
'type' => 'all',
|
1116 |
+
'count' => $bp_media->options['default_count'] ? $bp_media->options['default_count'] : 10,
|
1117 |
+
'loadmore' => true
|
1118 |
), $atts));
|
|
|
1119 |
$value = 0;
|
1120 |
if (is_user_logged_in()) {
|
1121 |
$value = 2;
|
1127 |
'compare' => '<='
|
1128 |
)
|
1129 |
);
|
1130 |
+
|
1131 |
+
$paged = get_query_var('paged') ? get_query_var('paged') : 1;
|
1132 |
+
|
1133 |
$args = array(
|
1134 |
+
'paged' => $paged,
|
1135 |
+
'post_type' => 'attachment',
|
1136 |
'post_type' => 'attachment',
|
1137 |
'post_status' => 'any',
|
1138 |
'meta_query' => $privacy_query,
|
1139 |
'posts_per_page' => $count
|
1140 |
);
|
1141 |
+
|
1142 |
+
$type = str_replace(array('music', 'photos'),array('audio','image'),$type);
|
1143 |
+
|
1144 |
+
if ($type != 'all')
|
1145 |
+
$args['post_mime_type'] = $type;
|
1146 |
$query = new WP_Query($args);
|
1147 |
if ($query->have_posts()) {
|
1148 |
?>
|
1149 |
+
<div id="item-body" class="bp-media-sc-list">
|
1150 |
+
<ul class="bp-media-gallery item-list"><?php
|
1151 |
while ($query->have_posts()) {
|
1152 |
$query->the_post();
|
1153 |
try {
|
1156 |
} catch (Exception $e) {
|
1157 |
echo '<li>';
|
1158 |
echo $e->getMessage();
|
1159 |
+
echo '<h3>' . __('Private', 'buddypress-media') . '</h3>';
|
1160 |
echo '</li>';
|
1161 |
}
|
1162 |
}
|
1163 |
?>
|
1164 |
+
</ul>
|
1165 |
+
</div><?php
|
1166 |
+
$loadmore = strtolower($loadmore);
|
1167 |
+
if ( $loadmore != 'false' && $loadmore != '0' && $loadmore != 'no' ) { ?>
|
1168 |
+
<div class="bp-media-actions"><button data-media="<?php echo $type; ?>" data-count="<?php echo $count; ?>" data-page="<?php echo $count; ?>" class="button" id="bp-media-show-more-sc">Show More</button></div><?php
|
|
|
1169 |
}
|
1170 |
+
} else {
|
1171 |
+
_e('No media found', 'buddypress-media');
|
1172 |
}
|
1173 |
wp_reset_query();
|
1174 |
}
|
app/main/includes/BPMediaHostWordpress.php
CHANGED
@@ -472,7 +472,7 @@ class BPMediaHostWordpress {
|
|
472 |
* @global type $bp_media
|
473 |
* @return boolean
|
474 |
*/
|
475 |
-
function get_media_gallery_content
|
476 |
$attachment = $this->id;
|
477 |
switch ($this->type) {
|
478 |
case 'video' :
|
@@ -489,7 +489,13 @@ class BPMediaHostWordpress {
|
|
489 |
<a href="<?php echo $this->url ?>" title="<?php _e($this->description, 'buddypress-media'); ?>">
|
490 |
<img src="<?php echo apply_filters('bp_media_video_thumb', $thumb_url, $attachment, $this->type); ?>" />
|
491 |
</a>
|
492 |
-
<h3 title="<?php echo $this->name;
|
|
|
|
|
|
|
|
|
|
|
|
|
493 |
</li>
|
494 |
<?php
|
495 |
break;
|
@@ -503,11 +509,17 @@ class BPMediaHostWordpress {
|
|
503 |
$thumb_url = BP_MEDIA_URL . 'app/assets/img/audio_thumb.png';
|
504 |
}
|
505 |
?>
|
506 |
-
<li id="bp-media-item-<?php echo $this->id ?>">
|
507 |
<a href="<?php echo $this->url ?>" title="<?php _e($this->description, 'buddypress-media'); ?>">
|
508 |
<img src="<?php echo $thumb_url ?>" />
|
509 |
</a>
|
510 |
-
<h3 title="<?php echo $this->name;
|
|
|
|
|
|
|
|
|
|
|
|
|
511 |
<div class="bp-media-ajax-preloader"></div>
|
512 |
</li>
|
513 |
<?php
|
@@ -522,7 +534,13 @@ class BPMediaHostWordpress {
|
|
522 |
<a href="<?php echo $this->url ?>" title="<?php echo $this->description ?>">
|
523 |
<img src="<?php echo $medium_path ?>" />
|
524 |
</a>
|
525 |
-
<h3 title="<?php echo $this->name
|
|
|
|
|
|
|
|
|
|
|
|
|
526 |
<div class="bp-media-ajax-preloader"></div>
|
527 |
</li>
|
528 |
<?php
|
472 |
* @global type $bp_media
|
473 |
* @return boolean
|
474 |
*/
|
475 |
+
function get_media_gallery_content($move=false) {
|
476 |
$attachment = $this->id;
|
477 |
switch ($this->type) {
|
478 |
case 'video' :
|
489 |
<a href="<?php echo $this->url ?>" title="<?php _e($this->description, 'buddypress-media'); ?>">
|
490 |
<img src="<?php echo apply_filters('bp_media_video_thumb', $thumb_url, $attachment, $this->type); ?>" />
|
491 |
</a>
|
492 |
+
<h3 title="<?php echo $this->name; ?>"><?php
|
493 |
+
if ( $move ) {
|
494 |
+
echo '<input type="checkbox" name="move" value="'.$this->id.'" />';
|
495 |
+
}
|
496 |
+
?>
|
497 |
+
<a href="<?php echo $this->url ?>" title="<?php _e($this->description, 'buddypress-media'); ?>"><?php echo $this->name; ?></a>
|
498 |
+
</h3>
|
499 |
</li>
|
500 |
<?php
|
501 |
break;
|
509 |
$thumb_url = BP_MEDIA_URL . 'app/assets/img/audio_thumb.png';
|
510 |
}
|
511 |
?>
|
512 |
+
<li id="bp-media-item-<?php echo $this->id; ?>">
|
513 |
<a href="<?php echo $this->url ?>" title="<?php _e($this->description, 'buddypress-media'); ?>">
|
514 |
<img src="<?php echo $thumb_url ?>" />
|
515 |
</a>
|
516 |
+
<h3 title="<?php echo $this->name; ?>"><?php
|
517 |
+
if ( $move ) {
|
518 |
+
echo '<input type="checkbox" name="move" value="'.$this->id.'" />';
|
519 |
+
}
|
520 |
+
?>
|
521 |
+
<a href="<?php echo $this->url ?>" title="<?php _e($this->description, 'buddypress-media'); ?>"><?php echo $this->name ?></a>
|
522 |
+
</h3>
|
523 |
<div class="bp-media-ajax-preloader"></div>
|
524 |
</li>
|
525 |
<?php
|
534 |
<a href="<?php echo $this->url ?>" title="<?php echo $this->description ?>">
|
535 |
<img src="<?php echo $medium_path ?>" />
|
536 |
</a>
|
537 |
+
<h3 title="<?php echo $this->name ?>"><?php
|
538 |
+
if ( $move ) {
|
539 |
+
echo '<input type="checkbox" name="move" value="'.$this->id.'" />';
|
540 |
+
}
|
541 |
+
?>
|
542 |
+
<a href="<?php echo $this->url ?>" title="<?php _e($this->description, 'buddypress-media'); ?>"><?php echo $this->name ?></a>
|
543 |
+
</h3>
|
544 |
<div class="bp-media-ajax-preloader"></div>
|
545 |
</li>
|
546 |
<?php
|
app/main/profile/BPMediaAlbum.php
CHANGED
@@ -301,6 +301,14 @@ class BPMediaAlbum {
|
|
301 |
function the_title() {
|
302 |
echo $this->name;
|
303 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
304 |
|
305 |
/**
|
306 |
* Returns the id of the album
|
301 |
function the_title() {
|
302 |
echo $this->name;
|
303 |
}
|
304 |
+
|
305 |
+
/**
|
306 |
+
*
|
307 |
+
* @return type
|
308 |
+
*/
|
309 |
+
function get_description() {
|
310 |
+
return $this->description;
|
311 |
+
}
|
312 |
|
313 |
/**
|
314 |
* Returns the id of the album
|
app/main/profile/BPMediaAlbumScreen.php
CHANGED
@@ -43,7 +43,7 @@ class BPMediaAlbumScreen extends BPMediaScreen {
|
|
43 |
$this->page_not_exist();
|
44 |
}
|
45 |
$media_actions = new BPMediaActions();
|
46 |
-
if
|
47 |
$this->entry_delete();
|
48 |
else
|
49 |
$this->page_not_exist();
|
@@ -70,9 +70,7 @@ class BPMediaAlbumScreen extends BPMediaScreen {
|
|
70 |
*/
|
71 |
function screen_content() {
|
72 |
global $bp_media_albums_query;
|
73 |
-
|
74 |
$this->hook_before();
|
75 |
-
|
76 |
if ($bp_media_albums_query && $bp_media_albums_query->have_posts()):
|
77 |
echo '<ul id="bp-album-list" class="bp-media-gallery item-list">';
|
78 |
while ($bp_media_albums_query->have_posts()) : $bp_media_albums_query->the_post();
|
@@ -118,37 +116,12 @@ class BPMediaAlbumScreen extends BPMediaScreen {
|
|
118 |
global $bp, $bp_media_current_album, $bp_media_query;
|
119 |
if (!$bp->action_variables[0] == BP_MEDIA_ALBUMS_VIEW_SLUG)
|
120 |
return false;
|
121 |
-
$allowed_edit = false;
|
122 |
-
if (is_user_logged_in()) {
|
123 |
-
if (!bp_is_user()) {
|
124 |
-
if (bp_is_active('groups')) {
|
125 |
-
if (groups_is_user_admin(bp_loggedin_user_id(), $bp->groups->current_group->id)) {
|
126 |
-
$allowed_edit = true;
|
127 |
-
} elseif (bp_displayed_user_id() == bp_loggedin_user_id()) {
|
128 |
-
$allowed_edit = true;
|
129 |
-
}
|
130 |
-
}
|
131 |
-
} else {
|
132 |
-
if (bp_displayed_user_id() == bp_loggedin_user_id()) {
|
133 |
-
$allowed_edit = true;
|
134 |
-
}
|
135 |
-
}
|
136 |
-
|
137 |
-
if ($allowed_edit != false) {
|
138 |
-
echo '<div class="album-edit">';
|
139 |
-
echo '<a href="' . $bp_media_current_album->get_edit_url() . '" class="button item-button bp-secondary-action bp-media-edit bp-media-edit-album" title="' . __('Edit Album', 'buddypress-media') . '">' . __('Edit', 'buddypress-media') . '</a>';
|
140 |
-
$media_actions = new BPMediaActions();
|
141 |
-
if ( $media_actions->default_user_album() != $bp_media_current_album->get_id())
|
142 |
-
echo '<a href="' . $bp_media_current_album->get_delete_url() . '" class="button item-button bp-secondary-action delete-activity-single confirm" rel="nofollow">' . __("Delete", 'buddypress-media') . '</a>';
|
143 |
-
echo '</div>';
|
144 |
-
}
|
145 |
-
}
|
146 |
$this->inner_query($bp_media_current_album->get_id());
|
|
|
147 |
$this->hook_before();
|
|
|
|
|
148 |
if ($bp_media_current_album && $bp_media_query->have_posts()) {
|
149 |
-
if (bp_is_my_profile() || BPMediaGroupLoader::can_upload()) {
|
150 |
-
BPMediaUploadScreen::upload_screen_content();
|
151 |
-
}
|
152 |
echo '<ul id="bp-media-list" class="bp-media-gallery albums item-list">';
|
153 |
|
154 |
while ($bp_media_query->have_posts()) {
|
@@ -243,6 +216,102 @@ class BPMediaAlbumScreen extends BPMediaScreen {
|
|
243 |
$this->filters = $filters;
|
244 |
}
|
245 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
}
|
247 |
|
248 |
?>
|
43 |
$this->page_not_exist();
|
44 |
}
|
45 |
$media_actions = new BPMediaActions();
|
46 |
+
if ($media_actions->default_user_album() != $bp->action_variables[1])
|
47 |
$this->entry_delete();
|
48 |
else
|
49 |
$this->page_not_exist();
|
70 |
*/
|
71 |
function screen_content() {
|
72 |
global $bp_media_albums_query;
|
|
|
73 |
$this->hook_before();
|
|
|
74 |
if ($bp_media_albums_query && $bp_media_albums_query->have_posts()):
|
75 |
echo '<ul id="bp-album-list" class="bp-media-gallery item-list">';
|
76 |
while ($bp_media_albums_query->have_posts()) : $bp_media_albums_query->the_post();
|
116 |
global $bp, $bp_media_current_album, $bp_media_query;
|
117 |
if (!$bp->action_variables[0] == BP_MEDIA_ALBUMS_VIEW_SLUG)
|
118 |
return false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
$this->inner_query($bp_media_current_album->get_id());
|
120 |
+
add_action('bp_media_before_' . $this->slug, array($this, 'album_actions'));
|
121 |
$this->hook_before();
|
122 |
+
if ($bp_media_current_album->get_description())
|
123 |
+
echo '<p class="bp-media-album-description">' . nl2br($bp_media_current_album->get_description()) . '</p>';
|
124 |
if ($bp_media_current_album && $bp_media_query->have_posts()) {
|
|
|
|
|
|
|
125 |
echo '<ul id="bp-media-list" class="bp-media-gallery albums item-list">';
|
126 |
|
127 |
while ($bp_media_query->have_posts()) {
|
216 |
$this->filters = $filters;
|
217 |
}
|
218 |
|
219 |
+
public function album_actions() {
|
220 |
+
global $bp, $bp_media_current_album, $bp_media_query;
|
221 |
+
if (!$bp->action_variables[0] == BP_MEDIA_ALBUMS_VIEW_SLUG)
|
222 |
+
return false;
|
223 |
+
$allowed_edit = false;
|
224 |
+
if (is_user_logged_in()) {
|
225 |
+
echo '<div class="bp-media-album-actions">';
|
226 |
+
if (bp_is_active('groups') && bp_get_current_group_id())
|
227 |
+
$default_album = groups_get_groupmeta(bp_get_current_group_id(), 'bp_media_default_album');
|
228 |
+
else
|
229 |
+
$default_album = get_user_meta(get_current_user_id(), 'bp-media-default-album', true);
|
230 |
+
if (!bp_is_user()) {
|
231 |
+
if (bp_is_active('groups')) {
|
232 |
+
if (groups_is_user_admin(bp_loggedin_user_id(), $bp->groups->current_group->id)) {
|
233 |
+
$allowed_edit = true;
|
234 |
+
} elseif (bp_displayed_user_id() == bp_loggedin_user_id()) {
|
235 |
+
$allowed_edit = true;
|
236 |
+
}
|
237 |
+
}
|
238 |
+
} else {
|
239 |
+
if (bp_displayed_user_id() == bp_loggedin_user_id()) {
|
240 |
+
$allowed_edit = true;
|
241 |
+
}
|
242 |
+
}
|
243 |
+
|
244 |
+
if ($allowed_edit != false && is_object($bp_media_current_album)) {
|
245 |
+
echo '<div class="album-edit">';
|
246 |
+
echo '<a href="' . $bp_media_current_album->get_edit_url() . '" class="button item-button bp-secondary-action bp-media-edit bp-media-edit-album" title="' . __('Edit Album', 'buddypress-media') . '">' . __('Edit', 'buddypress-media') . '</a>';
|
247 |
+
$media_actions = new BPMediaActions();
|
248 |
+
if ($default_album != $bp_media_current_album->get_id() || $bp_media_query->have_posts()) {
|
249 |
+
if (!$bp_media_query->have_posts()) {
|
250 |
+
echo '<a href="' . $bp_media_current_album->get_delete_url() . '" class="btn-danger button bp-media-can-delete item-button bp-secondary-action delete-activity-single confirm" rel="nofollow">' . __("Delete Album", 'buddypress-media') . '</a>';
|
251 |
+
} else {
|
252 |
+
echo '<input id="bp-media-delete-button" type="button" value="' . __('Delete', 'buddypress-media') . '" class="button">';
|
253 |
+
echo '<div class="bp-media-album-action-ui" id="bp-media-delete-ui">
|
254 |
+
<a class="select-all" href="#">' . __('Select All Visible', 'buddypress-media') . '</a> |
|
255 |
+
<a class="unselect-all" href="#">' . __('Unselect All Visible', 'buddypress-media') . '</a> |
|
256 |
+
<input id="bp-media-delete-media" type="button" value="' . __('Delete Selected Media', 'buddypress-media') . '" />';
|
257 |
+
if ($default_album != $bp_media_current_album->get_id())
|
258 |
+
echo ' <a href="' . $bp_media_current_album->get_delete_url() . '" class="btn-danger button bp-media-can-delete item-button bp-secondary-action delete-activity-single confirm" rel="nofollow">' . __("Delete Album", 'buddypress-media') . '</a>';
|
259 |
+
echo '<img class="bp-media-ajax-spinner" src="' . admin_url('images/wpspin_light.gif') . '" /></div>';
|
260 |
+
}
|
261 |
+
}
|
262 |
+
echo '</div>';
|
263 |
+
if ($bp_media_query->have_posts()) {
|
264 |
+
if (bp_is_my_profile() || BPMediaGroupLoader::can_upload()) {
|
265 |
+
BPMediaUploadScreen::upload_screen_content();
|
266 |
+
$album_selector = '';
|
267 |
+
|
268 |
+
if (bp_is_current_component('groups')) {
|
269 |
+
$albums = new WP_Query(array(
|
270 |
+
'post_type' => 'bp_media_album',
|
271 |
+
'posts_per_page' => -1,
|
272 |
+
'meta_key' => 'bp-media-key',
|
273 |
+
'meta_value' => -bp_get_current_group_id(),
|
274 |
+
'meta_compare' => '=',
|
275 |
+
'post__not_in' => array($bp_media_current_album->get_id())
|
276 |
+
));
|
277 |
+
} else {
|
278 |
+
$albums = new WP_Query(array(
|
279 |
+
'post_type' => 'bp_media_album',
|
280 |
+
'posts_per_page' => -1,
|
281 |
+
'author' => get_current_user_id(),
|
282 |
+
'meta_key' => 'bp-media-key',
|
283 |
+
'meta_value' => get_current_user_id(),
|
284 |
+
'meta_compare' => '=',
|
285 |
+
'post__not_in' => array($bp_media_current_album->get_id())
|
286 |
+
));
|
287 |
+
}
|
288 |
+
if (isset($albums->posts) && is_array($albums->posts) && count($albums->posts) > 0) {
|
289 |
+
foreach ($albums->posts as $album) {
|
290 |
+
if ($album->post_title == $post_wall)
|
291 |
+
$album_selector .= '<option value="' . $album->ID . '" selected="selected">' . $album->post_title . '</option>';
|
292 |
+
else
|
293 |
+
$album_selector .= '<option value="' . $album->ID . '">' . $album->post_title . '</option>';
|
294 |
+
};
|
295 |
+
}
|
296 |
+
|
297 |
+
if ($album_selector) {
|
298 |
+
echo '<input id="bp-media-move-merge-button" type="button" value="' . __('Move', 'buddypress-media') . '" class="button">';
|
299 |
+
echo '<div class="bp-media-album-action-ui" id="bp-media-move-merge-ui">
|
300 |
+
<span class="bp-media-move-selected-checks"><a class="select-all" href="#">' . __('Select All Visible', 'buddypress-media') . '</a> |
|
301 |
+
<a class="unselect-all" href="#">' . __('Unselect All Visible', 'buddypress-media') . '</a> | </span>
|
302 |
+
<select id="bp-media-move-merge-select"><option value="move">' . __('Move selected', 'buddypress-media') . '</option>' . '<option value="merge">' . __('Move all', 'buddypress-media') . '</option></select>'
|
303 |
+
. ' ' . __('to', 'buddypress-media') . ' <select class="bp-media-selected-album-move-merge">' . $album_selector . '</select> <input id="bp-media-move-merge-media" type="button" value="' . __('Submit', 'buddypress-media') . '" />
|
304 |
+
<img class="bp-media-ajax-spinner" src="' . admin_url('images/wpspin_light.gif') . '" /></div>';
|
305 |
+
// '<span class="bulk-delete"><input id="bp-media-delete-selected-media" type="button" value="' . __('Delete Media', 'buddypress-media') . '" /></span>
|
306 |
+
}
|
307 |
+
}
|
308 |
+
}
|
309 |
+
}
|
310 |
+
do_action('bp_media_album_actions');
|
311 |
+
echo '</div>';
|
312 |
+
}
|
313 |
+
}
|
314 |
+
|
315 |
}
|
316 |
|
317 |
?>
|
app/main/profile/BPMediaTemplate.php
CHANGED
@@ -30,7 +30,7 @@ class BPMediaTemplate {
|
|
30 |
if ($bp_media_query && $bp_media_query->have_posts()) {
|
31 |
$hidden = ' style="display:none;"';
|
32 |
?>
|
33 |
-
|
34 |
} else {
|
35 |
$hidden = '';
|
36 |
}
|
30 |
if ($bp_media_query && $bp_media_query->have_posts()) {
|
31 |
$hidden = ' style="display:none;"';
|
32 |
?>
|
33 |
+
<input id="bp-media-upload-button" type="button" value="Upload" class="button"><?php
|
34 |
} else {
|
35 |
$hidden = '';
|
36 |
}
|
app/main/profile/BPMediaUploadScreen.php
CHANGED
@@ -34,11 +34,7 @@ class BPMediaUploadScreen extends BPMediaScreen {
|
|
34 |
}
|
35 |
|
36 |
function upload_screen_content() {
|
37 |
-
$this->hook_before();
|
38 |
-
|
39 |
$this->template->upload_form_multiple();
|
40 |
-
|
41 |
-
$this->hook_after();
|
42 |
}
|
43 |
|
44 |
function upload_enqueue() {
|
34 |
}
|
35 |
|
36 |
function upload_screen_content() {
|
|
|
|
|
37 |
$this->template->upload_form_multiple();
|
|
|
|
|
38 |
}
|
39 |
|
40 |
function upload_enqueue() {
|
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 |
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.10
|
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-ar_AR.mo
ADDED
Binary file
|
languages/buddypress-media-de_DE.mo
CHANGED
Binary file
|
languages/buddypress-media-es_ES.mo
CHANGED
Binary file
|
languages/buddypress-media-fa_IR.mo
ADDED
Binary file
|
languages/buddypress-media-fr_FR.mo
CHANGED
Binary file
|
languages/buddypress-media-it_IT.mo
CHANGED
Binary file
|
languages/buddypress-media-nl_NL.mo
CHANGED
Binary file
|
languages/buddypress-media-pl_PL.mo
CHANGED
Binary file
|
languages/buddypress-media-pt_BR.mo
CHANGED
Binary file
|
languages/buddypress-media-ro_RO.mo
ADDED
Binary file
|
languages/buddypress-media-sr_SR.mo
CHANGED
Binary file
|
languages/buddypress-media.mo
CHANGED
Binary file
|
languages/buddypress-media.po
CHANGED
@@ -2,8 +2,8 @@ msgid ""
|
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: BuddyPress Media\n"
|
4 |
"Report-Msgid-Bugs-To: \n"
|
5 |
-
"POT-Creation-Date: 2013-04-
|
6 |
-
"PO-Revision-Date: 2013-04-
|
7 |
"Last-Translator: Joshua Abenazer <joshua.abenazer@rtcamp.com>\n"
|
8 |
"Language-Team: rtCamp <info@rtcamp.com>\n"
|
9 |
"Language: \n"
|
@@ -190,7 +190,7 @@ msgid "Enabled Media Types"
|
|
190 |
msgstr ""
|
191 |
|
192 |
#: app/helper/BPMediaSettings.php:34
|
193 |
-
#: app/main/BuddyPressMedia.php:
|
194 |
msgid "Photos"
|
195 |
msgstr ""
|
196 |
|
@@ -199,7 +199,7 @@ msgid "Enable Photos"
|
|
199 |
msgstr ""
|
200 |
|
201 |
#: app/helper/BPMediaSettings.php:39
|
202 |
-
#: app/main/BuddyPressMedia.php:
|
203 |
msgid "Video"
|
204 |
msgstr ""
|
205 |
|
@@ -216,374 +216,470 @@ msgid "Enable Audio (mp3)"
|
|
216 |
msgstr ""
|
217 |
|
218 |
#: app/helper/BPMediaSettings.php:50
|
219 |
-
msgid "
|
220 |
msgstr ""
|
221 |
|
222 |
#: app/helper/BPMediaSettings.php:51
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
223 |
msgid "Activity Uploads"
|
224 |
msgstr ""
|
225 |
|
226 |
-
#: app/helper/BPMediaSettings.php:
|
227 |
msgid "Enable Activity Uploading"
|
228 |
msgstr ""
|
229 |
|
230 |
-
#: app/helper/BPMediaSettings.php:
|
231 |
msgid "Lightbox Integration"
|
232 |
msgstr ""
|
233 |
|
234 |
-
#: app/helper/BPMediaSettings.php:
|
235 |
msgid "Lightbox"
|
236 |
msgstr ""
|
237 |
|
238 |
-
#: app/helper/BPMediaSettings.php:
|
239 |
msgid "Enable Lighbox on Media"
|
240 |
msgstr ""
|
241 |
|
242 |
-
#: app/helper/BPMediaSettings.php:
|
243 |
msgid "Groups Integration"
|
244 |
msgstr ""
|
245 |
|
246 |
-
#: app/helper/BPMediaSettings.php:
|
247 |
msgid "Groups"
|
248 |
msgstr ""
|
249 |
|
250 |
-
#: app/helper/BPMediaSettings.php:
|
251 |
msgid "Allow Media in Groups"
|
252 |
msgstr ""
|
253 |
|
254 |
-
#: app/helper/BPMediaSettings.php:
|
255 |
msgid "Display Settings"
|
256 |
msgstr ""
|
257 |
|
258 |
-
#: app/helper/BPMediaSettings.php:
|
259 |
msgid "Number of media"
|
260 |
msgstr ""
|
261 |
|
262 |
-
#: app/helper/BPMediaSettings.php:
|
263 |
msgid "Download Button"
|
264 |
msgstr ""
|
265 |
|
266 |
-
#: app/helper/BPMediaSettings.php:
|
267 |
msgid "Display download button under media"
|
268 |
msgstr ""
|
269 |
|
270 |
-
#: app/helper/BPMediaSettings.php:
|
271 |
#: app/main/privacy/BPMediaPrivacyScreen.php:59
|
272 |
msgid "Privacy Settings"
|
273 |
msgstr ""
|
274 |
|
275 |
-
#: app/helper/BPMediaSettings.php:
|
276 |
msgid "Enable Privacy"
|
277 |
msgstr ""
|
278 |
|
279 |
-
#: app/helper/BPMediaSettings.php:
|
280 |
msgid "Enable privacy"
|
281 |
msgstr ""
|
282 |
|
283 |
-
#: app/helper/BPMediaSettings.php:
|
284 |
msgid "<strong>Private</strong> - Visible only to the user"
|
285 |
msgstr ""
|
286 |
|
287 |
-
#: app/helper/BPMediaSettings.php:
|
288 |
msgid "<strong>Friends</strong> - Visible to user's friends"
|
289 |
msgstr ""
|
290 |
|
291 |
-
#: app/helper/BPMediaSettings.php:
|
292 |
msgid "<strong>Users</strong> - Visible to registered users"
|
293 |
msgstr ""
|
294 |
|
295 |
-
#: app/helper/BPMediaSettings.php:
|
296 |
msgid "<strong>Public</strong> - Visible to the world"
|
297 |
msgstr ""
|
298 |
|
299 |
-
#: app/helper/BPMediaSettings.php:
|
300 |
msgid "Default Privacy"
|
301 |
msgstr ""
|
302 |
|
303 |
-
#: app/helper/BPMediaSettings.php:
|
304 |
msgid "User Override"
|
305 |
msgstr ""
|
306 |
|
307 |
-
#: app/helper/BPMediaSettings.php:
|
308 |
msgid "Allow users to override admin defaults (<em>Recommended</em>)"
|
309 |
msgstr ""
|
310 |
|
311 |
-
#: app/helper/BPMediaSettings.php:
|
312 |
msgid "Other Settings"
|
313 |
msgstr ""
|
314 |
|
315 |
-
#: app/helper/BPMediaSettings.php:
|
316 |
msgid "Admin bar menu"
|
317 |
msgstr ""
|
318 |
|
319 |
-
#: app/helper/BPMediaSettings.php:
|
320 |
msgid "Enable menu in WordPress admin bar"
|
321 |
msgstr ""
|
322 |
|
323 |
-
#: app/helper/BPMediaSettings.php:
|
324 |
-
#: app/helper/BPMediaSettings.php:
|
325 |
msgid "Recount"
|
326 |
msgstr ""
|
327 |
|
328 |
-
#: app/helper/BPMediaSettings.php:
|
329 |
msgid "Repair media counts"
|
330 |
msgstr ""
|
331 |
|
332 |
-
#: app/helper/BPMediaSettings.php:
|
333 |
msgid "BuddyPress Media Addons for Audio/Video Conversion"
|
334 |
msgstr ""
|
335 |
|
336 |
-
#: app/helper/BPMediaSettings.php:
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
#: app/helper/BPMediaSettings.php:143
|
341 |
-
msgid "Request Type"
|
342 |
-
msgstr ""
|
343 |
-
|
344 |
-
#: app/helper/BPMediaSettings.php:144
|
345 |
-
msgid "Select One"
|
346 |
-
msgstr ""
|
347 |
-
|
348 |
-
#: app/helper/BPMediaSettings.php:145
|
349 |
-
msgid "Premium Support"
|
350 |
-
msgstr ""
|
351 |
-
|
352 |
-
#: app/helper/BPMediaSettings.php:146
|
353 |
-
msgid "Suggest a New Feature"
|
354 |
msgstr ""
|
355 |
|
356 |
-
#: app/helper/BPMediaSettings.php:
|
357 |
-
#: app/helper/BPMediaSettings.php:
|
358 |
-
#: app/admin/BPMediaAdmin.php:
|
359 |
#: app/main/privacy/BPMediaPrivacySettings.php:29
|
360 |
msgid "Update Database"
|
361 |
msgstr ""
|
362 |
|
363 |
-
#: app/helper/BPMediaSettings.php:
|
364 |
msgid "BP-Album Importer"
|
365 |
msgstr ""
|
366 |
|
367 |
-
#: app/helper/BPMediaSettings.php:
|
368 |
-
|
|
|
|
|
|
|
|
|
|
|
369 |
msgid "Recounting of media files done successfully"
|
370 |
msgstr ""
|
371 |
|
372 |
-
#: app/helper/BPMediaSettings.php:
|
373 |
msgid "Recount Success"
|
374 |
msgstr ""
|
375 |
|
376 |
-
#: app/helper/BPMediaSettings.php:
|
377 |
-
#: app/helper/BPMediaSettings.php:
|
378 |
msgid "Recounting Failed"
|
379 |
msgstr ""
|
380 |
|
381 |
-
#: app/helper/BPMediaSettings.php:
|
382 |
msgid "Recount Fail"
|
383 |
msgstr ""
|
384 |
|
385 |
-
#: app/helper/BPMediaSettings.php:
|
386 |
-
#: app/helper/BPMediaSettings.php:
|
387 |
msgid "Atleast one Media Type Must be selected"
|
388 |
msgstr ""
|
389 |
|
390 |
-
#: app/helper/BPMediaSettings.php:
|
391 |
msgid "Media Type"
|
392 |
msgstr ""
|
393 |
|
394 |
-
#: app/helper/BPMediaSettings.php:
|
395 |
-
#: app/helper/BPMediaSettings.php:
|
396 |
msgid "\"Number of media\" count value should be numeric and greater than 0."
|
397 |
msgstr ""
|
398 |
|
399 |
-
#: app/helper/BPMediaSettings.php:
|
400 |
msgid "Default Count"
|
401 |
msgstr ""
|
402 |
|
403 |
-
#: app/helper/BPMediaSettings.php:
|
404 |
msgid "Settings saved."
|
405 |
msgstr ""
|
406 |
|
407 |
-
#: app/helper/BPMediaSettings.php:
|
|
|
|
|
|
|
|
|
|
|
408 |
msgid "Please provide \"option\" value ( required ) in the argument. Pass argument to add_settings_field in the following format array( 'option' => 'option_name' ) "
|
409 |
msgstr ""
|
410 |
|
411 |
-
#: app/helper/BPMediaSettings.php:
|
412 |
-
#: app/helper/BPMediaSettings.php:
|
413 |
-
#: app/helper/BPMediaSettings.php:
|
414 |
msgid "Please provide \"option\" value ( required ) in the argument. Pass argument to add_settings_field in the following format array( 'option' => 'option_name' )"
|
415 |
msgstr ""
|
416 |
|
417 |
-
#: app/helper/BPMediaSettings.php:
|
418 |
msgid "Need to specify atleast to radios else use a checkbox instead"
|
419 |
msgstr ""
|
420 |
|
421 |
-
#: app/helper/BPMediaSettings.php:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
422 |
msgid "Please provide some values to populate the dropdown. Format : array( 'value' => 'option' )"
|
423 |
msgstr ""
|
424 |
|
425 |
-
#: app/helper/BPMediaSettings.php:
|
426 |
msgid "None"
|
427 |
msgstr ""
|
428 |
|
429 |
-
#: app/helper/BPMediaSettings.php:
|
430 |
msgid "BuddyPress Media 2.6 requires a database upgrade. "
|
431 |
msgstr ""
|
432 |
|
433 |
-
#: app/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
434 |
msgid "BuddyPress Media Component"
|
435 |
msgstr ""
|
436 |
|
437 |
-
#: app/admin/BPMediaAdmin.php:
|
438 |
-
#: app/admin/BPMediaAdmin.php:
|
439 |
-
#: app/admin/BPMediaAdmin.php:
|
440 |
msgid "BuddyPress Media"
|
441 |
msgstr ""
|
442 |
|
443 |
-
#: app/admin/BPMediaAdmin.php:
|
444 |
-
#: app/admin/BPMediaAdmin.php:
|
445 |
msgid "BuddyPress Media Settings"
|
446 |
msgstr ""
|
447 |
|
448 |
-
#: app/admin/BPMediaAdmin.php:
|
449 |
-
#: app/admin/BPMediaAdmin.php:
|
450 |
-
#: app/main/BuddyPressMedia.php:
|
451 |
msgid "Settings"
|
452 |
msgstr ""
|
453 |
|
454 |
-
#: app/admin/BPMediaAdmin.php:
|
455 |
msgid "BuddyPress Media Database Update"
|
456 |
msgstr ""
|
457 |
|
458 |
-
#: app/admin/BPMediaAdmin.php:
|
459 |
-
#: app/admin/BPMediaAdmin.php:
|
460 |
-
#: app/admin/BPMediaAdmin.php:
|
461 |
msgid "Importer"
|
462 |
msgstr ""
|
463 |
|
464 |
-
#: app/admin/BPMediaAdmin.php:
|
465 |
-
#: app/admin/BPMediaAdmin.php:
|
466 |
msgid "BuddyPress Media Addons"
|
467 |
msgstr ""
|
468 |
|
469 |
-
#: app/admin/BPMediaAdmin.php:
|
470 |
-
#: app/admin/BPMediaAdmin.php:
|
471 |
msgid "Addons"
|
472 |
msgstr ""
|
473 |
|
474 |
-
#: app/admin/BPMediaAdmin.php:
|
475 |
-
#: app/admin/BPMediaAdmin.php:
|
476 |
msgid "BuddyPress Media Support"
|
477 |
msgstr ""
|
478 |
|
479 |
-
#: app/admin/BPMediaAdmin.php:
|
480 |
msgid "Support "
|
481 |
msgstr ""
|
482 |
|
483 |
-
#: app/admin/BPMediaAdmin.php:
|
484 |
msgid "BuddyPress Media Convert Videos"
|
485 |
msgstr ""
|
486 |
|
487 |
-
#: app/admin/BPMediaAdmin.php:
|
488 |
-
#: app/admin/BPMediaAdmin.php:
|
489 |
msgid "Convert Videos"
|
490 |
msgstr ""
|
491 |
|
492 |
-
#: app/admin/BPMediaAdmin.php:
|
493 |
#: app/importers/BPMediaAlbumimporter.php:91
|
494 |
-
#: app/main/BuddyPressMedia.php:
|
495 |
-
#: app/main/BuddyPressMedia.php:
|
496 |
#: app/main/BPMediaComponent.php:297
|
497 |
#: app/main/BPMediaComponent.php:298
|
498 |
#: app/main/BPMediaComponent.php:304
|
499 |
msgid "Media"
|
500 |
msgstr ""
|
501 |
|
502 |
-
#: app/admin/BPMediaAdmin.php:
|
503 |
msgid "By"
|
504 |
msgstr ""
|