rtMedia for WordPress, BuddyPress and bbPress - Version 4.3

Version Description

Now upload media in comment & fixed rtMedia shortcode pagination along with several other bugs. Please update/re-save the permalinks after the plugin update.

=

Download this release

Release Info

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

Code changes from version 4.2.1 to 4.3

Files changed (44) hide show
  1. app/admin/RTMediaAdmin.php +13 -0
  2. app/admin/RTMediaFormHandler.php +33 -0
  3. app/assets/admin/js/admin.min.js +1 -1
  4. app/assets/admin/js/settings.js +4 -4
  5. app/assets/css/rtmedia.css +76 -13
  6. app/assets/css/rtmedia.min.css +1 -1
  7. app/assets/css/sass/_activity.scss +16 -0
  8. app/assets/css/sass/_buddypress.scss +27 -6
  9. app/assets/css/sass/_popup.scss +9 -1
  10. app/assets/css/sass/_rtm.scss +13 -1
  11. app/assets/js/rtMedia.backbone.js +859 -78
  12. app/assets/js/rtMedia.js +52 -29
  13. app/assets/js/rtmedia.min.js +2 -2
  14. app/helper/RTMediaActivityModel.php +84 -1
  15. app/helper/RTMediaSettings.php +5 -0
  16. app/helper/RTMediaSupport.php +0 -3
  17. app/helper/rtUploadAttachment.php +4 -3
  18. app/main/RTMedia.php +96 -1
  19. app/main/contexts/RTMediaContext.php +8 -2
  20. app/main/controllers/activity/RTMediaActivity.php +16 -7
  21. app/main/controllers/activity/RTMediaBuddyPressActivity.php +89 -10
  22. app/main/controllers/media/RTMediaComment.php +149 -18
  23. app/main/controllers/media/RTMediaLike.php +25 -0
  24. app/main/controllers/media/RTMediaMedia.php +77 -2
  25. app/main/controllers/privacy/RTMediaPrivacy.php +10 -1
  26. app/main/controllers/shortcodes/RTMediaGalleryShortcode.php +63 -19
  27. app/main/controllers/template/RTMediaNav.php +10 -1
  28. app/main/controllers/template/RTMediaTemplate.php +110 -25
  29. app/main/controllers/template/rtmedia-actions.php +135 -29
  30. app/main/controllers/template/rtmedia-ajax-actions.php +143 -2
  31. app/main/controllers/template/rtmedia-filters.php +65 -0
  32. app/main/controllers/template/rtmedia-functions.php +349 -66
  33. app/main/controllers/upload/RTMediaUploadEndpoint.php +98 -0
  34. app/main/controllers/upload/RTMediaUploadView.php +51 -2
  35. app/main/interactions/RTMediaInteraction.php +1 -1
  36. app/main/routers/query/RTMediaQuery.php +17 -0
  37. index.php +10 -2
  38. languages/buddypress-media.po +438 -401
  39. readme.txt +31 -6
  40. templates/media/album-gallery-item.php +1 -1
  41. templates/media/album-gallery.php +8 -1
  42. templates/media/media-gallery.php +8 -1
  43. templates/media/media-single.php +2 -11
  44. templates/upload/comment-media.php +106 -0
app/admin/RTMediaAdmin.php CHANGED
@@ -182,6 +182,19 @@ if ( ! class_exists( 'RTMediaAdmin' ) ) {
182
  include $filename;
183
  echo '</script>';
184
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  }
186
 
187
  function modify_medialibrary_permalink( $action, $post ) {
182
  include $filename;
183
  echo '</script>';
184
  }
185
+
186
+ if( isset( $_GET['page'] ) && 'rtmedia-settings' == sanitize_text_field( $_GET['page'] ) ){
187
+ global $rtmedia;
188
+ $display = apply_filters( 'rtmedia_disable_media_in_commented_media', true );
189
+ if ( isset( $rtmedia->options ) && isset( $rtmedia->options['buddypress_enableOnComment'] ) && 1 == $rtmedia->options['buddypress_enableOnComment'] && $display ) { ?>
190
+ <style type="text/css">
191
+ .rtm-option-wrapper .form-table[data-depends="buddypress_enableOnComment"] {
192
+ display: none !important;
193
+ }
194
+ </style>
195
+ <?php
196
+ }
197
+ }
198
  }
199
 
200
  function modify_medialibrary_permalink( $action, $post ) {
app/admin/RTMediaFormHandler.php CHANGED
@@ -297,6 +297,16 @@ class RTMediaFormHandler {
297
  ),
298
  'group' => '10',
299
  ),
 
 
 
 
 
 
 
 
 
 
300
  'general_enableLightbox' => array(
301
  'title' => esc_html__( 'Use lightbox to display media', 'buddypress-media' ),
302
  'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
@@ -374,6 +384,7 @@ class RTMediaFormHandler {
374
  $render_options = apply_filters( 'rtmedia_display_content_add_itmes', $render_options, $options );
375
  $general_group = array();
376
  $general_group[10] = esc_html__( 'Single Media View', 'buddypress-media' );
 
377
  $general_group[15] = esc_html__( 'List Media View', 'buddypress-media' );
378
  $general_group[18] = esc_html__( 'Masonry View', 'buddypress-media' );
379
  $general_group[19] = esc_html__( 'Direct Upload', 'buddypress-media' );
@@ -1006,6 +1017,27 @@ class RTMediaFormHandler {
1006
  ),
1007
  'group' => 10,
1008
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1009
  'rtmedia-activity-feed-limit' => array(
1010
  'title' => esc_html__( 'Number of media items to show in activity stream', 'buddypress-media' ),
1011
  'callback' => array( 'RTMediaFormHandler', 'number' ),
@@ -1081,6 +1113,7 @@ class RTMediaFormHandler {
1081
 
1082
  $general_group = array();
1083
  $general_group[10] = 'Integration With BuddyPress Features';
 
1084
  $general_group[50] = 'Album Settings';
1085
  $general_group = apply_filters( 'rtmedia_buddypress_setting_group', $general_group );
1086
 
297
  ),
298
  'group' => '10',
299
  ),
300
+ 'general_enableLikes' => array(
301
+ 'title' => __( 'Enable likes for media', 'buddypress-media' ),
302
+ 'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
303
+ 'args' => array(
304
+ 'key' => 'general_enableLikes',
305
+ 'value' => $options['general_enableLikes'],
306
+ 'desc' => __( 'You may want to disable like feature if you had enabled rating feature.', 'buddypress-media' ),
307
+ ),
308
+ 'group' => '11',
309
+ ),
310
  'general_enableLightbox' => array(
311
  'title' => esc_html__( 'Use lightbox to display media', 'buddypress-media' ),
312
  'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
384
  $render_options = apply_filters( 'rtmedia_display_content_add_itmes', $render_options, $options );
385
  $general_group = array();
386
  $general_group[10] = esc_html__( 'Single Media View', 'buddypress-media' );
387
+ $general_group[11] = esc_html__( 'Media Likes', 'buddypress-media' );
388
  $general_group[15] = esc_html__( 'List Media View', 'buddypress-media' );
389
  $general_group[18] = esc_html__( 'Masonry View', 'buddypress-media' );
390
  $general_group[19] = esc_html__( 'Direct Upload', 'buddypress-media' );
1017
  ),
1018
  'group' => 10,
1019
  ),
1020
+ 'buddypress_enableOnComment' => array(
1021
+ 'title' => esc_html__( 'Allow upload to Comment', 'buddypress-media' ),
1022
+ 'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
1023
+ 'args' => array(
1024
+ 'key' => 'buddypress_enableOnComment',
1025
+ 'value' => $options['buddypress_enableOnComment'],
1026
+ 'desc' => esc_html__( 'Enable Media in Comment', 'buddypress-media' ),
1027
+ ),
1028
+ 'group' => 660,
1029
+ ),
1030
+ 'rtmedia_disable_media_in_commented_media' => array(
1031
+ 'title' => esc_html__( 'Disable upload to Comment Media', 'buddypress-media' ),
1032
+ 'callback' => array( 'RTMediaFormHandler', 'checkbox' ),
1033
+ 'args' => array(
1034
+ 'key' => 'rtmedia_disable_media_in_commented_media',
1035
+ 'value' => $options['rtmedia_disable_media_in_commented_media'],
1036
+ 'desc' => esc_html__( 'Enable Media in Comment', 'buddypress-media' ),
1037
+ ),
1038
+ 'group' => 660,
1039
+ 'depends' => 'buddypress_enableOnComment',
1040
+ ),
1041
  'rtmedia-activity-feed-limit' => array(
1042
  'title' => esc_html__( 'Number of media items to show in activity stream', 'buddypress-media' ),
1043
  'callback' => array( 'RTMediaFormHandler', 'number' ),
1113
 
1114
  $general_group = array();
1115
  $general_group[10] = 'Integration With BuddyPress Features';
1116
+ $general_group[660] = 'Comment Media';
1117
  $general_group[50] = 'Album Settings';
1118
  $general_group = apply_filters( 'rtmedia_buddypress_setting_group', $general_group );
1119
 
app/assets/admin/js/admin.min.js CHANGED
@@ -2,4 +2,4 @@
2
  * rtMedia JavaScript Library
3
  * @package rtMedia
4
  */
5
- function rtmedia_addon_do_not_show(){var a={action:"rtmedia_addon_popup_not_show_again"};jQuery.post(rtmedia_admin_ajax,a,function(a){jQuery("#TB_window").remove(),jQuery("#TB_overlay").remove()})}"function"!=typeof Object.create&&(Object.create=function(a){function b(){}return b.prototype=a,new b}),function(a,b,c,d){var e={init:function(b,c){var d=this;d.elem=c,d.$elem=a(c),d.options=a.extend({},a.fn.rtTab.options,b),d.rtTabs()},rtTabs:function(){var c=this,d=c.options.activeTab;c.$elem.find("li:nth-child("+d+")").addClass("active"),c.rtTabContent(activeTabContent="yes"),c.rtClick();var e="false"!==c.$elem.attr("data-hash");if(e===!0){var f=b.location.hash;f&&c.$elem.find("li").find('a[href="'+f+'"]').trigger("click"),a(b).on("hashchange",function(){var a=b.location.hash;c.$elem.find("li").find('a[href="'+a+'"]').trigger("click")})}},rtClick:function(){var c=this,d=c.$elem.find("li"),e=d.find("a");e.on("click",function(e){e.preventDefault(),d.removeClass("active"),c.rtTabContent(),a(this).parent().addClass("active");var f=a(this).attr("href");a(f).removeClass("hide");var g="false"!==c.$elem.attr("data-hash");if(g===!0){var h=a(b).scrollTop();location.hash=a(this).attr("href"),a(b).scrollTop(h)}"function"==typeof c.options.onComplete&&c.options.onComplete.apply(c.elem,arguments)})},rtTabContent:function(b){var c=this,d=c.$elem.find("li"),e=d.find("a");e.each(function(){var c=a(this),d=c.attr("href");"yes"===b?c.parent().hasClass("active")||a(d).addClass("hide"):a(d).addClass("hide")})}};a.fn.rtTab=function(b){return this.each(function(){var c=Object.create(e);c.init(b,this),a.data(this,"rtTab",c)})},a.fn.rtTab.options={activeTab:1,onComplete:null}}(jQuery,window,document),jQuery(document).ready(function(a){var b=document.createElement("div");b.setAttribute("class","rtm-warning rtm-fly-warning hide"),a(".rtm-tabs").rtTab(),a('input[name^="rtmedia-options"]').on("change",function(){a(".rtm-save-settings-msg").remove(),0===a(".rtm-fly-warning").length&&(b.innerText=rtmedia_admin_strings.settings_changed,a(".rtm-button-container.top").prepend(b),a(".rtm-fly-warning").slideDown())}),a(".rtm-img-size-setting .form-table tr:nth-child(7) td:last-child").attr("colspan","3"),a(".rtm-field-wrap .switch input[type=checkbox]").each(function(){var b=a(this);b.parents("table").attr("data-depends")||(b.is(":checked")?(b.parents("table").next(".rtm-notice").slideDown(),b.parents("table").siblings("table").each(function(){a(this).attr("data-depends")&&a(this).slideDown()})):(b.parents("table").next(".rtm-notice").slideUp(),b.parents("table").siblings("table").each(function(){a(this).attr("data-depends")&&a(this).slideUp()}))),b.parents("tr").next("tr").attr("data-depends")&&(b.is(":checked")?b.parents("tr").next("tr").slideDown():b.parents("tr").next("tr").slideUp())}),a(".rtm-field-wrap .switch input[type=checkbox]").on("change",function(){var b=a(this);b.parents("table").attr("data-depends")||(b.parents("table").next(".rtm-notice").slideToggle(),b.parents("table").siblings("table").each(function(){a(this).attr("data-depends")&&a(this).slideToggle()})),b.parents("tr").next("tr").attr("data-depends")&&b.parents("tr").next("tr").slideToggle()});var c=Backbone.View.extend({el:a(".bp-media-admin"),events:{"click .rtm-theme":"render","click .rtm-close":"close","click .rtm-previous":"previousTheme","click .rtm-next":"nextTheme",keyup:"keyEvent"},initialize:function(){_.bindAll(this,"render","close","nextTheme","previousTheme","keyEvent"),this.keyEvent()},render:function(b){a(".rtm-theme").removeClass("rtm-modal-open");var c=a(b.currentTarget).addClass("rtm-modal-open").find(".rtm-theme-content").html();if(a(".rtm-theme-overlay")[0])a(".rtm-theme-overlay").show(),a(this.el).find(".rtm-theme-content-wrap").empty().append(c);else{var d={themeContent:c};a(this.el).append(rtMediaAdmin.templates.rtm_theme_overlay(d))}a(b.currentTarget).is(":first-child")?a(".rtm-previous").addClass("disabled"):a(b.currentTarget).is(":last-child")?a(".rtm-next").addClass("disabled"):a(".rtm-next, .rtm-previous").removeClass("disabled")},close:function(){a(".rtm-theme").removeClass("rtm-modal-open"),a(".rtm-theme-overlay").hide(),a(".rtm-next, .rtm-previous").removeClass("disabled")},nextTheme:function(b){return a(".rtm-next, .rtm-previous").removeClass("disabled"),a(".rtm-theme:last-child").hasClass("rtm-modal-open")&&a(b.currentTarget).addClass("disabled"),a(".rtm-modal-open").next().trigger("click"),!1},previousTheme:function(b){return a(".rtm-next, .rtm-previous").removeClass("disabled"),a(".rtm-theme:first-child").hasClass("rtm-modal-open")&&a(b.currentTarget).addClass("disabled"),a(".rtm-modal-open").prev().trigger("click"),!1},keyEvent:function(){a("body").on("keyup",function(b){return 39===b.keyCode?(a(".rtm-next, .rtm-previous").removeClass("disabled"),a(".rtm-theme:last-child").hasClass("rtm-modal-open")&&a(b.currentTarget).addClass("disabled"),a(".rtm-modal-open").next().trigger("click"),!1):37===b.keyCode?(a(".rtm-next, .rtm-previous").removeClass("disabled"),a(".rtm-theme:first-child").hasClass("rtm-modal-open")&&a(b.currentTarget).addClass("disabled"),a(".rtm-modal-open").prev().trigger("click"),!1):void(27===b.keyCode&&a(".rtm-close").trigger("click"))})}});new c;jQuery("#rtm-licenses .regular-text").each(function(){jQuery(this).keypress(function(a){var b=a.keyCode?a.keyCode:a.which;if("13"==b)return!1})}),jQuery("#bp_media_settings_form").on("submit",function(a){jQuery("#rtcss-notice").remove();var b=jQuery("#rtmedia-custom-css").val(),c=b.match(/@import\s*(url)?\s*\(?([^;]+?)\)?;/),d=c[0];if(null!=d)return jQuery("#rtmedia-custom-css").after('<div id="rtcss-notice" class="error"><p>'+rtmedia_admin_strings.wrong_css_input+"</p></div>"),!1})});var rtMediaAdmin=new Object;rtMediaAdmin.templates={rtm_image:wp.template("rtm-image"),rtm_msg_div:wp.template("rtm-msg-div"),rtm_album_favourites_importer:wp.template("rtm-album-favourites-importer"),rtm_map_mapping_failure:wp.template("rtm-map-mapping-failure"),rtm_p_tag:wp.template("rtm-p-tag"),rtm_theme_overlay:wp.template("rtm-theme-overlay")},jQuery(document).ready(function(a){function b(a){return jQuery.post(ajaxurl,a,function(b){if(0!=b){var c=!1,d=Math.ceil((20*parseInt(b)+parseInt(a.values.finished))/parseInt(a.values.total)*100);d>100&&(d=100,c=!0),jQuery("#rtprogressbar>div").css("width",d+"%"),finished=jQuery("#rtprivacyinstaller span.finished").html(),jQuery("#rtprivacyinstaller span.finished").html(parseInt(finished)+a.count),c&&jQuery.post(ajaxurl,{action:"rtmedia_privacy_redirect"},function(a){window.location=settings_url})}else{var e={msg:"Row "+b+" failed."};jQuery("#map_progress_msgs").html(rtMediaAdmin.templates.rtm_map_mapping_failure(e))}})}function c(a){return jQuery.getJSON(ajaxurl,a,function(b){if(favorites=!1,b){var c=Math.ceil((5*parseInt(b.page)+parseInt(a.values.finished))/parseInt(a.values.total)*100);comments_total=jQuery("#bpmedia-bpalbumimporter .bp-album-comments span.total").html(),users_total=jQuery("#bpmedia-bpalbumimporter .bp-album-users span.total").html(),media_total=jQuery("#bpmedia-bpalbumimporter .bp-album-media span.total").html(),comments_finished=jQuery("#bpmedia-bpalbumimporter .bp-album-comments span.finished").html(),users_finished=jQuery("#bpmedia-bpalbumimporter .bp-album-users span.finished").html();var f=Math.ceil((parseInt(b.comments)+parseInt(comments_finished))/parseInt(comments_total)*100),g=Math.ceil(parseInt(b.users)/parseInt(users_total)*100);(c>100||100==c)&&(c=100,favorites=!0),jQuery(".bp-album-media #rtprogressbar>div").css("width",c+"%"),jQuery(".bp-album-comments #rtprogressbar>div").css("width",f+"%"),jQuery(".bp-album-users #rtprogressbar>div").css("width",g+"%"),media_finished=jQuery("#bpmedia-bpalbumimporter .bp-album-media span.finished").html(),parseInt(media_finished)<parseInt(media_total)&&jQuery("#bpmedia-bpalbumimporter .bp-album-media span.finished").html(parseInt(media_finished)+a.count),jQuery("#bpmedia-bpalbumimporter .bp-album-comments span.finished").html(parseInt(b.comments)+parseInt(comments_finished)),jQuery("#bpmedia-bpalbumimporter .bp-album-users span.finished").html(parseInt(b.users)),favorites&&(favorite_data={action:"rtmedia_rt_album_import_favorites",rtm_wpnonce:jQuery("#bpaimporter_wpnonce").val()},jQuery.post(ajaxurl,favorite_data,function(a){if(!a.hasOwnProperty(favorites)||0===a.favorites&&"0"===a.favorites)window.setTimeout(e,2e3);else{if(!jQuery(".bp-album-favorites").length){var b={users:a.users};jQuery(".bp-album-comments").after(rtMediaAdmin.templates.rtm_album_favourites_importer(b))}$favorites={},0!=a.offset||"0"!=a.offset?start=1*a.offset+1:start=1;for(var c=start;c<=a.users;c++)$count=1,c==a.users&&($count=parseInt(a.users%$count),0==$count&&($count=1)),newvals={action:"rtmedia_rt_album_import_step_favorites",offset:1*(c-1),redirect:c==a.users,rtm_wpnonce:jQuery("#bpaimporter_wpnonce").val()},$favorites[c]=newvals;var f=jQuery.Deferred();f.resolve(),jQuery.each($favorites,function(a,b){f=f.pipe(function(){return d(b)})})}},"json"))}else if(a.hasOwnProperty(page)){var h={msg:"Row "+b.page+" failed."};jQuery("#map_progress_msgs").html(rtMediaAdmin.templates.rtm_map_mapping_failure(h))}else{var h={msg:rtmedia_admin_strings.request_failed};jQuery("#map_progress_msgs").html(rtMediaAdmin.templates.rtm_map_mapping_failure(h))}})}function d(a){return jQuery.post(ajaxurl,a,function(a){redirect=!1,favorites_total=jQuery("#bpmedia-bpalbumimporter .bp-album-favorites span.total").html(),favorites_finished=jQuery("#bpmedia-bpalbumimporter .bp-album-favorites span.finished").html(),jQuery("#bpmedia-bpalbumimporter .bp-album-favorites span.finished").html(parseInt(favorites_finished)+1);var b=Math.ceil(parseInt(favorites_finished+1)/parseInt(favorites_total)*100);(b>100||100==b)&&(b=100,redirect=!0),jQuery(".bp-album-favorites #rtprogressbar>div").css("width",b+"%"),redirect&&window.setTimeout(e,2e3)})}function e(){window.location=document.URL}function f(a){k=a.target.files,g(a)}function g(a){a.stopPropagation(),a.preventDefault();var b=new FormData;jQuery.each(k,function(a,c){b.append(a,c)}),jQuery.ajax({url:rtmedia_fileupload_url,type:"POST",data:b,cache:!1,dataType:"json",processData:!1,contentType:!1,success:function(a){if("undefined"==typeof a.error){if(a.exceed_size_msg)return jQuery("#debuglog").val(""),alert(a.exceed_size_msg),!1;jQuery("#debuglog_temp_path").val(a.debug_attachmanet)}else jQuery("#debuglog").val(""),alert("ERRORS: "+a.error)}})}var h=document.createElement("div");h.className="support_form_loader",a(".rtm-save-settings-msg").length>0&&setTimeout(function(){a(".rtm-save-settings-msg").remove()},1e4),jQuery("#spread-the-word").on("click","#bp-media-add-linkback",function(){var a={action:"rtmedia_linkback",linkback:jQuery("#bp-media-add-linkback:checked").length};jQuery.post(rtmedia_admin_ajax,a,function(a){})}),jQuery("#bp-media-settings-boxes").on("change","#select-request",function(){if(jQuery(this).val()){jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(),jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(h);var a={action:"rtmedia_select_request",form:jQuery(this).val()};jQuery.post(ajaxurl,a,function(a){jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(),jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(a).fadeIn("slow")})}}),jQuery("#bp-media-settings-boxes").on("click","#cancel-request",function(){if(jQuery(this).val()){jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(),jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(h);var a={action:"rtmedia_cancel_request"};jQuery.post(ajaxurl,a,function(a){jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(),jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(a).fadeIn("slow")})}}),jQuery("#bp-media-settings-boxes").on("submit","#bp_media_settings_form, .rtmedia-settings-submit",function(a){var b=!0,c=new RegExp("^[0-9]+$");jQuery("input[name*='defaultSizes']").each(function(a){if(!c.test(jQuery(this).val()))return alert("Invalid value for "+jQuery(this).attr("name").replace("rtmedia-options[defaultSizes_","").replace("]","").replace(/_/g," ").replace(/(\b)([a-zA-Z] )/g,function(a){return a.toUpperCase()})),b=!1,!1});var d=jQuery('input[name^="rtmedia-options[general_videothumbs]"]');if(b&&d.length>0&&"undefined"!=typeof d){var e="",f=0;if(d.val()<=0?(e+=rtmedia_admin_strings.video_thumbnail_error,f=2):c.test(d.val())||(e+=rtmedia_admin_strings.video_thumbnail_invalid_value+" "+Math.round(d.val())+".",f=Math.round(d.val())),""!=e)return alert(e),d.val(f),b=!1,!1}var g=jQuery('input[name^="rtmedia-options[general_jpeg_image_quality]"]');if(b&&g.length>0&&"undefined"!=typeof g){var e="",h=0;if(g.val()<=0?(e+=rtmedia_admin_strings.jpeg_quality_negative_error,h=90):g.val()>100?(e+=rtmedia_admin_strings.jpeg_quality_percentage_error,h=100):c.test(g.val())||(e+=rtmedia_admin_strings.jpeg_quality_invalid_value+" "+Math.round(g.val())+".",h=Math.round(g.val())),""!=e)return alert(e),g.val(h),b=!1,!1}var i=jQuery('input[name^="rtmedia-options[general_perPageMedia]"]');if(b&&i.length>0&&"undefined"!=typeof i){var e="",j=0;if(i.val()<1?(e+=rtmedia_admin_strings.per_page_media_negative_value,j=10):jQuery.isNumeric(i.val())&&Math.floor(i.val())!=i.val()&&(e+=rtmedia_admin_strings.per_page_media_positive_error+" "+Math.round(i.val())+".",j=Math.round(i.val())),""!=e)return alert(e),i.val(j),b=!1,!1}b||a.preventDefault()}),jQuery(document).on("click","#bpm-services .encoding-try-now,#rtm-services .encoding-try-now",function(a){if(a.preventDefault(),confirm(rtmedia_admin_strings.are_you_sure)){var b={src:rtmedia_admin_url+"images/wpspin_light.gif"};jQuery(this).after(rtMediaAdmin.templates.rtm_image(b));var b={action:"rtmedia_free_encoding_subscribe"};jQuery.getJSON(ajaxurl,b,function(a){if(void 0===a.error&&a.apikey){var b=window.location.href,c=window.location.hash;b=b.replace(c,""),document.location.href=b+"&apikey="+a.apikey+c}else{jQuery(".encoding-try-now").next().remove(),jQuery("#settings-error-encoding-error").remove();var d={id:"settings-error-encoding-error",msg:a.error,class:"error"};jQuery("#bp-media-settings-boxes").before(rtMediaAdmin.templates.rtm_msg_div(d))}})}}),jQuery(document).on("click","#api-key-submit",function(a){if(a.preventDefault(),0==jQuery(this).next("img").length){var b={src:rtmedia_admin_url+"images/wpspin_light.gif"};jQuery(this).after(rtMediaAdmin.templates.rtm_image(b))}var b={action:"rtmedia_enter_api_key",apikey:jQuery("#new-api-key").val()};jQuery.getJSON(ajaxurl,b,function(a){if(void 0===a.error&&a.apikey){var b=window.location.href,c=window.location.hash;b=b.replace(c,""),b.toString().indexOf("&apikey="+a.apikey)==-1&&(b+="&apikey="+a.apikey),b.toString().indexOf("&update=true")==-1&&(b+="&update=true"),document.location.href=b+c}else{jQuery("#settings-error-api-key-error").remove();var d={id:"settings-error-api-key-error",msg:a.error,class:"error"};jQuery("h2:first").after(rtMediaAdmin.templates.rtm_msg_div(d))}jQuery("#api-key-submit").next("img").remove()})}),jQuery(document).on("click","#disable-encoding",function(a){if(a.preventDefault(),confirm(rtmedia_admin_strings.disable_encoding)){var b={src:rtmedia_admin_url+"images/wpspin_light.gif"};jQuery(this).after(rtMediaAdmin.templates.rtm_image(b));var b={action:"rtmedia_disable_encoding"};jQuery.post(ajaxurl,b,function(a){if(a){if(jQuery(".settings-error-encoding-disabled").remove(),jQuery("#settings-encoding-successfully-updated").length>0)jQuery("#settings-encoding-successfully-updated p").html(a);else{var b={id:"settings-encoding-successfully-updated",msg:a,class:"updated"};jQuery("h2:first").after(rtMediaAdmin.templates.rtm_msg_div(b))}jQuery("#rtmedia-encoding-usage").hide(),jQuery("#disable-encoding").next("img").remove(),jQuery("#disable-encoding").hide(),jQuery("#enable-encoding").show()}else{jQuery("#settings-error-encoding-disabled").remove();var b={id:"settings-error-encoding-disabled",msg:rtmedia_admin_strings.something_went_wrong,class:"error"};jQuery("h2:first").after(rtMediaAdmin.templates.rtm_msg_div(b))}})}}),jQuery(document).on("click","#enable-encoding",function(a){if(a.preventDefault(),confirm(rtmedia_admin_strings.enable_encoding)){var b={src:rtmedia_admin_url+"images/wpspin_light.gif"};jQuery(this).after(rtMediaAdmin.templates.rtm_image(b));var b={action:"rtmedia_enable_encoding"};jQuery.post(ajaxurl,b,function(a){if(a){if(jQuery(".settings-error-encoding-enabled").remove(),jQuery("#settings-encoding-successfully-updated").length>0)jQuery("#settings-encoding-successfully-updated p").html(a);else{var b={id:"settings-encoding-successfully-updated",msg:a,class:"updated"};jQuery("h2:first").after(rtMediaAdmin.templates.rtm_msg_div(b))}jQuery("#enable-encoding").next("img").remove(),jQuery("#enable-encoding").hide(),jQuery("#disable-encoding").show()}else{jQuery("#settings-error-encoding-disabled").remove();var b={id:"settings-error-encoding-enabled",msg:rtmedia_admin_strings.something_went_wrong,class:"error"};jQuery("h2:first").after(rtMediaAdmin.templates.rtm_msg_div(b))}})}}),jQuery(".bp-media-encoding-table").on("click",".bpm-unsubscribe",function(a){a.preventDefault(),jQuery("#bpm-unsubscribe-dialog").dialog({dialogClass:"wp-dialog",modal:!0,buttons:{Unsubscribe:function(){jQuery(this).dialog("close");var a={src:rtmedia_admin_url+"images/wpspin_light.gif"};jQuery(".bpm-unsubscribe").after(rtMediaAdmin.templates.rtm_image(a));var a={action:"rtmedia_unsubscribe_encoding_service",note:jQuery("#bpm-unsubscribe-note").val(),plan:jQuery(".bpm-unsubscribe").attr("data-plan"),price:jQuery(".bpm-unsubscribe").attr("data-price")};jQuery.getJSON(ajaxurl,a,function(a){if(void 0===a.error&&a.updated){jQuery(".bpm-unsubscribe").next().remove(),jQuery(".bpm-unsubscribe").after(a.form),jQuery(".bpm-unsubscribe").remove(),jQuery("#settings-unsubscribed-successfully").remove(),jQuery("#settings-unsubscribe-error").remove();var b={id:"settings-unsubscribed-successfully",msg:a.updated,class:"updated"};jQuery("h2:first").after(rtMediaAdmin.templates.rtm_msg_div(b)),window.location.hash="#settings-unsubscribed-successfully"}else{jQuery(".bpm-unsubscribe").next().remove(),jQuery("#settings-unsubscribed-successfully").remove(),jQuery("#settings-unsubscribe-error").remove();var b={id:"settings-unsubscribe-error",msg:a.error,class:"error"};jQuery("h2:first").after(rtMediaAdmin.templates.rtm_msg_div(b)),window.location.hash="#settings-unsubscribe-error"}})}}})}),jQuery("#bpmedia-bpalbumimporter").on("change","#bp-album-import-accept",function(){jQuery(".bp-album-import-accept").toggleClass("i-accept"),jQuery(".bp-album-importer-wizard").slideToggle()}),jQuery("#rtprivacyinstall").click(function(a){a.preventDefault(),$progress_parent=jQuery("#rtprivacyinstaller"),$progress_parent.find(".rtprivacytype").each(function(){if($type=jQuery(this).attr("id"),"total"==$type){$values=[],jQuery(this).find("input").each(function(){$values[jQuery(this).attr("name")]=[jQuery(this).val()]}),$data={};for(var a=1;a<=$values.steps[0];a++)$count=20,a==$values.steps[0]&&($count=parseInt($values.laststep[0]),0==$count&&($count=20)),newvals={page:a,action:"rtmedia_privacy_install",count:$count,values:$values},$data[a]=newvals;var c=jQuery.Deferred();c.resolve(),jQuery.each($data,function(a,d){c=c.pipe(function(){return b(d)})})}})}),jQuery("#bpmedia-bpalbumimport-cleanup").click(function(a){a.preventDefault(),jQuery.post(ajaxurl,{action:"rtmedia_rt_album_cleanup",rtm_wpnonce:jQuery("#bpaimporter_wpnonce").val()},function(a){window.location=settings_rt_album_import_url})}),jQuery("#bpmedia-bpalbumimporter").on("click","#bpmedia-bpalbumimport",function(a){if(a.preventDefault(),!jQuery("#bp-album-import-accept").prop("checked")){jQuery("html, body").animate({scrollTop:jQuery("#bp-album-import-accept").offset().top},500);var b=jQuery(".bp-album-import-accept"),d=500,e="#FFEBE8",f=3;return void function a(){b.css("background-color","#EE0000"),setTimeout(function(){b.css("background-color",e),--f&&setTimeout(a,d)},d)}()}if(jQuery(this).prop("disabled",!0),wp_admin_url=ajaxurl.replace("admin-ajax.php",""),!jQuery(".bpm-ajax-loader").length){var g={src:rtmedia_admin_url+"images/wpspin_light.gif",class:"bpm-ajax-loader",norefresh:rtmedia_admin_strings.no_refresh};jQuery(this).after(rtMediaAdmin.templates.rtm_image(g))}$progress_parent=jQuery("#bpmedia-bpalbumimport"),$values=[],jQuery(this).parent().find("input").each(function(){$values[jQuery(this).attr("name")]=[jQuery(this).val()]}),0==$values.steps[0]&&($values.steps[0]=1),$data={};for(var f=1;f<=$values.steps[0];f++)$count=5,f==$values.steps[0]&&($count=parseInt($values.laststep[0]),0==$count&&($count=5)),newvals={page:f,action:"rtmedia_rt_album_import",count:$count,values:$values,rtm_wpnonce:jQuery("#bpaimporter_wpnonce").val()},$data[f]=newvals;var h=jQuery.Deferred();h.resolve(),jQuery.each($data,function(a,b){h=h.pipe(function(){return c(b)})})}),jQuery("#bp-media-settings-boxes").on("click",".interested",function(){jQuery(".interested-container").removeClass("hidden"),jQuery(".choice-free").attr("required","required")}),jQuery("#bp-media-settings-boxes").on("click",".not-interested",function(){jQuery(".interested-container").addClass("hidden"),jQuery(".choice-free").removeAttr("required")}),jQuery("#video-transcoding-main-container").on("click",".video-transcoding-survey",function(a){a.preventDefault();var b={action:"rtmedia_convert_videos_form",email:jQuery(".email").val(),url:jQuery(".url").val(),choice:jQuery('input[name="choice"]:checked').val(),interested:jQuery('input[name="interested"]:checked').val()};return jQuery.post(ajaxurl,b,function(a){var b={msg:a,strong:"yes"};jQuery("#video-transcoding-main-container").html(rtMediaAdmin.templates.rtm_p_tag(b))}),!1}),jQuery("#bpmedia-bpalbumimporter").on("click",".deactivate-bp-album",function(a){a.preventDefault(),$bpalbum=jQuery(this);var b={action:"rtmedia_rt_album_deactivate",rtm_wpnonce:jQuery("#bpaimporter_wpnonce").val()};jQuery.get(ajaxurl,b,function(a){if(a)location.reload();else{var b={msg:rtmedia_admin_strings.something_went_wrong};$bpalbum.parent().after(rtMediaAdmin.templates.rtm_p_tag(b))}})}),jQuery(".updated").on("click",".bpm-hide-encoding-notice",function(){var a={src:rtmedia_admin_url+"images/wpspin_light.gif"};jQuery(this).after(rtMediaAdmin.templates.rtm_image(a));var a={action:"rtmedia_hide_encoding_notice"};jQuery.post(ajaxurl,a,function(a){a&&jQuery(".bpm-hide-encoding-notice").closest(".updated").remove()})}),jQuery("#rtmedia-bp-enable-activity").is(":checked")?jQuery(".rtmedia-bp-activity-setting").prop("readonly",!1):jQuery(".rtmedia-bp-activity-setting").prop("readonly",!0),jQuery("#rtmedia-bp-enable-activity").on("click",function(a){jQuery(this).is(":checked")?jQuery(".rtmedia-bp-activity-setting").prop("readonly",!1):jQuery(".rtmedia-bp-activity-setting").prop("readonly",!0)});var i="",j="";void 0!==rtmedia_on_label&&(i='data-on-label="'+rtmedia_on_label+'"'),void 0!==rtmedia_off_label&&(j='data-off-label="'+rtmedia_off_label+'"');var k;jQuery("input[type=file]").on("change",f),jQuery("#rtmedia-submit-request").click(function(){var b=jQuery("#name").val(),c=jQuery("#email").val(),d=jQuery("#website").val(),e=jQuery("#phone").val(),f=jQuery("#subject").val(),g=jQuery("#details").val(),h=jQuery('input[name="request_type"]').val(),i=jQuery('input[name="request_id"]').val(),j=jQuery('input[name="server_address"]').val(),k=jQuery('input[name="ip_address"]').val(),l=jQuery('input[name="server_type"]').val(),m=jQuery('input[name="user_agent"]').val(),n=jQuery('input[name="debuglog_temp_path"]').val(),o={name:b,email:c,website:d,phone:e,subject:f,details:g,request_id:i,request_type:"premium_support",server_address:j,ip_address:k,server_type:l,user_agent:m,debuglog_temp_path:n};if("bug_report"==h){var p=jQuery("#wp_admin_username").val();if(""==p)return alert(rtmedia_admin_support_strings.wp_admin_username_error),!1;var q=jQuery("#wp_admin_pwd").val();if(""==q)return alert(rtmedia_admin_support_strings.wp_admin_pwd_error),!1;var r=jQuery("#ssh_ftp_host").val();if(""==r)return alert(rtmedia_admin_support_strings.ssh_ftp_host_error),!1;var s=jQuery("#ssh_ftp_username").val();if(""==s)return alert(rtmedia_admin_support_strings.ssh_ftp_username_error),!1;var t=jQuery("#ssh_ftp_pwd").val();if(""==t)return alert(rtmedia_admin_support_strings.ssh_ftp_pwd_error),!1;o={name:b,email:c,website:d,phone:e,subject:f,details:g,request_id:i,request_type:"premium_support",server_address:j,ip_address:k,server_type:l,user_agent:m,wp_admin_username:p,wp_admin_pwd:q,ssh_ftp_host:r,ssh_ftp_username:s,ssh_ftp_pwd:t}}for(formdata in o)if(""==o[formdata]&&"phone"!=formdata)return alert("Please enter "+formdata.replace("_"," ")+" field."),!1;return data={action:"rtmedia_submit_request",form_data:o,support_wpnonce:jQuery("#support_wpnonce").val()},jQuery.post(ajaxurl,data,function(b){return b=b.trim(),"false"==b?(alert(rtmedia_admin_support_strings.all_fields_error),!1):(a("#rtmedia_service_contact_container").empty(),void a("#rtmedia_service_contact_container").append(b))}),!1}),jQuery("#cancel-request").click(function(){return!1}),jQuery(".rtm_enable_masonry_view input[type=checkbox]").is(":checked")?jQuery(".rtm_enable_masonry_view").parents(".metabox-holder").find(".rtmedia-info").show():jQuery(".rtm_enable_masonry_view").parents(".metabox-holder").find(".rtmedia-info").hide(),jQuery(".rtm_enable_masonry_view input[type=checkbox]").on("click",function(a){jQuery(this).is(":checked")?jQuery(".rtm_enable_masonry_view").parents(".metabox-holder").find(".rtmedia-info").show():jQuery(".rtm_enable_masonry_view").parents(".metabox-holder").find(".rtmedia-info").hide()}),jQuery("#rtm-masonry-change-thumbnail-info").click(function(a){jQuery("html, body").animate({scrollTop:0},"500","swing")})}),jQuery(window).load(function(){jQuery(".rtmedia-addon-thickbox").trigger("click")});
2
  * rtMedia JavaScript Library
3
  * @package rtMedia
4
  */
5
+ function rtmedia_addon_do_not_show(){var a={action:"rtmedia_addon_popup_not_show_again"};jQuery.post(rtmedia_admin_ajax,a,function(a){jQuery("#TB_window").remove(),jQuery("#TB_overlay").remove()})}"function"!=typeof Object.create&&(Object.create=function(a){function b(){}return b.prototype=a,new b}),function(a,b,c,d){var e={init:function(b,c){var d=this;d.elem=c,d.$elem=a(c),d.options=a.extend({},a.fn.rtTab.options,b),d.rtTabs()},rtTabs:function(){var c=this,d=c.options.activeTab;c.$elem.find("li:nth-child("+d+")").addClass("active"),c.rtTabContent(activeTabContent="yes"),c.rtClick();var e="false"!==c.$elem.attr("data-hash");if(e===!0){var f=b.location.hash;f&&c.$elem.find("li").find('a[href="'+f+'"]').trigger("click"),a(b).on("hashchange",function(){var a=b.location.hash;c.$elem.find("li").find('a[href="'+a+'"]').trigger("click")})}},rtClick:function(){var c=this,d=c.$elem.find("li"),e=d.find("a");e.on("click",function(e){e.preventDefault(),d.removeClass("active"),c.rtTabContent(),a(this).parent().addClass("active");var f=a(this).attr("href");a(f).removeClass("hide");var g="false"!==c.$elem.attr("data-hash");if(g===!0){var h=a(b).scrollTop();location.hash=a(this).attr("href"),a(b).scrollTop(h)}"function"==typeof c.options.onComplete&&c.options.onComplete.apply(c.elem,arguments)})},rtTabContent:function(b){var c=this,d=c.$elem.find("li"),e=d.find("a");e.each(function(){var c=a(this),d=c.attr("href");"yes"===b?c.parent().hasClass("active")||a(d).addClass("hide"):a(d).addClass("hide")})}};a.fn.rtTab=function(b){return this.each(function(){var c=Object.create(e);c.init(b,this),a.data(this,"rtTab",c)})},a.fn.rtTab.options={activeTab:1,onComplete:null}}(jQuery,window,document),jQuery(document).ready(function(a){var b=document.createElement("div");b.setAttribute("class","rtm-warning rtm-fly-warning hide"),a(".rtm-tabs").rtTab(),a('input[name^="rtmedia-options"]').on("change",function(){a(".rtm-save-settings-msg").remove(),0===a(".rtm-fly-warning").length&&(b.innerText=rtmedia_admin_strings.settings_changed,a(".rtm-button-container.top").prepend(b),a(".rtm-fly-warning").slideDown())}),a(".rtm-img-size-setting .form-table tr:nth-child(7) td:last-child").attr("colspan","3"),a(".rtm-field-wrap .switch input[type=checkbox]").each(function(){var b=a(this);b.parents("table").attr("data-depends")||(b.is(":checked")?(b.parents("table").next(".rtm-notice").slideDown(),b.parents("table").siblings("table").each(function(){a(this).attr("data-depends")&&a(this).slideDown()})):(b.parents("table").next(".rtm-notice").slideUp(),b.parents("table").siblings("table").each(function(){a(this).attr("data-depends")&&a(this).slideUp()}))),b.parents("tr").next("tr").attr("data-depends")&&(b.is(":checked")?b.parents("tr").next("tr").slideDown():b.parents("tr").next("tr").slideUp())}),a(".rtm-field-wrap .switch input[type=checkbox]").on("change",function(){var b=a(this);b.parents("table").attr("data-depends")||(b.parents("table").next(".rtm-notice").slideToggle(),b.parents("table").siblings("table").each(function(){a(this).attr("data-depends")&&a(this).slideToggle()})),b.parents("tr").next("tr").attr("data-depends")&&b.parents("tr").next("tr").slideToggle()});var c=Backbone.View.extend({el:a(".bp-media-admin"),events:{"click .rtm-theme":"render","click .rtm-close":"close","click .rtm-previous":"previousTheme","click .rtm-next":"nextTheme",keyup:"keyEvent"},initialize:function(){_.bindAll(this,"render","close","nextTheme","previousTheme","keyEvent"),this.keyEvent()},render:function(b){a(".rtm-theme").removeClass("rtm-modal-open");var c=a(b.currentTarget).addClass("rtm-modal-open").find(".rtm-theme-content").html();if(a(".rtm-theme-overlay")[0])a(".rtm-theme-overlay").show(),a(this.el).find(".rtm-theme-content-wrap").empty().append(c);else{var d={themeContent:c};a(this.el).append(rtMediaAdmin.templates.rtm_theme_overlay(d))}a(b.currentTarget).is(":first-child")?a(".rtm-previous").addClass("disabled"):a(b.currentTarget).is(":last-child")?a(".rtm-next").addClass("disabled"):a(".rtm-next, .rtm-previous").removeClass("disabled")},close:function(){a(".rtm-theme").removeClass("rtm-modal-open"),a(".rtm-theme-overlay").hide(),a(".rtm-next, .rtm-previous").removeClass("disabled")},nextTheme:function(b){return a(".rtm-next, .rtm-previous").removeClass("disabled"),a(".rtm-theme:last-child").hasClass("rtm-modal-open")&&a(b.currentTarget).addClass("disabled"),a(".rtm-modal-open").next().trigger("click"),!1},previousTheme:function(b){return a(".rtm-next, .rtm-previous").removeClass("disabled"),a(".rtm-theme:first-child").hasClass("rtm-modal-open")&&a(b.currentTarget).addClass("disabled"),a(".rtm-modal-open").prev().trigger("click"),!1},keyEvent:function(){a("body").on("keyup",function(b){return 39===b.keyCode?(a(".rtm-next, .rtm-previous").removeClass("disabled"),a(".rtm-theme:last-child").hasClass("rtm-modal-open")&&a(b.currentTarget).addClass("disabled"),a(".rtm-modal-open").next().trigger("click"),!1):37===b.keyCode?(a(".rtm-next, .rtm-previous").removeClass("disabled"),a(".rtm-theme:first-child").hasClass("rtm-modal-open")&&a(b.currentTarget).addClass("disabled"),a(".rtm-modal-open").prev().trigger("click"),!1):void(27===b.keyCode&&a(".rtm-close").trigger("click"))})}});new c;jQuery("#rtm-licenses .regular-text").each(function(){jQuery(this).keypress(function(a){var b=a.keyCode?a.keyCode:a.which;if("13"==b)return!1})}),jQuery("#bp_media_settings_form").on("submit",function(a){jQuery("#rtcss-notice").remove();var b=jQuery("#rtmedia-custom-css").val(),c=b.match(/@import\s*(url)?\s*\(?([^;]+?)\)?;/),d=c[0];if(null!=d)return jQuery("#rtmedia-custom-css").after('<div id="rtcss-notice" class="error"><p>'+rtmedia_admin_strings.wrong_css_input+"</p></div>"),!1})});var rtMediaAdmin=new Object;rtMediaAdmin.templates={rtm_image:wp.template("rtm-image"),rtm_msg_div:wp.template("rtm-msg-div"),rtm_album_favourites_importer:wp.template("rtm-album-favourites-importer"),rtm_map_mapping_failure:wp.template("rtm-map-mapping-failure"),rtm_p_tag:wp.template("rtm-p-tag"),rtm_theme_overlay:wp.template("rtm-theme-overlay")},jQuery(document).ready(function(a){function b(a){return jQuery.post(ajaxurl,a,function(b){if(0!=b){var c=!1,d=Math.ceil((20*parseInt(b)+parseInt(a.values.finished))/parseInt(a.values.total)*100);d>100&&(d=100,c=!0),jQuery("#rtprogressbar>div").css("width",d+"%"),finished=jQuery("#rtprivacyinstaller span.finished").html(),jQuery("#rtprivacyinstaller span.finished").html(parseInt(finished)+a.count),c&&jQuery.post(ajaxurl,{action:"rtmedia_privacy_redirect"},function(a){window.location=settings_url})}else{var e={msg:"Row "+b+" failed."};jQuery("#map_progress_msgs").html(rtMediaAdmin.templates.rtm_map_mapping_failure(e))}})}function c(a){return jQuery.getJSON(ajaxurl,a,function(b){if(favorites=!1,b){var c=Math.ceil((5*parseInt(b.page)+parseInt(a.values.finished))/parseInt(a.values.total)*100);comments_total=jQuery("#bpmedia-bpalbumimporter .bp-album-comments span.total").html(),users_total=jQuery("#bpmedia-bpalbumimporter .bp-album-users span.total").html(),media_total=jQuery("#bpmedia-bpalbumimporter .bp-album-media span.total").html(),comments_finished=jQuery("#bpmedia-bpalbumimporter .bp-album-comments span.finished").html(),users_finished=jQuery("#bpmedia-bpalbumimporter .bp-album-users span.finished").html();var f=Math.ceil((parseInt(b.comments)+parseInt(comments_finished))/parseInt(comments_total)*100),g=Math.ceil(parseInt(b.users)/parseInt(users_total)*100);(c>100||100==c)&&(c=100,favorites=!0),jQuery(".bp-album-media #rtprogressbar>div").css("width",c+"%"),jQuery(".bp-album-comments #rtprogressbar>div").css("width",f+"%"),jQuery(".bp-album-users #rtprogressbar>div").css("width",g+"%"),media_finished=jQuery("#bpmedia-bpalbumimporter .bp-album-media span.finished").html(),parseInt(media_finished)<parseInt(media_total)&&jQuery("#bpmedia-bpalbumimporter .bp-album-media span.finished").html(parseInt(media_finished)+a.count),jQuery("#bpmedia-bpalbumimporter .bp-album-comments span.finished").html(parseInt(b.comments)+parseInt(comments_finished)),jQuery("#bpmedia-bpalbumimporter .bp-album-users span.finished").html(parseInt(b.users)),favorites&&(favorite_data={action:"rtmedia_rt_album_import_favorites",rtm_wpnonce:jQuery("#bpaimporter_wpnonce").val()},jQuery.post(ajaxurl,favorite_data,function(a){if(!a.hasOwnProperty(favorites)||0===a.favorites&&"0"===a.favorites)window.setTimeout(e,2e3);else{if(!jQuery(".bp-album-favorites").length){var b={users:a.users};jQuery(".bp-album-comments").after(rtMediaAdmin.templates.rtm_album_favourites_importer(b))}$favorites={},0!=a.offset||"0"!=a.offset?start=1*a.offset+1:start=1;for(var c=start;c<=a.users;c++)$count=1,c==a.users&&($count=parseInt(a.users%$count),0==$count&&($count=1)),newvals={action:"rtmedia_rt_album_import_step_favorites",offset:1*(c-1),redirect:c==a.users,rtm_wpnonce:jQuery("#bpaimporter_wpnonce").val()},$favorites[c]=newvals;var f=jQuery.Deferred();f.resolve(),jQuery.each($favorites,function(a,b){f=f.pipe(function(){return d(b)})})}},"json"))}else if(a.hasOwnProperty(page)){var h={msg:"Row "+b.page+" failed."};jQuery("#map_progress_msgs").html(rtMediaAdmin.templates.rtm_map_mapping_failure(h))}else{var h={msg:rtmedia_admin_strings.request_failed};jQuery("#map_progress_msgs").html(rtMediaAdmin.templates.rtm_map_mapping_failure(h))}})}function d(a){return jQuery.post(ajaxurl,a,function(a){redirect=!1,favorites_total=jQuery("#bpmedia-bpalbumimporter .bp-album-favorites span.total").html(),favorites_finished=jQuery("#bpmedia-bpalbumimporter .bp-album-favorites span.finished").html(),jQuery("#bpmedia-bpalbumimporter .bp-album-favorites span.finished").html(parseInt(favorites_finished)+1);var b=Math.ceil(parseInt(favorites_finished+1)/parseInt(favorites_total)*100);(b>100||100==b)&&(b=100,redirect=!0),jQuery(".bp-album-favorites #rtprogressbar>div").css("width",b+"%"),redirect&&window.setTimeout(e,2e3)})}function e(){window.location=document.URL}function f(a){k=a.target.files,g(a)}function g(a){a.stopPropagation(),a.preventDefault();var b=new FormData;jQuery.each(k,function(a,c){b.append(a,c)}),jQuery.ajax({url:rtmedia_fileupload_url,type:"POST",data:b,cache:!1,dataType:"json",processData:!1,contentType:!1,success:function(a){if("undefined"==typeof a.error){if(a.exceed_size_msg)return jQuery("#debuglog").val(""),alert(a.exceed_size_msg),!1;jQuery("#debuglog_temp_path").val(a.debug_attachmanet)}else jQuery("#debuglog").val(""),alert("ERRORS: "+a.error)}})}var h=document.createElement("div");h.className="support_form_loader",a(".rtm-save-settings-msg").length>0&&setTimeout(function(){a(".rtm-save-settings-msg").remove()},1e4),jQuery("#spread-the-word").on("click","#bp-media-add-linkback",function(){var a={action:"rtmedia_linkback",linkback:jQuery("#bp-media-add-linkback:checked").length};jQuery.post(rtmedia_admin_ajax,a,function(a){})}),jQuery("#bp-media-settings-boxes").on("change","#select-request",function(){if(jQuery(this).val()){jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(),jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(h);var a={action:"rtmedia_select_request",form:jQuery(this).val()};jQuery.post(ajaxurl,a,function(a){jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(),jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(a).fadeIn("slow")})}}),jQuery("#bp-media-settings-boxes").on("click","#cancel-request",function(){if(jQuery(this).val()){jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(),jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(h);var a={action:"rtmedia_cancel_request"};jQuery.post(ajaxurl,a,function(a){jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(),jQuery("#bp_media_settings_form .bp-media-metabox-holder").html(a).fadeIn("slow")})}}),jQuery("#bp-media-settings-boxes").on("submit","#bp_media_settings_form, .rtmedia-settings-submit",function(a){var b=!0,c=new RegExp("^[0-9]+$");jQuery("input[name*='defaultSizes']").each(function(a){if(!c.test(jQuery(this).val()))return alert("Invalid value for "+jQuery(this).attr("name").replace("rtmedia-options[defaultSizes_","").replace("]","").replace(/_/g," ").replace(/(\b)([a-zA-Z] )/g,function(a){return a.toUpperCase()})),b=!1,!1});var d=jQuery('input[name^="rtmedia-options[general_videothumbs]"]');if(b&&d.length>0&&"undefined"!=typeof d){var e="",f=0;if(d.val()<=0?(e+=rtmedia_admin_strings.video_thumbnail_error,f=2):c.test(d.val())||(e+=rtmedia_admin_strings.video_thumbnail_invalid_value+" "+Math.round(d.val())+".",f=Math.round(d.val())),""!=e)return alert(e),d.val(f),b=!1,!1}var g=jQuery('input[name^="rtmedia-options[general_jpeg_image_quality]"]');if(b&&g.length>0&&"undefined"!=typeof g){var e="",h=0;if(g.val()<=0?(e+=rtmedia_admin_strings.jpeg_quality_negative_error,h=90):g.val()>100?(e+=rtmedia_admin_strings.jpeg_quality_percentage_error,h=100):c.test(g.val())||(e+=rtmedia_admin_strings.jpeg_quality_invalid_value+" "+Math.round(g.val())+".",h=Math.round(g.val())),""!=e)return alert(e),g.val(h),b=!1,!1}var i=jQuery('input[name^="rtmedia-options[general_perPageMedia]"]');if(b&&i.length>0&&"undefined"!=typeof i){var e="",j=0;if(i.val()<1?(e+=rtmedia_admin_strings.per_page_media_negative_value,j=10):jQuery.isNumeric(i.val())&&Math.floor(i.val())!=i.val()&&(e+=rtmedia_admin_strings.per_page_media_positive_error+" "+Math.round(i.val())+".",j=Math.round(i.val())),""!=e)return alert(e),i.val(j),b=!1,!1}b||a.preventDefault()}),jQuery(document).on("click","#bpm-services .encoding-try-now,#rtm-services .encoding-try-now",function(a){if(a.preventDefault(),confirm(rtmedia_admin_strings.are_you_sure)){var b={src:rtmedia_admin_url+"images/wpspin_light.gif"};jQuery(this).after(rtMediaAdmin.templates.rtm_image(b));var b={action:"rtmedia_free_encoding_subscribe"};jQuery.getJSON(ajaxurl,b,function(a){if(void 0===a.error&&a.apikey){var b=window.location.href,c=window.location.hash;b=b.replace(c,""),document.location.href=b+"&apikey="+a.apikey+c}else{jQuery(".encoding-try-now").next().remove(),jQuery("#settings-error-encoding-error").remove();var d={id:"settings-error-encoding-error",msg:a.error,class:"error"};jQuery("#bp-media-settings-boxes").before(rtMediaAdmin.templates.rtm_msg_div(d))}})}}),jQuery(document).on("click","#api-key-submit",function(a){if(a.preventDefault(),0==jQuery(this).next("img").length){var b={src:rtmedia_admin_url+"images/wpspin_light.gif"};jQuery(this).after(rtMediaAdmin.templates.rtm_image(b))}var b={action:"rtmedia_enter_api_key",apikey:jQuery("#new-api-key").val()};jQuery.getJSON(ajaxurl,b,function(a){if(void 0===a.error&&a.apikey){var b=window.location.href,c=window.location.hash;b=b.replace(c,""),b.toString().indexOf("&apikey="+a.apikey)==-1&&(b+="&apikey="+a.apikey),b.toString().indexOf("&update=true")==-1&&(b+="&update=true"),document.location.href=b+c}else{jQuery("#settings-error-api-key-error").remove();var d={id:"settings-error-api-key-error",msg:a.error,class:"error"};jQuery("h2:first").after(rtMediaAdmin.templates.rtm_msg_div(d))}jQuery("#api-key-submit").next("img").remove()})}),jQuery(document).on("click","#disable-encoding",function(a){if(a.preventDefault(),confirm(rtmedia_admin_strings.disable_encoding)){var b={src:rtmedia_admin_url+"images/wpspin_light.gif"};jQuery(this).after(rtMediaAdmin.templates.rtm_image(b));var b={action:"rtmedia_disable_encoding"};jQuery.post(ajaxurl,b,function(a){if(a){if(jQuery(".settings-error-encoding-disabled").remove(),jQuery("#settings-encoding-successfully-updated").length>0)jQuery("#settings-encoding-successfully-updated p").html(a);else{var b={id:"settings-encoding-successfully-updated",msg:a,class:"updated"};jQuery("h2:first").after(rtMediaAdmin.templates.rtm_msg_div(b))}jQuery("#rtmedia-encoding-usage").hide(),jQuery("#disable-encoding").next("img").remove(),jQuery("#disable-encoding").hide(),jQuery("#enable-encoding").show()}else{jQuery("#settings-error-encoding-disabled").remove();var b={id:"settings-error-encoding-disabled",msg:rtmedia_admin_strings.something_went_wrong,class:"error"};jQuery("h2:first").after(rtMediaAdmin.templates.rtm_msg_div(b))}})}}),jQuery(document).on("click","#enable-encoding",function(a){if(a.preventDefault(),confirm(rtmedia_admin_strings.enable_encoding)){var b={src:rtmedia_admin_url+"images/wpspin_light.gif"};jQuery(this).after(rtMediaAdmin.templates.rtm_image(b));var b={action:"rtmedia_enable_encoding"};jQuery.post(ajaxurl,b,function(a){if(a){if(jQuery(".settings-error-encoding-enabled").remove(),jQuery("#settings-encoding-successfully-updated").length>0)jQuery("#settings-encoding-successfully-updated p").html(a);else{var b={id:"settings-encoding-successfully-updated",msg:a,class:"updated"};jQuery("h2:first").after(rtMediaAdmin.templates.rtm_msg_div(b))}jQuery("#enable-encoding").next("img").remove(),jQuery("#enable-encoding").hide(),jQuery("#disable-encoding").show()}else{jQuery("#settings-error-encoding-disabled").remove();var b={id:"settings-error-encoding-enabled",msg:rtmedia_admin_strings.something_went_wrong,class:"error"};jQuery("h2:first").after(rtMediaAdmin.templates.rtm_msg_div(b))}})}}),jQuery(".bp-media-encoding-table").on("click",".bpm-unsubscribe",function(a){a.preventDefault(),jQuery("#bpm-unsubscribe-dialog").dialog({dialogClass:"wp-dialog",modal:!0,buttons:{Unsubscribe:function(){jQuery(this).dialog("close");var a={src:rtmedia_admin_url+"images/wpspin_light.gif"};jQuery(".bpm-unsubscribe").after(rtMediaAdmin.templates.rtm_image(a));var a={action:"rtmedia_unsubscribe_encoding_service",note:jQuery("#bpm-unsubscribe-note").val(),plan:jQuery(".bpm-unsubscribe").attr("data-plan"),price:jQuery(".bpm-unsubscribe").attr("data-price")};jQuery.getJSON(ajaxurl,a,function(a){if(void 0===a.error&&a.updated){jQuery(".bpm-unsubscribe").next().remove(),jQuery(".bpm-unsubscribe").after(a.form),jQuery(".bpm-unsubscribe").remove(),jQuery("#settings-unsubscribed-successfully").remove(),jQuery("#settings-unsubscribe-error").remove();var b={id:"settings-unsubscribed-successfully",msg:a.updated,class:"updated"};jQuery("h2:first").after(rtMediaAdmin.templates.rtm_msg_div(b)),window.location.hash="#settings-unsubscribed-successfully"}else{jQuery(".bpm-unsubscribe").next().remove(),jQuery("#settings-unsubscribed-successfully").remove(),jQuery("#settings-unsubscribe-error").remove();var b={id:"settings-unsubscribe-error",msg:a.error,class:"error"};jQuery("h2:first").after(rtMediaAdmin.templates.rtm_msg_div(b)),window.location.hash="#settings-unsubscribe-error"}})}}})}),jQuery("#bpmedia-bpalbumimporter").on("change","#bp-album-import-accept",function(){jQuery(".bp-album-import-accept").toggleClass("i-accept"),jQuery(".bp-album-importer-wizard").slideToggle()}),jQuery("#rtprivacyinstall").click(function(a){a.preventDefault(),$progress_parent=jQuery("#rtprivacyinstaller"),$progress_parent.find(".rtprivacytype").each(function(){if($type=jQuery(this).attr("id"),"total"==$type){$values=[],jQuery(this).find("input").each(function(){$values[jQuery(this).attr("name")]=[jQuery(this).val()]}),$data={};for(var a=1;a<=$values.steps[0];a++)$count=20,a==$values.steps[0]&&($count=parseInt($values.laststep[0]),0==$count&&($count=20)),newvals={page:a,action:"rtmedia_privacy_install",count:$count,values:$values},$data[a]=newvals;var c=jQuery.Deferred();c.resolve(),jQuery.each($data,function(a,d){c=c.pipe(function(){return b(d)})})}})}),jQuery("#bpmedia-bpalbumimport-cleanup").click(function(a){a.preventDefault(),jQuery.post(ajaxurl,{action:"rtmedia_rt_album_cleanup",rtm_wpnonce:jQuery("#bpaimporter_wpnonce").val()},function(a){window.location=settings_rt_album_import_url})}),jQuery("#bpmedia-bpalbumimporter").on("click","#bpmedia-bpalbumimport",function(a){if(a.preventDefault(),!jQuery("#bp-album-import-accept").prop("checked")){jQuery("html, body").animate({scrollTop:jQuery("#bp-album-import-accept").offset().top},500);var b=jQuery(".bp-album-import-accept"),d=500,e="#FFEBE8",f=3;return void function a(){b.css("background-color","#EE0000"),setTimeout(function(){b.css("background-color",e),--f&&setTimeout(a,d)},d)}()}if(jQuery(this).prop("disabled",!0),wp_admin_url=ajaxurl.replace("admin-ajax.php",""),!jQuery(".bpm-ajax-loader").length){var g={src:rtmedia_admin_url+"images/wpspin_light.gif",class:"bpm-ajax-loader",norefresh:rtmedia_admin_strings.no_refresh};jQuery(this).after(rtMediaAdmin.templates.rtm_image(g))}$progress_parent=jQuery("#bpmedia-bpalbumimport"),$values=[],jQuery(this).parent().find("input").each(function(){$values[jQuery(this).attr("name")]=[jQuery(this).val()]}),0==$values.steps[0]&&($values.steps[0]=1),$data={};for(var f=1;f<=$values.steps[0];f++)$count=5,f==$values.steps[0]&&($count=parseInt($values.laststep[0]),0==$count&&($count=5)),newvals={page:f,action:"rtmedia_rt_album_import",count:$count,values:$values,rtm_wpnonce:jQuery("#bpaimporter_wpnonce").val()},$data[f]=newvals;var h=jQuery.Deferred();h.resolve(),jQuery.each($data,function(a,b){h=h.pipe(function(){return c(b)})})}),jQuery("#bp-media-settings-boxes").on("click",".interested",function(){jQuery(".interested-container").removeClass("hidden"),jQuery(".choice-free").attr("required","required")}),jQuery("#bp-media-settings-boxes").on("click",".not-interested",function(){jQuery(".interested-container").addClass("hidden"),jQuery(".choice-free").removeAttr("required")}),jQuery("#video-transcoding-main-container").on("click",".video-transcoding-survey",function(a){a.preventDefault();var b={action:"rtmedia_convert_videos_form",email:jQuery(".email").val(),url:jQuery(".url").val(),choice:jQuery('input[name="choice"]:checked').val(),interested:jQuery('input[name="interested"]:checked').val()};return jQuery.post(ajaxurl,b,function(a){var b={msg:a,strong:"yes"};jQuery("#video-transcoding-main-container").html(rtMediaAdmin.templates.rtm_p_tag(b))}),!1}),jQuery("#bpmedia-bpalbumimporter").on("click",".deactivate-bp-album",function(a){a.preventDefault(),$bpalbum=jQuery(this);var b={action:"rtmedia_rt_album_deactivate",rtm_wpnonce:jQuery("#bpaimporter_wpnonce").val()};jQuery.get(ajaxurl,b,function(a){if(a)location.reload();else{var b={msg:rtmedia_admin_strings.something_went_wrong};$bpalbum.parent().after(rtMediaAdmin.templates.rtm_p_tag(b))}})}),jQuery(".updated").on("click",".bpm-hide-encoding-notice",function(){var a={src:rtmedia_admin_url+"images/wpspin_light.gif"};jQuery(this).after(rtMediaAdmin.templates.rtm_image(a));var a={action:"rtmedia_hide_encoding_notice"};jQuery.post(ajaxurl,a,function(a){a&&jQuery(".bpm-hide-encoding-notice").closest(".updated").remove()})}),jQuery("#rtmedia-bp-enable-activity").is(":checked")?jQuery(".rtmedia-bp-activity-setting").prop("readonly",!1):jQuery(".rtmedia-bp-activity-setting").prop("readonly",!0),jQuery("#rtmedia-bp-enable-activity").on("click",function(a){jQuery(this).is(":checked")?jQuery(".rtmedia-bp-activity-setting").prop("readonly",!1):jQuery(".rtmedia-bp-activity-setting").prop("readonly",!0)});var i="",j="";void 0!==rtmedia_on_label&&(i='data-on-label="'+rtmedia_on_label+'"'),void 0!==rtmedia_off_label&&(j='data-off-label="'+rtmedia_off_label+'"');var k;jQuery("input[type=file]").on("change",f),jQuery("#rtmedia-submit-request").click(function(){var b=jQuery("#name").val(),c=jQuery("#email").val(),d=jQuery("#website").val(),e=jQuery("#subject").val(),f=jQuery("#details").val(),g=jQuery('input[name="request_type"]').val(),h=jQuery('input[name="request_id"]').val(),i=jQuery('input[name="server_address"]').val(),j=jQuery('input[name="ip_address"]').val(),k=jQuery('input[name="server_type"]').val(),l=jQuery('input[name="user_agent"]').val(),m=jQuery('input[name="debuglog_temp_path"]').val(),n={name:b,email:c,website:d,subject:e,details:f,request_id:h,request_type:"premium_support",server_address:i,ip_address:j,server_type:k,user_agent:l,debuglog_temp_path:m};if("bug_report"==g){var o=jQuery("#wp_admin_username").val();if(""==o)return alert(rtmedia_admin_support_strings.wp_admin_username_error),!1;var p=jQuery("#wp_admin_pwd").val();if(""==p)return alert(rtmedia_admin_support_strings.wp_admin_pwd_error),!1;var q=jQuery("#ssh_ftp_host").val();if(""==q)return alert(rtmedia_admin_support_strings.ssh_ftp_host_error),!1;var r=jQuery("#ssh_ftp_username").val();if(""==r)return alert(rtmedia_admin_support_strings.ssh_ftp_username_error),!1;var s=jQuery("#ssh_ftp_pwd").val();if(""==s)return alert(rtmedia_admin_support_strings.ssh_ftp_pwd_error),!1;n={name:b,email:c,website:d,subject:e,details:f,request_id:h,request_type:"premium_support",server_address:i,ip_address:j,server_type:k,user_agent:l,wp_admin_username:o,wp_admin_pwd:p,ssh_ftp_host:q,ssh_ftp_username:r,ssh_ftp_pwd:s}}for(formdata in n){if(""==n[formdata]&&"debuglog_temp_path"!=formdata)return alert("Please enter "+formdata.replace("_"," ")+" field."),!1;if(""==n[formdata]&&"debuglog_temp_path"==formdata)return alert("Please upload attachment."),!1}return data={action:"rtmedia_submit_request",form_data:n,support_wpnonce:jQuery("#support_wpnonce").val()},jQuery.post(ajaxurl,data,function(b){return b=b.trim(),"false"==b?(alert(rtmedia_admin_support_strings.all_fields_error),!1):(a("#rtmedia_service_contact_container").empty(),void a("#rtmedia_service_contact_container").append(b))}),!1}),jQuery("#cancel-request").click(function(){return!1}),jQuery(".rtm_enable_masonry_view input[type=checkbox]").is(":checked")?jQuery(".rtm_enable_masonry_view").parents(".metabox-holder").find(".rtmedia-info").show():jQuery(".rtm_enable_masonry_view").parents(".metabox-holder").find(".rtmedia-info").hide(),jQuery(".rtm_enable_masonry_view input[type=checkbox]").on("click",function(a){jQuery(this).is(":checked")?jQuery(".rtm_enable_masonry_view").parents(".metabox-holder").find(".rtmedia-info").show():jQuery(".rtm_enable_masonry_view").parents(".metabox-holder").find(".rtmedia-info").hide()}),jQuery("#rtm-masonry-change-thumbnail-info").click(function(a){jQuery("html, body").animate({scrollTop:0},"500","swing")})}),jQuery(window).load(function(){jQuery(".rtmedia-addon-thickbox").trigger("click")});
app/assets/admin/js/settings.js CHANGED
@@ -766,7 +766,6 @@ jQuery( document ).ready( function ( $ ) {
766
  var name = jQuery( '#name' ).val();
767
  var email = jQuery( '#email' ).val();
768
  var website = jQuery( '#website' ).val();
769
- var phone = jQuery( '#phone' ).val();
770
  var subject = jQuery( '#subject' ).val();
771
  var details = jQuery( '#details' ).val();
772
  var request_type = jQuery( 'input[name="request_type"]' ).val();
@@ -780,7 +779,6 @@ jQuery( document ).ready( function ( $ ) {
780
  name: name,
781
  email: email,
782
  website: website,
783
- phone: phone,
784
  subject: subject,
785
  details: details,
786
  request_id: request_id,
@@ -821,7 +819,6 @@ jQuery( document ).ready( function ( $ ) {
821
  name: name,
822
  email: email,
823
  website: website,
824
- phone: phone,
825
  subject: subject,
826
  details: details,
827
  request_id: request_id,
@@ -838,9 +835,12 @@ jQuery( document ).ready( function ( $ ) {
838
  };
839
  }
840
  for ( formdata in form_data ) {
841
- if ( form_data[ formdata ] == "" && formdata != 'phone' ) {
842
  alert( "Please enter " + formdata.replace( "_", " " ) + " field." );
843
  return false;
 
 
 
844
  }
845
  }
846
  data = {
766
  var name = jQuery( '#name' ).val();
767
  var email = jQuery( '#email' ).val();
768
  var website = jQuery( '#website' ).val();
 
769
  var subject = jQuery( '#subject' ).val();
770
  var details = jQuery( '#details' ).val();
771
  var request_type = jQuery( 'input[name="request_type"]' ).val();
779
  name: name,
780
  email: email,
781
  website: website,
 
782
  subject: subject,
783
  details: details,
784
  request_id: request_id,
819
  name: name,
820
  email: email,
821
  website: website,
 
822
  subject: subject,
823
  details: details,
824
  request_id: request_id,
835
  };
836
  }
837
  for ( formdata in form_data ) {
838
+ if ( form_data[ formdata ] == "" && formdata != 'debuglog_temp_path' ) {
839
  alert( "Please enter " + formdata.replace( "_", " " ) + " field." );
840
  return false;
841
+ } else if ( form_data[ formdata ] == "" && formdata == 'debuglog_temp_path' ) {
842
+ alert( "Please upload attachment." );
843
+ return false;
844
  }
845
  }
846
  data = {
app/assets/css/rtmedia.css CHANGED
@@ -93,6 +93,13 @@
93
  width: 100%;
94
  }
95
 
 
 
 
 
 
 
 
96
  #buddypress #whats-new-options {
97
  height: auto !important;
98
  overflow: hidden;
@@ -140,6 +147,12 @@ body.media.buddypress {
140
  text-decoration: none;
141
  }
142
 
 
 
 
 
 
 
143
  .rtmedia-container {
144
  box-sizing: border-box;
145
  }
@@ -168,14 +181,18 @@ body.media.buddypress {
168
  display: inline-block;
169
  }
170
 
171
- #rtmedia-uploader-form .rtm-plupload-list, #rtmedia_uploader_filelist {
 
 
172
  list-style: none;
173
  margin-left: -4px;
174
  margin-right: -4px;
175
  padding-left: 0;
176
  padding-top: 10px;
177
  }
178
- #rtmedia-uploader-form .rtm-plupload-list li, #rtmedia_uploader_filelist li {
 
 
179
  background: #EEEEEE;
180
  float: left;
181
  margin: 4px;
@@ -183,27 +200,45 @@ body.media.buddypress {
183
  padding: 5px;
184
  position: relative;
185
  }
186
- #rtmedia-uploader-form .rtm-plupload-list li.upload-error, #rtmedia_uploader_filelist li.upload-error {
 
 
187
  border: 1px solid red;
188
  }
189
- #rtmedia-uploader-form .rtm-plupload-list img, #rtmedia_uploader_filelist img {
 
 
190
  max-width: 100%;
191
  }
192
- #rtmedia-uploader-form .rtm-plupload-list canvas, #rtmedia_uploader_filelist canvas {
 
 
193
  display: block;
194
  max-width: 100%;
195
  }
196
- #rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-title, #rtmedia_uploader_filelist .rtm-upload-edit-title {
 
 
197
  font-size: 12px;
198
  }
199
- #rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-desc, #rtmedia_uploader_filelist .rtm-upload-edit-desc {
 
 
200
  font-size: 12px;
201
  display: block;
202
  }
203
- #rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-title-wrapper label, #rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-desc-wrapper label, #rtmedia_uploader_filelist .rtm-upload-edit-title-wrapper label, #rtmedia_uploader_filelist .rtm-upload-edit-desc-wrapper label {
 
 
 
 
204
  display: block;
205
  }
206
- #rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-title-wrapper input.rtm-upload-edit-title, #rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-desc-wrapper input.rtm-upload-edit-title, #rtmedia_uploader_filelist .rtm-upload-edit-title-wrapper input.rtm-upload-edit-title, #rtmedia_uploader_filelist .rtm-upload-edit-desc-wrapper input.rtm-upload-edit-title {
 
 
 
 
207
  min-width: 100%;
208
  margin-top: 1px;
209
  }
@@ -217,6 +252,16 @@ body.media.buddypress {
217
  clear: both;
218
  }
219
 
 
 
 
 
 
 
 
 
 
 
220
  button#rtmedia-add-media-button-post-update {
221
  padding: 3px 6px;
222
  }
@@ -1046,6 +1091,10 @@ img.mfp-img {
1046
  overflow-y: auto;
1047
  margin: 5px 0; */
1048
  }
 
 
 
 
1049
  .mfp-content .rtm-single-meta {
1050
  background: #FFFFFF;
1051
  overflow: hidden;
@@ -1286,7 +1335,8 @@ img.mfp-img {
1286
  float: left;
1287
  margin-right: 10px;
1288
  }
1289
- .rtmedia-actions-before-comments .rtmedia-comment-link, #buddypress .rtmedia-actions-before-comments .rtmedia-like {
 
1290
  border: 0;
1291
  font-size: 13px;
1292
  font-weight: normal;
@@ -1294,7 +1344,8 @@ img.mfp-img {
1294
  padding: 0;
1295
  text-transform: none;
1296
  }
1297
- .rtmedia-actions-before-comments .rtmedia-comment-link:hover, #buddypress .rtmedia-actions-before-comments .rtmedia-like:hover {
 
1298
  background: transparent;
1299
  }
1300
 
@@ -1394,12 +1445,12 @@ img.mfp-img {
1394
  }
1395
 
1396
  .rtm-media-single-comments {
1397
- background-color: #edeff4;
1398
  bottom: 20px;
1399
  padding: 10px;
1400
  width: 100%;
1401
  }
1402
  .rtm-media-single-comments textarea {
 
1403
  font-size: 12px;
1404
  line-height: 14px;
1405
  max-height: 40px;
@@ -1530,6 +1581,10 @@ img.mfp-img {
1530
  float: right;
1531
  }
1532
 
 
 
 
 
1533
  .rtmedia-plupload-container {
1534
  position: relative;
1535
  float: left;
@@ -1544,7 +1599,7 @@ img.mfp-img {
1544
  margin-right: 10px;
1545
  }
1546
 
1547
- .rtmedia-list-item.media-type-document, .rtmedia-list-item.media-type-music, .rtmedia-list-item.media-type-video {
1548
  display: inline-block;
1549
  }
1550
 
@@ -1578,6 +1633,14 @@ img.mfp-img {
1578
  text-decoration: underline;
1579
  }
1580
 
 
 
 
 
 
 
 
 
1581
  .rtmedia-album-edit .rtm-checkbox-wrap {
1582
  background: rgba(255, 255, 255, 0.9);
1583
  height: 30px;
93
  width: 100%;
94
  }
95
 
96
+ #buddypress #whats-new-form .rtmedia-uploader-div {
97
+ display: none;
98
+ }
99
+ #buddypress #whats-new-form #whats-new-options .rtmedia-uploader-div {
100
+ display: block;
101
+ }
102
+
103
  #buddypress #whats-new-options {
104
  height: auto !important;
105
  overflow: hidden;
147
  text-decoration: none;
148
  }
149
 
150
+ #buddypress ul.activity-list li.activity-item .activity-comments .rtmedia-uploader-div {
151
+ color: #767676;
152
+ margin-left: 50px;
153
+ padding-left: 15px;
154
+ }
155
+
156
  .rtmedia-container {
157
  box-sizing: border-box;
158
  }
181
  display: inline-block;
182
  }
183
 
184
+ #rtmedia-uploader-form .rtm-plupload-list,
185
+ form .rtmedia-container .rtm-plupload-list,
186
+ #rtmedia_uploader_filelist {
187
  list-style: none;
188
  margin-left: -4px;
189
  margin-right: -4px;
190
  padding-left: 0;
191
  padding-top: 10px;
192
  }
193
+ #rtmedia-uploader-form .rtm-plupload-list li,
194
+ form .rtmedia-container .rtm-plupload-list li,
195
+ #rtmedia_uploader_filelist li {
196
  background: #EEEEEE;
197
  float: left;
198
  margin: 4px;
200
  padding: 5px;
201
  position: relative;
202
  }
203
+ #rtmedia-uploader-form .rtm-plupload-list li.upload-error,
204
+ form .rtmedia-container .rtm-plupload-list li.upload-error,
205
+ #rtmedia_uploader_filelist li.upload-error {
206
  border: 1px solid red;
207
  }
208
+ #rtmedia-uploader-form .rtm-plupload-list img,
209
+ form .rtmedia-container .rtm-plupload-list img,
210
+ #rtmedia_uploader_filelist img {
211
  max-width: 100%;
212
  }
213
+ #rtmedia-uploader-form .rtm-plupload-list canvas,
214
+ form .rtmedia-container .rtm-plupload-list canvas,
215
+ #rtmedia_uploader_filelist canvas {
216
  display: block;
217
  max-width: 100%;
218
  }
219
+ #rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-title,
220
+ form .rtmedia-container .rtm-plupload-list .rtm-upload-edit-title,
221
+ #rtmedia_uploader_filelist .rtm-upload-edit-title {
222
  font-size: 12px;
223
  }
224
+ #rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-desc,
225
+ form .rtmedia-container .rtm-plupload-list .rtm-upload-edit-desc,
226
+ #rtmedia_uploader_filelist .rtm-upload-edit-desc {
227
  font-size: 12px;
228
  display: block;
229
  }
230
+ #rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-title-wrapper label, #rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-desc-wrapper label,
231
+ form .rtmedia-container .rtm-plupload-list .rtm-upload-edit-title-wrapper label,
232
+ form .rtmedia-container .rtm-plupload-list .rtm-upload-edit-desc-wrapper label,
233
+ #rtmedia_uploader_filelist .rtm-upload-edit-title-wrapper label,
234
+ #rtmedia_uploader_filelist .rtm-upload-edit-desc-wrapper label {
235
  display: block;
236
  }
237
+ #rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-title-wrapper input.rtm-upload-edit-title, #rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-desc-wrapper input.rtm-upload-edit-title,
238
+ form .rtmedia-container .rtm-plupload-list .rtm-upload-edit-title-wrapper input.rtm-upload-edit-title,
239
+ form .rtmedia-container .rtm-plupload-list .rtm-upload-edit-desc-wrapper input.rtm-upload-edit-title,
240
+ #rtmedia_uploader_filelist .rtm-upload-edit-title-wrapper input.rtm-upload-edit-title,
241
+ #rtmedia_uploader_filelist .rtm-upload-edit-desc-wrapper input.rtm-upload-edit-title {
242
  min-width: 100%;
243
  margin-top: 1px;
244
  }
252
  clear: both;
253
  }
254
 
255
+ .rtm-upload-button-wrapper button.rtmedia-comment-media-upload,
256
+ button.rtmedia-comment-media-upload {
257
+ padding: 3px 6px;
258
+ }
259
+ .rtm-upload-button-wrapper button.rtmedia-comment-media-upload .dashicons,
260
+ button.rtmedia-comment-media-upload .dashicons {
261
+ font-size: 18px;
262
+ line-height: 20px;
263
+ }
264
+
265
  button#rtmedia-add-media-button-post-update {
266
  padding: 3px 6px;
267
  }
1091
  overflow-y: auto;
1092
  margin: 5px 0; */
1093
  }
1094
+ .mfp-content .rtm-lightbox-container .rtmedia-comment-media-list .mejs-container.mejs-video {
1095
+ min-height: 200px;
1096
+ min-width: 200px;
1097
+ }
1098
  .mfp-content .rtm-single-meta {
1099
  background: #FFFFFF;
1100
  overflow: hidden;
1335
  float: left;
1336
  margin-right: 10px;
1337
  }
1338
+ .rtmedia-actions-before-comments .rtmedia-comment-link,
1339
+ .rtmedia-actions-before-comments .rtmedia-view-conversation, #buddypress .rtmedia-actions-before-comments .rtmedia-like {
1340
  border: 0;
1341
  font-size: 13px;
1342
  font-weight: normal;
1344
  padding: 0;
1345
  text-transform: none;
1346
  }
1347
+ .rtmedia-actions-before-comments .rtmedia-comment-link:hover,
1348
+ .rtmedia-actions-before-comments .rtmedia-view-conversation:hover, #buddypress .rtmedia-actions-before-comments .rtmedia-like:hover {
1349
  background: transparent;
1350
  }
1351
 
1445
  }
1446
 
1447
  .rtm-media-single-comments {
 
1448
  bottom: 20px;
1449
  padding: 10px;
1450
  width: 100%;
1451
  }
1452
  .rtm-media-single-comments textarea {
1453
+ background-color: #edeff4;
1454
  font-size: 12px;
1455
  line-height: 14px;
1456
  max-height: 40px;
1581
  float: right;
1582
  }
1583
 
1584
+ form.rt_media_comment_form .rtmedia-plupload-container {
1585
+ overflow: hidden;
1586
+ }
1587
+
1588
  .rtmedia-plupload-container {
1589
  position: relative;
1590
  float: left;
1599
  margin-right: 10px;
1600
  }
1601
 
1602
+ .rtmedia-list-item.media-type-photo, .rtmedia-list-item.media-type-document, .rtmedia-list-item.media-type-music, .rtmedia-list-item.media-type-video {
1603
  display: inline-block;
1604
  }
1605
 
1633
  text-decoration: underline;
1634
  }
1635
 
1636
+ a.rtmedia-comment-link {
1637
+ display: none;
1638
+ }
1639
+
1640
+ a.rtmedia-comment-link.rtmedia-comments-link {
1641
+ display: initial;
1642
+ }
1643
+
1644
  .rtmedia-album-edit .rtm-checkbox-wrap {
1645
  background: rgba(255, 255, 255, 0.9);
1646
  height: 30px;
app/assets/css/rtmedia.min.css CHANGED
@@ -1 +1 @@
1
- .alignleft{float:left}.alignright{float:right}.aligncenter{display:block;margin-left:auto;margin-right:auto;text-align:center}.clear-both{clear:both}.clear-none{clear:none}.clear-left{clear:left}.clear-right{clear:right}.rtm-inline-block{display:inline-block}.rtm-text-left{text-align:left}.rtm-text-right{text-align:right}.rtm-text-center{text-align:center}.rtm-border-0{border:0 !important}.hide{display:none}.rtmedia-success,.rtmedia-warning{margin:10px 0;padding:8px 14px 8px 14px;text-shadow:0 1px 0 rgba(255,255,255,0.5);border-bottom:1px solid #e7e7e7;cursor:pointer}.rtmedia-success{background-color:#dff0d8;color:#468847}.rtmedia-warning{background-color:#F0D8DD;color:#884646}.clearfix:after{content:"";display:table;clear:both}#buddypress form#whats-new-form textarea{box-sizing:border-box;min-height:70px;width:100%}#buddypress #whats-new-options{height:auto !important;overflow:hidden}#buddypress form#whats-new-form p.activity-greeting{line-height:1}#buddypress form#whats-new-form #whats-new-options select{border:1px solid #ccc;font-size:13px;margin-top:0;padding:3px 2px}#whats-new-submit #aw-whats-new-submit{font-size:12px;line-height:18px;padding:4px 6px}#whats-new-post-in-box{float:left;font-size:13px}#buddypress form#whats-new-form #whats-new-submit{margin-top:0}#whats-new-textarea{margin-bottom:10px}body.media.buddypress{overflow-y:auto}#buddypress input[type=submit]:focus{background:#ededed;border:1px solid #bbb;color:#555;outline:0;text-decoration:none}.rtmedia-container{box-sizing:border-box}.rtmedia-container *,.rtmedia-container *:before,.rtmedia-container *:after{box-sizing:inherit}.rtmedia-list.rtmedia-list{list-style:none;margin:0;padding:0}.rtmedia-list-item>a{border:0;display:inline-block;text-decoration:none}.rtmedia-list-item>a:focus{outline:0}.rtmedia-list-item>a+p{display:none}.rtmedia-list-item>a .rtmedia-item-thumbnail img{display:inline-block}#rtmedia-uploader-form .rtm-plupload-list,#rtmedia_uploader_filelist{list-style:none;margin-left:-4px;margin-right:-4px;padding-left:0;padding-top:10px}#rtmedia-uploader-form .rtm-plupload-list li,#rtmedia_uploader_filelist li{background:#eee;float:left;margin:4px;max-width:110px;padding:5px;position:relative}#rtmedia-uploader-form .rtm-plupload-list li.upload-error,#rtmedia_uploader_filelist li.upload-error{border:1px solid red}#rtmedia-uploader-form .rtm-plupload-list img,#rtmedia_uploader_filelist img{max-width:100%}#rtmedia-uploader-form .rtm-plupload-list canvas,#rtmedia_uploader_filelist canvas{display:block;max-width:100%}#rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-title,#rtmedia_uploader_filelist .rtm-upload-edit-title{font-size:12px}#rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-desc,#rtmedia_uploader_filelist .rtm-upload-edit-desc{font-size:12px;display:block}#rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-title-wrapper label,#rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-desc-wrapper label,#rtmedia_uploader_filelist .rtm-upload-edit-title-wrapper label,#rtmedia_uploader_filelist .rtm-upload-edit-desc-wrapper label{display:block}#rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-title-wrapper input.rtm-upload-edit-title,#rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-desc-wrapper input.rtm-upload-edit-title,#rtmedia_uploader_filelist .rtm-upload-edit-title-wrapper input.rtm-upload-edit-title,#rtmedia_uploader_filelist .rtm-upload-edit-desc-wrapper input.rtm-upload-edit-title{min-width:100%;margin-top:1px}.rtm-plupload-list:empty{display:none}.rtmedia-uploader-div,.rtmedia-uploader{clear:both}button#rtmedia-add-media-button-post-update{padding:3px 6px}button#rtmedia-add-media-button-post-update .dashicons{font-size:18px;line-height:20px}.plupload_file_name{font-size:11px;font-weight:bold;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.plupload_file_size{color:#666;font-size:10px}.plupload_file_action{background:#eee;position:absolute;height:18px;right:4px;top:0;width:18px;z-index:10}.plupload_file_action .dashicons{color:#DD3D36;cursor:pointer;font-size:16px;height:18px;padding:2px 1px;width:18px}.plupload_file_status{height:18px;overflow:hidden;position:relative}.plupload_file_progress{background:#7AD03A;height:4px;position:absolute;top:0}.rtm-form .rtm-field-wrap{margin-bottom:20px}.rtmedia_next_prev{padding:0 10px}.rtm-page-number{float:left}.rtm-page-number .rtm-label{line-height:30px}.rtm-page-number .rtm-label,.rtm-page-number .rtm-go-to-num,.rtm-page-number .rtmedia-page-link{float:left}.rtm-pagination{background:transparent;border:none;color:#888;font-size:small;margin:0;position:relative;display:block;float:left;width:100%;padding:10px 0}.rtm-pagination .rtm-paginate{float:right;font-size:15px}.rtm-pagination .rtm-paginate a,.rtm-pagination .rtm-paginate span{display:inline-block;line-height:1;margin:0 2px;padding:8px;text-decoration:none}.rtm-pagination .rtm-paginate a.rtmedia-page-link{padding:8px}.rtm-pagination .dashicons{font-size:14px;height:auto;line-height:1.2;margin:0;padding:0;width:auto}#rtmedia_go_to_num{font-size:16px;margin:0 5px;padding:4px 5px;width:80px}.rtmedia-upload-not-allowed{background-color:#fcf8e3;border-bottom:1px solid #EEE;color:#c09853;margin-bottom:20px;padding:10px 15px}.plupload_file_name{position:relative}.plupload_file_name .dashicons{background:#eee;color:#DD3D36;cursor:pointer;font-size:14px;height:auto;padding:0 2px 0 5px;position:absolute;right:0;top:0;width:auto}.plupload_file_name .dashicons-yes{color:#7AD03A}.rtmedia-gallery-item-actions{background-color:rgba(0,0,0,0.6);opacity:0;position:absolute;text-align:center;-webkit-transition:all ease-in-out 0.4s;transition:all ease-in-out 0.4s;width:100%;z-index:9}.rtmedia-gallery-item-actions a{border:0;box-shadow:0 0 0;color:#fff;display:inline-block;font-size:12px;outline:none;padding:4px;text-align:left;text-decoration:none;text-transform:uppercase}.rtmedia-gallery-item-actions .dashicons{font-size:17px;margin-right:2px;position:relative;top:1px}.rtmedia-gallery-item-actions .dashicons-trash{font-size:15px}.rtm-pro-allow-action .rtmedia-list-item:hover .rtmedia-gallery-item-actions{opacity:1}.rtm-pro-allow-action .rtmedia-list-item:hover .rtmedia-bulk-edit-item-wrap+.rtmedia-gallery-item-actions{opacity:0}.rtmedia-footer-link{clear:both;overflow:hidden;padding:16px 0;position:relative;text-align:center}.rtmedia-text-link-decoration,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-edit a,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-edit span,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-delete a,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-delete span,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-title a,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-title span{text-decoration:none}.rtmedia-text-link-decoration:hover,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-edit a:hover,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-edit span:hover,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-delete a:hover,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-delete span:hover,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-title a:hover,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-title span:hover{text-decoration:underline}.rtmedia-container .rtmedia-edit-list-media-table{max-height:300px;overflow-y:auto}.rtmedia-container .rtmedia-edit-list-media-table thead tr{background-color:#50A1D7}.rtmedia-container .rtmedia-edit-list-media-table thead th{text-align:center;color:#FFF}.rtmedia-container .rtmedia-edit-list-media-table tbody tr:nth-child(odd){background:#FFF}.rtmedia-container .rtmedia-edit-list-media-table tbody tr:nth-child(even){background:#DCDCDC}table.rtmedia-edit-media-list tr{line-height:30px}table.rtmedia-edit-media-list tr th{color:#333;padding:4px 10px;line-height:20px}table.rtmedia-edit-media-list tr .rtm-edit-media-list-heading{width:44%}table.rtmedia-edit-media-list tr .rtm-edit-media-list-title-heading{width:56%}table.rtmedia-edit-media-list tr td.rtm-edit-media-list-edit,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-delete,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-title{padding:4px;font-size:14px;line-height:24px}table.rtmedia-edit-media-list tr td.rtm-edit-media-list-title a{text-decoration:none;color:#333}table.rtmedia-edit-media-list tr td.rtm-edit-media-list-edit{text-align:center}table.rtmedia-edit-media-list tr td.rtm-edit-media-list-edit a{color:#333;font-size:13px}table.rtmedia-edit-media-list tr td.rtm-edit-media-list-delete{text-align:center}table.rtmedia-edit-media-list tr td.rtm-edit-media-list-delete span{color:#FF0000;cursor:pointer;font-size:13px}.rtm-hide{display:none}.rtmedia-list-item .rtmedia-album-media-count{position:absolute;top:0;right:0;background-color:black;color:white;padding:0 5px}.rtm-tabs.rtm-tabs{border-bottom:1px solid #eee;list-style:none;margin:0 0 20px;padding:0}.rtm-tabs li{border:1px solid #eee;border-bottom:0;float:left;margin:0 5px;padding:0}.rtm-tabs a{border:0;display:block;padding:5px 15px;text-decoration:none}.rtm-tabs a:focus{background:transparent;box-shadow:0 0 0}.rtm-tabs .active{position:relative}.rtm-tabs .active:after{background:#fff;bottom:-1px;content:' ';height:1px;left:0;position:absolute;width:100%}.rtm-tabs .dashicons{font-size:16px;height:auto;line-height:20px;margin-right:8px;width:auto}.rtmedia-edit-media-tabs .rtm-tabs a{border-bottom:0 none}.mfp-bg{top:0;left:0;width:100%;height:100%;z-index:104211;overflow:hidden;position:fixed;background:rgba(0,0,0,0.9)}.mfp-wrap{top:0;left:0;width:100%;height:100%;z-index:104311;position:fixed;outline:none !important;-webkit-backface-visibility:hidden}.mfp-container{text-align:center;position:absolute;width:100%;max-width:84%;margin:0 auto;right:0;height:100%;left:0;top:0;padding:0 8px;box-sizing:border-box}.mfp-container:before{content:' ';display:inline-block;height:100%;vertical-align:middle}.mfp-align-top .mfp-container:before{display:none}.mfp-content{position:relative;display:inline-block;vertical-align:middle;margin:0 auto;text-align:left;z-index:1045}.mfp-inline-holder .mfp-content,.mfp-ajax-holder .mfp-content{width:100%;cursor:auto}.mfp-ajax-cur{cursor:progress}.mfp-zoom-out-cur,.mfp-zoom-out-cur .mfp-image-holder .mfp-close{cursor:zoom-out}.mfp-zoom{cursor:pointer;cursor:zoom-in}.mfp-auto-cursor .mfp-content{cursor:auto}.mfp-close,.mfp-arrow,.mfp-preloader,.mfp-counter{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mfp-loading.mfp-figure{display:none}.mfp-hide{display:none !important}.mfp-s-ready .mfp-preloader{display:none}.mfp-s-error .mfp-content{display:none}button.mfp-close,button.mfp-arrow{overflow:visible;cursor:pointer;background:transparent;border:0;-webkit-appearance:none;display:block;outline:none;padding:0;z-index:1046;box-shadow:none}button::-moz-focus-inner{padding:0;border:0}.mfp-close{background:#fff;color:#999;cursor:pointer;font-size:24px;font-style:normal;height:30px;line-height:30px;padding:0;position:absolute;right:1px;text-align:center;text-decoration:none;text-indent:2px;top:0;width:32px;z-index:12}.mfp-close:hover,.mfp-close:focus{opacity:1;filter:alpha(opacity=100)}.mfp-close:active{top:1px}.mfp-image-holder .mfp-close,.mfp-iframe-holder .mfp-close{color:#FFF;right:-6px;text-align:right;padding-right:6px;width:100%}.mfp-counter{position:absolute;top:0;right:0;color:#CCC;font-size:12px;line-height:18px;white-space:nowrap}.mfp-arrow{cursor:pointer;position:absolute;opacity:0.65;filter:alpha(opacity=65);margin:0;top:50%;margin-top:-55px;padding:0;width:90px;height:110px;-webkit-tap-highlight-color:transparent;opacity:0;z-index:10;-webkit-transition:all 300ms ease-out;transition:all 300ms ease-out}.rtm-single-media:hover .mfp-arrow{opacity:1}@media (max-device-width: 640px){.mfp-arrow{display:none}.rtm-single-media:hover .mfp-arrow{display:none}}.mfp-arrow:active{margin-top:-54px}.mfp-arrow:hover,.mfp-arrow:focus{opacity:1;filter:alpha(opacity=100)}.mfp-arrow:before,.mfp-arrow:after,.mfp-arrow .mfp-b,.mfp-arrow .mfp-a{content:'';display:block;width:0;height:0;position:absolute;left:0;top:0;margin-top:35px;margin-left:35px;border:medium inset transparent}.mfp-arrow:after,.mfp-arrow .mfp-a{border-top-width:13px;border-bottom-width:13px;top:8px}.mfp-arrow:before,.mfp-arrow .mfp-b{border-top-width:21px;border-bottom-width:21px;opacity:0.7}.mfp-arrow-left{left:0}.mfp-arrow-left:after,.mfp-arrow-left .mfp-a{border-right:17px solid #FFF;margin-left:31px}.mfp-arrow-left:before,.mfp-arrow-left .mfp-b{margin-left:25px;border-right:27px solid #3F3F3F}.mfp-arrow-right{right:0}.mfp-arrow-right:after,.mfp-arrow-right .mfp-a{border-left:17px solid #FFF;margin-left:39px}.mfp-arrow-right:before,.mfp-arrow-right .mfp-b{border-left:27px solid #3F3F3F}.mfp-iframe-holder{padding-top:40px;padding-bottom:40px}.mfp-iframe-holder .mfp-content{line-height:0;width:100%;max-width:900px}.mfp-iframe-holder .mfp-close{top:-40px}.mfp-iframe-scaler{width:100%;height:0;overflow:hidden;padding-top:56.25%}.mfp-iframe-scaler iframe{position:absolute;display:block;top:0;left:0;width:100%;height:100%;box-shadow:0 0 8px rgba(0,0,0,0.6);background:#000}img.mfp-img{width:auto;max-width:100%;height:auto;display:block;line-height:0;box-sizing:border-box;padding:40px 0 40px;margin:0 auto}.mfp-figure{line-height:0}.mfp-figure:after{content:'';position:absolute;left:0;top:40px;bottom:40px;display:block;right:0;width:auto;height:auto;z-index:-1;box-shadow:0 0 8px rgba(0,0,0,0.6);background:#444}.mfp-figure small{color:#BDBDBD;display:block;font-size:12px;line-height:14px}.mfp-figure figure{margin:0}.mfp-bottom-bar{margin-top:-36px;position:absolute;top:100%;left:0;width:100%;cursor:auto}.mfp-title{text-align:left;line-height:18px;color:#F3F3F3;word-wrap:break-word;padding-right:36px}.mfp-image-holder .mfp-content{max-width:100%}.mfp-gallery .mfp-image-holder .mfp-figure{cursor:pointer}.mfp-preloader{position:absolute;top:50%;left:0;right:0;margin-top:-36px;z-index:1044;font-size:0;width:36px;height:36px;margin-left:auto;margin-right:auto}.mfp-preloader:before{content:'Loading…';position:absolute;width:30px;height:30px}.mfp-preloader:not(:required):before{content:'';border-radius:50%;border:3px solid rgba(255,255,255,0.27);border-top-color:rgba(255,255,255,0.9);animation:spinner .6s linear infinite;-webkit-animation:spinner .6s linear infinite}@keyframes spinner{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes spinner{to{-webkit-transform:rotate(360deg)}}@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px){.mfp-img-mobile .mfp-image-holder{padding-left:0;padding-right:0}.mfp-img-mobile img.mfp-img{padding:0}.mfp-img-mobile .mfp-figure:after{top:0;bottom:0}.mfp-img-mobile .mfp-figure small{display:inline;margin-left:5px}.mfp-img-mobile .mfp-bottom-bar{background:rgba(0,0,0,0.6);bottom:0;margin:0;top:auto;padding:3px 5px;position:fixed;box-sizing:border-box}.mfp-img-mobile .mfp-bottom-bar:empty{padding:0}.mfp-img-mobile .mfp-counter{right:5px;top:3px}.mfp-img-mobile .mfp-close{top:0;right:0;width:35px;height:35px;line-height:35px;background:rgba(0,0,0,0.6);position:fixed;text-align:center;padding:0}}@media all and (max-width: 900px){.mfp-arrow{-webkit-transform:scale(0.75);-ms-transform:scale(0.75);transform:scale(0.75)}.mfp-arrow-left{-webkit-transform-origin:0;-ms-transform-origin:0;transform-origin:0}.mfp-arrow-right{-webkit-transform-origin:100%;-ms-transform-origin:100%;transform-origin:100%}.mfp-container{padding-left:6px;padding-right:6px}}#atwho-container #atwho-ground-comment_content .atwho-view{z-index:2147483647}.mfp-content .rtm-lightbox-container{background:#000;margin:0 auto;position:relative}.mfp-content .rtm-single-meta{background:#fff;overflow:hidden;padding:20px 20px 110px;position:relative;vertical-align:top}.rtm-single-media{overflow:hidden;position:relative;text-align:center;vertical-align:middle}.rtm-single-media .mejs-container{margin:0 auto;max-width:inherit}.rtm-single-media .rtmedia-message-container{position:absolute;top:45%;left:0;right:0;margin-left:auto;margin-right:auto}@media (max-device-width: 640px){.rtm-single-media .rtmedia-message-container{top:25%}}.rtm-ltb-action-container{background-color:rgba(0,0,0,0.6);bottom:0;color:#fff;line-height:38px;opacity:0;padding:0 10px;position:absolute;width:100%;-webkit-transition:all 300ms ease-out;transition:all 300ms ease-out}.rtm-single-media:hover .rtm-ltb-action-container{opacity:1}@media (max-device-width: 640px){.rtm-ltb-action-container{clear:both;position:relative;opacity:1}.rtm-single-media:hover .rtm-ltb-action-container{opacity:1}}#buddypress #rtmedia-single-media-container.rtmedia-single-media .button{background:transparent;border:0 none;border-radius:2px;color:rgba(255,255,255,0.5);display:block;font-family:inherit;font-weight:normal;line-height:24px;margin:0;padding:0 6px;text-shadow:0 0 0;text-transform:none}#buddypress #rtmedia-single-media-container.rtmedia-single-media .button:hover{background:rgba(255,255,255,0.2);color:rgba(255,255,255,0.8)}#buddypress #rtmedia-single-media-container.rtmedia-single-media .rtm-options .button{color:#333;margin:0 auto;padding:0 4px 0 0}#buddypress #rtm-media-options-list .rtm-options form button{font-size:small}#buddypress #rtm-media-options-list .rtm-options .button{background:transparent;border:0 none;border-radius:2px;color:rgba(255,255,255,0.5);float:left;font-family:inherit;font-weight:normal;line-height:24px;padding:0 6px;text-shadow:0 0 0;text-transform:none}#buddypress #rtm-media-options-list .rtm-options .rtmedia-delete-favlist{color:#fff;padding:0}.rtm-options.rtm-options{background:#666;color:#fff;display:none;font-size:14px;list-style:none;margin:0;padding:8px 10px;position:absolute;left:0;top:38px;width:190px;z-index:10}.rtm-options li{margin:0;overflow:hidden;padding:2px 0}.rtm-media-options .rtm-options:after{bottom:100%;left:20px;border:solid transparent;content:' ';height:0;width:0;position:absolute;pointer-events:none;border-color:rgba(255,255,255,0);border-bottom-color:#666;border-width:6px;margin-left:-6px}.mfp-content .rtm-options{background:#fff;color:#333;bottom:38px;right:0;left:auto;top:auto}.mfp-content .rtm-options:after{top:100%;right:22px;border:solid transparent;content:' ';height:0;width:0;position:absolute;pointer-events:none;border-color:rgba(255,255,255,0);border-top-color:#fff;border-width:6px;margin-left:-6px}.rtm-options .dashicons{font-size:14px;line-height:24px;margin-right:2px}.rtm-media-options .rtm-options a{border:0;color:#fff;display:block;text-decoration:none}.rtm-ltb-title{color:rgba(255,255,255,0.7);float:left;font-size:13px}.rtm-ltb-title a{color:inherit}.rtm-ltb-title a:hover{border-bottom:1px dotted;color:#fff}.rtm-item-actions{float:right}.rtm-item-actions>div,.rtm-item-actions>form{float:left;margin:0 2px;padding:7px 0;position:relative}.rtmedia-media img{display:inline-block;max-height:inherit;height:auto;max-width:100%;width:auto}@media only screen and (max-device-width: 1024px){.rtmedia-media{margin:40px 0}}.rtm-user-meta-details .username{font-size:16px;line-height:1;margin-bottom:6px}.userprofile{float:left;margin:0 16px 16px 0;max-width:54px}.userprofile a{display:block}.userprofile img{height:auto;max-width:100%}.rtm-time-privacy{color:#999;font-size:12px}.rtm-time-privacy .dashicons{font-size:14px;line-height:1.5;margin-top:-2px}.rtmedia-actions-before-comments>span{float:left;margin-right:10px}.rtmedia-actions-before-comments .rtmedia-comment-link,#buddypress .rtmedia-actions-before-comments .rtmedia-like{border:0;font-size:13px;font-weight:normal;line-height:2;padding:0;text-transform:none}.rtmedia-actions-before-comments .rtmedia-comment-link:hover,#buddypress .rtmedia-actions-before-comments .rtmedia-like:hover{background:transparent}.rtmedia-comment-user-pic{float:left;margin-right:10px;max-width:36px}.rtmedia-comment-user-pic img{height:auto;max-width:100%}.rtm-like-comments-info{position:relative}.rtm-like-comments-info:after{bottom:100%;left:15px;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-color:rgba(237,239,244,0);border-bottom-color:#edeff4;border-width:4px;margin-left:-4px}.rtm-comment-list.rtm-comment-list{list-style:none;margin:0;padding:0}.rtm-comment-list li{background:#edeff4;font-size:12px;margin-bottom:1px;padding:10px;position:relative}.rtm-comment-list li:hover .rtmedia-delete-comment{opacity:1}.rtm-comment-list .rtmedia-no-comments{margin:0;padding:5px 10px}.rtmedia-like-info{background:#edeff4;font-size:12px;margin-bottom:1px;padding:5px 10px;position:relative}.rtm-comment-wrap{overflow:hidden}.rtm-comment-wrap .rtmedia-comment-author{font-weight:700}.rtm-comment-wrap .rtmedia-comment-date{color:#999;font-size:11px}.rtmedia-comment-content{margin-top:2px}.rtmedia-delete-comment{color:#999;cursor:pointer;font-size:16px;opacity:0;position:absolute;right:5px;top:5px}.rtmedia-comment-content p{margin:0}.rtmedia-comment-details{line-height:1.5;margin-top:-3px}.rtmedia-item-comments textarea{font-size:14px;padding:4px}.rtm-media-single-comments{background-color:#edeff4;bottom:20px;padding:10px;width:100%}.rtm-media-single-comments textarea{font-size:12px;line-height:14px;max-height:40px;min-height:30px;padding:4px}.rtmedia-popup{background:#fff;margin:20px auto;max-width:600px;padding:20px;position:relative;width:auto}.rtmedia-popup .rtm-modal-title{font-size:24px;margin-bottom:20px;margin-top:0}.rtmedia-popup label{display:block;margin-bottom:5px}#rtm-modal-container p{margin-bottom:10px}#rtm-mejs-video-container{margin:0 auto}.rtmedia-media-name{float:left;max-width:140px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.rtm-single-media.rtm-media-type-video{padding-bottom:40px;padding-top:40px}.rtmedia-gallery-alert-container{position:fixed;top:0;left:0;height:100%;width:100%;background-color:rgba(0,0,0,0.6);z-index:999997}.rtmedia-gallery-message-box{position:fixed;top:40%;left:50%;margin-left:auto;margin-right:auto;z-index:999999}.rtmedia-gallery-message-box span{position:relative;left:-50%}.rtmedia-activity-container{box-sizing:border-box}.rtmedia-activity-container *,.rtmedia-activity-container *:before,.rtmedia-activity-container *:after{box-sizing:inherit}#buddypress ul.rtmedia-list li{border-bottom:0;padding-bottom:0}.rtmedia-activity-container .rtmedia-item-actions{display:none}.rtmedia-activity-container .rtmedia-item-title,.rtmedia-activity-container .rtmedia-item-title a{border:0;color:#666;font-size:13px;margin:5px 0 0;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}#rtmedia-whts-new-upload-container div{left:0 !important;position:absolute;top:0 !important}#aw-whats-new-submit,.rtmedia-add-media-button{display:block}.rtm-drag-drop-active{border:4px dashed green !important;display:block;height:100%;opacity:0.5;z-index:9999}#rtm-drop-files-title{background:rgba(0,0,0,0.2);display:none;font-size:14px;height:100%;padding:20px;position:absolute;top:0;width:100%}#rtSelectPrivacy{float:right}.rtmedia-plupload-container{position:relative;float:left}.rtm-upload-button-wrapper{float:left;margin-right:5px}#rtmedia-action-update{margin-right:10px}.rtmedia-list-item.media-type-document,.rtmedia-list-item.media-type-music,.rtmedia-list-item.media-type-video{display:inline-block}.media-type-music .mejs-container{margin-bottom:10px}.previous-pagination{float:left;margin-top:10px}.next-pagination{float:right;margin-top:10px}@media screen and (max-width: 500px){#activity-stream li .media-type-video{width:100%}#activity-stream li .media-type-video .mejs-video{max-width:100%;min-width:100%}}#rtmedia_show_all_comment{cursor:pointer}#rtmedia_show_all_comment:hover{text-decoration:underline}.rtmedia-album-edit .rtm-checkbox-wrap{background:rgba(255,255,255,0.9);height:30px;line-height:1;padding:10px;position:absolute;z-index:10}.rtmedia-album-edit .rtmedia-item-selector{position:relative;top:-7px}.rtmedia-album-edit .rtmedia-move-container{display:none}.rtm-single-actions.rtm-item-actions{float:none}.media-item .describe{border-collapse:collapse;width:100%;border-top-style:solid;border-top-width:1px;clear:both;cursor:default}.media-item.media-blank .describe{border:0}.media-item .describe th{vertical-align:top;text-align:left;padding:5px 10px 10px;width:140px}.media-item .describe .align th{padding-top:0}.media-item .media-item-info tr{background-color:transparent}.media-item .describe td{padding:0 8px 8px 0;vertical-align:top}.media-item thead.media-item-info td{padding:4px 10px 0}.media-item .media-item-info .A1B1{padding:0 0 0 10px}.media-item td.savesend{padding-bottom:15px}.media-item .thumbnail{max-height:128px;max-width:128px}#wpbody-content #async-upload-wrap a{display:none}.media-upload-form{margin-top:20px}.media-upload-form td label{margin-right:6px;margin-left:2px}.media-upload-form .align .field label{display:inline;padding:0 0 0 23px;margin:0 1em 0 3px;font-weight:bold}.media-upload-form tr.image-size label{margin:0 0 0 5px;font-weight:bold}.media-upload-form th.label label{font-weight:bold;margin:0.5em;font-size:13px}.media-upload-form th.label label span{padding:0 5px}abbr.required{border:medium none;text-decoration:none}.media-item .describe input[type="text"],.media-item .describe textarea{width:460px}.media-item .describe p.help{margin:0;padding:0 0 0 5px}.media-item .edit-attachment,.describe-toggle-on,.describe-toggle-off{display:block;line-height:36px;float:right;margin-right:15px}.media-item .describe-toggle-off,.media-item.open .describe-toggle-on{display:none}.media-item.open .describe-toggle-off{display:block}#media-items .media-item{border-style:solid;border-width:1px;min-height:36px;position:relative;margin-top:-1px;width:100%}#media-items{width:623px}.media-new-php #media-items{margin:1em 0}#media-items:empty{border:0 none}.media-item .filename{line-height:36px;overflow:hidden;padding:0 10px}.media-item .error-div{padding-left:10px}.media-item .pinkynail{float:left;margin:2px 2px 0;max-width:40px;max-height:32px}.media-item .startopen,.media-item .startclosed{display:none}.media-item .original{position:relative;height:34px}.media-item .progress{float:right;height:22px;margin:6px 10px 0 0;width:200px;line-height:2em;padding:0;overflow:hidden;margin-bottom:2px;border:1px solid #d1d1d1;background:#f7f7f7;background-image:-webkit-gradient(linear, left bottom, left top, from(#fff), to(#f7f7f7));background-image:-webkit-linear-gradient(bottom, #fff, #f7f7f7);background-image:linear-gradient(to top, #fff, #f7f7f7);border-radius:3px;box-shadow:inset 0 0 3px rgba(0,0,0,0.1)}.media-item .bar{z-index:9;width:0;height:100%;margin-top:-24px;background-color:#8cc1e9;background-image:-webkit-gradient(linear, left bottom, left top, from(#72a7cf), to(#8cc1e9));background-image:-webkit-linear-gradient(bottom, #72a7cf, #8cc1e9);background-image:linear-gradient(to top, #72a7cf, #8cc1e9);border-radius:3px;box-shadow:0 0 3px rgba(0,0,0,0.3)}.media-item .progress .percent{z-index:10;position:relative;width:200px;padding:0 8px;text-shadow:0 1px 0 rgba(255,255,255,0.4);color:rgba(0,0,0,0.6)}.upload-php .fixed .column-parent{width:15%}.js .html-uploader #plupload-upload-ui{display:none}.js .html-uploader #html-upload-ui{display:block}.media-upload-form .media-item.error{margin:0;padding:0}.media-upload-form .media-item.error p,.media-item .error-div{line-height:16px;margin:5px 10px;padding:0}.media-item .error-div a.dismiss{display:block;float:right;margin:5px 4px 0 15px}.find-box{width:600px;height:300px;overflow:hidden;padding:33px 0 51px;position:absolute;z-index:1000}.find-box-head{cursor:move;font-weight:bold;height:2em;line-height:2em;padding:1px 12px;position:absolute;top:5px;width:100%}.find-box-inside{overflow:auto;padding:6px;height:100%}.find-box-search{overflow:hidden;padding:9px;position:relative}.find-box-search .spinner{float:none;left:125px;position:absolute;top:9px}#find-posts-input{float:left;width:140px;height:24px}#find-posts-search{float:left;margin:1px 4px 0 3px}#find-posts-response{margin:8px 0;padding:0 1px 6px}#find-posts-response table{width:100%}#find-posts-response .found-radio{padding:3px 0 0 8px;width:15px}.find-box-buttons{padding:8px;overflow:hidden}.find-box #resize-se{position:absolute;right:1px;bottom:1px}.ui-find-overlay{position:absolute;top:0;left:0;background-color:#000;opacity:0.6;filter:alpha(opacity=60)}ul#dismissed-updates{display:none}form.upgrade{margin-top:8px}form.upgrade .hint{font-style:italic;font-size:85%;margin:-0.5em 0 2em 0}#poststuff .inside .the-tagcloud{margin:5px 0 10px;padding:8px;border-width:1px;border-style:solid;line-height:1.8em;word-spacing:3px;border-radius:6px}.drag-drop #drag-drop-area{border:4px dashed #DDDDDD;height:200px}.drag-drop .drag-drop-inside{margin:70px auto 0;width:250px}.drag-drop-inside p{color:#aaa;font-size:14px;margin:5px 0;display:none}.drag-drop .drag-drop-inside p{text-align:center}.drag-drop-inside p.drag-drop-info{font-size:20px}.drag-drop .drag-drop-inside p,.drag-drop-inside p.drag-drop-buttons{display:block}.drag-drop.drag-over #drag-drop-area{border-color:#83b4d8}#plupload-upload-ui{position:relative}.describe .image-editor{vertical-align:top}.imgedit-wrap{position:relative}.imgedit-settings p{margin:8px 0}.post-php .imgedit-wrap table{width:100%}.describe .imgedit-wrap table td,.wp_attachment_holder .imgedit-wrap table td{vertical-align:top;padding-top:0}.describe .imgedit-wrap table td.imgedit-settings{padding:0 5px}.wp_attachment_holder .imgedit-wrap table td.imgedit-settings{width:250px}td.imgedit-settings input{margin-top:0;vertical-align:middle}.imgedit-wait{position:absolute;top:0;background:#fff url(../../../../../../wp-admin/images/wpspin_light.gif) no-repeat scroll 22px 10px;background-size:16px 16px;opacity:0.7;filter:alpha(opacity=70);width:100%;height:500px;display:none}.spinner{background:url(../../../../../../wp-admin/images/wpspin_light.gif) no-repeat;background-size:16px 16px;display:none;float:right;opacity:0.7;filter:alpha(opacity=70);width:16px;height:16px;margin:5px 5px 0}.no-float{float:none}.media-disabled,.imgedit-settings .disabled{color:grey}.wp_attachment_image,.A1B1{overflow:hidden}.wp_attachment_image .button,.A1B1 .button{float:left}.no-js .wp_attachment_image .button{display:none}.wp_attachment_image .spinner,.A1B1 .spinner{float:left;padding:0 4px 4px;vertical-align:bottom}.imgedit-menu{margin:0 0 12px;min-width:300px}.imgedit-menu div{float:left;width:32px;height:32px}.imgedit-crop-wrap{position:relative}.imgedit-crop{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -9px -31px;margin:0 8px 0 0}.imgedit-crop.disabled:hover{background-position:-9px -31px}.imgedit-crop:hover{background-position:-9px -1px}.imgedit-rleft{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -46px -31px;margin:0 3px}.imgedit-rleft.disabled:hover{background-position:-46px -31px}.imgedit-rleft:hover{background-position:-46px -1px}.imgedit-rright{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -77px -31px;margin:0 8px 0 3px}.imgedit-rright.disabled:hover{background-position:-77px -31px}.imgedit-rright:hover{background-position:-77px -1px}.imgedit-flipv{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -115px -31px;margin:0 3px}.imgedit-flipv.disabled:hover{background-position:-115px -31px}.imgedit-flipv:hover{background-position:-115px -1px}.imgedit-fliph{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -147px -31px;margin:0 8px 0 3px}.imgedit-fliph.disabled:hover{background-position:-147px -31px}.imgedit-fliph:hover{background-position:-147px -1px}.imgedit-undo{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -184px -31px;margin:0 3px}.imgedit-undo.disabled:hover{background-position:-184px -31px}.imgedit-undo:hover{background-position:-184px -1px}.imgedit-redo{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -215px -31px;margin:0 8px 0 3px}.imgedit-redo.disabled:hover{background-position:-215px -31px}.imgedit-redo:hover{background-position:-215px -1px}.imgedit-applyto img{margin:0 8px 0 0}.imgedit-group h3{font-size:18px}.imgedit-group .dashicons{border:0;line-height:1.2}.imgedit-group-top{margin:5px 0}.imgedit-applyto .imgedit-label{padding:2px 0 0;display:block}.imgedit-help{display:none;font-style:italic;margin-bottom:8px}a.imgedit-help-toggle{text-decoration:none}.form-table td.imgedit-response{padding:0}.imgedit-submit{margin:8px 0}.imgedit-submit-btn{margin-left:20px}.imgedit-wrap .nowrap{white-space:nowrap}span.imgedit-scale-warn{color:red;font-size:20px;font-style:normal;visibility:hidden;vertical-align:middle}.wp_attachment_details{margin-bottom:20px}.imgedit-menu div{border-color:#d5d5d5;background-color:#f1f1f1}.imgedit-menu div:hover{border-color:#c1c1c1;background-color:#eaeaea}.imgedit-menu div.disabled{border-color:#ccc;background-color:#ddd;filter:alpha(opacity=50);opacity:0.5}.bp-media-image-editor-cotnainer{margin-top:35px}.wp_attachment_image .bp-media-image-edit{float:left}.wp_attachment_image .spinner{display:none}.bp-media-image-editor-cotnainer .hidden{display:none}.bp-media-image-editor-cotnainer div.updated{margin:5px 0 15px;background-color:#ffffe0;border-color:#e6db55;padding:0 .6em;border-radius:3px;border-width:1px;border-style:solid}.bp-media-image-editor-cotnainer div.updated p{margin:.5em 0;padding:2px}body article.bp_members.bp_member .entry-content,body div.bp_members.bp_member .entry-content{width:100%}.rtm-media-gallery-uploader{display:none}.rtmedia-uploader .drag-drop{border:4px dashed #DDD;text-align:center;background:#fafafa;overflow:hidden;color:#AAAAAA;margin-top:20px;padding:25px 0}.rtmedia-uploader .drag-drop.dragover{border-color:#83b4d8}.rtmedia-uploader .drag-drop .drag-drop-info{font-size:20px;line-height:24px}.rtmedia-uploader .drag-drop .rtm-select-files span{vertical-align:middle}.rtmedia-uploader .drag-drop .rtm-seperator{margin:0px 20px}.rtmedia-uploader .drag-drop .start-media-upload{display:none;margin-top:20px}.rtmedia-uploader .drag-drop .rtm-file-size-limit{vertical-align:middle;font-size:16px;line-height:24px}.rtm-uploader-main-wrapper .rtm-uploader-tabs{margin-bottom:10px;text-align:left}.rtm-uploader-main-wrapper ul{border-bottom:1px solid #CCC}.rtm-uploader-main-wrapper li{margin:0 0 -1px 10px;display:inline-block;padding:5px 10px;line-height:25px;background-color:#e4e4e4;border:1px solid #CCC}.rtm-uploader-main-wrapper li.active{background:transparent;border-left:1px solid #CCC;border-top:1px solid #CCC;border-right:1px solid #CCC;border-bottom:1px solid #fafafa}.rtm-uploader-main-wrapper li:hover{cursor:pointer}.rtmedia-container .rtmedia-list{margin:10px -5px}.rtmedia-container .rtmedia-list .rtmedia-list-item{float:left;margin:5px;position:relative}.rtmedia-container .rtmedia-list .rtmedia-list-item>a{display:block}.rtmedia-container .rtmedia-list .rtmedia_time{background-color:#000;color:#fff;display:inline-block;font-size:11px;font-weight:bold;line-height:14px;opacity:0.75;padding:0 4px;position:absolute;right:2px;top:2px}.rtmedia-container .rtmedia-list img{vertical-align:top}.rtmedia-container .rtmedia-list .rtmedia-item-title h4{color:#666;font-size:12px;font-weight:normal;margin:5px 0 0;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.rtm-load-more{background:#eee;text-align:center}.rtmedia-container .rtm-load-more a{border:0;padding:10px 0}.rtm-load-more .rtm-media-loading{padding:10px 0}.rtm-media-options{line-height:1.4;margin-bottom:10px}.rtm-media-options>div{display:inline-block;cursor:pointer}.rtm-media-options .rtm-media-options-list{margin-right:5px;padding-right:10px;position:relative}.rtm-media-options>*{border-right:1px solid #999}.rtm-media-options>*:last-child{border-right:none}.rtm-media-options .dashicons{font-size:inherit;line-height:1.4}.rtmedia-upload-media-link{cursor:pointer}a.rtmedia-upload-media-link{border:none}.rtm-album-privacy span{font-size:16px;display:inline-block;margin:0 20px 20px 20px;vertical-align:top}.rtm-album-privacy label{margin-right:8px}.rtm-album-privacy .dashicons{font-size:16px;line-height:1.6;margin-right:5px}#rtm-media-options-list .rtmedia-delete-album{background:transparent;border:0;color:#fff;font-family:inherit;font-size:inherit;font-weight:inherit;padding:0;text-transform:inherit}#rtm-media-options-list .rtmedia-delete-album:hover{background:transparent;border:0;color:#fff}.rtmedia-single-container button.rtmedia-like{background-color:transparent;color:inherit}#buddypress .mejs-controls button{padding:4px 8px;border:none;background:transparent url("../../../lib/media-element/controls.png") no-repeat}#buddypress .mejs-controls .mejs-play button{background-position:0 0}#buddypress .mejs-controls .mejs-pause button{background-position:0 -16px}#buddypress .mejs-controls .mejs-unmute button{background-position:-16px 0}#buddypress .mejs-controls .mejs-mute button{background-position:-16px -16px}#buddypress .mejs-controls .mejs-fullscreen-button button{background-position:-32px 0}#buddypress .mejs-controls .mejs-unfullscreen button{background-position:-32px -16px}.mejs-container .mejs-controls .mejs-time{padding:10px 3px 0;content:''}.rtmedia-activity-container .mejs-playpause-button.mejs-play button:before,.rtmedia-activity-container .mejs-playpause-button.mejs-pause button:before,.rtmedia-activity-container .mejs-volume-button.mejs-mute button:before,.rtmedia-activity-container .mejs-fullscreen-button button:before,.rtmedia-media .mejs-playpause-button.mejs-play button:before,.rtmedia-media .mejs-playpause-button.mejs-pause button:before,.rtmedia-media .mejs-volume-button.mejs-mute button:before,.rtmedia-media .mejs-fullscreen-button button:before{content:''}@media only screen and (min-width: 1025px){.mfp-content .rtm-lightbox-container{display:table;table-layout:fixed;width:100%}.mfp-content .rtm-mfp-close{background:transparent}.mfp-content .rtm-single-media{display:table-cell;width:66.6667%}.mfp-content .rtm-single-meta{display:table-cell;width:33.3333%;padding:20px;height:473px}.mfp-content .rtm-single-meta .rtmedia-scroll{height:100%;overflow-X:hidden}}.rtl #rtSelectPrivacy{float:left}.rtl .rtmedia-plupload-container{float:right}.rtl .rtm-upload-button-wrapper{float:right}.rtl #whats-new-post-in-box{float:right}.rtl .describe-toggle-off{float:left}.rtl .media-item .pinkynail{float:right}.rtl .media-item .progress{float:left}.rtl .media-item .error-div a.dismiss{float:left}.rtl #find-posts-input{float:right}.rtl #find-posts-search{float:right}.rtl .spinner{float:left}.rtl .wp_attachment_image .button,.rtl .A1B1 .button{float:right}.rtl .wp_attachment_image .spinner,.rtl .A1B1 .spinner{float:right}.rtl .imgedit-menu div{float:right}.rtl .wp_attachment_image .bp-media-image-edit{float:right}.rtl .rtmedia-container .rtmedia-list .rtmedia-list-item{float:right}.rtl #buddypress #rtm-media-options-list .rtm-options .button{float:right}.rtl .rtm-ltb-title{float:right}.rtl .rtm-item-actions{float:left}.rtl .rtm-item-actions>div,.rtl .rtm-item-actions>form{float:right}.rtl .userprofile{float:right}.rtl .rtmedia-actions-before-comments>span{float:right}.rtl .rtmedia-comment-user-pic{float:right}.rtl .rtmedia-media-name{float:right}.rtl #rtmedia-uploader-form .rtm-plupload-list li,.rtl #rtmedia_uploader_filelist li{float:right}.rtl .rtm-page-number{float:right}.rtl .rtm-page-number .rtmedia-page-link{float:right}.rtl .rtm-pagination{float:right}.rtl .rtm-pagination .rtm-paginate{float:left}.rtl .rtm-tabs li{float:right}.rtl .alignleft{float:right}.rtl .alignright{float:left}
1
+ .alignleft{float:left}.alignright{float:right}.aligncenter{display:block;margin-left:auto;margin-right:auto;text-align:center}.clear-both{clear:both}.clear-none{clear:none}.clear-left{clear:left}.clear-right{clear:right}.rtm-inline-block{display:inline-block}.rtm-text-left{text-align:left}.rtm-text-right{text-align:right}.rtm-text-center{text-align:center}.rtm-border-0{border:0 !important}.hide{display:none}.rtmedia-success,.rtmedia-warning{margin:10px 0;padding:8px 14px 8px 14px;text-shadow:0 1px 0 rgba(255,255,255,0.5);border-bottom:1px solid #e7e7e7;cursor:pointer}.rtmedia-success{background-color:#dff0d8;color:#468847}.rtmedia-warning{background-color:#F0D8DD;color:#884646}.clearfix:after{content:"";display:table;clear:both}#buddypress form#whats-new-form textarea{box-sizing:border-box;min-height:70px;width:100%}#buddypress #whats-new-form .rtmedia-uploader-div{display:none}#buddypress #whats-new-form #whats-new-options .rtmedia-uploader-div{display:block}#buddypress #whats-new-options{height:auto !important;overflow:hidden}#buddypress form#whats-new-form p.activity-greeting{line-height:1}#buddypress form#whats-new-form #whats-new-options select{border:1px solid #ccc;font-size:13px;margin-top:0;padding:3px 2px}#whats-new-submit #aw-whats-new-submit{font-size:12px;line-height:18px;padding:4px 6px}#whats-new-post-in-box{float:left;font-size:13px}#buddypress form#whats-new-form #whats-new-submit{margin-top:0}#whats-new-textarea{margin-bottom:10px}body.media.buddypress{overflow-y:auto}#buddypress input[type=submit]:focus{background:#ededed;border:1px solid #bbb;color:#555;outline:0;text-decoration:none}#buddypress ul.activity-list li.activity-item .activity-comments .rtmedia-uploader-div{color:#767676;margin-left:50px;padding-left:15px}.rtmedia-container{box-sizing:border-box}.rtmedia-container *,.rtmedia-container *:before,.rtmedia-container *:after{box-sizing:inherit}.rtmedia-list.rtmedia-list{list-style:none;margin:0;padding:0}.rtmedia-list-item>a{border:0;display:inline-block;text-decoration:none}.rtmedia-list-item>a:focus{outline:0}.rtmedia-list-item>a+p{display:none}.rtmedia-list-item>a .rtmedia-item-thumbnail img{display:inline-block}#rtmedia-uploader-form .rtm-plupload-list,form .rtmedia-container .rtm-plupload-list,#rtmedia_uploader_filelist{list-style:none;margin-left:-4px;margin-right:-4px;padding-left:0;padding-top:10px}#rtmedia-uploader-form .rtm-plupload-list li,form .rtmedia-container .rtm-plupload-list li,#rtmedia_uploader_filelist li{background:#eee;float:left;margin:4px;max-width:110px;padding:5px;position:relative}#rtmedia-uploader-form .rtm-plupload-list li.upload-error,form .rtmedia-container .rtm-plupload-list li.upload-error,#rtmedia_uploader_filelist li.upload-error{border:1px solid red}#rtmedia-uploader-form .rtm-plupload-list img,form .rtmedia-container .rtm-plupload-list img,#rtmedia_uploader_filelist img{max-width:100%}#rtmedia-uploader-form .rtm-plupload-list canvas,form .rtmedia-container .rtm-plupload-list canvas,#rtmedia_uploader_filelist canvas{display:block;max-width:100%}#rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-title,form .rtmedia-container .rtm-plupload-list .rtm-upload-edit-title,#rtmedia_uploader_filelist .rtm-upload-edit-title{font-size:12px}#rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-desc,form .rtmedia-container .rtm-plupload-list .rtm-upload-edit-desc,#rtmedia_uploader_filelist .rtm-upload-edit-desc{font-size:12px;display:block}#rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-title-wrapper label,#rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-desc-wrapper label,form .rtmedia-container .rtm-plupload-list .rtm-upload-edit-title-wrapper label,form .rtmedia-container .rtm-plupload-list .rtm-upload-edit-desc-wrapper label,#rtmedia_uploader_filelist .rtm-upload-edit-title-wrapper label,#rtmedia_uploader_filelist .rtm-upload-edit-desc-wrapper label{display:block}#rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-title-wrapper input.rtm-upload-edit-title,#rtmedia-uploader-form .rtm-plupload-list .rtm-upload-edit-desc-wrapper input.rtm-upload-edit-title,form .rtmedia-container .rtm-plupload-list .rtm-upload-edit-title-wrapper input.rtm-upload-edit-title,form .rtmedia-container .rtm-plupload-list .rtm-upload-edit-desc-wrapper input.rtm-upload-edit-title,#rtmedia_uploader_filelist .rtm-upload-edit-title-wrapper input.rtm-upload-edit-title,#rtmedia_uploader_filelist .rtm-upload-edit-desc-wrapper input.rtm-upload-edit-title{min-width:100%;margin-top:1px}.rtm-plupload-list:empty{display:none}.rtmedia-uploader-div,.rtmedia-uploader{clear:both}.rtm-upload-button-wrapper button.rtmedia-comment-media-upload,button.rtmedia-comment-media-upload{padding:3px 6px}.rtm-upload-button-wrapper button.rtmedia-comment-media-upload .dashicons,button.rtmedia-comment-media-upload .dashicons{font-size:18px;line-height:20px}button#rtmedia-add-media-button-post-update{padding:3px 6px}button#rtmedia-add-media-button-post-update .dashicons{font-size:18px;line-height:20px}.plupload_file_name{font-size:11px;font-weight:bold;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.plupload_file_size{color:#666;font-size:10px}.plupload_file_action{background:#eee;position:absolute;height:18px;right:4px;top:0;width:18px;z-index:10}.plupload_file_action .dashicons{color:#DD3D36;cursor:pointer;font-size:16px;height:18px;padding:2px 1px;width:18px}.plupload_file_status{height:18px;overflow:hidden;position:relative}.plupload_file_progress{background:#7AD03A;height:4px;position:absolute;top:0}.rtm-form .rtm-field-wrap{margin-bottom:20px}.rtmedia_next_prev{padding:0 10px}.rtm-page-number{float:left}.rtm-page-number .rtm-label{line-height:30px}.rtm-page-number .rtm-label,.rtm-page-number .rtm-go-to-num,.rtm-page-number .rtmedia-page-link{float:left}.rtm-pagination{background:transparent;border:none;color:#888;font-size:small;margin:0;position:relative;display:block;float:left;width:100%;padding:10px 0}.rtm-pagination .rtm-paginate{float:right;font-size:15px}.rtm-pagination .rtm-paginate a,.rtm-pagination .rtm-paginate span{display:inline-block;line-height:1;margin:0 2px;padding:8px;text-decoration:none}.rtm-pagination .rtm-paginate a.rtmedia-page-link{padding:8px}.rtm-pagination .dashicons{font-size:14px;height:auto;line-height:1.2;margin:0;padding:0;width:auto}#rtmedia_go_to_num{font-size:16px;margin:0 5px;padding:4px 5px;width:80px}.rtmedia-upload-not-allowed{background-color:#fcf8e3;border-bottom:1px solid #EEE;color:#c09853;margin-bottom:20px;padding:10px 15px}.plupload_file_name{position:relative}.plupload_file_name .dashicons{background:#eee;color:#DD3D36;cursor:pointer;font-size:14px;height:auto;padding:0 2px 0 5px;position:absolute;right:0;top:0;width:auto}.plupload_file_name .dashicons-yes{color:#7AD03A}.rtmedia-gallery-item-actions{background-color:rgba(0,0,0,0.6);opacity:0;position:absolute;text-align:center;-webkit-transition:all ease-in-out 0.4s;transition:all ease-in-out 0.4s;width:100%;z-index:9}.rtmedia-gallery-item-actions a{border:0;box-shadow:0 0 0;color:#fff;display:inline-block;font-size:12px;outline:none;padding:4px;text-align:left;text-decoration:none;text-transform:uppercase}.rtmedia-gallery-item-actions .dashicons{font-size:17px;margin-right:2px;position:relative;top:1px}.rtmedia-gallery-item-actions .dashicons-trash{font-size:15px}.rtm-pro-allow-action .rtmedia-list-item:hover .rtmedia-gallery-item-actions{opacity:1}.rtm-pro-allow-action .rtmedia-list-item:hover .rtmedia-bulk-edit-item-wrap+.rtmedia-gallery-item-actions{opacity:0}.rtmedia-footer-link{clear:both;overflow:hidden;padding:16px 0;position:relative;text-align:center}.rtmedia-text-link-decoration,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-edit a,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-edit span,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-delete a,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-delete span,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-title a,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-title span{text-decoration:none}.rtmedia-text-link-decoration:hover,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-edit a:hover,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-edit span:hover,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-delete a:hover,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-delete span:hover,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-title a:hover,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-title span:hover{text-decoration:underline}.rtmedia-container .rtmedia-edit-list-media-table{max-height:300px;overflow-y:auto}.rtmedia-container .rtmedia-edit-list-media-table thead tr{background-color:#50A1D7}.rtmedia-container .rtmedia-edit-list-media-table thead th{text-align:center;color:#FFF}.rtmedia-container .rtmedia-edit-list-media-table tbody tr:nth-child(odd){background:#FFF}.rtmedia-container .rtmedia-edit-list-media-table tbody tr:nth-child(even){background:#DCDCDC}table.rtmedia-edit-media-list tr{line-height:30px}table.rtmedia-edit-media-list tr th{color:#333;padding:4px 10px;line-height:20px}table.rtmedia-edit-media-list tr .rtm-edit-media-list-heading{width:44%}table.rtmedia-edit-media-list tr .rtm-edit-media-list-title-heading{width:56%}table.rtmedia-edit-media-list tr td.rtm-edit-media-list-edit,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-delete,table.rtmedia-edit-media-list tr td.rtm-edit-media-list-title{padding:4px;font-size:14px;line-height:24px}table.rtmedia-edit-media-list tr td.rtm-edit-media-list-title a{text-decoration:none;color:#333}table.rtmedia-edit-media-list tr td.rtm-edit-media-list-edit{text-align:center}table.rtmedia-edit-media-list tr td.rtm-edit-media-list-edit a{color:#333;font-size:13px}table.rtmedia-edit-media-list tr td.rtm-edit-media-list-delete{text-align:center}table.rtmedia-edit-media-list tr td.rtm-edit-media-list-delete span{color:#FF0000;cursor:pointer;font-size:13px}.rtm-hide{display:none}.rtmedia-list-item .rtmedia-album-media-count{position:absolute;top:0;right:0;background-color:black;color:white;padding:0 5px}.rtm-tabs.rtm-tabs{border-bottom:1px solid #eee;list-style:none;margin:0 0 20px;padding:0}.rtm-tabs li{border:1px solid #eee;border-bottom:0;float:left;margin:0 5px;padding:0}.rtm-tabs a{border:0;display:block;padding:5px 15px;text-decoration:none}.rtm-tabs a:focus{background:transparent;box-shadow:0 0 0}.rtm-tabs .active{position:relative}.rtm-tabs .active:after{background:#fff;bottom:-1px;content:' ';height:1px;left:0;position:absolute;width:100%}.rtm-tabs .dashicons{font-size:16px;height:auto;line-height:20px;margin-right:8px;width:auto}.rtmedia-edit-media-tabs .rtm-tabs a{border-bottom:0 none}.mfp-bg{top:0;left:0;width:100%;height:100%;z-index:104211;overflow:hidden;position:fixed;background:rgba(0,0,0,0.9)}.mfp-wrap{top:0;left:0;width:100%;height:100%;z-index:104311;position:fixed;outline:none !important;-webkit-backface-visibility:hidden}.mfp-container{text-align:center;position:absolute;width:100%;max-width:84%;margin:0 auto;right:0;height:100%;left:0;top:0;padding:0 8px;box-sizing:border-box}.mfp-container:before{content:' ';display:inline-block;height:100%;vertical-align:middle}.mfp-align-top .mfp-container:before{display:none}.mfp-content{position:relative;display:inline-block;vertical-align:middle;margin:0 auto;text-align:left;z-index:1045}.mfp-inline-holder .mfp-content,.mfp-ajax-holder .mfp-content{width:100%;cursor:auto}.mfp-ajax-cur{cursor:progress}.mfp-zoom-out-cur,.mfp-zoom-out-cur .mfp-image-holder .mfp-close{cursor:zoom-out}.mfp-zoom{cursor:pointer;cursor:zoom-in}.mfp-auto-cursor .mfp-content{cursor:auto}.mfp-close,.mfp-arrow,.mfp-preloader,.mfp-counter{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mfp-loading.mfp-figure{display:none}.mfp-hide{display:none !important}.mfp-s-ready .mfp-preloader{display:none}.mfp-s-error .mfp-content{display:none}button.mfp-close,button.mfp-arrow{overflow:visible;cursor:pointer;background:transparent;border:0;-webkit-appearance:none;display:block;outline:none;padding:0;z-index:1046;box-shadow:none}button::-moz-focus-inner{padding:0;border:0}.mfp-close{background:#fff;color:#999;cursor:pointer;font-size:24px;font-style:normal;height:30px;line-height:30px;padding:0;position:absolute;right:1px;text-align:center;text-decoration:none;text-indent:2px;top:0;width:32px;z-index:12}.mfp-close:hover,.mfp-close:focus{opacity:1;filter:alpha(opacity=100)}.mfp-close:active{top:1px}.mfp-image-holder .mfp-close,.mfp-iframe-holder .mfp-close{color:#FFF;right:-6px;text-align:right;padding-right:6px;width:100%}.mfp-counter{position:absolute;top:0;right:0;color:#CCC;font-size:12px;line-height:18px;white-space:nowrap}.mfp-arrow{cursor:pointer;position:absolute;opacity:0.65;filter:alpha(opacity=65);margin:0;top:50%;margin-top:-55px;padding:0;width:90px;height:110px;-webkit-tap-highlight-color:transparent;opacity:0;z-index:10;-webkit-transition:all 300ms ease-out;transition:all 300ms ease-out}.rtm-single-media:hover .mfp-arrow{opacity:1}@media (max-device-width: 640px){.mfp-arrow{display:none}.rtm-single-media:hover .mfp-arrow{display:none}}.mfp-arrow:active{margin-top:-54px}.mfp-arrow:hover,.mfp-arrow:focus{opacity:1;filter:alpha(opacity=100)}.mfp-arrow:before,.mfp-arrow:after,.mfp-arrow .mfp-b,.mfp-arrow .mfp-a{content:'';display:block;width:0;height:0;position:absolute;left:0;top:0;margin-top:35px;margin-left:35px;border:medium inset transparent}.mfp-arrow:after,.mfp-arrow .mfp-a{border-top-width:13px;border-bottom-width:13px;top:8px}.mfp-arrow:before,.mfp-arrow .mfp-b{border-top-width:21px;border-bottom-width:21px;opacity:0.7}.mfp-arrow-left{left:0}.mfp-arrow-left:after,.mfp-arrow-left .mfp-a{border-right:17px solid #FFF;margin-left:31px}.mfp-arrow-left:before,.mfp-arrow-left .mfp-b{margin-left:25px;border-right:27px solid #3F3F3F}.mfp-arrow-right{right:0}.mfp-arrow-right:after,.mfp-arrow-right .mfp-a{border-left:17px solid #FFF;margin-left:39px}.mfp-arrow-right:before,.mfp-arrow-right .mfp-b{border-left:27px solid #3F3F3F}.mfp-iframe-holder{padding-top:40px;padding-bottom:40px}.mfp-iframe-holder .mfp-content{line-height:0;width:100%;max-width:900px}.mfp-iframe-holder .mfp-close{top:-40px}.mfp-iframe-scaler{width:100%;height:0;overflow:hidden;padding-top:56.25%}.mfp-iframe-scaler iframe{position:absolute;display:block;top:0;left:0;width:100%;height:100%;box-shadow:0 0 8px rgba(0,0,0,0.6);background:#000}img.mfp-img{width:auto;max-width:100%;height:auto;display:block;line-height:0;box-sizing:border-box;padding:40px 0 40px;margin:0 auto}.mfp-figure{line-height:0}.mfp-figure:after{content:'';position:absolute;left:0;top:40px;bottom:40px;display:block;right:0;width:auto;height:auto;z-index:-1;box-shadow:0 0 8px rgba(0,0,0,0.6);background:#444}.mfp-figure small{color:#BDBDBD;display:block;font-size:12px;line-height:14px}.mfp-figure figure{margin:0}.mfp-bottom-bar{margin-top:-36px;position:absolute;top:100%;left:0;width:100%;cursor:auto}.mfp-title{text-align:left;line-height:18px;color:#F3F3F3;word-wrap:break-word;padding-right:36px}.mfp-image-holder .mfp-content{max-width:100%}.mfp-gallery .mfp-image-holder .mfp-figure{cursor:pointer}.mfp-preloader{position:absolute;top:50%;left:0;right:0;margin-top:-36px;z-index:1044;font-size:0;width:36px;height:36px;margin-left:auto;margin-right:auto}.mfp-preloader:before{content:'Loading…';position:absolute;width:30px;height:30px}.mfp-preloader:not(:required):before{content:'';border-radius:50%;border:3px solid rgba(255,255,255,0.27);border-top-color:rgba(255,255,255,0.9);animation:spinner .6s linear infinite;-webkit-animation:spinner .6s linear infinite}@keyframes spinner{to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes spinner{to{-webkit-transform:rotate(360deg)}}@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px){.mfp-img-mobile .mfp-image-holder{padding-left:0;padding-right:0}.mfp-img-mobile img.mfp-img{padding:0}.mfp-img-mobile .mfp-figure:after{top:0;bottom:0}.mfp-img-mobile .mfp-figure small{display:inline;margin-left:5px}.mfp-img-mobile .mfp-bottom-bar{background:rgba(0,0,0,0.6);bottom:0;margin:0;top:auto;padding:3px 5px;position:fixed;box-sizing:border-box}.mfp-img-mobile .mfp-bottom-bar:empty{padding:0}.mfp-img-mobile .mfp-counter{right:5px;top:3px}.mfp-img-mobile .mfp-close{top:0;right:0;width:35px;height:35px;line-height:35px;background:rgba(0,0,0,0.6);position:fixed;text-align:center;padding:0}}@media all and (max-width: 900px){.mfp-arrow{-webkit-transform:scale(0.75);-ms-transform:scale(0.75);transform:scale(0.75)}.mfp-arrow-left{-webkit-transform-origin:0;-ms-transform-origin:0;transform-origin:0}.mfp-arrow-right{-webkit-transform-origin:100%;-ms-transform-origin:100%;transform-origin:100%}.mfp-container{padding-left:6px;padding-right:6px}}#atwho-container #atwho-ground-comment_content .atwho-view{z-index:2147483647}.mfp-content .rtm-lightbox-container{background:#000;margin:0 auto;position:relative}.mfp-content .rtm-lightbox-container .rtmedia-comment-media-list .mejs-container.mejs-video{min-height:200px;min-width:200px}.mfp-content .rtm-single-meta{background:#fff;overflow:hidden;padding:20px 20px 110px;position:relative;vertical-align:top}.rtm-single-media{overflow:hidden;position:relative;text-align:center;vertical-align:middle}.rtm-single-media .mejs-container{margin:0 auto;max-width:inherit}.rtm-single-media .rtmedia-message-container{position:absolute;top:45%;left:0;right:0;margin-left:auto;margin-right:auto}@media (max-device-width: 640px){.rtm-single-media .rtmedia-message-container{top:25%}}.rtm-ltb-action-container{background-color:rgba(0,0,0,0.6);bottom:0;color:#fff;line-height:38px;opacity:0;padding:0 10px;position:absolute;width:100%;-webkit-transition:all 300ms ease-out;transition:all 300ms ease-out}.rtm-single-media:hover .rtm-ltb-action-container{opacity:1}@media (max-device-width: 640px){.rtm-ltb-action-container{clear:both;position:relative;opacity:1}.rtm-single-media:hover .rtm-ltb-action-container{opacity:1}}#buddypress #rtmedia-single-media-container.rtmedia-single-media .button{background:transparent;border:0 none;border-radius:2px;color:rgba(255,255,255,0.5);display:block;font-family:inherit;font-weight:normal;line-height:24px;margin:0;padding:0 6px;text-shadow:0 0 0;text-transform:none}#buddypress #rtmedia-single-media-container.rtmedia-single-media .button:hover{background:rgba(255,255,255,0.2);color:rgba(255,255,255,0.8)}#buddypress #rtmedia-single-media-container.rtmedia-single-media .rtm-options .button{color:#333;margin:0 auto;padding:0 4px 0 0}#buddypress #rtm-media-options-list .rtm-options form button{font-size:small}#buddypress #rtm-media-options-list .rtm-options .button{background:transparent;border:0 none;border-radius:2px;color:rgba(255,255,255,0.5);float:left;font-family:inherit;font-weight:normal;line-height:24px;padding:0 6px;text-shadow:0 0 0;text-transform:none}#buddypress #rtm-media-options-list .rtm-options .rtmedia-delete-favlist{color:#fff;padding:0}.rtm-options.rtm-options{background:#666;color:#fff;display:none;font-size:14px;list-style:none;margin:0;padding:8px 10px;position:absolute;left:0;top:38px;width:190px;z-index:10}.rtm-options li{margin:0;overflow:hidden;padding:2px 0}.rtm-media-options .rtm-options:after{bottom:100%;left:20px;border:solid transparent;content:' ';height:0;width:0;position:absolute;pointer-events:none;border-color:rgba(255,255,255,0);border-bottom-color:#666;border-width:6px;margin-left:-6px}.mfp-content .rtm-options{background:#fff;color:#333;bottom:38px;right:0;left:auto;top:auto}.mfp-content .rtm-options:after{top:100%;right:22px;border:solid transparent;content:' ';height:0;width:0;position:absolute;pointer-events:none;border-color:rgba(255,255,255,0);border-top-color:#fff;border-width:6px;margin-left:-6px}.rtm-options .dashicons{font-size:14px;line-height:24px;margin-right:2px}.rtm-media-options .rtm-options a{border:0;color:#fff;display:block;text-decoration:none}.rtm-ltb-title{color:rgba(255,255,255,0.7);float:left;font-size:13px}.rtm-ltb-title a{color:inherit}.rtm-ltb-title a:hover{border-bottom:1px dotted;color:#fff}.rtm-item-actions{float:right}.rtm-item-actions>div,.rtm-item-actions>form{float:left;margin:0 2px;padding:7px 0;position:relative}.rtmedia-media img{display:inline-block;max-height:inherit;height:auto;max-width:100%;width:auto}@media only screen and (max-device-width: 1024px){.rtmedia-media{margin:40px 0}}.rtm-user-meta-details .username{font-size:16px;line-height:1;margin-bottom:6px}.userprofile{float:left;margin:0 16px 16px 0;max-width:54px}.userprofile a{display:block}.userprofile img{height:auto;max-width:100%}.rtm-time-privacy{color:#999;font-size:12px}.rtm-time-privacy .dashicons{font-size:14px;line-height:1.5;margin-top:-2px}.rtmedia-actions-before-comments>span{float:left;margin-right:10px}.rtmedia-actions-before-comments .rtmedia-comment-link,.rtmedia-actions-before-comments .rtmedia-view-conversation,#buddypress .rtmedia-actions-before-comments .rtmedia-like{border:0;font-size:13px;font-weight:normal;line-height:2;padding:0;text-transform:none}.rtmedia-actions-before-comments .rtmedia-comment-link:hover,.rtmedia-actions-before-comments .rtmedia-view-conversation:hover,#buddypress .rtmedia-actions-before-comments .rtmedia-like:hover{background:transparent}.rtmedia-comment-user-pic{float:left;margin-right:10px;max-width:36px}.rtmedia-comment-user-pic img{height:auto;max-width:100%}.rtm-like-comments-info{position:relative}.rtm-like-comments-info:after{bottom:100%;left:15px;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none;border-color:rgba(237,239,244,0);border-bottom-color:#edeff4;border-width:4px;margin-left:-4px}.rtm-comment-list.rtm-comment-list{list-style:none;margin:0;padding:0}.rtm-comment-list li{background:#edeff4;font-size:12px;margin-bottom:1px;padding:10px;position:relative}.rtm-comment-list li:hover .rtmedia-delete-comment{opacity:1}.rtm-comment-list .rtmedia-no-comments{margin:0;padding:5px 10px}.rtmedia-like-info{background:#edeff4;font-size:12px;margin-bottom:1px;padding:5px 10px;position:relative}.rtm-comment-wrap{overflow:hidden}.rtm-comment-wrap .rtmedia-comment-author{font-weight:700}.rtm-comment-wrap .rtmedia-comment-date{color:#999;font-size:11px}.rtmedia-comment-content{margin-top:2px}.rtmedia-delete-comment{color:#999;cursor:pointer;font-size:16px;opacity:0;position:absolute;right:5px;top:5px}.rtmedia-comment-content p{margin:0}.rtmedia-comment-details{line-height:1.5;margin-top:-3px}.rtmedia-item-comments textarea{font-size:14px;padding:4px}.rtm-media-single-comments{bottom:20px;padding:10px;width:100%}.rtm-media-single-comments textarea{background-color:#edeff4;font-size:12px;line-height:14px;max-height:40px;min-height:30px;padding:4px}.rtmedia-popup{background:#fff;margin:20px auto;max-width:600px;padding:20px;position:relative;width:auto}.rtmedia-popup .rtm-modal-title{font-size:24px;margin-bottom:20px;margin-top:0}.rtmedia-popup label{display:block;margin-bottom:5px}#rtm-modal-container p{margin-bottom:10px}#rtm-mejs-video-container{margin:0 auto}.rtmedia-media-name{float:left;max-width:140px;overflow:hidden;text-align:left;text-overflow:ellipsis;white-space:nowrap}.rtm-single-media.rtm-media-type-video{padding-bottom:40px;padding-top:40px}.rtmedia-gallery-alert-container{position:fixed;top:0;left:0;height:100%;width:100%;background-color:rgba(0,0,0,0.6);z-index:999997}.rtmedia-gallery-message-box{position:fixed;top:40%;left:50%;margin-left:auto;margin-right:auto;z-index:999999}.rtmedia-gallery-message-box span{position:relative;left:-50%}.rtmedia-activity-container{box-sizing:border-box}.rtmedia-activity-container *,.rtmedia-activity-container *:before,.rtmedia-activity-container *:after{box-sizing:inherit}#buddypress ul.rtmedia-list li{border-bottom:0;padding-bottom:0}.rtmedia-activity-container .rtmedia-item-actions{display:none}.rtmedia-activity-container .rtmedia-item-title,.rtmedia-activity-container .rtmedia-item-title a{border:0;color:#666;font-size:13px;margin:5px 0 0;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}#rtmedia-whts-new-upload-container div{left:0 !important;position:absolute;top:0 !important}#aw-whats-new-submit,.rtmedia-add-media-button{display:block}.rtm-drag-drop-active{border:4px dashed green !important;display:block;height:100%;opacity:0.5;z-index:9999}#rtm-drop-files-title{background:rgba(0,0,0,0.2);display:none;font-size:14px;height:100%;padding:20px;position:absolute;top:0;width:100%}#rtSelectPrivacy{float:right}form.rt_media_comment_form .rtmedia-plupload-container{overflow:hidden}.rtmedia-plupload-container{position:relative;float:left}.rtm-upload-button-wrapper{float:left;margin-right:5px}#rtmedia-action-update{margin-right:10px}.rtmedia-list-item.media-type-photo,.rtmedia-list-item.media-type-document,.rtmedia-list-item.media-type-music,.rtmedia-list-item.media-type-video{display:inline-block}.media-type-music .mejs-container{margin-bottom:10px}.previous-pagination{float:left;margin-top:10px}.next-pagination{float:right;margin-top:10px}@media screen and (max-width: 500px){#activity-stream li .media-type-video{width:100%}#activity-stream li .media-type-video .mejs-video{max-width:100%;min-width:100%}}#rtmedia_show_all_comment{cursor:pointer}#rtmedia_show_all_comment:hover{text-decoration:underline}a.rtmedia-comment-link{display:none}a.rtmedia-comment-link.rtmedia-comments-link{display:initial}.rtmedia-album-edit .rtm-checkbox-wrap{background:rgba(255,255,255,0.9);height:30px;line-height:1;padding:10px;position:absolute;z-index:10}.rtmedia-album-edit .rtmedia-item-selector{position:relative;top:-7px}.rtmedia-album-edit .rtmedia-move-container{display:none}.rtm-single-actions.rtm-item-actions{float:none}.media-item .describe{border-collapse:collapse;width:100%;border-top-style:solid;border-top-width:1px;clear:both;cursor:default}.media-item.media-blank .describe{border:0}.media-item .describe th{vertical-align:top;text-align:left;padding:5px 10px 10px;width:140px}.media-item .describe .align th{padding-top:0}.media-item .media-item-info tr{background-color:transparent}.media-item .describe td{padding:0 8px 8px 0;vertical-align:top}.media-item thead.media-item-info td{padding:4px 10px 0}.media-item .media-item-info .A1B1{padding:0 0 0 10px}.media-item td.savesend{padding-bottom:15px}.media-item .thumbnail{max-height:128px;max-width:128px}#wpbody-content #async-upload-wrap a{display:none}.media-upload-form{margin-top:20px}.media-upload-form td label{margin-right:6px;margin-left:2px}.media-upload-form .align .field label{display:inline;padding:0 0 0 23px;margin:0 1em 0 3px;font-weight:bold}.media-upload-form tr.image-size label{margin:0 0 0 5px;font-weight:bold}.media-upload-form th.label label{font-weight:bold;margin:0.5em;font-size:13px}.media-upload-form th.label label span{padding:0 5px}abbr.required{border:medium none;text-decoration:none}.media-item .describe input[type="text"],.media-item .describe textarea{width:460px}.media-item .describe p.help{margin:0;padding:0 0 0 5px}.media-item .edit-attachment,.describe-toggle-on,.describe-toggle-off{display:block;line-height:36px;float:right;margin-right:15px}.media-item .describe-toggle-off,.media-item.open .describe-toggle-on{display:none}.media-item.open .describe-toggle-off{display:block}#media-items .media-item{border-style:solid;border-width:1px;min-height:36px;position:relative;margin-top:-1px;width:100%}#media-items{width:623px}.media-new-php #media-items{margin:1em 0}#media-items:empty{border:0 none}.media-item .filename{line-height:36px;overflow:hidden;padding:0 10px}.media-item .error-div{padding-left:10px}.media-item .pinkynail{float:left;margin:2px 2px 0;max-width:40px;max-height:32px}.media-item .startopen,.media-item .startclosed{display:none}.media-item .original{position:relative;height:34px}.media-item .progress{float:right;height:22px;margin:6px 10px 0 0;width:200px;line-height:2em;padding:0;overflow:hidden;margin-bottom:2px;border:1px solid #d1d1d1;background:#f7f7f7;background-image:-webkit-gradient(linear, left bottom, left top, from(#fff), to(#f7f7f7));background-image:-webkit-linear-gradient(bottom, #fff, #f7f7f7);background-image:linear-gradient(to top, #fff, #f7f7f7);border-radius:3px;box-shadow:inset 0 0 3px rgba(0,0,0,0.1)}.media-item .bar{z-index:9;width:0;height:100%;margin-top:-24px;background-color:#8cc1e9;background-image:-webkit-gradient(linear, left bottom, left top, from(#72a7cf), to(#8cc1e9));background-image:-webkit-linear-gradient(bottom, #72a7cf, #8cc1e9);background-image:linear-gradient(to top, #72a7cf, #8cc1e9);border-radius:3px;box-shadow:0 0 3px rgba(0,0,0,0.3)}.media-item .progress .percent{z-index:10;position:relative;width:200px;padding:0 8px;text-shadow:0 1px 0 rgba(255,255,255,0.4);color:rgba(0,0,0,0.6)}.upload-php .fixed .column-parent{width:15%}.js .html-uploader #plupload-upload-ui{display:none}.js .html-uploader #html-upload-ui{display:block}.media-upload-form .media-item.error{margin:0;padding:0}.media-upload-form .media-item.error p,.media-item .error-div{line-height:16px;margin:5px 10px;padding:0}.media-item .error-div a.dismiss{display:block;float:right;margin:5px 4px 0 15px}.find-box{width:600px;height:300px;overflow:hidden;padding:33px 0 51px;position:absolute;z-index:1000}.find-box-head{cursor:move;font-weight:bold;height:2em;line-height:2em;padding:1px 12px;position:absolute;top:5px;width:100%}.find-box-inside{overflow:auto;padding:6px;height:100%}.find-box-search{overflow:hidden;padding:9px;position:relative}.find-box-search .spinner{float:none;left:125px;position:absolute;top:9px}#find-posts-input{float:left;width:140px;height:24px}#find-posts-search{float:left;margin:1px 4px 0 3px}#find-posts-response{margin:8px 0;padding:0 1px 6px}#find-posts-response table{width:100%}#find-posts-response .found-radio{padding:3px 0 0 8px;width:15px}.find-box-buttons{padding:8px;overflow:hidden}.find-box #resize-se{position:absolute;right:1px;bottom:1px}.ui-find-overlay{position:absolute;top:0;left:0;background-color:#000;opacity:0.6;filter:alpha(opacity=60)}ul#dismissed-updates{display:none}form.upgrade{margin-top:8px}form.upgrade .hint{font-style:italic;font-size:85%;margin:-0.5em 0 2em 0}#poststuff .inside .the-tagcloud{margin:5px 0 10px;padding:8px;border-width:1px;border-style:solid;line-height:1.8em;word-spacing:3px;border-radius:6px}.drag-drop #drag-drop-area{border:4px dashed #DDDDDD;height:200px}.drag-drop .drag-drop-inside{margin:70px auto 0;width:250px}.drag-drop-inside p{color:#aaa;font-size:14px;margin:5px 0;display:none}.drag-drop .drag-drop-inside p{text-align:center}.drag-drop-inside p.drag-drop-info{font-size:20px}.drag-drop .drag-drop-inside p,.drag-drop-inside p.drag-drop-buttons{display:block}.drag-drop.drag-over #drag-drop-area{border-color:#83b4d8}#plupload-upload-ui{position:relative}.describe .image-editor{vertical-align:top}.imgedit-wrap{position:relative}.imgedit-settings p{margin:8px 0}.post-php .imgedit-wrap table{width:100%}.describe .imgedit-wrap table td,.wp_attachment_holder .imgedit-wrap table td{vertical-align:top;padding-top:0}.describe .imgedit-wrap table td.imgedit-settings{padding:0 5px}.wp_attachment_holder .imgedit-wrap table td.imgedit-settings{width:250px}td.imgedit-settings input{margin-top:0;vertical-align:middle}.imgedit-wait{position:absolute;top:0;background:#fff url(../../../../../../wp-admin/images/wpspin_light.gif) no-repeat scroll 22px 10px;background-size:16px 16px;opacity:0.7;filter:alpha(opacity=70);width:100%;height:500px;display:none}.spinner{background:url(../../../../../../wp-admin/images/wpspin_light.gif) no-repeat;background-size:16px 16px;display:none;float:right;opacity:0.7;filter:alpha(opacity=70);width:16px;height:16px;margin:5px 5px 0}.no-float{float:none}.media-disabled,.imgedit-settings .disabled{color:grey}.wp_attachment_image,.A1B1{overflow:hidden}.wp_attachment_image .button,.A1B1 .button{float:left}.no-js .wp_attachment_image .button{display:none}.wp_attachment_image .spinner,.A1B1 .spinner{float:left;padding:0 4px 4px;vertical-align:bottom}.imgedit-menu{margin:0 0 12px;min-width:300px}.imgedit-menu div{float:left;width:32px;height:32px}.imgedit-crop-wrap{position:relative}.imgedit-crop{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -9px -31px;margin:0 8px 0 0}.imgedit-crop.disabled:hover{background-position:-9px -31px}.imgedit-crop:hover{background-position:-9px -1px}.imgedit-rleft{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -46px -31px;margin:0 3px}.imgedit-rleft.disabled:hover{background-position:-46px -31px}.imgedit-rleft:hover{background-position:-46px -1px}.imgedit-rright{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -77px -31px;margin:0 8px 0 3px}.imgedit-rright.disabled:hover{background-position:-77px -31px}.imgedit-rright:hover{background-position:-77px -1px}.imgedit-flipv{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -115px -31px;margin:0 3px}.imgedit-flipv.disabled:hover{background-position:-115px -31px}.imgedit-flipv:hover{background-position:-115px -1px}.imgedit-fliph{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -147px -31px;margin:0 8px 0 3px}.imgedit-fliph.disabled:hover{background-position:-147px -31px}.imgedit-fliph:hover{background-position:-147px -1px}.imgedit-undo{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -184px -31px;margin:0 3px}.imgedit-undo.disabled:hover{background-position:-184px -31px}.imgedit-undo:hover{background-position:-184px -1px}.imgedit-redo{background:transparent url("../../../../../../wp-admin/images/imgedit-icons.png") no-repeat scroll -215px -31px;margin:0 8px 0 3px}.imgedit-redo.disabled:hover{background-position:-215px -31px}.imgedit-redo:hover{background-position:-215px -1px}.imgedit-applyto img{margin:0 8px 0 0}.imgedit-group h3{font-size:18px}.imgedit-group .dashicons{border:0;line-height:1.2}.imgedit-group-top{margin:5px 0}.imgedit-applyto .imgedit-label{padding:2px 0 0;display:block}.imgedit-help{display:none;font-style:italic;margin-bottom:8px}a.imgedit-help-toggle{text-decoration:none}.form-table td.imgedit-response{padding:0}.imgedit-submit{margin:8px 0}.imgedit-submit-btn{margin-left:20px}.imgedit-wrap .nowrap{white-space:nowrap}span.imgedit-scale-warn{color:red;font-size:20px;font-style:normal;visibility:hidden;vertical-align:middle}.wp_attachment_details{margin-bottom:20px}.imgedit-menu div{border-color:#d5d5d5;background-color:#f1f1f1}.imgedit-menu div:hover{border-color:#c1c1c1;background-color:#eaeaea}.imgedit-menu div.disabled{border-color:#ccc;background-color:#ddd;filter:alpha(opacity=50);opacity:0.5}.bp-media-image-editor-cotnainer{margin-top:35px}.wp_attachment_image .bp-media-image-edit{float:left}.wp_attachment_image .spinner{display:none}.bp-media-image-editor-cotnainer .hidden{display:none}.bp-media-image-editor-cotnainer div.updated{margin:5px 0 15px;background-color:#ffffe0;border-color:#e6db55;padding:0 .6em;border-radius:3px;border-width:1px;border-style:solid}.bp-media-image-editor-cotnainer div.updated p{margin:.5em 0;padding:2px}body article.bp_members.bp_member .entry-content,body div.bp_members.bp_member .entry-content{width:100%}.rtm-media-gallery-uploader{display:none}.rtmedia-uploader .drag-drop{border:4px dashed #DDD;text-align:center;background:#fafafa;overflow:hidden;color:#AAAAAA;margin-top:20px;padding:25px 0}.rtmedia-uploader .drag-drop.dragover{border-color:#83b4d8}.rtmedia-uploader .drag-drop .drag-drop-info{font-size:20px;line-height:24px}.rtmedia-uploader .drag-drop .rtm-select-files span{vertical-align:middle}.rtmedia-uploader .drag-drop .rtm-seperator{margin:0px 20px}.rtmedia-uploader .drag-drop .start-media-upload{display:none;margin-top:20px}.rtmedia-uploader .drag-drop .rtm-file-size-limit{vertical-align:middle;font-size:16px;line-height:24px}.rtm-uploader-main-wrapper .rtm-uploader-tabs{margin-bottom:10px;text-align:left}.rtm-uploader-main-wrapper ul{border-bottom:1px solid #CCC}.rtm-uploader-main-wrapper li{margin:0 0 -1px 10px;display:inline-block;padding:5px 10px;line-height:25px;background-color:#e4e4e4;border:1px solid #CCC}.rtm-uploader-main-wrapper li.active{background:transparent;border-left:1px solid #CCC;border-top:1px solid #CCC;border-right:1px solid #CCC;border-bottom:1px solid #fafafa}.rtm-uploader-main-wrapper li:hover{cursor:pointer}.rtmedia-container .rtmedia-list{margin:10px -5px}.rtmedia-container .rtmedia-list .rtmedia-list-item{float:left;margin:5px;position:relative}.rtmedia-container .rtmedia-list .rtmedia-list-item>a{display:block}.rtmedia-container .rtmedia-list .rtmedia_time{background-color:#000;color:#fff;display:inline-block;font-size:11px;font-weight:bold;line-height:14px;opacity:0.75;padding:0 4px;position:absolute;right:2px;top:2px}.rtmedia-container .rtmedia-list img{vertical-align:top}.rtmedia-container .rtmedia-list .rtmedia-item-title h4{color:#666;font-size:12px;font-weight:normal;margin:5px 0 0;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap}.rtm-load-more{background:#eee;text-align:center}.rtmedia-container .rtm-load-more a{border:0;padding:10px 0}.rtm-load-more .rtm-media-loading{padding:10px 0}.rtm-media-options{line-height:1.4;margin-bottom:10px}.rtm-media-options>div{display:inline-block;cursor:pointer}.rtm-media-options .rtm-media-options-list{margin-right:5px;padding-right:10px;position:relative}.rtm-media-options>*{border-right:1px solid #999}.rtm-media-options>*:last-child{border-right:none}.rtm-media-options .dashicons{font-size:inherit;line-height:1.4}.rtmedia-upload-media-link{cursor:pointer}a.rtmedia-upload-media-link{border:none}.rtm-album-privacy span{font-size:16px;display:inline-block;margin:0 20px 20px 20px;vertical-align:top}.rtm-album-privacy label{margin-right:8px}.rtm-album-privacy .dashicons{font-size:16px;line-height:1.6;margin-right:5px}#rtm-media-options-list .rtmedia-delete-album{background:transparent;border:0;color:#fff;font-family:inherit;font-size:inherit;font-weight:inherit;padding:0;text-transform:inherit}#rtm-media-options-list .rtmedia-delete-album:hover{background:transparent;border:0;color:#fff}.rtmedia-single-container button.rtmedia-like{background-color:transparent;color:inherit}#buddypress .mejs-controls button{padding:4px 8px;border:none;background:transparent url("../../../lib/media-element/controls.png") no-repeat}#buddypress .mejs-controls .mejs-play button{background-position:0 0}#buddypress .mejs-controls .mejs-pause button{background-position:0 -16px}#buddypress .mejs-controls .mejs-unmute button{background-position:-16px 0}#buddypress .mejs-controls .mejs-mute button{background-position:-16px -16px}#buddypress .mejs-controls .mejs-fullscreen-button button{background-position:-32px 0}#buddypress .mejs-controls .mejs-unfullscreen button{background-position:-32px -16px}.mejs-container .mejs-controls .mejs-time{padding:10px 3px 0;content:''}.rtmedia-activity-container .mejs-playpause-button.mejs-play button:before,.rtmedia-activity-container .mejs-playpause-button.mejs-pause button:before,.rtmedia-activity-container .mejs-volume-button.mejs-mute button:before,.rtmedia-activity-container .mejs-fullscreen-button button:before,.rtmedia-media .mejs-playpause-button.mejs-play button:before,.rtmedia-media .mejs-playpause-button.mejs-pause button:before,.rtmedia-media .mejs-volume-button.mejs-mute button:before,.rtmedia-media .mejs-fullscreen-button button:before{content:''}@media only screen and (min-width: 1025px){.mfp-content .rtm-lightbox-container{display:table;table-layout:fixed;width:100%}.mfp-content .rtm-mfp-close{background:transparent}.mfp-content .rtm-single-media{display:table-cell;width:66.6667%}.mfp-content .rtm-single-meta{display:table-cell;width:33.3333%;padding:20px;height:473px}.mfp-content .rtm-single-meta .rtmedia-scroll{height:100%;overflow-X:hidden}}.rtl #rtSelectPrivacy{float:left}.rtl .rtmedia-plupload-container{float:right}.rtl .rtm-upload-button-wrapper{float:right}.rtl #whats-new-post-in-box{float:right}.rtl .describe-toggle-off{float:left}.rtl .media-item .pinkynail{float:right}.rtl .media-item .progress{float:left}.rtl .media-item .error-div a.dismiss{float:left}.rtl #find-posts-input{float:right}.rtl #find-posts-search{float:right}.rtl .spinner{float:left}.rtl .wp_attachment_image .button,.rtl .A1B1 .button{float:right}.rtl .wp_attachment_image .spinner,.rtl .A1B1 .spinner{float:right}.rtl .imgedit-menu div{float:right}.rtl .wp_attachment_image .bp-media-image-edit{float:right}.rtl .rtmedia-container .rtmedia-list .rtmedia-list-item{float:right}.rtl #buddypress #rtm-media-options-list .rtm-options .button{float:right}.rtl .rtm-ltb-title{float:right}.rtl .rtm-item-actions{float:left}.rtl .rtm-item-actions>div,.rtl .rtm-item-actions>form{float:right}.rtl .userprofile{float:right}.rtl .rtmedia-actions-before-comments>span{float:right}.rtl .rtmedia-comment-user-pic{float:right}.rtl .rtmedia-media-name{float:right}.rtl #rtmedia-uploader-form .rtm-plupload-list li,.rtl #rtmedia_uploader_filelist li{float:right}.rtl .rtm-page-number{float:right}.rtl .rtm-page-number .rtmedia-page-link{float:right}.rtl .rtm-pagination{float:right}.rtl .rtm-pagination .rtm-paginate{float:left}.rtl .rtm-tabs li{float:right}.rtl .alignleft{float:right}.rtl .alignright{float:left}
app/assets/css/sass/_activity.scss CHANGED
@@ -77,6 +77,10 @@
77
  float: right;
78
  }
79
 
 
 
 
 
80
  .rtmedia-plupload-container {
81
  position: relative;
82
  float: left;
@@ -93,6 +97,7 @@
93
 
94
  // Video/Music title make center align
95
  .rtmedia-list-item {
 
96
  &.media-type-document,
97
  &.media-type-music,
98
  &.media-type-video {
@@ -135,3 +140,14 @@
135
  text-decoration: underline;
136
  }
137
  }
 
 
 
 
 
 
 
 
 
 
 
77
  float: right;
78
  }
79
 
80
+ form.rt_media_comment_form .rtmedia-plupload-container {
81
+ overflow: hidden;
82
+ }
83
+
84
  .rtmedia-plupload-container {
85
  position: relative;
86
  float: left;
97
 
98
  // Video/Music title make center align
99
  .rtmedia-list-item {
100
+ &.media-type-photo,
101
  &.media-type-document,
102
  &.media-type-music,
103
  &.media-type-video {
140
  text-decoration: underline;
141
  }
142
  }
143
+
144
+
145
+
146
+ a.rtmedia-comment-link{
147
+ display: none;
148
+ }
149
+
150
+
151
+ a.rtmedia-comment-link.rtmedia-comments-link{
152
+ display: initial;
153
+ }
app/assets/css/sass/_buddypress.scss CHANGED
@@ -9,6 +9,17 @@
9
  width: 100%;
10
  }
11
 
 
 
 
 
 
 
 
 
 
 
 
12
  #buddypress #whats-new-options {
13
  height: auto !important;
14
  overflow: hidden;
@@ -50,9 +61,19 @@ body.media.buddypress {
50
  }
51
 
52
  #buddypress input[type=submit]:focus {
53
- background: #ededed;
54
- border: 1px solid #bbb;
55
- color: #555;
56
- outline: 0;
57
- text-decoration: none;
58
- }
 
 
 
 
 
 
 
 
 
 
9
  width: 100%;
10
  }
11
 
12
+ #buddypress #whats-new-form {
13
+ .rtmedia-uploader-div {
14
+ display: none;
15
+ }
16
+
17
+ #whats-new-options .rtmedia-uploader-div {
18
+ display: block;
19
+ }
20
+ }
21
+
22
+
23
  #buddypress #whats-new-options {
24
  height: auto !important;
25
  overflow: hidden;
61
  }
62
 
63
  #buddypress input[type=submit]:focus {
64
+ background: #ededed;
65
+ border: 1px solid #bbb;
66
+ color: #555;
67
+ outline: 0;
68
+ text-decoration: none;
69
+ }
70
+
71
+ #buddypress ul.activity-list li.activity-item {
72
+ .activity-comments {
73
+ .rtmedia-uploader-div {
74
+ color: #767676;
75
+ margin-left: 50px;
76
+ padding-left: 15px;
77
+ }
78
+ }
79
+ }
app/assets/css/sass/_popup.scss CHANGED
@@ -23,6 +23,13 @@
23
  margin: 5px 0; */
24
  }
25
  }
 
 
 
 
 
 
 
26
  }
27
 
28
  .rtm-single-meta {
@@ -323,6 +330,7 @@
323
  }
324
 
325
  .rtmedia-comment-link,
 
326
  #buddypress & .rtmedia-like {
327
  border: 0;
328
  font-size: 13px;
@@ -455,7 +463,6 @@
455
  }
456
 
457
  .rtm-media-single-comments {
458
- background-color: #edeff4;
459
  bottom: 20px;
460
  padding: 10px;
461
 
@@ -463,6 +470,7 @@
463
  width: 100%;
464
 
465
  textarea {
 
466
  font-size: 12px;
467
  line-height: 14px;
468
  max-height: 40px;
23
  margin: 5px 0; */
24
  }
25
  }
26
+
27
+ .rtmedia-comment-media-list {
28
+ .mejs-container.mejs-video {
29
+ min-height: 200px;
30
+ min-width: 200px;
31
+ }
32
+ }
33
  }
34
 
35
  .rtm-single-meta {
330
  }
331
 
332
  .rtmedia-comment-link,
333
+ .rtmedia-view-conversation,
334
  #buddypress & .rtmedia-like {
335
  border: 0;
336
  font-size: 13px;
463
  }
464
 
465
  .rtm-media-single-comments {
 
466
  bottom: 20px;
467
  padding: 10px;
468
 
470
  width: 100%;
471
 
472
  textarea {
473
+ background-color: #edeff4;
474
  font-size: 12px;
475
  line-height: 14px;
476
  max-height: 40px;
app/assets/css/sass/_rtm.scss CHANGED
@@ -59,7 +59,9 @@
59
  }
60
 
61
  // Uploader
62
- #rtmedia-uploader-form .rtm-plupload-list, #rtmedia_uploader_filelist {
 
 
63
  list-style: none;
64
  margin-left: -4px;
65
  margin-right: -4px;
@@ -120,6 +122,16 @@
120
  clear: both;
121
  }
122
 
 
 
 
 
 
 
 
 
 
 
123
  button#rtmedia-add-media-button-post-update {
124
  padding: 3px 6px;
125
 
59
  }
60
 
61
  // Uploader
62
+ #rtmedia-uploader-form .rtm-plupload-list,
63
+ form .rtmedia-container .rtm-plupload-list,
64
+ #rtmedia_uploader_filelist {
65
  list-style: none;
66
  margin-left: -4px;
67
  margin-right: -4px;
122
  clear: both;
123
  }
124
 
125
+ .rtm-upload-button-wrapper button.rtmedia-comment-media-upload,
126
+ button.rtmedia-comment-media-upload {
127
+ padding: 3px 6px;
128
+
129
+ .dashicons {
130
+ font-size: 18px;
131
+ line-height: 20px;
132
+ }
133
+ }
134
+
135
  button#rtmedia-add-media-button-post-update {
136
  padding: 3px 6px;
137
 
app/assets/js/rtMedia.backbone.js CHANGED
@@ -63,8 +63,8 @@ jQuery( function( $ ) {
63
  'height': 0,
64
  'rt_permalink': false,
65
  'duration': '0:00'
66
- // "next" : -1,
67
- // "prev" : -1
68
  }
69
 
70
  } );
@@ -166,16 +166,20 @@ jQuery( function( $ ) {
166
  } );
167
  //Element.show();
168
 
 
 
 
 
169
  rtMediaHook.call( 'rtmedia_after_gallery_load' );
170
 
171
- jQuery( '.rtmedia-container .rtmedia_next_prev .rtm-pagination' ).remove();
172
- jQuery( '.rtmedia-container .rtmedia_next_prev .clear' ).remove();
173
- jQuery( '.rtmedia-container .rtmedia_next_prev .rtm-media-loading' ).remove();
174
- jQuery( '.rtmedia-container .rtmedia_next_prev br' ).remove();
175
- jQuery( '.rtmedia-container .rtmedia_next_prev' ).append( response.pagination );
176
 
177
  if ( jQuery( '.rtm-uploader-main-wrapper div.rtm-upload-url' ).is( ':visible' ) == false ) {
178
- jQuery( '.rtmedia-container .rtmedia-list' ).css( 'opacity', '1' );
179
  jQuery( '#rtm-media-gallery-uploader' ).slideUp();
180
  }
181
  }
@@ -246,7 +250,6 @@ jQuery( function( $ ) {
246
  }
247
  },
248
  appendTo: function( media ) {
249
- //Console.log("append");
250
  var mediaView = new rtMedia.MediaView( {
251
  model: media
252
  } );
@@ -266,7 +269,13 @@ jQuery( function( $ ) {
266
  }
267
  $( this ).hide();
268
  e.preventDefault();
269
- galleryObj.getNext( nextpage, $( this ).parent().parent().parent(), $( this ) );
 
 
 
 
 
 
270
  } );
271
 
272
  /**
@@ -287,61 +296,72 @@ jQuery( function( $ ) {
287
  if ( e.keyCode == 13 ) {
288
  e.preventDefault();
289
 
290
- if ( jQuery( '.rtm-media-loading' ).length == 0 ) {
291
- $( '.rtm-pagination' ).before( '<div class=\'rtm-media-loading\'><img src=\'' + rMedia_loading_media + '\' /></div>' );
 
 
 
 
292
  } else {
293
- jQuery( '.rtm-media-loading' ).show();
294
  }
295
 
296
- if ( parseInt( $( '#rtmedia_go_to_num' ).val() ) > parseInt( $( '#rtmedia_last_page' ).val() ) ) {
297
- nextpage = parseInt( $( '#rtmedia_last_page' ).val() );
298
  } else {
299
- nextpage = parseInt( $( '#rtmedia_go_to_num' ).val() );
300
  }
301
 
302
- galleryObj.getNext( nextpage, $( this ).parent().parent().parent().parent().parent(), $( this ).parent().parent() );
 
 
303
 
 
304
  return false;
305
  }
306
  } );
307
 
308
- $( document ).on( 'click', '.rtmedia-page-link', function( e ) {
309
- /* Get current clicked href value */
310
- href = $( this ).attr( 'href' );
311
 
312
- if ( jQuery( '.rtm-media-loading' ).length == 0 ) {
313
- $( '.rtm-pagination' ).before( '<div class=\'rtm-media-loading\'><img src=\'' + rMedia_loading_media + '\' /></div>' );
314
- } else {
315
- jQuery( '.rtm-media-loading' ).show();
316
- }
317
 
318
- e.preventDefault();
319
- if ( $( this ).data( 'page-type' ) == 'page' ) {
320
- nextpage = $( this ).data( 'page' );
321
- } else if ( $( this ).data( 'page-type' ) == 'prev' ) {
322
- if ( nextpage == -1 ) {
323
- nextpage = parseInt( $( '#rtmedia_last_page' ).val() ) - 1;
324
  } else {
325
- nextpage -= 2;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
  }
327
- } else if ( $( this ).data( 'page-type' ) == 'num' ) {
328
- if ( parseInt( $( '#rtmedia_go_to_num' ).val() ) > parseInt( $( '#rtmedia_last_page' ).val() ) ) {
329
- nextpage = parseInt( $( '#rtmedia_last_page' ).val() );
330
- } else {
331
- nextpage = parseInt( $( '#rtmedia_go_to_num' ).val() );
332
- }
333
 
334
- /* Set page url for input type num pagination */
335
- page_base_url = $( this ).data( 'page-base-url' );
336
- href = page_base_url + nextpage;
 
 
 
 
 
337
  }
338
 
339
- if ( $( this ).data( 'page-type' ) == 'num' ) {
340
- galleryObj.getNext( nextpage, $( this ).parent().parent().parent().parent().parent(), $( this ).parent().parent() );
341
- } else {
342
- galleryObj.getNext( nextpage, $( this ).parent().parent().parent().parent().parent(), $( this ).parent().parent() );
343
- }
344
- change_rtBrowserAddressUrl( href, '' );
345
 
346
  } );
347
 
@@ -775,9 +795,9 @@ jQuery( document ).ready( function( $ ) {
775
  // When user changes the value in activity "post in" dropdown, hide the privacy dropdown and show when posting in profile.
776
  jQuery( '#whats-new-post-in' ).on( 'change', function( e ) {
777
  if ( jQuery( this ).val() == '0' ) {
778
- jQuery( '#rtmedia-action-update .privacy' ).prop( 'disabled', false ).show();
779
  } else {
780
- jQuery( '#rtmedia-action-update .privacy' ).prop( 'disabled', true ).hide();
781
  }
782
  } );
783
 
@@ -791,18 +811,18 @@ jQuery( document ).ready( function( $ ) {
791
  objUploadView.initUploader();
792
 
793
  setTimeout( function() {
794
- if ( $( '#rtmedia-add-media-button-post-update' ).length > 0 ) {
795
- $( '#whats-new-options' ).prepend( $( '.rtmedia-plupload-container' ) );
796
- if ( $( '#rtm-file_upload-ui .privacy' ).length > 0 ) {
797
- $( '.rtmedia-plupload-container' ).append( $( '#rtm-file_upload-ui .privacy' ) );
798
  }
799
- $( '#rtmedia-whts-new-upload-container > div' ).css( 'top', '0' );
800
- $( '#rtmedia-whts-new-upload-container > div' ).css( 'left', '0' );
801
  }
802
  }, 100 );
803
 
804
- if ( $( '#whats-new-options' ).length > 0 && $( '.rtmedia-uploader-div' ).length > 0 ) {
805
- $( '#whats-new-options' ).append( $( '.rtmedia-uploader-div' ) );
806
  }
807
 
808
  $( '#whats-new-form' ).on( 'click', '#rtmedia-add-media-button-post-update', function( e ) {
@@ -1043,14 +1063,14 @@ jQuery( document ).ready( function( $ ) {
1043
  $.each( objUploadView.upload_remove_array, function( i, rfile ) {
1044
  if ( up.getFile( rfile ) ) {
1045
  up.removeFile( up.getFile( rfile ) );
1046
- }
1047
  } );
1048
 
1049
  var object = '';
1050
  var item_id = jQuery( '#whats-new-post-in' ).val();
1051
  if ( item_id == undefined ) {
1052
  item_id = 0;
1053
- }
1054
  if ( item_id > 0 ) {
1055
  object = 'group';
1056
  } else {
@@ -1068,15 +1088,15 @@ jQuery( document ).ready( function( $ ) {
1068
  }
1069
 
1070
  // If privacy dropdown is not disabled, then get the privacy value of the update
1071
- if ( jQuery( 'select.privacy' ).prop( 'disabled' ) === false ) {
1072
- up.settings.multipart_params.privacy = jQuery( 'select.privacy' ).val();
1073
  }
1074
  } );
1075
 
1076
  objUploadView.uploader.bind( 'UploadComplete', function( up, files ) {
1077
  media_uploading = true;
1078
  $( '#aw-whats-new-submit' ).click();
1079
- $( '#rtmedia_uploader_filelist li.plupload_queue_li' ).remove();
1080
  //$("#aw-whats-new-submit").removeAttr('disabled');
1081
  window.onbeforeunload = null;
1082
  } );
@@ -1118,10 +1138,10 @@ jQuery( document ).ready( function( $ ) {
1118
 
1119
  var dynamic_privacy = '';
1120
 
1121
- if ( jQuery( 'select.privacy' ).not( '.rtm-activity-privacy-opt' ).length > 0 ) {
1122
- dynamic_privacy = jQuery( 'select.privacy' ).not( '.rtm-activity-privacy-opt' ).val();
1123
- } else if ( jQuery( 'input[name="privacy"]' ).length > 0 ) {
1124
- dynamic_privacy = jQuery( 'input[name="privacy"]' ).val();
1125
  }
1126
 
1127
  options.data += '&rtmedia-privacy=' + dynamic_privacy;
@@ -1135,8 +1155,8 @@ jQuery( document ).ready( function( $ ) {
1135
  var allowActivityPost = rtMediaHook.call( 'rtmedia_js_before_activity_added', true );
1136
 
1137
  if ( ! allowActivityPost ) {
1138
- $( '#rtmedia_upload_terms_conditions' ).removeAttr( 'disabled' );
1139
- $( '#rtmedia-whts-new-upload-container' ).find( 'input' ).removeAttr( 'disabled' );
1140
 
1141
  return false;
1142
  }
@@ -1193,7 +1213,7 @@ jQuery( document ).ready( function( $ ) {
1193
  }
1194
  objUploadView.uploader.refresh();
1195
  $( '#rtmedia-whts-new-upload-container > div' ).css( { 'top': '0', 'left': '0' } );
1196
- $( '#rtMedia-update-queue-list' ).html( '' );
1197
  //$("#div-attache-rtmedia").hide();
1198
  apply_rtMagnificPopup( jQuery( '.rtmedia-list-media, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.widget-item-listing,.bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content' ) );
1199
  jQuery( 'ul.activity-list li.rtmedia_update:first-child .wp-audio-shortcode, ul.activity-list li.rtmedia_update:first-child .wp-video-shortcode' ).mediaelementplayer( {
@@ -1206,9 +1226,13 @@ jQuery( document ).ready( function( $ ) {
1206
  // if set, overrides <video height>
1207
  //videoHeight: 1
1208
  } );
 
 
1209
  rtMediaHook.call( 'rtmedia_js_after_activity_added', [ ] );
1210
  }
1211
 
 
 
1212
  $( '#whats-new-post-in' ).removeAttr( 'disabled' );
1213
  $( '#rtmedia-add-media-button-post-update' ).removeAttr( 'disabled' );
1214
  // Enabled TextBox color back to normal
@@ -1258,21 +1282,41 @@ jQuery( document ).ready( function( $ ) {
1258
  } );
1259
  }
1260
  } );
 
 
 
1261
  /**
1262
  * RtMedia Comment Js
1263
  */
1264
  jQuery( document ).ready( function( $ ) {
1265
  jQuery( document ).on( 'click', '#rt_media_comment_form #rt_media_comment_submit', function( e ) {
1266
- var comment_content_el = jQuery( '#comment_content' );
1267
- var comment_form_el = jQuery( '#rt_media_comment_form' );
1268
  var that = this;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1269
 
1270
- e.preventDefault();
1271
- if ( $.trim( $( '#comment_content' ).val() ) == '' ) {
1272
  rtmedia_single_media_alert_message( rtmedia_empty_comment_msg, 'warning' );
 
 
 
1273
  return false;
1274
  }
1275
 
 
1276
  $( this ).attr( 'disabled', 'disabled' );
1277
 
1278
  // Sanitize comment content and escape html tags
@@ -1284,10 +1328,29 @@ jQuery( document ).ready( function( $ ) {
1284
  data: comment_form_el.serialize() + '&rtajax=true',
1285
  success: function( data ) {
1286
  $( '#rtmedia-no-comments' ).remove();
 
1287
  $( '#rtmedia_comment_ul' ).append( data );
 
1288
  comment_content_el.val( '' );
1289
- $( that ).removeAttr( 'disabled' );
 
 
 
 
 
 
 
 
 
 
1290
  rtMediaHook.call( 'rtmedia_js_after_comment_added', [ ] );
 
 
 
 
 
 
 
1291
  }
1292
  } );
1293
 
@@ -1321,7 +1384,7 @@ jQuery( document ).ready( function( $ ) {
1321
  current_comment.closest( 'li' ).remove();
1322
  } );
1323
  } else {
1324
- current_comment.css( 'opacity', '1' );
1325
  }
1326
  rtMediaHook.call( 'rtmedia_js_after_comment_deleted', [ ] );
1327
  }
@@ -1409,9 +1472,13 @@ jQuery( document ).ready( function( $ ) {
1409
  };
1410
  } );
1411
 
1412
- function rtmedia_selected_file_list( plupload, file, uploader, error ) {
 
1413
  var icon = '', err_msg = '', upload_progress = '', title = '';
1414
 
 
 
 
1415
  if ( error == '' ) {
1416
  upload_progress = '<div class="plupload_file_progress ui-widget-header" style="width: 0%;">';
1417
  upload_progress += '</div>';
@@ -1439,7 +1506,7 @@ function rtmedia_selected_file_list( plupload, file, uploader, error ) {
1439
  rtmedia_plupload_file += icon;
1440
  rtmedia_plupload_file += '</div>';
1441
  rtmedia_plupload_file += '<div class="plupload_file_action">';
1442
- rtmedia_plupload_file += '<div class="plupload_action_icon ui-icon plupload_delete">';
1443
  rtmedia_plupload_file += '<span class="remove-from-queue dashicons dashicons-dismiss"></span>';
1444
  rtmedia_plupload_file += '</div>';
1445
  rtmedia_plupload_file += '</div>';
@@ -1450,7 +1517,7 @@ function rtmedia_selected_file_list( plupload, file, uploader, error ) {
1450
  rtmedia_plupload_file += '</div>';
1451
  rtmedia_plupload_file += '</li>';
1452
 
1453
- jQuery( rtmedia_plupload_file ).appendTo( '#rtmedia_uploader_filelist' );
1454
  var type = file.type;
1455
  var media_title = file.name;
1456
  var ext = media_title.substring( media_title.lastIndexOf( '.' ) + 1, media_title.length );
@@ -1498,3 +1565,717 @@ function change_rtBrowserAddressUrl( url, page ) {
1498
  history.pushState( obj, obj.Page, obj.Url );
1499
  }
1500
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  'height': 0,
64
  'rt_permalink': false,
65
  'duration': '0:00'
66
+ //"next": -1,
67
+ //"prev": -1
68
  }
69
 
70
  } );
166
  } );
167
  //Element.show();
168
 
169
+ // get current gallery container object
170
+ var current_gallery = galleryViewObj.$el.parents( '.rtmedia-container' );
171
+ var current_gallery_id = current_gallery.attr( 'id' );
172
+
173
  rtMediaHook.call( 'rtmedia_after_gallery_load' );
174
 
175
+ jQuery( '#' + current_gallery_id + ' .rtmedia_next_prev .rtm-pagination' ).remove();
176
+ jQuery( '#' + current_gallery_id + ' .rtmedia_next_prev .clear' ).remove();
177
+ jQuery( '#' + current_gallery_id + ' .rtmedia_next_prev .rtm-media-loading' ).remove();
178
+ jQuery( '#' + current_gallery_id + ' .rtmedia_next_prev br' ).remove();
179
+ jQuery( '#' + current_gallery_id + ' .rtmedia_next_prev' ).append( response.pagination );
180
 
181
  if ( jQuery( '.rtm-uploader-main-wrapper div.rtm-upload-url' ).is( ':visible' ) == false ) {
182
+ jQuery( '#' + current_gallery_id + ' .rtmedia-list' ).css( 'opacity', '1' );
183
  jQuery( '#rtm-media-gallery-uploader' ).slideUp();
184
  }
185
  }
250
  }
251
  },
252
  appendTo: function( media ) {
 
253
  var mediaView = new rtMedia.MediaView( {
254
  model: media
255
  } );
269
  }
270
  $( this ).hide();
271
  e.preventDefault();
272
+
273
+ //commented beacuse it was creating a problem when gallery shortcode was used with bulk edit
274
+ //galleryObj.getNext( nextpage, $( this ).parent().parent().parent(), $( this ) );
275
+
276
+ //Added beacuse it was creating a problem when gallery shortcode was used with bulk edit
277
+ var parent_object = $( this ).closest( '.rtmedia-container' ).parent();
278
+ galleryObj.getNext( nextpage, parent_object, $( this ) );
279
  } );
280
 
281
  /**
296
  if ( e.keyCode == 13 ) {
297
  e.preventDefault();
298
 
299
+ var current_gallery = $(this).parents( '.rtmedia-container' );
300
+ var current_gallery_id = current_gallery.attr( 'id' );
301
+
302
+
303
+ if ( $( '#' + current_gallery_id + ' .rtm-media-loading' ).length == 0 ) {
304
+ $( '#' + current_gallery_id + ' .rtm-pagination' ).before( '<div class=\'rtm-media-loading\'><img src=\'' + rMedia_loading_media + '\' /></div>' );
305
  } else {
306
+ $( '#' + current_gallery_id + ' .rtm-media-loading' ).show();
307
  }
308
 
309
+ if ( parseInt( $( '#' + current_gallery_id + ' #rtmedia_go_to_num' ).val() ) > parseInt( $( '#' + current_gallery_id + ' #rtmedia_last_page' ).val() ) ) {
310
+ nextpage = parseInt( $( '#' + current_gallery_id + ' #rtmedia_last_page' ).val() );
311
  } else {
312
+ nextpage = parseInt( $( '#' + current_gallery_id + ' #rtmedia_go_to_num' ).val() );
313
  }
314
 
315
+ var page_base_url = $( '#' + current_gallery_id + ' .rtmedia-page-no .rtmedia-page-link' ).data( 'page-base-url' );
316
+ var href = page_base_url + nextpage;
317
+ change_rtBrowserAddressUrl( href, '' );
318
 
319
+ galleryObj.getNext( nextpage, $( this ).parents( '.rtmedia_gallery_wrapper' ), $( this ).parents( '.rtm-pagination' ) );
320
  return false;
321
  }
322
  } );
323
 
324
+ $( document ).on( 'click', '.rtmedia-page-link', function( e ) {
 
 
325
 
326
+ /* Get current clicked href value */
327
+ href = $( this ).attr( 'href' );
 
 
 
328
 
329
+ var current_gallery = $(this).parents( '.rtmedia-container' );
330
+ var current_gallery_id = current_gallery.attr( 'id' );
331
+
332
+ if ( $( '#' + current_gallery_id + ' .rtm-media-loading' ).length == 0 ) {
333
+ $( '#' + current_gallery_id + ' .rtm-pagination' ).before( '<div class=\'rtm-media-loading\'><img src=\'' + rMedia_loading_media + '\' /></div>' );
 
334
  } else {
335
+ $( '#' + current_gallery_id + ' .rtm-media-loading' ).show();
336
+ }
337
+
338
+ e.preventDefault();
339
+ if ( $( this ).data( 'page-type' ) == 'page' ) {
340
+ nextpage = $( this ).data( 'page' );
341
+ } else if ( $( this ).data( 'page-type' ) == 'prev' ) {
342
+ if ( nextpage == -1 ) {
343
+ nextpage = parseInt( $( '#' + current_gallery_id + ' #rtmedia_last_page' ).val() ) - 1;
344
+ } else {
345
+ nextpage -= 2;
346
+ }
347
+ } else if ( $( this ).data( 'page-type' ) == 'num' ) {
348
+ if ( parseInt( $( '#' + current_gallery_id + ' #rtmedia_go_to_num' ).val() ) > parseInt( $( '#rtmedia_last_page' ).val() ) ) {
349
+ nextpage = parseInt( $( '#' + current_gallery_id + ' #rtmedia_last_page' ).val() );
350
+ } else {
351
+ nextpage = parseInt( $( '#' + current_gallery_id + ' #rtmedia_go_to_num' ).val() );
352
  }
 
 
 
 
 
 
353
 
354
+ /* Set page url for input type num pagination */
355
+ page_base_url = $( this ).data( 'page-base-url' );
356
+ href = page_base_url + nextpage;
357
+ }
358
+ if ( $( this ).data( 'page-type' ) == 'num' ) {
359
+ galleryObj.getNext( nextpage, $( this ).parents( '.rtmedia_gallery_wrapper' ), $( this ).parents( '.rtm-pagination' ) );
360
+ } else {
361
+ galleryObj.getNext( nextpage, $( this ).parents( '.rtmedia_gallery_wrapper' ), $( this ).parents( '.rtm-pagination' ) );
362
  }
363
 
364
+ change_rtBrowserAddressUrl( href, '' );
 
 
 
 
 
365
 
366
  } );
367
 
795
  // When user changes the value in activity "post in" dropdown, hide the privacy dropdown and show when posting in profile.
796
  jQuery( '#whats-new-post-in' ).on( 'change', function( e ) {
797
  if ( jQuery( this ).val() == '0' ) {
798
+ jQuery( '#whats-new-form #rtmedia-action-update .privacy' ).prop( 'disabled', false ).show();
799
  } else {
800
+ jQuery( '#whats-new-form #rtmedia-action-update .privacy' ).prop( 'disabled', true ).hide();
801
  }
802
  } );
803
 
811
  objUploadView.initUploader();
812
 
813
  setTimeout( function() {
814
+ if ( $( '#whats-new-form #rtmedia-add-media-button-post-update' ).length > 0 ) {
815
+ $( '#whats-new-options' ).prepend( $( '#whats-new-form .rtmedia-plupload-container' ) );
816
+ if ( $( '#whats-new-form #rtm-file_upload-ui .privacy' ).length > 0 ) {
817
+ $( '#whats-new-form .rtmedia-plupload-container' ).append( $( '#whats-new-form #rtm-file_upload-ui .privacy' ) );
818
  }
819
+ $( '#whats-new-form #rtmedia-whts-new-upload-container > div' ).css( 'top', '0' );
820
+ $( '#whats-new-form #rtmedia-whts-new-upload-container > div' ).css( 'left', '0' );
821
  }
822
  }, 100 );
823
 
824
+ if ( $( '#whats-new-options' ).length > 0 && $( '#whats-new-form .rtmedia-uploader-div' ).length > 0 ) {
825
+ $( '#whats-new-options' ).append( $( '#whats-new-form .rtmedia-uploader-div' ) );
826
  }
827
 
828
  $( '#whats-new-form' ).on( 'click', '#rtmedia-add-media-button-post-update', function( e ) {
1063
  $.each( objUploadView.upload_remove_array, function( i, rfile ) {
1064
  if ( up.getFile( rfile ) ) {
1065
  up.removeFile( up.getFile( rfile ) );
1066
+ }
1067
  } );
1068
 
1069
  var object = '';
1070
  var item_id = jQuery( '#whats-new-post-in' ).val();
1071
  if ( item_id == undefined ) {
1072
  item_id = 0;
1073
+ }
1074
  if ( item_id > 0 ) {
1075
  object = 'group';
1076
  } else {
1088
  }
1089
 
1090
  // If privacy dropdown is not disabled, then get the privacy value of the update
1091
+ if ( jQuery( '#whats-new-form select.privacy' ).prop( 'disabled' ) === false ) {
1092
+ up.settings.multipart_params.privacy = jQuery( '#whats-new-form select.privacy' ).val();
1093
  }
1094
  } );
1095
 
1096
  objUploadView.uploader.bind( 'UploadComplete', function( up, files ) {
1097
  media_uploading = true;
1098
  $( '#aw-whats-new-submit' ).click();
1099
+ $( '#whats-new-form #rtmedia_uploader_filelist li.plupload_queue_li' ).remove();
1100
  //$("#aw-whats-new-submit").removeAttr('disabled');
1101
  window.onbeforeunload = null;
1102
  } );
1138
 
1139
  var dynamic_privacy = '';
1140
 
1141
+ if ( jQuery( '#whats-new-form select.privacy' ).not( '.rtm-activity-privacy-opt' ).length > 0 ) {
1142
+ dynamic_privacy = jQuery( '#whats-new-form select.privacy' ).not( '.rtm-activity-privacy-opt' ).val();
1143
+ } else if ( jQuery( '#whats-new-form input[name="privacy"]' ).length > 0 ) {
1144
+ dynamic_privacy = jQuery( '#whats-new-form input[name="privacy"]' ).val();
1145
  }
1146
 
1147
  options.data += '&rtmedia-privacy=' + dynamic_privacy;
1155
  var allowActivityPost = rtMediaHook.call( 'rtmedia_js_before_activity_added', true );
1156
 
1157
  if ( ! allowActivityPost ) {
1158
+ $( '#whats-new-form #rtmedia_upload_terms_conditions' ).removeAttr( 'disabled' );
1159
+ $( '#whats-new-form #rtmedia-whts-new-upload-container' ).find( 'input' ).removeAttr( 'disabled' );
1160
 
1161
  return false;
1162
  }
1213
  }
1214
  objUploadView.uploader.refresh();
1215
  $( '#rtmedia-whts-new-upload-container > div' ).css( { 'top': '0', 'left': '0' } );
1216
+ $( '#whats-new-form #rtMedia-update-queue-list' ).html( '' );
1217
  //$("#div-attache-rtmedia").hide();
1218
  apply_rtMagnificPopup( jQuery( '.rtmedia-list-media, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.widget-item-listing,.bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content' ) );
1219
  jQuery( 'ul.activity-list li.rtmedia_update:first-child .wp-audio-shortcode, ul.activity-list li.rtmedia_update:first-child .wp-video-shortcode' ).mediaelementplayer( {
1226
  // if set, overrides <video height>
1227
  //videoHeight: 1
1228
  } );
1229
+
1230
+
1231
  rtMediaHook.call( 'rtmedia_js_after_activity_added', [ ] );
1232
  }
1233
 
1234
+ rtmedia_on_activity_add();
1235
+
1236
  $( '#whats-new-post-in' ).removeAttr( 'disabled' );
1237
  $( '#rtmedia-add-media-button-post-update' ).removeAttr( 'disabled' );
1238
  // Enabled TextBox color back to normal
1282
  } );
1283
  }
1284
  } );
1285
+
1286
+
1287
+
1288
  /**
1289
  * RtMedia Comment Js
1290
  */
1291
  jQuery( document ).ready( function( $ ) {
1292
  jQuery( document ).on( 'click', '#rt_media_comment_form #rt_media_comment_submit', function( e ) {
 
 
1293
  var that = this;
1294
+ var widget_id = jQuery( this ).attr( 'widget_id' );
1295
+ var comment_form_el = jQuery( this ).closest('form');
1296
+ var comment_content_el = comment_form_el.find( '#comment_content' );
1297
+
1298
+ var show_error = false;
1299
+ var content = jQuery.trim( comment_content_el.val() );
1300
+
1301
+ comment_attached_id = comment_form_el.find( 'input[name="rtMedia_attached_files[]"]' ).val();
1302
+ if ( typeof comment_attached_id == 'undefined' && content == '' ) {
1303
+ show_error = 1;
1304
+ }else{
1305
+ if( comment_attached_id == '' && content == '' ){
1306
+ show_error = 2;
1307
+ }
1308
+ }
1309
+
1310
+ if( show_error ){
1311
 
 
 
1312
  rtmedia_single_media_alert_message( rtmedia_empty_comment_msg, 'warning' );
1313
+
1314
+ rtmedia_comment_media_input_button( widget_id, false );
1315
+
1316
  return false;
1317
  }
1318
 
1319
+
1320
  $( this ).attr( 'disabled', 'disabled' );
1321
 
1322
  // Sanitize comment content and escape html tags
1328
  data: comment_form_el.serialize() + '&rtajax=true',
1329
  success: function( data ) {
1330
  $( '#rtmedia-no-comments' ).remove();
1331
+
1332
  $( '#rtmedia_comment_ul' ).append( data );
1333
+
1334
  comment_content_el.val( '' );
1335
+
1336
+ rtmedia_comment_media_remove_hidden_media_id( widget_id );
1337
+
1338
+ rtmedia_comment_media_textbox_val( widget_id, false );
1339
+
1340
+ rtmedia_comment_media_input_button( widget_id, false );
1341
+
1342
+ rtmedia_apply_popup_to_media();
1343
+
1344
+ rtmedia_reset_video_and_audio_for_popup();
1345
+
1346
  rtMediaHook.call( 'rtmedia_js_after_comment_added', [ ] );
1347
+ },
1348
+ error: function( data ) {
1349
+
1350
+ /* Act on the event */
1351
+ rtmedia_comment_media_input_button( widget_id, false );
1352
+
1353
+ rtmedia_comment_media_remove_hidden_media_id( widget_id );
1354
  }
1355
  } );
1356
 
1384
  current_comment.closest( 'li' ).remove();
1385
  } );
1386
  } else {
1387
+ current_comment_parent.css( 'opacity', '1' );
1388
  }
1389
  rtMediaHook.call( 'rtmedia_js_after_comment_deleted', [ ] );
1390
  }
1472
  };
1473
  } );
1474
 
1475
+
1476
+ function rtmedia_selected_file_list( plupload, file, uploader, error, comment_media_id ) {
1477
  var icon = '', err_msg = '', upload_progress = '', title = '';
1478
 
1479
+ rtmedia_uploader_filelist = (typeof comment_media_id === "undefined") ? "#rtmedia_uploader_filelist" : "#rtmedia_uploader_filelist-"+comment_media_id;
1480
+ plupload_delete = (typeof comment_media_id === "undefined") ? "plupload_delete" : "plupload_delete-"+comment_media_id;
1481
+
1482
  if ( error == '' ) {
1483
  upload_progress = '<div class="plupload_file_progress ui-widget-header" style="width: 0%;">';
1484
  upload_progress += '</div>';
1506
  rtmedia_plupload_file += icon;
1507
  rtmedia_plupload_file += '</div>';
1508
  rtmedia_plupload_file += '<div class="plupload_file_action">';
1509
+ rtmedia_plupload_file += '<div class="plupload_action_icon ui-icon '+plupload_delete+'">';
1510
  rtmedia_plupload_file += '<span class="remove-from-queue dashicons dashicons-dismiss"></span>';
1511
  rtmedia_plupload_file += '</div>';
1512
  rtmedia_plupload_file += '</div>';
1517
  rtmedia_plupload_file += '</div>';
1518
  rtmedia_plupload_file += '</li>';
1519
 
1520
+ jQuery( rtmedia_plupload_file ).appendTo( rtmedia_uploader_filelist );
1521
  var type = file.type;
1522
  var media_title = file.name;
1523
  var ext = media_title.substring( media_title.lastIndexOf( '.' ) + 1, media_title.length );
1565
  history.pushState( obj, obj.Page, obj.Url );
1566
  }
1567
  }
1568
+
1569
+
1570
+
1571
+ /*
1572
+ * To change this template, choose Tools | Templates
1573
+ * and open the template in the editor.
1574
+ */
1575
+ var commentObj = {};
1576
+ var plupload_comment_main = {};
1577
+ var comment_media_wrapper = 'comment-media-wrapper-';
1578
+ var rtmedia_comment_media_submit = 'rtmedia-comment-media-submit-';
1579
+ var comment_media_add_button = 'rtmedia-comment-media-upload-';
1580
+ var comment_media_uplaod_media = 'rtMedia-start-upload-';
1581
+
1582
+
1583
+ jQuery(document).ready(function($) {
1584
+
1585
+ rtMediaHook.register( 'rtmedia_js_popup_after_content_added', function() {
1586
+ var popup_upload_comment = jQuery( '.rtmedia-single-container .rtmedia-single-meta .rtm-media-single-comments form' );
1587
+ rtmedia_comment_media_upload( popup_upload_comment );
1588
+ rtmedia_apply_popup_to_media();
1589
+ return true;
1590
+ } );
1591
+
1592
+ rtmedia_apply_popup_to_media();
1593
+ rtmedia_comment_media_single_page();
1594
+ rtmedia_activity_comment_js_add_media_id();
1595
+ rtmedia_activity_stream_comment_media();
1596
+ rtmedia_buddypress_load_newest_button_click();
1597
+ });
1598
+
1599
+
1600
+ function rtmedia_reset_video_and_audio(){
1601
+ jQuery( 'ul.activity-list li.activity-item div.rtmedia-item-thumbnail > audio.wp-audio-shortcode, ul.activity-list li.activity-item div.rtmedia-item-thumbnail > video.wp-video-shortcode' ).mediaelementplayer( {
1602
+ // If the <video width> is not specified, this is the default
1603
+ defaultVideoWidth: 480,
1604
+ // If the <video height> is not specified, this is the default
1605
+ defaultVideoHeight: 270
1606
+ } );
1607
+ }
1608
+
1609
+
1610
+ function rtmedia_on_activity_add(){
1611
+ setTimeout( function() {
1612
+ rtmedia_activity_stream_comment_media();
1613
+
1614
+ rtmedia_reset_video_and_audio();
1615
+
1616
+ rtmedia_apply_popup_to_media();
1617
+
1618
+ }, 1500 );
1619
+ }
1620
+
1621
+
1622
+ function rtmedia_single_page_popup_close(){
1623
+ /* on close of popup resize the video height */
1624
+ if( typeof rtmedia_media_size_config != 'undefined' ){
1625
+ if( typeof rtmedia_media_size_config.video.activity_media != 'undefined' ){
1626
+ jQuery( '.rtmedia-single-container .rtmedia-comment-media-container .mejs-container.mejs-video' ).css({
1627
+ 'height': rtmedia_media_size_config.video.activity_media.height,
1628
+ 'width': rtmedia_media_size_config.video.activity_media.width
1629
+ });
1630
+ }
1631
+ }
1632
+ }
1633
+
1634
+ function rtmedia_reset_video_and_audio_for_popup(){
1635
+ jQuery( '.rtm-lightbox-container .rtmedia-comments-container ul.rtm-comment-list li.rtmedia-comment div.rtmedia-item-thumbnail > audio.wp-audio-shortcode, .rtm-lightbox-container .rtmedia-comments-container ul.rtm-comment-list li.rtmedia-comment div.rtmedia-item-thumbnail > video.wp-video-shortcode' ).mediaelementplayer( {
1636
+ // If the <video width> is not specified, this is the default
1637
+ defaultVideoWidth: 200,
1638
+ // If the <video height> is not specified, this is the default
1639
+ defaultVideoHeight: 200
1640
+ } );
1641
+ }
1642
+
1643
+
1644
+ function rtmedia_comment_media_uplaod_button_disble( widget_id, $value ){
1645
+ if( typeof $value != 'undefined' ){
1646
+ jQuery( '#'+comment_media_add_button+widget_id ).prop( 'disabled', $value );
1647
+ }
1648
+ }
1649
+
1650
+ function rtmedia_apply_popup_to_media(){
1651
+ if ( typeof( rtmedia_lightbox_enabled ) != 'undefined' && rtmedia_lightbox_enabled == '1' ) {
1652
+ apply_rtMagnificPopup( '.rtmedia-comment-media-container ul.rtmedia-comment-media-list, .rtmedia-list-media.rtm-gallery-list, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content, .rtm-bbp-container, ul.rtm-comment-container' );
1653
+ }
1654
+ }
1655
+
1656
+
1657
+ function rtmedia_comment_media_enable_diable_media_comment( that ){
1658
+ var widget_id = jQuery( that ).attr( 'widget_id' );
1659
+ if( typeof widget_id != 'undefined' ){
1660
+ rtmedia_comment_media_uplaod_button_disble( widget_id, false );
1661
+ }else{
1662
+ jQuery( '.rt_media_comment_form_with_media .rtmedia-comment-media-upload' ).prop( 'disabled', false );
1663
+ }
1664
+ }
1665
+
1666
+
1667
+ function rtmedia_add_comment_media_button_click( widget_id ){
1668
+ jQuery( '.'+rtmedia_comment_media_submit+widget_id ).on( 'click', function( e ){
1669
+ e.preventDefault();
1670
+ var media = jQuery( this ).attr( 'media' );
1671
+ if( typeof media != 'undefined' && media == 1 ){
1672
+
1673
+ rtmedia_comment_media_input_button( widget_id, true );
1674
+
1675
+ rtmedia_comment_media_textbox_val( widget_id, true );
1676
+
1677
+ jQuery( this ).attr( 'media', 0 );
1678
+
1679
+ commentObj[ widget_id ].uploadFiles();
1680
+ return false;
1681
+ }
1682
+ });
1683
+ }
1684
+
1685
+
1686
+ function rtmedia_comment_media_input_button( widget_id, $value ){
1687
+
1688
+ rtmedia_comment_media_upload_button_post_disable( widget_id, $value );
1689
+
1690
+ rtmedia_comment_media_uplaod_button_disble( widget_id, $value );
1691
+
1692
+ rtmedia_uploaded_media_edit_disable( widget_id, $value );
1693
+ }
1694
+
1695
+
1696
+
1697
+ function rtmedia_uploaded_media_edit_disable( widget_id, $value ){
1698
+ if( $value ){
1699
+ jQuery( '.'+comment_media_wrapper+widget_id ).find( '.plupload_filelist_content .dashicons' ).hide()
1700
+ jQuery( '.'+comment_media_wrapper+widget_id ).find( '.plupload_file_action' ).hide()
1701
+ }else{
1702
+ jQuery( '.'+comment_media_wrapper+widget_id ).find( '.plupload_file_action' ).show()
1703
+ jQuery( '.'+comment_media_wrapper+widget_id ).find( '.plupload_filelist_content .dashicons' ).show()
1704
+ }
1705
+ }
1706
+
1707
+ function rtmedia_disable_comment_textbox( widget_id, value ){
1708
+ var form_class = '.'+comment_media_wrapper+widget_id;
1709
+ if( jQuery( form_class ).length > 0 ){
1710
+ comment_string = jQuery( form_class ).find( 'textarea' ).val();
1711
+ if( comment_string.includes( '&nbsp;' ) ){
1712
+ jQuery( form_class ).find('textarea.ac-input').val( '' );
1713
+ }
1714
+
1715
+ jQuery( form_class ).find( 'textarea' ).prop('disabled', value );
1716
+ jQuery( form_class ).find( 'textarea' ).css( 'color', '' );
1717
+ }
1718
+ }
1719
+
1720
+
1721
+ function rtmedia_comment_media_textbox_val( widget_id, $value ){
1722
+ var form_class = '.'+comment_media_wrapper+widget_id;
1723
+ if( jQuery( form_class ).length > 0 ){
1724
+ if( jQuery( form_class ).find('textarea.ac-input').length > 0 ){
1725
+ if( $value == true ){
1726
+ var textarea = jQuery( form_class ).find('textarea.ac-input').val();
1727
+ if( textarea == "" ){
1728
+ jQuery( form_class ).find('textarea.ac-input').val( '&nbsp;' );
1729
+ jQuery( form_class ).find( 'textarea' ).css( 'color', 'transparent' );
1730
+ }
1731
+ }else{
1732
+ jQuery( form_class ).find('textarea.ac-input').val( '' );
1733
+ jQuery( form_class ).find( 'textarea' ).css( 'color', '' );
1734
+ }
1735
+ }
1736
+ }
1737
+ }
1738
+
1739
+
1740
+ function rtmedia_comment_media_upload_button_post_disable( widget_id, $value ){
1741
+ if( typeof $value != 'undefined' ){
1742
+ jQuery( '.'+rtmedia_comment_media_submit+widget_id ).prop( 'disabled', $value );
1743
+ if( $value == true ){
1744
+ jQuery( '.'+rtmedia_comment_media_submit+widget_id ).closest( 'div.ac-reply-content' ).find( 'a.ac-reply-cancel' ).attr("disabled", "disabled");
1745
+ }else{
1746
+ jQuery( '.'+rtmedia_comment_media_submit+widget_id ).closest( 'div.ac-reply-content' ).find( 'a.ac-reply-cancel' ).removeAttr("disabled");
1747
+ }
1748
+ }
1749
+ }
1750
+
1751
+
1752
+
1753
+ function rtmedia_comment_media_remove_hidden_media_id( widget_id ){
1754
+ jQuery( '.'+comment_media_wrapper+widget_id ).find( 'input[name="rtMedia_attached_files[]"]' ).remove();
1755
+ }
1756
+
1757
+
1758
+
1759
+ function rtmedia_activity_comment_js_add_media_id(){
1760
+ jQuery.ajaxPrefilter( function( options, originalOptions, jqXHR ) {
1761
+ // Modify options, control originalOptions, store jqXHR, etc
1762
+ try {
1763
+ if ( originalOptions.data == null || typeof ( originalOptions.data ) == 'undefined' || typeof ( originalOptions.data.action ) == 'undefined' ) {
1764
+ return true;
1765
+ }
1766
+ } catch ( e ) {
1767
+ return true;
1768
+ }
1769
+
1770
+ if ( originalOptions.data.action == 'new_activity_comment' ) {
1771
+ widget_id = 'activity-'+originalOptions.data.form_id
1772
+
1773
+ var rtmedia_disable_media = 1;
1774
+ if( typeof rtmedia_disable_media_in_commented_media != 'undefined' ){
1775
+ rtmedia_disable_media = rtmedia_disable_media_in_commented_media;
1776
+ }
1777
+
1778
+ var temp = jQuery( '.'+comment_media_wrapper+widget_id ).find( 'input[name="rtMedia_attached_files[]"]' ).val();
1779
+
1780
+ if( typeof temp == 'undefined' ){
1781
+ temp = 0;
1782
+ }
1783
+
1784
+ if( typeof temp == '' ){
1785
+ temp = 0;
1786
+ }
1787
+ options.data += '&rtMedia_attached_files[]=' + temp;
1788
+ options.data += '&rtmedia_disable_media_in_commented_media=' + rtmedia_disable_media;
1789
+
1790
+ activity_attachemnt_ids = temp;
1791
+
1792
+ var orignalSuccess = originalOptions.success;
1793
+
1794
+ options.beforeSend = function() {
1795
+ if ( originalOptions.data.action == 'new_activity_comment' ) {
1796
+
1797
+ if( rtmedia_disable_media == 1 ){
1798
+ if( originalOptions.data.form_id != originalOptions.data.comment_id && temp > 0 ){
1799
+ jQuery( '.'+comment_media_wrapper+widget_id ).append('<div id="message" class="error bp-ajax-message" style="display: block;"><p> ' + rtmedia_disable_media_in_commented_media_text + ' </p></div>')
1800
+ jQuery( '.'+comment_media_wrapper+widget_id ).removeAttr( 'disabled' );
1801
+
1802
+ rtmedia_comment_media_input_button( widget_id, false );
1803
+
1804
+ rtmedia_disable_comment_textbox( widget_id, false );
1805
+
1806
+ return false;
1807
+ }
1808
+ }
1809
+ }
1810
+ };
1811
+ options.success = function( response ) {
1812
+ orignalSuccess( response );
1813
+ if ( response[0] + response[1] == '-1' ) {
1814
+ //Error
1815
+
1816
+ } else {
1817
+ if ( originalOptions.data.action == 'new_activity_comment' ) {
1818
+
1819
+ rtmedia_comment_media_remove_hidden_media_id( widget_id );
1820
+
1821
+ rtmedia_comment_media_textbox_val( widget_id, false );
1822
+
1823
+ rtmedia_comment_media_input_button( widget_id, false );
1824
+
1825
+ setTimeout( function() {
1826
+ rtmedia_apply_popup_to_media();
1827
+
1828
+ rtmedia_reset_video_and_audio();
1829
+
1830
+ }, 500 );
1831
+
1832
+ rtMediaHook.call( 'rtmedia_js_after_comment_added', [ ] );
1833
+ }
1834
+ }
1835
+
1836
+ };
1837
+ options.error = function() {
1838
+ if ( originalOptions.data.action == 'new_activity_comment' ) {
1839
+
1840
+ rtmedia_comment_media_remove_hidden_media_id( widget_id );
1841
+
1842
+ rtmedia_comment_media_textbox_val( widget_id, false );
1843
+
1844
+ rtmedia_comment_media_input_button( widget_id, false );
1845
+ }
1846
+ };
1847
+ }
1848
+ } );
1849
+ }
1850
+
1851
+
1852
+ function rtmedia_buddypress_load_newest_button_click(){
1853
+ jQuery( 'body #buddypress' ).on('click', 'ul.activity-list li.load-newest a', function(e) {
1854
+ e.preventDefault();
1855
+ /* add the popup to the images */
1856
+ rtmedia_apply_popup_to_media();
1857
+ /* add the uplaod button to the new activity */
1858
+ rtmedia_activity_stream_comment_media();
1859
+ });
1860
+ }
1861
+
1862
+
1863
+ function rtmedia_comment_media_upload_button_class( widget_id ){
1864
+ jQuery( 'form.'+comment_media_wrapper+widget_id ).find( 'input[type="submit"].rt_media_comment_submit' ).addClass( rtmedia_comment_media_submit+widget_id );
1865
+ jQuery( 'form.'+comment_media_wrapper+widget_id ).find( 'input[name="ac_form_submit"]' ).addClass( rtmedia_comment_media_submit+widget_id );
1866
+ rtmedia_add_widget_id_in_submit_button( widget_id );
1867
+ }
1868
+
1869
+ function rtmedia_add_widget_id_in_submit_button( widget_id ){
1870
+ jQuery( '.'+rtmedia_comment_media_submit+widget_id ).attr( 'widget_id', widget_id );
1871
+ }
1872
+
1873
+
1874
+
1875
+ function rtmedia_comment_media_upload_button_has_media( widget_id ,$value ){
1876
+ if( typeof $value != 'undefined' ){
1877
+ jQuery( '.'+rtmedia_comment_media_submit+widget_id ).attr( 'media', $value );
1878
+ }
1879
+ }
1880
+
1881
+ function rtmedia_comment_media_media_id( widget_id, media_id ){
1882
+ if ( jQuery( '.'+comment_media_wrapper+widget_id ).find( '#rtmedia_attached_id_' + media_id ).length < 1 ) {
1883
+
1884
+ rtmedia_comment_media_remove_hidden_media_id( widget_id );
1885
+
1886
+ jQuery( '.'+comment_media_wrapper+widget_id ).append( '<input type=\'hidden\' name=\'rtMedia_attached_files[]\' data-mode=\'rtmedia-update\' id=\'rtmedia_attached_id_' + media_id + '\' value=\'' +
1887
+ media_id + '\' />' );
1888
+ }
1889
+ }
1890
+
1891
+ function rtmedia_add_comment_media_button_trigger( widget_id ){
1892
+ if( jQuery( '.'+rtmedia_comment_media_submit+widget_id ).length > 0 ){
1893
+ jQuery( '.'+rtmedia_comment_media_submit+widget_id ).trigger('click');
1894
+ }
1895
+ }
1896
+
1897
+
1898
+ function renderUploadercomment_media( widget_id, parent_id_type ) {
1899
+ var button = comment_media_add_button+widget_id;
1900
+
1901
+ //sidebar widget uploader config script
1902
+ if ( jQuery( '#'+button ).length > 0 && jQuery( "#"+button ).closest( 'form' ).find( 'input[type="file"]' ).length == 0 ) {
1903
+
1904
+ jQuery( '#'+button ).closest('form').addClass( comment_media_wrapper+widget_id );
1905
+
1906
+
1907
+ rtmedia_comment_media_upload_button_class( widget_id );
1908
+
1909
+ if ( typeof rtMedia_update_plupload_comment == 'undefined' ) {
1910
+ return false;
1911
+ }
1912
+
1913
+ var plupload_comment = rtMedia_update_plupload_comment
1914
+ plupload_comment.browse_button = button;
1915
+ plupload_comment.container = 'rtmedia-comment-media-upload-container-'+widget_id;
1916
+
1917
+
1918
+ plupload_comment_main[ widget_id ] = plupload_comment;
1919
+
1920
+ commentObj[widget_id] = new UploadView(eval( plupload_comment_main[ widget_id ] ));
1921
+
1922
+ commentObj[widget_id].initUploader(false);
1923
+
1924
+
1925
+
1926
+ var form_html = jQuery( "."+comment_media_wrapper+widget_id );
1927
+ if( jQuery( form_html ).find('div.rtmedia-plupload-container').length ){
1928
+ if( parent_id_type == "activity" ){
1929
+ form_html.find('.ac-reply-content .ac-textarea').after( form_html.find('div.rtmedia-plupload-container .rtmedia-comment-media-upload') );
1930
+ }
1931
+
1932
+ if( parent_id_type == "rtmedia" ){
1933
+ form_html.find('textarea').after( form_html.find('div.rtmedia-plupload-container .rtmedia-comment-media-upload') );
1934
+ }
1935
+ }
1936
+
1937
+
1938
+ jQuery("#"+comment_media_uplaod_media+widget_id).hide();
1939
+
1940
+ jQuery("#"+comment_media_uplaod_media+widget_id).click(function(e) {
1941
+
1942
+ //Enable 'post update' button when media get select
1943
+ rtmedia_comment_media_upload_button_post_disable( widget_id, true );
1944
+
1945
+ commentObj[widget_id].uploadFiles(e);
1946
+ commentObj[ widget_id ].uploader.refresh();
1947
+ });
1948
+
1949
+ rtmedia_add_comment_media_button_click( widget_id );
1950
+
1951
+
1952
+ commentObj[widget_id].uploader.bind('FilesAdded', function(upl, rfiles) {
1953
+
1954
+ /* doest not allow multipal uplaod in comment media */
1955
+ while (upl.files.length > 1) {
1956
+ upl.removeFile(upl.files[0]);
1957
+ }
1958
+
1959
+ /* remove the last file that has being added to the comment media */
1960
+ commentObj[ widget_id ].upload_remove_array = [ ];
1961
+ jQuery( '#rtmedia_uploader_filelist-'+widget_id+' li.plupload_queue_li' ).remove();
1962
+
1963
+ rtmedia_comment_media_upload_button_has_media( widget_id, 1 );
1964
+
1965
+ jQuery.each( rfiles, function( i, file ) {
1966
+
1967
+ //Set file title along with file
1968
+ rtm_file_name_array = file.name.split( '.' );
1969
+ file.title = rtm_file_name_array[0];
1970
+
1971
+ var hook_respo = rtMediaHook.call( 'rtmedia_js_file_added', [ upl, file, '#rtmedia_uploader_filelist-'+widget_id ] );
1972
+
1973
+ if ( hook_respo == false ) {
1974
+ file.status = -1;
1975
+ commentObj[ widget_id ].upload_remove_array.push( file.id );
1976
+ return true;
1977
+ }
1978
+
1979
+ if ( commentObj[ widget_id ].uploader.settings.max_file_size < file.size ) {
1980
+ return true;
1981
+ }
1982
+
1983
+ var tmp_array = file.name.split( '.' );
1984
+
1985
+ if ( rtmedia_version_compare( rtm_wp_version, '3.9' ) ) { // Plupload getting updated in 3.9
1986
+ var ext_array = commentObj[ widget_id ].uploader.settings.filters.mime_types[0].extensions.split( ',' );
1987
+ } else {
1988
+ var ext_array = commentObj[ widget_id ].uploader.settings.filters[0].extensions.split( ',' );
1989
+ }
1990
+ if ( tmp_array.length > 1 ) {
1991
+ var ext = tmp_array[tmp_array.length - 1];
1992
+ ext = ext.toLowerCase();
1993
+ if ( jQuery.inArray( ext, ext_array ) === -1 ) {
1994
+ return true;
1995
+ }
1996
+ } else {
1997
+ return true;
1998
+ }
1999
+
2000
+ rtmedia_selected_file_list( plupload, file, '', '', widget_id );
2001
+
2002
+ //Delete Function
2003
+ jQuery( "#" + file.id + " .plupload_delete-" + widget_id + " .remove-from-queue" ).click( function ( e ) {
2004
+ e.preventDefault();
2005
+
2006
+ /* submit button with no media */
2007
+ jQuery( "."+rtmedia_comment_media_submit+widget_id ).attr( 'media', '0' );
2008
+
2009
+ commentObj[widget_id].uploader.removeFile(upl.getFile(file.id));
2010
+ jQuery("#" + file.id).remove();
2011
+ return false;
2012
+ });
2013
+
2014
+ // To change the name of the uploading file
2015
+ jQuery( '#label_' + file.id ).click( function( e ) {
2016
+ e.preventDefault();
2017
+
2018
+ rtm_file_label = this;
2019
+
2020
+ rtm_file_title_id = 'text_' + file.id;
2021
+ rtm_file_title_input = '#' + rtm_file_title_id;
2022
+
2023
+ rtm_file_title_wrapper_id = 'rtm_title_wp_' + file.id;
2024
+ rtm_file_title_wrapper = '#' + rtm_file_title_wrapper_id;
2025
+
2026
+ rtm_file_desc_id = 'rtm_desc_' + file.id;
2027
+ rtm_file_desc_input = '#' + rtm_file_desc_id;
2028
+
2029
+ rtm_file_desc_wrapper_id = 'rtm_desc_wp_' + file.id;
2030
+ rtm_file_desc_wrapper = '#' + rtm_file_desc_wrapper_id;
2031
+
2032
+ rtm_file_save_id = 'save_' + file.id;
2033
+ rtm_file_save_el = '#' + rtm_file_save_id;
2034
+
2035
+ jQuery( rtm_file_label ).hide();
2036
+ jQuery( rtm_file_label ).siblings( '.plupload_file_name_wrapper' ).hide();
2037
+
2038
+ // Show/create text box to edit media title
2039
+ if ( jQuery( rtm_file_title_input ).length === 0 ) {
2040
+ jQuery( rtm_file_label ).parent( '.plupload_file_name' ).prepend( '<div id="' + rtm_file_title_wrapper_id + '" class="rtm-upload-edit-title-wrapper"><label>' + rtmedia_edit_media_info_upload.title + '</label><input type="text" class="rtm-upload-edit-title" id="' + rtm_file_title_id + '" value="' + file.title + '" style="width: 75%;" /></div><div id="' + rtm_file_desc_wrapper_id + '" class="rtm-upload-edit-desc-wrapper"><label>' + rtmedia_edit_media_info_upload.description + '</label><textarea class="rtm-upload-edit-desc" id="' + rtm_file_desc_id + '"></textarea></div><span id="' + rtm_file_save_id + '" title="Save Change" class="rtmicon dashicons dashicons-yes"></span>' );
2041
+ } else {
2042
+ jQuery( rtm_file_title_wrapper ).show();
2043
+ jQuery( rtm_file_desc_wrapper ).show();
2044
+ jQuery( rtm_file_save_el ).show();
2045
+ }
2046
+
2047
+ jQuery( rtm_file_title_input ).focus();
2048
+
2049
+ } );
2050
+
2051
+ rtm_file_save_id = 'save_' + file.id;
2052
+ rtm_file_save_el = '#' + rtm_file_save_id;
2053
+ jQuery( document.body ).on('click', rtm_file_save_el , function( e ) {
2054
+ e.preventDefault();
2055
+ rtm_file_title_id = 'text_' + file.id;
2056
+ rtm_file_title_input = '#' + rtm_file_title_id;
2057
+
2058
+ rtm_file_desc_id = 'rtm_desc_' + file.id;
2059
+ rtm_file_desc_input = '#' + rtm_file_desc_id;
2060
+
2061
+ rtm_file_title_wrapper_id = 'rtm_title_wp_' + file.id;
2062
+ rtm_file_title_wrapper = '#' + rtm_file_title_wrapper_id;
2063
+
2064
+ rtm_file_desc_wrapper_id = 'rtm_desc_wp_' + file.id;
2065
+ rtm_file_desc_wrapper = '#' + rtm_file_desc_wrapper_id;
2066
+
2067
+ var file_title_val = jQuery( rtm_file_title_input ).val();
2068
+ var file_desc_val = jQuery( rtm_file_desc_input ).val();
2069
+
2070
+ rtm_file_label = '#label_' + file.id;
2071
+
2072
+ var file_name_wrapper_el = jQuery( rtm_file_label ).siblings( '.plupload_file_name_wrapper' );
2073
+
2074
+ if ( file_title_val != '' ) {
2075
+ file_name_wrapper_el.text( file_title_val + '.' + rtm_file_name_array[ 1 ] );
2076
+ file.title = file_title_val;
2077
+ }
2078
+
2079
+ if ( file_desc_val != '' ) {
2080
+ file.description = file_desc_val;
2081
+ }
2082
+
2083
+ jQuery( rtm_file_title_wrapper ).hide();
2084
+ jQuery( rtm_file_desc_wrapper ).hide();
2085
+ file_name_wrapper_el.show();
2086
+ jQuery( rtm_file_label ).siblings( '.plupload_file_name_wrapper' );
2087
+ jQuery( rtm_file_label ).show();
2088
+ jQuery( this ).hide();
2089
+ } );
2090
+ } );
2091
+
2092
+ jQuery.each( commentObj[ widget_id ].upload_remove_array, function( i, rfile ) {
2093
+ if ( upl.getFile( rfile ) ) {
2094
+ upl.removeFile( upl.getFile( rfile ) );
2095
+ }
2096
+ } );
2097
+
2098
+ rtMediaHook.call( 'rtmedia_js_after_files_added', [ upl, rfiles ] );
2099
+
2100
+ if ( typeof rtmedia_direct_upload_enabled != 'undefined' && rtmedia_direct_upload_enabled == '1' ) {
2101
+
2102
+ var allow_upload = rtMediaHook.call( 'rtmedia_js_upload_file', true );
2103
+ if ( allow_upload == false ) {
2104
+ return false;
2105
+ }
2106
+
2107
+ /* when direct upload is enable */
2108
+ jQuery( '.'+rtmedia_comment_media_submit+widget_id ).trigger( 'click' );
2109
+ }
2110
+ });
2111
+
2112
+
2113
+ commentObj[ widget_id ].uploader.bind( 'FileUploaded', function( up, file, res ) {
2114
+ if ( /MSIE (\d+\.\d+);/.test( navigator.userAgent ) ) { //Test for MSIE x.x;
2115
+ var ieversion = new Number( RegExp.jQuery1 ); // Capture x.x portion and store as a number
2116
+
2117
+ if ( ieversion < 10 ) {
2118
+ try {
2119
+ if ( typeof JSON.parse( res.response ) !== 'undefined' ) {
2120
+ res.status = 200;
2121
+ }
2122
+ } catch ( e ) {
2123
+ }
2124
+ }
2125
+ }
2126
+
2127
+ if ( res.status == 200 ) {
2128
+ try {
2129
+ var objIds = JSON.parse( res.response );
2130
+ jQuery.each( objIds, function( key, val ) {
2131
+ /* after id of the images get */
2132
+ rtmedia_comment_media_upload_button_post_disable( widget_id, false );
2133
+ rtmedia_comment_media_media_id( widget_id, val );
2134
+ rtmedia_add_comment_media_button_trigger( widget_id );
2135
+ } );
2136
+ } catch ( e ) {
2137
+
2138
+ }
2139
+ rtMediaHook.call( 'rtmedia_js_after_file_upload', [ up, file, res.response ] );
2140
+ }
2141
+ } );
2142
+
2143
+
2144
+ commentObj[ widget_id ].uploader.bind( 'Error', function( up, err ) {
2145
+
2146
+ rtmedia_comment_media_upload_button_post_disable( widget_id, false );
2147
+
2148
+ if ( err.code == -600 ) { //File size error // if file size is greater than server's max allowed size
2149
+ var tmp_array;
2150
+ var ext = tr = '';
2151
+ tmp_array = err.file.name.split( '.' );
2152
+ if ( tmp_array.length > 1 ) {
2153
+
2154
+ ext = tmp_array[tmp_array.length - 1];
2155
+ if ( ! ( typeof ( up.settings.upload_size ) != 'undefined' && typeof ( up.settings.upload_size[ext] ) != 'undefined' && ( up.settings.upload_size[ext]['size'] < 1 || ( up.settings.upload_size[ext]['size'] * 1024 * 1024 ) >= err.file.size ) ) ) {
2156
+ rtmedia_selected_file_list( plupload, err.file, up, err );
2157
+ }
2158
+ }
2159
+ } else {
2160
+ if ( err.code == -601 ) { // File extension error
2161
+ err.message = rtmedia_file_extension_error_msg;
2162
+ }
2163
+
2164
+ rtmedia_selected_file_list( plupload, err.file, '', err, widget_id );
2165
+ }
2166
+
2167
+ jQuery( '.plupload_delete-'+widget_id ).on( 'click', function( e ) {
2168
+ e.preventDefault();
2169
+
2170
+ /* submit button with no media */
2171
+ jQuery( "."+rtmedia_comment_media_submit+widget_id ).attr( 'media', '0' );
2172
+
2173
+ jQuery( this ).parent().parent( 'li' ).remove();
2174
+ } );
2175
+
2176
+ return false;
2177
+ } );
2178
+
2179
+
2180
+ commentObj[ widget_id ].uploader.bind( 'BeforeUpload', function( up, files ) {
2181
+ jQuery.each( commentObj[ widget_id ].upload_remove_array, function( i, rfile ) {
2182
+ if ( up.getFile( rfile ) ) {
2183
+ up.removeFile( up.getFile( rfile ) );
2184
+ }
2185
+ } );
2186
+
2187
+ item_id = 0;
2188
+ object = 'profile';
2189
+
2190
+ up.settings.multipart_params.context = object;
2191
+ up.settings.multipart_params.comment_media_activity_id = widget_id;
2192
+ up.settings.multipart_params.context_id = item_id;
2193
+ up.settings.multipart_params.rtmedia_update = true;
2194
+ up.settings.multipart_params.activity_id = 'null';
2195
+ up.settings.multipart_params.title = files.title.split( '.' )[ 0 ];
2196
+
2197
+ if ( typeof files.description != 'undefined' ) {
2198
+ up.settings.multipart_params.description = files.description;
2199
+ } else {
2200
+ up.settings.multipart_params.description = '';
2201
+ }
2202
+ } );
2203
+
2204
+ commentObj[ widget_id ].uploader.bind( 'UploadComplete', function( up, files ) {
2205
+
2206
+ jQuery( '#rtmedia_uploader_filelist-'+widget_id+' li').remove();
2207
+
2208
+ window.onbeforeunload = null;
2209
+ } );
2210
+
2211
+ commentObj[ widget_id ].uploader.bind( 'UploadProgress', function( up, file ) {
2212
+ jQuery( '#' + file.id + ' .plupload_file_status' ).html( '<div class="plupload_file_progress ui-widget-header" style="width: ' + file.percent + '%;"></div>' );
2213
+ jQuery( '#' + file.id ).addClass( 'upload-progress' );
2214
+ if ( file.percent == 100 ) {
2215
+ jQuery( '#' + file.id ).toggleClass( 'upload-success' );
2216
+ }
2217
+
2218
+ window.onbeforeunload = function( evt ) {
2219
+ var message = rtmedia_upload_progress_error_message;
2220
+ return message;
2221
+ };
2222
+ } );
2223
+
2224
+ commentObj[widget_id].uploader.refresh();//refresh the uploader for opera/IE fix on media page
2225
+ }
2226
+ }
2227
+
2228
+ function rtmedia_comment_media_upload( upload_comment ){
2229
+ if( typeof upload_comment != 'undefined' ){
2230
+ if( jQuery( upload_comment ).find( '.rt_upload_hf_upload_parent_id' ).length > 0 ){
2231
+ var parent_id = jQuery( upload_comment ).find( '.rt_upload_hf_upload_parent_id' ).val();
2232
+ var parent_id_type = jQuery( upload_comment ).find( '.rt_upload_hf_upload_parent_id_type' ).val();
2233
+ if( typeof parent_id != 'undefined' && typeof parent_id_type != 'undefined' ){
2234
+ var widget_id = parent_id_type+ '-' +parent_id;
2235
+
2236
+ renderUploadercomment_media( widget_id , parent_id_type );
2237
+ }
2238
+ }
2239
+ }
2240
+ }
2241
+
2242
+
2243
+ function rtmedia_activity_stream_comment_media(){
2244
+ jQuery('#buddypress ul#activity-stream li.activity-item').each(function () {
2245
+ if( jQuery( this ).find( '.rt_upload_hf_upload_parent_id' ).length && jQuery( this ).find( '.rt_upload_hf_upload_parent_id_type' ).length ){
2246
+ rtmedia_comment_media_upload( this );
2247
+ }
2248
+ });
2249
+ }
2250
+
2251
+
2252
+
2253
+
2254
+ function rtmedia_comment_media_single_page(){
2255
+ var single_upload_comment = jQuery( '.rtmedia-single-container .rtmedia-single-meta .rtmedia-item-comments form' );
2256
+ rtmedia_comment_media_upload( single_upload_comment );
2257
+ }
2258
+
2259
+
2260
+ function rtmedia_disable_popup_navigation_comment_media_focus() {
2261
+ rtmedia_disable_popup_navigation( '.plupload_filelist_content li input.rtm-upload-edit-title' );
2262
+ rtmedia_disable_popup_navigation( '.plupload_filelist_content li textarea.rtm-upload-edit-desc' );
2263
+ }
2264
+
2265
+
2266
+ function rtmedia_disable_popup_navigation( $selector ){
2267
+ jQuery( document ).on( 'focusin', $selector, function() {
2268
+ jQuery( document ).unbind( 'keydown' );
2269
+ } );
2270
+
2271
+ jQuery( document ).on( 'focusout', $selector, function() {
2272
+ var rtm_mfp = jQuery.magnificPopup.instance;
2273
+ jQuery( document ).on( 'keydown', function( e ) {
2274
+ if ( e.keyCode === 37 ) {
2275
+ rtm_mfp.prev();
2276
+ } else if ( e.keyCode === 39 ) {
2277
+ rtm_mfp.next();
2278
+ }
2279
+ } );
2280
+ } );
2281
+ }
app/assets/js/rtMedia.js CHANGED
@@ -1,5 +1,6 @@
1
  var rtMagnificPopup;
2
  var rtm_masonry_container;
 
3
  function apply_rtMagnificPopup( selector ) {
4
  jQuery( 'document' ).ready( function( $ ) {
5
  var rt_load_more = '';
@@ -46,7 +47,7 @@ function apply_rtMagnificPopup( selector ) {
46
  if ( ! li.is( 'li' ) ) {
47
  li = li.parent();
48
  }
49
- if ( li.is( ':nth-last-child(2)' ) || li.is( ':last-child' ) ) { // If its last second media
50
  var last_li = li.next();
51
  if ( jQuery( '#rtMedia-galary-next' ).css( 'display' ) == 'block' ) { // If more medias are available
52
  jQuery( '#rtMedia-galary-next' ).click(); // Load more
@@ -65,8 +66,10 @@ function apply_rtMagnificPopup( selector ) {
65
  settings.pluginPath = _wpmejsSettings.pluginPath;
66
  }
67
  var $single_meta_h = jQuery( ".rtmedia-container .rtmedia-single-meta" ).height();
68
- $( '.mfp-content .wp-audio-shortcode,.mfp-content .wp-video-shortcode,.mfp-content .bp_media_content video' ).attr( 'autoplay', true );
69
- $( '.mfp-content .wp-audio-shortcode,.mfp-content .wp-video-shortcode,.mfp-content .bp_media_content video' ).mediaelementplayer( {
 
 
70
  // If the <video width> is not specified, this is the default
71
  defaultVideoWidth: 480,
72
  // If the <video height> is not specified, this is the default
@@ -86,7 +89,15 @@ function apply_rtMagnificPopup( selector ) {
86
  }
87
  }, false);
88
  // Call the play method
89
- mediaElement.play();
 
 
 
 
 
 
 
 
90
  }
91
  } );
92
  $( '.mfp-content .mejs-audio .mejs-controls' ).css( 'position', 'relative' );
@@ -98,10 +109,14 @@ function apply_rtMagnificPopup( selector ) {
98
  $( '#comment_content' ).bp_mentions( bp.mentions.users );
99
  }
100
  }
 
 
 
 
101
  },
102
  close: function( e ) {
103
  //Console.log(e);
104
- rtmedia_init_action_dropdown();
105
  },
106
  BeforeChange: function( e ) {
107
  //Console.log(e);
@@ -145,12 +160,12 @@ var rtMediaHook = {
145
  };
146
 
147
  //Drop-down js
148
- function rtmedia_init_action_dropdown() {
149
  var all_ul;
150
  var curr_ul;
151
- jQuery( '.click-nav > span, .click-nav > div' ).toggleClass( 'no-js js' );
152
- jQuery( '.click-nav .js ul' ).hide();
153
- jQuery( '.click-nav .clicker' ).click( function( e ) {
154
  all_ul = jQuery( '#rtm-media-options .click-nav .clicker' ).next( 'ul' );
155
  curr_ul = jQuery( this ).next( 'ul' );
156
  jQuery.each( all_ul, function( index, value ) {
@@ -263,6 +278,10 @@ jQuery( 'document' ).ready( function( $ ) {
263
  defaultVideoHeight: 270
264
  } );
265
 
 
 
 
 
266
  rtMediaHook.call( 'rtmedia_js_after_activity_added', [ ] );
267
  };
268
  }
@@ -438,17 +457,23 @@ jQuery( 'document' ).ready( function( $ ) {
438
  rtmedia_media_view_counts();
439
  rtmedia_init_media_deleting();
440
  mfp = jQuery.magnificPopup.instance;
441
- if ( jQuery( mfp.items ).size() > 1 ) {
442
- rtmedia_init_popup_navigation();
443
- }
 
 
 
444
 
445
  rtmedia_disable_popup_navigation_comment_focus();
 
 
 
446
  var height = $( window ).height();
447
  jQuery( '.rtm-lightbox-container .mejs-video' ).css( { 'height': height * 0.8, 'over-flow': 'hidden' } );
448
  jQuery( '.mfp-content .rtmedia-media' ).css( { 'max-height': height * 0.87, 'over-flow': 'hidden' } );
449
  //Mejs-video
450
  //init the options dropdown menu
451
- rtmedia_init_action_dropdown();
452
  //Get focus on comment textarea when comment-link is clicked
453
  jQuery( '.rtmedia-comment-link' ).on( 'click', function( e ) {
454
  e.preventDefault();
@@ -501,20 +526,18 @@ jQuery( 'document' ).ready( function( $ ) {
501
  } );
502
  }
503
 
 
 
 
 
 
 
 
 
 
 
504
  function rtmedia_disable_popup_navigation_comment_focus() {
505
- jQuery( document ).on( 'focusin', '#comment_content', function() {
506
- jQuery( document ).unbind( 'keydown' );
507
- } );
508
- jQuery( document ).on( 'focusout', '#comment_content', function() {
509
- var rtm_mfp = jQuery.magnificPopup.instance;
510
- jQuery( document ).on( 'keydown', function( e ) {
511
- if ( e.keyCode === 37 ) {
512
- rtm_mfp.prev();
513
- } else if ( e.keyCode === 39 ) {
514
- rtm_mfp.next();
515
- }
516
- } );
517
- } );
518
  }
519
 
520
  var dragArea = jQuery( '#drag-drop-area' );
@@ -587,7 +610,7 @@ jQuery( 'document' ).ready( function( $ ) {
587
  }
588
  } );
589
 
590
- rtmedia_init_action_dropdown();
591
 
592
  $( document ).click( function() {
593
  if ( $( '.click-nav ul' ).is( ':visible' ) ) {
@@ -634,9 +657,9 @@ jQuery( 'document' ).ready( function( $ ) {
634
  jQuery( this ).addClass( 'active' );
635
 
636
  if ( class_name != 'rtm-upload-tab' ) {
637
- jQuery( 'div.moxie-shim' ).children( 'input[type=file]' ).hide();
638
  } else {
639
- jQuery( 'div.moxie-shim' ).children( 'input[type=file]' ).show();
640
  }
641
  }
642
  });
1
  var rtMagnificPopup;
2
  var rtm_masonry_container;
3
+ var comment_media = false;
4
  function apply_rtMagnificPopup( selector ) {
5
  jQuery( 'document' ).ready( function( $ ) {
6
  var rt_load_more = '';
47
  if ( ! li.is( 'li' ) ) {
48
  li = li.parent();
49
  }
50
+ if ( ( li.is( ':nth-last-child(2)' ) || li.is( ':last-child' ) ) && li.find( 'a' ).hasClass('rtmedia-list-item-a') ) { // If its last second media
51
  var last_li = li.next();
52
  if ( jQuery( '#rtMedia-galary-next' ).css( 'display' ) == 'block' ) { // If more medias are available
53
  jQuery( '#rtMedia-galary-next' ).click(); // Load more
66
  settings.pluginPath = _wpmejsSettings.pluginPath;
67
  }
68
  var $single_meta_h = jQuery( ".rtmedia-container .rtmedia-single-meta" ).height();
69
+ /* adding auto play button in the popup */
70
+ $( '.mfp-content .rtmedia-single-media .wp-audio-shortcode,.mfp-content .rtmedia-single-media .wp-video-shortcode,.mfp-content .rtmedia-single-media .bp_media_content video' ).attr( 'autoplay', true );
71
+
72
+ $( '.mfp-content .rtmedia-single-media .wp-audio-shortcode,.mfp-content .rtmedia-single-media .wp-video-shortcode,.mfp-content .rtmedia-single-media .bp_media_content video' ).mediaelementplayer( {
73
  // If the <video width> is not specified, this is the default
74
  defaultVideoWidth: 480,
75
  // If the <video height> is not specified, this is the default
89
  }
90
  }, false);
91
  // Call the play method
92
+ if( $( window ).width() < 760 ){
93
+ window.addEventListener('touchstart', function videoStart() {
94
+ mediaElement.play();
95
+ // remove from the window and call the function we are removing
96
+ this.removeEventListener('touchstart', videoStart);
97
+ });
98
+ } else {
99
+ mediaElement.play();
100
+ }
101
  }
102
  } );
103
  $( '.mfp-content .mejs-audio .mejs-controls' ).css( 'position', 'relative' );
109
  $( '#comment_content' ).bp_mentions( bp.mentions.users );
110
  }
111
  }
112
+
113
+ rtmedia_reset_video_and_audio_for_popup();
114
+
115
+ apply_rtMagnificPopup( '.rtmedia-list-media.rtm-gallery-list, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content, .rtm-bbp-container, ul.rtm-comment-container' );
116
  },
117
  close: function( e ) {
118
  //Console.log(e);
119
+ rtmedia_single_page_popup_close();
120
  },
121
  BeforeChange: function( e ) {
122
  //Console.log(e);
160
  };
161
 
162
  //Drop-down js
163
+ function rtmedia_init_action_dropdown( parent ) {
164
  var all_ul;
165
  var curr_ul;
166
+ jQuery( parent+' .click-nav > span,'+parent+' .click-nav > div' ).toggleClass( 'no-js js' );
167
+ jQuery( parent+' .click-nav .js ul' ).hide();
168
+ jQuery( parent+' .click-nav .clicker' ).click( function( e ) {
169
  all_ul = jQuery( '#rtm-media-options .click-nav .clicker' ).next( 'ul' );
170
  curr_ul = jQuery( this ).next( 'ul' );
171
  jQuery.each( all_ul, function( index, value ) {
278
  defaultVideoHeight: 270
279
  } );
280
 
281
+ setTimeout( function() {
282
+ rtmedia_activity_stream_comment_media();
283
+ }, 900 );
284
+
285
  rtMediaHook.call( 'rtmedia_js_after_activity_added', [ ] );
286
  };
287
  }
457
  rtmedia_media_view_counts();
458
  rtmedia_init_media_deleting();
459
  mfp = jQuery.magnificPopup.instance;
460
+
461
+ if ( jQuery( mfp.items ).size() > 1 && comment_media == false ) {
462
+ rtmedia_init_popup_navigation();
463
+ }else{
464
+ rtmedia_disable_popup_navigation_all();
465
+ }
466
 
467
  rtmedia_disable_popup_navigation_comment_focus();
468
+
469
+ rtmedia_disable_popup_navigation_comment_media_focus();
470
+
471
  var height = $( window ).height();
472
  jQuery( '.rtm-lightbox-container .mejs-video' ).css( { 'height': height * 0.8, 'over-flow': 'hidden' } );
473
  jQuery( '.mfp-content .rtmedia-media' ).css( { 'max-height': height * 0.87, 'over-flow': 'hidden' } );
474
  //Mejs-video
475
  //init the options dropdown menu
476
+ rtmedia_init_action_dropdown( '.rtm-lightbox-container .rtmedia-actions' );
477
  //Get focus on comment textarea when comment-link is clicked
478
  jQuery( '.rtmedia-comment-link' ).on( 'click', function( e ) {
479
  e.preventDefault();
526
  } );
527
  }
528
 
529
+
530
+ function rtmedia_disable_popup_navigation_all(){
531
+ // hide the left and right key
532
+ jQuery( '.mfp-arrow-right' ).hide();
533
+ jQuery( '.mfp-arrow-left' ).hide();
534
+
535
+ // disable the left and right keyboard button
536
+ jQuery( document ).unbind( 'keydown' );
537
+ }
538
+
539
  function rtmedia_disable_popup_navigation_comment_focus() {
540
+ rtmedia_disable_popup_navigation( '#comment_content' );
 
 
 
 
 
 
 
 
 
 
 
 
541
  }
542
 
543
  var dragArea = jQuery( '#drag-drop-area' );
610
  }
611
  } );
612
 
613
+ rtmedia_init_action_dropdown( '' );
614
 
615
  $( document ).click( function() {
616
  if ( $( '.click-nav ul' ).is( ':visible' ) ) {
657
  jQuery( this ).addClass( 'active' );
658
 
659
  if ( class_name != 'rtm-upload-tab' ) {
660
+ jQuery( 'div.moxie-shim' ).hide();
661
  } else {
662
+ jQuery( 'div.moxie-shim' ).show();
663
  }
664
  }
665
  });
app/assets/js/rtmedia.min.js CHANGED
@@ -2,5 +2,5 @@
2
  * rtMedia JavaScript Library
3
  * @package rtMedia
4
  */
5
- function apply_rtMagnificPopup(a){jQuery("document").ready(function(b){var c="";c="undefined"==typeof rtmedia_load_more?"Loading media":rtmedia_load_more,"undefined"!=typeof rtmedia_lightbox_enabled&&"1"==rtmedia_lightbox_enabled&&(b(".activity-item .rtmedia-activity-container .rtmedia-list-item > a").siblings("p").children("a").length>0&&b(".activity-item .rtmedia-activity-container .rtmedia-list-item > a").siblings("p").children("a").addClass("no-popup"),rtMagnificPopup=jQuery(a).magnificPopup({delegate:"a:not(.no-popup, .mejs-time-slider, .mejs-volume-slider, .mejs-horizontal-volume-slider)",type:"ajax",tLoading:c+" #%curr%...",mainClass:"mfp-img-mobile",preload:[1,3],closeOnBgClick:!0,gallery:{enabled:!0,navigateByImgClick:!0,arrowMarkup:"",preload:[0,1]},image:{tError:'<a href="%url%">The image #%curr%</a> could not be loaded.',titleSrc:function(a){return a.el.attr("title")+"<small>by Marsel Van Oosten</small>"}},callbacks:{ajaxContentAdded:function(){a=jQuery.magnificPopup.instance,1===jQuery(a.items).size()&&jQuery(".mfp-arrow").remove();var a=jQuery.magnificPopup.instance,c=a.currItem.el,d=c.parent();if(d.is("li")||(d=d.parent()),d.is(":nth-last-child(2)")||d.is(":last-child")){d.next();"block"==jQuery("#rtMedia-galary-next").css("display")&&jQuery("#rtMedia-galary-next").click()}var e=a.items.length;if(a.index==e-1&&!d.is(":last-child"))return void c.click();var f={};"undefined"!=typeof _wpmejsSettings&&(f.pluginPath=_wpmejsSettings.pluginPath);var g=jQuery(".rtmedia-container .rtmedia-single-meta").height();b(".mfp-content .wp-audio-shortcode,.mfp-content .wp-video-shortcode,.mfp-content .bp_media_content video").attr("autoplay",!0),b(".mfp-content .wp-audio-shortcode,.mfp-content .wp-video-shortcode,.mfp-content .bp_media_content video").mediaelementplayer({defaultVideoWidth:480,defaultVideoHeight:270,enableAutosize:!0,videoHeight:-1,success:function(a,c){a.addEventListener("loadeddata",function(c){var d=b(a).height(),e=b(window).height(),f=jQuery("div.rtm-ltb-action-container").height(),f=f+50,h=g-f;d>e&&jQuery(".rtmedia-container #rtmedia-single-media-container .mejs-container").attr("style","height:"+h+"px !important; transition:0.2s")},!1),a.play()}}),b(".mfp-content .mejs-audio .mejs-controls").css("position","relative"),rtMediaHook.call("rtmedia_js_popup_after_content_added",[]),"undefined"!=typeof bp&&"undefined"!=typeof bp.mentions&&"undefined"!=typeof bp.mentions.users&&(b("#atwho-container #atwho-ground-comment_content").remove(),b("#comment_content").bp_mentions(bp.mentions.users))},close:function(a){rtmedia_init_action_dropdown()},BeforeChange:function(a){}}})),jQuery(document).ajaxComplete(function(){jQuery("[id^=imgedit-leaving]").filter(function(){var a=jQuery(this).text();jQuery(this).text(a.replace("OK","Save"))})})})}function rtmedia_init_action_dropdown(){var a,b;jQuery(".click-nav > span, .click-nav > div").toggleClass("no-js js"),jQuery(".click-nav .js ul").hide(),jQuery(".click-nav .clicker").click(function(c){a=jQuery("#rtm-media-options .click-nav .clicker").next("ul"),b=jQuery(this).next("ul"),jQuery.each(a,function(a,c){jQuery(c).html()!=b.html()&&jQuery(c).hide()}),jQuery(b).toggle(),c.stopPropagation()})}function bp_media_create_element(a){return!1}function rtmedia_version_compare(a,b){if(typeof a+typeof b!="stringstring")return!1;for(var c=a.split("."),d=b.split("."),e=0,f=Math.max(c.length,d.length);e<f;e++){if(c[e]&&!d[e]&&parseInt(c[e])>0||parseInt(c[e])>parseInt(d[e]))return!0;if(d[e]&&!c[e]&&parseInt(d[e])>0||parseInt(c[e])<parseInt(d[e]))return!1}return!0}function rtm_is_element_exist(a){return jQuery(a).length>0}function rtm_masonry_reload(a){setTimeout(function(){a.masonry("reload")},250)}function rtmediaGetParameterByName(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var b=new RegExp("[\\?&]"+a+"=([^&#]*)"),c=b.exec(location.search);return null==c?"":decodeURIComponent(c[1].replace(/\+/g," "))}function rtmedia_single_media_alert_message(a,b){var c="rtmedia-success";"warning"==b&&(c="rtmedia-warning"),jQuery(".rtmedia-single-media .rtmedia-media").css("opacity","0.2"),jQuery(".rtmedia-single-media .rtmedia-media").after("<div class='rtmedia-message-container'><span class='"+c+"'>"+a+" </span></div>"),setTimeout(function(){jQuery(".rtmedia-single-media .rtmedia-media").css("opacity","1"),jQuery(".rtmedia-message-container").remove()},3e3),jQuery(".rtmedia-message-container").click(function(){jQuery(".rtmedia-single-media .rtmedia-media").css("opacity","1"),jQuery(".rtmedia-message-container").remove()})}function rtmedia_gallery_action_alert_message(a,b){var c="rtmedia-success";"warning"==b&&(c="rtmedia-warning");var d='<div class="rtmedia-gallery-alert-container"> </div>';jQuery("body").append(d),jQuery(".rtmedia-gallery-alert-container").append("<div class='rtmedia-gallery-message-box'><span class='"+c+"'>"+a+" </span></div>"),setTimeout(function(){jQuery(".rtmedia-gallery-alert-container").remove()},3e3),jQuery(".rtmedia-gallery-message-box").click(function(){jQuery(".rtmedia-gallery-alert-container").remove()})}!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=c.indexOf("MSIE 7.")!==-1,b.isIE8=c.indexOf("MSIE 8.")!==-1,b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=!!b.st[d]&&b.st[d].markup;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||2!==c.which&&!c.ctrlKey&&!c.metaKey){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){if(c.target!==b.wrap[0]&&!a.contains(b.wrap[0],c.target))return b._setFocus(),!1},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,e<200?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return!!b.currItem.hasSize&&b.currItem.img},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){if(e.indexOf(this.index)>-1)return this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:a<0?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,!(!c||!c.enabled)&&(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){if(b.items.length>1)return b.next(),!1}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null}))},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()}),"function"!=typeof Object.create&&(Object.create=function(a){function b(){}return b.prototype=a,new b}),function(a,b,c,d){var e={init:function(b,c){var d=this;d.elem=c,d.$elem=a(c),d.options=a.extend({},a.fn.rtTab.options,b),d.rtTabs()},rtTabs:function(){var c=this,d=c.options.activeTab;c.$elem.find("li:nth-child("+d+")").addClass("active"),c.rtTabContent(activeTabContent="yes"),c.rtClick();var e="false"!==c.$elem.attr("data-hash");if(e===!0){var f=b.location.hash;f&&c.$elem.find("li").find('a[href="'+f+'"]').trigger("click"),a(b).on("hashchange",function(){var a=b.location.hash;c.$elem.find("li").find('a[href="'+a+'"]').trigger("click")})}},rtClick:function(){var c=this,d=c.$elem.find("li"),e=d.find("a");e.on("click",function(e){e.preventDefault(),d.removeClass("active"),c.rtTabContent(),a(this).parent().addClass("active");var f=a(this).attr("href");a(f).removeClass("hide");var g="false"!==c.$elem.attr("data-hash");if(g===!0){var h=a(b).scrollTop();location.hash=a(this).attr("href"),a(b).scrollTop(h)}"function"==typeof c.options.onComplete&&c.options.onComplete.apply(c.elem,arguments)})},rtTabContent:function(b){var c=this,d=c.$elem.find("li"),e=d.find("a");e.each(function(){var c=a(this),d=c.attr("href");"yes"===b?c.parent().hasClass("active")||a(d).addClass("hide"):a(d).addClass("hide")})}};a.fn.rtTab=function(b){return this.each(function(){var c=Object.create(e);c.init(b,this),a.data(this,"rtTab",c)})},a.fn.rtTab.options={activeTab:1,onComplete:null}}(jQuery,window,document);var rtMagnificPopup,rtm_masonry_container,rtMediaHook={hooks:[],is_break:!1,register:function(a,b){"undefined"==typeof rtMediaHook.hooks[a]&&(rtMediaHook.hooks[a]=[]),rtMediaHook.hooks[a].push(b)},call:function(a,arguments){if("undefined"!=typeof rtMediaHook.hooks[a])for(i=0;i<rtMediaHook.hooks[a].length;++i)if(1!=rtMediaHook.hooks[a][i](arguments))return rtMediaHook.is_break=!0,!1;return!0}};jQuery("document").ready(function(a){function b(){if(jQuery("#rtmedia-media-view-form").length>0){var a=jQuery("#rtmedia-media-view-form").attr("action");jQuery.post(a,{},function(a){})}}function c(){var a=jQuery.magnificPopup.instance;jQuery(".mfp-arrow-right").on("click",function(b){a.next()}),jQuery(".mfp-arrow-left").on("click",function(b){a.prev()}),jQuery(".mfp-content .rtmedia-media").swipe({swipeLeft:function(b,c,d,e,f){a.next()},swipeRight:function(b,c,d,e,f){a.prev()},threshold:0})}function d(){jQuery(document).on("focusin","#comment_content",function(){jQuery(document).unbind("keydown")}),jQuery(document).on("focusout","#comment_content",function(){var a=jQuery.magnificPopup.instance;jQuery(document).on("keydown",function(b){37===b.keyCode?a.prev():39===b.keyCode&&a.next()})})}function e(){jQuery(".rtmedia-container").on("click",".rtmedia-delete-media",function(a){a.preventDefault(),confirm(rtmedia_media_delete_confirmation)&&jQuery(this).closest("form").submit()})}"undefined"!=typeof a.fn.rtTab&&a(".rtm-tabs").rtTab(),jQuery(".rtmedia-modal-link").length>0&&a(".rtmedia-modal-link").magnificPopup({type:"inline",midClick:!0,closeBtnInside:!0}),a("#rt_media_comment_form").submit(function(b){return""!=a.trim(a("#comment_content").val())||(0==jQuery("#rtmedia-single-media-container").length?rtmedia_gallery_action_alert_message(rtmedia_empty_comment_msg,"warning"):rtmedia_single_media_alert_message(rtmedia_empty_comment_msg,"warning"),!1)}),a("li.rtmedia-list-item p a").each(function(b){a(this).addClass("no-popup")}),a("li.rtmedia-list-item p a").each(function(b){a(this).addClass("no-popup")}),"undefined"!=typeof rtmedia_lightbox_enabled&&"1"==rtmedia_lightbox_enabled&&apply_rtMagnificPopup(".rtmedia-list-media.rtm-gallery-list, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content, .rtm-bbp-container, ul.rtm-comment-container"),jQuery.ajaxPrefilter(function(a,b,c){try{if(null==b.data||"undefined"==typeof b.data||"undefined"==typeof b.data.action)return!0}catch(a){return!0}if("activity_get_older_updates"==b.data.action){var d=b.success;a.success=function(a){d(a),apply_rtMagnificPopup(".rtmedia-activity-container ul.rtmedia-list, #bp-media-list, .bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content"),rtMediaHook.call("rtmedia_js_after_activity_added",[])}}else if("get_single_activity_content"==b.data.action){var d=b.success;a.success=function(a){d(a),setTimeout(function(){apply_rtMagnificPopup(".rtmedia-activity-container ul.rtmedia-list, #bp-media-list, .bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content"),jQuery("ul.activity-list li.rtmedia_update:first-child .wp-audio-shortcode, ul.activity-list li.rtmedia_update:first-child .wp-video-shortcode").mediaelementplayer({defaultVideoWidth:480,defaultVideoHeight:270})},900)}}}),jQuery.ajaxPrefilter(function(a,b,c){try{if(null==b.data||"undefined"==typeof b.data||"undefined"==typeof b.data.action)return!0}catch(a){return!0}if("activity_get_older_updates"==b.data.action){var d=b.success;a.success=function(a){d(a),apply_rtMagnificPopup(".rtmedia-activity-container ul.rtmedia-list, #bp-media-list, .bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content"),jQuery("ul.activity-list li.rtmedia_update div.rtmedia-item-thumbnail > audio.wp-audio-shortcode, ul.activity-list li.rtmedia_update div.rtmedia-item-thumbnail > video.wp-video-shortcode").mediaelementplayer({defaultVideoWidth:480,defaultVideoHeight:270}),rtMediaHook.call("rtmedia_js_after_activity_added",[])}}}),jQuery(".rtmedia-container").on("click",".select-all",function(a){jQuery(this).toggleClass("unselect-all").toggleClass("select-all"),
6
- jQuery(this).attr("title",rtmedia_unselect_all_visible),jQuery(".rtmedia-list input").each(function(){jQuery(this).prop("checked",!0)}),jQuery(".rtmedia-list-item").addClass("bulk-selected")}),jQuery(".rtmedia-container").on("click",".unselect-all",function(a){jQuery(this).toggleClass("select-all").toggleClass("unselect-all"),jQuery(this).attr("title",rtmedia_select_all_visible),jQuery(".rtmedia-list input").each(function(){jQuery(this).prop("checked",!1)}),jQuery(".rtmedia-list-item").removeClass("bulk-selected")}),jQuery(".rtmedia-container").on("click",".rtmedia-move",function(a){jQuery(".rtmedia-delete-container").slideUp(),jQuery(".rtmedia-move-container").slideToggle()}),jQuery("#rtmedia-create-album-modal").on("click","#rtmedia_create_new_album",function(b){if($albumname=jQuery("<span/>").text(jQuery.trim(jQuery("#rtmedia_album_name").val())).html(),$context=jQuery.trim(jQuery("#rtmedia_album_context").val()),$context_id=jQuery.trim(jQuery("#rtmedia_album_context_id").val()),$privacy=jQuery.trim(jQuery("#rtmedia_select_album_privacy").val()),$create_album_nonce=jQuery.trim(jQuery("#rtmedia_create_album_nonce").val()),""!=$albumname){var c={action:"rtmedia_create_album",name:$albumname,context:$context,context_id:$context_id,create_album_nonce:$create_album_nonce};""!==$privacy&&(c.privacy=$privacy),a("#rtmedia_create_new_album").attr("disabled","disabled");var d=a("#rtmedia_create_new_album").html();a("#rtmedia_create_new_album").prepend("<img src='"+rMedia_loading_file+"' />"),jQuery.post(rtmedia_ajax_url,c,function(b){if("undefined"!=typeof b.album){b=jQuery.trim(b.album);var c=!0;jQuery(".rtmedia-user-album-list").each(function(){if(jQuery(this).children("optgroup").each(function(){if(jQuery(this).attr("value")===$context)return c=!1,void jQuery(this).append('<option value="'+b+'">'+$albumname+"</option>")}),c){var a=$context.charAt(0).toUpperCase()+$context.slice(1)+" "+rtmedia_main_js_strings.rtmedia_albums,d='<optgroup value="'+$context+'" label="'+a+'"><option value="'+b+'">'+$albumname+"</option></optgroup>";jQuery(this).append(d)}}),jQuery('select.rtmedia-user-album-list option[value="'+b+'"]').prop("selected",!0),jQuery(".rtmedia-create-new-album-container").slideToggle(),jQuery("#rtmedia_album_name").val(""),jQuery("#rtmedia-create-album-modal").append("<div class='rtmedia-success rtmedia-create-album-alert'><b>"+$albumname+"</b>"+rtmedia_album_created_msg+"</div>"),setTimeout(function(){jQuery(".rtmedia-create-album-alert").remove()},4e3),setTimeout(function(){galleryObj.reloadView(),jQuery(".close-reveal-modal").click()},2e3)}else"undefined"!=typeof b.error?rtmedia_gallery_action_alert_message(b.error,"warning"):rtmedia_gallery_action_alert_message(rtmedia_something_wrong_msg,"warning");a("#rtmedia_create_new_album").removeAttr("disabled"),a("#rtmedia_create_new_album").html(d)})}else rtmedia_gallery_action_alert_message(rtmedia_empty_album_name_msg,"warning")}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-selected",function(a){jQuery(".rtmedia-list :checkbox:checked").length>0?confirm(rtmedia_selected_media_delete_confirmation)&&jQuery(this).closest("form").attr("action","../../../"+rtmedia_media_slug+"/delete").submit():rtmedia_gallery_action_alert_message(rtmedia_no_media_selected,"warning")}),jQuery(".rtmedia-container").on("click",".rtmedia-move-selected",function(a){jQuery(".rtmedia-list :checkbox:checked").length>0?confirm(rtmedia_selected_media_move_confirmation)&&jQuery(this).closest("form").attr("action","").submit():rtmedia_gallery_action_alert_message(rtmedia_no_media_selected,"warning")}),jQuery("#buddypress").on("change",".rtm-activity-privacy-opt",function(){var a=jQuery(this).attr("id");a=a.split("-"),a=a[a.length-1];var b=this;data={activity_id:a,privacy:jQuery(this).val(),nonce:jQuery("#rtmedia_activity_privacy_nonce").val(),action:"rtm_change_activity_privacy"},jQuery.post(ajaxurl,data,function(a){var c="",d="";"true"==a?(c=rtmedia_main_js_strings.privacy_update_success,d="success"):(c=rtmedia_main_js_strings.privacy_update_error,d="fail"),jQuery(b).after('<p class="rtm-ac-privacy-updated '+d+'">'+c+"</p>"),setTimeout(function(){jQuery(b).siblings(".rtm-ac-privacy-updated").remove()},2e3)})}),b(),rtMediaHook.register("rtmedia_js_popup_after_content_added",function(){b(),e(),mfp=jQuery.magnificPopup.instance,jQuery(mfp.items).size()>1&&c(),d();var f=a(window).height();jQuery(".rtm-lightbox-container .mejs-video").css({height:.8*f,"over-flow":"hidden"}),jQuery(".mfp-content .rtmedia-media").css({"max-height":.87*f,"over-flow":"hidden"}),rtmedia_init_action_dropdown(),jQuery(".rtmedia-comment-link").on("click",function(a){a.preventDefault(),jQuery("#comment_content").focus()}),jQuery(".rtm-more").shorten({showChars:130});var g=a(".rtm-gallery-title"),h="";h=a.isEmptyObject(g)?a("#subnav.item-list-tabs li.selected ").html():g.html(),""!=h&&a(".rtm-ltb-gallery-title .ltb-title").html(h);var i=a("#subnav.item-list-tabs li.selected span").html();return a("li.total").html(i),!0});var f=jQuery("#drag-drop-area"),g=jQuery("#whats-new");f.html();jQuery("#rtmedia-upload-container").after("<div id='rtm-drop-files-title'>"+rtmedia_drop_media_msg+"</div>"),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&jQuery("#whats-new-textarea").append("<div id='rtm-drop-files-title'>"+rtmedia_drop_media_msg+"</div>"),jQuery(document).on("dragover",function(a){a.preventDefault(),a.target!=this&&(jQuery("#rtm-media-gallery-uploader").show(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&g.addClass("rtm-drag-drop-active"),f.addClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").show())}).on("dragleave",function(a){return a.preventDefault(),(0==a.originalEvent.pageX||0==a.originalEvent.pageY)&&("undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&(g.removeClass("rtm-drag-drop-active"),g.removeAttr("style")),f.removeClass("rtm-drag-drop-active"),void jQuery("#rtm-drop-files-title").hide())}).on("drop",function(a){a.preventDefault(),jQuery(".bp-suggestions").focus(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&(g.removeClass("rtm-drag-drop-active"),g.removeAttr("style")),f.removeClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").hide()}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-album",function(a){a.preventDefault(),confirm(rtmedia_album_delete_confirmation)&&jQuery(this).closest("form").submit()}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-media",function(a){a.preventDefault(),confirm(rtmedia_media_delete_confirmation)&&jQuery(this).closest("form").submit()}),rtmedia_init_action_dropdown(),a(document).click(function(){a(".click-nav ul").is(":visible")&&a(".click-nav ul",this).hide()}),jQuery(".rtmedia-comment-link").on("click",function(a){a.preventDefault(),jQuery("#comment_content").focus()}),jQuery(".rtm-more").length>0&&a(".rtm-more").shorten({showChars:200}),"undefined"!=typeof rtmedia_masonry_layout&&"true"==rtmedia_masonry_layout&&0==jQuery(".rtmedia-container .rtmedia-list.rtm-no-masonry").length&&(rtm_masonry_container=jQuery(".rtmedia-container .rtmedia-list"),rtm_masonry_container.masonry({itemSelector:".rtmedia-list-item"}),setInterval(function(){jQuery.each(jQuery(".rtmedia-list.masonry .rtmedia-item-title"),function(a,b){jQuery(b).width(jQuery(b).siblings(".rtmedia-item-thumbnail").children("img").width())}),rtm_masonry_reload(rtm_masonry_container)},1e3),jQuery.each(jQuery(".rtmedia-list.masonry .rtmedia-item-title"),function(a,b){jQuery(b).width(jQuery(b).siblings(".rtmedia-item-thumbnail").children("img").width())})),jQuery(".rtm-uploader-tabs").length>0&&jQuery(".rtm-uploader-tabs li").click(function(a){jQuery(this).hasClass("active")||(jQuery(this).siblings().removeClass("active"),jQuery(this).parents(".rtm-uploader-tabs").siblings().hide(),class_name=jQuery(this).attr("class"),jQuery(this).parents(".rtm-uploader-tabs").siblings('[data-id="'+class_name+'"]').show(),jQuery(this).addClass("active"),"rtm-upload-tab"!=class_name?jQuery("div.moxie-shim").children("input[type=file]").hide():jQuery("div.moxie-shim").children("input[type=file]").show())}),jQuery(".rtmedia-container").on("click",".rtm-delete-media",function(a){a.preventDefault();var b="Are you sure you want to delete this media?";if("undefined"!=typeof rtmedia_media_delete_confirmation&&(b=rtmedia_media_delete_confirmation),confirm(b)){var c=jQuery(this).closest("li"),d=jQuery("#rtmedia_media_delete_nonce").val(),e={action:"delete_uploaded_media",nonce:d,media_id:c.attr("id")};jQuery.ajax({url:ajaxurl,type:"post",data:e,success:function(a){"1"==a?(rtmedia_gallery_action_alert_message(rtmedia_main_js_strings.file_delete_success,"success"),c.remove(),"undefined"!=typeof rtmedia_masonry_layout&&"true"==rtmedia_masonry_layout&&0==jQuery(".rtmedia-container .rtmedia-list.rtm-no-masonry").length&&rtm_masonry_reload(rtm_masonry_container)):rtmedia_gallery_action_alert_message(rtmedia_file_not_deleted,"warning")}})}})}),function(a){a.fn.shorten=function(b){"use strict";var c={showChars:100,minHideChars:10,ellipsesText:"...",moreText:rtmedia_read_more,lessText:rtmedia__show_less,onLess:function(){},onMore:function(){},errMsg:null,force:!1};return b&&a.extend(c,b),!(a(this).data("jquery.shorten")&&!c.force)&&(a(this).data("jquery.shorten",!0),a(document).off("click",".morelink"),a(document).on({click:function(){var b=a(this);return b.hasClass("less")?(b.removeClass("less"),b.html(c.moreText),b.parent().prev().hide(0,function(){b.parent().prev().prev().show()}).hide(0,function(){c.onLess()})):(b.addClass("less"),b.html(c.lessText),b.parent().prev().show(0,function(){b.parent().prev().prev().hide()}).show(0,function(){c.onMore()})),!1}},".morelink"),this.each(function(){var b=a(this),d=b.html(),e=b.text().length;if(e>c.showChars+c.minHideChars){var f=d.substr(0,c.showChars);if(f.indexOf("<")>=0){for(var g=!1,h="",i=0,k=[],l=null,m=0,n=0;n<=c.showChars;m++)if("<"!=d[m]||g||(g=!0,l=d.substring(m+1,d.indexOf(">",m)),"/"==l[0]?l!="/"+k[0]?c.errMsg="ERROR en HTML: the top of the stack should be the tag that closes":k.shift():"br"!=l.toLowerCase()&&k.unshift(l)),g&&">"==d[m]&&(g=!1),g)h+=d.charAt(m);else if(n++,i<=c.showChars)h+=d.charAt(m),i++;else if(k.length>0){for(j=0;j<k.length;j++)h+="</"+k[j]+">";break}f=a("<div/>").html(h+'<span class="ellip">'+c.ellipsesText+"</span>").html()}else f+=c.ellipsesText;var o='<div class="shortcontent">'+f+'</div><div class="allcontent">'+d+'</div><span><a href="javascript://nop/" class="morelink">'+c.moreText+"</a></span>";b.html(o),b.find(".allcontent").hide(),a(".shortcontent p:last",b).css("margin-bottom",0)}}))}}(jQuery),window.onload=function(){"undefined"!=typeof rtmedia_masonry_layout&&"true"==rtmedia_masonry_layout&&0==jQuery(".rtmedia-container .rtmedia-list.rtm-no-masonry").length&&rtm_masonry_reload(rtm_masonry_container)};
2
  * rtMedia JavaScript Library
3
  * @package rtMedia
4
  */
5
+ function apply_rtMagnificPopup(a){jQuery("document").ready(function(b){var c="";c="undefined"==typeof rtmedia_load_more?"Loading media":rtmedia_load_more,"undefined"!=typeof rtmedia_lightbox_enabled&&"1"==rtmedia_lightbox_enabled&&(b(".activity-item .rtmedia-activity-container .rtmedia-list-item > a").siblings("p").children("a").length>0&&b(".activity-item .rtmedia-activity-container .rtmedia-list-item > a").siblings("p").children("a").addClass("no-popup"),rtMagnificPopup=jQuery(a).magnificPopup({delegate:"a:not(.no-popup, .mejs-time-slider, .mejs-volume-slider, .mejs-horizontal-volume-slider)",type:"ajax",tLoading:c+" #%curr%...",mainClass:"mfp-img-mobile",preload:[1,3],closeOnBgClick:!0,gallery:{enabled:!0,navigateByImgClick:!0,arrowMarkup:"",preload:[0,1]},image:{tError:'<a href="%url%">The image #%curr%</a> could not be loaded.',titleSrc:function(a){return a.el.attr("title")+"<small>by Marsel Van Oosten</small>"}},callbacks:{ajaxContentAdded:function(){a=jQuery.magnificPopup.instance,1===jQuery(a.items).size()&&jQuery(".mfp-arrow").remove();var a=jQuery.magnificPopup.instance,c=a.currItem.el,d=c.parent();if(d.is("li")||(d=d.parent()),(d.is(":nth-last-child(2)")||d.is(":last-child"))&&d.find("a").hasClass("rtmedia-list-item-a")){d.next();"block"==jQuery("#rtMedia-galary-next").css("display")&&jQuery("#rtMedia-galary-next").click()}var e=a.items.length;if(a.index==e-1&&!d.is(":last-child"))return void c.click();var f={};"undefined"!=typeof _wpmejsSettings&&(f.pluginPath=_wpmejsSettings.pluginPath);var g=jQuery(".rtmedia-container .rtmedia-single-meta").height();b(".mfp-content .rtmedia-single-media .wp-audio-shortcode,.mfp-content .rtmedia-single-media .wp-video-shortcode,.mfp-content .rtmedia-single-media .bp_media_content video").attr("autoplay",!0),b(".mfp-content .rtmedia-single-media .wp-audio-shortcode,.mfp-content .rtmedia-single-media .wp-video-shortcode,.mfp-content .rtmedia-single-media .bp_media_content video").mediaelementplayer({defaultVideoWidth:480,defaultVideoHeight:270,enableAutosize:!0,videoHeight:-1,success:function(a,c){a.addEventListener("loadeddata",function(c){var d=b(a).height(),e=b(window).height(),f=jQuery("div.rtm-ltb-action-container").height(),f=f+50,h=g-f;d>e&&jQuery(".rtmedia-container #rtmedia-single-media-container .mejs-container").attr("style","height:"+h+"px !important; transition:0.2s")},!1),b(window).width()<760?window.addEventListener("touchstart",function b(){a.play(),this.removeEventListener("touchstart",b)}):a.play()}}),b(".mfp-content .mejs-audio .mejs-controls").css("position","relative"),rtMediaHook.call("rtmedia_js_popup_after_content_added",[]),"undefined"!=typeof bp&&"undefined"!=typeof bp.mentions&&"undefined"!=typeof bp.mentions.users&&(b("#atwho-container #atwho-ground-comment_content").remove(),b("#comment_content").bp_mentions(bp.mentions.users)),rtmedia_reset_video_and_audio_for_popup(),apply_rtMagnificPopup(".rtmedia-list-media.rtm-gallery-list, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content, .rtm-bbp-container, ul.rtm-comment-container")},close:function(a){rtmedia_single_page_popup_close()},BeforeChange:function(a){}}})),jQuery(document).ajaxComplete(function(){jQuery("[id^=imgedit-leaving]").filter(function(){var a=jQuery(this).text();jQuery(this).text(a.replace("OK","Save"))})})})}function rtmedia_init_action_dropdown(a){var b,c;jQuery(a+" .click-nav > span,"+a+" .click-nav > div").toggleClass("no-js js"),jQuery(a+" .click-nav .js ul").hide(),jQuery(a+" .click-nav .clicker").click(function(a){b=jQuery("#rtm-media-options .click-nav .clicker").next("ul"),c=jQuery(this).next("ul"),jQuery.each(b,function(a,b){jQuery(b).html()!=c.html()&&jQuery(b).hide()}),jQuery(c).toggle(),a.stopPropagation()})}function bp_media_create_element(a){return!1}function rtmedia_version_compare(a,b){if(typeof a+typeof b!="stringstring")return!1;for(var c=a.split("."),d=b.split("."),e=0,f=Math.max(c.length,d.length);e<f;e++){if(c[e]&&!d[e]&&parseInt(c[e])>0||parseInt(c[e])>parseInt(d[e]))return!0;if(d[e]&&!c[e]&&parseInt(d[e])>0||parseInt(c[e])<parseInt(d[e]))return!1}return!0}function rtm_is_element_exist(a){return jQuery(a).length>0}function rtm_masonry_reload(a){setTimeout(function(){a.masonry("reload")},250)}function rtmediaGetParameterByName(a){a=a.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var b=new RegExp("[\\?&]"+a+"=([^&#]*)"),c=b.exec(location.search);return null==c?"":decodeURIComponent(c[1].replace(/\+/g," "))}function rtmedia_single_media_alert_message(a,b){var c="rtmedia-success";"warning"==b&&(c="rtmedia-warning"),jQuery(".rtmedia-single-media .rtmedia-media").css("opacity","0.2"),jQuery(".rtmedia-single-media .rtmedia-media").after("<div class='rtmedia-message-container'><span class='"+c+"'>"+a+" </span></div>"),setTimeout(function(){jQuery(".rtmedia-single-media .rtmedia-media").css("opacity","1"),jQuery(".rtmedia-message-container").remove()},3e3),jQuery(".rtmedia-message-container").click(function(){jQuery(".rtmedia-single-media .rtmedia-media").css("opacity","1"),jQuery(".rtmedia-message-container").remove()})}function rtmedia_gallery_action_alert_message(a,b){var c="rtmedia-success";"warning"==b&&(c="rtmedia-warning");var d='<div class="rtmedia-gallery-alert-container"> </div>';jQuery("body").append(d),jQuery(".rtmedia-gallery-alert-container").append("<div class='rtmedia-gallery-message-box'><span class='"+c+"'>"+a+" </span></div>"),setTimeout(function(){jQuery(".rtmedia-gallery-alert-container").remove()},3e3),jQuery(".rtmedia-gallery-message-box").click(function(){jQuery(".rtmedia-gallery-alert-container").remove()})}!function(a){"function"==typeof define&&define.amd?define(["jquery"],a):a("object"==typeof exports?require("jquery"):window.jQuery||window.Zepto)}(function(a){var b,c,d,e,f,g,h="Close",i="BeforeClose",j="AfterClose",k="BeforeAppend",l="MarkupParse",m="Open",n="Change",o="mfp",p="."+o,q="mfp-ready",r="mfp-removing",s="mfp-prevent-close",t=function(){},u=!!window.jQuery,v=a(window),w=function(a,c){b.ev.on(o+a+p,c)},x=function(b,c,d,e){var f=document.createElement("div");return f.className="mfp-"+b,d&&(f.innerHTML=d),e?c&&c.appendChild(f):(f=a(f),c&&f.appendTo(c)),f},y=function(c,d){b.ev.triggerHandler(o+c,d),b.st.callbacks&&(c=c.charAt(0).toLowerCase()+c.slice(1),b.st.callbacks[c]&&b.st.callbacks[c].apply(b,a.isArray(d)?d:[d]))},z=function(c){return c===g&&b.currTemplate.closeBtn||(b.currTemplate.closeBtn=a(b.st.closeMarkup.replace("%title%",b.st.tClose)),g=c),b.currTemplate.closeBtn},A=function(){a.magnificPopup.instance||(b=new t,b.init(),a.magnificPopup.instance=b)},B=function(){var a=document.createElement("p").style,b=["ms","O","Moz","Webkit"];if(void 0!==a.transition)return!0;for(;b.length;)if(b.pop()+"Transition"in a)return!0;return!1};t.prototype={constructor:t,init:function(){var c=navigator.appVersion;b.isIE7=c.indexOf("MSIE 7.")!==-1,b.isIE8=c.indexOf("MSIE 8.")!==-1,b.isLowIE=b.isIE7||b.isIE8,b.isAndroid=/android/gi.test(c),b.isIOS=/iphone|ipad|ipod/gi.test(c),b.supportsTransition=B(),b.probablyMobile=b.isAndroid||b.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),d=a(document),b.popupsCache={}},open:function(c){var e;if(c.isObj===!1){b.items=c.items.toArray(),b.index=0;var g,h=c.items;for(e=0;e<h.length;e++)if(g=h[e],g.parsed&&(g=g.el[0]),g===c.el[0]){b.index=e;break}}else b.items=a.isArray(c.items)?c.items:[c.items],b.index=c.index||0;if(b.isOpen)return void b.updateItemHTML();b.types=[],f="",c.mainEl&&c.mainEl.length?b.ev=c.mainEl.eq(0):b.ev=d,c.key?(b.popupsCache[c.key]||(b.popupsCache[c.key]={}),b.currTemplate=b.popupsCache[c.key]):b.currTemplate={},b.st=a.extend(!0,{},a.magnificPopup.defaults,c),b.fixedContentPos="auto"===b.st.fixedContentPos?!b.probablyMobile:b.st.fixedContentPos,b.st.modal&&(b.st.closeOnContentClick=!1,b.st.closeOnBgClick=!1,b.st.showCloseBtn=!1,b.st.enableEscapeKey=!1),b.bgOverlay||(b.bgOverlay=x("bg").on("click"+p,function(){b.close()}),b.wrap=x("wrap").attr("tabindex",-1).on("click"+p,function(a){b._checkIfClose(a.target)&&b.close()}),b.container=x("container",b.wrap)),b.contentContainer=x("content"),b.st.preloader&&(b.preloader=x("preloader",b.container,b.st.tLoading));var i=a.magnificPopup.modules;for(e=0;e<i.length;e++){var j=i[e];j=j.charAt(0).toUpperCase()+j.slice(1),b["init"+j].call(b)}y("BeforeOpen"),b.st.showCloseBtn&&(b.st.closeBtnInside?(w(l,function(a,b,c,d){c.close_replaceWith=z(d.type)}),f+=" mfp-close-btn-in"):b.wrap.append(z())),b.st.alignTop&&(f+=" mfp-align-top"),b.fixedContentPos?b.wrap.css({overflow:b.st.overflowY,overflowX:"hidden",overflowY:b.st.overflowY}):b.wrap.css({top:v.scrollTop(),position:"absolute"}),(b.st.fixedBgPos===!1||"auto"===b.st.fixedBgPos&&!b.fixedContentPos)&&b.bgOverlay.css({height:d.height(),position:"absolute"}),b.st.enableEscapeKey&&d.on("keyup"+p,function(a){27===a.keyCode&&b.close()}),v.on("resize"+p,function(){b.updateSize()}),b.st.closeOnContentClick||(f+=" mfp-auto-cursor"),f&&b.wrap.addClass(f);var k=b.wH=v.height(),n={};if(b.fixedContentPos&&b._hasScrollBar(k)){var o=b._getScrollbarSize();o&&(n.marginRight=o)}b.fixedContentPos&&(b.isIE7?a("body, html").css("overflow","hidden"):n.overflow="hidden");var r=b.st.mainClass;return b.isIE7&&(r+=" mfp-ie7"),r&&b._addClassToMFP(r),b.updateItemHTML(),y("BuildControls"),a("html").css(n),b.bgOverlay.add(b.wrap).prependTo(b.st.prependTo||a(document.body)),b._lastFocusedEl=document.activeElement,setTimeout(function(){b.content?(b._addClassToMFP(q),b._setFocus()):b.bgOverlay.addClass(q),d.on("focusin"+p,b._onFocusIn)},16),b.isOpen=!0,b.updateSize(k),y(m),c},close:function(){b.isOpen&&(y(i),b.isOpen=!1,b.st.removalDelay&&!b.isLowIE&&b.supportsTransition?(b._addClassToMFP(r),setTimeout(function(){b._close()},b.st.removalDelay)):b._close())},_close:function(){y(h);var c=r+" "+q+" ";if(b.bgOverlay.detach(),b.wrap.detach(),b.container.empty(),b.st.mainClass&&(c+=b.st.mainClass+" "),b._removeClassFromMFP(c),b.fixedContentPos){var e={marginRight:""};b.isIE7?a("body, html").css("overflow",""):e.overflow="",a("html").css(e)}d.off("keyup"+p+" focusin"+p),b.ev.off(p),b.wrap.attr("class","mfp-wrap").removeAttr("style"),b.bgOverlay.attr("class","mfp-bg"),b.container.attr("class","mfp-container"),!b.st.showCloseBtn||b.st.closeBtnInside&&b.currTemplate[b.currItem.type]!==!0||b.currTemplate.closeBtn&&b.currTemplate.closeBtn.detach(),b._lastFocusedEl&&a(b._lastFocusedEl).focus(),b.currItem=null,b.content=null,b.currTemplate=null,b.prevHeight=0,y(j)},updateSize:function(a){if(b.isIOS){var c=document.documentElement.clientWidth/window.innerWidth,d=window.innerHeight*c;b.wrap.css("height",d),b.wH=d}else b.wH=a||v.height();b.fixedContentPos||b.wrap.css("height",b.wH),y("Resize")},updateItemHTML:function(){var c=b.items[b.index];b.contentContainer.detach(),b.content&&b.content.detach(),c.parsed||(c=b.parseEl(b.index));var d=c.type;if(y("BeforeChange",[b.currItem?b.currItem.type:"",d]),b.currItem=c,!b.currTemplate[d]){var f=!!b.st[d]&&b.st[d].markup;y("FirstMarkupParse",f),f?b.currTemplate[d]=a(f):b.currTemplate[d]=!0}e&&e!==c.type&&b.container.removeClass("mfp-"+e+"-holder");var g=b["get"+d.charAt(0).toUpperCase()+d.slice(1)](c,b.currTemplate[d]);b.appendContent(g,d),c.preloaded=!0,y(n,c),e=c.type,b.container.prepend(b.contentContainer),y("AfterChange")},appendContent:function(a,c){b.content=a,a?b.st.showCloseBtn&&b.st.closeBtnInside&&b.currTemplate[c]===!0?b.content.find(".mfp-close").length||b.content.append(z()):b.content=a:b.content="",y(k),b.container.addClass("mfp-"+c+"-holder"),b.contentContainer.append(b.content)},parseEl:function(c){var d,e=b.items[c];if(e.tagName?e={el:a(e)}:(d=e.type,e={data:e,src:e.src}),e.el){for(var f=b.types,g=0;g<f.length;g++)if(e.el.hasClass("mfp-"+f[g])){d=f[g];break}e.src=e.el.attr("data-mfp-src"),e.src||(e.src=e.el.attr("href"))}return e.type=d||b.st.type||"inline",e.index=c,e.parsed=!0,b.items[c]=e,y("ElementParse",e),b.items[c]},addGroup:function(a,c){var d=function(d){d.mfpEl=this,b._openClick(d,a,c)};c||(c={});var e="click.magnificPopup";c.mainEl=a,c.items?(c.isObj=!0,a.off(e).on(e,d)):(c.isObj=!1,c.delegate?a.off(e).on(e,c.delegate,d):(c.items=a,a.off(e).on(e,d)))},_openClick:function(c,d,e){var f=void 0!==e.midClick?e.midClick:a.magnificPopup.defaults.midClick;if(f||2!==c.which&&!c.ctrlKey&&!c.metaKey){var g=void 0!==e.disableOn?e.disableOn:a.magnificPopup.defaults.disableOn;if(g)if(a.isFunction(g)){if(!g.call(b))return!0}else if(v.width()<g)return!0;c.type&&(c.preventDefault(),b.isOpen&&c.stopPropagation()),e.el=a(c.mfpEl),e.delegate&&(e.items=d.find(e.delegate)),b.open(e)}},updateStatus:function(a,d){if(b.preloader){c!==a&&b.container.removeClass("mfp-s-"+c),d||"loading"!==a||(d=b.st.tLoading);var e={status:a,text:d};y("UpdateStatus",e),a=e.status,d=e.text,b.preloader.html(d),b.preloader.find("a").on("click",function(a){a.stopImmediatePropagation()}),b.container.addClass("mfp-s-"+a),c=a}},_checkIfClose:function(c){if(!a(c).hasClass(s)){var d=b.st.closeOnContentClick,e=b.st.closeOnBgClick;if(d&&e)return!0;if(!b.content||a(c).hasClass("mfp-close")||b.preloader&&c===b.preloader[0])return!0;if(c===b.content[0]||a.contains(b.content[0],c)){if(d)return!0}else if(e&&a.contains(document,c))return!0;return!1}},_addClassToMFP:function(a){b.bgOverlay.addClass(a),b.wrap.addClass(a)},_removeClassFromMFP:function(a){this.bgOverlay.removeClass(a),b.wrap.removeClass(a)},_hasScrollBar:function(a){return(b.isIE7?d.height():document.body.scrollHeight)>(a||v.height())},_setFocus:function(){(b.st.focus?b.content.find(b.st.focus).eq(0):b.wrap).focus()},_onFocusIn:function(c){if(c.target!==b.wrap[0]&&!a.contains(b.wrap[0],c.target))return b._setFocus(),!1},_parseMarkup:function(b,c,d){var e;d.data&&(c=a.extend(d.data,c)),y(l,[b,c,d]),a.each(c,function(a,c){if(void 0===c||c===!1)return!0;if(e=a.split("_"),e.length>1){var d=b.find(p+"-"+e[0]);if(d.length>0){var f=e[1];"replaceWith"===f?d[0]!==c[0]&&d.replaceWith(c):"img"===f?d.is("img")?d.attr("src",c):d.replaceWith('<img src="'+c+'" class="'+d.attr("class")+'" />'):d.attr(e[1],c)}}else b.find(p+"-"+a).html(c)})},_getScrollbarSize:function(){if(void 0===b.scrollbarSize){var a=document.createElement("div");a.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(a),b.scrollbarSize=a.offsetWidth-a.clientWidth,document.body.removeChild(a)}return b.scrollbarSize}},a.magnificPopup={instance:null,proto:t.prototype,modules:[],open:function(b,c){return A(),b=b?a.extend(!0,{},b):{},b.isObj=!0,b.index=c||0,this.instance.open(b)},close:function(){return a.magnificPopup.instance&&a.magnificPopup.instance.close()},registerModule:function(b,c){c.options&&(a.magnificPopup.defaults[b]=c.options),a.extend(this.proto,c.proto),this.modules.push(b)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">&times;</button>',tClose:"Close (Esc)",tLoading:"Loading..."}},a.fn.magnificPopup=function(c){A();var d=a(this);if("string"==typeof c)if("open"===c){var e,f=u?d.data("magnificPopup"):d[0].magnificPopup,g=parseInt(arguments[1],10)||0;f.items?e=f.items[g]:(e=d,f.delegate&&(e=e.find(f.delegate)),e=e.eq(g)),b._openClick({mfpEl:e},d,f)}else b.isOpen&&b[c].apply(b,Array.prototype.slice.call(arguments,1));else c=a.extend(!0,{},c),u?d.data("magnificPopup",c):d[0].magnificPopup=c,b.addGroup(d,c);return d};var C,D,E,F="inline",G=function(){E&&(D.after(E.addClass(C)).detach(),E=null)};a.magnificPopup.registerModule(F,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){b.types.push(F),w(h+"."+F,function(){G()})},getInline:function(c,d){if(G(),c.src){var e=b.st.inline,f=a(c.src);if(f.length){var g=f[0].parentNode;g&&g.tagName&&(D||(C=e.hiddenClass,D=x(C),C="mfp-"+C),E=f.after(D).detach().removeClass(C)),b.updateStatus("ready")}else b.updateStatus("error",e.tNotFound),f=a("<div>");return c.inlineElement=f,f}return b.updateStatus("ready"),b._parseMarkup(d,{},c),d}}});var H,I="ajax",J=function(){H&&a(document.body).removeClass(H)},K=function(){J(),b.req&&b.req.abort()};a.magnificPopup.registerModule(I,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){b.types.push(I),H=b.st.ajax.cursor,w(h+"."+I,K),w("BeforeChange."+I,K)},getAjax:function(c){H&&a(document.body).addClass(H),b.updateStatus("loading");var d=a.extend({url:c.src,success:function(d,e,f){var g={data:d,xhr:f};y("ParseAjax",g),b.appendContent(a(g.data),I),c.finished=!0,J(),b._setFocus(),setTimeout(function(){b.wrap.addClass(q)},16),b.updateStatus("ready"),y("AjaxContentAdded")},error:function(){J(),c.finished=c.loadError=!0,b.updateStatus("error",b.st.ajax.tError.replace("%url%",c.src))}},b.st.ajax.settings);return b.req=a.ajax(d),""}}});var L,M=function(c){if(c.data&&void 0!==c.data.title)return c.data.title;var d=b.st.image.titleSrc;if(d){if(a.isFunction(d))return d.call(b,c);if(c.el)return c.el.attr(d)||""}return""};a.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var c=b.st.image,d=".image";b.types.push("image"),w(m+d,function(){"image"===b.currItem.type&&c.cursor&&a(document.body).addClass(c.cursor)}),w(h+d,function(){c.cursor&&a(document.body).removeClass(c.cursor),v.off("resize"+p)}),w("Resize"+d,b.resizeImage),b.isLowIE&&w("AfterChange",b.resizeImage)},resizeImage:function(){var a=b.currItem;if(a&&a.img&&b.st.image.verticalFit){var c=0;b.isLowIE&&(c=parseInt(a.img.css("padding-top"),10)+parseInt(a.img.css("padding-bottom"),10)),a.img.css("max-height",b.wH-c)}},_onImageHasSize:function(a){a.img&&(a.hasSize=!0,L&&clearInterval(L),a.isCheckingImgSize=!1,y("ImageHasSize",a),a.imgHidden&&(b.content&&b.content.removeClass("mfp-loading"),a.imgHidden=!1))},findImageSize:function(a){var c=0,d=a.img[0],e=function(f){L&&clearInterval(L),L=setInterval(function(){return d.naturalWidth>0?void b._onImageHasSize(a):(c>200&&clearInterval(L),c++,void(3===c?e(10):40===c?e(50):100===c&&e(500)))},f)};e(1)},getImage:function(c,d){var e=0,f=function(){c&&(c.img[0].complete?(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("ready")),c.hasSize=!0,c.loaded=!0,y("ImageLoadComplete")):(e++,e<200?setTimeout(f,100):g()))},g=function(){c&&(c.img.off(".mfploader"),c===b.currItem&&(b._onImageHasSize(c),b.updateStatus("error",h.tError.replace("%url%",c.src))),c.hasSize=!0,c.loaded=!0,c.loadError=!0)},h=b.st.image,i=d.find(".mfp-img");if(i.length){var j=document.createElement("img");j.className="mfp-img",c.el&&c.el.find("img").length&&(j.alt=c.el.find("img").attr("alt")),c.img=a(j).on("load.mfploader",f).on("error.mfploader",g),j.src=c.src,i.is("img")&&(c.img=c.img.clone()),j=c.img[0],j.naturalWidth>0?c.hasSize=!0:j.width||(c.hasSize=!1)}return b._parseMarkup(d,{title:M(c),img_replaceWith:c.img},c),b.resizeImage(),c.hasSize?(L&&clearInterval(L),c.loadError?(d.addClass("mfp-loading"),b.updateStatus("error",h.tError.replace("%url%",c.src))):(d.removeClass("mfp-loading"),b.updateStatus("ready")),d):(b.updateStatus("loading"),c.loading=!0,c.hasSize||(c.imgHidden=!0,d.addClass("mfp-loading"),b.findImageSize(c)),d)}}});var N,O=function(){return void 0===N&&(N=void 0!==document.createElement("p").style.MozTransform),N};a.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(a){return a.is("img")?a:a.find("img")}},proto:{initZoom:function(){var a,c=b.st.zoom,d=".zoom";if(c.enabled&&b.supportsTransition){var e,f,g=c.duration,j=function(a){var b=a.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),d="all "+c.duration/1e3+"s "+c.easing,e={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},f="transition";return e["-webkit-"+f]=e["-moz-"+f]=e["-o-"+f]=e[f]=d,b.css(e),b},k=function(){b.content.css("visibility","visible")};w("BuildControls"+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.content.css("visibility","hidden"),a=b._getItemToZoom(),!a)return void k();f=j(a),f.css(b._getOffset()),b.wrap.append(f),e=setTimeout(function(){f.css(b._getOffset(!0)),e=setTimeout(function(){k(),setTimeout(function(){f.remove(),a=f=null,y("ZoomAnimationEnded")},16)},g)},16)}}),w(i+d,function(){if(b._allowZoom()){if(clearTimeout(e),b.st.removalDelay=g,!a){if(a=b._getItemToZoom(),!a)return;f=j(a)}f.css(b._getOffset(!0)),b.wrap.append(f),b.content.css("visibility","hidden"),setTimeout(function(){f.css(b._getOffset())},16)}}),w(h+d,function(){b._allowZoom()&&(k(),f&&f.remove(),a=null)})}},_allowZoom:function(){return"image"===b.currItem.type},_getItemToZoom:function(){return!!b.currItem.hasSize&&b.currItem.img},_getOffset:function(c){var d;d=c?b.currItem.img:b.st.zoom.opener(b.currItem.el||b.currItem);var e=d.offset(),f=parseInt(d.css("padding-top"),10),g=parseInt(d.css("padding-bottom"),10);e.top-=a(window).scrollTop()-f;var h={width:d.width(),height:(u?d.innerHeight():d[0].offsetHeight)-g-f};return O()?h["-moz-transform"]=h.transform="translate("+e.left+"px,"+e.top+"px)":(h.left=e.left,h.top=e.top),h}}});var P="iframe",Q="//about:blank",R=function(a){if(b.currTemplate[P]){var c=b.currTemplate[P].find("iframe");c.length&&(a||(c[0].src=Q),b.isIE8&&c.css("display",a?"block":"none"))}};a.magnificPopup.registerModule(P,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){b.types.push(P),w("BeforeChange",function(a,b,c){b!==c&&(b===P?R():c===P&&R(!0))}),w(h+"."+P,function(){R()})},getIframe:function(c,d){var e=c.src,f=b.st.iframe;a.each(f.patterns,function(){if(e.indexOf(this.index)>-1)return this.id&&(e="string"==typeof this.id?e.substr(e.lastIndexOf(this.id)+this.id.length,e.length):this.id.call(this,e)),e=this.src.replace("%id%",e),!1});var g={};return f.srcAction&&(g[f.srcAction]=e),b._parseMarkup(d,g,c),b.updateStatus("ready"),d}}});var S=function(a){var c=b.items.length;return a>c-1?a-c:a<0?c+a:a},T=function(a,b,c){return a.replace(/%curr%/gi,b+1).replace(/%total%/gi,c)};a.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var c=b.st.gallery,e=".mfp-gallery",g=Boolean(a.fn.mfpFastClick);return b.direction=!0,!(!c||!c.enabled)&&(f+=" mfp-gallery",w(m+e,function(){c.navigateByImgClick&&b.wrap.on("click"+e,".mfp-img",function(){if(b.items.length>1)return b.next(),!1}),d.on("keydown"+e,function(a){37===a.keyCode?b.prev():39===a.keyCode&&b.next()})}),w("UpdateStatus"+e,function(a,c){c.text&&(c.text=T(c.text,b.currItem.index,b.items.length))}),w(l+e,function(a,d,e,f){var g=b.items.length;e.counter=g>1?T(c.tCounter,f.index,g):""}),w("BuildControls"+e,function(){if(b.items.length>1&&c.arrows&&!b.arrowLeft){var d=c.arrowMarkup,e=b.arrowLeft=a(d.replace(/%title%/gi,c.tPrev).replace(/%dir%/gi,"left")).addClass(s),f=b.arrowRight=a(d.replace(/%title%/gi,c.tNext).replace(/%dir%/gi,"right")).addClass(s),h=g?"mfpFastClick":"click";e[h](function(){b.prev()}),f[h](function(){b.next()}),b.isIE7&&(x("b",e[0],!1,!0),x("a",e[0],!1,!0),x("b",f[0],!1,!0),x("a",f[0],!1,!0)),b.container.append(e.add(f))}}),w(n+e,function(){b._preloadTimeout&&clearTimeout(b._preloadTimeout),b._preloadTimeout=setTimeout(function(){b.preloadNearbyImages(),b._preloadTimeout=null},16)}),void w(h+e,function(){d.off(e),b.wrap.off("click"+e),b.arrowLeft&&g&&b.arrowLeft.add(b.arrowRight).destroyMfpFastClick(),b.arrowRight=b.arrowLeft=null}))},next:function(){b.direction=!0,b.index=S(b.index+1),b.updateItemHTML()},prev:function(){b.direction=!1,b.index=S(b.index-1),b.updateItemHTML()},goTo:function(a){b.direction=a>=b.index,b.index=a,b.updateItemHTML()},preloadNearbyImages:function(){var a,c=b.st.gallery.preload,d=Math.min(c[0],b.items.length),e=Math.min(c[1],b.items.length);for(a=1;a<=(b.direction?e:d);a++)b._preloadItem(b.index+a);for(a=1;a<=(b.direction?d:e);a++)b._preloadItem(b.index-a)},_preloadItem:function(c){if(c=S(c),!b.items[c].preloaded){var d=b.items[c];d.parsed||(d=b.parseEl(c)),y("LazyLoad",d),"image"===d.type&&(d.img=a('<img class="mfp-img" />').on("load.mfploader",function(){d.hasSize=!0}).on("error.mfploader",function(){d.hasSize=!0,d.loadError=!0,y("LazyLoadError",d)}).attr("src",d.src)),d.preloaded=!0}}}});var U="retina";a.magnificPopup.registerModule(U,{options:{replaceSrc:function(a){return a.src.replace(/\.\w+$/,function(a){return"@2x"+a})},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var a=b.st.retina,c=a.ratio;c=isNaN(c)?c():c,c>1&&(w("ImageHasSize."+U,function(a,b){b.img.css({"max-width":b.img[0].naturalWidth/c,width:"100%"})}),w("ElementParse."+U,function(b,d){d.src=a.replaceSrc(d,c)}))}}}}),function(){var b=1e3,c="ontouchstart"in window,d=function(){v.off("touchmove"+f+" touchend"+f)},e="mfpFastClick",f="."+e;a.fn.mfpFastClick=function(e){return a(this).each(function(){var g,h=a(this);if(c){var i,j,k,l,m,n;h.on("touchstart"+f,function(a){l=!1,n=1,m=a.originalEvent?a.originalEvent.touches[0]:a.touches[0],j=m.clientX,k=m.clientY,v.on("touchmove"+f,function(a){m=a.originalEvent?a.originalEvent.touches:a.touches,n=m.length,m=m[0],(Math.abs(m.clientX-j)>10||Math.abs(m.clientY-k)>10)&&(l=!0,d())}).on("touchend"+f,function(a){d(),l||n>1||(g=!0,a.preventDefault(),clearTimeout(i),i=setTimeout(function(){g=!1},b),e())})})}h.on("click"+f,function(){g||e()})})},a.fn.destroyMfpFastClick=function(){a(this).off("touchstart"+f+" click"+f),c&&v.off("touchmove"+f+" touchend"+f)}}(),A()}),"function"!=typeof Object.create&&(Object.create=function(a){function b(){}return b.prototype=a,new b}),function(a,b,c,d){var e={init:function(b,c){var d=this;d.elem=c,d.$elem=a(c),d.options=a.extend({},a.fn.rtTab.options,b),d.rtTabs()},rtTabs:function(){var c=this,d=c.options.activeTab;c.$elem.find("li:nth-child("+d+")").addClass("active"),c.rtTabContent(activeTabContent="yes"),c.rtClick();var e="false"!==c.$elem.attr("data-hash");if(e===!0){var f=b.location.hash;f&&c.$elem.find("li").find('a[href="'+f+'"]').trigger("click"),a(b).on("hashchange",function(){var a=b.location.hash;c.$elem.find("li").find('a[href="'+a+'"]').trigger("click")})}},rtClick:function(){var c=this,d=c.$elem.find("li"),e=d.find("a");e.on("click",function(e){e.preventDefault(),d.removeClass("active"),c.rtTabContent(),a(this).parent().addClass("active");var f=a(this).attr("href");a(f).removeClass("hide");var g="false"!==c.$elem.attr("data-hash");if(g===!0){var h=a(b).scrollTop();location.hash=a(this).attr("href"),a(b).scrollTop(h)}"function"==typeof c.options.onComplete&&c.options.onComplete.apply(c.elem,arguments)})},rtTabContent:function(b){var c=this,d=c.$elem.find("li"),e=d.find("a");e.each(function(){var c=a(this),d=c.attr("href");"yes"===b?c.parent().hasClass("active")||a(d).addClass("hide"):a(d).addClass("hide")})}};a.fn.rtTab=function(b){return this.each(function(){var c=Object.create(e);c.init(b,this),a.data(this,"rtTab",c)})},a.fn.rtTab.options={activeTab:1,onComplete:null}}(jQuery,window,document);var rtMagnificPopup,rtm_masonry_container,comment_media=!1,rtMediaHook={hooks:[],is_break:!1,register:function(a,b){"undefined"==typeof rtMediaHook.hooks[a]&&(rtMediaHook.hooks[a]=[]),rtMediaHook.hooks[a].push(b)},call:function(a,arguments){if("undefined"!=typeof rtMediaHook.hooks[a])for(i=0;i<rtMediaHook.hooks[a].length;++i)if(1!=rtMediaHook.hooks[a][i](arguments))return rtMediaHook.is_break=!0,!1;return!0}};jQuery("document").ready(function(a){function b(){if(jQuery("#rtmedia-media-view-form").length>0){var a=jQuery("#rtmedia-media-view-form").attr("action");jQuery.post(a,{},function(a){})}}function c(){var a=jQuery.magnificPopup.instance;jQuery(".mfp-arrow-right").on("click",function(b){a.next()}),jQuery(".mfp-arrow-left").on("click",function(b){a.prev()}),jQuery(".mfp-content .rtmedia-media").swipe({swipeLeft:function(b,c,d,e,f){a.next()},swipeRight:function(b,c,d,e,f){a.prev()},threshold:0})}function d(){jQuery(".mfp-arrow-right").hide(),jQuery(".mfp-arrow-left").hide(),jQuery(document).unbind("keydown")}function e(){rtmedia_disable_popup_navigation("#comment_content")}function f(){jQuery(".rtmedia-container").on("click",".rtmedia-delete-media",function(a){a.preventDefault(),confirm(rtmedia_media_delete_confirmation)&&jQuery(this).closest("form").submit()})}"undefined"!=typeof a.fn.rtTab&&a(".rtm-tabs").rtTab(),jQuery(".rtmedia-modal-link").length>0&&a(".rtmedia-modal-link").magnificPopup({type:"inline",midClick:!0,closeBtnInside:!0}),a("#rt_media_comment_form").submit(function(b){return""!=a.trim(a("#comment_content").val())||(0==jQuery("#rtmedia-single-media-container").length?rtmedia_gallery_action_alert_message(rtmedia_empty_comment_msg,"warning"):rtmedia_single_media_alert_message(rtmedia_empty_comment_msg,"warning"),!1)}),a("li.rtmedia-list-item p a").each(function(b){a(this).addClass("no-popup")}),a("li.rtmedia-list-item p a").each(function(b){a(this).addClass("no-popup")}),"undefined"!=typeof rtmedia_lightbox_enabled&&"1"==rtmedia_lightbox_enabled&&apply_rtMagnificPopup(".rtmedia-list-media.rtm-gallery-list, .rtmedia-activity-container ul.rtmedia-list, #bp-media-list,.bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content, .rtm-bbp-container, ul.rtm-comment-container"),jQuery.ajaxPrefilter(function(a,b,c){try{if(null==b.data||"undefined"==typeof b.data||"undefined"==typeof b.data.action)return!0}catch(a){return!0}if("activity_get_older_updates"==b.data.action){var d=b.success;a.success=function(a){d(a),apply_rtMagnificPopup(".rtmedia-activity-container ul.rtmedia-list, #bp-media-list, .bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content"),rtMediaHook.call("rtmedia_js_after_activity_added",[])}}else if("get_single_activity_content"==b.data.action){var d=b.success;a.success=function(a){d(a),setTimeout(function(){apply_rtMagnificPopup(".rtmedia-activity-container ul.rtmedia-list, #bp-media-list, .bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content"),jQuery("ul.activity-list li.rtmedia_update:first-child .wp-audio-shortcode, ul.activity-list li.rtmedia_update:first-child .wp-video-shortcode").mediaelementplayer({defaultVideoWidth:480,defaultVideoHeight:270})},900)}}}),jQuery.ajaxPrefilter(function(a,b,c){try{if(null==b.data||"undefined"==typeof b.data||"undefined"==typeof b.data.action)return!0}catch(a){return!0}if("activity_get_older_updates"==b.data.action){var d=b.success;a.success=function(a){d(a),apply_rtMagnificPopup(".rtmedia-activity-container ul.rtmedia-list, #bp-media-list, .bp-media-sc-list, li.media.album_updated ul,ul.bp-media-list-media, li.activity-item div.activity-content div.activity-inner div.bp_media_content"),
6
+ jQuery("ul.activity-list li.rtmedia_update div.rtmedia-item-thumbnail > audio.wp-audio-shortcode, ul.activity-list li.rtmedia_update div.rtmedia-item-thumbnail > video.wp-video-shortcode").mediaelementplayer({defaultVideoWidth:480,defaultVideoHeight:270}),setTimeout(function(){rtmedia_activity_stream_comment_media()},900),rtMediaHook.call("rtmedia_js_after_activity_added",[])}}}),jQuery(".rtmedia-container").on("click",".select-all",function(a){jQuery(this).toggleClass("unselect-all").toggleClass("select-all"),jQuery(this).attr("title",rtmedia_unselect_all_visible),jQuery(".rtmedia-list input").each(function(){jQuery(this).prop("checked",!0)}),jQuery(".rtmedia-list-item").addClass("bulk-selected")}),jQuery(".rtmedia-container").on("click",".unselect-all",function(a){jQuery(this).toggleClass("select-all").toggleClass("unselect-all"),jQuery(this).attr("title",rtmedia_select_all_visible),jQuery(".rtmedia-list input").each(function(){jQuery(this).prop("checked",!1)}),jQuery(".rtmedia-list-item").removeClass("bulk-selected")}),jQuery(".rtmedia-container").on("click",".rtmedia-move",function(a){jQuery(".rtmedia-delete-container").slideUp(),jQuery(".rtmedia-move-container").slideToggle()}),jQuery("#rtmedia-create-album-modal").on("click","#rtmedia_create_new_album",function(b){if($albumname=jQuery("<span/>").text(jQuery.trim(jQuery("#rtmedia_album_name").val())).html(),$context=jQuery.trim(jQuery("#rtmedia_album_context").val()),$context_id=jQuery.trim(jQuery("#rtmedia_album_context_id").val()),$privacy=jQuery.trim(jQuery("#rtmedia_select_album_privacy").val()),$create_album_nonce=jQuery.trim(jQuery("#rtmedia_create_album_nonce").val()),""!=$albumname){var c={action:"rtmedia_create_album",name:$albumname,context:$context,context_id:$context_id,create_album_nonce:$create_album_nonce};""!==$privacy&&(c.privacy=$privacy),a("#rtmedia_create_new_album").attr("disabled","disabled");var d=a("#rtmedia_create_new_album").html();a("#rtmedia_create_new_album").prepend("<img src='"+rMedia_loading_file+"' />"),jQuery.post(rtmedia_ajax_url,c,function(b){if("undefined"!=typeof b.album){b=jQuery.trim(b.album);var c=!0;jQuery(".rtmedia-user-album-list").each(function(){if(jQuery(this).children("optgroup").each(function(){if(jQuery(this).attr("value")===$context)return c=!1,void jQuery(this).append('<option value="'+b+'">'+$albumname+"</option>")}),c){var a=$context.charAt(0).toUpperCase()+$context.slice(1)+" "+rtmedia_main_js_strings.rtmedia_albums,d='<optgroup value="'+$context+'" label="'+a+'"><option value="'+b+'">'+$albumname+"</option></optgroup>";jQuery(this).append(d)}}),jQuery('select.rtmedia-user-album-list option[value="'+b+'"]').prop("selected",!0),jQuery(".rtmedia-create-new-album-container").slideToggle(),jQuery("#rtmedia_album_name").val(""),jQuery("#rtmedia-create-album-modal").append("<div class='rtmedia-success rtmedia-create-album-alert'><b>"+$albumname+"</b>"+rtmedia_album_created_msg+"</div>"),setTimeout(function(){jQuery(".rtmedia-create-album-alert").remove()},4e3),setTimeout(function(){galleryObj.reloadView(),jQuery(".close-reveal-modal").click()},2e3)}else"undefined"!=typeof b.error?rtmedia_gallery_action_alert_message(b.error,"warning"):rtmedia_gallery_action_alert_message(rtmedia_something_wrong_msg,"warning");a("#rtmedia_create_new_album").removeAttr("disabled"),a("#rtmedia_create_new_album").html(d)})}else rtmedia_gallery_action_alert_message(rtmedia_empty_album_name_msg,"warning")}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-selected",function(a){jQuery(".rtmedia-list :checkbox:checked").length>0?confirm(rtmedia_selected_media_delete_confirmation)&&jQuery(this).closest("form").attr("action","../../../"+rtmedia_media_slug+"/delete").submit():rtmedia_gallery_action_alert_message(rtmedia_no_media_selected,"warning")}),jQuery(".rtmedia-container").on("click",".rtmedia-move-selected",function(a){jQuery(".rtmedia-list :checkbox:checked").length>0?confirm(rtmedia_selected_media_move_confirmation)&&jQuery(this).closest("form").attr("action","").submit():rtmedia_gallery_action_alert_message(rtmedia_no_media_selected,"warning")}),jQuery("#buddypress").on("change",".rtm-activity-privacy-opt",function(){var a=jQuery(this).attr("id");a=a.split("-"),a=a[a.length-1];var b=this;data={activity_id:a,privacy:jQuery(this).val(),nonce:jQuery("#rtmedia_activity_privacy_nonce").val(),action:"rtm_change_activity_privacy"},jQuery.post(ajaxurl,data,function(a){var c="",d="";"true"==a?(c=rtmedia_main_js_strings.privacy_update_success,d="success"):(c=rtmedia_main_js_strings.privacy_update_error,d="fail"),jQuery(b).after('<p class="rtm-ac-privacy-updated '+d+'">'+c+"</p>"),setTimeout(function(){jQuery(b).siblings(".rtm-ac-privacy-updated").remove()},2e3)})}),b(),rtMediaHook.register("rtmedia_js_popup_after_content_added",function(){b(),f(),mfp=jQuery.magnificPopup.instance,jQuery(mfp.items).size()>1&&0==comment_media?c():d(),e(),rtmedia_disable_popup_navigation_comment_media_focus();var g=a(window).height();jQuery(".rtm-lightbox-container .mejs-video").css({height:.8*g,"over-flow":"hidden"}),jQuery(".mfp-content .rtmedia-media").css({"max-height":.87*g,"over-flow":"hidden"}),rtmedia_init_action_dropdown(".rtm-lightbox-container .rtmedia-actions"),jQuery(".rtmedia-comment-link").on("click",function(a){a.preventDefault(),jQuery("#comment_content").focus()}),jQuery(".rtm-more").shorten({showChars:130});var h=a(".rtm-gallery-title"),i="";i=a.isEmptyObject(h)?a("#subnav.item-list-tabs li.selected ").html():h.html(),""!=i&&a(".rtm-ltb-gallery-title .ltb-title").html(i);var j=a("#subnav.item-list-tabs li.selected span").html();return a("li.total").html(j),!0});var g=jQuery("#drag-drop-area"),h=jQuery("#whats-new");g.html();jQuery("#rtmedia-upload-container").after("<div id='rtm-drop-files-title'>"+rtmedia_drop_media_msg+"</div>"),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&jQuery("#whats-new-textarea").append("<div id='rtm-drop-files-title'>"+rtmedia_drop_media_msg+"</div>"),jQuery(document).on("dragover",function(a){a.preventDefault(),a.target!=this&&(jQuery("#rtm-media-gallery-uploader").show(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&h.addClass("rtm-drag-drop-active"),g.addClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").show())}).on("dragleave",function(a){return a.preventDefault(),(0==a.originalEvent.pageX||0==a.originalEvent.pageY)&&("undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&(h.removeClass("rtm-drag-drop-active"),h.removeAttr("style")),g.removeClass("rtm-drag-drop-active"),void jQuery("#rtm-drop-files-title").hide())}).on("drop",function(a){a.preventDefault(),jQuery(".bp-suggestions").focus(),"undefined"!=typeof rtmedia_bp_enable_activity&&"1"==rtmedia_bp_enable_activity&&(h.removeClass("rtm-drag-drop-active"),h.removeAttr("style")),g.removeClass("rtm-drag-drop-active"),jQuery("#rtm-drop-files-title").hide()}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-album",function(a){a.preventDefault(),confirm(rtmedia_album_delete_confirmation)&&jQuery(this).closest("form").submit()}),jQuery(".rtmedia-container").on("click",".rtmedia-delete-media",function(a){a.preventDefault(),confirm(rtmedia_media_delete_confirmation)&&jQuery(this).closest("form").submit()}),rtmedia_init_action_dropdown(""),a(document).click(function(){a(".click-nav ul").is(":visible")&&a(".click-nav ul",this).hide()}),jQuery(".rtmedia-comment-link").on("click",function(a){a.preventDefault(),jQuery("#comment_content").focus()}),jQuery(".rtm-more").length>0&&a(".rtm-more").shorten({showChars:200}),"undefined"!=typeof rtmedia_masonry_layout&&"true"==rtmedia_masonry_layout&&0==jQuery(".rtmedia-container .rtmedia-list.rtm-no-masonry").length&&(rtm_masonry_container=jQuery(".rtmedia-container .rtmedia-list"),rtm_masonry_container.masonry({itemSelector:".rtmedia-list-item"}),setInterval(function(){jQuery.each(jQuery(".rtmedia-list.masonry .rtmedia-item-title"),function(a,b){jQuery(b).width(jQuery(b).siblings(".rtmedia-item-thumbnail").children("img").width())}),rtm_masonry_reload(rtm_masonry_container)},1e3),jQuery.each(jQuery(".rtmedia-list.masonry .rtmedia-item-title"),function(a,b){jQuery(b).width(jQuery(b).siblings(".rtmedia-item-thumbnail").children("img").width())})),jQuery(".rtm-uploader-tabs").length>0&&jQuery(".rtm-uploader-tabs li").click(function(a){jQuery(this).hasClass("active")||(jQuery(this).siblings().removeClass("active"),jQuery(this).parents(".rtm-uploader-tabs").siblings().hide(),class_name=jQuery(this).attr("class"),jQuery(this).parents(".rtm-uploader-tabs").siblings('[data-id="'+class_name+'"]').show(),jQuery(this).addClass("active"),"rtm-upload-tab"!=class_name?jQuery("div.moxie-shim").hide():jQuery("div.moxie-shim").show())}),jQuery(".rtmedia-container").on("click",".rtm-delete-media",function(a){a.preventDefault();var b="Are you sure you want to delete this media?";if("undefined"!=typeof rtmedia_media_delete_confirmation&&(b=rtmedia_media_delete_confirmation),confirm(b)){var c=jQuery(this).closest("li"),d=jQuery("#rtmedia_media_delete_nonce").val(),e={action:"delete_uploaded_media",nonce:d,media_id:c.attr("id")};jQuery.ajax({url:ajaxurl,type:"post",data:e,success:function(a){"1"==a?(rtmedia_gallery_action_alert_message(rtmedia_main_js_strings.file_delete_success,"success"),c.remove(),"undefined"!=typeof rtmedia_masonry_layout&&"true"==rtmedia_masonry_layout&&0==jQuery(".rtmedia-container .rtmedia-list.rtm-no-masonry").length&&rtm_masonry_reload(rtm_masonry_container)):rtmedia_gallery_action_alert_message(rtmedia_file_not_deleted,"warning")}})}})}),function(a){a.fn.shorten=function(b){"use strict";var c={showChars:100,minHideChars:10,ellipsesText:"...",moreText:rtmedia_read_more,lessText:rtmedia__show_less,onLess:function(){},onMore:function(){},errMsg:null,force:!1};return b&&a.extend(c,b),!(a(this).data("jquery.shorten")&&!c.force)&&(a(this).data("jquery.shorten",!0),a(document).off("click",".morelink"),a(document).on({click:function(){var b=a(this);return b.hasClass("less")?(b.removeClass("less"),b.html(c.moreText),b.parent().prev().hide(0,function(){b.parent().prev().prev().show()}).hide(0,function(){c.onLess()})):(b.addClass("less"),b.html(c.lessText),b.parent().prev().show(0,function(){b.parent().prev().prev().hide()}).show(0,function(){c.onMore()})),!1}},".morelink"),this.each(function(){var b=a(this),d=b.html(),e=b.text().length;if(e>c.showChars+c.minHideChars){var f=d.substr(0,c.showChars);if(f.indexOf("<")>=0){for(var g=!1,h="",i=0,k=[],l=null,m=0,n=0;n<=c.showChars;m++)if("<"!=d[m]||g||(g=!0,l=d.substring(m+1,d.indexOf(">",m)),"/"==l[0]?l!="/"+k[0]?c.errMsg="ERROR en HTML: the top of the stack should be the tag that closes":k.shift():"br"!=l.toLowerCase()&&k.unshift(l)),g&&">"==d[m]&&(g=!1),g)h+=d.charAt(m);else if(n++,i<=c.showChars)h+=d.charAt(m),i++;else if(k.length>0){for(j=0;j<k.length;j++)h+="</"+k[j]+">";break}f=a("<div/>").html(h+'<span class="ellip">'+c.ellipsesText+"</span>").html()}else f+=c.ellipsesText;var o='<div class="shortcontent">'+f+'</div><div class="allcontent">'+d+'</div><span><a href="javascript://nop/" class="morelink">'+c.moreText+"</a></span>";b.html(o),b.find(".allcontent").hide(),a(".shortcontent p:last",b).css("margin-bottom",0)}}))}}(jQuery),window.onload=function(){"undefined"!=typeof rtmedia_masonry_layout&&"true"==rtmedia_masonry_layout&&0==jQuery(".rtmedia-container .rtmedia-list.rtm-no-masonry").length&&rtm_masonry_reload(rtm_masonry_container)};
app/helper/RTMediaActivityModel.php CHANGED
@@ -43,7 +43,6 @@ class RTMediaActivityModel extends RTDBModel {
43
  'activity_id' => $activity_id,
44
  'blog_id' => get_current_blog_id(),
45
  );
46
-
47
  $results = $this->get( $columns );
48
 
49
  if ( $results ) {
@@ -52,4 +51,88 @@ class RTMediaActivityModel extends RTDBModel {
52
  return false;
53
  }
54
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
  }
43
  'activity_id' => $activity_id,
44
  'blog_id' => get_current_blog_id(),
45
  );
 
46
  $results = $this->get( $columns );
47
 
48
  if ( $results ) {
51
  return false;
52
  }
53
  }
54
+
55
+ /**
56
+ * Update the Privacy setting of the Profile Media Activity Type of Media.
57
+ * Update all the Privacy Setting of the Media that has Comment and link on it of which an activity is being created
58
+ *
59
+ * @since 4.3
60
+ *
61
+ * @param array $media_ids_of_activity List of all the Media Id that is being updated.
62
+ * @param int $privacy Privacy to set.
63
+ */
64
+ public function profile_activity_update( $media_ids_of_activity = array(), $privacy, $parent_activity_id = false ) {
65
+ foreach ( $media_ids_of_activity as $media_id_of_activity ) {
66
+ // Get all the activities from item_id.
67
+ $activity_parents = bp_activity_get( array( 'filter' => array( 'primary_id' => $media_id_of_activity ) ) );
68
+
69
+ /* if has activity */
70
+ if ( ! empty( $activity_parents['activities'] ) ) {
71
+ foreach ( $activity_parents['activities'] as $parent ) {
72
+ $this->set_privacy( $parent->id, $parent->user_id, $privacy );
73
+ }
74
+ }
75
+ }
76
+
77
+ if ( ! empty ( $parent_activity_id ) ) {
78
+ // Get all the activities from item_id.
79
+ $parent_activity_id = intval( $parent_activity_id );
80
+ $activity_parents = bp_activity_get(
81
+ array(
82
+ 'filter' => array( 'primary_id' => $parent_activity_id ),
83
+ 'display_comments' => true,
84
+ )
85
+ );
86
+
87
+ // if has activity.
88
+ if ( ! empty( $activity_parents['activities'] ) ) {
89
+ foreach ( $activity_parents['activities'] as $parent ) {
90
+ $this->set_privacy( $parent->id, $parent->user_id, $privacy );
91
+ }
92
+ }
93
+ }
94
+ }
95
+
96
+ public function set_privacy( $activity_id, $user_id, $privacy ) {
97
+ if ( function_exists( 'bp_activity_update_meta' ) ) {
98
+ bp_activity_update_meta( $activity_id, 'rtmedia_privacy', $privacy );
99
+ }
100
+
101
+ /* check is value exits or not */
102
+ if ( ! $this->check( $activity_id ) ) {
103
+ $this->insert( array( 'activity_id' => $activity_id, 'user_id' => $user_id, 'privacy' => $privacy ) );
104
+ } else {
105
+ $this->update( array( 'activity_id' => $activity_id, 'user_id' => $user_id, 'privacy' => $privacy ), array( 'activity_id' => $activity_id ) );
106
+ }
107
+
108
+ // update privacy of corresponding media
109
+ $media_model = new RTMediaModel();
110
+ $activity_media = $media_model->get( array( 'activity_id' => $activity_id ) );
111
+ if ( ! empty( $activity_media ) && is_array( $activity_media ) ) {
112
+ foreach ( $activity_media as $single_media ) {
113
+ /* get all the media ids in the activity */
114
+ $media_ids_of_activity[] = $single_media->id;
115
+
116
+ $where = array( 'id' => $single_media->id );
117
+ $columns = array( 'privacy' => $privacy );
118
+
119
+ // update media privacy
120
+ $media_model->update( $columns, $where );
121
+ }
122
+ }
123
+ }
124
+
125
+ public function set_privacy_for_rtmedia_activity( $parent_activity_id, $activity_id, $user_id ) {
126
+ /* get default privacy*/
127
+ $privacy = get_rtmedia_default_privacy();
128
+
129
+ /* get parent privacy */
130
+ $activity_privacy = $this->get( array( 'activity_id' => $parent_activity_id ) );
131
+ if ( isset( $activity_privacy[0] ) && isset( $activity_privacy[0]->privacy ) ) {
132
+ $privacy = $activity_privacy[0]->privacy;
133
+ }
134
+
135
+ /* add the privacy */
136
+ $this->set_privacy( $activity_id, $user_id, $privacy );
137
+ }
138
  }
app/helper/RTMediaSettings.php CHANGED
@@ -45,6 +45,7 @@ if ( ! class_exists( 'RTMediaSettings' ) ) {
45
  $defaults = array(
46
  'general_enableAlbums' => 1,
47
  'general_enableComments' => 0,
 
48
  'general_downloadButton' => 0,
49
  'general_enableLightbox' => 1,
50
  'general_perPageMedia' => 10,
@@ -85,6 +86,7 @@ if ( ! class_exists( 'RTMediaSettings' ) ) {
85
 
86
  $defaults['buddypress_enableOnGroup'] = 1;
87
  $defaults['buddypress_enableOnActivity'] = 1;
 
88
  $defaults['buddypress_enableOnProfile'] = 1;
89
  $defaults['buddypress_limitOnActivity'] = 0;
90
  $defaults['buddypress_enableNotification'] = 0;
@@ -93,6 +95,9 @@ if ( ! class_exists( 'RTMediaSettings' ) ) {
93
  $defaults['styles_custom'] = '';
94
  $defaults['styles_enabled'] = 1;
95
 
 
 
 
96
  if ( isset( $options['general_videothumbs'] ) && is_numeric( $options['general_videothumbs'] ) && intval( $options['general_videothumbs'] ) > 10 ) {
97
  $defaults['general_videothumbs'] = 10;
98
  }
45
  $defaults = array(
46
  'general_enableAlbums' => 1,
47
  'general_enableComments' => 0,
48
+ 'general_enableLikes' => 1,
49
  'general_downloadButton' => 0,
50
  'general_enableLightbox' => 1,
51
  'general_perPageMedia' => 10,
86
 
87
  $defaults['buddypress_enableOnGroup'] = 1;
88
  $defaults['buddypress_enableOnActivity'] = 1;
89
+ $defaults['buddypress_enableOnComment'] = 1;
90
  $defaults['buddypress_enableOnProfile'] = 1;
91
  $defaults['buddypress_limitOnActivity'] = 0;
92
  $defaults['buddypress_enableNotification'] = 0;
95
  $defaults['styles_custom'] = '';
96
  $defaults['styles_enabled'] = 1;
97
 
98
+ /* default value for add media in comment media */
99
+ $defaults['rtmedia_disable_media_in_commented_media'] = 1;
100
+
101
  if ( isset( $options['general_videothumbs'] ) && is_numeric( $options['general_videothumbs'] ) && intval( $options['general_videothumbs'] ) > 10 ) {
102
  $defaults['general_videothumbs'] = 10;
103
  }
app/helper/RTMediaSupport.php CHANGED
@@ -616,9 +616,6 @@ if ( ! class_exists( 'RTMediaSupport' ) ) {
616
  <tr>
617
  <td>Website</td><td>' . strip_tags( $form_data['website'] ) . '</td>
618
  </tr>
619
- <tr>
620
- <td>Phone</td><td>' . strip_tags( $form_data['phone'] ) . '</td>
621
- </tr>
622
  <tr>
623
  <td>Subject</td><td>' . strip_tags( $form_data['subject'] ) . '</td>
624
  </tr>
616
  <tr>
617
  <td>Website</td><td>' . strip_tags( $form_data['website'] ) . '</td>
618
  </tr>
 
 
 
619
  <tr>
620
  <td>Subject</td><td>' . strip_tags( $form_data['subject'] ) . '</td>
621
  </tr>
app/helper/rtUploadAttachment.php CHANGED
@@ -1,11 +1,12 @@
1
  <?php
2
  // Avoid direct access to the file.
 
 
 
3
  if ( ! defined( 'ABSPATH' ) ) {
4
- exit;
5
  }
6
 
7
- $parse_uri = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] );
8
- require_once( $parse_uri[0] . 'wp-load.php' );
9
  $data = array();
10
  if ( ! empty( $_FILES ) ) {
11
  $error = false;
1
  <?php
2
  // Avoid direct access to the file.
3
+ $parse_uri = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] );
4
+ require_once( $parse_uri[0] . 'wp-load.php' );
5
+
6
  if ( ! defined( 'ABSPATH' ) ) {
7
+ exit;
8
  }
9
 
 
 
10
  $data = array();
11
  if ( ! empty( $_FILES ) ) {
12
  $error = false;
app/main/RTMedia.php CHANGED
@@ -307,11 +307,20 @@ class RTMedia {
307
  max-height: <?php echo esc_attr( $this->options['defaultSizes_photo_medium_height'] ); ?>px;
308
  overflow: hidden;
309
  }
 
 
310
  .rtmedia-activity-container .mejs-container.mejs-video{
311
  min-height: <?php echo esc_attr( $this->options['defaultSizes_video_activityPlayer_height'] ); ?>px;
312
  min-width: <?php echo esc_attr( $this->options['defaultSizes_video_activityPlayer_width'] ); ?>px;
313
  }
314
  <?php
 
 
 
 
 
 
 
315
  }
316
 
317
  function custom_style_for_gallery_image_size() {
@@ -536,6 +545,8 @@ class RTMedia {
536
 
537
  $bp_media_options = rtmedia_get_site_option( 'bp_media_options' );
538
 
 
 
539
  $defaults = array(
540
  'general_enableAlbums' => 1,
541
  'general_enableComments' => 0,
@@ -831,6 +842,10 @@ class RTMedia {
831
  global $rtmediajsonapi;
832
  $rtmediajsonapi = new RTMediaJsonApi();
833
 
 
 
 
 
834
  do_action( 'bp_media_init' ); // legacy For plugin using this actions
835
  do_action( 'rtmedia_init' );
836
  }
@@ -1132,6 +1147,74 @@ class RTMedia {
1132
  );
1133
  wp_localize_script( 'rtmedia-main', 'rtmedia_media_size_config', $media_size_config );
1134
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1135
  }
1136
 
1137
  function set_bp_bar() {
@@ -1295,7 +1378,19 @@ function get_rtmedia_permalink( $id ) {
1295
  // Removing filter so that doesn't affect other calls to this function
1296
  remove_filter( 'bp_get_root_domain', 'rtmedia_get_current_blog_url' );
1297
 
1298
- return trailingslashit( $parent_link . RTMEDIA_MEDIA_SLUG . '/' . $id );
 
 
 
 
 
 
 
 
 
 
 
 
1299
  }
1300
 
1301
  function get_rtmedia_user_link( $id ) {
307
  max-height: <?php echo esc_attr( $this->options['defaultSizes_photo_medium_height'] ); ?>px;
308
  overflow: hidden;
309
  }
310
+
311
+ .rtmedia-comment-media-container .mejs-container.mejs-video,
312
  .rtmedia-activity-container .mejs-container.mejs-video{
313
  min-height: <?php echo esc_attr( $this->options['defaultSizes_video_activityPlayer_height'] ); ?>px;
314
  min-width: <?php echo esc_attr( $this->options['defaultSizes_video_activityPlayer_width'] ); ?>px;
315
  }
316
  <?php
317
+ global $rtmedia;
318
+ if ( rtmedia_check_comment_media_allow() && ! rtmedia_check_comment_in_commented_media_allow() ) { ?>
319
+ #buddypress ul.activity-list li.activity-item .activity-comments ul li form.ac-form .rtmedia-comment-media-upload,#buddypress ul.activity-list li.activity-item .activity-comments ul li form.ac-form .rtmedia-container {
320
+ display: none !important
321
+ }
322
+ <?php
323
+ }
324
  }
325
 
326
  function custom_style_for_gallery_image_size() {
545
 
546
  $bp_media_options = rtmedia_get_site_option( 'bp_media_options' );
547
 
548
+
549
+
550
  $defaults = array(
551
  'general_enableAlbums' => 1,
552
  'general_enableComments' => 0,
842
  global $rtmediajsonapi;
843
  $rtmediajsonapi = new RTMediaJsonApi();
844
 
845
+ if( function_exists( 'rtmedia_enable_comment_media_uplaod' ) ){
846
+ rtmedia_enable_comment_media_uplaod();
847
+ }
848
+
849
  do_action( 'bp_media_init' ); // legacy For plugin using this actions
850
  do_action( 'rtmedia_init' );
851
  }
1147
  );
1148
  wp_localize_script( 'rtmedia-main', 'rtmedia_media_size_config', $media_size_config );
1149
 
1150
+
1151
+ /* rtMedia fot comment media script localize*/
1152
+ $request_uri = rtm_get_server_var( 'REQUEST_URI', 'FILTER_SANITIZE_URL' );
1153
+ $url = trailingslashit( $request_uri );
1154
+ $rtmedia_slug = '/' . RTMEDIA_MEDIA_SLUG;
1155
+ // check position of media slug from end of the URL
1156
+ if ( strrpos( $url, $rtmedia_slug ) !== false ) {
1157
+ // split the url upto the last occurance of media slug
1158
+ $url_upload = substr( $url, 0, strrpos( $url, $rtmedia_slug ) );
1159
+ $url = trailingslashit( $url_upload ) . 'upload/';
1160
+ } else {
1161
+ $url = trailingslashit( $url ) . 'upload/';
1162
+ }
1163
+
1164
+ $params = array(
1165
+ 'url' => $url,
1166
+ 'runtimes' => 'html5,flash,html4',
1167
+ 'browse_button' => 'rtmedia-comment-media-upload',
1168
+ 'container' => 'rtmedia-comment-media-upload-container',
1169
+ 'filters' => apply_filters( 'rtmedia_plupload_files_filter', array(
1170
+ array(
1171
+ 'title' => 'Media Files',
1172
+ 'extensions' => get_rtmedia_allowed_upload_type(),
1173
+ ),
1174
+ ) ),
1175
+ 'max_file_size' => ( wp_max_upload_size() ) / ( 1024 * 1024 ) . 'M',
1176
+ 'multipart' => true,
1177
+ 'urlstream_upload' => true,
1178
+ 'flash_swf_url' => includes_url( 'js/plupload/plupload.flash.swf' ),
1179
+ 'silverlight_xap_url' => includes_url( 'js/plupload/plupload.silverlight.xap' ),
1180
+ 'file_data_name' => 'rtmedia_file', // key passed to $_FILE.
1181
+ 'multi_selection' => false,
1182
+ 'multipart_params' => apply_filters( 'rtmedia-multi-params', array(
1183
+ 'redirect' => 'no',
1184
+ 'action' => 'wp_handle_upload',
1185
+ '_wp_http_referer' => $request_uri,
1186
+ 'mode' => 'file_upload',
1187
+ 'rtmedia_upload_nonce' => RTMediaUploadView::upload_nonce_generator( false, true ),
1188
+ ) ),
1189
+ 'max_file_size_msg' => apply_filters( 'rtmedia_plupload_file_size_msg', min( array(
1190
+ ini_get( 'upload_max_filesize' ),
1191
+ ini_get( 'post_max_size' ),
1192
+ ) ) ),
1193
+ );
1194
+
1195
+ $params = apply_filters( 'rtmedia_modify_upload_params', $params );
1196
+
1197
+
1198
+ global $rtmedia;
1199
+ $rtmedia_extns = array();
1200
+ foreach ( $rtmedia->allowed_types as $allowed_types_key => $allowed_types_value ) {
1201
+ $rtmedia_extns[ $allowed_types_key ] = $allowed_types_value['extn'];
1202
+ }
1203
+
1204
+ $rtmedia_disable_media = "1";
1205
+ /* if the rtmedia option does have value pick from there*/
1206
+ if( isset( $rtmedia->options['rtmedia_disable_media_in_commented_media'] ) ){
1207
+ $rtmedia_disable_media = $rtmedia->options['rtmedia_disable_media_in_commented_media'];
1208
+ }
1209
+ wp_localize_script( 'rtmedia-main', 'rtmedia_disable_media_in_commented_media', $rtmedia_disable_media );
1210
+
1211
+ wp_localize_script( 'rtmedia-main', 'rtmedia_disable_media_in_commented_media_text', esc_html__( 'Adding media in Comments is not allowed', 'buddypress-media' ) );
1212
+
1213
+ wp_localize_script( 'rtmedia-backbone', 'rtmedia_exteansions', $rtmedia_extns );
1214
+ wp_localize_script( 'rtmedia-backbone', 'rtMedia_update_plupload_comment', $params );
1215
+ wp_localize_script( 'rtmedia-backbone', 'rMedia_loading_file', admin_url( '/images/loading.gif' ) );
1216
+
1217
+
1218
  }
1219
 
1220
  function set_bp_bar() {
1378
  // Removing filter so that doesn't affect other calls to this function
1379
  remove_filter( 'bp_get_root_domain', 'rtmedia_get_current_blog_url' );
1380
 
1381
+ $permalink = trailingslashit( $parent_link . RTMEDIA_MEDIA_SLUG . '/' . $id );
1382
+
1383
+ /**
1384
+ * Filters the rtmedia permalink for a media list.
1385
+ *
1386
+ * @since 4.2.2
1387
+ *
1388
+ * @param string $permalink The rtmedia's permalink.
1389
+ * @param object $media The media in question.
1390
+ * @param int $id ID of the media.
1391
+ */
1392
+
1393
+ return apply_filters( 'get_rtmedia_permalink', $permalink, $media, $id );
1394
  }
1395
 
1396
  function get_rtmedia_user_link( $id ) {
app/main/contexts/RTMediaContext.php CHANGED
@@ -60,8 +60,14 @@ class RTMediaContext {
60
  $this->type = $post->post_type;
61
  $this->id = $post->ID;
62
  } else {
63
- $this->type = 'profile';
64
- $this->id = get_current_user_id();
 
 
 
 
 
 
65
  }
66
  $this->type = apply_filters( 'rtmedia_wp_context_type', $this->type );
67
  $this->id = apply_filters( 'rtmedia_wp_context_id', $this->id );
60
  $this->type = $post->post_type;
61
  $this->id = $post->ID;
62
  } else {
63
+ $wp_default_context = array( 'page', 'post' );
64
+ if ( isset( $_REQUEST['context'] ) && in_array( $_REQUEST['context'], $wp_default_context ) ) {
65
+ $this->type = $_REQUEST['context'];
66
+ $this->id = $_REQUEST['context_id'];
67
+ } else {
68
+ $this->type = 'profile';
69
+ $this->id = get_current_user_id();
70
+ }
71
  }
72
  $this->type = apply_filters( 'rtmedia_wp_context_type', $this->type );
73
  $this->id = apply_filters( 'rtmedia_wp_context_id', $this->id );
app/main/controllers/activity/RTMediaActivity.php CHANGED
@@ -34,14 +34,14 @@ class RTMediaActivity {
34
  $this->privacy = $privacy;
35
  }
36
 
37
- function create_activity_html() {
38
 
39
  $html = '';
40
 
41
- $html .= '<div class="rtmedia-activity-container">';
42
 
43
  if ( ! empty( $this->activity_text ) ) {
44
- $html .= '<div class="rtmedia-activity-text"><span>';
45
  $html .= $this->activity_text;
46
  $html .= '</span></div>';
47
  }
@@ -59,7 +59,7 @@ class RTMediaActivity {
59
  if ( intval( $limit_activity_feed ) > 0 ) {
60
  $media_details = array_slice( $media_details, 0, $limit_activity_feed, true );
61
  }
62
- $rtmedia_activity_ul_class = apply_filters( 'rtmedia_activity_ul_class', 'rtm-activity-media-list' );
63
  $li_content = '';
64
  $count = 0;
65
  foreach ( $media_details as $media ) {
@@ -92,7 +92,13 @@ class RTMediaActivity {
92
  $li_content .= '</li>';
93
  $count ++;
94
  }
95
- $html .= '<ul class="rtmedia-list ' . esc_attr( $rtmedia_activity_ul_class ) . ' rtmedia-activity-media-length-' . esc_attr( $count ) . '">';
 
 
 
 
 
 
96
  $html .= $li_content;
97
  $html .= '</ul>';
98
  $html .= '</div>';
@@ -107,8 +113,11 @@ class RTMediaActivity {
107
 
108
  }
109
 
110
- function media( $media ) {
111
  $html = false;
 
 
 
112
  if ( isset( $media->media_type ) ) {
113
  global $rtmedia;
114
  if ( 'photo' === $media->media_type ) {
@@ -124,7 +133,7 @@ class RTMediaActivity {
124
  } else {
125
  $poster = '';
126
  }
127
- $html = '<video ' . $poster . ' src="' . esc_url( wp_get_attachment_url( $media->media_id ) ) . '" width="' . esc_attr( $rtmedia->options['defaultSizes_video_activityPlayer_width'] ) . '" height="' . esc_attr( $rtmedia->options['defaultSizes_video_activityPlayer_height'] ) . '" type="video/mp4" class="wp-video-shortcode" id="rt_media_video_' . esc_attr( $media->id ) . '" controls="controls" preload="none"></video>';
128
  } elseif ( 'music' === $media->media_type ) {
129
  $html = '<audio src="' . esc_url( wp_get_attachment_url( $media->media_id ) ) . '" width="' . esc_attr( $rtmedia->options['defaultSizes_music_activityPlayer_width'] ) . '" height="0" type="audio/mp3" class="wp-audio-shortcode" id="rt_media_audio_' . esc_attr( $media->id ) . '" controls="controls" preload="none"></audio>';
130
  }
34
  $this->privacy = $privacy;
35
  }
36
 
37
+ function create_activity_html( $type = 'activity' ) {
38
 
39
  $html = '';
40
 
41
+ $html .= '<div class="rtmedia-'.$type.'-container">';
42
 
43
  if ( ! empty( $this->activity_text ) ) {
44
+ $html .= '<div class="rtmedia-'.$type.'-text"><span>';
45
  $html .= $this->activity_text;
46
  $html .= '</span></div>';
47
  }
59
  if ( intval( $limit_activity_feed ) > 0 ) {
60
  $media_details = array_slice( $media_details, 0, $limit_activity_feed, true );
61
  }
62
+ $rtmedia_activity_ul_class = apply_filters( 'rtmedia_'.$type.'_ul_class', 'rtm-activity-media-list' );
63
  $li_content = '';
64
  $count = 0;
65
  foreach ( $media_details as $media ) {
92
  $li_content .= '</li>';
93
  $count ++;
94
  }
95
+
96
+ if( 'activity' == $type ){
97
+ $html .= '<ul class="rtmedia-list ' . esc_attr( $rtmedia_activity_ul_class ) . ' rtmedia-activity-media-length-' . esc_attr( $count ) . '">';
98
+ }else{
99
+ $html .= '<ul class="rtmedia-'.$type.'-list ' . esc_attr( $rtmedia_activity_ul_class ) . ' rtmedia-activity-media-length-' . esc_attr( $count ) . '">';
100
+ }
101
+
102
  $html .= $li_content;
103
  $html .= '</ul>';
104
  $html .= '</div>';
113
 
114
  }
115
 
116
+ function media( $media, $type = 'activity' ) {
117
  $html = false;
118
+
119
+ $video_class = 'wp-video-shortcode';
120
+
121
  if ( isset( $media->media_type ) ) {
122
  global $rtmedia;
123
  if ( 'photo' === $media->media_type ) {
133
  } else {
134
  $poster = '';
135
  }
136
+ $html = '<video ' . $poster . ' src="' . esc_url( wp_get_attachment_url( $media->media_id ) ) . '" width="' . esc_attr( $rtmedia->options['defaultSizes_video_activityPlayer_width'] ) . '" height="' . esc_attr( $rtmedia->options['defaultSizes_video_activityPlayer_height'] ) . '" type="video/mp4" class="'.$video_class.'" id="rt_media_video_' . esc_attr( $media->id ) . '" controls="controls" preload="none"></video>';
137
  } elseif ( 'music' === $media->media_type ) {
138
  $html = '<audio src="' . esc_url( wp_get_attachment_url( $media->media_id ) ) . '" width="' . esc_attr( $rtmedia->options['defaultSizes_music_activityPlayer_width'] ) . '" height="0" type="audio/mp3" class="wp-audio-shortcode" id="rt_media_audio_' . esc_attr( $media->id ) . '" controls="controls" preload="none"></audio>';
139
  }
app/main/controllers/activity/RTMediaBuddyPressActivity.php CHANGED
@@ -49,13 +49,16 @@ class RTMediaBuddyPressActivity {
49
  }
50
 
51
  function bp_activity_deleted_activities( $activity_ids_deleted ) {
52
- $rt_model = new RTMediaModel();
53
- $all_media = $rt_model->get( array( 'activity_id' => $activity_ids_deleted ) );
54
- if ( $all_media ) {
55
- $media = new RTMediaMedia();
56
- remove_action( 'bp_activity_deleted_activities', array( &$this, 'bp_activity_deleted_activities' ) );
57
- foreach ( $all_media as $single_media ) {
58
- $media->delete( $single_media->id, false, false );
 
 
 
59
  }
60
  }
61
  }
@@ -113,6 +116,16 @@ class RTMediaBuddyPressActivity {
113
  $media = $mediamodel->get( array( 'activity_id' => $param['activity_id'] ) );
114
  // if there is only single media in activity
115
  if ( 1 === count( $media ) && isset( $media[0]->media_id ) ) {
 
 
 
 
 
 
 
 
 
 
116
  $media_id = $media[0]->media_id;
117
  $comment = new RTMediaComment();
118
  $id = $comment->add( array(
@@ -131,7 +144,7 @@ class RTMediaBuddyPressActivity {
131
  $activity_id = filter_input( INPUT_POST, 'form_id', FILTER_SANITIZE_NUMBER_INT );
132
  $act = new BP_Activity_Activity( $activity_id );
133
 
134
- if ( 'rtmedia_update' === $act->type ) {
135
  $_POST['comment_id'] = $activity_id;
136
  }
137
  }
@@ -541,6 +554,7 @@ class RTMediaBuddyPressActivity {
541
  'type' => 'rtmedia_like_activity',
542
  'primary_link' => $primary_link,
543
  'item_id' => $media_id,
 
544
  );
545
 
546
  // set activity component
@@ -555,6 +569,13 @@ class RTMediaBuddyPressActivity {
555
  // add BP activity
556
  $activity_id = bp_activity_add( $activity_args );
557
 
 
 
 
 
 
 
 
558
  // Store activity id into user meta for reference
559
  //todo user_attribute
560
  update_user_meta( $user_id, 'rtm-bp-media-like-activity-' . $media_id, $activity_id );
@@ -620,14 +641,53 @@ class RTMediaBuddyPressActivity {
620
  }
621
  }
622
 
623
- $comment_content = $params['comment_content'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
624
  $wp_comment_id = $params['comment_id'];
625
 
626
  // prepare activity arguments
627
  $activity_args = array(
628
  'user_id' => $user_id,
629
  'action' => $action,
630
- 'content' => $comment_content,
631
  'type' => 'rtmedia_comment_activity',
632
  'primary_link' => $primary_link,
633
  'item_id' => $media_id,
@@ -646,9 +706,28 @@ class RTMediaBuddyPressActivity {
646
  // create BuddyPress activity
647
  $activity_id = bp_activity_add( $activity_args );
648
 
 
 
 
 
 
 
 
 
 
 
 
649
  // Store activity id into user meta for reference
650
  //todo user_attribute
651
  update_user_meta( $user_id, 'rtm-bp-media-comment-activity-' . $media_id . '-' . $wp_comment_id, $activity_id );
 
 
 
 
 
 
 
 
652
  }
653
  }
654
  }
49
  }
50
 
51
  function bp_activity_deleted_activities( $activity_ids_deleted ) {
52
+ //Allo delete activity othe media only of request from activity ajax
53
+ if ( ( is_admin() && '1' == DOING_AJAX ) || ! is_admin() ) {
54
+ $rt_model = new RTMediaModel();
55
+ $all_media = $rt_model->get( array( 'activity_id' => $activity_ids_deleted ) );
56
+ if ( $all_media ) {
57
+ $media = new RTMediaMedia();
58
+ remove_action( 'bp_activity_deleted_activities', array( &$this, 'bp_activity_deleted_activities' ) );
59
+ foreach ( $all_media as $single_media ) {
60
+ $media->delete( $single_media->id, false, false );
61
+ }
62
  }
63
  }
64
  }
116
  $media = $mediamodel->get( array( 'activity_id' => $param['activity_id'] ) );
117
  // if there is only single media in activity
118
  if ( 1 === count( $media ) && isset( $media[0]->media_id ) ) {
119
+
120
+ /* has media in comment */
121
+ $rtMedia_attached_files = filter_input( INPUT_POST, 'rtMedia_attached_files', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
122
+ /* if the media is not empty */
123
+ if ( is_array( $rtMedia_attached_files ) && ! empty( $rtMedia_attached_files[0] ) && class_exists( 'RTMediaActivity' ) ) {
124
+ /* create new html for comment content */
125
+ $obj_comment = new RTMediaActivity( $rtMedia_attached_files[0], 0, $param['content'] );
126
+ $param['content'] = $obj_comment->create_activity_html( 'comment-media' );
127
+ }
128
+
129
  $media_id = $media[0]->media_id;
130
  $comment = new RTMediaComment();
131
  $id = $comment->add( array(
144
  $activity_id = filter_input( INPUT_POST, 'form_id', FILTER_SANITIZE_NUMBER_INT );
145
  $act = new BP_Activity_Activity( $activity_id );
146
 
147
+ if ( 'rtmedia_update' === $act->type && isset( $_REQUEST['rtmedia_disable_media_in_commented_media'] ) && ! empty( $_REQUEST['rtmedia_disable_media_in_commented_media'] ) ) {
148
  $_POST['comment_id'] = $activity_id;
149
  }
150
  }
554
  'type' => 'rtmedia_like_activity',
555
  'primary_link' => $primary_link,
556
  'item_id' => $media_id,
557
+ 'secondary_item_id' => $media_id, // Used for when deleting media when it's enter in group not used when media is add in the main activity
558
  );
559
 
560
  // set activity component
569
  // add BP activity
570
  $activity_id = bp_activity_add( $activity_args );
571
 
572
+ // add privacy for like activity
573
+ if( class_exists( 'RTMediaActivityModel' ) && is_rtmedia_privacy_enable() && isset( $media_obj->activity_id ) ){
574
+ $rtmedia_activity_model = new RTMediaActivityModel();
575
+ $rtmedia_activity_model->set_privacy_for_rtmedia_activity( $media_obj->activity_id, $activity_id , $user_id );
576
+ }
577
+
578
+
579
  // Store activity id into user meta for reference
580
  //todo user_attribute
581
  update_user_meta( $user_id, 'rtm-bp-media-like-activity-' . $media_id, $activity_id );
641
  }
642
  }
643
 
644
+ $activity_content = $params['comment_content'];
645
+ $comment_media = false;
646
+ $comment_media_id = false;
647
+
648
+ /* if activity is add from comment media */
649
+ if( isset( $_REQUEST['comment_content'] ) || isset( $_REQUEST['action'] ) ){
650
+ if( isset( $_REQUEST['action'] ) && $_REQUEST['action'] == 'new_activity_comment' ){
651
+
652
+ remove_action( 'bp_activity_content_before_save', 'rtmedia_bp_activity_comment_content_callback', 1001, 1 );
653
+ /* comment content */
654
+ $comment_content = $_REQUEST['content'];
655
+ }elseif ( isset( $_REQUEST['comment_content'] ) ) {
656
+ /* comment content */
657
+ $comment_content = $_REQUEST['comment_content'];
658
+ }
659
+
660
+ /* is comment is empty then add content content space */
661
+ if( strstr($comment_content, 'nbsp') ){
662
+ $comment_content = "&nbsp;";
663
+ }
664
+
665
+
666
+ /* if comment has comment media then create new html for it */
667
+ if ( isset( $_REQUEST['rtMedia_attached_files'] ) ) {
668
+ $rtMedia_attached_files = filter_input( INPUT_POST, 'rtMedia_attached_files', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
669
+
670
+ /* check media should be in array format and is not empty to */
671
+ if( class_exists( 'RTMediaActivity' ) && is_array( $rtMedia_attached_files ) && ! empty( $rtMedia_attached_files ) ){
672
+ $comment_media = true;
673
+ $comment_media_id = $rtMedia_attached_files[0];
674
+ $obj_comment = new RTMediaActivity( $rtMedia_attached_files[0], 0, $comment_content );
675
+ $comment_content = $obj_comment->create_activity_html();
676
+ }
677
+ }
678
+
679
+ /* add the new content to the activity */
680
+ $activity_content = $comment_content;
681
+ }
682
+
683
+
684
  $wp_comment_id = $params['comment_id'];
685
 
686
  // prepare activity arguments
687
  $activity_args = array(
688
  'user_id' => $user_id,
689
  'action' => $action,
690
+ 'content' => $activity_content,
691
  'type' => 'rtmedia_comment_activity',
692
  'primary_link' => $primary_link,
693
  'item_id' => $media_id,
706
  // create BuddyPress activity
707
  $activity_id = bp_activity_add( $activity_args );
708
 
709
+ /* save the profile activity id in the media meta */
710
+ if( ! empty( $comment_media ) && ! empty( $comment_media_id ) && ! empty( $activity_id ) ){
711
+ add_rtmedia_meta( $comment_media_id, 'rtmedia_comment_media_profile_id', $activity_id );
712
+ }
713
+
714
+ // add privacy for like activity
715
+ if( class_exists( 'RTMediaActivityModel' ) && is_rtmedia_privacy_enable() && isset( $media_obj->activity_id ) ){
716
+ $rtmedia_activity_model = new RTMediaActivityModel();
717
+ $rtmedia_activity_model->set_privacy_for_rtmedia_activity( $media_obj->activity_id, $activity_id , $user_id );
718
+ }
719
+
720
  // Store activity id into user meta for reference
721
  //todo user_attribute
722
  update_user_meta( $user_id, 'rtm-bp-media-comment-activity-' . $media_id . '-' . $wp_comment_id, $activity_id );
723
+
724
+ if( function_exists( 'rtmedia_get_original_comment_media_content' ) ){
725
+ /* get the original content of media */
726
+ $original_content = rtmedia_get_original_comment_media_content();
727
+ /* save the original content in the meta fields */
728
+ bp_activity_update_meta( $activity_id, 'bp_activity_text', $original_content );
729
+ // bp_activity_update_meta( $activity_id, 'bp_old_activity_content', $original_content );
730
+ }
731
  }
732
  }
733
  }
app/main/controllers/media/RTMediaComment.php CHANGED
@@ -60,35 +60,51 @@ class RTMediaComment {
60
  }
61
 
62
  function add( $attr ) {
63
- global $allowedtags;
64
- do_action( 'rtmedia_before_add_comment', $attr );
65
- $defaults = array(
66
- 'user_id' => $this->get_current_id(),
67
- 'comment_author' => $this->get_current_author(),
68
- 'comment_date' => current_time( 'mysql' ),
69
- );
70
- $attr['comment_content'] = wp_kses( $attr['comment_content'], $allowedtags );
71
- $params = wp_parse_args( $attr, $defaults );
72
- $id = $this->rtmedia_comment_model->insert( $params );
73
- global $rtmedia_points_media_id;
74
- $rtmedia_points_media_id = rtmedia_id( $params['comment_post_ID'] );
75
- $params['comment_id'] = $id;
76
- do_action( 'rtmedia_after_add_comment', $params );
77
-
78
- return $id;
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  }
80
 
81
  function remove( $id ) {
82
 
83
  do_action( 'rtmedia_before_remove_comment', $id );
84
 
85
- $comment = '';
86
  if ( ! empty( $id ) ) {
87
  $comment = get_comment( $id );
88
  }
89
 
 
90
  if ( isset( $comment->comment_post_ID ) && isset( $comment->user_id ) ) {
 
91
  $model = new RTMediaModel();
 
92
  //get the current media from the comment_post_ID
93
  $media = $model->get( array( 'media_id' => $comment->comment_post_ID ) );
94
  // if user is comment creator, or media uploader or admin, allow to delete
@@ -99,6 +115,121 @@ class RTMediaComment {
99
  return $comment_deleted;
100
  }
101
  }
102
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
103
  }
104
  }
60
  }
61
 
62
  function add( $attr ) {
63
+ global $allowedtags;
64
+ do_action( 'rtmedia_before_add_comment', $attr );
65
+ $defaults = array(
66
+ 'user_id' => $this->get_current_id(),
67
+ 'comment_author' => $this->get_current_author(),
68
+ 'comment_date' => current_time( 'mysql' ),
69
+ );
70
+ $attr['comment_content'] = rtmedia_wp_kses_of_buddypress( $attr['comment_content'], $allowedtags );
71
+ $params = wp_parse_args( $attr, $defaults );
72
+ $id = $this->rtmedia_comment_model->insert( $params );
73
+ global $rtmedia_points_media_id;
74
+ $rtmedia_points_media_id = rtmedia_id( $params['comment_post_ID'] );
75
+ $params['comment_id'] = $id;
76
+
77
+ /* add comment id in the rtmedia meta feilds */
78
+ if ( isset( $_REQUEST['rtMedia_attached_files'] ) ) {
79
+
80
+ $rtMedia_attached_files = filter_input( INPUT_POST, 'rtMedia_attached_files', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
81
+
82
+ // check media should be in array format and is not empty to.
83
+ if ( is_array( $rtMedia_attached_files ) && ! empty( $rtMedia_attached_files ) ) {
84
+ add_rtmedia_meta( $rtMedia_attached_files[0], 'rtmedia_comment_media_comment_id', $id );
85
+ }
86
+ }
87
+
88
+
89
+ do_action( 'rtmedia_after_add_comment', $params );
90
+
91
+ return $id;
92
  }
93
 
94
  function remove( $id ) {
95
 
96
  do_action( 'rtmedia_before_remove_comment', $id );
97
 
98
+ $comment = '';
99
  if ( ! empty( $id ) ) {
100
  $comment = get_comment( $id );
101
  }
102
 
103
+
104
  if ( isset( $comment->comment_post_ID ) && isset( $comment->user_id ) ) {
105
+
106
  $model = new RTMediaModel();
107
+
108
  //get the current media from the comment_post_ID
109
  $media = $model->get( array( 'media_id' => $comment->comment_post_ID ) );
110
  // if user is comment creator, or media uploader or admin, allow to delete
115
  return $comment_deleted;
116
  }
117
  }
118
+ return false;
119
+ }
120
+
121
+
122
+ /**
123
+ * Helper function to check whether the shortcode should be rendered or not
124
+ *
125
+ * @return bool
126
+ */
127
+ static function display_allowed() {
128
+ global $rtmedia_query;
129
+ $flag = ( ! ( is_home() || is_post_type_archive() || is_author()))
130
+ && is_user_logged_in()
131
+ && (is_rtmedia_upload_music_enabled() || is_rtmedia_upload_photo_enabled() || is_rtmedia_upload_video_enabled())
132
+ //added condition to disable upload when media is disabled in profile/group but user visits media tab
133
+ && ( ( isset( $rtmedia_query->is_upload_shortcode ) && true === $rtmedia_query->is_upload_shortcode )
134
+ || ( is_rtmedia_bp_profile() && is_rtmedia_profile_media_enable() )
135
+ || (is_rtmedia_bp_group() && is_rtmedia_group_media_enable()) );
136
+ $flag = apply_filters( 'before_rtmedia_comment_uploader_display', $flag );
137
+ return $flag;
138
+ }
139
+
140
+
141
+ /**
142
+ * Render the uploader shortcode and attach the uploader panel
143
+ *
144
+ * @param mixed $attr
145
+ *
146
+ * @return string|void
147
+ */
148
+ static function pre_comment_render( $attr ) {
149
+ ob_start();
150
+ if ( rtmedia_is_uploader_view_allowed( true, 'comment_media' ) ) {
151
+
152
+ if ( isset( $attr['context'] ) && ! empty( $attr['context'] ) ) {
153
+ $attr['context'] = 'profile';
154
+ }
155
+
156
+ $attr = apply_filters( 'rtmedia_media_comment_attributes', $attr );
157
+
158
+ if ( self::display_allowed() ) {
159
+ if ( ! _device_can_upload() ) {
160
+ echo '<p>' . esc_html_e( 'The web browser on your device cannot be used to upload files.', 'buddypress-media' ) . '</p>';
161
+ return;
162
+ }
163
+ $template = 'uploader';
164
+ if ( isset( $attr['upload_parent_id_type'] ) && isset( $attr['upload_parent_id'] ) ) {
165
+ $template = 'comment-media';
166
+ }
167
+ $view = new RTMediaUploadView( $attr );
168
+ echo $view->render( $template );
169
+
170
+ }
171
+ } else {
172
+ echo "<div class='rtmedia-upload-not-allowed'>" . wp_kses( apply_filters( 'rtmedia_upload_not_allowed_message', esc_html__( 'You are not allowed to upload/attach media.','buddypress-media' ), 'uploader_shortcode' ), RTMediaUpload::$wp_kses_allowed_tags ) . '</div>';
173
+ }
174
+ $output = ob_get_contents();
175
+ ob_end_clean();
176
+ return $output;
177
+ }
178
+
179
+
180
+ /*
181
+ * update the Comment Media album when Parent Media Album is change
182
+ * @param int $media_id ( media id )
183
+ */
184
+ function update_comment_media_album( $post_id = false ) {
185
+ /* get album id */
186
+ $album_id = filter_input( INPUT_POST, 'album_id', FILTER_SANITIZE_NUMBER_INT );
187
+ /* RTMediaModel class exites and post_id is not NULL and album id is not NULL */
188
+ if ( class_exists( 'RTMediaModel' ) && ! empty( $post_id ) && isset( $album_id ) && ! empty( $album_id ) ) {
189
+ /* get the comments from the post id */
190
+ $comments = $this->rtmedia_comment_model->get( array( 'post_id' => $post_id ) );
191
+ /* check if comment exites or not */
192
+ if ( isset( $comments ) && is_array( $comments ) && ! empty( $comments ) ) {
193
+ $media_model = new RTMediaModel();
194
+ /* comment loop */
195
+ foreach ( $comments as $comment ) {
196
+ /* check for comment id */
197
+ if ( isset( $comment->comment_ID ) ) {
198
+ /* get the media id from the comment */
199
+ $comment_media_id = get_comment_meta( $comment->comment_ID, 'rtmedia_comment_media_id', true );
200
+ /* check if comment has media or not */
201
+ if ( isset( $comment_media_id ) && ! empty( $comment_media_id ) ) {
202
+ /* media id */
203
+ $where = array( 'id' => $comment_media_id );
204
+
205
+ /* album id */
206
+ $columns = array( 'album_id' => $album_id );
207
+
208
+ // update media privacy
209
+ $media_model->update( $columns, $where );
210
+ }
211
+ }
212
+ }
213
+ }
214
+ }
215
+ }
216
+
217
+
218
+ /*
219
+ * add media upload in add comment section
220
+ * @param int $id ( media id or activity id )
221
+ * @param string $type ( media or activity )
222
+ *
223
+ * @return HTML
224
+ */
225
+ static function add_uplaod_media_button( $id, $type, $context ) {
226
+ $attr = array(
227
+ 'comment' => true,
228
+ 'privacy' => 0,
229
+ 'upload_parent_id' => $id,
230
+ 'upload_parent_id_type' => $type,
231
+ 'upload_parent_id_context' => $context,
232
+ );
233
+ return RTMediaComment::pre_comment_render( $attr );
234
  }
235
  }
app/main/controllers/media/RTMediaLike.php CHANGED
@@ -34,6 +34,25 @@ class RTMediaLike extends RTMediaUserInteraction {
34
  if ( ! rtmedia_comments_enabled() ) {
35
  add_action( 'rtmedia_actions_without_lightbox', array( $this, 'like_button_without_lightbox_filter' ) );
36
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  }
38
 
39
  function like_button_filter() {
@@ -240,11 +259,17 @@ class RTMediaLike extends RTMediaUserInteraction {
240
  }
241
 
242
  function before_render() {
 
 
243
  $enable_like = true;
244
  $enable_like = apply_filters( 'rtmedia_check_enable_disable_like', $enable_like );
 
 
 
245
  if ( ! $enable_like ) {
246
  return false;
247
  }
 
248
  if ( $this->is_liked() ) {
249
  $this->label = $this->undo_label;
250
  }
34
  if ( ! rtmedia_comments_enabled() ) {
35
  add_action( 'rtmedia_actions_without_lightbox', array( $this, 'like_button_without_lightbox_filter' ) );
36
  }
37
+
38
+ add_filter( 'rtmedia_check_enable_disable_like', array( $this, 'rtmedia_check_enable_disable_like' ), 10, 1 );
39
+ }
40
+
41
+
42
+ /**
43
+ * check Likes for media is enabled or not
44
+ * @global type $rtmedia
45
+ * @param type $enable_like
46
+ * @return boolean True if Likes for media is enabled else returns false
47
+ */
48
+ function rtmedia_check_enable_disable_like( $enable_like ) {
49
+ global $rtmedia;
50
+ $options = $rtmedia->options;
51
+ if ( ( isset( $options['general_enableLikes'] ) && '1' == $options['general_enableLikes'] ) || ! isset( $options['general_enableLikes'] ) ) {
52
+ return true;
53
+ } else {
54
+ return false;
55
+ }
56
  }
57
 
58
  function like_button_filter() {
259
  }
260
 
261
  function before_render() {
262
+ /* is comment media */
263
+ // $comment_media = rtmedia_is_comment_media( rtmedia_id() );
264
  $enable_like = true;
265
  $enable_like = apply_filters( 'rtmedia_check_enable_disable_like', $enable_like );
266
+
267
+ /* if is comment media then return false */
268
+ // if ( ! $enable_like || ! empty( $comment_media ) ) {
269
  if ( ! $enable_like ) {
270
  return false;
271
  }
272
+
273
  if ( $this->is_liked() ) {
274
  $this->label = $this->undo_label;
275
  }
app/main/controllers/media/RTMediaMedia.php CHANGED
@@ -248,11 +248,15 @@ class RTMediaMedia {
248
  $media = $media_model->get( array( 'id' => $id ) );
249
 
250
  if ( ! empty( $media ) ) {
 
251
  $rtmedia_activity_model = new RTMediaActivityModel();
252
  $similar_media = $media_model->get( array( 'activity_id' => $media[0]->activity_id ) );
253
  $max_privacy = 0;
254
 
255
  foreach ( $similar_media as $s_media ) {
 
 
 
256
  if ( $s_media->privacy > $max_privacy ) {
257
  $max_privacy = $s_media->privacy;
258
  }
@@ -271,6 +275,9 @@ class RTMediaMedia {
271
  'privacy' => $max_privacy,
272
  ), array( 'activity_id' => $media[0]->activity_id ) );
273
  }
 
 
 
274
  }
275
 
276
  /* action to perform any task after updating a media */
@@ -334,6 +341,29 @@ class RTMediaMedia {
334
  $status = 0;
335
 
336
  if ( $media ) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
337
  /* delete meta */
338
  if ( $delete_activity ) {
339
  if ( $media[0]->activity_id && function_exists( 'bp_activity_delete_by_activity_id' ) ) {
@@ -360,7 +390,52 @@ class RTMediaMedia {
360
 
361
  // Deleting like and comment activity for media
362
  if ( function_exists( 'bp_activity_delete' ) ) {
363
- bp_activity_delete( array( 'item_id' => $media[0]->id ) );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
364
  }
365
  }
366
  }
@@ -476,7 +551,7 @@ class RTMediaMedia {
476
  $album_id = 0;
477
  }
478
 
479
- if ( ! in_array( $uploaded['context'], array( 'profile', 'group' ), true ) ) {
480
  $album_id = $uploaded['context_id'];
481
  }
482
 
248
  $media = $media_model->get( array( 'id' => $id ) );
249
 
250
  if ( ! empty( $media ) ) {
251
+ $media_ids_of_activity = array();
252
  $rtmedia_activity_model = new RTMediaActivityModel();
253
  $similar_media = $media_model->get( array( 'activity_id' => $media[0]->activity_id ) );
254
  $max_privacy = 0;
255
 
256
  foreach ( $similar_media as $s_media ) {
257
+ /* get all the media ids in the activity */
258
+ $media_ids_of_activity[] = $s_media->id;
259
+
260
  if ( $s_media->privacy > $max_privacy ) {
261
  $max_privacy = $s_media->privacy;
262
  }
275
  'privacy' => $max_privacy,
276
  ), array( 'activity_id' => $media[0]->activity_id ) );
277
  }
278
+
279
+ /* is the activate has any media then move the like and comment of that media to for the privacy */
280
+ $rtmedia_activity_model->profile_activity_update( $media_ids_of_activity, $max_privacy, $media[0]->activity_id );
281
  }
282
 
283
  /* action to perform any task after updating a media */
341
  $status = 0;
342
 
343
  if ( $media ) {
344
+
345
+ // delete the child media of the media where the media context type is ( post, comment, reply )
346
+ $contex_type = array( 'post', 'comment', 'reply' );
347
+ if ( isset( $media[0]->context ) && in_array( $media[0]->context, $contex_type ) ) {
348
+ // get the child media of the current media
349
+ $has_comment_media = get_rtmedia_meta( $media[0]->id, 'has_comment_media' );
350
+ if ( is_array( $has_comment_media ) ) {
351
+ foreach ( $has_comment_media as $value ) {
352
+ // first delete the child media
353
+ $delete = $this->delete( $value );
354
+ }
355
+ }
356
+ }
357
+
358
+ /* delete comment if media is in the comment */
359
+ if( class_exists( 'RTMediaTemplate' ) && isset( $media[0]->id ) && ! isset( $_POST['comment_id'] ) ){
360
+ $rtmedia_media_used = get_rtmedia_meta( $media[0]->id, 'rtmedia_media_used' );
361
+ if( isset( $rtmedia_media_used[ 'comment' ] ) && ! empty( $rtmedia_media_used[ 'comment' ] ) ){
362
+ $template = new RTMediaTemplate();
363
+ $template->rtmedia_delete_comment_and_activity( $rtmedia_media_used[ 'comment' ] );
364
+ }
365
+ }
366
+
367
  /* delete meta */
368
  if ( $delete_activity ) {
369
  if ( $media[0]->activity_id && function_exists( 'bp_activity_delete_by_activity_id' ) ) {
390
 
391
  // Deleting like and comment activity for media
392
  if ( function_exists( 'bp_activity_delete' ) ) {
393
+ /* if the media type is group or profile( activity ) */
394
+ if( isset( $media[0]->context ) && ( 'group' == $media[0]->context || 'group-reply' == $media[0]->context ) ){
395
+
396
+ /* only delete the activity that is being like in the group */
397
+ bp_activity_delete(
398
+ array(
399
+ 'component ' => 'groups' ,
400
+ 'type ' => 'rtmedia_like_activity' ,
401
+ 'item_id' => $media[0]->context_id ,
402
+ 'secondary_item_id' => $media[0]->id ,
403
+ )
404
+ );
405
+
406
+ /* rtMedia get the media comment details */
407
+ $comments = rtmedia_get_comments_details_for_media_id( $media[0]->media_id );
408
+
409
+ $delete_ca = false;
410
+ if( is_array( $comments ) && ! empty( $comments ) ){
411
+ foreach ($comments as $comment) {
412
+ $comment_id = $comment->comment_ID;
413
+ $user_id = $comment->user_id;
414
+ $meta_key = 'rtm-bp-media-comment-activity-' . $media[0]->id . '-' . $comment_id;
415
+
416
+ // Delete activity when user remove his comment.
417
+ //todo user_attribute
418
+ $activity_id = get_user_meta( $user_id, $meta_key, true );
419
+
420
+ /* only delete the activity that is being like in the group */
421
+ $delete_ca = bp_activity_delete(
422
+ array(
423
+ 'component ' => 'groups' ,
424
+ 'type ' => 'rtmedia_comment_activity' ,
425
+ 'id' => $activity_id
426
+ )
427
+ );
428
+
429
+ if( $delete_ca ){
430
+ delete_user_meta( $user_id, $meta_key );
431
+ }
432
+ }
433
+ }
434
+
435
+ }else{
436
+ /* any other context type */
437
+ bp_activity_delete( array( 'item_id' => $media[0]->id ) );
438
+ }
439
  }
440
  }
441
  }
551
  $album_id = 0;
552
  }
553
 
554
+ if ( ! in_array( $uploaded['context'], array( 'profile', 'group', 'comment-media' ), true ) ) {
555
  $album_id = $uploaded['context_id'];
556
  }
557
 
app/main/controllers/privacy/RTMediaPrivacy.php CHANGED
@@ -52,11 +52,13 @@ class RTMediaPrivacy {
52
  * Show privacy dropdown inside activity loop along with activity meta buttons.
53
  */
54
  function update_activity_privacy_option() {
 
 
55
  if ( function_exists( 'bp_activity_user_can_delete' ) && bp_activity_user_can_delete()
56
  && ( ! bp_is_groups_component() ) && is_rtmedia_privacy_user_overide()
57
  && apply_filters( 'rtm_load_bp_activity_privacy_update_ui', true )
 
58
  ) {
59
- global $activities_template;
60
 
61
  $selected = 0;
62
  if ( isset( $activities_template->activity->privacy ) ) {
@@ -81,6 +83,7 @@ class RTMediaPrivacy {
81
  $activity_id = filter_input( INPUT_POST, 'activity_id', FILTER_SANITIZE_NUMBER_INT );
82
 
83
  if ( wp_verify_nonce( $nonce, 'rtmedia_activity_privacy_nonce' ) ) {
 
84
  $rtm_activity_model = new RTMediaActivityModel();
85
  $is_ac_privacy_exist = $rtm_activity_model->check( $activity_id );
86
 
@@ -104,6 +107,9 @@ class RTMediaPrivacy {
104
  $activity_media = $media_model->get( array( 'activity_id' => $activity_id ) );
105
  if ( ! empty( $activity_media ) && is_array( $activity_media ) ) {
106
  foreach ( $activity_media as $single_media ) {
 
 
 
107
  $where = array( 'id' => $single_media->id );
108
  $columns = array( 'privacy' => $privacy );
109
 
@@ -112,6 +118,9 @@ class RTMediaPrivacy {
112
  }
113
  }
114
 
 
 
 
115
  if ( false === $status ) {
116
  $status = 'false';
117
  } else {
52
  * Show privacy dropdown inside activity loop along with activity meta buttons.
53
  */
54
  function update_activity_privacy_option() {
55
+ global $activities_template;
56
+ $rtmedia_activity_types = array( 'rtmedia_comment_activity', 'rtmedia_like_activity', 'activity_comment' );
57
  if ( function_exists( 'bp_activity_user_can_delete' ) && bp_activity_user_can_delete()
58
  && ( ! bp_is_groups_component() ) && is_rtmedia_privacy_user_overide()
59
  && apply_filters( 'rtm_load_bp_activity_privacy_update_ui', true )
60
+ && isset( $activities_template->activity ) && isset( $activities_template->activity->type ) &&! in_array( $activities_template->activity->type , $rtmedia_activity_types )
61
  ) {
 
62
 
63
  $selected = 0;
64
  if ( isset( $activities_template->activity->privacy ) ) {
83
  $activity_id = filter_input( INPUT_POST, 'activity_id', FILTER_SANITIZE_NUMBER_INT );
84
 
85
  if ( wp_verify_nonce( $nonce, 'rtmedia_activity_privacy_nonce' ) ) {
86
+ $media_ids_of_activity = array();
87
  $rtm_activity_model = new RTMediaActivityModel();
88
  $is_ac_privacy_exist = $rtm_activity_model->check( $activity_id );
89
 
107
  $activity_media = $media_model->get( array( 'activity_id' => $activity_id ) );
108
  if ( ! empty( $activity_media ) && is_array( $activity_media ) ) {
109
  foreach ( $activity_media as $single_media ) {
110
+ /* get all the media ids in the activity */
111
+ $media_ids_of_activity[] = $single_media->id;
112
+
113
  $where = array( 'id' => $single_media->id );
114
  $columns = array( 'privacy' => $privacy );
115
 
118
  }
119
  }
120
 
121
+ /* is the activate has any media then move the like and comment of that media to for the privacy */
122
+ $rtm_activity_model->profile_activity_update( $media_ids_of_activity, $privacy, $activity_id );
123
+
124
  if ( false === $status ) {
125
  $status = 'false';
126
  } else {
app/main/controllers/shortcodes/RTMediaGalleryShortcode.php CHANGED
@@ -25,6 +25,7 @@ class RTMediaGalleryShortcode {
25
  add_action( 'wp_ajax_nopriv_rtmedia_get_template', array( &$this, 'ajax_rtmedia_get_template' ) );
26
  }
27
 
 
28
  function ajax_rtmedia_get_template() {
29
  $template = '';
30
  if ( isset( $_REQUEST['template'] ) ) {
@@ -47,15 +48,21 @@ class RTMediaGalleryShortcode {
47
  ), RTMEDIA_VERSION, true );
48
 
49
  if ( is_rtmedia_album_gallery() ) {
50
- $template_url = esc_url( add_query_arg( array(
 
51
  'action' => 'rtmedia_get_template',
52
  'template' => 'album-gallery-item',
53
- ), admin_url( 'admin-ajax.php' ) ), null, '' );
 
 
54
  } else {
55
- $template_url = esc_url( add_query_arg( array(
 
56
  'action' => 'rtmedia_get_template',
57
  'template' => apply_filters( 'rtmedia_backbone_template_filter', 'media-gallery-item' ),
58
- ), admin_url( 'admin-ajax.php' ) ), null, '' );
 
 
59
  }
60
  wp_localize_script( 'rtmedia-backbone', 'template_url', $template_url );
61
  $request_uri = rtm_get_server_var( 'REQUEST_URI', 'FILTER_SANITIZE_URL' );
@@ -107,16 +114,7 @@ class RTMediaGalleryShortcode {
107
 
108
  $params = apply_filters( 'rtmedia_modify_upload_params', $params );
109
 
110
- global $rtmedia;
111
- $rtmedia_extns = array();
112
-
113
- foreach ( $rtmedia->allowed_types as $allowed_types_key => $allowed_types_value ) {
114
- $rtmedia_extns[ $allowed_types_key ] = $allowed_types_value['extn'];
115
- }
116
-
117
- wp_localize_script( 'rtmedia-backbone', 'rtmedia_exteansions', $rtmedia_extns );
118
  wp_localize_script( 'rtmedia-backbone', 'rtMedia_plupload_config', $params );
119
- wp_localize_script( 'rtmedia-backbone', 'rMedia_loading_file', admin_url( '/images/loading.gif' ) );
120
  }
121
 
122
  /**
@@ -151,7 +149,7 @@ class RTMediaGalleryShortcode {
151
  }
152
 
153
  $attr = array( 'name' => 'gallery', 'attr' => $attr );
154
- global $post;
155
  if ( isset( $attr ) && isset( $attr['attr'] ) ) {
156
  if ( ! is_array( $attr['attr'] ) ) {
157
  $attr['attr'] = array();
@@ -188,37 +186,83 @@ class RTMediaGalleryShortcode {
188
  if ( ! isset( $attr['attr']['context'] ) && isset( $post->post_type ) ) {
189
  $attr['attr']['context'] = $post->post_type;
190
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
  }
 
192
 
193
  if ( $authorized_member ) { // if current user has access to view the gallery (when context is 'group')
194
  global $rtmedia_query;
195
  if ( ! $rtmedia_query ) {
196
  $rtmedia_query = new RTMediaQuery( $attr['attr'] );
197
  }
 
 
 
198
  $rtmedia_query->is_gallery_shortcode = true;// to check if gallery shortcode is executed to display the gallery.
199
 
200
  $template = new RTMediaTemplate();
201
  $gallery_template = false;
202
- if ( isset( $attr['attr']['global'] ) && true === $attr['attr']['global'] ) {
203
  add_filter( 'rtmedia-model-where-query', array(
204
  'RTMediaGalleryShortcode',
205
  'rtmedia_query_where_filter',
206
  ), 10, 3 );
207
  }
 
 
 
 
 
 
 
 
208
  $template->set_template( $gallery_template, $attr );
209
- if ( isset( $attr['attr']['global'] ) && true === $attr['attr']['global'] ) {
 
 
 
 
 
210
  remove_filter( 'rtmedia-model-where-query', array(
211
  'RTMediaGalleryShortcode',
212
  'rtmedia_query_where_filter',
213
  ), 10, 3 );
214
- }
 
215
  } else { //if user cannot view the media gallery (when context is 'group'), show message
216
  esc_html_e( 'You do not have sufficient privileges to view this gallery', 'buddypress-media' );
217
  return false;
218
- }
219
-
220
  return ob_get_clean();
 
 
 
 
 
 
 
221
  }
 
222
  }
223
 
224
  // for gallery shortcode having attribute global as true, include all media except ones having context as "group"
25
  add_action( 'wp_ajax_nopriv_rtmedia_get_template', array( &$this, 'ajax_rtmedia_get_template' ) );
26
  }
27
 
28
+ // get template for json response
29
  function ajax_rtmedia_get_template() {
30
  $template = '';
31
  if ( isset( $_REQUEST['template'] ) ) {
48
  ), RTMEDIA_VERSION, true );
49
 
50
  if ( is_rtmedia_album_gallery() ) {
51
+
52
+ $album_template_args = apply_filters( 'album_template_args', array(
53
  'action' => 'rtmedia_get_template',
54
  'template' => 'album-gallery-item',
55
+ ) );
56
+
57
+ $template_url = esc_url( add_query_arg( $album_template_args, admin_url( 'admin-ajax.php' ) ), null, '' );
58
  } else {
59
+
60
+ $media_template_args = apply_filters( 'media_template_args', array(
61
  'action' => 'rtmedia_get_template',
62
  'template' => apply_filters( 'rtmedia_backbone_template_filter', 'media-gallery-item' ),
63
+ ) );
64
+
65
+ $template_url = esc_url( add_query_arg( $media_template_args, admin_url( 'admin-ajax.php' ) ), null, '' );
66
  }
67
  wp_localize_script( 'rtmedia-backbone', 'template_url', $template_url );
68
  $request_uri = rtm_get_server_var( 'REQUEST_URI', 'FILTER_SANITIZE_URL' );
114
 
115
  $params = apply_filters( 'rtmedia_modify_upload_params', $params );
116
 
 
 
 
 
 
 
 
 
117
  wp_localize_script( 'rtmedia-backbone', 'rtMedia_plupload_config', $params );
 
118
  }
119
 
120
  /**
149
  }
150
 
151
  $attr = array( 'name' => 'gallery', 'attr' => $attr );
152
+ global $post, $rtmedia_shortcode_attr;
153
  if ( isset( $attr ) && isset( $attr['attr'] ) ) {
154
  if ( ! is_array( $attr['attr'] ) ) {
155
  $attr['attr'] = array();
186
  if ( ! isset( $attr['attr']['context'] ) && isset( $post->post_type ) ) {
187
  $attr['attr']['context'] = $post->post_type;
188
  }
189
+ }// End if().
190
+
191
+ $rtmedia_shortcode_attr = $attr['attr'];
192
+
193
+ // Set template according to media type
194
+ if ( is_rtmedia_album_gallery() || ( isset( $attr['attr']['media_type'] ) && 'album' === $attr['attr']['media_type'] ) ) {
195
+
196
+ $album_template_args = apply_filters( 'album_template_args', array(
197
+ 'action' => 'rtmedia_get_template',
198
+ 'template' => 'album-gallery-item',
199
+ ) );
200
+
201
+ $template_url = esc_url( add_query_arg( $album_template_args, admin_url( 'admin-ajax.php' ) ), null, '' );
202
+ } else {
203
+
204
+ $media_template_args = apply_filters( 'media_template_args', array(
205
+ 'action' => 'rtmedia_get_template',
206
+ 'template' => apply_filters( 'rtmedia_backbone_template_filter', 'media-gallery-item' ),
207
+ ) );
208
+
209
+ $template_url = esc_url( add_query_arg( $media_template_args, admin_url( 'admin-ajax.php' ) ), null, '' );
210
  }
211
+ wp_localize_script( 'rtmedia-backbone', 'template_url', $template_url );
212
 
213
  if ( $authorized_member ) { // if current user has access to view the gallery (when context is 'group')
214
  global $rtmedia_query;
215
  if ( ! $rtmedia_query ) {
216
  $rtmedia_query = new RTMediaQuery( $attr['attr'] );
217
  }
218
+ do_action( 'rtmedia_shortcode_action', $attr['attr'] );// do extra stuff with attributes
219
+ $page_number = ( get_query_var( 'pg' ) ) ? get_query_var( 'pg' ) : 1; // get page number
220
+ $rtmedia_query->action_query->page = intval( $page_number );
221
  $rtmedia_query->is_gallery_shortcode = true;// to check if gallery shortcode is executed to display the gallery.
222
 
223
  $template = new RTMediaTemplate();
224
  $gallery_template = false;
225
+ if ( isset( $attr['attr']['global'] ) && true === (bool) $attr['attr']['global'] ) {
226
  add_filter( 'rtmedia-model-where-query', array(
227
  'RTMediaGalleryShortcode',
228
  'rtmedia_query_where_filter',
229
  ), 10, 3 );
230
  }
231
+
232
+ $attr['attr']['hide_comment_media'] = false;
233
+ $remove_comment_media = apply_filters( 'rtmedia_query_where_filter_remove_comment_media', true, 'galleryshortcode' );
234
+ if ( isset( $remove_comment_media ) && ! empty( $remove_comment_media ) ) {
235
+ add_filter( 'rtmedia-model-where-query', array( 'RTMediaGalleryShortcode', 'rtmedia_query_where_filter_remove_comment_media' ), 11, 3 );
236
+ $attr['attr']['hide_comment_media'] = true;
237
+ }
238
+
239
  $template->set_template( $gallery_template, $attr );
240
+
241
+ if ( isset( $remove_comment_media ) && ! empty( $remove_comment_media ) ) {
242
+ remove_filter( 'rtmedia-model-where-query', array( 'RTMediaGalleryShortcode', 'rtmedia_query_where_filter_remove_comment_media' ), 11 );
243
+ }
244
+
245
+ if ( isset( $attr['attr']['global'] ) && true === (bool) $attr['attr']['global'] ) {
246
  remove_filter( 'rtmedia-model-where-query', array(
247
  'RTMediaGalleryShortcode',
248
  'rtmedia_query_where_filter',
249
  ), 10, 3 );
250
+ }// End if().
251
+
252
  } else { //if user cannot view the media gallery (when context is 'group'), show message
253
  esc_html_e( 'You do not have sufficient privileges to view this gallery', 'buddypress-media' );
254
  return false;
255
+ }// End if().
 
256
  return ob_get_clean();
257
+ }// End if().
258
+ }
259
+
260
+ // for gallery shortcode remove all comment media reply
261
+ static function rtmedia_query_where_filter_remove_comment_media( $where, $table_name, $join ) {
262
+ if( function_exists( 'rtmedia_query_where_filter_remove_comment_media' ) ){
263
+ $where = rtmedia_query_where_filter_remove_comment_media( $where, $table_name, $join );
264
  }
265
+ return $where;
266
  }
267
 
268
  // for gallery shortcode having attribute global as true, include all media except ones having context as "group"
app/main/controllers/template/RTMediaNav.php CHANGED
@@ -6,7 +6,16 @@ class RTMediaNav {
6
  if ( false === $action ) {
7
  return;
8
  }
9
- add_action( 'admin_bar_menu', array( $this, 'admin_nav' ), 99 );
 
 
 
 
 
 
 
 
 
10
 
11
  if ( class_exists( 'BuddyPress' ) ) {
12
  add_action( 'bp_init', array( $this, 'custom_media_nav_tab' ), 10, 1 );
6
  if ( false === $action ) {
7
  return;
8
  }
9
+
10
+ /**
11
+ * Allow users/plugins to reorder/change the position of the 'Media' menu
12
+ * in admin action bar
13
+ *
14
+ * @param int 99
15
+ */
16
+ $order = apply_filters( 'rtmedia_media_admin_bar_menu', 99 );
17
+
18
+ add_action( 'admin_bar_menu', array( $this, 'admin_nav' ), $order );
19
 
20
  if ( class_exists( 'BuddyPress' ) ) {
21
  add_action( 'bp_init', array( $this, 'custom_media_nav_tab' ), 10, 1 );
app/main/controllers/template/RTMediaTemplate.php CHANGED
@@ -102,7 +102,11 @@ class RTMediaTemplate {
102
  $this->add_hidden_fields_in_gallery();
103
 
104
  $gallery_template = apply_filters( 'rtmedia-before-template', $template, $shortcode_attr );
105
- include $this->locate_template( $gallery_template );
 
 
 
 
106
 
107
  echo '</div>';
108
  } else {
@@ -149,7 +153,11 @@ class RTMediaTemplate {
149
  $this->add_hidden_fields_in_gallery();
150
 
151
  $gallery_template = apply_filters( 'rtmedia-before-template', $template, $shortcode_attr );
152
- include $this->locate_template( $gallery_template );
 
 
 
 
153
 
154
  echo '</div>';
155
 
@@ -169,7 +177,9 @@ class RTMediaTemplate {
169
  function add_hidden_fields_in_gallery() {
170
  global $rtmedia_query;
171
 
 
172
  $return_str = "<input name='rtmedia_shortcode' value='true' type='hidden' />";
 
173
 
174
  if ( $rtmedia_query->original_query && is_array( $rtmedia_query->original_query ) ) {
175
  foreach ( $rtmedia_query->original_query as $key => $val ) {
@@ -211,6 +221,7 @@ class RTMediaTemplate {
211
  if ( $rtmedia_query->media ) {
212
  foreach ( $rtmedia_query->media as $key => $media ) {
213
  $media_array[ $key ] = $media;
 
214
  $media_array[ $key ]->guid = rtmedia_image( 'rt_media_thumbnail', $media->id, false );
215
  $media_array[ $key ]->rt_permalink = get_rtmedia_permalink( $media->id );
216
  $media_array[ $key ]->duration = rtmedia_duration( $media->id );
@@ -269,6 +280,13 @@ class RTMediaTemplate {
269
  //for medias except album and playlist, if album_is is found, then update album_id for the media also
270
  if ( ! empty( $_album_id ) ) {
271
  $data_array[] = 'album_id';
 
 
 
 
 
 
 
272
  }
273
 
274
  $data = rtmedia_sanitize_object( $_POST, $data_array );
@@ -630,21 +648,61 @@ class RTMediaTemplate {
630
  $comment_content = isset( $_REQUEST['comment_content'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['comment_content'] ) ) : '';
631
 
632
  if ( wp_verify_nonce( $nonce, 'rtmedia_comment_nonce' ) ) {
633
- if ( empty( $comment_content ) ) {
634
- return false;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
635
  }
636
 
637
  $comment = new RTMediaComment();
 
638
  $attr = $_POST;
 
639
  $media_model = new RTMediaModel();
640
  $result = $media_model->get( array( 'id' => $rtmedia_query->action_query->id ) );
641
 
 
 
642
  if ( ! isset( $attr['comment_post_ID'] ) ) {
643
  $attr['comment_post_ID'] = $result[0]->media_id;
644
  }
645
 
646
  $id = $comment->add( $attr );
647
 
 
 
 
 
 
648
  if ( ! is_null( $result[0]->activity_id ) ) {
649
  global $rtmedia_buddypress_activity;
650
 
@@ -654,8 +712,17 @@ class RTMediaTemplate {
654
  ), 10, 2 );
655
 
656
  if ( function_exists( 'bp_activity_new_comment' ) ) {
 
 
 
 
 
 
 
 
 
657
  $comment_activity_id = bp_activity_new_comment( array(
658
- 'content' => $comment_content,
659
  'activity_id' => $result[0]->activity_id,
660
  ) );
661
 
@@ -664,11 +731,23 @@ class RTMediaTemplate {
664
  }
665
 
666
  if ( ! empty( $comment_activity_id ) ) {
667
- $rtmedia_activity_comment = rtmedia_activity_comment( $comment_activity_id );
668
- if ( $rtmedia_activity_comment['content'] ) {
669
- update_comment_meta( $id, 'activity_comment_content', $rtmedia_activity_comment['content'] );
670
- }
671
  update_comment_meta( $id, 'activity_id', $comment_activity_id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
672
  }
673
  $_rt_ajax = filter_input( INPUT_POST, 'rtajax', FILTER_SANITIZE_STRING );
674
 
@@ -702,27 +781,33 @@ class RTMediaTemplate {
702
  return false;
703
  }
704
 
705
- $comment = new RTMediaComment();
706
- $id = $_comment_id;
707
- $activity_id = get_comment_meta( $id, 'activity_id', true );
708
-
709
- if ( ! empty( $activity_id ) ) {
710
- if ( function_exists( 'bp_activity_delete_comment' ) ) { //if buddypress is active
711
- $activity_deleted = bp_activity_delete_comment( $activity_id, $id );
712
- $delete = bp_activity_delete( array(
713
- 'id' => $activity_id,
714
- 'type' => 'activity_comment',
715
- ) );
716
- }
717
- }
718
-
719
- $comment_deleted = $comment->remove( $id );
720
 
721
- echo $comment_deleted; // @codingStandardsIgnoreLine
722
  exit;
723
  }
724
  }
725
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
726
  /**
727
  * Helper method to fetch allowed media types from each section
728
  *
102
  $this->add_hidden_fields_in_gallery();
103
 
104
  $gallery_template = apply_filters( 'rtmedia-before-template', $template, $shortcode_attr );
105
+
106
+ // check if file exists
107
+ if ( file_exists( $this->locate_template( $gallery_template ) ) ) {
108
+ include $this->locate_template( $gallery_template );
109
+ }
110
 
111
  echo '</div>';
112
  } else {
153
  $this->add_hidden_fields_in_gallery();
154
 
155
  $gallery_template = apply_filters( 'rtmedia-before-template', $template, $shortcode_attr );
156
+
157
+ // check if file exists
158
+ if ( file_exists( $this->locate_template( $gallery_template ) ) ) {
159
+ include $this->locate_template( $gallery_template );
160
+ }
161
 
162
  echo '</div>';
163
 
177
  function add_hidden_fields_in_gallery() {
178
  global $rtmedia_query;
179
 
180
+ $is_on_home = ( is_front_page() ) ? true : false;
181
  $return_str = "<input name='rtmedia_shortcode' value='true' type='hidden' />";
182
+ $return_str .= "<input name='is_on_home' value='$is_on_home' type='hidden' />";
183
 
184
  if ( $rtmedia_query->original_query && is_array( $rtmedia_query->original_query ) ) {
185
  foreach ( $rtmedia_query->original_query as $key => $val ) {
221
  if ( $rtmedia_query->media ) {
222
  foreach ( $rtmedia_query->media as $key => $media ) {
223
  $media_array[ $key ] = $media;
224
+ $media_array[ $key ]->media_count = rtm_get_album_media_count( $media->id );
225
  $media_array[ $key ]->guid = rtmedia_image( 'rt_media_thumbnail', $media->id, false );
226
  $media_array[ $key ]->rt_permalink = get_rtmedia_permalink( $media->id );
227
  $media_array[ $key ]->duration = rtmedia_duration( $media->id );
280
  //for medias except album and playlist, if album_is is found, then update album_id for the media also
281
  if ( ! empty( $_album_id ) ) {
282
  $data_array[] = 'album_id';
283
+
284
+ /* check it has an media id */
285
+ if( isset( $rtmedia_query->media[0]->media_id ) && ! empty( $rtmedia_query->media[0]->media_id ) ){
286
+ $comment = new RTMediaComment();
287
+ /* update the comment media album */
288
+ $comment->update_comment_media_album( $rtmedia_query->media[0]->media_id );
289
+ }
290
  }
291
 
292
  $data = rtmedia_sanitize_object( $_POST, $data_array );
648
  $comment_content = isset( $_REQUEST['comment_content'] ) ? sanitize_text_field( wp_unslash( $_REQUEST['comment_content'] ) ) : '';
649
 
650
  if ( wp_verify_nonce( $nonce, 'rtmedia_comment_nonce' ) ) {
651
+ $comment_activity_id = false;
652
+
653
+ /* if comment has media then make it true */
654
+ $comment_with_media = false;
655
+
656
+ /* comment media id array */
657
+ $rtMedia_attached_files = filter_input( INPUT_POST, 'rtMedia_attached_files', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
658
+
659
+ if ( empty( $comment_content ) && is_array( $rtMedia_attached_files ) && empty( $rtMedia_attached_files ) ) {
660
+ return false;
661
+ }
662
+
663
+ /* is comment is empty then add content content space */
664
+ if( strstr($comment_content, 'nbsp') ){
665
+ $comment_content = "&nbsp;";
666
+ }
667
+
668
+ /* save the old content for activity */
669
+ $comment_content_old = $comment_content;
670
+
671
+ /* for mention of username in the comment content */
672
+ if( function_exists( 'bp_activity_at_name_filter' ) ){
673
+ $comment_content = bp_activity_at_name_filter( $comment_content );
674
+ }
675
+
676
+
677
+ if( ! empty( $rtMedia_attached_files ) ){
678
+ /*has media*/
679
+ $comment_with_media = true;
680
+
681
+ /* create new html for comment content */
682
+ $obj_comment = new RTMediaActivity( $rtMedia_attached_files[0], 0, $comment_content );
683
+ $comment_content = $obj_comment->create_activity_html( 'comment-media' );
684
  }
685
 
686
  $comment = new RTMediaComment();
687
+
688
  $attr = $_POST;
689
+
690
  $media_model = new RTMediaModel();
691
  $result = $media_model->get( array( 'id' => $rtmedia_query->action_query->id ) );
692
 
693
+ $attr[ 'comment_content' ] = $comment_content;
694
+
695
  if ( ! isset( $attr['comment_post_ID'] ) ) {
696
  $attr['comment_post_ID'] = $result[0]->media_id;
697
  }
698
 
699
  $id = $comment->add( $attr );
700
 
701
+ if( $comment_with_media && $id ){
702
+ update_comment_meta( $id, 'rtmedia_comment_media_id', $rtMedia_attached_files[0] );
703
+ add_rtmedia_meta( $rtMedia_attached_files[0], 'rtmedia_media_used', array( 'comment' => $id ) );
704
+ }
705
+
706
  if ( ! is_null( $result[0]->activity_id ) ) {
707
  global $rtmedia_buddypress_activity;
708
 
712
  ), 10, 2 );
713
 
714
  if ( function_exists( 'bp_activity_new_comment' ) ) {
715
+ /* comment content add to new */
716
+ $activity_content = $comment_content_old;
717
+
718
+ /* if activity has media in it create an html for it */
719
+ if( class_exists( 'RTMediaActivity' ) && $comment_with_media ){
720
+ $obj_comment = new RTMediaActivity( $rtMedia_attached_files[0], 0, $comment_content_old );
721
+ $activity_content = $obj_comment->create_activity_html();
722
+ }
723
+
724
  $comment_activity_id = bp_activity_new_comment( array(
725
+ 'content' => $activity_content,
726
  'activity_id' => $result[0]->activity_id,
727
  ) );
728
 
731
  }
732
 
733
  if ( ! empty( $comment_activity_id ) ) {
734
+
735
+ /* add activity id in comment meta fields */
 
 
736
  update_comment_meta( $id, 'activity_id', $comment_activity_id );
737
+
738
+ /* change comment media activity id to current activity id*/
739
+ if( $comment_with_media && is_array( $rtMedia_attached_files ) && ! empty( $rtMedia_attached_files[0] ) && class_exists( 'RTMediaModel' ) ){
740
+ $rtmedia_model = new RTMediaModel();
741
+ $rtmedia_model->update(
742
+ array(
743
+ 'activity_id' => $comment_activity_id
744
+ ),
745
+ array(
746
+ 'id' => $rtMedia_attached_files[0]
747
+ )
748
+ );
749
+ }
750
+
751
  }
752
  $_rt_ajax = filter_input( INPUT_POST, 'rtajax', FILTER_SANITIZE_STRING );
753
 
781
  return false;
782
  }
783
 
784
+ echo $this->rtmedia_delete_comment_and_activity( $_comment_id );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
785
 
 
786
  exit;
787
  }
788
  }
789
 
790
+
791
+ function rtmedia_delete_comment_and_activity( $_comment_id ){
792
+ $comment = new RTMediaComment();
793
+ $id = $_comment_id;
794
+ $activity_id = get_comment_meta( $id, 'activity_id', true );
795
+
796
+ if ( ! empty( $activity_id ) ) {
797
+ if ( function_exists( 'bp_activity_delete_comment' ) ) { //if buddypress is active
798
+ $activity_deleted = bp_activity_delete_comment( $activity_id, $id );
799
+ $delete = bp_activity_delete( array(
800
+ 'id' => $activity_id,
801
+ 'type' => 'activity_comment',
802
+ ) );
803
+ }
804
+ }
805
+
806
+ $comment_deleted = $comment->remove( $id );
807
+
808
+ return $comment_deleted; // @codingStandardsIgnoreLine
809
+ }
810
+
811
  /**
812
  * Helper method to fetch allowed media types from each section
813
  *
app/main/controllers/template/rtmedia-actions.php CHANGED
@@ -5,32 +5,36 @@
5
  */
6
  function rtmedia_author_actions() {
7
 
8
- $options_start = $options_end = $option_buttons = $output = '';
9
- $options = array();
10
- $options = apply_filters( 'rtmedia_author_media_options', $options );
11
-
12
- if ( ! empty( $options ) ) {
13
- $options_start .= '<div class="click-nav rtm-media-options-list" id="rtm-media-options-list">
14
- <div class="no-js">
15
- <button class="clicker rtmedia-media-options rtmedia-action-buttons button">' . esc_html__( 'Options', 'buddypress-media' ) . '</button>
16
- <ul class="rtm-options">';
17
-
18
- foreach ( $options as $action ) {
19
- if ( ! empty( $action ) ) {
20
- $option_buttons .= '<li>' . $action . '</li>';
 
 
 
21
  }
22
- }
23
 
24
- $options_end = '</ul></div></div>';
25
 
26
- if ( ! empty( $option_buttons ) ) {
27
- $output = $options_start . $option_buttons . $options_end;
28
- }
29
 
30
- if ( ! empty( $output ) ) {
31
- echo $output; // @codingStandardsIgnoreLine
 
32
  }
33
  }
 
34
  }
35
 
36
  add_action( 'after_rtmedia_action_buttons', 'rtmedia_author_actions' );
@@ -103,8 +107,10 @@ add_action( 'rtmedia_add_edit_tab_content', 'rtmedia_image_editor_content', 12,
103
  * @param string $media_type
104
  */
105
  function rtmedia_add_album_selection_field( $media_type ) {
 
 
106
 
107
- if ( is_rtmedia_album_enable() && isset( $media_type ) && 'album' != $media_type && apply_filters( 'rtmedia_edit_media_album_select', true ) ) {
108
  global $rtmedia_query;
109
 
110
  $curr_album_id = '';
@@ -143,9 +149,9 @@ function rtmedia_gallery_options() {
143
 
144
  if ( ! empty( $options ) ) {
145
  $options_start .= '<div class="click-nav rtm-media-options-list" id="rtm-media-options-list">
146
- <div class="no-js">
147
- <div class="clicker rtmedia-action-buttons"><i class="dashicons dashicons-admin-generic rtmicon"></i>' . apply_filters( 'rtm_gallery_option_label', __( 'Options', 'buddypress-media' ) ) . '</div>
148
- <ul class="rtm-options">';
149
 
150
  foreach ( $options as $action ) {
151
  if ( ! empty( $action ) ) {
@@ -681,7 +687,8 @@ function rtm_album_media_count() {
681
 
682
  if ( isset( $rtmedia_album_count_status ) && $rtmedia_album_count_status['status'] ) {
683
  ?>
684
- <div class="rtmedia-album-media-count" title="<?php echo rtm_get_album_media_count( rtmedia_id() ) . RTMEDIA_MEDIA_LABEL; ?>"><?php echo esc_html( $rtmedia_album_count_status['before_string'] ) . rtm_get_album_media_count( rtmedia_id() ) . esc_html( $rtmedia_album_count_status['after_string'] ) ?></div>
 
685
  <?php
686
  }
687
  ?>
@@ -808,22 +815,22 @@ function rtmedia_addons_admin_notice() {
808
 
809
  $screen = get_current_screen();
810
 
811
- if ( $screen->id === 'rtmedia_page_rtmedia-license' ) {
812
 
813
  if ( isset( $_POST ) && count( $_POST ) > 0 ) { ?>
814
 
815
  <div class="notice notice-success is-dismissible">
816
- <p><?php _e('Settings has been saved successfully.', 'buddypress-media'); ?></p>
817
  </div>
818
 
819
  <div class="notice notice-error is-dismissible">
820
- <p><?php _e('Refresh the page in case if license data is not showing correct.', 'buddypress-media'); ?></p>
821
  </div>
822
  <?php
823
  }
824
  }
825
  }
826
- add_action('admin_notices', 'rtmedia_addons_admin_notice');
827
 
828
  /**
829
  * Function to add buddypress language conversion to Media activities.
@@ -842,3 +849,102 @@ function rtmedia_activity_register_activity_actions_callback() {
842
  );
843
  }
844
  add_action( 'bp_activity_register_activity_actions', 'rtmedia_activity_register_activity_actions_callback' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
  */
6
  function rtmedia_author_actions() {
7
 
8
+ $author_actions = apply_filters( 'rtmedia_author_actions', true );
9
+ if ( isset( $author_actions ) && ! empty( $author_actions ) ) {
10
+ $options_start = $options_end = $option_buttons = $output = '';
11
+ $options = array();
12
+ $options = apply_filters( 'rtmedia_author_media_options', $options );
13
+
14
+ if ( ! empty( $options ) ) {
15
+ $options_start .= '<div class="click-nav rtm-media-options-list" id="rtm-media-options-list">
16
+ <div class="no-js">
17
+ <button class="clicker rtmedia-media-options rtmedia-action-buttons button">' . esc_html__( 'Options', 'buddypress-media' ) . '</button>
18
+ <ul class="rtm-options">';
19
+
20
+ foreach ( $options as $action ) {
21
+ if ( ! empty( $action ) ) {
22
+ $option_buttons .= '<li>' . $action . '</li>';
23
+ }
24
  }
 
25
 
26
+ $options_end = '</ul></div></div>';
27
 
28
+ if ( ! empty( $option_buttons ) ) {
29
+ $output = $options_start . $option_buttons . $options_end;
30
+ }
31
 
32
+ if ( ! empty( $output ) ) {
33
+ echo $output; // @codingStandardsIgnoreLine
34
+ }
35
  }
36
  }
37
+
38
  }
39
 
40
  add_action( 'after_rtmedia_action_buttons', 'rtmedia_author_actions' );
107
  * @param string $media_type
108
  */
109
  function rtmedia_add_album_selection_field( $media_type ) {
110
+ /* if comment media then album option is depend on the top activity */
111
+ $comment_media = rtmedia_is_comment_media( rtmedia_id() );
112
 
113
+ if ( empty( $comment_media ) && is_rtmedia_album_enable() && isset( $media_type ) && 'album' != $media_type && apply_filters( 'rtmedia_edit_media_album_select', true ) ) {
114
  global $rtmedia_query;
115
 
116
  $curr_album_id = '';
149
 
150
  if ( ! empty( $options ) ) {
151
  $options_start .= '<div class="click-nav rtm-media-options-list" id="rtm-media-options-list">
152
+ <div class="no-js">
153
+ <div class="clicker rtmedia-action-buttons"><i class="dashicons dashicons-admin-generic rtmicon"></i>' . apply_filters( 'rtm_gallery_option_label', __( 'Options', 'buddypress-media' ) ) . '</div>
154
+ <ul class="rtm-options">';
155
 
156
  foreach ( $options as $action ) {
157
  if ( ! empty( $action ) ) {
687
 
688
  if ( isset( $rtmedia_album_count_status ) && $rtmedia_album_count_status['status'] ) {
689
  ?>
690
+ <div class="rtmedia-album-media-count" title="<?php echo rtmedia_album_mediacounter() . RTMEDIA_MEDIA_LABEL; ?>">
691
+ <?php echo esc_html( $rtmedia_album_count_status['before_string'] ) . rtmedia_album_mediacounter() . esc_html( $rtmedia_album_count_status['after_string'] ) ?></div>
692
  <?php
693
  }
694
  ?>
815
 
816
  $screen = get_current_screen();
817
 
818
+ if ( 'rtmedia_page_rtmedia-license' === $screen->id ) {
819
 
820
  if ( isset( $_POST ) && count( $_POST ) > 0 ) { ?>
821
 
822
  <div class="notice notice-success is-dismissible">
823
+ <p><?php _e( 'Settings has been saved successfully.', 'buddypress-media' ); ?></p>
824
  </div>
825
 
826
  <div class="notice notice-error is-dismissible">
827
+ <p><?php _e( 'Refresh the page in case if license data is not showing correct.', 'buddypress-media' ); ?></p>
828
  </div>
829
  <?php
830
  }
831
  }
832
  }
833
+ add_action( 'admin_notices', 'rtmedia_addons_admin_notice' );
834
 
835
  /**
836
  * Function to add buddypress language conversion to Media activities.
849
  );
850
  }
851
  add_action( 'bp_activity_register_activity_actions', 'rtmedia_activity_register_activity_actions_callback' );
852
+
853
+
854
+ /**
855
+ *
856
+ * rtmedia_override_canonical Redirect homepage as per parameters passed to query string.
857
+ * This is added for a page set as a "Front page" in which gallery short-code is there,
858
+ * so pagination for gallery short-code can work properly.
859
+ *
860
+ */
861
+ function rtmedia_override_canonical( $redirect_url, $requested_url ) {
862
+ if ( is_front_page() && get_query_var( 'pg' ) ) {
863
+ return $requested_url;
864
+ } else {
865
+ return $redirect_url;
866
+ }
867
+ }
868
+ add_filter( 'redirect_canonical', 'rtmedia_override_canonical', 10, 2 );
869
+
870
+ /**
871
+ * rtmedia_gallery_shortcode_json_query_vars Set query vars for json response
872
+ *
873
+ * @param object $wp_query WP query object
874
+ *
875
+ */
876
+ function rtmedia_gallery_shortcode_json_query_vars( $wp_query ) {
877
+
878
+ global $wp_query;
879
+
880
+ $pagename = '';
881
+ if ( isset( $wp_query->query_vars['pagename'] ) ) {
882
+ $pagename = explode( '/', $wp_query->query_vars['pagename'] );
883
+ }
884
+ if ( ! empty( $pagename ) && isset( $_REQUEST['json'] ) && 'true' === $_REQUEST['json'] && isset( $_REQUEST['rtmedia_shortcode'] ) && 'true' === $_REQUEST['rtmedia_shortcode'] ) {
885
+ $pagename = $pagename[0];
886
+ $wp_query->query_vars['pagename'] = '';
887
+ $wp_query->query['pagename'] = $pagename . '/pg';
888
+ $wp_query->query['media'] = '';
889
+ $wp_query->query_vars['media'] = '';
890
+ }
891
+
892
+ return $wp_query;
893
+
894
+ }
895
+ add_action( 'pre_get_posts', 'rtmedia_gallery_shortcode_json_query_vars', 99 );
896
+
897
+ /**
898
+ *
899
+ * Rule for pagination for rtmedia gallery shortcode
900
+ *
901
+ */
902
+ function rtmedia_gallery_shortcode_rewrite_rules() {
903
+
904
+ // Rule for pages
905
+ add_rewrite_rule( '([^/?]+)/pg/([0-9]*)/?', 'index.php?pg=$matches[2]&pagename=$matches[1]', 'top' );
906
+
907
+ // Rule for Day and name
908
+ add_rewrite_rule( '([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/?]+)/pg/([0-9]*)/?', 'index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&pg=$matches[5]', 'top' );
909
+
910
+ // Rule for Month and name
911
+ add_rewrite_rule( '([0-9]{4})/([0-9]{1,2})/([^/?]+)/pg/([0-9]*)/?', 'index.php?year=$matches[1]&monthnum=$matches[2]&name=$matches[3]&pg=$matches[4]', 'top' );
912
+
913
+ // Rule for Numeric
914
+ add_rewrite_rule( 'archives/([0-9]+)/pg/([0-9]*)/?', 'index.php?p=$matches[1]&pg=$matches[2]', 'top' );
915
+
916
+ // Rule for posts
917
+ add_rewrite_rule( '(.?.+?)/pg/?([0-9]{1,})/?$', 'index.php?pg=$matches[2]&name=$matches[1]', 'bottom' );
918
+
919
+ // Rule for homepage
920
+ add_rewrite_rule( 'pg/([0-9]*)/?', 'index.php?page_id=' . get_option( 'page_on_front' ) . '&pg=$matches[1]', 'top' );
921
+
922
+ }
923
+ add_action( 'rtmedia_add_rewrite_rules', 'rtmedia_gallery_shortcode_rewrite_rules' );
924
+
925
+
926
+ /**
927
+ * update the javascript variable media view in popup or in single page
928
+ */
929
+ function rtmedia_after_media_callback() {
930
+ // comment media
931
+ $rtmedia_id = rtmedia_id();
932
+ $comment_media = false;
933
+ if ( ! empty( $rtmedia_id ) ) {
934
+ $comment_media = rtmedia_is_comment_media( $rtmedia_id );
935
+ if ( ! empty( $comment_media ) ) {
936
+ ?>
937
+ <script type="text/javascript">
938
+ comment_media = true;
939
+ </script>
940
+ <?php
941
+ } else {
942
+ ?>
943
+ <script type="text/javascript">
944
+ comment_media = false;
945
+ </script>
946
+ <?php
947
+ }
948
+ }
949
+ }
950
+ add_action( 'rtmedia_after_media', 'rtmedia_after_media_callback', 10 );
app/main/controllers/template/rtmedia-ajax-actions.php CHANGED
@@ -11,8 +11,10 @@ function rtmedia_delete_uploaded_media() {
11
 
12
  if ( ! empty( $action ) && 'delete_uploaded_media' === $action && ! empty( $media_id ) ) {
13
  if ( wp_verify_nonce( $nonce, 'rtmedia_' . get_current_user_id() ) ) {
14
- $media = new RTMediaMedia();
15
- $delete = $media->delete( $media_id );
 
 
16
 
17
  echo '1';
18
 
@@ -27,3 +29,142 @@ function rtmedia_delete_uploaded_media() {
27
  }
28
 
29
  add_action( 'wp_ajax_delete_uploaded_media', 'rtmedia_delete_uploaded_media' );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
  if ( ! empty( $action ) && 'delete_uploaded_media' === $action && ! empty( $media_id ) ) {
13
  if ( wp_verify_nonce( $nonce, 'rtmedia_' . get_current_user_id() ) ) {
14
+
15
+ $rtmedia_media = new RTMediaMedia();
16
+
17
+ $delete = $rtmedia_media->delete( $media_id );
18
 
19
  echo '1';
20
 
29
  }
30
 
31
  add_action( 'wp_ajax_delete_uploaded_media', 'rtmedia_delete_uploaded_media' );
32
+
33
+
34
+
35
+ /**
36
+ * Update profile and comment activity content of comment media
37
+ *
38
+ * @global object $wpdb
39
+ *
40
+ * @param int $attachment_id
41
+ */
42
+ if ( ! function_exists( 'rtmedia_transcoded_media_added_callback' ) ) {
43
+ function rtmedia_transcoded_media_added_callback( $attachment_id ) {
44
+ if ( isset( $attachment_id ) && ! empty( $attachment_id ) ) {
45
+ $job_for = get_post_meta( $attachment_id, '_rt_media_source', true );
46
+ if ( 'rtmedia' == $job_for && class_exists( 'RTMediaModel' ) ) {
47
+ $model = new RTMediaModel();
48
+ $media = $model->get_media( array( 'media_id' => $attachment_id ), 0, 1 );
49
+ if ( isset( $media[0] ) && isset( $media[0]->activity_id ) && ! empty( $media[0]->activity_id ) ) {
50
+ $activity_id = $media[0]->activity_id;
51
+ $media_id = $media[0]->id;
52
+ if ( $activity_id && isset( $media_id ) && ! empty( $media_id ) && function_exists( 'rtmedia_is_comment_media' ) && rtmedia_is_comment_media( $media_id ) ) {
53
+ global $wpdb;
54
+ $activity_content = $wpdb->get_var( $wpdb->prepare( "SELECT content FROM {$wpdb->base_prefix}bp_activity WHERE id = %d", $activity_id ) );
55
+ if ( function_exists( 'rtmedia_update_content_of_comment_media' ) ) {
56
+ rtmedia_update_content_of_comment_media( $media[0]->id, $activity_content );
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ add_action( 'transcoded_media_added', 'rtmedia_transcoded_media_added_callback', 10, 1 );
65
+
66
+ function rtmedia_actions_before_comments_convesation_callback() {
67
+ global $rtmedia_media;
68
+
69
+ /* check is comment media */
70
+ $comment_media = rtmedia_is_comment_media( rtmedia_id() );
71
+
72
+ if ( isset( $rtmedia_media->activity_id ) && ! empty( $rtmedia_media->activity_id ) && function_exists( 'rtmedia_view_conversation_of_media' ) && $comment_media ) {
73
+ rtmedia_view_conversation_of_media( $rtmedia_media->activity_id );
74
+ }
75
+ }
76
+ add_action( 'rtmedia_actions_before_comments', 'rtmedia_actions_before_comments_convesation_callback', 1000 );
77
+
78
+ function rtmedia_actions_before_comments_links_callback() {
79
+ // check is comment media.
80
+ $comment_media = false;
81
+ if ( function_exists( 'rtmedia_is_comment_media_single_page' ) ) {
82
+ $comment_media = rtmedia_is_comment_media_single_page( rtmedia_id() );
83
+ }
84
+
85
+ // if user is login and is not comment media.
86
+ if ( is_user_logged_in() && empty( $comment_media ) ) { ?>
87
+ <span>
88
+ <a href='#' class='rtmedia-comment-link rtmedia-comments-link'><?php esc_html_e( 'Comment', 'buddypress-media' ); ?></a>
89
+ </span>
90
+ <?php
91
+ }
92
+ }
93
+ add_action( 'rtmedia_actions_before_comments', 'rtmedia_actions_before_comments_links_callback', 11 );
94
+
95
+
96
+
97
+ /*
98
+ * Runes when activity is add in buddypress
99
+ */
100
+ function rtmedia_bp_activity_after_save_callback( $activity_data ) {
101
+ /* check is activity reply*/
102
+ if ( ! empty( $activity_data ) && 'activity_comment' == $activity_data->type ) {
103
+ /* check that it has any media in it */
104
+ if ( isset( $_REQUEST['rtMedia_attached_files'] ) && isset( $activity_data->id ) ) {
105
+ $rtMedia_attached_files = filter_input( INPUT_POST, 'rtMedia_attached_files', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
106
+ /* check is class exits or not */
107
+ if ( is_array( $rtMedia_attached_files ) && ! empty( $rtMedia_attached_files[0] ) && class_exists( 'RTMediaModel' ) ) {
108
+
109
+ if ( function_exists( 'rtmedia_get_original_comment_media_content' ) ) {
110
+ /* get the original content of media */
111
+ $original_content = rtmedia_get_original_comment_media_content();
112
+ /* save the original content in the meta fields */
113
+ bp_activity_update_meta( $activity_data->id, 'bp_activity_text', $original_content );
114
+ // bp_activity_update_meta( $activity_data->id, 'bp_old_activity_content', $original_content );
115
+ }
116
+
117
+ $rtmedia_model = new RTMediaModel();
118
+ $rtmedia_model->update(
119
+ array(
120
+ 'activity_id' => $activity_data->id,
121
+ ),
122
+ array(
123
+ 'id' => $rtMedia_attached_files[0],
124
+ )
125
+ );
126
+
127
+ $privacy = -1;
128
+ $form_id = filter_input( INPUT_POST, 'form_id', FILTER_SANITIZE_NUMBER_INT );
129
+
130
+ $rtm_activity_model = new RTMediaActivityModel();
131
+ $columns = array(
132
+ 'activity_id' => $form_id,
133
+ 'blog_id' => get_current_blog_id(),
134
+ );
135
+
136
+ $is_ac_privacy_exist = $rtm_activity_model->get( $columns );
137
+
138
+ /* changing privacy according to it parent */
139
+ if ( isset( $is_ac_privacy_exist[0] ) && ! empty( $is_ac_privacy_exist[0] ) && isset( $is_ac_privacy_exist[0]->privacy ) ) {
140
+ $privacy = $is_ac_privacy_exist[0]->privacy;
141
+ }
142
+
143
+ // Very first privacy entry for this activity
144
+ $status = $rtm_activity_model->insert( array(
145
+ 'privacy' => $privacy,
146
+ 'activity_id' => $activity_data->id,
147
+ 'user_id' => get_current_user_id(),
148
+ ) );
149
+ }
150
+ }
151
+ }
152
+ }
153
+ add_action( 'bp_activity_after_save', 'rtmedia_bp_activity_after_save_callback', 1000, 1 );
154
+
155
+
156
+ /*
157
+ * Change the BuddyPress activity Comment reply content
158
+ */
159
+ function rtmedia_bp_activity_comment_content_callback( $content ) {
160
+ $new_content = $content;
161
+ if ( isset( $_REQUEST['rtMedia_attached_files'] ) && isset( $_REQUEST['comment_id'] ) && isset( $_REQUEST['form_id'] ) ) {
162
+ $rtMedia_attached_files = filter_input( INPUT_POST, 'rtMedia_attached_files', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
163
+ if ( ! empty( $rtMedia_attached_files[0] ) && is_array( $rtMedia_attached_files ) && class_exists( 'RTMediaActivity' ) ) {
164
+ $obj_comment = new RTMediaActivity( $rtMedia_attached_files[0], 0, $content );
165
+ $new_content = $obj_comment->create_activity_html();
166
+ }
167
+ }
168
+ return $new_content;
169
+ }
170
+ add_action( 'bp_activity_content_before_save', 'rtmedia_bp_activity_comment_content_callback', 1001, 1 );
app/main/controllers/template/rtmedia-filters.php CHANGED
@@ -618,6 +618,45 @@ function rtmedia_edit_media_on_database( $data, $post_ID ) {
618
  add_filter( 'wp_update_attachment_metadata', 'rtmedia_edit_media_on_database', 10, 2 );
619
 
620
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
621
 
622
  function rtmedia_like_html_you_and_more_like_callback( $like_count, $user_like_it ) {
623
  if ( $like_count > 1 && $user_like_it ) {
@@ -627,3 +666,29 @@ function rtmedia_like_html_you_and_more_like_callback( $like_count, $user_like_i
627
  return sprintf( '<span class="rtmedia-like-counter">%s</span>', $like_count );
628
  }
629
  add_filter( 'rtmedia_like_html_you_and_more_like', 'rtmedia_like_html_you_and_more_like_callback', 10, 2 );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
618
  add_filter( 'wp_update_attachment_metadata', 'rtmedia_edit_media_on_database', 10, 2 );
619
 
620
 
621
+ /**
622
+ * Disallow media edit for comment media
623
+ */
624
+ if ( ! function_exists( 'rtmedia_media_edit_priv_callback' ) ) {
625
+ function rtmedia_media_edit_priv_callback( $value ) {
626
+ // comment media
627
+ $rtmedia_id = rtmedia_id();
628
+ $comment_media = false;
629
+ if ( ! empty( $rtmedia_id ) && function_exists( 'rtmedia_is_comment_media' ) && ! empty( $value ) ) {
630
+ $comment_media = rtmedia_is_comment_media( $rtmedia_id );
631
+ if ( ! empty( $comment_media ) ) {
632
+ $value = false;
633
+ }
634
+ }
635
+ return $value;
636
+ }
637
+ }
638
+ add_filter( 'rtmedia_media_edit_priv', 'rtmedia_media_edit_priv_callback', 10, 1 );
639
+
640
+
641
+ /**
642
+ * Disallow media author action
643
+ */
644
+ if ( ! function_exists( 'rtmedia_author_actions_callback' ) ) {
645
+ function rtmedia_author_actions_callback( $value ) {
646
+ // comment media
647
+ $rtmedia_id = rtmedia_id();
648
+ $comment_media = false;
649
+ if ( ! empty( $rtmedia_id ) && function_exists( 'rtmedia_is_comment_media' ) && ! empty( $value ) ) {
650
+ $comment_media = rtmedia_is_comment_media( $rtmedia_id );
651
+ if ( ! empty( $comment_media ) ) {
652
+ $value = false;
653
+ }
654
+ }
655
+ return $value;
656
+ }
657
+ }
658
+ add_filter( 'rtmedia_author_actions', 'rtmedia_author_actions_callback', 10, 1 );
659
+
660
 
661
  function rtmedia_like_html_you_and_more_like_callback( $like_count, $user_like_it ) {
662
  if ( $like_count > 1 && $user_like_it ) {
666
  return sprintf( '<span class="rtmedia-like-counter">%s</span>', $like_count );
667
  }
668
  add_filter( 'rtmedia_like_html_you_and_more_like', 'rtmedia_like_html_you_and_more_like_callback', 10, 2 );
669
+
670
+ function rtmedia_comment_max_links_callback( $values, $option ) {
671
+ $new_values = $values;
672
+ if ( apply_filters( 'rtmedia_comment_max_links', true ) && 'comment_max_links' == $option ) {
673
+ $rtMedia_attached_files = filter_input( INPUT_POST, 'rtMedia_attached_files', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY );
674
+ if ( is_array( $rtMedia_attached_files ) && ! empty( $rtMedia_attached_files[0] ) ) {
675
+ if ( $new_values < 5 ) {
676
+ $new_values = 5;
677
+ }
678
+ }
679
+ }
680
+ return $new_values;
681
+ }
682
+ add_filter( 'option_comment_max_links', 'rtmedia_comment_max_links_callback', 10, 2 );
683
+
684
+ /**
685
+ * add link for @mentions of the username in the comment or the activity section after the media delete or media is trancoder
686
+ */
687
+ function rtmedia_bp_activity_get_meta_callback( $retval, $activity_id, $meta_key, $single ) {
688
+ $new_retval = $retval;
689
+ if ( 'bp_activity_text' == $meta_key && true == $single && function_exists( 'bp_activity_at_name_filter' ) ) {
690
+ $new_retval = bp_activity_at_name_filter( $new_retval );
691
+ }
692
+ return $new_retval;
693
+ }
694
+ add_filter( 'bp_activity_get_meta', 'rtmedia_bp_activity_get_meta_callback', 10, 4 );
app/main/controllers/template/rtmedia-functions.php CHANGED
@@ -45,6 +45,28 @@ function rtmedia() {
45
 
46
  }
47
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  /**
49
  * echo the title of the media
50
  *
@@ -593,9 +615,9 @@ function rtmedia_image( $size = 'rt_media_thumbnail', $id = false, $recho = true
593
  if ( isset( $media_object->media_type ) ) {
594
  if ( 'album' === $media_object->media_type || 'photo' !== $media_object->media_type || 'video' === $media_object->media_type ) {
595
  $thumbnail_id = ( isset( $media_object->cover_art )
596
- && ( ( false !== filter_var( $media_object->cover_art, FILTER_VALIDATE_URL ) ) // Cover art might be an absolute URL
597
- || ( 0 !== intval( $media_object->cover_art ) ) // Cover art might be a media ID
598
- ) ) ? $media_object->cover_art : false;
599
  $thumbnail_id = apply_filters( 'show_custom_album_cover', $thumbnail_id, $media_object->media_type, $media_object->id ); // for rtMedia pro users
600
  } elseif ( 'photo' === $media_object->media_type ) {
601
  $thumbnail_id = $media_object->media_id;
@@ -1171,27 +1193,35 @@ function rtmedia_comments( $echo = true ) {
1171
 
1172
  global $rtmedia_media;
1173
 
1174
- $html = '<ul id="rtmedia_comment_ul" class="rtm-comment-list" data-action="' . esc_url( get_rtmedia_permalink( rtmedia_id() ) ) . 'delete-comment/">';
1175
- $comments = get_comments( array(
1176
- 'post_id' => $rtmedia_media->media_id,
1177
- 'order' => 'ASC',
1178
- ) );
1179
- $comment_list = '';
1180
- $count = count( $comments );
1181
- $i = 0;
1182
 
1183
- foreach ( $comments as $comment ) {
1184
- $comment_list .= rmedia_single_comment( (array) $comment, $count, $i );
1185
- $i++;
1186
- }
1187
 
1188
- if ( ! empty( $comment_list ) ) {
1189
- $html .= $comment_list;
1190
- } else {
1191
- $html .= "<li id='rtmedia-no-comments' class='rtmedia-no-comments'>" . apply_filters( 'rtmedia_single_media_no_comment_messege', esc_html__( 'There are no comments on this media yet.', 'buddypress-media' ) ) . '</li>';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1192
  }
1193
 
1194
- $html .= '</ul>';
1195
 
1196
  if ( $html ) {
1197
  echo $html; // @codingStandardsIgnoreLine
@@ -1244,21 +1274,8 @@ function rmedia_single_comment( $comment, $count = false, $i = false ) {
1244
  $html .= '<span class ="rtmedia-comment-date"> ' . apply_filters( 'rtmedia_comment_date_format', rtmedia_convert_date( $comment['comment_date_gmt'] ), $comment ) . '</span>';
1245
 
1246
  $comment_content = $comment['comment_content'];
1247
- $activity_comment_content = get_comment_meta( $comment['comment_ID'], 'activity_comment_content', true );
1248
- if ( empty( $activity_comment_content ) ) {
1249
- $activity_id = (int) get_comment_meta( $comment['comment_ID'], 'activity_id', true );
1250
- if ( $activity_id ) {
1251
- $rtmedia_activity_comment = rtmedia_activity_comment( $activity_id );
1252
- if ( $rtmedia_activity_comment['content'] ) {
1253
- $comment_content = $rtmedia_activity_comment['content'];
1254
- update_comment_meta( $comment['comment_ID'], 'activity_comment_content', $rtmedia_activity_comment['content'] );
1255
- }
1256
- }
1257
- } else {
1258
- $comment_content = $activity_comment_content;
1259
- }
1260
 
1261
- $comment_string = wp_kses( $comment_content, $allowedtags );
1262
 
1263
  $html .= '<div class="rtmedia-comment-content">' . wpautop( make_clickable( apply_filters( 'bp_get_activity_content', $comment_string ) ) ) . '</div>';
1264
  $html .= '<div class="rtmedia-comment-extra">' . apply_filters( 'rtmedia_comment_extra', '', $comment ) . '</div>';
@@ -1430,24 +1447,50 @@ function rtmedia_pagination_next_link() {
1430
  */
1431
  function rtmedia_pagination_page_link( $page_no = '' ) {
1432
 
1433
- global $rtmedia_interaction, $rtmedia_query;
 
 
 
 
 
 
1434
 
1435
  $page_url = 'pg/' . $page_no;
1436
  $site_url = ( is_multisite() ) ? trailingslashit( get_site_url( get_current_blog_id() ) ) : trailingslashit( get_site_url() );
1437
  $author_name = get_query_var( 'author_name' );
1438
  $link = '';
1439
 
 
 
1440
  if ( $rtmedia_interaction && isset( $rtmedia_interaction->context ) && 'profile' === $rtmedia_interaction->context->type ) {
1441
- if ( function_exists( 'bp_core_get_user_domain' ) && ! empty( $rtmedia_query->media_query['media_author'] ) ) {
1442
- $link .= trailingslashit( bp_core_get_user_domain( $rtmedia_query->media_query['media_author'] ) );
1443
  } else {
1444
- $link .= $site_url . 'author/' . $author_name . '/';
 
 
 
 
1445
  }
1446
  } else {
1447
  if ( $rtmedia_interaction && isset( $rtmedia_interaction->context ) && 'group' === $rtmedia_interaction->context->type ) {
1448
  if ( function_exists( 'bp_get_current_group_slug' ) ) {
1449
  $link .= $site_url . bp_get_groups_root_slug() . '/' . bp_get_current_group_slug() . '/';
1450
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1451
  } elseif ( isset( $rtmedia_query->media->media_id ) ) {
1452
  $post = get_post( get_post_field( 'post_parent', $rtmedia_query->media->media_id ) );
1453
 
@@ -1455,7 +1498,10 @@ function rtmedia_pagination_page_link( $page_no = '' ) {
1455
  }
1456
  }
1457
 
1458
- $link .= RTMEDIA_MEDIA_SLUG . '/';
 
 
 
1459
 
1460
  if ( isset( $rtmedia_query->media_query['album_id'] ) && intval( $rtmedia_query->media_query['album_id'] ) > 0 ) {
1461
  $link .= $rtmedia_query->media_query['album_id'] . '/';
@@ -1582,7 +1628,7 @@ function rtmedia_get_pagination_values() {
1582
  $rtmedia_media_pages .= "<a class='rtmedia-page-link' data-page-type='next' href='" . esc_url( $page_url ) . "'><i class='dashicons dashicons-arrow-right-alt2'></i></a>";
1583
  }
1584
 
1585
- $rtmedia_media_pages .= "</div></div>\n";
1586
  }// End if().
1587
 
1588
  return $rtmedia_media_pages;
@@ -1790,17 +1836,62 @@ function update_activity_after_thumb_set( $id ) {
1790
 
1791
  $activity_text = bp_activity_get_meta( $activity_id, 'bp_activity_text' );
1792
  $obj_activity->activity_text = $activity_text;
 
1793
 
1794
  $wpdb->update( $bp->activity->table_name, array(
1795
- 'type' => 'rtmedia_update',
1796
- 'content' => $obj_activity->create_activity_html(),
1797
  ), array(
1798
  'id' => $activity_id,
1799
  ) );
 
 
 
 
1800
  }// End if().
1801
 
1802
  }
1803
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1804
  /**
1805
  * Updating video poster
1806
  *
@@ -1850,11 +1941,18 @@ function get_video_without_thumbs() {
1850
  */
1851
  function rtmedia_comment_form() {
1852
 
1853
- if ( is_user_logged_in() ) {
 
 
 
1854
  ?>
1855
  <form method="post" id="rt_media_comment_form" class="rt_media_comment_form" action="<?php echo esc_url( get_rtmedia_permalink( rtmedia_id() ) ); ?>comment/">
1856
  <textarea style="width:100%" placeholder="<?php esc_attr_e( 'Type Comment...', 'buddypress-media' ); ?>" name="comment_content" id="comment_content" class="bp-suggestions ac-input"></textarea>
 
1857
  <input type="submit" id="rt_media_comment_submit" class="rt_media_comment_submit" value="<?php esc_attr_e( 'Comment', 'buddypress-media' ); ?>">
 
 
 
1858
  <?php RTMediaComment::comment_nonce_generator(); ?>
1859
  </form>
1860
  <?php
@@ -2378,6 +2476,9 @@ function rtmedia_edit_media_privacy_ui() {
2378
 
2379
  global $rtmedia_query;
2380
 
 
 
 
2381
  if ( isset( $rtmedia_query->query['context'] ) && 'group' === $rtmedia_query->query['context'] ) {
2382
  //if context is group i.e editing a group media, dont show the privacy dropdown
2383
  return false;
@@ -2386,7 +2487,7 @@ function rtmedia_edit_media_privacy_ui() {
2386
  $privacymodel = new RTMediaPrivacy( false );
2387
  $privacy = $privacymodel->select_privacy_ui( $echo = false );
2388
 
2389
- if ( $privacy ) {
2390
  return "<div class='rtmedia-edit-privacy rtm-field-wrap'><label for='privacy'>" . esc_html__( 'Privacy : ', 'buddypress-media' ) . '</label>' . $privacy . '</div>';
2391
  }
2392
 
@@ -3460,27 +3561,6 @@ function rtt_is_video_exists( $medias, $media_type = 'mp4' ) {
3460
  }
3461
 
3462
 
3463
-
3464
-
3465
- /**
3466
- * Return the buddpress activity table content
3467
- *
3468
- * @param int $activity_id
3469
- *
3470
- * @return array buddpres_activity
3471
- */
3472
- function rtmedia_activity_comment( $activity_id ) {
3473
- $activity_id = ( $activity_id ) ? (int) $activity_id : false;
3474
- $activity_comment_content = false;
3475
- if ( $activity_id ) {
3476
- global $wpdb;
3477
- global $bp;
3478
- $table_name = $bp->activity->table_name;
3479
- $activity_comment_content = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $table_name WHERE id = %d", $activity_id ), ARRAY_A );
3480
- }
3481
- return $activity_comment_content;
3482
- }
3483
-
3484
  /**
3485
  * Send the request to the rtmedia server for addon license validation
3486
  * and activation
@@ -3532,7 +3612,7 @@ function rtmedia_activate_addon_license( $addon = array() ) {
3532
  'url' => home_url(),
3533
  );
3534
 
3535
- // Call the custom API.
3536
  $response = wp_remote_get( esc_url_raw( add_query_arg( $api_params, $store_url ) ), array( 'timeout' => 15, 'sslverify' => false ) );
3537
 
3538
  // make sure the response came back okay
@@ -3546,3 +3626,206 @@ function rtmedia_activate_addon_license( $addon = array() ) {
3546
  return $license_data;
3547
 
3548
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
45
 
46
  }
47
 
48
+ /**
49
+ * echo the number of media in particular album
50
+ *
51
+ * @global array $rtmedia_backbone
52
+ * @global object $rtmedia_media
53
+ *
54
+ * @return number
55
+ */
56
+ function rtmedia_album_mediacounter() {
57
+
58
+ global $rtmedia_backbone;
59
+
60
+ if ( $rtmedia_backbone['backbone'] ) {
61
+ echo '<%= media_count %>';
62
+ } else {
63
+ global $rtmedia_media;
64
+
65
+ return rtm_get_album_media_count( $rtmedia_media->id );
66
+ }
67
+
68
+ }
69
+
70
  /**
71
  * echo the title of the media
72
  *
615
  if ( isset( $media_object->media_type ) ) {
616
  if ( 'album' === $media_object->media_type || 'photo' !== $media_object->media_type || 'video' === $media_object->media_type ) {
617
  $thumbnail_id = ( isset( $media_object->cover_art )
618
+ && ( ( false !== filter_var( $media_object->cover_art, FILTER_VALIDATE_URL ) ) // Cover art might be an absolute URL
619
+ || ( 0 !== intval( $media_object->cover_art ) ) // Cover art might be a media ID
620
+ ) ) ? $media_object->cover_art : false;
621
  $thumbnail_id = apply_filters( 'show_custom_album_cover', $thumbnail_id, $media_object->media_type, $media_object->id ); // for rtMedia pro users
622
  } elseif ( 'photo' === $media_object->media_type ) {
623
  $thumbnail_id = $media_object->media_id;
1193
 
1194
  global $rtmedia_media;
1195
 
1196
+ /* check is comment media */
1197
+ $comment_media = rtmedia_is_comment_media_single_page( rtmedia_id() );
 
 
 
 
 
 
1198
 
1199
+ $html = "";
 
 
 
1200
 
1201
+ if( empty( $comment_media ) ){
1202
+ $html = '<ul id="rtmedia_comment_ul" class="rtm-comment-list" data-action="' . esc_url( get_rtmedia_permalink( rtmedia_id() ) ) . 'delete-comment/">';
1203
+ $comments = get_comments( array(
1204
+ 'post_id' => $rtmedia_media->media_id,
1205
+ 'order' => 'ASC',
1206
+ ) );
1207
+ $comment_list = '';
1208
+ $count = count( $comments );
1209
+ $i = 0;
1210
+
1211
+ foreach ( $comments as $comment ) {
1212
+ $comment_list .= rmedia_single_comment( (array) $comment, $count, $i );
1213
+ $i++;
1214
+ }
1215
+
1216
+ if ( ! empty( $comment_list ) ) {
1217
+ $html .= $comment_list;
1218
+ } else {
1219
+ $html .= "<li id='rtmedia-no-comments' class='rtmedia-no-comments'>" . apply_filters( 'rtmedia_single_media_no_comment_messege', esc_html__( 'There are no comments on this media yet.', 'buddypress-media' ) ) . '</li>';
1220
+ }
1221
+
1222
+ $html .= '</ul>';
1223
  }
1224
 
 
1225
 
1226
  if ( $html ) {
1227
  echo $html; // @codingStandardsIgnoreLine
1274
  $html .= '<span class ="rtmedia-comment-date"> ' . apply_filters( 'rtmedia_comment_date_format', rtmedia_convert_date( $comment['comment_date_gmt'] ), $comment ) . '</span>';
1275
 
1276
  $comment_content = $comment['comment_content'];
 
 
 
 
 
 
 
 
 
 
 
 
 
1277
 
1278
+ $comment_string = rtmedia_wp_kses_of_buddypress( $comment_content, $allowedtags );
1279
 
1280
  $html .= '<div class="rtmedia-comment-content">' . wpautop( make_clickable( apply_filters( 'bp_get_activity_content', $comment_string ) ) ) . '</div>';
1281
  $html .= '<div class="rtmedia-comment-extra">' . apply_filters( 'rtmedia_comment_extra', '', $comment ) . '</div>';
1447
  */
1448
  function rtmedia_pagination_page_link( $page_no = '' ) {
1449
 
1450
+ global $rtmedia_interaction, $rtmedia_query, $post;
1451
+
1452
+ $wp_default_context = array( 'page', 'post' );
1453
+
1454
+ if ( isset( $_GET['context'] ) && in_array( $_GET['context'], $wp_default_context ) && isset( $_GET['rtmedia_shortcode'] ) && 'true' === $_GET['rtmedia_shortcode'] ) {
1455
+ $post = get_post( intval( $_GET['context_id'] ) );
1456
+ }
1457
 
1458
  $page_url = 'pg/' . $page_no;
1459
  $site_url = ( is_multisite() ) ? trailingslashit( get_site_url( get_current_blog_id() ) ) : trailingslashit( get_site_url() );
1460
  $author_name = get_query_var( 'author_name' );
1461
  $link = '';
1462
 
1463
+ $is_shortcode_on_home = ( isset( $_GET['is_on_home'] ) && '1' === $_GET['is_on_home'] && isset( $_GET['rtmedia_shortcode'] ) && 'true' === $_GET['rtmedia_shortcode'] && isset( $_GET['context_id'] ) && $_GET['context_id'] === get_option( 'page_on_front' ) ) ? true : false;
1464
+
1465
  if ( $rtmedia_interaction && isset( $rtmedia_interaction->context ) && 'profile' === $rtmedia_interaction->context->type ) {
1466
+ if ( function_exists( 'bp_core_get_user_domain' ) && ! empty( $rtmedia_query->media_query['context_id'] ) ) {
1467
+ $link .= trailingslashit( bp_core_get_user_domain( $rtmedia_query->media_query['context_id'] ) );
1468
  } else {
1469
+ if ( $is_shortcode_on_home ) {
1470
+ $link .= $site_url;
1471
+ } else {
1472
+ $link .= $site_url . 'author/' . $author_name . '/';
1473
+ }
1474
  }
1475
  } else {
1476
  if ( $rtmedia_interaction && isset( $rtmedia_interaction->context ) && 'group' === $rtmedia_interaction->context->type ) {
1477
  if ( function_exists( 'bp_get_current_group_slug' ) ) {
1478
  $link .= $site_url . bp_get_groups_root_slug() . '/' . bp_get_current_group_slug() . '/';
1479
  }
1480
+ } elseif ( $rtmedia_interaction && isset( $rtmedia_interaction->context ) && in_array( $rtmedia_interaction->context->type, $wp_default_context ) ) {
1481
+ // Make sure that only one slash is at the end of url
1482
+ $link .= rtrim( get_permalink( $post ), '/' ) . '/';
1483
+ } elseif ( $rtmedia_interaction && isset( $rtmedia_interaction->context ) && 'rtmedia_album' === $rtmedia_interaction->context->type ) { // url for rtmedia album
1484
+ global $rtmedia;
1485
+ $options = $rtmedia->options;
1486
+ // Get album slug
1487
+ $album_slug = $options['rtmedia_wp_album_slug'];
1488
+
1489
+ if ( empty( $album_slug ) ) {
1490
+ $album_slug = 'rtmedia-album';
1491
+ }
1492
+ $post = get_post( get_post_field( 'post_parent', $rtmedia_query->media->media_id ) );
1493
+ $link .= $site_url . $album_slug . '/' . $post->post_name . '/';
1494
  } elseif ( isset( $rtmedia_query->media->media_id ) ) {
1495
  $post = get_post( get_post_field( 'post_parent', $rtmedia_query->media->media_id ) );
1496
 
1498
  }
1499
  }
1500
 
1501
+ // Do not add media slug for gallery shortcode and sitewide gallery
1502
+ if ( $rtmedia_interaction && isset( $rtmedia_interaction->context ) && ! in_array( $rtmedia_interaction->context->type, array( 'page', 'rtmedia_album', 'post' ) ) && ! $is_shortcode_on_home ) {
1503
+ $link .= RTMEDIA_MEDIA_SLUG . '/';
1504
+ }
1505
 
1506
  if ( isset( $rtmedia_query->media_query['album_id'] ) && intval( $rtmedia_query->media_query['album_id'] ) > 0 ) {
1507
  $link .= $rtmedia_query->media_query['album_id'] . '/';
1628
  $rtmedia_media_pages .= "<a class='rtmedia-page-link' data-page-type='next' href='" . esc_url( $page_url ) . "'><i class='dashicons dashicons-arrow-right-alt2'></i></a>";
1629
  }
1630
 
1631
+ $rtmedia_media_pages .= "</div></div>";
1632
  }// End if().
1633
 
1634
  return $rtmedia_media_pages;
1836
 
1837
  $activity_text = bp_activity_get_meta( $activity_id, 'bp_activity_text' );
1838
  $obj_activity->activity_text = $activity_text;
1839
+ $activity_content = $obj_activity->create_activity_html();
1840
 
1841
  $wpdb->update( $bp->activity->table_name, array(
1842
+ 'content' => $activity_content,
 
1843
  ), array(
1844
  'id' => $activity_id,
1845
  ) );
1846
+
1847
+ if( function_exists( 'rtmedia_update_content_of_comment_media' ) ){
1848
+ rtmedia_update_content_of_comment_media( $id, $activity_content );
1849
+ }
1850
  }// End if().
1851
 
1852
  }
1853
 
1854
+
1855
+
1856
+ /**
1857
+ * Updating profile and comment activity after thumbnail set
1858
+ *
1859
+ * @global wpdb $wpdb
1860
+ *
1861
+ * @param int $media_id
1862
+ * @param string $activity_content
1863
+ */
1864
+ function rtmedia_update_content_of_comment_media( $media_id, $activity_content ){
1865
+ /* update activity profile and comment content of the media */
1866
+ if( isset( $media_id ) && ! empty( $media_id ) && function_exists( 'rtmedia_is_comment_media' ) ){
1867
+ global $wpdb;
1868
+ /* check if it's an comment media */
1869
+ if( rtmedia_is_comment_media( $media_id ) ){
1870
+
1871
+ // update profile content
1872
+ /* get the profile activity id from the rtmedia meta table */
1873
+ $activity_id = get_rtmedia_meta( $media_id, 'rtmedia_comment_media_profile_id' );
1874
+ /* check is activity id is empty or not */
1875
+ if( isset( $activity_id ) && ! empty( $activity_id ) ){
1876
+ $update = $wpdb->update( $wpdb->base_prefix . 'bp_activity', array( 'content' => $activity_content ), array( 'id' => $activity_id ) );
1877
+ }
1878
+
1879
+ // update comment content
1880
+ // get the comment id from the rtmedia meta table
1881
+ $comment_id = get_rtmedia_meta( $media_id, 'rtmedia_comment_media_comment_id' );
1882
+ if( isset( $comment_id ) && ! empty( $comment_id ) ){
1883
+ $activity_content = str_replace( 'rtmedia-activity-container', 'rtmedia-comment-media-container', $activity_content );
1884
+ $activity_content = str_replace( 'rtmedia-activity-text', 'rtmedia-comment-media-text', $activity_content );
1885
+ $activity_content = str_replace( 'rtmedia-list-item', 'rtmedia-comment-media-list-item', $activity_content );
1886
+ $activity_content = str_replace( 'rtmedia-list', 'rtmedia-comment-media-list', $activity_content );
1887
+ $activity_content = str_replace( 'rtmedia-comment-media-list-item', 'rtmedia-list-item', $activity_content );
1888
+ $update = $wpdb->update( $wpdb->base_prefix . 'comments', array( 'comment_content' => $activity_content ), array( 'comment_ID' => $comment_id ) );
1889
+ }
1890
+ }
1891
+ }
1892
+ }
1893
+
1894
+
1895
  /**
1896
  * Updating video poster
1897
  *
1941
  */
1942
  function rtmedia_comment_form() {
1943
 
1944
+ /* check is comment media */
1945
+ $comment_media = rtmedia_is_comment_media_single_page( rtmedia_id() );
1946
+
1947
+ if ( is_user_logged_in() && empty( $comment_media ) ) {
1948
  ?>
1949
  <form method="post" id="rt_media_comment_form" class="rt_media_comment_form" action="<?php echo esc_url( get_rtmedia_permalink( rtmedia_id() ) ); ?>comment/">
1950
  <textarea style="width:100%" placeholder="<?php esc_attr_e( 'Type Comment...', 'buddypress-media' ); ?>" name="comment_content" id="comment_content" class="bp-suggestions ac-input"></textarea>
1951
+
1952
  <input type="submit" id="rt_media_comment_submit" class="rt_media_comment_submit" value="<?php esc_attr_e( 'Comment', 'buddypress-media' ); ?>">
1953
+
1954
+ <?php do_action( 'rtmedia_add_comments_extra' ); ?>
1955
+
1956
  <?php RTMediaComment::comment_nonce_generator(); ?>
1957
  </form>
1958
  <?php
2476
 
2477
  global $rtmedia_query;
2478
 
2479
+ /* check is comment media */
2480
+ $comment_media = rtmedia_is_comment_media( rtmedia_id() );
2481
+
2482
  if ( isset( $rtmedia_query->query['context'] ) && 'group' === $rtmedia_query->query['context'] ) {
2483
  //if context is group i.e editing a group media, dont show the privacy dropdown
2484
  return false;
2487
  $privacymodel = new RTMediaPrivacy( false );
2488
  $privacy = $privacymodel->select_privacy_ui( $echo = false );
2489
 
2490
+ if ( $privacy && empty( $comment_media ) ) {
2491
  return "<div class='rtmedia-edit-privacy rtm-field-wrap'><label for='privacy'>" . esc_html__( 'Privacy : ', 'buddypress-media' ) . '</label>' . $privacy . '</div>';
2492
  }
2493
 
3561
  }
3562
 
3563
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3564
  /**
3565
  * Send the request to the rtmedia server for addon license validation
3566
  * and activation
3612
  'url' => home_url(),
3613
  );
3614
 
3615
+ // Call the custom API.
3616
  $response = wp_remote_get( esc_url_raw( add_query_arg( $api_params, $store_url ) ), array( 'timeout' => 15, 'sslverify' => false ) );
3617
 
3618
  // make sure the response came back okay
3626
  return $license_data;
3627
 
3628
  }
3629
+
3630
+
3631
+
3632
+
3633
+ function rtmedia_wp_kses_of_buddypress( $comment_content, $allowedtags ){
3634
+ if( function_exists( 'bp_activity_filter_kses' ) ){
3635
+ $comment_string = bp_activity_filter_kses( $comment_content, $allowedtags );
3636
+ }else{
3637
+ $comment_string = wp_kses( $comment_content, $allowedtags );
3638
+ }
3639
+ return $comment_string;
3640
+ }
3641
+
3642
+
3643
+ /*
3644
+ * is media is uploaded in the comment
3645
+ * parameter media_id int
3646
+ * return true/false value
3647
+ */
3648
+ function rtmedia_is_comment_media( $rtmedia_id ){
3649
+ return get_rtmedia_meta( $rtmedia_id, 'rtmedia_comment_media' );
3650
+ }
3651
+
3652
+
3653
+
3654
+ function rtmedia_is_comment_media_single_page( $rtmedia_id ){
3655
+ $comment_media = false;
3656
+ global $rtmedia;
3657
+ /* check if the reply in comment media is not allow */
3658
+ if( $rtmedia_id && ! rtmedia_check_comment_in_commented_media_allow() ){
3659
+ $comment_media = rtmedia_is_comment_media( $rtmedia_id );
3660
+ }
3661
+ return $comment_media;
3662
+ }
3663
+
3664
+
3665
+ function rtmedia_view_conversation_of_media( $activity_id ) {
3666
+ if ( function_exists( 'bp_activity_get_permalink' ) ) {
3667
+ ?>
3668
+ <span>
3669
+ <a href="<?php echo bp_activity_get_permalink( $activity_id ); ?>"
3670
+ class="rtmedia-view-conversation" >
3671
+ <?php _e( 'View Conversation', 'buddypress-media' ); ?>
3672
+ </a>
3673
+ </span>
3674
+ <?php
3675
+ }
3676
+ }
3677
+
3678
+
3679
+
3680
+
3681
+ function rtmedia_get_comments_details_for_media_id( $media_id ){
3682
+ $args = array(
3683
+ 'post_id' => $media_id,
3684
+ );
3685
+ return get_comments( $args );
3686
+ }
3687
+
3688
+
3689
+ /**
3690
+ * Is comment allow in Commented Media.
3691
+ **/
3692
+ function rtmedia_check_comment_in_commented_media_allow() {
3693
+ $value = false;
3694
+ global $rtmedia;
3695
+ /* variable */
3696
+ if( isset( $rtmedia->options ) && isset( $rtmedia->options['rtmedia_disable_media_in_commented_media'] ) && 0 == $rtmedia->options['rtmedia_disable_media_in_commented_media'] ){
3697
+ $value = true;
3698
+ }
3699
+ return $value;
3700
+ }
3701
+
3702
+
3703
+
3704
+
3705
+ /**
3706
+ * Is comment allow in Commented Media.
3707
+ **/
3708
+ function rtmedia_check_comment_media_allow() {
3709
+ $value = false;
3710
+ global $rtmedia;
3711
+ /* variable */
3712
+ if ( ( isset( $rtmedia->options ) && isset( $rtmedia->options['buddypress_enableOnComment'] ) && 1 == $rtmedia->options['buddypress_enableOnComment'] ) || ! isset( $rtmedia->options['buddypress_enableOnComment'] ) ) {
3713
+ $value = true;
3714
+ }
3715
+ return $value;
3716
+ }
3717
+
3718
+
3719
+ /**
3720
+ * Get the Original Content from the $_REQUEST
3721
+ *
3722
+ * @return string
3723
+ */
3724
+ function rtmedia_get_original_comment_media_content() {
3725
+ $old_content = '&nbsp;';
3726
+
3727
+ /* get the original contant from the $REQUEST */
3728
+ if ( isset( $_REQUEST['content'] ) ) {
3729
+ $old_content = $_REQUEST['content'];
3730
+ }
3731
+
3732
+ if ( isset( $_REQUEST['comment_content'] ) ) {
3733
+ $old_content = $_REQUEST['comment_content'];
3734
+ }
3735
+
3736
+
3737
+ /* is comment is empty then add content content space */
3738
+ if ( strstr( $old_content, 'nbsp' ) ) {
3739
+ $old_content = '&nbsp;';
3740
+ }
3741
+
3742
+ return sanitize_text_field( $old_content );
3743
+ }
3744
+
3745
+
3746
+
3747
+ /**
3748
+ * Will alter the rtMedia query and remove the comment media from it
3749
+ *
3750
+ * parameter $where string rtMedia query where conditions
3751
+ * parameter $table_name string rtMedia query table name
3752
+ * parameter $join string
3753
+ *
3754
+ * return string of rtMedia query where conditions
3755
+ */
3756
+ function rtmedia_query_where_filter_remove_comment_media( $where, $table_name, $join ) {
3757
+ $where .= ' AND ' . $table_name . '.context NOT LIKE ( "comment-media" ) ';
3758
+ return $where;
3759
+ }
3760
+
3761
+
3762
+
3763
+
3764
+
3765
+ function rtmedia_bp_activity_entry_comments_callback(){
3766
+ global $activities_template;
3767
+
3768
+ /* comment media activity is created so media is not allow */
3769
+ $allow_media_activity_type = array( 'rtmedia_comment_activity', 'rtmedia_like_activity' );
3770
+ $allow_media_activity_type = apply_filters( 'rtmedia_not_allow_comment_media_in_activity_type' , $allow_media_activity_type );
3771
+
3772
+ /* parent activity id */
3773
+ $activity_id = bp_get_activity_id();
3774
+
3775
+ /* if activity id is not empty and the type is not as $allow_media_activity_type */
3776
+ if( $activity_id && isset( $activities_template->activity ) && isset( $activities_template->activity->type ) && ! in_array( $activities_template->activity->type , $allow_media_activity_type ) ){
3777
+ add_action( 'before_rtmedia_comment_uploader_display', 'rtmedia_before_rtmedia_comment_uploader_display_callback', 10 );
3778
+ echo rtmedia_bp_activity_entry_comments_id_callback( $activity_id, 'activity', $activities_template->activity->component );
3779
+ remove_action( 'before_rtmedia_comment_uploader_display', 'rtmedia_before_rtmedia_comment_uploader_display_callback', 10 );
3780
+ }
3781
+ }
3782
+
3783
+
3784
+ function rtmedia_before_rtmedia_comment_uploader_display_callback( $flag ){
3785
+ return true;
3786
+ }
3787
+
3788
+ function rtmedia_enable_comment_media_uplaod() {
3789
+ global $rtmedia;
3790
+ $comment_media = false;
3791
+
3792
+ if ( isset( $rtmedia->options['buddypress_enableOnComment'] ) ) {
3793
+ if ( 0 !== intval( $rtmedia->options['buddypress_enableOnComment'] ) ) {
3794
+ $comment_media = true;
3795
+ }
3796
+ } elseif ( function_exists( 'rtmedia_add_comments_extra_callback' ) && function_exists( 'rtmedia_bp_activity_entry_comments_callback' ) ) {
3797
+ $comment_media = true;
3798
+ }
3799
+
3800
+ if ( $comment_media ) {
3801
+ /*
3802
+ * Add Comment Media in rtMedia Popup
3803
+ */
3804
+ add_action( 'rtmedia_add_comments_extra', 'rtmedia_add_comments_extra_callback', 10 );
3805
+
3806
+ /*
3807
+ * Add Media Upload in Activity
3808
+ */
3809
+ add_action( 'bp_activity_entry_comments', 'rtmedia_bp_activity_entry_comments_callback', 10 );
3810
+ }
3811
+ }
3812
+
3813
+ function rtmedia_bp_activity_entry_comments_id_callback( $id, $type, $context = "activity" ) {
3814
+ if( class_exists( 'RTMediaComment' ) ){
3815
+ /*add media in comment*/
3816
+ return RTMediaComment::add_uplaod_media_button( $id, $type, $context );
3817
+ }
3818
+ }
3819
+
3820
+ function rtmedia_add_comments_extra_callback() {
3821
+ global $rtmedia_media;
3822
+ $context = 'activity';
3823
+
3824
+ if ( is_array( $rtmedia_media->context ) ) {
3825
+ $context = $rtmedia_media->context;
3826
+ }
3827
+ $rtmedia_id = rtmedia_id();
3828
+ if ( $rtmedia_id ) {
3829
+ echo rtmedia_bp_activity_entry_comments_id_callback( $rtmedia_id, 'rtmedia', $context );
3830
+ }
3831
+ }
app/main/controllers/upload/RTMediaUploadEndpoint.php CHANGED
@@ -64,8 +64,106 @@ class RTMediaUploadEndpoint {
64
  $this->upload['privacy'] = '0';
65
  }
66
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
67
  $this->upload = apply_filters( 'rtmedia_media_param_before_upload', $this->upload );
68
  $rtupload = new RTMediaUpload( $this->upload );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69
  $media_obj = new RTMediaMedia();
70
  $media = $media_obj->model->get( array( 'id' => $rtupload->media_ids[0] ) );
71
  $rtmedia_nav = new RTMediaNav();
64
  $this->upload['privacy'] = '0';
65
  }
66
  }
67
+
68
+ $comment_media = false;
69
+ // if media is add in from the comment media section
70
+ if ( isset( $this->upload['comment_media_activity_id'] ) && ! empty( $this->upload['comment_media_activity_id'] ) ) {
71
+ // if group is public, then set media privacy as 0
72
+ global $rtmedia;
73
+ $privacy = '0';
74
+ if ( isset( $rtmedia->options['privacy_enabled'] ) && isset( $rtmedia->options['privacy_default'] ) ) {
75
+ $privacy = $rtmedia->options['privacy_default'];
76
+ }
77
+
78
+ if ( class_exists( 'RTMediaAlbum' ) ) {
79
+ $album_id = RTMediaAlbum::get_default();
80
+ } else {
81
+ $album = rtmedia_get_site_option( 'rtmedia-global-albums' );
82
+ $album_id = $album_id = $album[0];
83
+ }
84
+
85
+ $current_media_id = preg_replace( '/[^0-9]/', '', $this->upload['comment_media_activity_id'] );
86
+ $current_media_type = preg_replace( '/[^a-z]/', '', $this->upload['comment_media_activity_id'] );
87
+
88
+ if ( $current_media_id ) {
89
+ $comment_media = true;
90
+ $context = 'profile';
91
+ $context_id = get_current_user_id();
92
+
93
+ $media_obj = new RTMediaMedia();
94
+
95
+ if ( 'rtmedia' == $current_media_type ) {
96
+ /* search from media id*/
97
+ $media = $media_obj->model->get( array( 'id' => $current_media_id ) );
98
+ } else {
99
+ /* search from activity id*/
100
+ $media = $media_obj->model->get( array( 'activity_id' => $current_media_id ) );
101
+ }
102
+
103
+ if ( $media[0]->album_id ) {
104
+ $album_id = $media[0]->album_id;
105
+ $privacy = $media[0]->privacy;
106
+ $context = $media[0]->context;
107
+ $context_id = $media[0]->context_id;
108
+ } else {
109
+ /* search from the BuddyPress Table */
110
+ $media = bp_activity_get_specific( array( 'activity_ids' => $current_media_id ) );
111
+
112
+ if ( isset( $media['activities'][0]->component ) ) {
113
+ if ( $media['activities'][0]->component != 'activity' ) {
114
+ $context = $media['activities'][0]->component;
115
+ }
116
+ }
117
+
118
+ if ( isset( $media['activities'][0]->item_id ) ) {
119
+ $context_id = $media['activities'][0]->item_id;
120
+ }
121
+ }
122
+
123
+ $this->upload['album_id'] = $album_id;
124
+ $this->upload['privacy'] = $privacy;
125
+
126
+ if ( 0 == strrpos( $context , 'comment-media' ) ) {
127
+ $this->upload['context'] = 'comment-media';
128
+ }
129
+
130
+ $this->upload['context_id'] = $context_id;
131
+
132
+ }// End if().
133
+
134
+ }// End if().
135
+
136
  $this->upload = apply_filters( 'rtmedia_media_param_before_upload', $this->upload );
137
  $rtupload = new RTMediaUpload( $this->upload );
138
+
139
+ if ( $comment_media ) {
140
+ add_rtmedia_meta( $rtupload->media_ids[0], 'rtmedia_comment_media', true );
141
+
142
+ if ( isset( $media[0]->id ) ) {
143
+ // add in comment media the parent media id
144
+ add_rtmedia_meta( $rtupload->media_ids[0], 'rtmedia_comment_media_id', $media[0]->id );
145
+
146
+ // add in parent media the comment media id
147
+ $get_rtmedia_meta = array();
148
+ $get_rtmedia_meta_old = get_rtmedia_meta( $media[0]->id, 'has_comment_media' );
149
+ if ( is_array( $get_rtmedia_meta_old ) ) {
150
+ foreach ( $get_rtmedia_meta_old as $value ) {
151
+ $get_rtmedia_meta[] = $value;
152
+ }
153
+ }
154
+ $get_rtmedia_meta[] = $rtupload->media_ids[0];
155
+ update_rtmedia_meta( $media[0]->id, 'has_comment_media', $get_rtmedia_meta );
156
+ }
157
+
158
+ if ( ! empty( $current_media_id ) ) {
159
+ add_rtmedia_meta( $rtupload->media_ids[0], 'rtmedia_comment_media_parent', $current_media_id );
160
+ }
161
+
162
+ if ( isset( $current_media_type ) ) {
163
+ add_rtmedia_meta( $rtupload->media_ids[0], 'rtmedia_comment_media_type', $current_media_type );
164
+ }
165
+ }
166
+
167
  $media_obj = new RTMediaMedia();
168
  $media = $media_obj->model->get( array( 'id' => $rtupload->media_ids[0] ) );
169
  $rtmedia_nav = new RTMediaNav();
app/main/controllers/upload/RTMediaUploadView.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  /**
4
  * Description of RTMediaUploadView
5
  *
@@ -115,6 +114,27 @@ class RTMediaUploadView {
115
  }
116
  global $rtmedia;
117
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  $upload_button = '<input type="button" class="start-media-upload" value="' . esc_attr__( 'Start upload', 'buddypress-media' ) . '"/>';
119
  $tabs = array(
120
  'file_upload' => array(
@@ -156,6 +176,27 @@ class RTMediaUploadView {
156
  . '<ul class="plupload_filelist_content ui-sortable rtm-plupload-list clearfix" id="rtmedia_uploader_filelist"></ul>'
157
  . '</div>',
158
  ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
159
  ),
160
  'link_input' => array(
161
  'title' => esc_html__( 'Insert from URL', 'buddypress-media' ),
@@ -171,8 +212,12 @@ class RTMediaUploadView {
171
  }
172
  if ( $attr && is_array( $attr ) ) {
173
  foreach ( $attr as $key => $val ) {
 
 
 
 
174
  ?>
175
- <input type='hidden' id="rt_upload_hf_<?php echo esc_attr( $key ); ?>"
176
  value='<?php echo esc_attr( $val ); ?>'
177
  name='<?php echo esc_attr( $key ); ?>'/>
178
  <?php
@@ -183,6 +228,10 @@ class RTMediaUploadView {
183
  $upload_type = 'activity';
184
  }
185
 
 
 
 
 
186
  $upload_helper = new RTMediaUploadHelper();
187
  include $this->locate_template( $template_name );
188
  }
1
  <?php
 
2
  /**
3
  * Description of RTMediaUploadView
4
  *
114
  }
115
  global $rtmedia;
116
 
117
+ $rtmedia_comment_main = "rtmedia-comment-action-update";
118
+ $rtmedia_comment_container = "rtmedia-comment-media-upload-container";
119
+ $rtmedia_comment_button = "rtmedia-comment-media-upload";
120
+ $rtmedia_comment_filelist = "rtmedia_uploader_filelist";
121
+ $rtmedia_comment_context = "activity";
122
+ if(
123
+ ( isset( $this->attributes['upload_parent_id'] ) && ! empty( $this->attributes['upload_parent_id'] ) )
124
+ &&
125
+ ( isset( $this->attributes['upload_parent_id_type'] ) && ! empty( $this->attributes['upload_parent_id_type'] ) )
126
+ ){
127
+ $main_id = '-'.$this->attributes['upload_parent_id_type'].'-'.$this->attributes['upload_parent_id'];
128
+ $rtmedia_comment_main .= $main_id;
129
+ $rtmedia_comment_container .= $main_id;
130
+ $rtmedia_comment_button .= $main_id;
131
+ $rtmedia_comment_filelist .= $main_id;
132
+ $up_privacy = $privacy = "<input type='hidden' name='privacy' value='" . esc_attr( 0 ) . "' />";
133
+ if( isset( $this->attributes['upload_parent_id_context'] ) ){
134
+ $rtmedia_comment_context = $this->attributes['upload_parent_id_context'];
135
+ }
136
+ }
137
+
138
  $upload_button = '<input type="button" class="start-media-upload" value="' . esc_attr__( 'Start upload', 'buddypress-media' ) . '"/>';
139
  $tabs = array(
140
  'file_upload' => array(
176
  . '<ul class="plupload_filelist_content ui-sortable rtm-plupload-list clearfix" id="rtmedia_uploader_filelist"></ul>'
177
  . '</div>',
178
  ),
179
+ 'comment' => array(
180
+ 'title' => esc_html__( 'File Upload', 'buddypress-media' ),
181
+ 'content' =>
182
+ '<div class="rtmedia-plupload-container rtmedia-comment-media-main rtmedia-container clearfix">'
183
+ . '<div id="'.$rtmedia_comment_main.'" class="clearfix">'
184
+ . '<div class="rtm-upload-button-wrapper">'
185
+ . '<div id="'.$rtmedia_comment_container.'">'
186
+ . '</div>'
187
+ . '<button type="button" class="rtmedia-comment-media-upload" data-media_context="'.$rtmedia_comment_context.'" id="' . $rtmedia_comment_button . '" title="' . apply_filters( 'rtmedia_comment_attach_media_button_title', esc_attr__( 'Attach Media', 'buddypress-media' ) ) . '">'
188
+ . '<span class="dashicons dashicons-admin-media"></span>'
189
+ . apply_filters( 'rtmedia_attach_file_message', '' )
190
+ . '</button>'
191
+ . '</div>'
192
+ . $up_privacy
193
+ . '</div>'
194
+ . '</div>'
195
+ . apply_filters( 'rtmedia_uploader_after_comment_upload_button', '' )
196
+ . '<div class="rtmedia-plupload-notice">'
197
+ . '<ul class="plupload_filelist_content ui-sortable rtm-plupload-list clearfix" id="'. $rtmedia_comment_filelist .'"></ul>'
198
+ . '</div>',
199
+ ),
200
  ),
201
  'link_input' => array(
202
  'title' => esc_html__( 'Insert from URL', 'buddypress-media' ),
212
  }
213
  if ( $attr && is_array( $attr ) ) {
214
  foreach ( $attr as $key => $val ) {
215
+ $selector = "id";
216
+ if( ( $key == 'upload_parent_id' && ! empty( $key ) ) || ( $key == 'upload_parent_id_type' && ! empty( $key ) ) ){
217
+ $selector = "class";
218
+ }
219
  ?>
220
+ <input type='hidden' <?php echo $selector; ?>="rt_upload_hf_<?php echo esc_attr( $key ); ?>"
221
  value='<?php echo esc_attr( $val ); ?>'
222
  name='<?php echo esc_attr( $key ); ?>'/>
223
  <?php
228
  $upload_type = 'activity';
229
  }
230
 
231
+ if ( isset( $attr['comment'] ) && $attr['comment'] ) {
232
+ $upload_type = 'comment';
233
+ }
234
+
235
  $upload_helper = new RTMediaUploadHelper();
236
  include $this->locate_template( $template_name );
237
  }
app/main/interactions/RTMediaInteraction.php CHANGED
@@ -301,7 +301,7 @@ class RTMediaInteraction {
301
 
302
  global $rtmedia_query;
303
 
304
- if ( isset( $rtmedia_query->media ) && count( $rtmedia_query->media ) > 0 ) {
305
  $new_desc = get_post_field( 'post_content', $rtmedia_query->media[0]->media_id );
306
 
307
  if ( '' === $new_desc ) {
301
 
302
  global $rtmedia_query;
303
 
304
+ if ( isset( $rtmedia_query->media ) && is_array( $rtmedia_query->media ) && count( $rtmedia_query->media ) > 0 ) {
305
  $new_desc = get_post_field( 'post_content', $rtmedia_query->media[0]->media_id );
306
 
307
  if ( '' === $new_desc ) {
app/main/routers/query/RTMediaQuery.php CHANGED
@@ -232,6 +232,17 @@ class RTMediaQuery {
232
  $modifier_value = false;
233
  $format = '';
234
  $pageno = 1;
 
 
 
 
 
 
 
 
 
 
 
235
  $attributes = '';
236
 
237
  // The first part of the query /media/{*}/
@@ -502,6 +513,12 @@ class RTMediaQuery {
502
  'RTMediaGalleryShortcode',
503
  'rtmedia_query_where_filter',
504
  ), 10, 3 );
 
 
 
 
 
 
505
  if ( isset( $this->query['context_id'] ) ) {
506
  unset( $this->query['context_id'] );
507
  }
232
  $modifier_value = false;
233
  $format = '';
234
  $pageno = 1;
235
+
236
+ // Get page number for json response
237
+ if ( ! empty( $_REQUEST['json'] ) ) {
238
+ $pageno = ( isset( $_REQUEST['rtmedia_page'] ) && ! empty( $_REQUEST['rtmedia_page'] ) ) ? intval( $_REQUEST['rtmedia_page'] ) : 1;
239
+ }
240
+
241
+ // Get page number for none json response
242
+ if ( ! isset( $_REQUEST['json'] ) && empty( $_REQUEST['json'] ) ) {
243
+ $pageno = ( get_query_var( 'pg' ) ) ? get_query_var( 'pg' ) : 1;
244
+ }
245
+
246
  $attributes = '';
247
 
248
  // The first part of the query /media/{*}/
513
  'RTMediaGalleryShortcode',
514
  'rtmedia_query_where_filter',
515
  ), 10, 3 );
516
+
517
+ $remove_comment_media = apply_filters( 'rtmedia_query_where_filter_remove_comment_media', true, 'galleryshortcode' );
518
+ if ( isset( $remove_comment_media ) && ! empty( $remove_comment_media ) ) {
519
+ add_filter( 'rtmedia-model-where-query', array( 'RTMediaGalleryShortcode', 'rtmedia_query_where_filter_remove_comment_media' ), 11, 3 );
520
+ }
521
+
522
  if ( isset( $this->query['context_id'] ) ) {
523
  unset( $this->query['context_id'] );
524
  }
index.php CHANGED
@@ -1,10 +1,9 @@
1
  <?php
2
-
3
  /*
4
  Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
5
  Plugin URI: https://rtmedia.io/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
6
  Description: This plugin adds missing media rich features like photos, videos and audio uploading to BuddyPress which are essential if you are building social network, seriously!
7
- Version: 4.2.1
8
  Author: rtCamp
9
  Text Domain: buddypress-media
10
  Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
@@ -17,6 +16,15 @@
17
  * @package BuddyPressMedia
18
  * @subpackage Main
19
  */
 
 
 
 
 
 
 
 
 
20
  if ( ! defined( 'RTMEDIA_PATH' ) ) {
21
 
22
  /**
1
  <?php
 
2
  /*
3
  Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
4
  Plugin URI: https://rtmedia.io/?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: 4.3
7
  Author: rtCamp
8
  Text Domain: buddypress-media
9
  Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
16
  * @package BuddyPressMedia
17
  * @subpackage Main
18
  */
19
+
20
+ if ( ! defined( 'RTMEDIA_VERSION' ) ) {
21
+ /**
22
+ * The version of the plugin
23
+ *
24
+ */
25
+ define( 'RTMEDIA_VERSION', '4.3' );
26
+ }
27
+
28
  if ( ! defined( 'RTMEDIA_PATH' ) ) {
29
 
30
  /**
languages/buddypress-media.po CHANGED
@@ -1,14 +1,14 @@
1
- # Copyright (C) 2016 rtCamp
2
  # This file is distributed under the same license as the rtMedia for WordPress, BuddyPress and bbPress package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.2\n"
6
  "Report-Msgid-Bugs-To: http://community.rtcamp.com/c/rtmedia/\n"
7
- "POT-Creation-Date: 2016-12-20 07:07:06+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
- "PO-Revision-Date: 2016-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: rtMedia <rtmedia@rtcamp.com>\n"
13
  "Language-Team: rtMedia <rtmedia@rtcamp.com>\n"
14
  "X-Generator: grunt-wp-i18n 0.5.4\n"
@@ -31,428 +31,432 @@ msgid ""
31
  "thumbnails generation."
32
  msgstr ""
33
 
34
- #: app/admin/RTMediaAdmin.php:193
35
  msgid "View &#8220;%s&#8221;"
36
  msgstr ""
37
 
38
- #: app/admin/RTMediaAdmin.php:193
39
  msgid "View"
40
  msgstr ""
41
 
42
- #: app/admin/RTMediaAdmin.php:259
43
  msgid "Check 30+ premium rtMedia add-ons on our <a href=\"%s\">store</a>."
44
  msgstr ""
45
 
46
- #: app/admin/RTMediaAdmin.php:262
47
  msgid "rtMedia: "
48
  msgstr ""
49
 
50
- #: app/admin/RTMediaAdmin.php:317
51
  msgid "Meet InspireBook"
52
  msgstr ""
53
 
54
- #: app/admin/RTMediaAdmin.php:319
55
  msgid " - First official rtMedia premium theme."
56
  msgstr ""
57
 
58
- #: app/admin/RTMediaAdmin.php:403 app/admin/RTMediaAdmin.php:428
59
  msgid "rtMedia:"
60
  msgstr ""
61
 
62
- #: app/admin/RTMediaAdmin.php:403
63
  msgid " You must"
64
  msgstr ""
65
 
66
- #: app/admin/RTMediaAdmin.php:403
67
  msgid "update permalink structure"
68
  msgstr ""
69
 
70
- #: app/admin/RTMediaAdmin.php:403
71
  msgid "to something other than the default for it to work."
72
  msgstr ""
73
 
74
- #: app/admin/RTMediaAdmin.php:429
75
  msgid "Please update all premium add-ons that you have purchased from"
76
  msgstr ""
77
 
78
- #: app/admin/RTMediaAdmin.php:431
79
  msgid "your account"
80
  msgstr ""
81
 
82
- #: app/admin/RTMediaAdmin.php:433
83
  msgid "Dismiss"
84
  msgstr ""
85
 
86
- #: app/admin/RTMediaAdmin.php:548
87
  msgid "rtMedia Pro is released"
88
  msgstr ""
89
 
90
- #: app/admin/RTMediaAdmin.php:569
91
  msgid "Media Stats"
92
  msgstr ""
93
 
94
- #: app/admin/RTMediaAdmin.php:599
95
  msgid "Usage Stats"
96
  msgstr ""
97
 
98
- #: app/admin/RTMediaAdmin.php:611
99
  msgid "Total "
100
  msgstr ""
101
 
102
- #: app/admin/RTMediaAdmin.php:622
103
  msgid "With Media"
104
  msgstr ""
105
 
106
- #: app/admin/RTMediaAdmin.php:633
107
  msgid "Comments "
108
  msgstr ""
109
 
110
- #: app/admin/RTMediaAdmin.php:644 app/main/controllers/media/RTMediaLike.php:21
111
  msgid "Likes"
112
  msgstr ""
113
 
114
- #: app/admin/RTMediaAdmin.php:654
115
  msgid "rtMedia Links:"
116
  msgstr ""
117
 
118
- #: app/admin/RTMediaAdmin.php:655
119
  msgid "Homepage"
120
  msgstr ""
121
 
122
- #: app/admin/RTMediaAdmin.php:657
123
  msgid "Free Support"
124
  msgstr ""
125
 
126
- #: app/admin/RTMediaAdmin.php:660
127
  msgid "Premium Addons"
128
  msgstr ""
129
 
130
- #: app/admin/RTMediaAdmin.php:677
131
  msgid "Right Now in rtMedia"
132
  msgstr ""
133
 
134
- #: app/admin/RTMediaAdmin.php:712 app/admin/RTMediaAdmin.php:746
135
- #: app/admin/RTMediaAdmin.php:749 app/admin/RTMediaAdmin.php:925
136
- #: app/admin/RTMediaAdmin.php:1272
137
  msgid "Settings"
138
  msgstr ""
139
 
140
- #: app/admin/RTMediaAdmin.php:714 app/admin/RTMediaAdmin.php:770
141
- #: app/admin/RTMediaAdmin.php:773 app/admin/RTMediaAdmin.php:935
142
- #: app/admin/RTMediaAdmin.php:1298 app/helper/RTMediaSettings.php:234
143
  #: app/helper/RTMediaSupport.php:67 app/helper/RTMediaSupport.php:68
144
  msgid "Support"
145
  msgstr ""
146
 
147
- #: app/admin/RTMediaAdmin.php:739 app/admin/RTMediaAdmin.php:1244
148
- #: app/admin/RTMediaAdmin.php:1245 app/importers/RTMediaActivityUpgrade.php:116
149
- #: app/importers/RTMediaMigration.php:68 app/main/RTMedia.php:939
150
  msgid "rtMedia"
151
  msgstr ""
152
 
153
- #: app/admin/RTMediaAdmin.php:758 app/admin/RTMediaAdmin.php:761
154
- #: app/admin/RTMediaAdmin.php:930 app/admin/RTMediaAdmin.php:1277
155
  msgid "Addons"
156
  msgstr ""
157
 
158
- #: app/admin/RTMediaAdmin.php:782 app/admin/RTMediaAdmin.php:785
159
- #: app/admin/RTMediaAdmin.php:941 app/admin/RTMediaAdmin.php:1285
160
  msgid "Themes"
161
  msgstr ""
162
 
163
- #: app/admin/RTMediaAdmin.php:795 app/admin/RTMediaAdmin.php:798
164
- #: app/admin/RTMediaAdmin.php:948 app/admin/RTMediaAdmin.php:1291
165
  msgid "Hire Us"
166
  msgstr ""
167
 
168
- #: app/admin/RTMediaAdmin.php:808 app/admin/RTMediaAdmin.php:811
169
- #: app/admin/RTMediaAdmin.php:955 app/admin/RTMediaAdmin.php:1305
170
  msgid "Licenses"
171
  msgstr ""
172
 
173
- #: app/admin/RTMediaAdmin.php:862
174
  msgid "ON"
175
  msgstr ""
176
 
177
- #: app/admin/RTMediaAdmin.php:863
178
  msgid "OFF"
179
  msgstr ""
180
 
181
- #: app/admin/RTMediaAdmin.php:870
182
  msgid "Please do not refresh this page."
183
  msgstr ""
184
 
185
- #: app/admin/RTMediaAdmin.php:871
186
  msgid "Something went wrong. Please "
187
  msgstr ""
188
 
189
- #: app/admin/RTMediaAdmin.php:871
190
  msgid "refresh"
191
  msgstr ""
192
 
193
- #: app/admin/RTMediaAdmin.php:871
194
  msgid " page."
195
  msgstr ""
196
 
197
- #: app/admin/RTMediaAdmin.php:872
198
  msgid "This will subscribe you to the free plan."
199
  msgstr ""
200
 
201
- #: app/admin/RTMediaAdmin.php:873
202
  msgid "Are you sure you want to disable the encoding service?"
203
  msgstr ""
204
 
205
- #: app/admin/RTMediaAdmin.php:874
206
  msgid "Are you sure you want to enable the encoding service?"
207
  msgstr ""
208
 
209
- #: app/admin/RTMediaAdmin.php:875
210
  msgid "Settings have changed, you should save them!"
211
  msgstr ""
212
 
213
- #: app/admin/RTMediaAdmin.php:876
214
  msgid ""
215
  "Number of video thumbnails to be generated should be greater than 0 in "
216
  "media sizes settings. Setting it to default value 2."
217
  msgstr ""
218
 
219
- #: app/admin/RTMediaAdmin.php:877
220
  msgid ""
221
  "Invalid value for number of video thumbnails in media sizes settings. "
222
  "Setting it to round value"
223
  msgstr ""
224
 
225
- #: app/admin/RTMediaAdmin.php:878
226
  msgid ""
227
  "Number of percentage in JPEG image quality should be greater than 0 in "
228
  "media sizes settings. Setting it to default value 90."
229
  msgstr ""
230
 
231
- #: app/admin/RTMediaAdmin.php:879
232
  msgid ""
233
  "Number of percentage in JPEG image quality should be less than 100 in media "
234
  "sizes settings. Setting it to 100."
235
  msgstr ""
236
 
237
- #: app/admin/RTMediaAdmin.php:880
238
  msgid ""
239
  "Invalid value for percentage in JPEG image quality in media sizes settings. "
240
  "Setting it to round value"
241
  msgstr ""
242
 
243
- #: app/admin/RTMediaAdmin.php:881
244
  msgid ""
245
  "Please enter positive integer value only. Setting number of media per page "
246
  "value to default value 10."
247
  msgstr ""
248
 
249
- #: app/admin/RTMediaAdmin.php:882
250
  msgid ""
251
  "Please enter positive integer value only. Setting number of media per page "
252
  "value to round value"
253
  msgstr ""
254
 
255
- #: app/admin/RTMediaAdmin.php:883
256
  msgid "Request failed."
257
  msgstr ""
258
 
259
- #: app/admin/RTMediaAdmin.php:891
 
 
 
 
260
  msgid "Please enter WP Admin Login."
261
  msgstr ""
262
 
263
- #: app/admin/RTMediaAdmin.php:892
264
  msgid "Please enter WP Admin password."
265
  msgstr ""
266
 
267
- #: app/admin/RTMediaAdmin.php:893
268
  msgid "Please enter SSH / FTP host."
269
  msgstr ""
270
 
271
- #: app/admin/RTMediaAdmin.php:894
272
  msgid "Please enter SSH / FTP login."
273
  msgstr ""
274
 
275
- #: app/admin/RTMediaAdmin.php:895
276
  msgid "Please enter SSH / FTP password."
277
  msgstr ""
278
 
279
- #: app/admin/RTMediaAdmin.php:896
280
  msgid "Please fill all the fields."
281
  msgstr ""
282
 
283
- #: app/admin/RTMediaAdmin.php:1126
284
  msgid "Empowering The Web With WordPress"
285
  msgstr ""
286
 
287
- #: app/admin/RTMediaAdmin.php:1147
288
  msgid "Settings saved successfully!"
289
  msgstr ""
290
 
291
- #: app/admin/RTMediaAdmin.php:1153 app/admin/RTMediaAdmin.php:1182
292
  msgid "Save Settings"
293
  msgstr ""
294
 
295
- #: app/admin/RTMediaAdmin.php:1379 app/admin/RTMediaAdmin.php:1380
296
  msgid "Display"
297
  msgstr ""
298
 
299
- #: app/admin/RTMediaAdmin.php:1388
300
  msgid "rtMedia BuddyPress"
301
  msgstr ""
302
 
303
- #: app/admin/RTMediaAdmin.php:1389
304
  msgid "BuddyPress"
305
  msgstr ""
306
 
307
- #: app/admin/RTMediaAdmin.php:1397
308
  msgid "rtMedia Types"
309
  msgstr ""
310
 
311
- #: app/admin/RTMediaAdmin.php:1398
312
  msgid "Types"
313
  msgstr ""
314
 
315
- #: app/admin/RTMediaAdmin.php:1405
316
  msgid "rtMedia Sizes"
317
  msgstr ""
318
 
319
- #: app/admin/RTMediaAdmin.php:1406
320
  msgid "Media Sizes"
321
  msgstr ""
322
 
323
- #: app/admin/RTMediaAdmin.php:1413
324
  msgid "rtMedia Privacy"
325
  msgstr ""
326
 
327
- #: app/admin/RTMediaAdmin.php:1414
328
- #: app/main/controllers/privacy/RTMediaPrivacy.php:417
329
  msgid "Privacy"
330
  msgstr ""
331
 
332
- #: app/admin/RTMediaAdmin.php:1420
333
  msgid "rtMedia Custom CSS"
334
  msgstr ""
335
 
336
- #: app/admin/RTMediaAdmin.php:1421
337
  msgid "Custom CSS"
338
  msgstr ""
339
 
340
- #: app/admin/RTMediaAdmin.php:1430 app/admin/RTMediaAdmin.php:1431
341
  msgid "Other Settings"
342
  msgstr ""
343
 
344
- #: app/admin/RTMediaAdmin.php:1478
345
  msgid "I use @rtMediaWP http://rt.cx/rtmedia on %s"
346
  msgstr ""
347
 
348
- #: app/admin/RTMediaAdmin.php:1480
349
  msgid "Post to Twitter Now"
350
  msgstr ""
351
 
352
- #: app/admin/RTMediaAdmin.php:1480
353
  msgid "Post to Twitter"
354
  msgstr ""
355
 
356
- #: app/admin/RTMediaAdmin.php:1481
357
  msgid "Share on Facebook Now"
358
  msgstr ""
359
 
360
- #: app/admin/RTMediaAdmin.php:1481
361
  msgid "Share on Facebook"
362
  msgstr ""
363
 
364
- #: app/admin/RTMediaAdmin.php:1482
365
  msgid "Rate rtMedia on Wordpress.org"
366
  msgstr ""
367
 
368
- #: app/admin/RTMediaAdmin.php:1482
369
  msgid "Rate on Wordpress.org"
370
  msgstr ""
371
 
372
- #: app/admin/RTMediaAdmin.php:1483
373
  msgid "Subscribe to our Feeds"
374
  msgstr ""
375
 
376
- #: app/admin/RTMediaAdmin.php:1486
377
  msgid "Spread the Word"
378
  msgstr ""
379
 
380
- #: app/admin/RTMediaAdmin.php:1492 app/admin/RTMediaAdmin.php:1499
381
  msgid "Subscribe"
382
  msgstr ""
383
 
384
- #: app/admin/RTMediaAdmin.php:1530
385
  msgid "Thank you for your time."
386
  msgstr ""
387
 
388
- #: app/admin/RTMediaAdmin.php:1543
389
  msgid "Premium Add-ons"
390
  msgstr ""
391
 
392
- #: app/admin/RTMediaAdmin.php:1561
393
  msgid ""
394
  "You have images enabled on rtMedia but your network allowed filetypes do "
395
  "not permit uploading of %s. Click "
396
  msgstr ""
397
 
398
- #: app/admin/RTMediaAdmin.php:1562 app/admin/RTMediaAdmin.php:1580
399
- #: app/admin/RTMediaAdmin.php:1598 app/admin/RTMediaFormHandler.php:435
400
- #: app/admin/RTMediaFormHandler.php:446 app/helper/RTMediaSettings.php:310
401
- #: app/helper/RTMediaSupport.php:416 app/helper/RTMediaSupport.php:697
402
  msgid "here"
403
  msgstr ""
404
 
405
- #: app/admin/RTMediaAdmin.php:1563 app/admin/RTMediaAdmin.php:1581
406
- #: app/admin/RTMediaAdmin.php:1599
407
  msgid " to change your settings manually."
408
  msgstr ""
409
 
410
- #: app/admin/RTMediaAdmin.php:1565 app/admin/RTMediaAdmin.php:1583
411
- #: app/admin/RTMediaAdmin.php:1601
412
  msgid "Recommended:"
413
  msgstr ""
414
 
415
- #: app/admin/RTMediaAdmin.php:1566 app/admin/RTMediaAdmin.php:1584
416
- #: app/admin/RTMediaAdmin.php:1602
417
  msgid "Update Network Settings Automatically"
418
  msgstr ""
419
 
420
- #: app/admin/RTMediaAdmin.php:1579
421
  msgid ""
422
  "You have video enabled on BuddyPress Media but your network allowed "
423
  "filetypes do not permit uploading of mp4. Click "
424
  msgstr ""
425
 
426
- #: app/admin/RTMediaAdmin.php:1597
427
  msgid ""
428
  "You have audio enabled on BuddyPress Media but your network allowed "
429
  "filetypes do not permit uploading of mp3. Click "
430
  msgstr ""
431
 
432
- #: app/admin/RTMediaAdmin.php:1618
433
  msgid "Network settings updated successfully."
434
  msgstr ""
435
 
436
- #: app/admin/RTMediaAdmin.php:1671
437
  msgid ""
438
  "Please update rtMedia template files if you have overridden the default "
439
  "rtMedia templates in your theme. If not, you can ignore and hide this "
440
  "notice."
441
  msgstr ""
442
 
443
- #: app/admin/RTMediaAdmin.php:1671
444
  #: app/importers/RTMediaMediaSizeImporter.php:73
445
  #: app/importers/RTMediaMigration.php:68
446
  msgid "Hide"
447
  msgstr ""
448
 
449
- #: app/admin/RTMediaAdmin.php:1811
450
  msgid ""
451
  "Your license keys can be found on <a href=\"%s\">my-account</a> page. For "
452
  "more details, please refer to <a href=\"%s\">License documentation</a> page."
453
  msgstr ""
454
 
455
- #: app/admin/RTMediaAdmin.php:1828
456
  msgid ""
457
  "We found an invalid or expired license key for an rtMedia add-on. Please go "
458
  "to the <a href=\"%s\">Licenses page</a> to fix this issue."
@@ -467,8 +471,8 @@ msgstr ""
467
  msgid "Need to specify atleast two radios, else use a checkbox instead"
468
  msgstr ""
469
 
470
- #: app/admin/RTMediaFormHandler.php:278 templates/media/album-gallery.php:60
471
- #: templates/media/media-gallery.php:68
472
  msgid "Load More"
473
  msgstr ""
474
 
@@ -487,309 +491,333 @@ msgid ""
487
  msgstr ""
488
 
489
  #: app/admin/RTMediaFormHandler.php:301
490
- msgid "Use lightbox to display media"
491
  msgstr ""
492
 
493
  #: app/admin/RTMediaFormHandler.php:306
494
- msgid "View single media in facebook style lightbox."
495
  msgstr ""
496
 
497
  #: app/admin/RTMediaFormHandler.php:311
 
 
 
 
 
 
 
 
498
  msgid "Number of media per page"
499
  msgstr ""
500
 
501
- #: app/admin/RTMediaFormHandler.php:317
502
  msgid "Number of media items you want to show per page on front end."
503
  msgstr ""
504
 
505
- #: app/admin/RTMediaFormHandler.php:323
506
  msgid "Media display pagination option"
507
  msgstr ""
508
 
509
- #: app/admin/RTMediaFormHandler.php:329
510
  msgid "Choose whether you want the load more button or pagination buttons."
511
  msgstr ""
512
 
513
- #: app/admin/RTMediaFormHandler.php:335
514
  msgid "Enable"
515
  msgstr ""
516
 
517
- #: app/admin/RTMediaFormHandler.php:335
518
  msgid "Cascading grid layout"
519
  msgstr ""
520
 
521
- #: app/admin/RTMediaFormHandler.php:340
522
  msgid "If you enable masonry view, it is advisable to"
523
  msgstr ""
524
 
525
- #: app/admin/RTMediaFormHandler.php:340
526
  msgid "for masonry view."
527
  msgstr ""
528
 
529
- #: app/admin/RTMediaFormHandler.php:344
530
  msgid "You might need to"
531
  msgstr ""
532
 
533
- #: app/admin/RTMediaFormHandler.php:344
534
  msgid "change thumbnail size"
535
  msgstr ""
536
 
537
- #: app/admin/RTMediaFormHandler.php:344
538
  msgid "and uncheck the crop box for thumbnails."
539
  msgstr ""
540
 
541
- #: app/admin/RTMediaFormHandler.php:344
542
  msgid ""
543
  "To set gallery for fixed width, set image height to 0 and width as per your "
544
  "requirement and vice-versa."
545
  msgstr ""
546
 
547
- #: app/admin/RTMediaFormHandler.php:347
548
  msgid "Enable Direct Upload"
549
  msgstr ""
550
 
551
- #: app/admin/RTMediaFormHandler.php:352
552
  msgid "Uploading media directly as soon as it gets selected."
553
  msgstr ""
554
 
555
- #: app/admin/RTMediaFormHandler.php:376
556
  msgid "Single Media View"
557
  msgstr ""
558
 
559
- #: app/admin/RTMediaFormHandler.php:377
 
 
 
 
560
  msgid "List Media View"
561
  msgstr ""
562
 
563
- #: app/admin/RTMediaFormHandler.php:378
564
  msgid "Masonry View"
565
  msgstr ""
566
 
567
- #: app/admin/RTMediaFormHandler.php:379
568
  msgid "Direct Upload"
569
  msgstr ""
570
 
571
- #: app/admin/RTMediaFormHandler.php:397
572
  msgid "Allow usage data tracking"
573
  msgstr ""
574
 
575
- #: app/admin/RTMediaFormHandler.php:402
576
  msgid ""
577
  "To make rtMedia better compatible with your sites, you can help the rtMedia "
578
  "team learn what themes and plugins you are using. No private information "
579
  "about your setup will be sent during tracking."
580
  msgstr ""
581
 
582
- #: app/admin/RTMediaFormHandler.php:406
583
  msgid "Admin bar menu integration"
584
  msgstr ""
585
 
586
- #: app/admin/RTMediaFormHandler.php:411
587
  msgid ""
588
  "Add rtMedia menu to WordPress admin bar for easy access to settings and "
589
  "moderation page (if enabled)."
590
  msgstr ""
591
 
592
- #: app/admin/RTMediaFormHandler.php:416
593
  msgid "Add a link to rtMedia in footer"
594
  msgstr ""
595
 
596
- #: app/admin/RTMediaFormHandler.php:421
597
  msgid "Help us promote rtMedia."
598
  msgstr ""
599
 
600
- #: app/admin/RTMediaFormHandler.php:426
601
  msgid "Also add my affiliate-id to rtMedia footer link"
602
  msgstr ""
603
 
604
- #: app/admin/RTMediaFormHandler.php:431
605
  msgid ""
606
  "Add your affiliate-id along with footer link and get rewarded by our "
607
  "affiliation program."
608
  msgstr ""
609
 
610
- #: app/admin/RTMediaFormHandler.php:435
611
  msgid "Signup for"
612
  msgstr ""
613
 
614
- #: app/admin/RTMediaFormHandler.php:435
615
  msgid "affiliate program"
616
  msgstr ""
617
 
618
- #: app/admin/RTMediaFormHandler.php:438
619
  msgid "Enable JSON API"
620
  msgstr ""
621
 
622
- #: app/admin/RTMediaFormHandler.php:443
623
  msgid ""
624
  "This will allow handling API requests for rtMedia sent through any mobile "
625
  "app."
626
  msgstr ""
627
 
628
- #: app/admin/RTMediaFormHandler.php:446
629
  msgid "You can refer to the API document from"
630
  msgstr ""
631
 
632
- #: app/admin/RTMediaFormHandler.php:466
633
  msgid "Admin Settings"
634
  msgstr ""
635
 
636
- #: app/admin/RTMediaFormHandler.php:467
637
  msgid "API Settings"
638
  msgstr ""
639
 
640
- #: app/admin/RTMediaFormHandler.php:468
641
  msgid "Miscellaneous"
642
  msgstr ""
643
 
644
- #: app/admin/RTMediaFormHandler.php:469
645
  msgid "Footer Link"
646
  msgstr ""
647
 
648
- #: app/admin/RTMediaFormHandler.php:549
649
  msgid "Media Types Settings"
650
  msgstr ""
651
 
652
- #: app/admin/RTMediaFormHandler.php:557 app/helper/RTMediaSettings.php:332
653
  msgid "Media Type"
654
  msgstr ""
655
 
656
- #: app/admin/RTMediaFormHandler.php:562
657
  msgid "Allow Upload"
658
  msgstr ""
659
 
660
- #: app/admin/RTMediaFormHandler.php:564
661
  msgid "Allows you to upload a particular media type on your post."
662
  msgstr ""
663
 
664
- #: app/admin/RTMediaFormHandler.php:572
665
  msgid "Set Featured"
666
  msgstr ""
667
 
668
- #: app/admin/RTMediaFormHandler.php:574
669
  msgid "Place a specific media as a featured content on the post."
670
  msgstr ""
671
 
672
- #: app/admin/RTMediaFormHandler.php:622
673
  msgid "File Extensions"
674
  msgstr ""
675
 
676
- #: app/admin/RTMediaFormHandler.php:753
677
  msgid "Media Size Settings"
678
  msgstr ""
679
 
680
- #: app/admin/RTMediaFormHandler.php:758
681
  msgid "Category"
682
  msgstr ""
683
 
684
- #: app/admin/RTMediaFormHandler.php:759
685
  msgid "Entity"
686
  msgstr ""
687
 
688
- #: app/admin/RTMediaFormHandler.php:760
689
  msgid "Width"
690
  msgstr ""
691
 
692
- #: app/admin/RTMediaFormHandler.php:761
693
  msgid "Height"
694
  msgstr ""
695
 
696
- #: app/admin/RTMediaFormHandler.php:762
697
  msgid "Crop"
698
  msgstr ""
699
 
700
- #: app/admin/RTMediaFormHandler.php:812
701
  msgid "JPEG/JPG image quality (1-100)"
702
  msgstr ""
703
 
704
- #: app/admin/RTMediaFormHandler.php:818
705
  msgid "Enter JPEG/JPG Image Quality. Minimum value is 1. 100 is original quality."
706
  msgstr ""
707
 
708
- #: app/admin/RTMediaFormHandler.php:826
709
  msgid "Image Quality"
710
  msgstr ""
711
 
712
- #: app/admin/RTMediaFormHandler.php:848
713
  msgid "Custom CSS settings"
714
  msgstr ""
715
 
716
- #: app/admin/RTMediaFormHandler.php:865
717
  msgid "rtMedia default styles"
718
  msgstr ""
719
 
720
- #: app/admin/RTMediaFormHandler.php:871
721
  msgid ""
722
  "Load default rtMedia styles. You need to write your own style for rtMedia "
723
  "if you disable it."
724
  msgstr ""
725
 
726
- #: app/admin/RTMediaFormHandler.php:876
727
  msgid "Paste your CSS code"
728
  msgstr ""
729
 
730
- #: app/admin/RTMediaFormHandler.php:882
731
  msgid "Custom rtMedia CSS container"
732
  msgstr ""
733
 
734
- #: app/admin/RTMediaFormHandler.php:905
735
  msgid "Enable privacy"
736
  msgstr ""
737
 
738
- #: app/admin/RTMediaFormHandler.php:911
739
  msgid "Enable privacy in rtMedia"
740
  msgstr ""
741
 
742
- #: app/admin/RTMediaFormHandler.php:916
743
  msgid "Default privacy"
744
  msgstr ""
745
 
746
- #: app/admin/RTMediaFormHandler.php:922
747
  msgid "Set default privacy for media"
748
  msgstr ""
749
 
750
- #: app/admin/RTMediaFormHandler.php:928
751
  msgid "Allow users to set privacy for their content"
752
  msgstr ""
753
 
754
- #: app/admin/RTMediaFormHandler.php:933
755
  msgid ""
756
  "If you choose this, users will be able to change privacy of their own "
757
  "uploads."
758
  msgstr ""
759
 
760
- #: app/admin/RTMediaFormHandler.php:937
761
  msgid "For group uploads, BuddyPress groups privacy is used."
762
  msgstr ""
763
 
764
- #: app/admin/RTMediaFormHandler.php:979
765
  msgid "Enable media in profile"
766
  msgstr ""
767
 
768
- #: app/admin/RTMediaFormHandler.php:984
769
  msgid "Enable Media on BuddyPress Profile"
770
  msgstr ""
771
 
772
- #: app/admin/RTMediaFormHandler.php:989
773
  msgid "Enable media in group"
774
  msgstr ""
775
 
776
- #: app/admin/RTMediaFormHandler.php:994
777
  msgid "Enable Media on BuddyPress Groups"
778
  msgstr ""
779
 
780
- #: app/admin/RTMediaFormHandler.php:999
781
  msgid "Allow upload from activity stream"
782
  msgstr ""
783
 
784
- #: app/admin/RTMediaFormHandler.php:1004
785
  msgid "Allow upload using status update box present on activity stream page"
786
  msgstr ""
787
 
788
- #: app/admin/RTMediaFormHandler.php:1010
 
 
 
 
 
 
 
 
 
 
 
 
789
  msgid "Number of media items to show in activity stream"
790
  msgstr ""
791
 
792
- #: app/admin/RTMediaFormHandler.php:1015
793
  msgid ""
794
  "With bulk uploads activity, the stream may get flooded. You can control the "
795
  "maximum number of media items or files per activity. This limit will not "
@@ -797,37 +825,37 @@ msgid ""
797
  "unlimited."
798
  msgstr ""
799
 
800
- #: app/admin/RTMediaFormHandler.php:1022
801
  msgid "Enable media notification"
802
  msgstr ""
803
 
804
- #: app/admin/RTMediaFormHandler.php:1027
805
  msgid ""
806
  "This will enable notifications to media authors for media likes and "
807
  "comments."
808
  msgstr ""
809
 
810
- #: app/admin/RTMediaFormHandler.php:1033
811
  msgid "Create activity for media likes"
812
  msgstr ""
813
 
814
- #: app/admin/RTMediaFormHandler.php:1038
815
  msgid "Enabling this setting will create BuddyPress activity for media likes."
816
  msgstr ""
817
 
818
- #: app/admin/RTMediaFormHandler.php:1044
819
  msgid "Create activity for media comments"
820
  msgstr ""
821
 
822
- #: app/admin/RTMediaFormHandler.php:1049
823
  msgid "Enabling this setting will create BuddyPress activity for media comments."
824
  msgstr ""
825
 
826
- #: app/admin/RTMediaFormHandler.php:1055
827
  msgid "Organize media into albums"
828
  msgstr ""
829
 
830
- #: app/admin/RTMediaFormHandler.php:1061
831
  msgid ""
832
  "This will add 'album' tab to BuddyPress profile and group depending on the "
833
  "^above^ settings."
@@ -1056,10 +1084,6 @@ msgid ""
1056
  "upload on site."
1057
  msgstr ""
1058
 
1059
- #: app/helper/RTMediaAddon.php:348
1060
- msgid "Media Likes"
1061
- msgstr ""
1062
-
1063
  #: app/helper/RTMediaAddon.php:351
1064
  msgid ""
1065
  "This add-on let you know who liked the media. User can also see which media "
@@ -1354,73 +1378,73 @@ msgstr ""
1354
  msgid "other friends liked your"
1355
  msgstr ""
1356
 
1357
- #: app/helper/RTMediaSettings.php:229
1358
  msgid "BuddyPress Media Addons for Photos"
1359
  msgstr ""
1360
 
1361
- #: app/helper/RTMediaSettings.php:239
1362
  msgid "rtMedia Themes"
1363
  msgstr ""
1364
 
1365
- #: app/helper/RTMediaSettings.php:309
1366
  msgid ""
1367
  "Currently your network allows uploading of the following file types. You "
1368
  "can change the settings %s"
1369
  msgstr ""
1370
 
1371
- #: app/helper/RTMediaSettings.php:330 app/helper/RTMediaSettings.php:332
1372
  msgid "Atleast one Media Type Must be selected"
1373
  msgstr ""
1374
 
1375
- #: app/helper/RTMediaSettings.php:341 app/helper/RTMediaSettings.php:343
1376
  msgid "\"Number of media\" count value should be numeric and greater than 0."
1377
  msgstr ""
1378
 
1379
- #: app/helper/RTMediaSettings.php:343
1380
  msgid "Default Count"
1381
  msgstr ""
1382
 
1383
- #: app/helper/RTMediaSettings.php:348
1384
  msgid "Settings saved."
1385
  msgstr ""
1386
 
1387
- #: app/helper/RTMediaSettings.php:372
1388
  msgid "If you make changes to width, height or crop settings, you must use "
1389
  msgstr ""
1390
 
1391
- #: app/helper/RTMediaSettings.php:373
1392
  msgid "Regenerate Thumbnail Plugin"
1393
  msgstr ""
1394
 
1395
- #: app/helper/RTMediaSettings.php:374
1396
  msgid " to regenerate old images."
1397
  msgstr ""
1398
 
1399
- #: app/helper/RTMediaSettings.php:397
1400
  msgid "BuddyPress Media 2.6 requires a database upgrade. "
1401
  msgstr ""
1402
 
1403
- #: app/helper/RTMediaSettings.php:398
1404
  msgid "Update Database"
1405
  msgstr ""
1406
 
1407
- #: app/helper/RTMediaSettings.php:412
1408
  msgid ""
1409
  "If your site has some issues due to rtMedia and you want one on one support "
1410
  "then you can create a support topic on the "
1411
  msgstr ""
1412
 
1413
- #: app/helper/RTMediaSettings.php:413
1414
  msgid "rtMedia Support Forum"
1415
  msgstr ""
1416
 
1417
- #: app/helper/RTMediaSettings.php:415
1418
  msgid ""
1419
  "If you have any suggestions, enhancements or bug reports, then you can open "
1420
  "a new issue on "
1421
  msgstr ""
1422
 
1423
- #: app/helper/RTMediaSettings.php:416 app/helper/RTMediaSupport.php:467
1424
  msgid "GitHub"
1425
  msgstr ""
1426
 
@@ -1568,27 +1592,27 @@ msgstr ""
1568
  msgid "rtMedia Contact from"
1569
  msgstr ""
1570
 
1571
- #: app/helper/RTMediaSupport.php:684
1572
  msgid "Thank you for your Feedback/Suggestion."
1573
  msgstr ""
1574
 
1575
- #: app/helper/RTMediaSupport.php:686
1576
  msgid "Thank you for posting your support request."
1577
  msgstr ""
1578
 
1579
- #: app/helper/RTMediaSupport.php:687
1580
  msgid "We will get back to you shortly."
1581
  msgstr ""
1582
 
1583
- #: app/helper/RTMediaSupport.php:692
1584
  msgid "Your server failed to send an email."
1585
  msgstr ""
1586
 
1587
- #: app/helper/RTMediaSupport.php:693
1588
  msgid "Kindly contact your server support to fix this."
1589
  msgstr ""
1590
 
1591
- #: app/helper/RTMediaSupport.php:696
1592
  msgid "You can alternatively create a support request %s"
1593
  msgstr ""
1594
 
@@ -1795,15 +1819,15 @@ msgstr ""
1795
  msgid "The method expects an array in arguments for %s provided."
1796
  msgstr ""
1797
 
1798
- #: app/helper/rtUploadAttachment.php:35
1799
  msgid "You can not upload more than 2 MB."
1800
  msgstr ""
1801
 
1802
- #: app/helper/rtUploadAttachment.php:41
1803
  msgid "There was an error uploading your files"
1804
  msgstr ""
1805
 
1806
- #: app/helper/rtUploadAttachment.php:44
1807
  msgid "Form was submitted"
1808
  msgstr ""
1809
 
@@ -1853,7 +1877,7 @@ msgstr ""
1853
  msgid "Users"
1854
  msgstr ""
1855
 
1856
- #: app/importers/BPMediaAlbumimporter.php:89 app/main/RTMedia.php:628
1857
  msgid "Media"
1858
  msgstr ""
1859
 
@@ -2065,297 +2089,302 @@ msgstr ""
2065
  msgid "No time remaining."
2066
  msgstr ""
2067
 
2068
- #: app/main/RTMedia.php:359
2069
  msgid "Photo"
2070
  msgstr ""
2071
 
2072
- #: app/main/RTMedia.php:360
2073
  msgid "Photos"
2074
  msgstr ""
2075
 
2076
- #: app/main/RTMedia.php:368
2077
  msgid "Video"
2078
  msgstr ""
2079
 
2080
- #: app/main/RTMedia.php:369
2081
  msgid "Videos"
2082
  msgstr ""
2083
 
2084
- #: app/main/RTMedia.php:377 app/main/RTMedia.php:378
2085
  msgid "Music"
2086
  msgstr ""
2087
 
2088
- #: app/main/RTMedia.php:469
2089
  msgid "Private - Visible only to the user"
2090
  msgstr ""
2091
 
2092
- #: app/main/RTMedia.php:470
2093
  msgid "Friends - Visible to user's friends"
2094
  msgstr ""
2095
 
2096
- #: app/main/RTMedia.php:471
2097
  msgid "Logged in Users - Visible to registered users"
2098
  msgstr ""
2099
 
2100
- #: app/main/RTMedia.php:472
2101
  msgid "Public - Visible to the world"
2102
  msgstr ""
2103
 
2104
- #: app/main/RTMedia.php:636 app/main/controllers/template/RTMediaNav.php:213
2105
- #: app/main/controllers/template/rtmedia-functions.php:114
2106
  msgid "All"
2107
  msgstr ""
2108
 
2109
- #: app/main/RTMedia.php:648 app/main/controllers/media/RTMediaAlbum.php:54
2110
- #: app/main/controllers/template/rtmedia-actions.php:117
2111
- #: app/main/controllers/upload/RTMediaUploadView.php:52
2112
- #: app/main/controllers/upload/RTMediaUploadView.php:55
2113
  msgid "Album"
2114
  msgstr ""
2115
 
2116
- #: app/main/RTMedia.php:652 app/main/RTMedia.php:1051
2117
  #: app/main/controllers/media/RTMediaAlbum.php:53
2118
  #: app/main/controllers/media/RTMediaAlbum.php:65
2119
  msgid "Albums"
2120
  msgstr ""
2121
 
2122
- #: app/main/RTMedia.php:662 app/main/controllers/media/RTMediaLoginPopup.php:38
2123
- #: app/main/controllers/template/rtmedia-actions.php:307
2124
- #: app/main/controllers/template/rtmedia-actions.php:310
2125
- #: app/main/controllers/template/rtmedia-actions.php:314
2126
  msgid "Upload"
2127
  msgstr ""
2128
 
2129
- #: app/main/RTMedia.php:667
2130
  msgid "Wall Post"
2131
  msgstr ""
2132
 
2133
- #: app/main/RTMedia.php:886 app/main/RTMedia.php:895
2134
  msgid "Wall Posts"
2135
  msgstr ""
2136
 
2137
- #: app/main/RTMedia.php:939
2138
  msgid ": Can't Create Database table. Please check create table permission."
2139
  msgstr ""
2140
 
2141
- #: app/main/RTMedia.php:994
2142
  msgid "Loading media"
2143
  msgstr ""
2144
 
2145
- #: app/main/RTMedia.php:995
2146
  msgid "Please enter some content to post."
2147
  msgstr ""
2148
 
2149
- #: app/main/RTMedia.php:996
2150
  msgid "Empty Comment is not allowed."
2151
  msgstr ""
2152
 
2153
- #: app/main/RTMedia.php:997
2154
  msgid "Are you sure you want to delete this media?"
2155
  msgstr ""
2156
 
2157
- #: app/main/RTMedia.php:998
2158
  msgid "Are you sure you want to delete this comment?"
2159
  msgstr ""
2160
 
2161
- #: app/main/RTMedia.php:999
2162
  msgid "Are you sure you want to delete this Album?"
2163
  msgstr ""
2164
 
2165
- #: app/main/RTMedia.php:1000
2166
  msgid "Drop files here"
2167
  msgstr ""
2168
 
2169
- #: app/main/RTMedia.php:1001
2170
  msgid "album created successfully."
2171
  msgstr ""
2172
 
2173
- #: app/main/RTMedia.php:1002
2174
  msgid "Something went wrong. Please try again."
2175
  msgstr ""
2176
 
2177
- #: app/main/RTMedia.php:1003
2178
  msgid "Enter an album name."
2179
  msgstr ""
2180
 
2181
- #: app/main/RTMedia.php:1004
2182
  msgid "Max file Size Limit : "
2183
  msgstr ""
2184
 
2185
- #: app/main/RTMedia.php:1005
2186
  msgid "Allowed File Formats"
2187
  msgstr ""
2188
 
2189
- #: app/main/RTMedia.php:1006 templates/media/album-single-edit.php:73
2190
  msgid "Select All Visible"
2191
  msgstr ""
2192
 
2193
- #: app/main/RTMedia.php:1007
2194
  msgid "Unselect All Visible"
2195
  msgstr ""
2196
 
2197
- #: app/main/RTMedia.php:1008
2198
  msgid "Please select some media."
2199
  msgstr ""
2200
 
2201
- #: app/main/RTMedia.php:1009
2202
  msgid "Are you sure you want to delete the selected media?"
2203
  msgstr ""
2204
 
2205
- #: app/main/RTMedia.php:1010
2206
  msgid "Are you sure you want to move the selected media?"
2207
  msgstr ""
2208
 
2209
- #: app/main/RTMedia.php:1011
2210
  msgid "Waiting"
2211
  msgstr ""
2212
 
2213
- #: app/main/RTMedia.php:1012
2214
  msgid "Uploaded"
2215
  msgstr ""
2216
 
2217
- #: app/main/RTMedia.php:1013
2218
  msgid "Uploading"
2219
  msgstr ""
2220
 
2221
- #: app/main/RTMedia.php:1014
2222
  msgid "Failed"
2223
  msgstr ""
2224
 
2225
- #: app/main/RTMedia.php:1015
2226
  msgid "Close"
2227
  msgstr ""
2228
 
2229
- #: app/main/RTMedia.php:1016
2230
  #: app/main/controllers/media/RTMediaGalleryItemAction.php:63
2231
  #: app/main/controllers/media/RTMediaGalleryItemAction.php:80
2232
- #: app/main/controllers/template/rtmedia-functions.php:1115
2233
- #: app/main/controllers/template/rtmedia-functions.php:1134
2234
  msgid "Edit"
2235
  msgstr ""
2236
 
2237
- #: app/main/RTMedia.php:1017
2238
  #: app/main/controllers/media/RTMediaGalleryItemAction.php:67
2239
  #: app/main/controllers/media/RTMediaGalleryItemAction.php:80
2240
- #: app/main/controllers/template/rtmedia-functions.php:1915
2241
- #: app/main/controllers/template/rtmedia-functions.php:1924
2242
  #: templates/media/album-single-edit.php:78
2243
  msgid "Delete"
2244
  msgstr ""
2245
 
2246
- #: app/main/RTMedia.php:1018 templates/media/media-single-edit.php:8
2247
  msgid "Edit Media"
2248
  msgstr ""
2249
 
2250
- #: app/main/RTMedia.php:1019
2251
  msgid "Remove from queue"
2252
  msgstr ""
2253
 
2254
- #: app/main/RTMedia.php:1020
2255
  msgid "Add more files"
2256
  msgstr ""
2257
 
2258
- #: app/main/RTMedia.php:1021
2259
  msgid "File not supported"
2260
  msgstr ""
2261
 
2262
- #: app/main/RTMedia.php:1022
2263
  msgid "more"
2264
  msgstr ""
2265
 
2266
- #: app/main/RTMedia.php:1023
2267
  msgid "less"
2268
  msgstr ""
2269
 
2270
- #: app/main/RTMedia.php:1024
2271
  msgid "Read more"
2272
  msgstr ""
2273
 
2274
- #: app/main/RTMedia.php:1025
2275
  msgid "Show less"
2276
  msgstr ""
2277
 
2278
- #: app/main/RTMedia.php:1027
2279
  msgid "This media is uploaded. Are you sure you want to delete this media?"
2280
  msgstr ""
2281
 
2282
- #: app/main/RTMedia.php:1035
2283
  msgid "Featured media set successfully."
2284
  msgstr ""
2285
 
2286
- #: app/main/RTMedia.php:1036
2287
  msgid "Featured media removed successfully."
2288
  msgstr ""
2289
 
2290
- #: app/main/RTMedia.php:1038
2291
  msgid "Title:"
2292
  msgstr ""
2293
 
2294
- #: app/main/RTMedia.php:1039
2295
  msgid "Description:"
2296
  msgstr ""
2297
 
2298
- #: app/main/RTMedia.php:1044
2299
  msgid "Edit File Name"
2300
  msgstr ""
2301
 
2302
- #: app/main/RTMedia.php:1052
2303
  msgid "Privacy updated successfully."
2304
  msgstr ""
2305
 
2306
- #: app/main/RTMedia.php:1053
2307
  msgid "Couldn't change privacy, please try again."
2308
  msgstr ""
2309
 
2310
- #: app/main/RTMedia.php:1054
2311
  msgid "file deleted successfully."
2312
  msgstr ""
2313
 
2314
- #: app/main/RTMedia.php:1086
2315
  msgid "There are some uploads in progress. Do you want to cancel them?"
2316
  msgstr ""
2317
 
2318
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:284
 
 
 
 
2319
  msgid "Media Files"
2320
  msgstr ""
2321
 
2322
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:323
 
2323
  #: app/main/controllers/shortcodes/RTMediaUploadShortcode.php:100
2324
- #: app/main/controllers/template/rtmedia-functions.php:1954
2325
  msgid "You are not allowed to upload/attach media."
2326
  msgstr ""
2327
 
2328
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:461
2329
  msgid "%s added a %s"
2330
  msgstr ""
2331
 
2332
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:468
2333
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:470
2334
- #: app/main/controllers/upload/RTMediaUploadEndpoint.php:122
2335
  msgid "%s added %d %s"
2336
  msgstr ""
2337
 
2338
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:523
2339
  msgid "%1$s liked a %2$s in the group %3$s"
2340
  msgstr ""
2341
 
2342
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:526
2343
  msgid "%1$s liked their %2$s"
2344
  msgstr ""
2345
 
2346
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:530
2347
  msgid "%1$s liked %2$s's %3$s"
2348
  msgstr ""
2349
 
2350
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:612
2351
  msgid "%1$s commented on a %2$s in the group %3$s"
2352
  msgstr ""
2353
 
2354
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:615
2355
  msgid "%1$s commented on their %2$s"
2356
  msgstr ""
2357
 
2358
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:619
2359
  msgid "%1$s commented on %2$s's %3$s"
2360
  msgstr ""
2361
 
@@ -2601,7 +2630,7 @@ msgid "Group Admin only"
2601
  msgstr ""
2602
 
2603
  #: app/main/controllers/group/RTMediaGroupExtension.php:130
2604
- #: app/main/controllers/privacy/RTMediaPrivacy.php:409
2605
  #: templates/media/album-single-edit.php:55
2606
  msgid "Save Changes"
2607
  msgstr ""
@@ -2631,7 +2660,7 @@ msgid "Create"
2631
  msgstr ""
2632
 
2633
  #: app/main/controllers/media/RTMediaAlbum.php:56
2634
- #: app/main/controllers/template/rtmedia-actions.php:196
2635
  msgid "Create Album"
2636
  msgstr ""
2637
 
@@ -2672,6 +2701,11 @@ msgstr ""
2672
  msgid "Untitled Album"
2673
  msgstr ""
2674
 
 
 
 
 
 
2675
  #: app/main/controllers/media/RTMediaFeatured.php:25
2676
  #: app/main/controllers/media/RTMediaGroupFeatured.php:17
2677
  msgid "Set as Featured"
@@ -2714,8 +2748,8 @@ msgid "Unlike"
2714
  msgstr ""
2715
 
2716
  #: app/main/controllers/media/RTMediaLoginPopup.php:38
2717
- #: app/main/controllers/template/rtmedia-actions.php:310
2718
- #: app/main/controllers/template/rtmedia-actions.php:314
2719
  msgid "Upload Media"
2720
  msgstr ""
2721
 
@@ -2739,38 +2773,34 @@ msgstr ""
2739
  msgid " to login."
2740
  msgstr ""
2741
 
2742
- #: app/main/controllers/media/RTMediaMedia.php:535
2743
  msgid "Error creating attachment for the media file, please try again"
2744
  msgstr ""
2745
 
2746
- #: app/main/controllers/media/RTMediaMedia.php:650
2747
  msgid "%1$s added a %2$s"
2748
  msgstr ""
2749
 
2750
- #: app/main/controllers/media/RTMediaMedia.php:650
2751
  msgid "%1$s added %4$d %3$s"
2752
  msgstr ""
2753
 
2754
- #: app/main/controllers/privacy/RTMediaPrivacy.php:371
2755
  msgid "No changes were made to your account."
2756
  msgstr ""
2757
 
2758
- #: app/main/controllers/privacy/RTMediaPrivacy.php:374
2759
  msgid "Your default privacy settings saved successfully."
2760
  msgstr ""
2761
 
2762
- #: app/main/controllers/privacy/RTMediaPrivacy.php:398
2763
  msgid "Default Privacy"
2764
  msgstr ""
2765
 
2766
- #: app/main/controllers/shortcodes/RTMediaGalleryShortcode.php:216
2767
  msgid "You do not have sufficient privileges to view this gallery"
2768
  msgstr ""
2769
 
2770
- #: app/main/controllers/shortcodes/RTMediaUploadShortcode.php:88
2771
- msgid "The web browser on your device cannot be used to upload files."
2772
- msgstr ""
2773
-
2774
  #: app/main/controllers/template/RTMediaAJAX.php:35
2775
  msgid "You can not create album in this group."
2776
  msgstr ""
@@ -2787,120 +2817,125 @@ msgstr ""
2787
  msgid "Data mismatch, Please insert data properly."
2788
  msgstr ""
2789
 
2790
- #: app/main/controllers/template/RTMediaTemplate.php:109
2791
- #: app/main/controllers/template/RTMediaTemplate.php:160
2792
  msgid "Invalid attribute passed for rtmedia_gallery shortcode."
2793
  msgstr ""
2794
 
2795
- #: app/main/controllers/template/RTMediaTemplate.php:352
2796
- #: app/main/controllers/template/RTMediaTemplate.php:445
2797
- #: app/main/controllers/template/RTMediaTemplate.php:543
2798
- #: app/main/controllers/template/RTMediaTemplate.php:683
2799
  msgid "Ooops !!! Invalid access. No nonce was found !!"
2800
  msgstr ""
2801
 
2802
- #: app/main/controllers/template/RTMediaTemplate.php:359
2803
  msgid "Media updated Sucessfully"
2804
  msgstr ""
2805
 
2806
- #: app/main/controllers/template/RTMediaTemplate.php:365
2807
  msgid "Error in updating Media"
2808
  msgstr ""
2809
 
2810
- #: app/main/controllers/template/rtmedia-actions.php:15
2811
- #: app/main/controllers/template/rtmedia-actions.php:147
2812
  msgid "Options"
2813
  msgstr ""
2814
 
2815
- #: app/main/controllers/template/rtmedia-actions.php:50
2816
  msgid "Image"
2817
  msgstr ""
2818
 
2819
- #: app/main/controllers/template/rtmedia-actions.php:76
2820
  msgid "Modify Image"
2821
  msgstr ""
2822
 
2823
- #: app/main/controllers/template/rtmedia-actions.php:186
2824
  msgid "Create an Album"
2825
  msgstr ""
2826
 
2827
- #: app/main/controllers/template/rtmedia-actions.php:188
2828
  msgid "Album Title : "
2829
  msgstr ""
2830
 
2831
- #: app/main/controllers/template/rtmedia-actions.php:236
2832
- #: app/main/controllers/template/rtmedia-actions.php:243
2833
  #: app/main/controllers/template/rtmedia-filters.php:92
2834
  msgid "Merge Album"
2835
  msgstr ""
2836
 
2837
- #: app/main/controllers/template/rtmedia-actions.php:239
2838
  msgid "Select Album to merge with : "
2839
  msgstr ""
2840
 
2841
- #: app/main/controllers/template/rtmedia-actions.php:289
2842
  msgid "Merge"
2843
  msgstr ""
2844
 
2845
- #: app/main/controllers/template/rtmedia-actions.php:358
2846
  msgid "Empowering your community with "
2847
  msgstr ""
2848
 
2849
- #: app/main/controllers/template/rtmedia-actions.php:359
2850
  msgid "The only complete media solution for WordPress, BuddyPress and bbPress"
2851
  msgstr ""
2852
 
2853
- #: app/main/controllers/template/rtmedia-actions.php:378
2854
  msgid "Close (Esc)"
2855
  msgstr ""
2856
 
2857
- #: app/main/controllers/template/rtmedia-actions.php:523
2858
  msgid "You can consider rtMedia Team for following :"
2859
  msgstr ""
2860
 
2861
- #: app/main/controllers/template/rtmedia-actions.php:525
2862
  msgid "rtMedia Customization ( in Upgrade Safe manner )"
2863
  msgstr ""
2864
 
2865
- #: app/main/controllers/template/rtmedia-actions.php:526
2866
  msgid "WordPress/BuddyPress Theme Design and Development"
2867
  msgstr ""
2868
 
2869
- #: app/main/controllers/template/rtmedia-actions.php:527
2870
  msgid "WordPress/BuddyPress Plugin Development"
2871
  msgstr ""
2872
 
2873
- #: app/main/controllers/template/rtmedia-actions.php:530
2874
  msgid "Contact Us"
2875
  msgstr ""
2876
 
2877
- #: app/main/controllers/template/rtmedia-actions.php:617
2878
- #: app/main/controllers/template/rtmedia-actions.php:618
2879
  msgid "Previous"
2880
  msgstr ""
2881
 
2882
- #: app/main/controllers/template/rtmedia-actions.php:619
2883
- #: app/main/controllers/template/rtmedia-actions.php:620
2884
  #: templates/media/album-single-edit.php:121
2885
  msgid "Next"
2886
  msgstr ""
2887
 
2888
- #: app/main/controllers/template/rtmedia-actions.php:816
2889
  msgid "Settings has been saved successfully."
2890
  msgstr ""
2891
 
2892
- #: app/main/controllers/template/rtmedia-actions.php:820
2893
  msgid "Refresh the page in case if license data is not showing correct."
2894
  msgstr ""
2895
 
2896
- #: app/main/controllers/template/rtmedia-actions.php:838
2897
  msgid "Posted a status update"
2898
  msgstr ""
2899
 
2900
- #: app/main/controllers/template/rtmedia-actions.php:840
2901
  msgid "rtMedia Updates"
2902
  msgstr ""
2903
 
 
 
 
 
 
2904
  #: app/main/controllers/template/rtmedia-filters.php:50
2905
  msgid "Create New Album"
2906
  msgstr ""
@@ -2913,136 +2948,138 @@ msgstr ""
2913
  msgid "Delete Album"
2914
  msgstr ""
2915
 
2916
- #: app/main/controllers/template/rtmedia-functions.php:1191
2917
  msgid "There are no comments on this media yet."
2918
  msgstr ""
2919
 
2920
- #: app/main/controllers/template/rtmedia-functions.php:1267
2921
  msgid "Delete Comment"
2922
  msgstr ""
2923
 
2924
- #: app/main/controllers/template/rtmedia-functions.php:1538
2925
  msgid "Go to page no : "
2926
  msgstr ""
2927
 
2928
- #: app/main/controllers/template/rtmedia-functions.php:1543
2929
  msgid "Go"
2930
  msgstr ""
2931
 
2932
- #: app/main/controllers/template/rtmedia-functions.php:1856
2933
  msgid "Type Comment..."
2934
  msgstr ""
2935
 
2936
- #: app/main/controllers/template/rtmedia-functions.php:1857
2937
- #: templates/media/media-single.php:103 templates/media/media-single.php:147
2938
- msgid "Comment"
2939
- msgstr ""
2940
-
2941
- #: app/main/controllers/template/rtmedia-functions.php:1915
2942
- #: app/main/controllers/template/rtmedia-functions.php:1924
2943
  msgid "Delete Media"
2944
  msgstr ""
2945
 
2946
- #: app/main/controllers/template/rtmedia-functions.php:2170
2947
  msgid "Profile Albums"
2948
  msgstr ""
2949
 
2950
- #: app/main/controllers/template/rtmedia-functions.php:2174
2951
- #: app/main/controllers/template/rtmedia-functions.php:2219
2952
  msgid "Group Albums"
2953
  msgstr ""
2954
 
2955
- #: app/main/controllers/template/rtmedia-functions.php:2390
2956
  msgid "Privacy : "
2957
  msgstr ""
2958
 
2959
- #: app/main/controllers/template/rtmedia-functions.php:2740
2960
  msgid "You like this"
2961
  msgstr ""
2962
 
2963
- #: app/main/controllers/template/rtmedia-functions.php:2750
2964
  msgid "You and "
2965
  msgstr ""
2966
 
2967
- #: app/main/controllers/template/rtmedia-functions.php:2769
2968
  msgid " person likes this"
2969
  msgid_plural " people like this"
2970
  msgstr[0] ""
2971
  msgstr[1] ""
2972
 
2973
- #: app/main/controllers/template/rtmedia-functions.php:2874
2974
  msgid "Public"
2975
  msgstr ""
2976
 
2977
- #: app/main/controllers/template/rtmedia-functions.php:2879
2978
  msgid "All members"
2979
  msgstr ""
2980
 
2981
- #: app/main/controllers/template/rtmedia-functions.php:2884
2982
  msgid "Your friends"
2983
  msgstr ""
2984
 
2985
- #: app/main/controllers/template/rtmedia-functions.php:2889
2986
  msgid "Only you"
2987
  msgstr ""
2988
 
2989
- #: app/main/controllers/template/rtmedia-functions.php:2894
2990
  msgid "Blocked temporarily"
2991
  msgstr ""
2992
 
2993
- #: app/main/controllers/template/rtmedia-functions.php:2947
2994
  msgid "%s ago "
2995
  msgstr ""
2996
 
2997
- #: app/main/controllers/template/rtmedia-functions.php:2961
2998
  msgid "1 second"
2999
  msgid_plural "%s seconds"
3000
  msgstr[0] ""
3001
  msgstr[1] ""
3002
 
3003
- #: app/main/controllers/template/rtmedia-functions.php:2965
3004
  msgid "1 minute"
3005
  msgid_plural "%s minutes"
3006
  msgstr[0] ""
3007
  msgstr[1] ""
3008
 
3009
- #: app/main/controllers/template/rtmedia-functions.php:2969
3010
  msgid "1 hour"
3011
  msgid_plural "%s hours"
3012
  msgstr[0] ""
3013
  msgstr[1] ""
3014
 
3015
- #: app/main/controllers/upload/RTMediaUploadView.php:79
 
 
 
 
 
3016
  msgid "Privacy: "
3017
  msgstr ""
3018
 
3019
- #: app/main/controllers/upload/RTMediaUploadView.php:86
3020
- #: app/main/controllers/upload/RTMediaUploadView.php:122
3021
- #: app/main/controllers/upload/RTMediaUploadView.php:139
 
3022
  msgid "File Upload"
3023
  msgstr ""
3024
 
3025
- #: app/main/controllers/upload/RTMediaUploadView.php:90
3026
  msgid "Select your files"
3027
  msgstr ""
3028
 
3029
- #: app/main/controllers/upload/RTMediaUploadView.php:91
3030
  msgid "or"
3031
  msgstr ""
3032
 
3033
- #: app/main/controllers/upload/RTMediaUploadView.php:91
3034
  msgid "Drop your files here"
3035
  msgstr ""
3036
 
3037
- #: app/main/controllers/upload/RTMediaUploadView.php:118
3038
  msgid "Start upload"
3039
  msgstr ""
3040
 
3041
- #: app/main/controllers/upload/RTMediaUploadView.php:146
 
3042
  msgid "Attach Media"
3043
  msgstr ""
3044
 
3045
- #: app/main/controllers/upload/RTMediaUploadView.php:161
3046
  msgid "Insert from URL"
3047
  msgstr ""
3048
 
@@ -3090,7 +3127,7 @@ msgstr ""
3090
  msgid "Deprecated %s. Please use %s."
3091
  msgstr ""
3092
 
3093
- #: templates/media/album-gallery.php:14
3094
  msgid "Album List"
3095
  msgstr ""
3096
 
@@ -3149,7 +3186,7 @@ msgstr ""
3149
  msgid "Sorry !! You can not edit this album."
3150
  msgstr ""
3151
 
3152
- #: templates/media/media-gallery.php:9 templates/media/media-gallery.php:25
3153
  msgid "Media Gallery"
3154
  msgstr ""
3155
 
@@ -3161,7 +3198,7 @@ msgstr ""
3161
  msgid "Sorry !! You do not have rights to edit this media"
3162
  msgstr ""
3163
 
3164
- #: templates/media/media-single.php:48
3165
  msgid "under"
3166
  msgstr ""
3167
 
@@ -3193,7 +3230,7 @@ msgctxt "Status General Name"
3193
  msgid "hidden"
3194
  msgstr ""
3195
 
3196
- #: app/main/controllers/template/RTMediaNav.php:32
3197
  msgctxt "My Account Privacy sub nav"
3198
  msgid "Privacy"
3199
  msgstr ""
1
+ # Copyright (C) 2017 rtCamp
2
  # This file is distributed under the same license as the rtMedia for WordPress, BuddyPress and bbPress package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: rtMedia for WordPress, BuddyPress and bbPress 4.3\n"
6
  "Report-Msgid-Bugs-To: http://community.rtcamp.com/c/rtmedia/\n"
7
+ "POT-Creation-Date: 2017-02-14 08:13:37+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
11
+ "PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
12
  "Last-Translator: rtMedia <rtmedia@rtcamp.com>\n"
13
  "Language-Team: rtMedia <rtmedia@rtcamp.com>\n"
14
  "X-Generator: grunt-wp-i18n 0.5.4\n"
31
  "thumbnails generation."
32
  msgstr ""
33
 
34
+ #: app/admin/RTMediaAdmin.php:206
35
  msgid "View &#8220;%s&#8221;"
36
  msgstr ""
37
 
38
+ #: app/admin/RTMediaAdmin.php:206
39
  msgid "View"
40
  msgstr ""
41
 
42
+ #: app/admin/RTMediaAdmin.php:272
43
  msgid "Check 30+ premium rtMedia add-ons on our <a href=\"%s\">store</a>."
44
  msgstr ""
45
 
46
+ #: app/admin/RTMediaAdmin.php:275
47
  msgid "rtMedia: "
48
  msgstr ""
49
 
50
+ #: app/admin/RTMediaAdmin.php:330
51
  msgid "Meet InspireBook"
52
  msgstr ""
53
 
54
+ #: app/admin/RTMediaAdmin.php:332
55
  msgid " - First official rtMedia premium theme."
56
  msgstr ""
57
 
58
+ #: app/admin/RTMediaAdmin.php:416 app/admin/RTMediaAdmin.php:441
59
  msgid "rtMedia:"
60
  msgstr ""
61
 
62
+ #: app/admin/RTMediaAdmin.php:416
63
  msgid " You must"
64
  msgstr ""
65
 
66
+ #: app/admin/RTMediaAdmin.php:416
67
  msgid "update permalink structure"
68
  msgstr ""
69
 
70
+ #: app/admin/RTMediaAdmin.php:416
71
  msgid "to something other than the default for it to work."
72
  msgstr ""
73
 
74
+ #: app/admin/RTMediaAdmin.php:442
75
  msgid "Please update all premium add-ons that you have purchased from"
76
  msgstr ""
77
 
78
+ #: app/admin/RTMediaAdmin.php:444
79
  msgid "your account"
80
  msgstr ""
81
 
82
+ #: app/admin/RTMediaAdmin.php:446
83
  msgid "Dismiss"
84
  msgstr ""
85
 
86
+ #: app/admin/RTMediaAdmin.php:561
87
  msgid "rtMedia Pro is released"
88
  msgstr ""
89
 
90
+ #: app/admin/RTMediaAdmin.php:582
91
  msgid "Media Stats"
92
  msgstr ""
93
 
94
+ #: app/admin/RTMediaAdmin.php:612
95
  msgid "Usage Stats"
96
  msgstr ""
97
 
98
+ #: app/admin/RTMediaAdmin.php:624
99
  msgid "Total "
100
  msgstr ""
101
 
102
+ #: app/admin/RTMediaAdmin.php:635
103
  msgid "With Media"
104
  msgstr ""
105
 
106
+ #: app/admin/RTMediaAdmin.php:646
107
  msgid "Comments "
108
  msgstr ""
109
 
110
+ #: app/admin/RTMediaAdmin.php:657 app/main/controllers/media/RTMediaLike.php:21
111
  msgid "Likes"
112
  msgstr ""
113
 
114
+ #: app/admin/RTMediaAdmin.php:667
115
  msgid "rtMedia Links:"
116
  msgstr ""
117
 
118
+ #: app/admin/RTMediaAdmin.php:668
119
  msgid "Homepage"
120
  msgstr ""
121
 
122
+ #: app/admin/RTMediaAdmin.php:670
123
  msgid "Free Support"
124
  msgstr ""
125
 
126
+ #: app/admin/RTMediaAdmin.php:673
127
  msgid "Premium Addons"
128
  msgstr ""
129
 
130
+ #: app/admin/RTMediaAdmin.php:690
131
  msgid "Right Now in rtMedia"
132
  msgstr ""
133
 
134
+ #: app/admin/RTMediaAdmin.php:725 app/admin/RTMediaAdmin.php:759
135
+ #: app/admin/RTMediaAdmin.php:762 app/admin/RTMediaAdmin.php:939
136
+ #: app/admin/RTMediaAdmin.php:1286
137
  msgid "Settings"
138
  msgstr ""
139
 
140
+ #: app/admin/RTMediaAdmin.php:727 app/admin/RTMediaAdmin.php:783
141
+ #: app/admin/RTMediaAdmin.php:786 app/admin/RTMediaAdmin.php:949
142
+ #: app/admin/RTMediaAdmin.php:1312 app/helper/RTMediaSettings.php:246
143
  #: app/helper/RTMediaSupport.php:67 app/helper/RTMediaSupport.php:68
144
  msgid "Support"
145
  msgstr ""
146
 
147
+ #: app/admin/RTMediaAdmin.php:752 app/admin/RTMediaAdmin.php:1258
148
+ #: app/admin/RTMediaAdmin.php:1259 app/importers/RTMediaActivityUpgrade.php:116
149
+ #: app/importers/RTMediaMigration.php:68 app/main/RTMedia.php:954
150
  msgid "rtMedia"
151
  msgstr ""
152
 
153
+ #: app/admin/RTMediaAdmin.php:771 app/admin/RTMediaAdmin.php:774
154
+ #: app/admin/RTMediaAdmin.php:944 app/admin/RTMediaAdmin.php:1291
155
  msgid "Addons"
156
  msgstr ""
157
 
158
+ #: app/admin/RTMediaAdmin.php:795 app/admin/RTMediaAdmin.php:798
159
+ #: app/admin/RTMediaAdmin.php:955 app/admin/RTMediaAdmin.php:1299
160
  msgid "Themes"
161
  msgstr ""
162
 
163
+ #: app/admin/RTMediaAdmin.php:808 app/admin/RTMediaAdmin.php:811
164
+ #: app/admin/RTMediaAdmin.php:962 app/admin/RTMediaAdmin.php:1305
165
  msgid "Hire Us"
166
  msgstr ""
167
 
168
+ #: app/admin/RTMediaAdmin.php:821 app/admin/RTMediaAdmin.php:824
169
+ #: app/admin/RTMediaAdmin.php:969 app/admin/RTMediaAdmin.php:1319
170
  msgid "Licenses"
171
  msgstr ""
172
 
173
+ #: app/admin/RTMediaAdmin.php:875
174
  msgid "ON"
175
  msgstr ""
176
 
177
+ #: app/admin/RTMediaAdmin.php:876
178
  msgid "OFF"
179
  msgstr ""
180
 
181
+ #: app/admin/RTMediaAdmin.php:883
182
  msgid "Please do not refresh this page."
183
  msgstr ""
184
 
185
+ #: app/admin/RTMediaAdmin.php:884
186
  msgid "Something went wrong. Please "
187
  msgstr ""
188
 
189
+ #: app/admin/RTMediaAdmin.php:884
190
  msgid "refresh"
191
  msgstr ""
192
 
193
+ #: app/admin/RTMediaAdmin.php:884
194
  msgid " page."
195
  msgstr ""
196
 
197
+ #: app/admin/RTMediaAdmin.php:885
198
  msgid "This will subscribe you to the free plan."
199
  msgstr ""
200
 
201
+ #: app/admin/RTMediaAdmin.php:886
202
  msgid "Are you sure you want to disable the encoding service?"
203
  msgstr ""
204
 
205
+ #: app/admin/RTMediaAdmin.php:887
206
  msgid "Are you sure you want to enable the encoding service?"
207
  msgstr ""
208
 
209
+ #: app/admin/RTMediaAdmin.php:888
210
  msgid "Settings have changed, you should save them!"
211
  msgstr ""
212
 
213
+ #: app/admin/RTMediaAdmin.php:889
214
  msgid ""
215
  "Number of video thumbnails to be generated should be greater than 0 in "
216
  "media sizes settings. Setting it to default value 2."
217
  msgstr ""
218
 
219
+ #: app/admin/RTMediaAdmin.php:890
220
  msgid ""
221
  "Invalid value for number of video thumbnails in media sizes settings. "
222
  "Setting it to round value"
223
  msgstr ""
224
 
225
+ #: app/admin/RTMediaAdmin.php:891
226
  msgid ""
227
  "Number of percentage in JPEG image quality should be greater than 0 in "
228
  "media sizes settings. Setting it to default value 90."
229
  msgstr ""
230
 
231
+ #: app/admin/RTMediaAdmin.php:892
232
  msgid ""
233
  "Number of percentage in JPEG image quality should be less than 100 in media "
234
  "sizes settings. Setting it to 100."
235
  msgstr ""
236
 
237
+ #: app/admin/RTMediaAdmin.php:893
238
  msgid ""
239
  "Invalid value for percentage in JPEG image quality in media sizes settings. "
240
  "Setting it to round value"
241
  msgstr ""
242
 
243
+ #: app/admin/RTMediaAdmin.php:894
244
  msgid ""
245
  "Please enter positive integer value only. Setting number of media per page "
246
  "value to default value 10."
247
  msgstr ""
248
 
249
+ #: app/admin/RTMediaAdmin.php:895
250
  msgid ""
251
  "Please enter positive integer value only. Setting number of media per page "
252
  "value to round value"
253
  msgstr ""
254
 
255
+ #: app/admin/RTMediaAdmin.php:896
256
  msgid "Request failed."
257
  msgstr ""
258
 
259
+ #: app/admin/RTMediaAdmin.php:897
260
+ msgid "You can not use @import statement in custom css"
261
+ msgstr ""
262
+
263
+ #: app/admin/RTMediaAdmin.php:905
264
  msgid "Please enter WP Admin Login."
265
  msgstr ""
266
 
267
+ #: app/admin/RTMediaAdmin.php:906
268
  msgid "Please enter WP Admin password."
269
  msgstr ""
270
 
271
+ #: app/admin/RTMediaAdmin.php:907
272
  msgid "Please enter SSH / FTP host."
273
  msgstr ""
274
 
275
+ #: app/admin/RTMediaAdmin.php:908
276
  msgid "Please enter SSH / FTP login."
277
  msgstr ""
278
 
279
+ #: app/admin/RTMediaAdmin.php:909
280
  msgid "Please enter SSH / FTP password."
281
  msgstr ""
282
 
283
+ #: app/admin/RTMediaAdmin.php:910
284
  msgid "Please fill all the fields."
285
  msgstr ""
286
 
287
+ #: app/admin/RTMediaAdmin.php:1140
288
  msgid "Empowering The Web With WordPress"
289
  msgstr ""
290
 
291
+ #: app/admin/RTMediaAdmin.php:1161
292
  msgid "Settings saved successfully!"
293
  msgstr ""
294
 
295
+ #: app/admin/RTMediaAdmin.php:1167 app/admin/RTMediaAdmin.php:1196
296
  msgid "Save Settings"
297
  msgstr ""
298
 
299
+ #: app/admin/RTMediaAdmin.php:1393 app/admin/RTMediaAdmin.php:1394
300
  msgid "Display"
301
  msgstr ""
302
 
303
+ #: app/admin/RTMediaAdmin.php:1402
304
  msgid "rtMedia BuddyPress"
305
  msgstr ""
306
 
307
+ #: app/admin/RTMediaAdmin.php:1403
308
  msgid "BuddyPress"
309
  msgstr ""
310
 
311
+ #: app/admin/RTMediaAdmin.php:1411
312
  msgid "rtMedia Types"
313
  msgstr ""
314
 
315
+ #: app/admin/RTMediaAdmin.php:1412
316
  msgid "Types"
317
  msgstr ""
318
 
319
+ #: app/admin/RTMediaAdmin.php:1419
320
  msgid "rtMedia Sizes"
321
  msgstr ""
322
 
323
+ #: app/admin/RTMediaAdmin.php:1420
324
  msgid "Media Sizes"
325
  msgstr ""
326
 
327
+ #: app/admin/RTMediaAdmin.php:1427
328
  msgid "rtMedia Privacy"
329
  msgstr ""
330
 
331
+ #: app/admin/RTMediaAdmin.php:1428
332
+ #: app/main/controllers/privacy/RTMediaPrivacy.php:426
333
  msgid "Privacy"
334
  msgstr ""
335
 
336
+ #: app/admin/RTMediaAdmin.php:1434
337
  msgid "rtMedia Custom CSS"
338
  msgstr ""
339
 
340
+ #: app/admin/RTMediaAdmin.php:1435
341
  msgid "Custom CSS"
342
  msgstr ""
343
 
344
+ #: app/admin/RTMediaAdmin.php:1444 app/admin/RTMediaAdmin.php:1445
345
  msgid "Other Settings"
346
  msgstr ""
347
 
348
+ #: app/admin/RTMediaAdmin.php:1492
349
  msgid "I use @rtMediaWP http://rt.cx/rtmedia on %s"
350
  msgstr ""
351
 
352
+ #: app/admin/RTMediaAdmin.php:1494
353
  msgid "Post to Twitter Now"
354
  msgstr ""
355
 
356
+ #: app/admin/RTMediaAdmin.php:1494
357
  msgid "Post to Twitter"
358
  msgstr ""
359
 
360
+ #: app/admin/RTMediaAdmin.php:1495
361
  msgid "Share on Facebook Now"
362
  msgstr ""
363
 
364
+ #: app/admin/RTMediaAdmin.php:1495
365
  msgid "Share on Facebook"
366
  msgstr ""
367
 
368
+ #: app/admin/RTMediaAdmin.php:1496
369
  msgid "Rate rtMedia on Wordpress.org"
370
  msgstr ""
371
 
372
+ #: app/admin/RTMediaAdmin.php:1496
373
  msgid "Rate on Wordpress.org"
374
  msgstr ""
375
 
376
+ #: app/admin/RTMediaAdmin.php:1497
377
  msgid "Subscribe to our Feeds"
378
  msgstr ""
379
 
380
+ #: app/admin/RTMediaAdmin.php:1500
381
  msgid "Spread the Word"
382
  msgstr ""
383
 
384
+ #: app/admin/RTMediaAdmin.php:1506 app/admin/RTMediaAdmin.php:1513
385
  msgid "Subscribe"
386
  msgstr ""
387
 
388
+ #: app/admin/RTMediaAdmin.php:1544
389
  msgid "Thank you for your time."
390
  msgstr ""
391
 
392
+ #: app/admin/RTMediaAdmin.php:1557
393
  msgid "Premium Add-ons"
394
  msgstr ""
395
 
396
+ #: app/admin/RTMediaAdmin.php:1575
397
  msgid ""
398
  "You have images enabled on rtMedia but your network allowed filetypes do "
399
  "not permit uploading of %s. Click "
400
  msgstr ""
401
 
402
+ #: app/admin/RTMediaAdmin.php:1576 app/admin/RTMediaAdmin.php:1594
403
+ #: app/admin/RTMediaAdmin.php:1612 app/admin/RTMediaFormHandler.php:446
404
+ #: app/admin/RTMediaFormHandler.php:457 app/helper/RTMediaSettings.php:322
405
+ #: app/helper/RTMediaSupport.php:416 app/helper/RTMediaSupport.php:694
406
  msgid "here"
407
  msgstr ""
408
 
409
+ #: app/admin/RTMediaAdmin.php:1577 app/admin/RTMediaAdmin.php:1595
410
+ #: app/admin/RTMediaAdmin.php:1613
411
  msgid " to change your settings manually."
412
  msgstr ""
413
 
414
+ #: app/admin/RTMediaAdmin.php:1579 app/admin/RTMediaAdmin.php:1597
415
+ #: app/admin/RTMediaAdmin.php:1615
416
  msgid "Recommended:"
417
  msgstr ""
418
 
419
+ #: app/admin/RTMediaAdmin.php:1580 app/admin/RTMediaAdmin.php:1598
420
+ #: app/admin/RTMediaAdmin.php:1616
421
  msgid "Update Network Settings Automatically"
422
  msgstr ""
423
 
424
+ #: app/admin/RTMediaAdmin.php:1593
425
  msgid ""
426
  "You have video enabled on BuddyPress Media but your network allowed "
427
  "filetypes do not permit uploading of mp4. Click "
428
  msgstr ""
429
 
430
+ #: app/admin/RTMediaAdmin.php:1611
431
  msgid ""
432
  "You have audio enabled on BuddyPress Media but your network allowed "
433
  "filetypes do not permit uploading of mp3. Click "
434
  msgstr ""
435
 
436
+ #: app/admin/RTMediaAdmin.php:1632
437
  msgid "Network settings updated successfully."
438
  msgstr ""
439
 
440
+ #: app/admin/RTMediaAdmin.php:1685
441
  msgid ""
442
  "Please update rtMedia template files if you have overridden the default "
443
  "rtMedia templates in your theme. If not, you can ignore and hide this "
444
  "notice."
445
  msgstr ""
446
 
447
+ #: app/admin/RTMediaAdmin.php:1685
448
  #: app/importers/RTMediaMediaSizeImporter.php:73
449
  #: app/importers/RTMediaMigration.php:68
450
  msgid "Hide"
451
  msgstr ""
452
 
453
+ #: app/admin/RTMediaAdmin.php:1825
454
  msgid ""
455
  "Your license keys can be found on <a href=\"%s\">my-account</a> page. For "
456
  "more details, please refer to <a href=\"%s\">License documentation</a> page."
457
  msgstr ""
458
 
459
+ #: app/admin/RTMediaAdmin.php:1842
460
  msgid ""
461
  "We found an invalid or expired license key for an rtMedia add-on. Please go "
462
  "to the <a href=\"%s\">Licenses page</a> to fix this issue."
471
  msgid "Need to specify atleast two radios, else use a checkbox instead"
472
  msgstr ""
473
 
474
+ #: app/admin/RTMediaFormHandler.php:278 templates/media/album-gallery.php:67
475
+ #: templates/media/media-gallery.php:75
476
  msgid "Load More"
477
  msgstr ""
478
 
491
  msgstr ""
492
 
493
  #: app/admin/RTMediaFormHandler.php:301
494
+ msgid "Enable likes for media"
495
  msgstr ""
496
 
497
  #: app/admin/RTMediaFormHandler.php:306
498
+ msgid "You may want to disable like feature if you had enabled rating feature."
499
  msgstr ""
500
 
501
  #: app/admin/RTMediaFormHandler.php:311
502
+ msgid "Use lightbox to display media"
503
+ msgstr ""
504
+
505
+ #: app/admin/RTMediaFormHandler.php:316
506
+ msgid "View single media in facebook style lightbox."
507
+ msgstr ""
508
+
509
+ #: app/admin/RTMediaFormHandler.php:321
510
  msgid "Number of media per page"
511
  msgstr ""
512
 
513
+ #: app/admin/RTMediaFormHandler.php:327
514
  msgid "Number of media items you want to show per page on front end."
515
  msgstr ""
516
 
517
+ #: app/admin/RTMediaFormHandler.php:333
518
  msgid "Media display pagination option"
519
  msgstr ""
520
 
521
+ #: app/admin/RTMediaFormHandler.php:339
522
  msgid "Choose whether you want the load more button or pagination buttons."
523
  msgstr ""
524
 
525
+ #: app/admin/RTMediaFormHandler.php:345
526
  msgid "Enable"
527
  msgstr ""
528
 
529
+ #: app/admin/RTMediaFormHandler.php:345
530
  msgid "Cascading grid layout"
531
  msgstr ""
532
 
533
+ #: app/admin/RTMediaFormHandler.php:350
534
  msgid "If you enable masonry view, it is advisable to"
535
  msgstr ""
536
 
537
+ #: app/admin/RTMediaFormHandler.php:350
538
  msgid "for masonry view."
539
  msgstr ""
540
 
541
+ #: app/admin/RTMediaFormHandler.php:354
542
  msgid "You might need to"
543
  msgstr ""
544
 
545
+ #: app/admin/RTMediaFormHandler.php:354
546
  msgid "change thumbnail size"
547
  msgstr ""
548
 
549
+ #: app/admin/RTMediaFormHandler.php:354
550
  msgid "and uncheck the crop box for thumbnails."
551
  msgstr ""
552
 
553
+ #: app/admin/RTMediaFormHandler.php:354
554
  msgid ""
555
  "To set gallery for fixed width, set image height to 0 and width as per your "
556
  "requirement and vice-versa."
557
  msgstr ""
558
 
559
+ #: app/admin/RTMediaFormHandler.php:357
560
  msgid "Enable Direct Upload"
561
  msgstr ""
562
 
563
+ #: app/admin/RTMediaFormHandler.php:362
564
  msgid "Uploading media directly as soon as it gets selected."
565
  msgstr ""
566
 
567
+ #: app/admin/RTMediaFormHandler.php:386
568
  msgid "Single Media View"
569
  msgstr ""
570
 
571
+ #: app/admin/RTMediaFormHandler.php:387 app/helper/RTMediaAddon.php:348
572
+ msgid "Media Likes"
573
+ msgstr ""
574
+
575
+ #: app/admin/RTMediaFormHandler.php:388
576
  msgid "List Media View"
577
  msgstr ""
578
 
579
+ #: app/admin/RTMediaFormHandler.php:389
580
  msgid "Masonry View"
581
  msgstr ""
582
 
583
+ #: app/admin/RTMediaFormHandler.php:390
584
  msgid "Direct Upload"
585
  msgstr ""
586
 
587
+ #: app/admin/RTMediaFormHandler.php:408
588
  msgid "Allow usage data tracking"
589
  msgstr ""
590
 
591
+ #: app/admin/RTMediaFormHandler.php:413
592
  msgid ""
593
  "To make rtMedia better compatible with your sites, you can help the rtMedia "
594
  "team learn what themes and plugins you are using. No private information "
595
  "about your setup will be sent during tracking."
596
  msgstr ""
597
 
598
+ #: app/admin/RTMediaFormHandler.php:417
599
  msgid "Admin bar menu integration"
600
  msgstr ""
601
 
602
+ #: app/admin/RTMediaFormHandler.php:422
603
  msgid ""
604
  "Add rtMedia menu to WordPress admin bar for easy access to settings and "
605
  "moderation page (if enabled)."
606
  msgstr ""
607
 
608
+ #: app/admin/RTMediaFormHandler.php:427
609
  msgid "Add a link to rtMedia in footer"
610
  msgstr ""
611
 
612
+ #: app/admin/RTMediaFormHandler.php:432
613
  msgid "Help us promote rtMedia."
614
  msgstr ""
615
 
616
+ #: app/admin/RTMediaFormHandler.php:437
617
  msgid "Also add my affiliate-id to rtMedia footer link"
618
  msgstr ""
619
 
620
+ #: app/admin/RTMediaFormHandler.php:442
621
  msgid ""
622
  "Add your affiliate-id along with footer link and get rewarded by our "
623
  "affiliation program."
624
  msgstr ""
625
 
626
+ #: app/admin/RTMediaFormHandler.php:446
627
  msgid "Signup for"
628
  msgstr ""
629
 
630
+ #: app/admin/RTMediaFormHandler.php:446
631
  msgid "affiliate program"
632
  msgstr ""
633
 
634
+ #: app/admin/RTMediaFormHandler.php:449
635
  msgid "Enable JSON API"
636
  msgstr ""
637
 
638
+ #: app/admin/RTMediaFormHandler.php:454
639
  msgid ""
640
  "This will allow handling API requests for rtMedia sent through any mobile "
641
  "app."
642
  msgstr ""
643
 
644
+ #: app/admin/RTMediaFormHandler.php:457
645
  msgid "You can refer to the API document from"
646
  msgstr ""
647
 
648
+ #: app/admin/RTMediaFormHandler.php:477
649
  msgid "Admin Settings"
650
  msgstr ""
651
 
652
+ #: app/admin/RTMediaFormHandler.php:478
653
  msgid "API Settings"
654
  msgstr ""
655
 
656
+ #: app/admin/RTMediaFormHandler.php:479
657
  msgid "Miscellaneous"
658
  msgstr ""
659
 
660
+ #: app/admin/RTMediaFormHandler.php:480
661
  msgid "Footer Link"
662
  msgstr ""
663
 
664
+ #: app/admin/RTMediaFormHandler.php:560
665
  msgid "Media Types Settings"
666
  msgstr ""
667
 
668
+ #: app/admin/RTMediaFormHandler.php:568 app/helper/RTMediaSettings.php:344
669
  msgid "Media Type"
670
  msgstr ""
671
 
672
+ #: app/admin/RTMediaFormHandler.php:573
673
  msgid "Allow Upload"
674
  msgstr ""
675
 
676
+ #: app/admin/RTMediaFormHandler.php:575
677
  msgid "Allows you to upload a particular media type on your post."
678
  msgstr ""
679
 
680
+ #: app/admin/RTMediaFormHandler.php:583
681
  msgid "Set Featured"
682
  msgstr ""
683
 
684
+ #: app/admin/RTMediaFormHandler.php:585
685
  msgid "Place a specific media as a featured content on the post."
686
  msgstr ""
687
 
688
+ #: app/admin/RTMediaFormHandler.php:633
689
  msgid "File Extensions"
690
  msgstr ""
691
 
692
+ #: app/admin/RTMediaFormHandler.php:764
693
  msgid "Media Size Settings"
694
  msgstr ""
695
 
696
+ #: app/admin/RTMediaFormHandler.php:769
697
  msgid "Category"
698
  msgstr ""
699
 
700
+ #: app/admin/RTMediaFormHandler.php:770
701
  msgid "Entity"
702
  msgstr ""
703
 
704
+ #: app/admin/RTMediaFormHandler.php:771
705
  msgid "Width"
706
  msgstr ""
707
 
708
+ #: app/admin/RTMediaFormHandler.php:772
709
  msgid "Height"
710
  msgstr ""
711
 
712
+ #: app/admin/RTMediaFormHandler.php:773
713
  msgid "Crop"
714
  msgstr ""
715
 
716
+ #: app/admin/RTMediaFormHandler.php:823
717
  msgid "JPEG/JPG image quality (1-100)"
718
  msgstr ""
719
 
720
+ #: app/admin/RTMediaFormHandler.php:829
721
  msgid "Enter JPEG/JPG Image Quality. Minimum value is 1. 100 is original quality."
722
  msgstr ""
723
 
724
+ #: app/admin/RTMediaFormHandler.php:837
725
  msgid "Image Quality"
726
  msgstr ""
727
 
728
+ #: app/admin/RTMediaFormHandler.php:859
729
  msgid "Custom CSS settings"
730
  msgstr ""
731
 
732
+ #: app/admin/RTMediaFormHandler.php:876
733
  msgid "rtMedia default styles"
734
  msgstr ""
735
 
736
+ #: app/admin/RTMediaFormHandler.php:882
737
  msgid ""
738
  "Load default rtMedia styles. You need to write your own style for rtMedia "
739
  "if you disable it."
740
  msgstr ""
741
 
742
+ #: app/admin/RTMediaFormHandler.php:887
743
  msgid "Paste your CSS code"
744
  msgstr ""
745
 
746
+ #: app/admin/RTMediaFormHandler.php:893
747
  msgid "Custom rtMedia CSS container"
748
  msgstr ""
749
 
750
+ #: app/admin/RTMediaFormHandler.php:916
751
  msgid "Enable privacy"
752
  msgstr ""
753
 
754
+ #: app/admin/RTMediaFormHandler.php:922
755
  msgid "Enable privacy in rtMedia"
756
  msgstr ""
757
 
758
+ #: app/admin/RTMediaFormHandler.php:927
759
  msgid "Default privacy"
760
  msgstr ""
761
 
762
+ #: app/admin/RTMediaFormHandler.php:933
763
  msgid "Set default privacy for media"
764
  msgstr ""
765
 
766
+ #: app/admin/RTMediaFormHandler.php:939
767
  msgid "Allow users to set privacy for their content"
768
  msgstr ""
769
 
770
+ #: app/admin/RTMediaFormHandler.php:944
771
  msgid ""
772
  "If you choose this, users will be able to change privacy of their own "
773
  "uploads."
774
  msgstr ""
775
 
776
+ #: app/admin/RTMediaFormHandler.php:948
777
  msgid "For group uploads, BuddyPress groups privacy is used."
778
  msgstr ""
779
 
780
+ #: app/admin/RTMediaFormHandler.php:990
781
  msgid "Enable media in profile"
782
  msgstr ""
783
 
784
+ #: app/admin/RTMediaFormHandler.php:995
785
  msgid "Enable Media on BuddyPress Profile"
786
  msgstr ""
787
 
788
+ #: app/admin/RTMediaFormHandler.php:1000
789
  msgid "Enable media in group"
790
  msgstr ""
791
 
792
+ #: app/admin/RTMediaFormHandler.php:1005
793
  msgid "Enable Media on BuddyPress Groups"
794
  msgstr ""
795
 
796
+ #: app/admin/RTMediaFormHandler.php:1010
797
  msgid "Allow upload from activity stream"
798
  msgstr ""
799
 
800
+ #: app/admin/RTMediaFormHandler.php:1015
801
  msgid "Allow upload using status update box present on activity stream page"
802
  msgstr ""
803
 
804
+ #: app/admin/RTMediaFormHandler.php:1021
805
+ msgid "Allow upload to Comment"
806
+ msgstr ""
807
+
808
+ #: app/admin/RTMediaFormHandler.php:1026 app/admin/RTMediaFormHandler.php:1036
809
+ msgid "Enable Media in Comment"
810
+ msgstr ""
811
+
812
+ #: app/admin/RTMediaFormHandler.php:1031
813
+ msgid "Disable upload to Comment Media"
814
+ msgstr ""
815
+
816
+ #: app/admin/RTMediaFormHandler.php:1042
817
  msgid "Number of media items to show in activity stream"
818
  msgstr ""
819
 
820
+ #: app/admin/RTMediaFormHandler.php:1047
821
  msgid ""
822
  "With bulk uploads activity, the stream may get flooded. You can control the "
823
  "maximum number of media items or files per activity. This limit will not "
825
  "unlimited."
826
  msgstr ""
827
 
828
+ #: app/admin/RTMediaFormHandler.php:1054
829
  msgid "Enable media notification"
830
  msgstr ""
831
 
832
+ #: app/admin/RTMediaFormHandler.php:1059
833
  msgid ""
834
  "This will enable notifications to media authors for media likes and "
835
  "comments."
836
  msgstr ""
837
 
838
+ #: app/admin/RTMediaFormHandler.php:1065
839
  msgid "Create activity for media likes"
840
  msgstr ""
841
 
842
+ #: app/admin/RTMediaFormHandler.php:1070
843
  msgid "Enabling this setting will create BuddyPress activity for media likes."
844
  msgstr ""
845
 
846
+ #: app/admin/RTMediaFormHandler.php:1076
847
  msgid "Create activity for media comments"
848
  msgstr ""
849
 
850
+ #: app/admin/RTMediaFormHandler.php:1081
851
  msgid "Enabling this setting will create BuddyPress activity for media comments."
852
  msgstr ""
853
 
854
+ #: app/admin/RTMediaFormHandler.php:1087
855
  msgid "Organize media into albums"
856
  msgstr ""
857
 
858
+ #: app/admin/RTMediaFormHandler.php:1093
859
  msgid ""
860
  "This will add 'album' tab to BuddyPress profile and group depending on the "
861
  "^above^ settings."
1084
  "upload on site."
1085
  msgstr ""
1086
 
 
 
 
 
1087
  #: app/helper/RTMediaAddon.php:351
1088
  msgid ""
1089
  "This add-on let you know who liked the media. User can also see which media "
1378
  msgid "other friends liked your"
1379
  msgstr ""
1380
 
1381
+ #: app/helper/RTMediaSettings.php:241
1382
  msgid "BuddyPress Media Addons for Photos"
1383
  msgstr ""
1384
 
1385
+ #: app/helper/RTMediaSettings.php:251
1386
  msgid "rtMedia Themes"
1387
  msgstr ""
1388
 
1389
+ #: app/helper/RTMediaSettings.php:321
1390
  msgid ""
1391
  "Currently your network allows uploading of the following file types. You "
1392
  "can change the settings %s"
1393
  msgstr ""
1394
 
1395
+ #: app/helper/RTMediaSettings.php:342 app/helper/RTMediaSettings.php:344
1396
  msgid "Atleast one Media Type Must be selected"
1397
  msgstr ""
1398
 
1399
+ #: app/helper/RTMediaSettings.php:353 app/helper/RTMediaSettings.php:355
1400
  msgid "\"Number of media\" count value should be numeric and greater than 0."
1401
  msgstr ""
1402
 
1403
+ #: app/helper/RTMediaSettings.php:355
1404
  msgid "Default Count"
1405
  msgstr ""
1406
 
1407
+ #: app/helper/RTMediaSettings.php:360
1408
  msgid "Settings saved."
1409
  msgstr ""
1410
 
1411
+ #: app/helper/RTMediaSettings.php:384
1412
  msgid "If you make changes to width, height or crop settings, you must use "
1413
  msgstr ""
1414
 
1415
+ #: app/helper/RTMediaSettings.php:385
1416
  msgid "Regenerate Thumbnail Plugin"
1417
  msgstr ""
1418
 
1419
+ #: app/helper/RTMediaSettings.php:386
1420
  msgid " to regenerate old images."
1421
  msgstr ""
1422
 
1423
+ #: app/helper/RTMediaSettings.php:409
1424
  msgid "BuddyPress Media 2.6 requires a database upgrade. "
1425
  msgstr ""
1426
 
1427
+ #: app/helper/RTMediaSettings.php:410
1428
  msgid "Update Database"
1429
  msgstr ""
1430
 
1431
+ #: app/helper/RTMediaSettings.php:424
1432
  msgid ""
1433
  "If your site has some issues due to rtMedia and you want one on one support "
1434
  "then you can create a support topic on the "
1435
  msgstr ""
1436
 
1437
+ #: app/helper/RTMediaSettings.php:425
1438
  msgid "rtMedia Support Forum"
1439
  msgstr ""
1440
 
1441
+ #: app/helper/RTMediaSettings.php:427
1442
  msgid ""
1443
  "If you have any suggestions, enhancements or bug reports, then you can open "
1444
  "a new issue on "
1445
  msgstr ""
1446
 
1447
+ #: app/helper/RTMediaSettings.php:428 app/helper/RTMediaSupport.php:467
1448
  msgid "GitHub"
1449
  msgstr ""
1450
 
1592
  msgid "rtMedia Contact from"
1593
  msgstr ""
1594
 
1595
+ #: app/helper/RTMediaSupport.php:681
1596
  msgid "Thank you for your Feedback/Suggestion."
1597
  msgstr ""
1598
 
1599
+ #: app/helper/RTMediaSupport.php:683
1600
  msgid "Thank you for posting your support request."
1601
  msgstr ""
1602
 
1603
+ #: app/helper/RTMediaSupport.php:684
1604
  msgid "We will get back to you shortly."
1605
  msgstr ""
1606
 
1607
+ #: app/helper/RTMediaSupport.php:689
1608
  msgid "Your server failed to send an email."
1609
  msgstr ""
1610
 
1611
+ #: app/helper/RTMediaSupport.php:690
1612
  msgid "Kindly contact your server support to fix this."
1613
  msgstr ""
1614
 
1615
+ #: app/helper/RTMediaSupport.php:693
1616
  msgid "You can alternatively create a support request %s"
1617
  msgstr ""
1618
 
1819
  msgid "The method expects an array in arguments for %s provided."
1820
  msgstr ""
1821
 
1822
+ #: app/helper/rtUploadAttachment.php:36
1823
  msgid "You can not upload more than 2 MB."
1824
  msgstr ""
1825
 
1826
+ #: app/helper/rtUploadAttachment.php:42
1827
  msgid "There was an error uploading your files"
1828
  msgstr ""
1829
 
1830
+ #: app/helper/rtUploadAttachment.php:45
1831
  msgid "Form was submitted"
1832
  msgstr ""
1833
 
1877
  msgid "Users"
1878
  msgstr ""
1879
 
1880
+ #: app/importers/BPMediaAlbumimporter.php:89 app/main/RTMedia.php:639
1881
  msgid "Media"
1882
  msgstr ""
1883
 
2089
  msgid "No time remaining."
2090
  msgstr ""
2091
 
2092
+ #: app/main/RTMedia.php:368
2093
  msgid "Photo"
2094
  msgstr ""
2095
 
2096
+ #: app/main/RTMedia.php:369
2097
  msgid "Photos"
2098
  msgstr ""
2099
 
2100
+ #: app/main/RTMedia.php:377
2101
  msgid "Video"
2102
  msgstr ""
2103
 
2104
+ #: app/main/RTMedia.php:378
2105
  msgid "Videos"
2106
  msgstr ""
2107
 
2108
+ #: app/main/RTMedia.php:386 app/main/RTMedia.php:387
2109
  msgid "Music"
2110
  msgstr ""
2111
 
2112
+ #: app/main/RTMedia.php:478
2113
  msgid "Private - Visible only to the user"
2114
  msgstr ""
2115
 
2116
+ #: app/main/RTMedia.php:479
2117
  msgid "Friends - Visible to user's friends"
2118
  msgstr ""
2119
 
2120
+ #: app/main/RTMedia.php:480
2121
  msgid "Logged in Users - Visible to registered users"
2122
  msgstr ""
2123
 
2124
+ #: app/main/RTMedia.php:481
2125
  msgid "Public - Visible to the world"
2126
  msgstr ""
2127
 
2128
+ #: app/main/RTMedia.php:647 app/main/controllers/template/RTMediaNav.php:222
2129
+ #: app/main/controllers/template/rtmedia-functions.php:136
2130
  msgid "All"
2131
  msgstr ""
2132
 
2133
+ #: app/main/RTMedia.php:659 app/main/controllers/media/RTMediaAlbum.php:54
2134
+ #: app/main/controllers/template/rtmedia-actions.php:123
2135
+ #: app/main/controllers/upload/RTMediaUploadView.php:51
2136
+ #: app/main/controllers/upload/RTMediaUploadView.php:54
2137
  msgid "Album"
2138
  msgstr ""
2139
 
2140
+ #: app/main/RTMedia.php:663 app/main/RTMedia.php:1066
2141
  #: app/main/controllers/media/RTMediaAlbum.php:53
2142
  #: app/main/controllers/media/RTMediaAlbum.php:65
2143
  msgid "Albums"
2144
  msgstr ""
2145
 
2146
+ #: app/main/RTMedia.php:673 app/main/controllers/media/RTMediaLoginPopup.php:38
2147
+ #: app/main/controllers/template/rtmedia-actions.php:313
2148
+ #: app/main/controllers/template/rtmedia-actions.php:316
2149
+ #: app/main/controllers/template/rtmedia-actions.php:320
2150
  msgid "Upload"
2151
  msgstr ""
2152
 
2153
+ #: app/main/RTMedia.php:678
2154
  msgid "Wall Post"
2155
  msgstr ""
2156
 
2157
+ #: app/main/RTMedia.php:901 app/main/RTMedia.php:910
2158
  msgid "Wall Posts"
2159
  msgstr ""
2160
 
2161
+ #: app/main/RTMedia.php:954
2162
  msgid ": Can't Create Database table. Please check create table permission."
2163
  msgstr ""
2164
 
2165
+ #: app/main/RTMedia.php:1009
2166
  msgid "Loading media"
2167
  msgstr ""
2168
 
2169
+ #: app/main/RTMedia.php:1010
2170
  msgid "Please enter some content to post."
2171
  msgstr ""
2172
 
2173
+ #: app/main/RTMedia.php:1011
2174
  msgid "Empty Comment is not allowed."
2175
  msgstr ""
2176
 
2177
+ #: app/main/RTMedia.php:1012
2178
  msgid "Are you sure you want to delete this media?"
2179
  msgstr ""
2180
 
2181
+ #: app/main/RTMedia.php:1013
2182
  msgid "Are you sure you want to delete this comment?"
2183
  msgstr ""
2184
 
2185
+ #: app/main/RTMedia.php:1014
2186
  msgid "Are you sure you want to delete this Album?"
2187
  msgstr ""
2188
 
2189
+ #: app/main/RTMedia.php:1015
2190
  msgid "Drop files here"
2191
  msgstr ""
2192
 
2193
+ #: app/main/RTMedia.php:1016
2194
  msgid "album created successfully."
2195
  msgstr ""
2196
 
2197
+ #: app/main/RTMedia.php:1017
2198
  msgid "Something went wrong. Please try again."
2199
  msgstr ""
2200
 
2201
+ #: app/main/RTMedia.php:1018
2202
  msgid "Enter an album name."
2203
  msgstr ""
2204
 
2205
+ #: app/main/RTMedia.php:1019
2206
  msgid "Max file Size Limit : "
2207
  msgstr ""
2208
 
2209
+ #: app/main/RTMedia.php:1020
2210
  msgid "Allowed File Formats"
2211
  msgstr ""
2212
 
2213
+ #: app/main/RTMedia.php:1021 templates/media/album-single-edit.php:73
2214
  msgid "Select All Visible"
2215
  msgstr ""
2216
 
2217
+ #: app/main/RTMedia.php:1022
2218
  msgid "Unselect All Visible"
2219
  msgstr ""
2220
 
2221
+ #: app/main/RTMedia.php:1023
2222
  msgid "Please select some media."
2223
  msgstr ""
2224
 
2225
+ #: app/main/RTMedia.php:1024
2226
  msgid "Are you sure you want to delete the selected media?"
2227
  msgstr ""
2228
 
2229
+ #: app/main/RTMedia.php:1025
2230
  msgid "Are you sure you want to move the selected media?"
2231
  msgstr ""
2232
 
2233
+ #: app/main/RTMedia.php:1026
2234
  msgid "Waiting"
2235
  msgstr ""
2236
 
2237
+ #: app/main/RTMedia.php:1027
2238
  msgid "Uploaded"
2239
  msgstr ""
2240
 
2241
+ #: app/main/RTMedia.php:1028
2242
  msgid "Uploading"
2243
  msgstr ""
2244
 
2245
+ #: app/main/RTMedia.php:1029
2246
  msgid "Failed"
2247
  msgstr ""
2248
 
2249
+ #: app/main/RTMedia.php:1030
2250
  msgid "Close"
2251
  msgstr ""
2252
 
2253
+ #: app/main/RTMedia.php:1031
2254
  #: app/main/controllers/media/RTMediaGalleryItemAction.php:63
2255
  #: app/main/controllers/media/RTMediaGalleryItemAction.php:80
2256
+ #: app/main/controllers/template/rtmedia-functions.php:1137
2257
+ #: app/main/controllers/template/rtmedia-functions.php:1156
2258
  msgid "Edit"
2259
  msgstr ""
2260
 
2261
+ #: app/main/RTMedia.php:1032
2262
  #: app/main/controllers/media/RTMediaGalleryItemAction.php:67
2263
  #: app/main/controllers/media/RTMediaGalleryItemAction.php:80
2264
+ #: app/main/controllers/template/rtmedia-functions.php:2013
2265
+ #: app/main/controllers/template/rtmedia-functions.php:2022
2266
  #: templates/media/album-single-edit.php:78
2267
  msgid "Delete"
2268
  msgstr ""
2269
 
2270
+ #: app/main/RTMedia.php:1033 templates/media/media-single-edit.php:8
2271
  msgid "Edit Media"
2272
  msgstr ""
2273
 
2274
+ #: app/main/RTMedia.php:1034
2275
  msgid "Remove from queue"
2276
  msgstr ""
2277
 
2278
+ #: app/main/RTMedia.php:1035
2279
  msgid "Add more files"
2280
  msgstr ""
2281
 
2282
+ #: app/main/RTMedia.php:1036
2283
  msgid "File not supported"
2284
  msgstr ""
2285
 
2286
+ #: app/main/RTMedia.php:1037
2287
  msgid "more"
2288
  msgstr ""
2289
 
2290
+ #: app/main/RTMedia.php:1038
2291
  msgid "less"
2292
  msgstr ""
2293
 
2294
+ #: app/main/RTMedia.php:1039
2295
  msgid "Read more"
2296
  msgstr ""
2297
 
2298
+ #: app/main/RTMedia.php:1040
2299
  msgid "Show less"
2300
  msgstr ""
2301
 
2302
+ #: app/main/RTMedia.php:1042
2303
  msgid "This media is uploaded. Are you sure you want to delete this media?"
2304
  msgstr ""
2305
 
2306
+ #: app/main/RTMedia.php:1050
2307
  msgid "Featured media set successfully."
2308
  msgstr ""
2309
 
2310
+ #: app/main/RTMedia.php:1051
2311
  msgid "Featured media removed successfully."
2312
  msgstr ""
2313
 
2314
+ #: app/main/RTMedia.php:1053
2315
  msgid "Title:"
2316
  msgstr ""
2317
 
2318
+ #: app/main/RTMedia.php:1054
2319
  msgid "Description:"
2320
  msgstr ""
2321
 
2322
+ #: app/main/RTMedia.php:1059
2323
  msgid "Edit File Name"
2324
  msgstr ""
2325
 
2326
+ #: app/main/RTMedia.php:1067
2327
  msgid "Privacy updated successfully."
2328
  msgstr ""
2329
 
2330
+ #: app/main/RTMedia.php:1068
2331
  msgid "Couldn't change privacy, please try again."
2332
  msgstr ""
2333
 
2334
+ #: app/main/RTMedia.php:1069
2335
  msgid "file deleted successfully."
2336
  msgstr ""
2337
 
2338
+ #: app/main/RTMedia.php:1101
2339
  msgid "There are some uploads in progress. Do you want to cancel them?"
2340
  msgstr ""
2341
 
2342
+ #: app/main/RTMedia.php:1211
2343
+ msgid "Adding media in Comments is not allowed"
2344
+ msgstr ""
2345
+
2346
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:297
2347
  msgid "Media Files"
2348
  msgstr ""
2349
 
2350
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:336
2351
+ #: app/main/controllers/media/RTMediaComment.php:172
2352
  #: app/main/controllers/shortcodes/RTMediaUploadShortcode.php:100
2353
+ #: app/main/controllers/template/rtmedia-functions.php:2052
2354
  msgid "You are not allowed to upload/attach media."
2355
  msgstr ""
2356
 
2357
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:474
2358
  msgid "%s added a %s"
2359
  msgstr ""
2360
 
2361
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:481
2362
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:483
2363
+ #: app/main/controllers/upload/RTMediaUploadEndpoint.php:220
2364
  msgid "%s added %d %s"
2365
  msgstr ""
2366
 
2367
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:536
2368
  msgid "%1$s liked a %2$s in the group %3$s"
2369
  msgstr ""
2370
 
2371
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:539
2372
  msgid "%1$s liked their %2$s"
2373
  msgstr ""
2374
 
2375
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:543
2376
  msgid "%1$s liked %2$s's %3$s"
2377
  msgstr ""
2378
 
2379
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:633
2380
  msgid "%1$s commented on a %2$s in the group %3$s"
2381
  msgstr ""
2382
 
2383
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:636
2384
  msgid "%1$s commented on their %2$s"
2385
  msgstr ""
2386
 
2387
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:640
2388
  msgid "%1$s commented on %2$s's %3$s"
2389
  msgstr ""
2390
 
2630
  msgstr ""
2631
 
2632
  #: app/main/controllers/group/RTMediaGroupExtension.php:130
2633
+ #: app/main/controllers/privacy/RTMediaPrivacy.php:418
2634
  #: templates/media/album-single-edit.php:55
2635
  msgid "Save Changes"
2636
  msgstr ""
2660
  msgstr ""
2661
 
2662
  #: app/main/controllers/media/RTMediaAlbum.php:56
2663
+ #: app/main/controllers/template/rtmedia-actions.php:202
2664
  msgid "Create Album"
2665
  msgstr ""
2666
 
2701
  msgid "Untitled Album"
2702
  msgstr ""
2703
 
2704
+ #: app/main/controllers/media/RTMediaComment.php:160
2705
+ #: app/main/controllers/shortcodes/RTMediaUploadShortcode.php:88
2706
+ msgid "The web browser on your device cannot be used to upload files."
2707
+ msgstr ""
2708
+
2709
  #: app/main/controllers/media/RTMediaFeatured.php:25
2710
  #: app/main/controllers/media/RTMediaGroupFeatured.php:17
2711
  msgid "Set as Featured"
2748
  msgstr ""
2749
 
2750
  #: app/main/controllers/media/RTMediaLoginPopup.php:38
2751
+ #: app/main/controllers/template/rtmedia-actions.php:316
2752
+ #: app/main/controllers/template/rtmedia-actions.php:320
2753
  msgid "Upload Media"
2754
  msgstr ""
2755
 
2773
  msgid " to login."
2774
  msgstr ""
2775
 
2776
+ #: app/main/controllers/media/RTMediaMedia.php:610
2777
  msgid "Error creating attachment for the media file, please try again"
2778
  msgstr ""
2779
 
2780
+ #: app/main/controllers/media/RTMediaMedia.php:725
2781
  msgid "%1$s added a %2$s"
2782
  msgstr ""
2783
 
2784
+ #: app/main/controllers/media/RTMediaMedia.php:725
2785
  msgid "%1$s added %4$d %3$s"
2786
  msgstr ""
2787
 
2788
+ #: app/main/controllers/privacy/RTMediaPrivacy.php:380
2789
  msgid "No changes were made to your account."
2790
  msgstr ""
2791
 
2792
+ #: app/main/controllers/privacy/RTMediaPrivacy.php:383
2793
  msgid "Your default privacy settings saved successfully."
2794
  msgstr ""
2795
 
2796
+ #: app/main/controllers/privacy/RTMediaPrivacy.php:407
2797
  msgid "Default Privacy"
2798
  msgstr ""
2799
 
2800
+ #: app/main/controllers/shortcodes/RTMediaGalleryShortcode.php:253
2801
  msgid "You do not have sufficient privileges to view this gallery"
2802
  msgstr ""
2803
 
 
 
 
 
2804
  #: app/main/controllers/template/RTMediaAJAX.php:35
2805
  msgid "You can not create album in this group."
2806
  msgstr ""
2817
  msgid "Data mismatch, Please insert data properly."
2818
  msgstr ""
2819
 
2820
+ #: app/main/controllers/template/RTMediaTemplate.php:113
2821
+ #: app/main/controllers/template/RTMediaTemplate.php:168
2822
  msgid "Invalid attribute passed for rtmedia_gallery shortcode."
2823
  msgstr ""
2824
 
2825
+ #: app/main/controllers/template/RTMediaTemplate.php:370
2826
+ #: app/main/controllers/template/RTMediaTemplate.php:463
2827
+ #: app/main/controllers/template/RTMediaTemplate.php:561
2828
+ #: app/main/controllers/template/RTMediaTemplate.php:762
2829
  msgid "Ooops !!! Invalid access. No nonce was found !!"
2830
  msgstr ""
2831
 
2832
+ #: app/main/controllers/template/RTMediaTemplate.php:377
2833
  msgid "Media updated Sucessfully"
2834
  msgstr ""
2835
 
2836
+ #: app/main/controllers/template/RTMediaTemplate.php:383
2837
  msgid "Error in updating Media"
2838
  msgstr ""
2839
 
2840
+ #: app/main/controllers/template/rtmedia-actions.php:17
2841
+ #: app/main/controllers/template/rtmedia-actions.php:153
2842
  msgid "Options"
2843
  msgstr ""
2844
 
2845
+ #: app/main/controllers/template/rtmedia-actions.php:54
2846
  msgid "Image"
2847
  msgstr ""
2848
 
2849
+ #: app/main/controllers/template/rtmedia-actions.php:80
2850
  msgid "Modify Image"
2851
  msgstr ""
2852
 
2853
+ #: app/main/controllers/template/rtmedia-actions.php:192
2854
  msgid "Create an Album"
2855
  msgstr ""
2856
 
2857
+ #: app/main/controllers/template/rtmedia-actions.php:194
2858
  msgid "Album Title : "
2859
  msgstr ""
2860
 
2861
+ #: app/main/controllers/template/rtmedia-actions.php:242
2862
+ #: app/main/controllers/template/rtmedia-actions.php:249
2863
  #: app/main/controllers/template/rtmedia-filters.php:92
2864
  msgid "Merge Album"
2865
  msgstr ""
2866
 
2867
+ #: app/main/controllers/template/rtmedia-actions.php:245
2868
  msgid "Select Album to merge with : "
2869
  msgstr ""
2870
 
2871
+ #: app/main/controllers/template/rtmedia-actions.php:295
2872
  msgid "Merge"
2873
  msgstr ""
2874
 
2875
+ #: app/main/controllers/template/rtmedia-actions.php:364
2876
  msgid "Empowering your community with "
2877
  msgstr ""
2878
 
2879
+ #: app/main/controllers/template/rtmedia-actions.php:365
2880
  msgid "The only complete media solution for WordPress, BuddyPress and bbPress"
2881
  msgstr ""
2882
 
2883
+ #: app/main/controllers/template/rtmedia-actions.php:384
2884
  msgid "Close (Esc)"
2885
  msgstr ""
2886
 
2887
+ #: app/main/controllers/template/rtmedia-actions.php:529
2888
  msgid "You can consider rtMedia Team for following :"
2889
  msgstr ""
2890
 
2891
+ #: app/main/controllers/template/rtmedia-actions.php:531
2892
  msgid "rtMedia Customization ( in Upgrade Safe manner )"
2893
  msgstr ""
2894
 
2895
+ #: app/main/controllers/template/rtmedia-actions.php:532
2896
  msgid "WordPress/BuddyPress Theme Design and Development"
2897
  msgstr ""
2898
 
2899
+ #: app/main/controllers/template/rtmedia-actions.php:533
2900
  msgid "WordPress/BuddyPress Plugin Development"
2901
  msgstr ""
2902
 
2903
+ #: app/main/controllers/template/rtmedia-actions.php:536
2904
  msgid "Contact Us"
2905
  msgstr ""
2906
 
2907
+ #: app/main/controllers/template/rtmedia-actions.php:623
2908
+ #: app/main/controllers/template/rtmedia-actions.php:624
2909
  msgid "Previous"
2910
  msgstr ""
2911
 
2912
+ #: app/main/controllers/template/rtmedia-actions.php:625
2913
+ #: app/main/controllers/template/rtmedia-actions.php:626
2914
  #: templates/media/album-single-edit.php:121
2915
  msgid "Next"
2916
  msgstr ""
2917
 
2918
+ #: app/main/controllers/template/rtmedia-actions.php:823
2919
  msgid "Settings has been saved successfully."
2920
  msgstr ""
2921
 
2922
+ #: app/main/controllers/template/rtmedia-actions.php:827
2923
  msgid "Refresh the page in case if license data is not showing correct."
2924
  msgstr ""
2925
 
2926
+ #: app/main/controllers/template/rtmedia-actions.php:845
2927
  msgid "Posted a status update"
2928
  msgstr ""
2929
 
2930
+ #: app/main/controllers/template/rtmedia-actions.php:847
2931
  msgid "rtMedia Updates"
2932
  msgstr ""
2933
 
2934
+ #: app/main/controllers/template/rtmedia-ajax-actions.php:88
2935
+ #: app/main/controllers/template/rtmedia-functions.php:1952
2936
+ msgid "Comment"
2937
+ msgstr ""
2938
+
2939
  #: app/main/controllers/template/rtmedia-filters.php:50
2940
  msgid "Create New Album"
2941
  msgstr ""
2948
  msgid "Delete Album"
2949
  msgstr ""
2950
 
2951
+ #: app/main/controllers/template/rtmedia-functions.php:1219
2952
  msgid "There are no comments on this media yet."
2953
  msgstr ""
2954
 
2955
+ #: app/main/controllers/template/rtmedia-functions.php:1284
2956
  msgid "Delete Comment"
2957
  msgstr ""
2958
 
2959
+ #: app/main/controllers/template/rtmedia-functions.php:1584
2960
  msgid "Go to page no : "
2961
  msgstr ""
2962
 
2963
+ #: app/main/controllers/template/rtmedia-functions.php:1589
2964
  msgid "Go"
2965
  msgstr ""
2966
 
2967
+ #: app/main/controllers/template/rtmedia-functions.php:1950
2968
  msgid "Type Comment..."
2969
  msgstr ""
2970
 
2971
+ #: app/main/controllers/template/rtmedia-functions.php:2013
2972
+ #: app/main/controllers/template/rtmedia-functions.php:2022
 
 
 
 
 
2973
  msgid "Delete Media"
2974
  msgstr ""
2975
 
2976
+ #: app/main/controllers/template/rtmedia-functions.php:2268
2977
  msgid "Profile Albums"
2978
  msgstr ""
2979
 
2980
+ #: app/main/controllers/template/rtmedia-functions.php:2272
2981
+ #: app/main/controllers/template/rtmedia-functions.php:2317
2982
  msgid "Group Albums"
2983
  msgstr ""
2984
 
2985
+ #: app/main/controllers/template/rtmedia-functions.php:2491
2986
  msgid "Privacy : "
2987
  msgstr ""
2988
 
2989
+ #: app/main/controllers/template/rtmedia-functions.php:2841
2990
  msgid "You like this"
2991
  msgstr ""
2992
 
2993
+ #: app/main/controllers/template/rtmedia-functions.php:2851
2994
  msgid "You and "
2995
  msgstr ""
2996
 
2997
+ #: app/main/controllers/template/rtmedia-functions.php:2870
2998
  msgid " person likes this"
2999
  msgid_plural " people like this"
3000
  msgstr[0] ""
3001
  msgstr[1] ""
3002
 
3003
+ #: app/main/controllers/template/rtmedia-functions.php:2975
3004
  msgid "Public"
3005
  msgstr ""
3006
 
3007
+ #: app/main/controllers/template/rtmedia-functions.php:2980
3008
  msgid "All members"
3009
  msgstr ""
3010
 
3011
+ #: app/main/controllers/template/rtmedia-functions.php:2985
3012
  msgid "Your friends"
3013
  msgstr ""
3014
 
3015
+ #: app/main/controllers/template/rtmedia-functions.php:2990
3016
  msgid "Only you"
3017
  msgstr ""
3018
 
3019
+ #: app/main/controllers/template/rtmedia-functions.php:2995
3020
  msgid "Blocked temporarily"
3021
  msgstr ""
3022
 
3023
+ #: app/main/controllers/template/rtmedia-functions.php:3048
3024
  msgid "%s ago "
3025
  msgstr ""
3026
 
3027
+ #: app/main/controllers/template/rtmedia-functions.php:3062
3028
  msgid "1 second"
3029
  msgid_plural "%s seconds"
3030
  msgstr[0] ""
3031
  msgstr[1] ""
3032
 
3033
+ #: app/main/controllers/template/rtmedia-functions.php:3066
3034
  msgid "1 minute"
3035
  msgid_plural "%s minutes"
3036
  msgstr[0] ""
3037
  msgstr[1] ""
3038
 
3039
+ #: app/main/controllers/template/rtmedia-functions.php:3070
3040
  msgid "1 hour"
3041
  msgid_plural "%s hours"
3042
  msgstr[0] ""
3043
  msgstr[1] ""
3044
 
3045
+ #: app/main/controllers/template/rtmedia-functions.php:3671
3046
+ #. translators: date format, see http:php.net/date
3047
+ msgid "View Conversation"
3048
+ msgstr ""
3049
+
3050
+ #: app/main/controllers/upload/RTMediaUploadView.php:78
3051
  msgid "Privacy: "
3052
  msgstr ""
3053
 
3054
+ #: app/main/controllers/upload/RTMediaUploadView.php:85
3055
+ #: app/main/controllers/upload/RTMediaUploadView.php:142
3056
+ #: app/main/controllers/upload/RTMediaUploadView.php:159
3057
+ #: app/main/controllers/upload/RTMediaUploadView.php:180
3058
  msgid "File Upload"
3059
  msgstr ""
3060
 
3061
+ #: app/main/controllers/upload/RTMediaUploadView.php:89
3062
  msgid "Select your files"
3063
  msgstr ""
3064
 
3065
+ #: app/main/controllers/upload/RTMediaUploadView.php:90
3066
  msgid "or"
3067
  msgstr ""
3068
 
3069
+ #: app/main/controllers/upload/RTMediaUploadView.php:90
3070
  msgid "Drop your files here"
3071
  msgstr ""
3072
 
3073
+ #: app/main/controllers/upload/RTMediaUploadView.php:138
3074
  msgid "Start upload"
3075
  msgstr ""
3076
 
3077
+ #: app/main/controllers/upload/RTMediaUploadView.php:166
3078
+ #: app/main/controllers/upload/RTMediaUploadView.php:187
3079
  msgid "Attach Media"
3080
  msgstr ""
3081
 
3082
+ #: app/main/controllers/upload/RTMediaUploadView.php:202
3083
  msgid "Insert from URL"
3084
  msgstr ""
3085
 
3127
  msgid "Deprecated %s. Please use %s."
3128
  msgstr ""
3129
 
3130
+ #: templates/media/album-gallery.php:21
3131
  msgid "Album List"
3132
  msgstr ""
3133
 
3186
  msgid "Sorry !! You can not edit this album."
3187
  msgstr ""
3188
 
3189
+ #: templates/media/media-gallery.php:16 templates/media/media-gallery.php:32
3190
  msgid "Media Gallery"
3191
  msgstr ""
3192
 
3198
  msgid "Sorry !! You do not have rights to edit this media"
3199
  msgstr ""
3200
 
3201
+ #: templates/media/media-single.php:47
3202
  msgid "under"
3203
  msgstr ""
3204
 
3230
  msgid "hidden"
3231
  msgstr ""
3232
 
3233
+ #: app/main/controllers/template/RTMediaNav.php:41
3234
  msgctxt "My Account Privacy sub nav"
3235
  msgid "Privacy"
3236
  msgstr ""
readme.txt CHANGED
@@ -1,12 +1,12 @@
1
  === rtMedia for WordPress, BuddyPress and bbPress ===
2
- Contributors: rtcamp, mangeshp, sanket.parmar, pranalipatel, jignesh.nakrani, manishsongirkar36, kiranpotphode, yahil, supercoder, bhargavbhandari90, deepak1191, rittesh.patel, sagarjadhav, pushpak.pop, faishal, desaiuditd, rahul286, JoshuaAbenazer, gagan0123, saurabhshukla, nitun.lanjewar, umesh.nevase, suhasgirgaonkar, neerukoul, hrishiv90, kanakiyajay, jarretc, tobiaskluge, rafaelfunchal, UmeshSingla, mehulkaklotar, tannermirabel, kishores, chandrapatel
3
  Donate link: http://rtcamp.com/donate/
4
  Tags: BuddyPress, media, multimedia, album, audio, songs, music, video, photo, image, upload, share, MediaElement.js, ffmpeg, kaltura, media-node, rtMedia, WordPress, bbPress, masonry
5
  License: GPLv2 or later
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: WordPress 4.1
8
- Tested up to: 4.6.1
9
- Stable tag: 4.2.1
10
 
11
  Add albums, photo, audio/video upload, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices.
12
 
@@ -137,11 +137,36 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
137
 
138
  == Changelog ==
139
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
  = 4.2.1 [Dec 21, 2016] =
141
 
142
  * FIXED
143
 
144
- * Security issues pointed out by [James Golovich](https://profiles.wordpress.org/jamesgol/)
145
  * Direct access of a file
146
  * Access rights to modify/update the rtMedia settings
147
  * Added validation on custom CSS before saving
@@ -1294,8 +1319,8 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
1294
 
1295
  == Upgrade Notice ==
1296
 
1297
- = 4.2.1 =
1298
- Fix the media autoplay in safari browser and improved the security related checks. Please update/re-save the permalink structure after the plugin update.
1299
 
1300
  == Sponsors ==
1301
 
1
  === rtMedia for WordPress, BuddyPress and bbPress ===
2
+ Contributors: rtcamp, mangeshp, sanket.parmar, pranalipatel, jignesh.nakrani, manishsongirkar36, kiranpotphode, yahil, 1naveengiri, bhargavbhandari90, deepak1191, rittesh.patel, sagarjadhav, pushpak.pop, faishal, desaiuditd, rahul286, JoshuaAbenazer, gagan0123, saurabhshukla, nitun.lanjewar, umesh.nevase, suhasgirgaonkar, neerukoul, hrishiv90, kanakiyajay, jarretc, tobiaskluge, rafaelfunchal, UmeshSingla, mehulkaklotar, tannermirabel, kishores, chandrapatel
3
  Donate link: http://rtcamp.com/donate/
4
  Tags: BuddyPress, media, multimedia, album, audio, songs, music, video, photo, image, upload, share, MediaElement.js, ffmpeg, kaltura, media-node, rtMedia, WordPress, bbPress, masonry
5
  License: GPLv2 or later
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: WordPress 4.1
8
+ Tested up to: 4.7.2
9
+ Stable tag: 4.3
10
 
11
  Add albums, photo, audio/video upload, privacy, sharing, front-end uploads & more. All this works on mobile/tablets devices.
12
 
137
 
138
  == Changelog ==
139
 
140
+ = 4.3 [Feb 14, 2017] =
141
+
142
+ * NEW FEATURES
143
+
144
+ * Comment Media - User can upload media in comment box
145
+
146
+ * ENHANCEMENTS
147
+
148
+ * rtMedia settings to unable or disable likes for Media
149
+ * Attachment upload in rtMedia support form
150
+ * Added: rtMedia Version Constant
151
+ * Added: Action to Change rtMedia query before shortcode run
152
+ * Added: Filter to Change Media menu position in admin bar
153
+
154
+ * FIXED
155
+
156
+ * Bulk delete in Media library Dashboard
157
+ * Warnings when user click on pagination
158
+ * rtMedia gallery shortcode pagination
159
+ * Remove unwanted fields in rtMedia support form
160
+ * Sorting & Options issue in Media Tab
161
+ * Comment and Like Privacy issue
162
+ * Comment and Like for media delete issue in Group
163
+ * Load More issue on activity and group Tab
164
+
165
  = 4.2.1 [Dec 21, 2016] =
166
 
167
  * FIXED
168
 
169
+ * Security issues pointed out by James Golovich
170
  * Direct access of a file
171
  * Access rights to modify/update the rtMedia settings
172
  * Added validation on custom CSS before saving
1319
 
1320
  == Upgrade Notice ==
1321
 
1322
+ = 4.3 =
1323
+ Now upload media in comment & fixed rtMedia shortcode pagination along with several other bugs. Please update/re-save the permalinks after the plugin update.
1324
 
1325
  == Sponsors ==
1326
 
templates/media/album-gallery-item.php CHANGED
@@ -21,7 +21,7 @@ if ( isset( $is_edit_allowed[0] ) ) {
21
  $rtmedia_backbone['is_edit_allowed'] = $is_edit_allowed[0];
22
  }
23
  ?>
24
- <li class="rtmedia-list-item">
25
  <a href="<?php rtmedia_permalink(); ?>" title="<?php echo esc_attr( rtmedia_title() ); ?>">
26
  <div class="rtmedia-item-thumbnail">
27
  <img src="<?php rtmedia_image( 'rt_media_thumbnail' ); ?>" alt="<?php echo esc_attr( rtmedia_title() ); ?>">
21
  $rtmedia_backbone['is_edit_allowed'] = $is_edit_allowed[0];
22
  }
23
  ?>
24
+ <li class="rtmedia-list-item" id="<?php echo rtmedia_id(); ?>">
25
  <a href="<?php rtmedia_permalink(); ?>" title="<?php echo esc_attr( rtmedia_title() ); ?>">
26
  <div class="rtmedia-item-thumbnail">
27
  <img src="<?php rtmedia_image( 'rt_media_thumbnail' ); ?>" alt="<?php echo esc_attr( rtmedia_title() ); ?>">
templates/media/album-gallery.php CHANGED
@@ -1,4 +1,11 @@
1
- <div class="rtmedia-container">
 
 
 
 
 
 
 
2
  <?php
3
  do_action( 'rtmedia_before_album_gallery' );
4
 
1
+ <?php
2
+
3
+ // Generate random number for gallery container
4
+ // This will be useful when multiple gallery shortcodes are used in a single page
5
+ $rand_id = rand( 0, 1000 );
6
+
7
+ ?>
8
+ <div class="rtmedia-container" id="rtmedia_gallery_container_<?php echo $rand_id;?>">
9
  <?php
10
  do_action( 'rtmedia_before_album_gallery' );
11
 
templates/media/media-gallery.php CHANGED
@@ -1,4 +1,11 @@
1
- <div class="rtmedia-container">
 
 
 
 
 
 
 
2
  <?php do_action( 'rtmedia_before_media_gallery' ); ?>
3
  <?php
4
  $title = get_rtmedia_gallery_title();
1
+ <?php
2
+
3
+ // Generate random number for gallery container
4
+ // This will be useful when multiple gallery shortcodes are used in a single page
5
+ $rand_id = rand( 0, 1000 );
6
+
7
+ ?>
8
+ <div class="rtmedia-container" id="rtmedia_gallery_container_<?php echo $rand_id;?>">
9
  <?php do_action( 'rtmedia_before_media_gallery' ); ?>
10
  <?php
11
  $title = get_rtmedia_gallery_title();
templates/media/media-single.php CHANGED
@@ -28,8 +28,7 @@
28
  ?>
29
  <?php } else { ?>
30
 
31
- <span class="mfp-arrow mfp-arrow-left mfp-prevent-close rtm-lightbox-arrows" type="button"
32
- title="Previous Media"></span>
33
  <span class="mfp-arrow mfp-arrow-right mfp-prevent-close" type="button" title="Next Media"></span>
34
 
35
  <div class="rtmedia-media"
@@ -98,10 +97,6 @@
98
  <div class="rtmedia-item-comments">
99
  <div class="rtmedia-actions-before-comments clearfix">
100
  <?php do_action( 'rtmedia_actions_before_comments' ); ?>
101
- <?php if ( is_user_logged_in() ) { ?>
102
- <span><a href='#'
103
- class='rtmedia-comment-link'><?php esc_html_e( 'Comment', 'buddypress-media' ); ?></a></span>
104
- <?php } ?>
105
  </div>
106
  <div class="rtm-like-comments-info">
107
  <?php show_rtmedia_like_counts(); ?>
@@ -142,10 +137,6 @@
142
  <div class="rtmedia-item-comments">
143
  <div class="rtmedia-actions-before-comments clearfix">
144
  <?php do_action( 'rtmedia_actions_before_comments' ); ?>
145
- <?php if ( is_user_logged_in() ) { ?>
146
- <span><a href='#'
147
- class='rtmedia-comment-link'><?php esc_html_e( 'Comment', 'buddypress-media' ); ?></a></span>
148
- <?php } ?>
149
  </div>
150
 
151
  <div class="rtm-like-comments-info">
@@ -164,7 +155,7 @@
164
 
165
  <?php } ?>
166
  <?php } ?>
167
-
168
  <?php do_action( 'rtmedia_actions_after_comments_form' ); ?>
169
  </div>
170
  </div>
28
  ?>
29
  <?php } else { ?>
30
 
31
+ <span class="mfp-arrow mfp-arrow-left mfp-prevent-close rtm-lightbox-arrows" type="button" title="Previous Media"></span>
 
32
  <span class="mfp-arrow mfp-arrow-right mfp-prevent-close" type="button" title="Next Media"></span>
33
 
34
  <div class="rtmedia-media"
97
  <div class="rtmedia-item-comments">
98
  <div class="rtmedia-actions-before-comments clearfix">
99
  <?php do_action( 'rtmedia_actions_before_comments' ); ?>
 
 
 
 
100
  </div>
101
  <div class="rtm-like-comments-info">
102
  <?php show_rtmedia_like_counts(); ?>
137
  <div class="rtmedia-item-comments">
138
  <div class="rtmedia-actions-before-comments clearfix">
139
  <?php do_action( 'rtmedia_actions_before_comments' ); ?>
 
 
 
 
140
  </div>
141
 
142
  <div class="rtm-like-comments-info">
155
 
156
  <?php } ?>
157
  <?php } ?>
158
+
159
  <?php do_action( 'rtmedia_actions_after_comments_form' ); ?>
160
  </div>
161
  </div>
templates/upload/comment-media.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php if ( is_array( $tabs ) && count( $tabs ) ) {
2
+ if( isset( $attr['upload_parent_id_type'] ) && isset( $attr['upload_parent_id'] ) ){
3
+ $main_id = '-'.$attr['upload_parent_id_type'].'-'.$attr['upload_parent_id'];
4
+ }
5
+ ?>
6
+ <div class="rtmedia-container rtmedia-uploader-div">
7
+ <?php
8
+ if ( isset( $attr['rtmedia_simple_file_upload'] ) && true === $attr['rtmedia_simple_file_upload'] ) {
9
+ if ( isset( $attr['rtmedia_upload_without_form'] ) && true === $attr['rtmedia_upload_without_form'] ) { ?>
10
+ <div class="rtmedia-simple-file-upload">
11
+ <?php
12
+ } else { ?>
13
+ <form id="rtmedia-uploader-form<?php echo $main_id; ?>" method="post" action="upload" enctype="multipart/form-data">
14
+ <div class="rtmedia-simple-file-upload"><?php
15
+ }
16
+
17
+ RTMediaUploadView::upload_nonce_generator( true );
18
+
19
+ if ( ! empty( $attr ) ) {
20
+
21
+ foreach ( $attr as $key => $value ) {
22
+
23
+ if ( 'context' === $key ) {
24
+ echo '<input type="hidden" name="context" value="' . esc_attr( $value ). '" />';
25
+ } else if ( 'context_id' === $key ) {
26
+ echo '<input type="hidden" name="context_id" value="' .esc_attr( $value ) . '" />';
27
+ } else if ( 'privacy' === $key ) {
28
+ echo '<input type="hidden" name="privacy" value="' . esc_attr( $value ). '" />';
29
+ } else if ( 'album_id' === $key ) {
30
+ echo '<input type="hidden" name="album_id" value="' .esc_attr( $value ). '" />';
31
+ } else if ( 'title' === $key ) {
32
+ echo '<p class="rtmedia-file-upload-p rtmedia-file-upload-title"><input type="text" name="title" /></p>';
33
+ } else if ( 'description' === $key ) {
34
+ echo '<p class="rtmedia-file-upload-p rtmedia-file-upload-desc"><textarea name="description"></textarea></p>';
35
+ } else {
36
+ echo "<input type='hidden' id='rt_upload_hf_" . esc_attr( sanitize_key( $key ) ) .$main_id. "' value='" . esc_attr( $value ) . "' name ='" . esc_attr( $key ) . "' />";
37
+ }
38
+ }
39
+ }
40
+
41
+ if ( isset( $attr['rtmedia_upload_allow_multiple'] ) && true === $attr['rtmedia_upload_allow_multiple'] ) {
42
+ ?>
43
+ <div class="rtm-file-input-container"><p class="rtmedia-file-upload-p"><input type="file" name="rtmedia_file_multiple[]" multiple="true" class="rtm-simple-file-input" id="rtmedia_simple_file_input<?php echo $main_id; ?>" /></p></div><?php } else {
44
+ ?>
45
+ <div class="rtm-file-input-container"><p class="rtmedia-file-upload-p"><input type="file" name="rtmedia_file" class="rtm-simple-file-input" id="rtmedia_simple_file_input<?php echo $main_id; ?>" /></p></div><?php
46
+ }
47
+
48
+ do_action( 'rtmedia_add_upload_content' );
49
+
50
+ if ( isset( $attr['rtmedia_upload_without_form'] ) && true === $attr['rtmedia_upload_without_form'] ) { ?>
51
+ </div>
52
+ <?php
53
+ } else { ?>
54
+ <p><input type="submit" name="rtmedia_simple_file_upload_submit" /></p>
55
+ </div>
56
+ </form><?php
57
+ }
58
+ } else { ?>
59
+ <div class="rtmedia-uploader no-js">
60
+ <div id="rtmedia-uploader-form<?php echo $main_id; ?>">
61
+ <?php do_action( 'rtmedia_before_uploader' ); ?>
62
+
63
+ <div class="rtm-tab-content-wrapper">
64
+ <div id="rtm-<?php echo esc_attr( $mode ); ?>-ui<?php echo $main_id; ?>" class="rtm-tab-content">
65
+ <?php
66
+ do_action( 'rtmedia_before_' . $mode . '_ui' );
67
+ //it is outputting html and make sure content is escaping proper while setting.
68
+ echo $tabs[ $mode ][ $upload_type ]['content']; // @codingStandardsIgnoreLine
69
+ echo '<input type="hidden" name="mode" value="' . esc_attr( $mode ). '" />';
70
+ do_action( 'rtmedia_after_' . $mode . '_ui', $attr );
71
+ ?>
72
+ </div>
73
+ </div>
74
+
75
+ <?php do_action( 'rtmedia_after_uploader' ); ?>
76
+
77
+ <?php RTMediaUploadView::upload_nonce_generator( true ); ?>
78
+
79
+ <?php
80
+ global $rtmedia_interaction;
81
+
82
+ if ( ! empty( $attr ) ) {
83
+
84
+ foreach ( $attr as $key => $value ) {
85
+ if ( 'context' === $key ) {
86
+ }
87
+ if ( 'context_id' === $key ) {
88
+ echo '<input type="hidden" name="context_id" value="' . esc_attr( $value ) . '" />'; }
89
+ if ( 'privacy' === $key )
90
+ {
91
+ }
92
+ if ( 'album_id' === $key ) {
93
+ echo '<input type="hidden" name="album_id" value="' . esc_attr( $value ). '" />';
94
+ }
95
+ }
96
+ }
97
+ ?>
98
+ <input type="submit" id='rtMedia-start-upload<?php echo $main_id; ?>' name="rtmedia-upload" value="<?php echo esc_attr( RTMEDIA_UPLOAD_LABEL ); ?>" />
99
+ </div>
100
+ </div>
101
+ <?php
102
+ }
103
+ ?>
104
+ </div>
105
+ <?php
106
+ }