rtMedia for WordPress, BuddyPress and bbPress - Version 3.6.10

Version Description

  • Update German and Swedish translations
  • JS fix for WordPress 3.9 Beta
  • Bug fixes
Download this release

Release Info

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

Code changes from version 3.6.9 to 3.6.10

app/admin/RTMediaAdmin.php CHANGED
@@ -91,6 +91,7 @@ if ( ! class_exists ( 'RTMediaAdmin' ) ) {
91
  add_action ( 'admin_init', array( $this, 'rtmedia_bp_add_update_type' ) );
92
  add_action ( 'admin_notices', array( $this, 'rtmedia_inspirebook_release_notice' ) );
93
  add_action ( 'wp_ajax_rtmedia_hide_inspirebook_release_notice', array( $this, 'rtmedia_hide_inspirebook_release_notice' ), 1 );
 
94
  }
95
 
96
  function rtmedia_inspirebook_release_notice() {
91
  add_action ( 'admin_init', array( $this, 'rtmedia_bp_add_update_type' ) );
92
  add_action ( 'admin_notices', array( $this, 'rtmedia_inspirebook_release_notice' ) );
93
  add_action ( 'wp_ajax_rtmedia_hide_inspirebook_release_notice', array( $this, 'rtmedia_hide_inspirebook_release_notice' ), 1 );
94
+ $rtmedia_media_import = new RTMediaMediaSizeImporter(); // do not delete this line. We only need to create object of this class if we are in admin section
95
  }
96
 
97
  function rtmedia_inspirebook_release_notice() {
app/admin/RTMediaFormHandler.php CHANGED
@@ -448,7 +448,10 @@ class RTMediaFormHandler {
448
  $render_data = self::types_render_options($options);
449
  ?>
450
  <div class="postbox metabox-holder">
451
- <h3 class="hndle"><span>Media Types Settings</span></h3>
 
 
 
452
  </div>
453
  <div class="rt-table large-12">
454
  <div class="row rt-header">
@@ -470,7 +473,7 @@ class RTMediaFormHandler {
470
  else {
471
  echo '<div class="row rt-even">';
472
  }
473
- echo '<div class="row">';
474
  do_action("rtmedia_type_settings_before_body");
475
  echo '<div class="columns large-4">' . $section['name'] . '</div>';
476
  $args = array('key' => 'allowedTypes_'.$key.'_enabled', 'value' => $section['enabled']);
@@ -496,7 +499,7 @@ class RTMediaFormHandler {
496
  echo '<label class="columns large-3">'.__("File Extensions","rtmedia").':</label>';
497
  echo '<label class="columns large-9 rtmedia_type_settings_filter_extension">' . $extensions . '</label>';
498
  echo '</div>';
499
- echo '</div>';
500
  } else {
501
  echo "<input type='hidden' value='1' name='rtmedia-options[allowedTypes_" . $key . "_enabled]'>";
502
  echo "<input type='hidden' value='0' name='rtmedia-options[allowedTypes_" . $key . "_featured]'>";
@@ -877,7 +880,7 @@ class RTMediaFormHandler {
877
  if( $i == 1){ $active_class = 'active';} $i++;
878
  if ( isset ( $tab[ 'icon' ] ) && ! empty ( $tab[ 'icon' ] ) )
879
  $icon = '<i class="' . $tab[ 'icon' ] . '"></i>';
880
- echo '<dd class="' . $active_class . '"><a id="tab-' . substr ( $tab[ 'href' ], 1 ) . '" title="' . $tab[ 'title' ] . '" href="' . $tab[ 'href' ] . '" class="rtmedia-tab-title ' . sanitize_title ( $tab[ 'name' ] ) . '">' . $icon . ' ' . $tab[ 'name' ] . '</a></dd>';
881
  }
882
  echo "</dl>";
883
  ?>
448
  $render_data = self::types_render_options($options);
449
  ?>
450
  <div class="postbox metabox-holder">
451
+ <h3 class="hndle">
452
+ <span>Media Types Settings</span>
453
+ <?php do_action( 'rtmedia_media_type_setting_message' ); ?>
454
+ </h3>
455
  </div>
456
  <div class="rt-table large-12">
457
  <div class="row rt-header">
473
  else {
474
  echo '<div class="row rt-even">';
475
  }
476
+
477
  do_action("rtmedia_type_settings_before_body");
478
  echo '<div class="columns large-4">' . $section['name'] . '</div>';
479
  $args = array('key' => 'allowedTypes_'.$key.'_enabled', 'value' => $section['enabled']);
499
  echo '<label class="columns large-3">'.__("File Extensions","rtmedia").':</label>';
500
  echo '<label class="columns large-9 rtmedia_type_settings_filter_extension">' . $extensions . '</label>';
501
  echo '</div>';
502
+
503
  } else {
504
  echo "<input type='hidden' value='1' name='rtmedia-options[allowedTypes_" . $key . "_enabled]'>";
505
  echo "<input type='hidden' value='0' name='rtmedia-options[allowedTypes_" . $key . "_featured]'>";
880
  if( $i == 1){ $active_class = 'active';} $i++;
881
  if ( isset ( $tab[ 'icon' ] ) && ! empty ( $tab[ 'icon' ] ) )
882
  $icon = '<i class="' . $tab[ 'icon' ] . '"></i>';
883
+ echo '<dd class="' . $active_class . '"><a id="tab-' . substr ( $tab[ 'href' ], 1 ) . '" title="' . $tab[ 'title' ] . '" href="' . $tab[ 'href' ] . '" class="rtmedia-tab-title ' . sanitize_title ( $tab[ 'name' ] ) . '">' . $icon . $tab[ 'name' ] . '</a></dd>';
884
  }
885
  echo "</dl>";
886
  ?>
app/assets/css/admin.css CHANGED
@@ -589,8 +589,6 @@ float:left;
589
  border-bottom-color: #F3F3F3;
590
  border-bottom-width: 1px;
591
  border-bottom-style: solid;
592
- margin-bottom: 5px !important;
593
- padding-bottom: 5px !important;
594
  }
595
  /* line 39, ../sass/admin.scss */
596
  .rt-table div.rt-header h4 {
@@ -684,7 +682,7 @@ abbr {
684
 
685
  .bp-media-admin .premium-page-container .rtm-premium-icon-pro {
686
  margin-top: 9px;
687
- width: 40px;
688
  }
689
  #TB_window #rtmedia-addon-add-container #rtmedia-flat-50-message, #TB_window #rtmedia-addon-add-container #rtmedia-flat-50-link,#TB_window #rtmedia-addon-add-container #rtmedia-flat-50-code {
690
  text-align: center;
589
  border-bottom-color: #F3F3F3;
590
  border-bottom-width: 1px;
591
  border-bottom-style: solid;
 
 
592
  }
593
  /* line 39, ../sass/admin.scss */
594
  .rt-table div.rt-header h4 {
682
 
683
  .bp-media-admin .premium-page-container .rtm-premium-icon-pro {
684
  margin-top: 9px;
685
+ min-width: 50px;
686
  }
687
  #TB_window #rtmedia-addon-add-container #rtmedia-flat-50-message, #TB_window #rtmedia-addon-add-container #rtmedia-flat-50-link,#TB_window #rtmedia-addon-add-container #rtmedia-flat-50-code {
688
  text-align: center;
app/assets/js/rtMedia.backbone.js CHANGED
@@ -3,19 +3,19 @@ var nextpage = 2;
3
  var upload_sync = false;
4
  var activity_id = -1;
5
  var uploaderObj;
6
- var objUploadView ;
7
  var rtmedia_load_template_flag = true;
8
 
9
- jQuery(function($) {
10
 
11
  var o_is_album, o_is_edit_allowed;
12
- if (typeof(is_album) == "undefined") {
13
- o_is_album = new Array("");
14
  } else {
15
  o_is_album = is_album
16
  }
17
- if (typeof(is_edit_allowed) == "undefined") {
18
- o_is_edit_allowed = new Array("")
19
  } else {
20
  o_is_edit_allowed = is_edit_allowed;
21
  }
@@ -24,10 +24,10 @@ jQuery(function($) {
24
 
25
  rtMedia = window.rtMedia || {};
26
 
27
- rtMedia.Context = Backbone.Model.extend({
28
- url: function() {
29
  var url = rtmedia_media_slug + "/";
30
- if (!upload_sync && nextpage > 0)
31
  url += 'pg/' + nextpage + '/'
32
  return url;
33
  },
@@ -35,9 +35,9 @@ jQuery(function($) {
35
  "context": "post",
36
  "context_id": false
37
  }
38
- });
39
 
40
- rtMedia.Media = Backbone.Model.extend({
41
  defaults: {
42
  "id": 0,
43
  "blog_id": false,
@@ -59,248 +59,255 @@ jQuery(function($) {
59
  "width": 0,
60
  "height": 0,
61
  "rt_permalink": false
62
- // "next" : -1,
63
- // "prev" : -1
64
  }
65
 
66
- });
67
 
68
- rtMedia.Gallery = Backbone.Collection.extend({
69
  model: rtMedia.Media,
70
- url: function() {
71
  var temp = window.location.pathname;
72
  var url = '';
73
- if (temp.indexOf("/" + rtmedia_media_slug + "/") == -1) {
74
  url = rtmedia_media_slug + '/';
75
  } else {
76
- if (temp.indexOf('pg/') == -1)
77
  url = temp;
78
  else
79
- url = window.location.pathname.substr(0, window.location.pathname.lastIndexOf("pg/"));
80
  }
81
- if (!upload_sync && nextpage > 1) {
82
- if (url.substr(url.length - 1) != "/")
83
  url += "/"
84
  url += 'pg/' + nextpage + '/';
85
  }
86
  return url;
87
  },
88
- getNext: function(page, el, element) {
89
- that = this;
90
- if( rtmedia_load_template_flag == true ) {
91
- $("#rtmedia-gallery-item-template").load(template_url, {
92
- backbone: true,
93
- is_album: o_is_album,
94
- is_edit_allowed: o_is_edit_allowed
95
- },function(){
96
- rtmedia_load_template_flag = false;
97
- that.getNext();
98
- });
99
- }
100
- if( !rtmedia_load_template_flag ) {
101
- var query = {
102
- json: true,
103
- rtmedia_page: nextpage
104
- };
105
- if (el == undefined){
106
- el = jQuery(".rtmedia-list").parent().parent();
107
- }
108
- if (el != undefined) {
109
- if(element != undefined) {
110
- $(element).parent().parent().prevAll("input[type=hidden]").each(function(e) {
111
- query[$(this).attr("name")] = $(this).val();
112
- });
113
- } else {
114
- $(el).find("input[type=hidden]").each(function(e) {
115
- query[$(this).attr("name")] = $(this).val();
116
- });
117
- }
118
-
119
- }
120
- this.fetch({
121
- data: query,
122
- success: function(model, response) {
123
- jQuery('.rtm-media-loading').hide();
124
- var list_el = "";
125
- if(typeof(element) === "undefined" )
126
- list_el = $(".rtmedia-list")[0];
127
- else
128
- list_el = element.parent().siblings('.rtmedia-list');
129
- nextpage = response.next;
130
- var galleryViewObj = new rtMedia.GalleryView({
131
- collection: new rtMedia.Gallery(response.data),
132
- el: list_el
133
- });
134
- //element.show();
135
- }
136
- });
137
- }
 
 
 
138
  },
139
- reloadView: function() {
140
  upload_sync = true;
141
  nextpage = 1;
142
  this.getNext();
143
  }
144
 
145
 
146
- });
147
 
148
- rtMedia.MediaView = Backbone.View.extend({
149
  tagName: 'li',
150
  className: 'rtmedia-list-item',
151
- initialize: function() {
152
- this.template = _.template($("#rtmedia-gallery-item-template").html());
153
- this.model.bind('change', this.render);
154
- this.model.bind('remove', this.unrender);
155
  this.render();
156
  },
157
- render: function() {
158
- $(this.el).html(this.template(this.model.toJSON()));
159
  return this.el;
160
  },
161
- unrender: function() {
162
- $(this.el).remove();
163
  },
164
- remove: function() {
165
  this.model.destroy();
166
  }
167
- });
168
 
169
- rtMedia.GalleryView = Backbone.View.extend({
170
  tagName: 'ul',
171
  className: 'rtmedia-list',
172
- initialize: function() {
173
- this.template = _.template($("#rtmedia-gallery-item-template").html());
174
  this.render();
175
  },
176
- render: function() {
177
 
178
  that = this;
179
 
180
- if (upload_sync) {
181
- $(that.el).html('');
182
  }
183
 
184
- $.each(this.collection.toJSON(), function(key, media) {
185
- $(that.el).append(that.template(media));
186
- });
187
- if (upload_sync) {
188
  upload_sync = false;
189
  }
190
- if (nextpage > 1) {
191
- $(that.el).siblings('.rtmedia_next_prev').children('#rtMedia-galary-next').show();
192
- //$("#rtMedia-galary-next").show();
193
  }
194
 
195
 
196
  },
197
- appendTo: function(media) {
198
  //console.log("append");
199
- var mediaView = new rtMedia.MediaView({
200
  model: media
201
- });
202
- $(this.el).append(mediaView.render().el);
203
  }
204
- });
205
 
206
 
207
  galleryObj = new rtMedia.Gallery();
208
 
209
- $("body").append('<script id="rtmedia-gallery-item-template" type="text/template"></script>');
210
 
211
- $(document).on("click", "#rtMedia-galary-next", function(e) {
212
  $( this ).before( "<div class='rtm-media-loading'><img src='" + rMedia_loading_media + "' /></div>" );
213
- $(this).hide();
214
- e.preventDefault();
215
- galleryObj.getNext(nextpage, $(this).parent().parent().parent(), $(this));
216
- });
217
-
218
-
219
 
220
 
221
- if (window.location.pathname.indexOf(rtmedia_media_slug) != -1) {
222
- var tempNext = window.location.pathname.substring(window.location.pathname.lastIndexOf("pg/") + 5, window.location.pathname.lastIndexOf("/"));
223
- if (isNaN(tempNext) === false) {
224
- nextpage = parseInt(tempNext) + 1;
225
  }
226
  }
227
 
228
 
229
-
230
- window.UploadView = Backbone.View.extend({
231
  events: {
232
  "click #rtMedia-start-upload": "uploadFiles"
233
  },
234
- initialize: function(config) {
235
- this.uploader = new plupload.Uploader(config);
236
  },
237
- render: function() {
238
 
239
  },
240
- initUploader: function(a) {
241
-
242
- if(typeof(a)!=="undefined") a=false;// if rtmediapro widget calls the function, dont show max size note.
243
  this.uploader.init();
244
  //The plupload HTML5 code gives a negative z-index making add files button unclickable
245
- $(".plupload.html5").css({
246
  zIndex: 0
247
- });
248
- $("#rtMedia-upload-button").css({
249
  zIndex: 2
250
- });
251
- if(a!==false){
252
- window.file_size_info = rtmedia_max_file_msg + " : " + this.uploader.settings.max_file_size_msg ;
253
- window.file_extn_info = rtmedia_allowed_file_formats + " : " + this.uploader.settings.filters[0].extensions;
 
 
 
 
 
254
  var info = window.file_size_info + ", " + window.file_extn_info;
255
- $(".rtm-file-size-limit").attr('title', info);
256
- //$("#rtMedia-upload-button").after("<span>( <strong>" + rtmedia_max_file_msg + "</strong> "+ this.uploader.settings.max_file_size_msg + ")</span>");
257
  }
258
 
259
  return this;
260
  },
261
- uploadFiles: function(e) {
262
- if (e != undefined)
263
  e.preventDefault();
264
  this.uploader.start();
265
  return false;
266
  }
267
 
268
- });
269
-
270
 
271
 
272
- if ($("#rtMedia-upload-button").length > 0) {
273
- if( typeof rtmedia_upload_type_filter == "object" && rtmedia_upload_type_filter.length > 0 ) {
274
- rtMedia_plupload_config.filters[0].extensions = rtmedia_upload_type_filter.join();
275
- }
276
- uploaderObj = new UploadView(rtMedia_plupload_config);
 
 
 
 
277
 
278
  uploaderObj.initUploader();
279
 
280
 
281
- uploaderObj.uploader.bind('UploadComplete', function(up, files) {
282
- activity_id = -1;
283
- if( typeof rtmedia_gallery_reload_on_upload != "undefined" && rtmedia_gallery_reload_on_upload =='1'){ //reload gallery view when upload completes if enabled( by default enabled)
284
  galleryObj.reloadView();
285
  }
286
- jQuery('.start-media-upload').hide();
287
- });
288
 
289
- uploaderObj.uploader.bind('FilesAdded', function(up, files) {
290
  var upload_size_error = false;
291
  var upload_error = "";
292
  var upload_error_sep = "";
293
- var upload_remove_array= [];
294
- $.each(files, function(i, file) {
295
- var hook_respo = rtMediaHook.call('rtmedia_js_file_added', [up,file, "#rtMedia-queue-list tbody"]);
296
- if( hook_respo == false){
297
  file.status = -1;
298
- upload_remove_array.push(file.id);
299
  return true;
300
  }
301
- jQuery('.rtmedia-upload-input').attr('value', rtmedia_add_more_files_msg);
302
- jQuery('.start-media-upload').show();
303
- if (uploaderObj.uploader.settings.max_file_size < file.size) {
304
  // upload_size_error = true
305
  // upload_error += upload_error_sep + file.name;
306
  // upload_error_sep = ",";
@@ -308,219 +315,228 @@ jQuery(function($) {
308
  // $("#rtMedia-queue-list tbody").append(tr);
309
  return true;
310
  }
311
- var tmp_array = file.name.split(".");
312
- var ext_array = uploaderObj.uploader.settings.filters[0].extensions.split(',');
313
- if(tmp_array.length > 1){
314
- var ext= tmp_array[tmp_array.length - 1];
315
- ext = ext.toLowerCase();
316
- if( jQuery.inArray( ext ,ext_array) === -1){
 
 
 
 
317
  return true;
318
  }
319
- }else{
320
  return true;
321
  }
322
 
323
- uploaderObj.uploader.settings.filters[0].title;
324
- tdName = document.createElement("td");
325
- tdName.innerHTML = file.name;
 
 
 
 
326
  tdName.className = "plupload_file_name";
327
- tdStatus = document.createElement("td");
328
  tdStatus.className = "plupload_file_status";
329
  tdStatus.innerHTML = rtmedia_waiting_msg;
330
- tdSize = document.createElement("td");
331
  tdSize.className = "plupload_file_size";
332
- tdSize.innerHTML = plupload.formatSize(file.size);
333
- tdDelete = document.createElement("td");
334
  tdDelete.innerHTML = "<span class='remove-from-queue'>&times;</span>";
335
  tdDelete.title = rtmedia_close;
336
  tdDelete.className = "close plupload_delete";
337
- tdEdit = document.createElement("td");
338
  tdEdit.innerHTML = "";
339
  tdEdit.className = "plupload_media_edit";
340
- tr = document.createElement("tr");
341
  tr.className = 'upload-waiting';
342
  tr.id = file.id;
343
- tr.appendChild(tdName);
344
- tr.appendChild(tdStatus);
345
- tr.appendChild(tdSize);
346
- tr.appendChild(tdEdit);
347
- tr.appendChild(tdDelete);
348
- $("#rtMedia-queue-list").append(tr);
349
  //Delete Function
350
- $("#" + file.id + " td.plupload_delete .remove-from-queue").click(function(e) {
351
  e.preventDefault();
352
- uploaderObj.uploader.removeFile(up.getFile(file.id));
353
- $("#" + file.id).remove();
 
354
  return false;
355
- });
356
 
357
- });
358
- $.each(upload_remove_array, function(i, rfile) {
359
- if(up.getFile(rfile))
360
- up.removeFile(up.getFile(rfile));
361
- });
362
 
363
  // if (upload_size_error) {
364
  // // alert(upload_error + " because max file size is " + plupload.formatSize(uploaderObj.uploader.settings.max_file_size) );
365
  // }
366
- });
367
 
368
- uploaderObj.uploader.bind('Error', function(up, err) {
369
 
370
- if(err.code== -600){ //file size error // if file size is greater than server's max allowed size
371
  var tmp_array;
372
  var ext = tr = '';
373
- tmp_array = err.file.name.split(".");
374
- if(tmp_array.length > 1){
375
- ext= tmp_array[tmp_array.length - 1];
376
- if( !(typeof(up.settings.upload_size) != "undefined" && typeof(up.settings.upload_size[ext]) != "undefined" && typeof(up.settings.upload_size[ext]['size']) )){
377
- tr = "<tr class='upload-error'><td>" + err.file.name + "</td><td> " + rtmedia_max_file_msg + plupload.formatSize( up.settings.max_file_size / 1024 * 1024) + " <i class='rtmicon-info-circle' title='" + window.file_size_info + "'></i></td><td>" + plupload.formatSize(err.file.size) + "</td><td></td><td class='close error_delete'>&times;</td></tr>";
378
  }
379
  }
380
  //append the message to the file queue
381
- $("#rtMedia-queue-list tbody").append(tr);
382
  }
383
  else {
384
 
385
- if( err.code == -601) { // file extension error
386
  err.message = rtmedia_file_extension_error_msg;
387
  }
388
- var tr = "<tr class='upload-error'><td>" + (err.file ? err.file.name : "") + "</td><td>" + err.message + " <i class='rtmicon-info-circle' title='" + window.file_extn_info + "'></i></td><td>" + plupload.formatSize(err.file.size) + "</td><td></td><td class='close error_delete'>&times;</td></tr>";
389
- $("#rtMedia-queue-list tbody").append(tr);
390
  }
391
 
392
- jQuery('.error_delete').on('click',function(e){
393
  e.preventDefault();
394
- jQuery(this).parent('tr').remove();
395
- });
396
  return false;
397
 
398
- });
399
 
400
- jQuery('.start-media-upload').on('click', function(e){
401
  e.preventDefault();
402
  uploaderObj.uploadFiles();
403
- });
404
 
405
- uploaderObj.uploader.bind('QueueChanged', function(up) {
406
 
407
  // jQuery('.rtmedia-upload-input').attr('value','Add more files');
408
  // jQuery('.start-media-upload').show();
409
 
410
- });
411
 
412
- uploaderObj.uploader.bind('UploadProgress', function(up, file) {
413
  //$("#" + file.id + " .plupload_file_status").html(file.percent + "%");
414
- $("#" + file.id + " .plupload_file_status").html( rtmedia_uploading_msg + '( ' + file.percent + '% )');
415
- $("#" + file.id).addClass('upload-progress');
416
- if (file.percent == 100) {
417
- $("#" + file.id).toggleClass('upload-success');
418
- }
419
- });
420
- uploaderObj.uploader.bind('BeforeUpload', function(up, file) {
421
- var privacy = $("#rtm-file_upload-ui select.privacy").val();
422
- if(privacy !== undefined) {
423
- up.settings.multipart_params.privacy = $("#rtm-file_upload-ui select.privacy").val();
424
- }
425
- if (jQuery("#rt_upload_hf_redirect").length > 0)
426
  up.settings.multipart_params.redirect = up.files.length;
427
- jQuery("#rtmedia-uploader-form input[type=hidden]").each(function() {
428
- up.settings.multipart_params[$(this).attr("name")] = $(this).val();
429
- });
430
  up.settings.multipart_params.activity_id = activity_id;
431
- if ($('#rtmedia-uploader-form .rtmedia-user-album-list').length > 0)
432
- up.settings.multipart_params.album_id = $('#rtmedia-uploader-form .rtmedia-user-album-list').find(":selected").val();
433
- else if ($('#rtmedia-uploader-form .rtmedia-current-album').length > 0)
434
- up.settings.multipart_params.album_id = $('#rtmedia-uploader-form .rtmedia-current-album').val();
435
- });
436
-
437
- uploaderObj.uploader.bind('FileUploaded', function(up, file, res) {
438
- if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { //test for MSIE x.x;
439
- var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number
440
-
441
- if(ieversion <10) {
442
- if( typeof res.response !== "undefined" )
443
- res.status = 200;
444
- }
445
  }
446
  var rtnObj;
447
- try {
448
 
449
- rtnObj = JSON.parse(res.response);
450
  uploaderObj.uploader.settings.multipart_params.activity_id = rtnObj.activity_id;
451
  activity_id = rtnObj.activity_id;
452
- if(rtnObj.permalink != ''){
453
- $("#" + file.id + " .plupload_file_name").html("<a href='" + rtnObj.permalink + "' target='_blank' title='" + rtnObj.permalink + "'>" + file.name + "</a>");
454
- $("#" + file.id + " .plupload_media_edit").html("<a href='" + rtnObj.permalink + "edit' target='_blank'><span title='" + rtmedia_edit_media + "'><i class='rtmicon-edit'></i> " + rtmedia_edit + "</span></a>");
455
- $("#" + file.id + " .plupload_delete").html("<span id='" + rtnObj.media_id + "' class='rtmedia-delete-uploaded-media' title='" + rtmedia_delete + "'>&times;</span>");
456
  }
457
 
458
- } catch (e) {
459
  // console.log('Invalid Activity ID');
460
  }
461
- if (res.status == 200 || res.status == 302) {
462
- if (uploaderObj.upload_count == undefined)
463
  uploaderObj.upload_count = 1;
464
  else
465
  uploaderObj.upload_count++;
466
 
467
- if (uploaderObj.upload_count == up.files.length && jQuery("#rt_upload_hf_redirect").length > 0 && jQuery.trim(rtnObj.redirect_url.indexOf("http") == 0)) {
468
  window.location = rtnObj.redirect_url;
469
  }
470
 
471
- $("#" + file.id + " .plupload_file_status").html( rtmedia_uploaded_msg);
472
-
473
- }else {
474
- $("#" + file.id + " .plupload_file_status").html( rtmedia_upload_failed_msg );
475
  }
476
 
477
  files = up.files;
478
  lastfile = files[files.length - 1];
479
 
480
 
481
- });
482
 
483
  uploaderObj.uploader.refresh();//refresh the uploader for opera/IE fix on media page
484
 
485
- $("#rtMedia-start-upload").click(function(e) {
486
- uploaderObj.uploadFiles(e);
487
- });
488
- $("#rtMedia-start-upload").hide();
489
 
490
- jQuery(document).on('click', '#rtm_show_upload_ui', function(){
491
- jQuery('#rtm-media-gallery-uploader').slideToggle();
492
  uploaderObj.uploader.refresh();//refresh the uploader for opera/IE fix on media page
493
- jQuery('#rtm_show_upload_ui').toggleClass('primary');
494
- });
495
  } else {
496
- jQuery(document).on('click', '#rtm_show_upload_ui', function(){
497
- jQuery('#rtm-media-gallery-uploader').slideToggle();
498
- jQuery('#rtm_show_upload_ui').toggleClass('primary');
499
- });
500
  }
501
 
502
- jQuery(document).on( 'click','.plupload_delete .rtmedia-delete-uploaded-media',function(){
503
- var that = $(this);
504
- if(confirm(rtmedia_delete_uploaded_media)){
505
- var nonce = $('#rtmedia-upload-container #rtmedia_media_delete_nonce').val();
506
- var media_id = $(this).attr('id');
507
  var data = {
508
- action : 'delete_uploaded_media',
509
- nonce : nonce,
510
- media_id : media_id
511
  }
512
 
513
- $.post( ajaxurl, data, function(response){
514
- if(response == '1'){
515
- that.closest('tr').remove();
516
- $('#'+media_id).remove();
517
  }
518
- });
519
  }
520
- });
521
 
522
 
523
- });
524
  /** History Code for route
525
 
526
  var rtMediaRouter = Backbone.Router.extend({
@@ -539,180 +555,190 @@ jQuery(function($) {
539
 
540
  /** Activity Update Js **/
541
 
542
- jQuery(document).ready(function($) {
543
 
544
  //handling the "post update: button on activity page
545
- jQuery('#aw-whats-new-submit').removeAttr('disabled');
546
- jQuery(document).on( "blur",'#whats-new', function(){
547
- setTimeout(function(){ jQuery('#aw-whats-new-submit').removeAttr('disabled'); },100);
548
- });
549
- jQuery('#aw-whats-new-submit').on('click', function(e){
550
- setTimeout(function(){ jQuery('#aw-whats-new-submit').removeAttr('disabled'); },100);
551
- });
 
 
 
 
552
 
553
  // when user changes the value in activity "post in" dropdown, hide the privacy dropdown and show when posting in profile.
554
- jQuery('#whats-new-post-in').on('change', function(e){
555
- if( jQuery(this).val() == '0' ){
556
- jQuery("#rtmedia-action-update .privacy").prop('disabled',false).show();
557
- }else{
558
- jQuery("#rtmedia-action-update .privacy").prop('disabled',true).hide();
559
  }
560
- });
561
 
562
- if (typeof rtMedia_update_plupload_config == 'undefined') {
563
  return false;
564
  }
565
  var activity_attachemnt_ids = [];
566
- if ($("#rtmedia-add-media-button-post-update").length > 0) {
567
- $("#whats-new-options").prepend($("#rtmedia-action-update"));
568
- if ($("#rtm-file_upload-ui .privacy").length > 0) {
569
- $("#rtmedia-action-update").append($("#rtm-file_upload-ui .privacy"));
570
  }
571
  }
572
- objUploadView = new UploadView(rtMedia_update_plupload_config);
573
- $("#whats-new-form").on('click', '#rtmedia-add-media-button-post-update', function(e) {
574
  objUploadView.uploader.refresh();
575
- });
576
  //whats-new-post-in
577
 
578
  objUploadView.upload_remove_array = [];
579
- objUploadView.uploader.bind('FilesAdded', function(upl, rfiles) {
580
  //$("#aw-whats-new-submit").attr('disabled', 'disabled');
581
 
582
- $.each(rfiles, function(i, file) {
583
- var hook_respo = rtMediaHook.call('rtmedia_js_file_added', [upl,file, "#rtMedia-queue-list tbody"]);
584
- if( hook_respo == false){
585
- file.status = -1;
586
- objUploadView.upload_remove_array.push(file.id);
587
- return true;
588
  }
589
- if (objUploadView.uploader.settings.max_file_size < file.size) {
590
  return true;
591
  }
592
- var tmp_array = file.name.split(".");
593
- var ext_array = objUploadView.uploader.settings.filters[0].extensions.split(',');
594
- if(tmp_array.length > 1){
595
- var ext= tmp_array[tmp_array.length - 1];
596
- ext = ext.toLowerCase();
597
- if( jQuery.inArray( ext ,ext_array) === -1){
 
 
 
 
598
  return true;
599
  }
600
- }else{
601
  return true;
602
  }
603
- tdName = document.createElement("td");
604
- tdName.innerHTML = file.name;
605
- tdStatus = document.createElement("td");
606
  tdStatus.className = "plupload_file_status";
607
  tdStatus.innerHTML = rtmedia_waiting_msg;
608
- tdSize = document.createElement("td");
609
  tdSize.className = "plupload_file_size";
610
- tdSize.innerHTML = plupload.formatSize(file.size);
611
- tdDelete = document.createElement("td");
612
  tdDelete.innerHTML = "&times;";
613
  tdDelete.title = rtmedia_remove_from_queue;
614
  tdDelete.className = "close plupload_delete";
615
- tdEdit = document.createElement("td");
616
  tdEdit.innerHTML = "";
617
- tr = document.createElement("tr");
618
  tr.className = 'upload-waiting';
619
  tr.id = file.id;
620
- tr.appendChild(tdName);
621
- tr.appendChild(tdStatus);
622
- tr.appendChild(tdSize);
623
- tr.appendChild(tdEdit);
624
- tr.appendChild(tdDelete);
625
- jQuery('#whats-new-content').css('padding-bottom','0px');
626
- $("#rtm-upload-start-notice").css('display','block'); // show the file upload notice to the user
627
- $("#rtMedia-queue-list").append(tr);
628
- $("#" + file.id + " td.plupload_delete").click(function(e) {
629
- e.preventDefault();
630
- objUploadView.uploader.removeFile(upl.getFile(file.id));
631
- $("#" + file.id).remove();
632
- return false;
633
- });
634
- });
635
 
636
- $.each(objUploadView.upload_remove_array, function(i, rfile) {
637
- if(upl.getFile(rfile))
638
- upl.removeFile(upl.getFile(rfile));
639
- });
640
- });
641
 
642
- objUploadView.uploader.bind('FileUploaded', function(up, file, res) {
643
- if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)) { //test for MSIE x.x;
644
- var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number
645
 
646
- if(ieversion <10) {
647
  try {
648
- if( typeof JSON.parse(res.response) !== "undefined" )
649
  res.status = 200;
650
  }
651
- catch(e){}
 
652
  }
653
  }
654
 
655
- if (res.status == 200) {
656
  try {
657
- var objIds = JSON.parse(res.response);
658
- $.each(objIds, function(key, val) {
659
- activity_attachemnt_ids.push(val);
660
- if ($("#whats-new-form").find("#rtmedia_attached_id_" + val).length < 1) {
661
- $("#whats-new-form").append("<input type='hidden' name='rtMedia_attached_files[]' data-mode='rtMedia-update' id='rtmedia_attached_id_" + val + "' value='"
662
- + val + "' />");
663
  }
664
- });
665
- } catch (e) {
666
 
667
  }
 
668
  }
669
- });
670
-
671
- objUploadView.uploader.bind('Error', function(up, err) {
672
-
673
- if(err.code== -600){ //file size error // if file size is greater than server's max allowed size
674
- var tmp_array;
675
- var ext = tr = '';
676
- tmp_array = err.file.name.split(".");
677
- if(tmp_array.length > 1){
678
-
679
- ext= tmp_array[tmp_array.length - 1];
680
- 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 ))){
681
- tr = "<tr class='upload-error'><td>" + err.file.name + "(" + plupload.formatSize(err.file.size) + ")" + "</td><td> " + rtmedia_max_file_msg + plupload.formatSize( up.settings.max_file_size / 1024 * 1024) + " <i class='rtmicon-info-circled' title='" + window.file_size_info + "'></i></td><td>" + plupload.formatSize(err.file.size) + "</td><td></td><td class='close error_delete'>&times;</td></tr>";
682
- }
683
- }
684
- //append the message to the file queue
685
- $("#rtMedia-queue-list tbody").append(tr);
686
- }
687
- else {
688
- if( err.code == -601) { // file extension error
689
- err.message = rtmedia_file_extension_error_msg;
690
- }
691
- var tr = "<tr class='upload-error'><td>" + (err.file ? err.file.name : "") + "</td><td>" + err.message + " <i class='rtmicon-info-circled' title='" + window.file_extn_info + "'></i></td><td>" + plupload.formatSize(err.file.size) + "</td><td></td><td class='close error_delete'>&times;</td></tr>";
692
- $("#rtMedia-queue-list tbody").append(tr);
693
- }
694
-
695
- jQuery('.error_delete').on('click',function(e){
696
- e.preventDefault();
697
- jQuery(this).parent('tr').remove();
698
- });
699
- $("#rtm-upload-start-notice").css('display','block'); // show the file upload notice to the user
700
- return false;
701
 
702
- });
703
 
704
- objUploadView.uploader.bind('BeforeUpload', function(up, files) {
705
 
706
- $.each(objUploadView.upload_remove_array, function(i, rfile) {
707
- if(up.getFile(rfile))
708
- up.removeFile(up.getFile(rfile));
709
- });
710
 
711
  var object = '';
712
- var item_id = jq("#whats-new-post-in").val();
713
- if (item_id == undefined)
714
  item_id = 0;
715
- if (item_id > 0) {
716
  object = "group";
717
  } else {
718
  object = "profile";
@@ -721,60 +747,66 @@ jQuery(document).ready(function($) {
721
  up.settings.multipart_params.context = object;
722
  up.settings.multipart_params.context_id = item_id;
723
  // if privacy dropdown is not disabled, then get the privacy value of the update
724
- if( jQuery("select.privacy").prop('disabled') === false ){
725
- up.settings.multipart_params.privacy = jQuery("select.privacy").val();
726
  }
727
- });
728
- objUploadView.uploader.bind('UploadComplete', function(up, files) {
729
  media_uploading = true;
730
- $("#aw-whats-new-submit").click();
731
  //remove the current file list
732
- $("#rtMedia-queue-list tr").remove();
733
- $("#rtm-upload-start-notice").hide();
734
  //$("#aw-whats-new-submit").removeAttr('disabled');
735
- });
736
- objUploadView.uploader.bind('UploadProgress', function(up, file) {
737
- $("#" + file.id + " .plupload_file_status").html( rtmedia_uploading_msg + '( ' + file.percent + '% )');
738
- $("#" + file.id).addClass('upload-progress');
739
- if (file.percent == 100) {
740
- $("#" + file.id).toggleClass('upload-success');
741
- }
742
 
743
- });
744
 
745
- $("#rtMedia-start-upload").hide();
746
 
747
  objUploadView.initUploader();
748
  var change_flag = false
749
  var media_uploading = false;
750
- $.ajaxPrefilter(function(options, originalOptions, jqXHR) {
751
  // Modify options, control originalOptions, store jqXHR, etc
752
- try{
753
- if (originalOptions.data == null || typeof(originalOptions.data) == "undefined" || typeof(originalOptions.data.action) == "undefined" ) {
754
  return true;
755
  }
756
- }catch(e){
757
  return true;
758
  }
759
- if (originalOptions.data.action == 'post_update' || originalOptions.data.action == 'activity_widget_filter') {
760
  var temp = activity_attachemnt_ids;
761
- while (activity_attachemnt_ids.length > 0) {
762
  options.data += "&rtMedia_attached_files[]=" + activity_attachemnt_ids.pop();
763
  }
764
- options.data += "&rtmedia-privacy=" + jQuery("select.privacy").val();
765
  activity_attachemnt_ids = temp;
 
 
 
 
 
 
766
  var orignalSuccess = originalOptions.success;
767
- options.beforeSend = function() {
768
- if (originalOptions.data.action == 'post_update') {
769
- if ($.trim($("#whats-new").val()) == "") {
770
- alert(rtmedia_empty_activity_msg);
771
- // $("#aw-whats-new-submit").prop("disabled", true).removeClass('loading');
772
- return false;
773
- }
774
- }
775
- if (!media_uploading && objUploadView.uploader.files.length > 0) {
776
- $("#whats-new-post-in").attr('disabled', 'disabled');
777
- $("#rtmedia-add-media-button-post-update").attr('disabled', 'disabled');
778
  objUploadView.uploadFiles()
779
  media_uploading = true;
780
  return false;
@@ -785,173 +817,174 @@ jQuery(document).ready(function($) {
785
 
786
 
787
  }
788
- options.success = function(response) {
789
- orignalSuccess(response);
790
- if (response[0] + response[1] == '-1') {
791
  //Error
792
 
793
  } else {
794
- if( originalOptions.data.action == 'activity_widget_filter' ) {
795
- $("div.activity").bind("fadeIn",function(){
796
- 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'));
797
- rtMediaHook.call('rtmedia_js_after_activity_added', []);
798
- });
799
- $("div.activity").fadeIn(100);
800
- }
801
- jQuery("input[data-mode=rtMedia-update]").remove();
802
- while (objUploadView.uploader.files.pop() != undefined) {
803
  }
804
  objUploadView.uploader.refresh()
805
- $('#rtMedia-update-queue-list').html('');
806
  //$("#div-attache-rtmedia").hide();
807
- 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'));
808
- jQuery('ul.activity-list li.rtmedia_update:first-child .wp-audio-shortcode, ul.activity-list li.rtmedia_update:first-child .wp-video-shortcode').mediaelementplayer({
809
-
810
- // if the <video width> is not specified, this is the default
811
- defaultVideoWidth: 480,
812
- // if the <video height> is not specified, this is the default
813
- defaultVideoHeight: 270,
814
- // if set, overrides <video width>
815
- //videoWidth: 1,
816
- // if set, overrides <video height>
817
- //videoHeight: 1
818
- });
819
- rtMediaHook.call('rtmedia_js_after_activity_added', []);
820
  }
821
- $("#whats-new-post-in").removeAttr('disabled');
822
- $("#rtmedia-add-media-button-post-update").removeAttr('disabled');
823
 
824
  }
825
  }
826
- });
827
- });
828
  /**
829
  * rtMedia Comment Js
830
  */
831
- jQuery(document).ready(function($) {
832
- jQuery(document).on("click", "#rt_media_comment_form #rt_media_comment_submit", function(e) {
833
  e.preventDefault();
834
- if ($.trim($("#comment_content").val()) == "") {
835
- alert(rtmedia_empty_comment_msg);
836
  return false;
837
  }
838
 
839
- $(this).attr('disabled', 'disabled');
840
 
841
- $.ajax({
842
- url: jQuery("#rt_media_comment_form").attr("action"),
843
  type: 'post',
844
- data: jQuery("#rt_media_comment_form").serialize() + "&rtajax=true",
845
- success: function(data) {
846
- $('#rtmedia-no-comments').remove();
847
- $("#rtmedia_comment_ul").append(data);
848
- $("#comment_content").val("");
849
- $("#rt_media_comment_form #rt_media_comment_submit").removeAttr('disabled');
850
- rtMediaHook.call('rtmedia_js_after_comment_added', []);
851
  }
852
- });
853
-
854
 
855
 
856
  return false;
857
- });
858
 
859
  //Delete comment
860
- jQuery(document).on('click', '.rtmedia-delete-comment', function(e){
861
- e.preventDefault();
862
- var ask_confirmation = true
863
- ask_confirmation = rtMediaHook.call('rtmedia_js_delete_comment_confirmation', [ask_confirmation]);
864
- if(ask_confirmation && !confirm( rtmedia_media_comment_delete_confirmation ))
865
- return false;
866
- var current_comment = jQuery(this);
867
- var current_comment_parent = current_comment.parent();
868
- var comment_id = current_comment.data('id');
869
- current_comment_parent.css('opacity', '0.4');
870
- if(comment_id == '' || isNaN(comment_id)){
871
- return false;
872
- }
873
- var action = current_comment.closest('ul').data("action");
874
-
875
- jQuery.ajax({
876
- url: action,
877
- type: 'post',
878
- data: { comment_id : comment_id },
879
- success: function(res) {
880
- if(res !='undefined' && res == 1){
881
- current_comment.closest('li').hide(1000, function(){ current_comment.closest('li').remove(); });
882
- }else{
883
- current_comment.css('opacity', '1');
884
- }
885
- rtMediaHook.call('rtmedia_js_after_comment_deleted', []);
886
- }
887
- });
888
-
889
- });
890
-
891
- $(document).on("click", '.rtmedia-like', function(e) {
 
 
892
  e.preventDefault();
893
  var that = this;
894
- $(this).attr('disabled', 'disabled');
895
- var url = $(this).parent().attr("action");
896
- $(that).prepend("<img class='rtm-like-loading' src='" + rMedia_loading_file + "' style='width:10px' />");
897
- $.ajax({
898
  url: url,
899
  type: 'post',
900
  data: "json=true",
901
- success: function(data) {
902
  try {
903
- data = JSON.parse(data);
904
- } catch (e) {
905
 
906
  }
907
- $('.rtmedia-like span').html(data.next);
908
- $('.rtm-like-loading').remove();
909
- $(that).removeAttr('disabled');
910
  //update the like counter
911
- $('.rtmedia-like-counter').html(data.count);
912
- if(data.count > 0){
913
- $('.rtmedia-like-info').removeClass('hide');
914
- }else {
915
- $('.rtmedia-like-info').addClass('hide');
916
  }
917
  }
918
- });
919
 
920
 
921
- });
922
- $(document).on("click", '.rtmedia-featured', function(e) {
923
  e.preventDefault();
924
  var that = this;
925
- $(this).attr('disabled', 'disabled');
926
- var url = $(this).parent().attr("action");
927
- $(that).prepend("<img class='rtm-featured-loading' src='" + rMedia_loading_file + "' />");
928
- $.ajax({
929
  url: url,
930
  type: 'post',
931
  data: "json=true",
932
- success: function(data) {
933
  try {
934
- data = JSON.parse(data);
935
- } catch (e) {
936
 
937
  }
938
- $(that).find('span').html(data.next);
939
- $('.rtm-featured-loading').remove();
940
- $(that).removeAttr('disabled');
941
  }
942
- });
943
 
944
 
945
- });
946
- jQuery("#div-attache-rtmedia").find("input[type=file]").each(function() {
947
  //$(this).attr("capture", "camera");
948
  // $(this).attr("accept", $(this).attr("accept") + ';capture=camera');
949
 
950
- });
951
 
952
  // manually trigger fadein event so that we can bind some function on this event. It is used in activity when content getting load via ajax
953
  var _old_fadein = $.fn.fadeIn;
954
- jQuery.fn.fadeIn = function(){
955
- return _old_fadein.apply(this,arguments).trigger("fadeIn");
956
  };
957
- });
3
  var upload_sync = false;
4
  var activity_id = -1;
5
  var uploaderObj;
6
+ var objUploadView;
7
  var rtmedia_load_template_flag = true;
8
 
9
+ jQuery( function ( $ ) {
10
 
11
  var o_is_album, o_is_edit_allowed;
12
+ if ( typeof(is_album) == "undefined" ) {
13
+ o_is_album = new Array( "" );
14
  } else {
15
  o_is_album = is_album
16
  }
17
+ if ( typeof(is_edit_allowed) == "undefined" ) {
18
+ o_is_edit_allowed = new Array( "" )
19
  } else {
20
  o_is_edit_allowed = is_edit_allowed;
21
  }
24
 
25
  rtMedia = window.rtMedia || {};
26
 
27
+ rtMedia.Context = Backbone.Model.extend( {
28
+ url: function () {
29
  var url = rtmedia_media_slug + "/";
30
+ if ( !upload_sync && nextpage > 0 )
31
  url += 'pg/' + nextpage + '/'
32
  return url;
33
  },
35
  "context": "post",
36
  "context_id": false
37
  }
38
+ } );
39
 
40
+ rtMedia.Media = Backbone.Model.extend( {
41
  defaults: {
42
  "id": 0,
43
  "blog_id": false,
59
  "width": 0,
60
  "height": 0,
61
  "rt_permalink": false
62
+ // "next" : -1,
63
+ // "prev" : -1
64
  }
65
 
66
+ } );
67
 
68
+ rtMedia.Gallery = Backbone.Collection.extend( {
69
  model: rtMedia.Media,
70
+ url: function () {
71
  var temp = window.location.pathname;
72
  var url = '';
73
+ if ( temp.indexOf( "/" + rtmedia_media_slug + "/" ) == -1 ) {
74
  url = rtmedia_media_slug + '/';
75
  } else {
76
+ if ( temp.indexOf( 'pg/' ) == -1 )
77
  url = temp;
78
  else
79
+ url = window.location.pathname.substr( 0, window.location.pathname.lastIndexOf( "pg/" ) );
80
  }
81
+ if ( !upload_sync && nextpage > 1 ) {
82
+ if ( url.substr( url.length - 1 ) != "/" )
83
  url += "/"
84
  url += 'pg/' + nextpage + '/';
85
  }
86
  return url;
87
  },
88
+ getNext: function ( page, el, element ) {
89
+ if ( jQuery( '#bulk-edit-form' ).find( "p:nth-of-type(2)" ).length > 0 ) {
90
+ jQuery( '#bulk-edit-form p:nth-of-type(2)' ).replaceWith( "<ul class='rtmedia-list rtmedia-list-media'></ul>" );
91
+ }
92
+ that = this;
93
+ if ( rtmedia_load_template_flag == true ) {
94
+ $( "#rtmedia-gallery-item-template" ).load( template_url, {
95
+ backbone: true,
96
+ is_album: o_is_album,
97
+ is_edit_allowed: o_is_edit_allowed
98
+ }, function () {
99
+ rtmedia_load_template_flag = false;
100
+ that.getNext();
101
+ } );
102
+ }
103
+ if ( !rtmedia_load_template_flag ) {
104
+ var query = {
105
+ json: true,
106
+ rtmedia_page: nextpage
107
+ };
108
+ if ( el == undefined ) {
109
+ el = jQuery( ".rtmedia-list" ).parent().parent();
110
+ }
111
+ if ( el != undefined ) {
112
+ if ( element != undefined ) {
113
+ $( element ).parent().parent().prevAll( "input[type=hidden]" ).each( function ( e ) {
114
+ query[$( this ).attr( "name" )] = $( this ).val();
115
+ } );
116
+ } else {
117
+ $( el ).find( "input[type=hidden]" ).each( function ( e ) {
118
+ query[$( this ).attr( "name" )] = $( this ).val();
119
+ } );
120
+ }
121
+
122
+ }
123
+ this.fetch( {
124
+ data: query,
125
+ success: function ( model, response ) {
126
+ jQuery( '.rtm-media-loading' ).hide();
127
+ var list_el = "";
128
+ if ( typeof(element) === "undefined" )
129
+ list_el = $( ".rtmedia-list" )[0];
130
+ else
131
+ list_el = element.parent().siblings( '.rtmedia-list' );
132
+ nextpage = response.next;
133
+ var galleryViewObj = new rtMedia.GalleryView( {
134
+ collection: new rtMedia.Gallery( response.data ),
135
+ el: list_el
136
+ } );
137
+ //element.show();
138
+ }
139
+ } );
140
+ }
141
  },
142
+ reloadView: function () {
143
  upload_sync = true;
144
  nextpage = 1;
145
  this.getNext();
146
  }
147
 
148
 
149
+ } );
150
 
151
+ rtMedia.MediaView = Backbone.View.extend( {
152
  tagName: 'li',
153
  className: 'rtmedia-list-item',
154
+ initialize: function () {
155
+ this.template = _.template( $( "#rtmedia-gallery-item-template" ).html() );
156
+ this.model.bind( 'change', this.render );
157
+ this.model.bind( 'remove', this.unrender );
158
  this.render();
159
  },
160
+ render: function () {
161
+ $( this.el ).html( this.template( this.model.toJSON() ) );
162
  return this.el;
163
  },
164
+ unrender: function () {
165
+ $( this.el ).remove();
166
  },
167
+ remove: function () {
168
  this.model.destroy();
169
  }
170
+ } );
171
 
172
+ rtMedia.GalleryView = Backbone.View.extend( {
173
  tagName: 'ul',
174
  className: 'rtmedia-list',
175
+ initialize: function () {
176
+ this.template = _.template( $( "#rtmedia-gallery-item-template" ).html() );
177
  this.render();
178
  },
179
+ render: function () {
180
 
181
  that = this;
182
 
183
+ if ( upload_sync ) {
184
+ $( that.el ).html( '' );
185
  }
186
 
187
+ $.each( this.collection.toJSON(), function ( key, media ) {
188
+ $( that.el ).append( that.template( media ) );
189
+ } );
190
+ if ( upload_sync ) {
191
  upload_sync = false;
192
  }
193
+ if ( nextpage > 1 ) {
194
+ $( that.el ).siblings( '.rtmedia_next_prev' ).children( '#rtMedia-galary-next' ).show();
195
+ //$("#rtMedia-galary-next").show();
196
  }
197
 
198
 
199
  },
200
+ appendTo: function ( media ) {
201
  //console.log("append");
202
+ var mediaView = new rtMedia.MediaView( {
203
  model: media
204
+ } );
205
+ $( this.el ).append( mediaView.render().el );
206
  }
207
+ } );
208
 
209
 
210
  galleryObj = new rtMedia.Gallery();
211
 
212
+ $( "body" ).append( '<script id="rtmedia-gallery-item-template" type="text/template"></script>' );
213
 
214
+ $( document ).on( "click", "#rtMedia-galary-next", function ( e ) {
215
  $( this ).before( "<div class='rtm-media-loading'><img src='" + rMedia_loading_media + "' /></div>" );
216
+ $( this ).hide();
217
+ e.preventDefault();
218
+ galleryObj.getNext( nextpage, $( this ).parent().parent().parent(), $( this ) );
219
+ } );
 
 
220
 
221
 
222
+ if ( window.location.pathname.indexOf( rtmedia_media_slug ) != -1 ) {
223
+ var tempNext = window.location.pathname.substring( window.location.pathname.lastIndexOf( "pg/" ) + 5, window.location.pathname.lastIndexOf( "/" ) );
224
+ if ( isNaN( tempNext ) === false ) {
225
+ nextpage = parseInt( tempNext ) + 1;
226
  }
227
  }
228
 
229
 
230
+ window.UploadView = Backbone.View.extend( {
 
231
  events: {
232
  "click #rtMedia-start-upload": "uploadFiles"
233
  },
234
+ initialize: function ( config ) {
235
+ this.uploader = new plupload.Uploader( config );
236
  },
237
+ render: function () {
238
 
239
  },
240
+ initUploader: function ( a ) {
241
+ if ( typeof(a) !== "undefined" ) a = false;// if rtmediapro widget calls the function, dont show max size note.
 
242
  this.uploader.init();
243
  //The plupload HTML5 code gives a negative z-index making add files button unclickable
244
+ $( ".plupload.html5" ).css( {
245
  zIndex: 0
246
+ } );
247
+ $( "#rtMedia-upload-button" ).css( {
248
  zIndex: 2
249
+ } );
250
+ if ( a !== false ) {
251
+ window.file_size_info = rtmedia_max_file_msg + " : " + this.uploader.settings.max_file_size_msg;
252
+ if ( rtmedia_version_compare( rtm_wp_version, "3.9" ) ) { // plupload getting updated in 3.9
253
+ window.file_extn_info = rtmedia_allowed_file_formats + " : " + this.uploader.settings.filters.mime_types[0].extensions;
254
+ } else {
255
+ window.file_extn_info = rtmedia_allowed_file_formats + " : " + this.uploader.settings.filters[0].extensions;
256
+ }
257
+
258
  var info = window.file_size_info + ", " + window.file_extn_info;
259
+ $( ".rtm-file-size-limit" ).attr( 'title', info );
260
+ //$("#rtMedia-upload-button").after("<span>( <strong>" + rtmedia_max_file_msg + "</strong> "+ this.uploader.settings.max_file_size_msg + ")</span>");
261
  }
262
 
263
  return this;
264
  },
265
+ uploadFiles: function ( e ) {
266
+ if ( e != undefined )
267
  e.preventDefault();
268
  this.uploader.start();
269
  return false;
270
  }
271
 
272
+ } );
 
273
 
274
 
275
+ if ( $( "#rtMedia-upload-button" ).length > 0 ) {
276
+ if ( typeof rtmedia_upload_type_filter == "object" && rtmedia_upload_type_filter.length > 0 ) {
277
+ if ( rtmedia_version_compare( rtm_wp_version, "3.9" ) ) { // plupload getting updated in 3.9
278
+ rtMedia_plupload_config.filters.mime_types[0].extensions = rtmedia_upload_type_filter.join();
279
+ } else {
280
+ rtMedia_plupload_config.filters[0].extensions = rtmedia_upload_type_filter.join();
281
+ }
282
+ }
283
+ uploaderObj = new UploadView( rtMedia_plupload_config );
284
 
285
  uploaderObj.initUploader();
286
 
287
 
288
+ uploaderObj.uploader.bind( 'UploadComplete', function ( up, files ) {
289
+ activity_id = -1;
290
+ if ( typeof rtmedia_gallery_reload_on_upload != "undefined" && rtmedia_gallery_reload_on_upload == '1' ) { //reload gallery view when upload completes if enabled( by default enabled)
291
  galleryObj.reloadView();
292
  }
293
+ jQuery( '.start-media-upload' ).hide();
294
+ } );
295
 
296
+ uploaderObj.uploader.bind( 'FilesAdded', function ( up, files ) {
297
  var upload_size_error = false;
298
  var upload_error = "";
299
  var upload_error_sep = "";
300
+ var upload_remove_array = [];
301
+ $.each( files, function ( i, file ) {
302
+ var hook_respo = rtMediaHook.call( 'rtmedia_js_file_added', [up, file, "#rtMedia-queue-list tbody"] );
303
+ if ( hook_respo == false ) {
304
  file.status = -1;
305
+ upload_remove_array.push( file.id );
306
  return true;
307
  }
308
+ jQuery( '.rtmedia-upload-input' ).attr( 'value', rtmedia_add_more_files_msg );
309
+ jQuery( '.start-media-upload' ).show();
310
+ if ( uploaderObj.uploader.settings.max_file_size < file.size ) {
311
  // upload_size_error = true
312
  // upload_error += upload_error_sep + file.name;
313
  // upload_error_sep = ",";
315
  // $("#rtMedia-queue-list tbody").append(tr);
316
  return true;
317
  }
318
+ var tmp_array = file.name.split( "." );
319
+ if ( rtmedia_version_compare( rtm_wp_version, "3.9" ) ) { // plupload getting updated in 3.9
320
+ var ext_array = uploaderObj.uploader.settings.filters.mime_types[0].extensions.split( ',' );
321
+ } else {
322
+ var ext_array = uploaderObj.uploader.settings.filters[0].extensions.split( ',' );
323
+ }
324
+ if ( tmp_array.length > 1 ) {
325
+ var ext = tmp_array[tmp_array.length - 1];
326
+ ext = ext.toLowerCase();
327
+ if ( jQuery.inArray( ext, ext_array ) === -1 ) {
328
  return true;
329
  }
330
+ } else {
331
  return true;
332
  }
333
 
334
+ if ( rtmedia_version_compare( rtm_wp_version, "3.9" ) ) { // plupload getting updated in 3.9
335
+ uploaderObj.uploader.settings.filters.mime_types[0].title;
336
+ } else {
337
+ uploaderObj.uploader.settings.filters[0].title;
338
+ }
339
+ tdName = document.createElement( "td" );
340
+ tdName.innerHTML = file.name.substring( 0, 40 );
341
  tdName.className = "plupload_file_name";
342
+ tdStatus = document.createElement( "td" );
343
  tdStatus.className = "plupload_file_status";
344
  tdStatus.innerHTML = rtmedia_waiting_msg;
345
+ tdSize = document.createElement( "td" );
346
  tdSize.className = "plupload_file_size";
347
+ tdSize.innerHTML = plupload.formatSize( file.size );
348
+ tdDelete = document.createElement( "td" );
349
  tdDelete.innerHTML = "<span class='remove-from-queue'>&times;</span>";
350
  tdDelete.title = rtmedia_close;
351
  tdDelete.className = "close plupload_delete";
352
+ tdEdit = document.createElement( "td" );
353
  tdEdit.innerHTML = "";
354
  tdEdit.className = "plupload_media_edit";
355
+ tr = document.createElement( "tr" );
356
  tr.className = 'upload-waiting';
357
  tr.id = file.id;
358
+ tr.appendChild( tdName );
359
+ tr.appendChild( tdStatus );
360
+ tr.appendChild( tdSize );
361
+ tr.appendChild( tdEdit );
362
+ tr.appendChild( tdDelete );
363
+ $( "#rtMedia-queue-list" ).append( tr );
364
  //Delete Function
365
+ $( "#" + file.id + " td.plupload_delete .remove-from-queue" ).click( function ( e ) {
366
  e.preventDefault();
367
+ uploaderObj.uploader.removeFile( up.getFile( file.id ) );
368
+ $( "#" + file.id ).remove();
369
+ rtMediaHook.call( 'rtmedia_js_file_remove', [up, file] );
370
  return false;
371
+ } );
372
 
373
+ } );
374
+ $.each( upload_remove_array, function ( i, rfile ) {
375
+ if ( up.getFile( rfile ) )
376
+ up.removeFile( up.getFile( rfile ) );
377
+ } );
378
 
379
  // if (upload_size_error) {
380
  // // alert(upload_error + " because max file size is " + plupload.formatSize(uploaderObj.uploader.settings.max_file_size) );
381
  // }
382
+ } );
383
 
384
+ uploaderObj.uploader.bind( 'Error', function ( up, err ) {
385
 
386
+ if ( err.code == -600 ) { //file size error // if file size is greater than server's max allowed size
387
  var tmp_array;
388
  var ext = tr = '';
389
+ tmp_array = err.file.name.split( "." );
390
+ if ( tmp_array.length > 1 ) {
391
+ ext = tmp_array[tmp_array.length - 1];
392
+ if ( !(typeof(up.settings.upload_size) != "undefined" && typeof(up.settings.upload_size[ext]) != "undefined" && typeof(up.settings.upload_size[ext]['size']) ) ) {
393
+ tr = "<tr class='upload-error'><td>" + err.file.name.substring( 0, 40 ) + "</td><td> " + rtmedia_max_file_msg + plupload.formatSize( up.settings.max_file_size / 1024 * 1024 ) + " <i class='rtmicon-info-circle' title='" + window.file_size_info + "'></i></td><td>" + plupload.formatSize( err.file.size ) + "</td><td></td><td class='close error_delete'>&times;</td></tr>";
394
  }
395
  }
396
  //append the message to the file queue
397
+ $( "#rtMedia-queue-list tbody" ).append( tr );
398
  }
399
  else {
400
 
401
+ if ( err.code == -601 ) { // file extension error
402
  err.message = rtmedia_file_extension_error_msg;
403
  }
404
+ var tr = "<tr class='upload-error'><td>" + (err.file ? err.file.name.substring( 0, 40 ) : "") + "</td><td>" + err.message + " <i class='rtmicon-info-circle' title='" + window.file_extn_info + "'></i></td><td>" + plupload.formatSize( err.file.size ) + "</td><td></td><td class='close error_delete'>&times;</td></tr>";
405
+ $( "#rtMedia-queue-list tbody" ).append( tr );
406
  }
407
 
408
+ jQuery( '.error_delete' ).on( 'click', function ( e ) {
409
  e.preventDefault();
410
+ jQuery( this ).parent( 'tr' ).remove();
411
+ } );
412
  return false;
413
 
414
+ } );
415
 
416
+ jQuery( '.start-media-upload' ).on( 'click', function ( e ) {
417
  e.preventDefault();
418
  uploaderObj.uploadFiles();
419
+ } );
420
 
421
+ uploaderObj.uploader.bind( 'QueueChanged', function ( up ) {
422
 
423
  // jQuery('.rtmedia-upload-input').attr('value','Add more files');
424
  // jQuery('.start-media-upload').show();
425
 
426
+ } );
427
 
428
+ uploaderObj.uploader.bind( 'UploadProgress', function ( up, file ) {
429
  //$("#" + file.id + " .plupload_file_status").html(file.percent + "%");
430
+ $( "#" + file.id + " .plupload_file_status" ).html( rtmedia_uploading_msg + '( ' + file.percent + '% )' );
431
+ $( "#" + file.id ).addClass( 'upload-progress' );
432
+ if ( file.percent == 100 ) {
433
+ $( "#" + file.id ).toggleClass( 'upload-success' );
434
+ }
435
+ } );
436
+ uploaderObj.uploader.bind( 'BeforeUpload', function ( up, file ) {
437
+ var privacy = $( "#rtm-file_upload-ui select.privacy" ).val();
438
+ if ( privacy !== undefined ) {
439
+ up.settings.multipart_params.privacy = $( "#rtm-file_upload-ui select.privacy" ).val();
440
+ }
441
+ if ( jQuery( "#rt_upload_hf_redirect" ).length > 0 )
442
  up.settings.multipart_params.redirect = up.files.length;
443
+ jQuery( "#rtmedia-uploader-form input[type=hidden]" ).each( function () {
444
+ up.settings.multipart_params[$( this ).attr( "name" )] = $( this ).val();
445
+ } );
446
  up.settings.multipart_params.activity_id = activity_id;
447
+ if ( $( '#rtmedia-uploader-form .rtmedia-user-album-list' ).length > 0 )
448
+ up.settings.multipart_params.album_id = $( '#rtmedia-uploader-form .rtmedia-user-album-list' ).find( ":selected" ).val();
449
+ else if ( $( '#rtmedia-uploader-form .rtmedia-current-album' ).length > 0 )
450
+ up.settings.multipart_params.album_id = $( '#rtmedia-uploader-form .rtmedia-current-album' ).val();
451
+ } );
452
+
453
+ uploaderObj.uploader.bind( 'FileUploaded', function ( up, file, res ) {
454
+ if ( /MSIE (\d+\.\d+);/.test( navigator.userAgent ) ) { //test for MSIE x.x;
455
+ var ieversion = new Number( RegExp.$1 ) // capture x.x portion and store as a number
456
+
457
+ if ( ieversion < 10 ) {
458
+ if ( typeof res.response !== "undefined" )
459
+ res.status = 200;
460
+ }
461
  }
462
  var rtnObj;
463
+ try {
464
 
465
+ rtnObj = JSON.parse( res.response );
466
  uploaderObj.uploader.settings.multipart_params.activity_id = rtnObj.activity_id;
467
  activity_id = rtnObj.activity_id;
468
+ if ( rtnObj.permalink != '' ) {
469
+ $( "#" + file.id + " .plupload_file_name" ).html( "<a href='" + rtnObj.permalink + "' target='_blank' title='" + rtnObj.permalink + "'>" + file.name.substring( 0, 40 ) + "</a>" );
470
+ $( "#" + file.id + " .plupload_media_edit" ).html( "<a href='" + rtnObj.permalink + "edit' target='_blank'><span title='" + rtmedia_edit_media + "'><i class='rtmicon-edit'></i> " + rtmedia_edit + "</span></a>" );
471
+ $( "#" + file.id + " .plupload_delete" ).html( "<span id='" + rtnObj.media_id + "' class='rtmedia-delete-uploaded-media' title='" + rtmedia_delete + "'>&times;</span>" );
472
  }
473
 
474
+ } catch ( e ) {
475
  // console.log('Invalid Activity ID');
476
  }
477
+ if ( res.status == 200 || res.status == 302 ) {
478
+ if ( uploaderObj.upload_count == undefined )
479
  uploaderObj.upload_count = 1;
480
  else
481
  uploaderObj.upload_count++;
482
 
483
+ if ( uploaderObj.upload_count == up.files.length && jQuery( "#rt_upload_hf_redirect" ).length > 0 && jQuery.trim( rtnObj.redirect_url.indexOf( "http" ) == 0 ) ) {
484
  window.location = rtnObj.redirect_url;
485
  }
486
 
487
+ $( "#" + file.id + " .plupload_file_status" ).html( rtmedia_uploaded_msg );
488
+ rtMediaHook.call( 'rtmedia_js_after_file_upload', [up, file, res] );
489
+ } else {
490
+ $( "#" + file.id + " .plupload_file_status" ).html( rtmedia_upload_failed_msg );
491
  }
492
 
493
  files = up.files;
494
  lastfile = files[files.length - 1];
495
 
496
 
497
+ } );
498
 
499
  uploaderObj.uploader.refresh();//refresh the uploader for opera/IE fix on media page
500
 
501
+ $( "#rtMedia-start-upload" ).click( function ( e ) {
502
+ uploaderObj.uploadFiles( e );
503
+ } );
504
+ $( "#rtMedia-start-upload" ).hide();
505
 
506
+ jQuery( document ).on( 'click', '#rtm_show_upload_ui', function () {
507
+ jQuery( '#rtm-media-gallery-uploader' ).slideToggle();
508
  uploaderObj.uploader.refresh();//refresh the uploader for opera/IE fix on media page
509
+ jQuery( '#rtm_show_upload_ui' ).toggleClass( 'primary' );
510
+ } );
511
  } else {
512
+ jQuery( document ).on( 'click', '#rtm_show_upload_ui', function () {
513
+ jQuery( '#rtm-media-gallery-uploader' ).slideToggle();
514
+ jQuery( '#rtm_show_upload_ui' ).toggleClass( 'primary' );
515
+ } );
516
  }
517
 
518
+ jQuery( document ).on( 'click', '.plupload_delete .rtmedia-delete-uploaded-media', function () {
519
+ var that = $( this );
520
+ if ( confirm( rtmedia_delete_uploaded_media ) ) {
521
+ var nonce = $( '#rtmedia-upload-container #rtmedia_media_delete_nonce' ).val();
522
+ var media_id = $( this ).attr( 'id' );
523
  var data = {
524
+ action: 'delete_uploaded_media',
525
+ nonce: nonce,
526
+ media_id: media_id
527
  }
528
 
529
+ $.post( ajaxurl, data, function ( response ) {
530
+ if ( response == '1' ) {
531
+ that.closest( 'tr' ).remove();
532
+ $( '#' + media_id ).remove();
533
  }
534
+ } );
535
  }
536
+ } );
537
 
538
 
539
+ } );
540
  /** History Code for route
541
 
542
  var rtMediaRouter = Backbone.Router.extend({
555
 
556
  /** Activity Update Js **/
557
 
558
+ jQuery( document ).ready( function ( $ ) {
559
 
560
  //handling the "post update: button on activity page
561
+ jQuery( '#aw-whats-new-submit' ).removeAttr( 'disabled' );
562
+ jQuery( document ).on( "blur", '#whats-new', function () {
563
+ setTimeout( function () {
564
+ jQuery( '#aw-whats-new-submit' ).removeAttr( 'disabled' );
565
+ }, 100 );
566
+ } );
567
+ jQuery( '#aw-whats-new-submit' ).on( 'click', function ( e ) {
568
+ setTimeout( function () {
569
+ jQuery( '#aw-whats-new-submit' ).removeAttr( 'disabled' );
570
+ }, 100 );
571
+ } );
572
 
573
  // when user changes the value in activity "post in" dropdown, hide the privacy dropdown and show when posting in profile.
574
+ jQuery( '#whats-new-post-in' ).on( 'change', function ( e ) {
575
+ if ( jQuery( this ).val() == '0' ) {
576
+ jQuery( "#rtmedia-action-update .privacy" ).prop( 'disabled', false ).show();
577
+ } else {
578
+ jQuery( "#rtmedia-action-update .privacy" ).prop( 'disabled', true ).hide();
579
  }
580
+ } );
581
 
582
+ if ( typeof rtMedia_update_plupload_config == 'undefined' ) {
583
  return false;
584
  }
585
  var activity_attachemnt_ids = [];
586
+ if ( $( "#rtmedia-add-media-button-post-update" ).length > 0 ) {
587
+ $( "#whats-new-options" ).prepend( $( "#rtmedia-action-update" ) );
588
+ if ( $( "#rtm-file_upload-ui .privacy" ).length > 0 ) {
589
+ $( "#rtmedia-action-update" ).append( $( "#rtm-file_upload-ui .privacy" ) );
590
  }
591
  }
592
+ objUploadView = new UploadView( rtMedia_update_plupload_config );
593
+ $( "#whats-new-form" ).on( 'click', '#rtmedia-add-media-button-post-update', function ( e ) {
594
  objUploadView.uploader.refresh();
595
+ } );
596
  //whats-new-post-in
597
 
598
  objUploadView.upload_remove_array = [];
599
+ objUploadView.uploader.bind( 'FilesAdded', function ( upl, rfiles ) {
600
  //$("#aw-whats-new-submit").attr('disabled', 'disabled');
601
 
602
+ $.each( rfiles, function ( i, file ) {
603
+ var hook_respo = rtMediaHook.call( 'rtmedia_js_file_added', [upl, file, "#rtMedia-queue-list tbody"] );
604
+ if ( hook_respo == false ) {
605
+ file.status = -1;
606
+ objUploadView.upload_remove_array.push( file.id );
607
+ return true;
608
  }
609
+ if ( objUploadView.uploader.settings.max_file_size < file.size ) {
610
  return true;
611
  }
612
+ var tmp_array = file.name.split( "." );
613
+ if ( rtmedia_version_compare( rtm_wp_version, "3.9" ) ) { // plupload getting updated in 3.9
614
+ var ext_array = objUploadView.uploader.settings.filters.mime_types[0].extensions.split( ',' );
615
+ } else {
616
+ var ext_array = objUploadView.uploader.settings.filters[0].extensions.split( ',' );
617
+ }
618
+ if ( tmp_array.length > 1 ) {
619
+ var ext = tmp_array[tmp_array.length - 1];
620
+ ext = ext.toLowerCase();
621
+ if ( jQuery.inArray( ext, ext_array ) === -1 ) {
622
  return true;
623
  }
624
+ } else {
625
  return true;
626
  }
627
+ tdName = document.createElement( "td" );
628
+ tdName.innerHTML = file.name.substring( 0, 40 );
629
+ tdStatus = document.createElement( "td" );
630
  tdStatus.className = "plupload_file_status";
631
  tdStatus.innerHTML = rtmedia_waiting_msg;
632
+ tdSize = document.createElement( "td" );
633
  tdSize.className = "plupload_file_size";
634
+ tdSize.innerHTML = plupload.formatSize( file.size );
635
+ tdDelete = document.createElement( "td" );
636
  tdDelete.innerHTML = "&times;";
637
  tdDelete.title = rtmedia_remove_from_queue;
638
  tdDelete.className = "close plupload_delete";
639
+ tdEdit = document.createElement( "td" );
640
  tdEdit.innerHTML = "";
641
+ tr = document.createElement( "tr" );
642
  tr.className = 'upload-waiting';
643
  tr.id = file.id;
644
+ tr.appendChild( tdName );
645
+ tr.appendChild( tdStatus );
646
+ tr.appendChild( tdSize );
647
+ tr.appendChild( tdEdit );
648
+ tr.appendChild( tdDelete );
649
+ jQuery( '#whats-new-content' ).css( 'padding-bottom', '0px' );
650
+ $( "#rtm-upload-start-notice" ).css( 'display', 'block' ); // show the file upload notice to the user
651
+ $( "#rtMedia-queue-list" ).append( tr );
652
+ $( "#" + file.id + " td.plupload_delete" ).click( function ( e ) {
653
+ e.preventDefault();
654
+ objUploadView.uploader.removeFile( upl.getFile( file.id ) );
655
+ $( "#" + file.id ).remove();
656
+ return false;
657
+ } );
658
+ } );
659
 
660
+ $.each( objUploadView.upload_remove_array, function ( i, rfile ) {
661
+ if ( upl.getFile( rfile ) )
662
+ upl.removeFile( upl.getFile( rfile ) );
663
+ } );
664
+ } );
665
 
666
+ objUploadView.uploader.bind( 'FileUploaded', function ( up, file, res ) {
667
+ if ( /MSIE (\d+\.\d+);/.test( navigator.userAgent ) ) { //test for MSIE x.x;
668
+ var ieversion = new Number( RegExp.$1 ) // capture x.x portion and store as a number
669
 
670
+ if ( ieversion < 10 ) {
671
  try {
672
+ if ( typeof JSON.parse( res.response ) !== "undefined" )
673
  res.status = 200;
674
  }
675
+ catch ( e ) {
676
+ }
677
  }
678
  }
679
 
680
+ if ( res.status == 200 ) {
681
  try {
682
+ var objIds = JSON.parse( res.response );
683
+ $.each( objIds, function ( key, val ) {
684
+ activity_attachemnt_ids.push( val );
685
+ if ( $( "#whats-new-form" ).find( "#rtmedia_attached_id_" + val ).length < 1 ) {
686
+ $( "#whats-new-form" ).append( "<input type='hidden' name='rtMedia_attached_files[]' data-mode='rtMedia-update' id='rtmedia_attached_id_" + val + "' value='"
687
+ + val + "' />" );
688
  }
689
+ } );
690
+ } catch ( e ) {
691
 
692
  }
693
+ rtMediaHook.call( 'rtmedia_js_after_file_upload', [up, file, res] );
694
  }
695
+ } );
696
+
697
+ objUploadView.uploader.bind( 'Error', function ( up, err ) {
698
+
699
+ if ( err.code == -600 ) { //file size error // if file size is greater than server's max allowed size
700
+ var tmp_array;
701
+ var ext = tr = '';
702
+ tmp_array = err.file.name.split( "." );
703
+ if ( tmp_array.length > 1 ) {
704
+
705
+ ext = tmp_array[tmp_array.length - 1];
706
+ 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 )) ) {
707
+ tr = "<tr class='upload-error'><td>" + err.file.name.substring( 0, 40 ) + "(" + plupload.formatSize( err.file.size ) + ")" + "</td><td> " + rtmedia_max_file_msg + plupload.formatSize( up.settings.max_file_size / 1024 * 1024 ) + " <i class='rtmicon-info-circled' title='" + window.file_size_info + "'></i></td><td>" + plupload.formatSize( err.file.size ) + "</td><td></td><td class='close error_delete'>&times;</td></tr>";
708
+ }
709
+ }
710
+ //append the message to the file queue
711
+ $( "#rtMedia-queue-list tbody" ).append( tr );
712
+ }
713
+ else {
714
+ if ( err.code == -601 ) { // file extension error
715
+ err.message = rtmedia_file_extension_error_msg;
716
+ }
717
+ var tr = "<tr class='upload-error'><td>" + (err.file ? err.file.name.substring( 0, 40 ) : "") + "</td><td>" + err.message + " <i class='rtmicon-info-circled' title='" + window.file_extn_info + "'></i></td><td>" + plupload.formatSize( err.file.size ) + "</td><td></td><td class='close error_delete'>&times;</td></tr>";
718
+ $( "#rtMedia-queue-list tbody" ).append( tr );
719
+ }
720
+
721
+ jQuery( '.error_delete' ).on( 'click', function ( e ) {
722
+ e.preventDefault();
723
+ jQuery( this ).parent( 'tr' ).remove();
724
+ } );
725
+ $( "#rtm-upload-start-notice" ).css( 'display', 'block' ); // show the file upload notice to the user
726
+ return false;
727
 
728
+ } );
729
 
730
+ objUploadView.uploader.bind( 'BeforeUpload', function ( up, files ) {
731
 
732
+ $.each( objUploadView.upload_remove_array, function ( i, rfile ) {
733
+ if ( up.getFile( rfile ) )
734
+ up.removeFile( up.getFile( rfile ) );
735
+ } );
736
 
737
  var object = '';
738
+ var item_id = jq( "#whats-new-post-in" ).val();
739
+ if ( item_id == undefined )
740
  item_id = 0;
741
+ if ( item_id > 0 ) {
742
  object = "group";
743
  } else {
744
  object = "profile";
747
  up.settings.multipart_params.context = object;
748
  up.settings.multipart_params.context_id = item_id;
749
  // if privacy dropdown is not disabled, then get the privacy value of the update
750
+ if ( jQuery( "select.privacy" ).prop( 'disabled' ) === false ) {
751
+ up.settings.multipart_params.privacy = jQuery( "select.privacy" ).val();
752
  }
753
+ } );
754
+ objUploadView.uploader.bind( 'UploadComplete', function ( up, files ) {
755
  media_uploading = true;
756
+ $( "#aw-whats-new-submit" ).click();
757
  //remove the current file list
758
+ $( "#rtMedia-queue-list tr" ).remove();
759
+ $( "#rtm-upload-start-notice" ).hide();
760
  //$("#aw-whats-new-submit").removeAttr('disabled');
761
+ } );
762
+ objUploadView.uploader.bind( 'UploadProgress', function ( up, file ) {
763
+ $( "#" + file.id + " .plupload_file_status" ).html( rtmedia_uploading_msg + '( ' + file.percent + '% )' );
764
+ $( "#" + file.id ).addClass( 'upload-progress' );
765
+ if ( file.percent == 100 ) {
766
+ $( "#" + file.id ).toggleClass( 'upload-success' );
767
+ }
768
 
769
+ } );
770
 
771
+ $( "#rtMedia-start-upload" ).hide();
772
 
773
  objUploadView.initUploader();
774
  var change_flag = false
775
  var media_uploading = false;
776
+ $.ajaxPrefilter( function ( options, originalOptions, jqXHR ) {
777
  // Modify options, control originalOptions, store jqXHR, etc
778
+ try {
779
+ if ( originalOptions.data == null || typeof(originalOptions.data) == "undefined" || typeof(originalOptions.data.action) == "undefined" ) {
780
  return true;
781
  }
782
+ } catch ( e ) {
783
  return true;
784
  }
785
+ if ( originalOptions.data.action == 'post_update' || originalOptions.data.action == 'activity_widget_filter' ) {
786
  var temp = activity_attachemnt_ids;
787
+ while ( activity_attachemnt_ids.length > 0 ) {
788
  options.data += "&rtMedia_attached_files[]=" + activity_attachemnt_ids.pop();
789
  }
790
+ options.data += "&rtmedia-privacy=" + jQuery( "select.privacy" ).val();
791
  activity_attachemnt_ids = temp;
792
+ if ( jQuery( '#rtmp-url-no-scrapper' ).length > 0 && jQuery( '#rtmp-url-no-scrapper' ).val() != '0' ) {
793
+ options.data += "&rtmp_link_url=" + jQuery( "#rtmp-url-scrapper-url-hidden" ).val(); // URL link preview
794
+ options.data += "&rtmp_link_title=" + jQuery( "#rtmp-url-scrapper-title-hidden" ).val(); // URL link preview
795
+ options.data += "&rtmp_link_img=" + jQuery( '#rtmp-url-scrapper-img-hidden' ).val(); // URL link preview
796
+ options.data += "&rtmp_link_description=" + jQuery( "#rtmp-url-scrapper-description-hidden" ).val(); // URL link preview
797
+ }
798
  var orignalSuccess = originalOptions.success;
799
+ options.beforeSend = function () {
800
+ if ( originalOptions.data.action == 'post_update' ) {
801
+ if ( $.trim( $( "#whats-new" ).val() ) == "" ) {
802
+ alert( rtmedia_empty_activity_msg );
803
+ // $("#aw-whats-new-submit").prop("disabled", true).removeClass('loading');
804
+ return false;
805
+ }
806
+ }
807
+ if ( !media_uploading && objUploadView.uploader.files.length > 0 ) {
808
+ $( "#whats-new-post-in" ).attr( 'disabled', 'disabled' );
809
+ $( "#rtmedia-add-media-button-post-update" ).attr( 'disabled', 'disabled' );
810
  objUploadView.uploadFiles()
811
  media_uploading = true;
812
  return false;
817
 
818
 
819
  }
820
+ options.success = function ( response ) {
821
+ orignalSuccess( response );
822
+ if ( response[0] + response[1] == '-1' ) {
823
  //Error
824
 
825
  } else {
826
+ if ( originalOptions.data.action == 'activity_widget_filter' ) {
827
+ $( "div.activity" ).bind( "fadeIn", function () {
828
+ 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' ) );
829
+ rtMediaHook.call( 'rtmedia_js_after_activity_added', [] );
830
+ } );
831
+ $( "div.activity" ).fadeIn( 100 );
832
+ }
833
+ jQuery( "input[data-mode=rtMedia-update]" ).remove();
834
+ while ( objUploadView.uploader.files.pop() != undefined ) {
835
  }
836
  objUploadView.uploader.refresh()
837
+ $( '#rtMedia-update-queue-list' ).html( '' );
838
  //$("#div-attache-rtmedia").hide();
839
+ 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' ) );
840
+ jQuery( 'ul.activity-list li.rtmedia_update:first-child .wp-audio-shortcode, ul.activity-list li.rtmedia_update:first-child .wp-video-shortcode' ).mediaelementplayer( {
841
+
842
+ // if the <video width> is not specified, this is the default
843
+ defaultVideoWidth: 480,
844
+ // if the <video height> is not specified, this is the default
845
+ defaultVideoHeight: 270,
846
+ // if set, overrides <video width>
847
+ //videoWidth: 1,
848
+ // if set, overrides <video height>
849
+ //videoHeight: 1
850
+ } );
851
+ rtMediaHook.call( 'rtmedia_js_after_activity_added', [] );
852
  }
853
+ $( "#whats-new-post-in" ).removeAttr( 'disabled' );
854
+ $( "#rtmedia-add-media-button-post-update" ).removeAttr( 'disabled' );
855
 
856
  }
857
  }
858
+ } );
859
+ } );
860
  /**
861
  * rtMedia Comment Js
862
  */
863
+ jQuery( document ).ready( function ( $ ) {
864
+ jQuery( document ).on( "click", "#rt_media_comment_form #rt_media_comment_submit", function ( e ) {
865
  e.preventDefault();
866
+ if ( $.trim( $( "#comment_content" ).val() ) == "" ) {
867
+ alert( rtmedia_empty_comment_msg );
868
  return false;
869
  }
870
 
871
+ $( this ).attr( 'disabled', 'disabled' );
872
 
873
+ $.ajax( {
874
+ url: jQuery( "#rt_media_comment_form" ).attr( "action" ),
875
  type: 'post',
876
+ data: jQuery( "#rt_media_comment_form" ).serialize() + "&rtajax=true",
877
+ success: function ( data ) {
878
+ $( '#rtmedia-no-comments' ).remove();
879
+ $( "#rtmedia_comment_ul" ).append( data );
880
+ $( "#comment_content" ).val( "" );
881
+ $( "#rt_media_comment_form #rt_media_comment_submit" ).removeAttr( 'disabled' );
882
+ rtMediaHook.call( 'rtmedia_js_after_comment_added', [] );
883
  }
884
+ } );
 
885
 
886
 
887
  return false;
888
+ } );
889
 
890
  //Delete comment
891
+ jQuery( document ).on( 'click', '.rtmedia-delete-comment', function ( e ) {
892
+ e.preventDefault();
893
+ var ask_confirmation = true
894
+ ask_confirmation = rtMediaHook.call( 'rtmedia_js_delete_comment_confirmation', [ask_confirmation] );
895
+ if ( ask_confirmation && !confirm( rtmedia_media_comment_delete_confirmation ) )
896
+ return false;
897
+ var current_comment = jQuery( this );
898
+ var current_comment_parent = current_comment.parent();
899
+ var comment_id = current_comment.data( 'id' );
900
+ current_comment_parent.css( 'opacity', '0.4' );
901
+ if ( comment_id == '' || isNaN( comment_id ) ) {
902
+ return false;
903
+ }
904
+ var action = current_comment.closest( 'ul' ).data( "action" );
905
+
906
+ jQuery.ajax( {
907
+ url: action,
908
+ type: 'post',
909
+ data: { comment_id: comment_id },
910
+ success: function ( res ) {
911
+ if ( res != 'undefined' && res == 1 ) {
912
+ current_comment.closest( 'li' ).hide( 1000, function () {
913
+ current_comment.closest( 'li' ).remove();
914
+ } );
915
+ } else {
916
+ current_comment.css( 'opacity', '1' );
917
+ }
918
+ rtMediaHook.call( 'rtmedia_js_after_comment_deleted', [] );
919
+ }
920
+ } );
921
+
922
+ } );
923
+
924
+ $( document ).on( "click", '.rtmedia-like', function ( e ) {
925
  e.preventDefault();
926
  var that = this;
927
+ $( this ).attr( 'disabled', 'disabled' );
928
+ var url = $( this ).parent().attr( "action" );
929
+ $( that ).prepend( "<img class='rtm-like-loading' src='" + rMedia_loading_file + "' style='width:10px' />" );
930
+ $.ajax( {
931
  url: url,
932
  type: 'post',
933
  data: "json=true",
934
+ success: function ( data ) {
935
  try {
936
+ data = JSON.parse( data );
937
+ } catch ( e ) {
938
 
939
  }
940
+ $( '.rtmedia-like span' ).html( data.next );
941
+ $( '.rtm-like-loading' ).remove();
942
+ $( that ).removeAttr( 'disabled' );
943
  //update the like counter
944
+ $( '.rtmedia-like-counter' ).html( data.count );
945
+ if ( data.count > 0 ) {
946
+ $( '.rtmedia-like-info' ).removeClass( 'hide' );
947
+ } else {
948
+ $( '.rtmedia-like-info' ).addClass( 'hide' );
949
  }
950
  }
951
+ } );
952
 
953
 
954
+ } );
955
+ $( document ).on( "click", '.rtmedia-featured', function ( e ) {
956
  e.preventDefault();
957
  var that = this;
958
+ $( this ).attr( 'disabled', 'disabled' );
959
+ var url = $( this ).parent().attr( "action" );
960
+ $( that ).prepend( "<img class='rtm-featured-loading' src='" + rMedia_loading_file + "' />" );
961
+ $.ajax( {
962
  url: url,
963
  type: 'post',
964
  data: "json=true",
965
+ success: function ( data ) {
966
  try {
967
+ data = JSON.parse( data );
968
+ } catch ( e ) {
969
 
970
  }
971
+ $( that ).find( 'span' ).html( data.next );
972
+ $( '.rtm-featured-loading' ).remove();
973
+ $( that ).removeAttr( 'disabled' );
974
  }
975
+ } );
976
 
977
 
978
+ } );
979
+ jQuery( "#div-attache-rtmedia" ).find( "input[type=file]" ).each( function () {
980
  //$(this).attr("capture", "camera");
981
  // $(this).attr("accept", $(this).attr("accept") + ';capture=camera');
982
 
983
+ } );
984
 
985
  // manually trigger fadein event so that we can bind some function on this event. It is used in activity when content getting load via ajax
986
  var _old_fadein = $.fn.fadeIn;
987
+ jQuery.fn.fadeIn = function () {
988
+ return _old_fadein.apply( this, arguments ).trigger( "fadeIn" );
989
  };
990
+ } );
app/assets/js/rtMedia.js CHANGED
@@ -185,7 +185,7 @@ jQuery('document').ready(function($) {
185
  })
186
  //rtmedia_lightbox_enabled from setting
187
  if (typeof(rtmedia_lightbox_enabled) != 'undefined' && rtmedia_lightbox_enabled == "1") {
188
- apply_rtMagnificPopup('.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, .rtm-bbp-container');
189
  }
190
 
191
  jQuery.ajaxPrefilter(function(options, originalOptions, jqXHR) {
@@ -343,6 +343,7 @@ jQuery('document').ready(function($) {
343
  rtmedia_media_view_counts();
344
  rtmedia_init_media_deleting();
345
  rtmedia_init_popup_navigation();
 
346
  var height = $(window).height() ;
347
  //console.log( height );
348
  // , .mfp-content #buddypress .rtmedia-container,
@@ -392,6 +393,23 @@ jQuery('document').ready(function($) {
392
  rtm_mfp.prev();
393
  });
394
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
395
  var dragArea = jQuery("#drag-drop-area");
396
  var activityArea = jQuery('#whats-new');
397
  var content = dragArea.html();
@@ -532,3 +550,19 @@ function bp_media_create_element(id) {
532
  };
533
 
534
  })(jQuery);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
  })
186
  //rtmedia_lightbox_enabled from setting
187
  if (typeof(rtmedia_lightbox_enabled) != 'undefined' && rtmedia_lightbox_enabled == "1") {
188
+ apply_rtMagnificPopup('.rtmedia-list-media, .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');
189
  }
190
 
191
  jQuery.ajaxPrefilter(function(options, originalOptions, jqXHR) {
343
  rtmedia_media_view_counts();
344
  rtmedia_init_media_deleting();
345
  rtmedia_init_popup_navigation();
346
+ rtmedia_disable_popup_navigation_comment_focus();
347
  var height = $(window).height() ;
348
  //console.log( height );
349
  // , .mfp-content #buddypress .rtmedia-container,
393
  rtm_mfp.prev();
394
  });
395
  }
396
+
397
+ function rtmedia_disable_popup_navigation_comment_focus() {
398
+ jQuery('#comment_content').live('focusin',function(){
399
+ jQuery(document).unbind('keydown');
400
+ });
401
+ jQuery('#comment_content').live('focusout',function(){
402
+ var rtm_mfp = jQuery.magnificPopup.instance;
403
+ jQuery(document).on('keydown',function(e) {
404
+ if (e.keyCode === 37) {
405
+ rtm_mfp.prev();
406
+ } else if (e.keyCode === 39) {
407
+ rtm_mfp.next();
408
+ }
409
+ });
410
+ });
411
+ }
412
+
413
  var dragArea = jQuery("#drag-drop-area");
414
  var activityArea = jQuery('#whats-new');
415
  var content = dragArea.html();
550
  };
551
 
552
  })(jQuery);
553
+
554
+ function rtmedia_version_compare( left, right ) {
555
+ if (typeof left + typeof right != 'stringstring')
556
+ return false;
557
+ var a = left.split('.')
558
+ , b = right.split('.')
559
+ , i = 0, len = Math.max(a.length, b.length);
560
+ for (; i < len; i++) {
561
+ if ((a[i] && !b[i] && parseInt(a[i]) > 0) || (parseInt(a[i]) > parseInt(b[i]))) {
562
+ return true;
563
+ } else if ((b[i] && !a[i] && parseInt(b[i]) > 0) || (parseInt(a[i]) < parseInt(b[i]))) {
564
+ return false;
565
+ }
566
+ }
567
+ return true;
568
+ }
app/importers/RTMediaMediaSizeImporter.php ADDED
@@ -0,0 +1,243 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /*
4
+ * To change this license header, choose License Headers in Project Properties.
5
+ * To change this template file, choose Tools | Templates
6
+ * and open the template in the editor.
7
+ */
8
+
9
+ /**
10
+ * Description of RTMediaMediaSizeImporter
11
+ *
12
+ * @author ritz
13
+ */
14
+ class RTMediaMediaSizeImporter {
15
+
16
+ function __construct() {
17
+ add_filter( "rtmedia_filter_admin_pages_array", array( $this, "rtmedia_add_admin_page_array" ), 11, 1 );
18
+ add_action( 'wp_ajax_rtmedia_media_size_import', array( $this, "rtmedia_media_size_import" ) );
19
+ add_action( 'admin_init', array( $this, 'add_admin_notice' ) );
20
+ add_action( 'admin_menu', array( $this, 'menu' ), 10 );
21
+ }
22
+
23
+ function menu() {
24
+ add_submenu_page( 'rtmedia-setting', __( 'Media Size Import', 'rtmedia' ), __( 'Media Size Import', 'rtmedia' ), 'manage_options', 'rtmedia-migration-media-size-import', array( $this, 'init' ) );
25
+ }
26
+
27
+ function rtmedia_add_admin_page_array( $admin_pages ) {
28
+ $admin_pages[ ] = "rtmedia_page_rtmedia-media-size-import";
29
+
30
+ return $admin_pages;
31
+ }
32
+
33
+ function add_admin_notice() {
34
+ $pending = $this->get_pending_count();
35
+ if ( $pending < 0 ){
36
+ $pending = 0;
37
+ }
38
+ rtmedia_update_site_option( "rtmedia_media_size_import_pending_count", $pending );
39
+ if ( $pending > 0 ){
40
+ if ( ! ( isset ( $_REQUEST[ "page" ] ) && $_REQUEST[ "page" ] == "rtmedia-migration-media-size-import" ) ){
41
+ $site_option = get_site_option( "rtmedia_media_size_import_notice" );
42
+ if ( ! $site_option || $site_option != "hide" ){
43
+ rtmedia_update_site_option( "rtmedia_media_size_import_notice", "show" );
44
+ add_action( 'admin_notices', array( &$this, 'add_rtmedia_media_size_import_notice' ) );
45
+ }
46
+ }
47
+ }
48
+ }
49
+
50
+ function add_rtmedia_media_size_import_notice() {
51
+ if ( current_user_can( 'manage_options' ) ){
52
+ $this->create_notice( "<p><strong>rtMedia</strong>: <a href='" . admin_url( "admin.php?page=rtmedia-migration-media-size-import&force=true" ) . "'>Click Here</a> to import media sizes. <a href='#' onclick='rtmedia_hide_media_size_import_notice()' style='float:right'>" . __( "Hide" ) . "</a> </p>" );
53
+ ?>
54
+ <script type="text/javascript">
55
+ function rtmedia_hide_media_size_import_notice() {
56
+ var data = {action: 'rtmedia_hide_media_size_import_notice'};
57
+ jQuery.post( ajaxurl, data, function ( response ) {
58
+ response = response.trim();
59
+ if ( response === "1" )
60
+ jQuery( '.rtmedia-media-size-import-error' ).remove();
61
+ } );
62
+ }
63
+ </script>
64
+ <?php
65
+ }
66
+ }
67
+
68
+ function create_notice( $message, $type = "error" ) {
69
+ echo '<div class="' . $type . ' rtmedia-media-size-import-error">' . $message . '</div>';
70
+ }
71
+
72
+ function init() {
73
+ $prog = new rtProgress();
74
+ $pending = $this->get_pending_count();
75
+ $total = $this->get_total_count();
76
+ $done = $total - $pending;
77
+ ?>
78
+ <div class="wrap">
79
+ <h2>rtMedia Media Size Import</h2>
80
+ <?php
81
+ echo '<span class="pending">' . rtmedia_migrate_formatseconds( $total - $done ) . '</span><br />';
82
+ echo '<span class="finished">' . $done . '</span>/<span class="total">' . $total . '</span>';
83
+ echo '<img src="images/loading.gif" alt="syncing" id="rtMediaSyncing" style="display:none" />';
84
+
85
+ $temp = $prog->progress( $done, $total );
86
+ $prog->progress_ui( $temp, true );
87
+ ?>
88
+ <script type="text/javascript">
89
+ var false_count = 0;
90
+ var curr_done = 0;
91
+ jQuery( document ).ready( function ( e ) {
92
+ jQuery( "#toplevel_page_rtmedia-settings" ).addClass( "wp-has-current-submenu" )
93
+ jQuery( "#toplevel_page_rtmedia-settings" ).removeClass( "wp-not-current-submenu" )
94
+ jQuery( "#toplevel_page_rtmedia-settings" ).addClass( "wp-menu-open" )
95
+ jQuery( "#toplevel_page_rtmedia-settings>a" ).addClass( "wp-menu-open" )
96
+ jQuery( "#toplevel_page_rtmedia-settings>a" ).addClass( "wp-has-current-submenu" )
97
+ if ( db_total < 1 )
98
+ jQuery( "#submit" ).attr( 'disabled', "disabled" );
99
+ } )
100
+ function db_start_migration( db_done, db_total ) {
101
+
102
+ if ( db_done < db_total ) {
103
+ jQuery( "#rtMediaSyncing" ).show();
104
+ jQuery.ajax( {
105
+ url: rtmedia_admin_ajax,
106
+ type: 'post',
107
+ data: {
108
+ "action": "rtmedia_media_size_import",
109
+ "done": db_done
110
+ },
111
+ success: function ( sdata ) {
112
+
113
+ try {
114
+ data = JSON.parse( sdata );
115
+ } catch ( e ) {
116
+ jQuery( "#submit" ).attr( 'disabled', "" );
117
+ }
118
+ if ( data.status ) {
119
+ done = parseInt( data.done );
120
+ total = parseInt( data.total );
121
+ var progw = Math.ceil( (done / total) * 100 );
122
+ if ( progw > 100 ) {
123
+ progw = 100;
124
+ }
125
+ ;
126
+ jQuery( '#rtprogressbar>div' ).css( 'width', progw + '%' );
127
+ jQuery( 'span.finished' ).html( done );
128
+ jQuery( 'span.total' ).html( total );
129
+ jQuery( 'span.pending' ).html( data.pending );
130
+ if( curr_done == done ) {
131
+ false_count++;
132
+ } else {
133
+ false_count = 0;
134
+ }
135
+ curr_done = done;
136
+ if( false_count > 5 ) {
137
+ rtm_show_file_error( done, total );
138
+ } else {
139
+ db_start_migration( done, total );
140
+ }
141
+ } else {
142
+ alert( "Migration completed." );
143
+ jQuery( "#rtMediaSyncing" ).hide();
144
+ }
145
+ },
146
+ error: function () {
147
+ alert( "Error During Migration, Please Refresh Page then try again" );
148
+ jQuery( "#submit" ).removeAttr( 'disabled' );
149
+ }
150
+ } );
151
+ } else {
152
+ alert( "Migration completed." );
153
+ jQuery( "#rtMediaSyncing" ).hide();
154
+ }
155
+ }
156
+ function rtm_show_file_error( done, total ) {
157
+ jQuery( 'span.pending' ).html( "File size of " + ( total - done ) + " file(s) are not imported. Don't worry, you can end importing media size now :)" );
158
+ jQuery( "#rtMediaSyncing" ).hide();
159
+ }
160
+ var db_done = <?php echo $done; ?>;
161
+ var db_total = <?php echo $total; ?>;
162
+ jQuery( document ).on( 'click', '#submit', function ( e ) {
163
+ e.preventDefault();
164
+ db_start_migration( db_done, db_total );
165
+ jQuery( this ).attr( 'disabled', 'disabled' );
166
+ } );
167
+ </script>
168
+ <hr/>
169
+ <?php if ( ! ( isset ( $rtmedia_error ) && $rtmedia_error === true ) ){ ?>
170
+ <input type="button" id="submit" value="start" class="button button-primary"/>
171
+ <?php } ?>
172
+ </div>
173
+ <?php
174
+ }
175
+
176
+ function get_pending_count() {
177
+ global $wpdb;
178
+ $rtmedia_model = new RTMediaModel();
179
+ $query_pending = "SELECT COUNT(*) as pending from {$rtmedia_model->table_name} where file_size IS NULL AND media_type in ('photo','video','document','music','other')";
180
+ $pending_count = $wpdb->get_results( $query_pending );
181
+ if ( $pending_count && sizeof( $pending_count ) > 0 ){
182
+ return $pending_count[ 0 ]->pending;
183
+ }
184
+
185
+ return 0;
186
+ }
187
+
188
+ function get_total_count() {
189
+ global $wpdb;
190
+ $rtmedia_model = new RTMediaModel();
191
+ $query_total = "SELECT COUNT(*) as total from {$rtmedia_model->table_name} where media_type in ('photo','video','document','music','other') ";
192
+ $total_count = $wpdb->get_results( $query_total );
193
+ if ( $total_count && sizeof( $total_count ) > 0 ){
194
+ return $total_count[ 0 ]->total;
195
+ }
196
+
197
+ return 0;
198
+ }
199
+
200
+ function rtmedia_media_size_import( $lastid = 0, $limit = 1 ) {
201
+ global $wpdb;
202
+ $rtmedia_model = new RTMediaModel();
203
+ $get_media_sql = "SELECT * from {$rtmedia_model->table_name} where file_size is NULL and media_type in ('photo','video','document','music','other') order by id limit " . $limit;
204
+ if ( $lastid ){
205
+ $get_media_sql = "SELECT * from {$rtmedia_model->table_name} where id > '" . $lastid . "' AND file_size is NULL and media_type in ('photo','video','document','music','other') order by id limit " . $limit;
206
+ }
207
+ $result = $wpdb->get_results( $get_media_sql );
208
+ if ( $result && sizeof( $result ) > 0 ){
209
+ $this->migrate_single_media( $result[ 0 ] );
210
+ }
211
+ $this->return_migration();
212
+ }
213
+
214
+ function migrate_single_media( $result ) {
215
+ global $wpdb;
216
+ $rtmedia_model = new RTMediaModel();
217
+ $attached_file = get_attached_file( $result->media_id );
218
+ if ( ! file_exists( $attached_file ) ){
219
+ $this->rtmedia_media_size_import( $result->id );
220
+ }
221
+ $file_size = filesize( $attached_file );
222
+ $post = get_post( $result->media_id );
223
+ $post_date = $post->post_date;
224
+ $rtmedia_model->update( array( 'upload_date' => $post_date, 'file_size' => $file_size ), array( 'id' => $result->id ) );
225
+ }
226
+
227
+ function return_migration() {
228
+ $total = $this->get_total_count();
229
+ $pending = $this->get_pending_count();
230
+ $done = $total - $pending;
231
+ if ( $pending < 0 ){
232
+ $pending = 0;
233
+ $done = $total;
234
+ }
235
+ if ( $done > $total ){
236
+ $done = $total;
237
+ }
238
+ rtmedia_update_site_option( 'rtmedia_media_size_import_pending_count', $pending );
239
+ $pending_time = rtmedia_migrate_formatseconds( $pending ). " (estimated)";
240
+ echo json_encode( array( "status" => true, "done" => $done, "total" => $total, "pending" => $pending_time ) );
241
+ die();
242
+ }
243
+ }
app/main/RTMedia.php CHANGED
@@ -92,6 +92,9 @@ class RTMedia
92
  add_action('rt_db_upgrade', array($this, 'fix_group_media_privacy'));
93
  add_action('rt_db_upgrade', array($this, 'fix_db_collation'));
94
  $this->update_db();
 
 
 
95
  $this->default_thumbnail = apply_filters('rtmedia_default_thumbnail', RTMEDIA_URL . 'assets/thumb_default.png');
96
  add_action('init', array($this, 'check_global_album'));
97
  add_action('plugins_loaded', array($this, 'init'), 20);
@@ -834,6 +837,7 @@ class RTMedia
834
  wp_localize_script('rtmedia-main', 'rtmedia_more', __('more',"rtmedia"));
835
  wp_localize_script('rtmedia-main', 'rtmedia_less', __('less',"rtmedia"));
836
  wp_localize_script('rtmedia-main', 'rtmedia_delete_uploaded_media', __('This media is uploaded. Are you sure you want to delete this media?',"rtmedia"));
 
837
  wp_localize_script ( 'rtmedia-backbone', 'rMedia_loading_media', RTMEDIA_URL . "app/assets/img/boxspinner.gif" );
838
  global $rtmedia_query;
839
  if( class_exists('BuddyPress') ) {
@@ -1005,7 +1009,7 @@ function rtmedia_update_site_option($option_name, $option_value) {
1005
 
1006
  function get_rtmedia_group_link($group_id) {
1007
  $group = groups_get_group(array('group_id' => $group_id));
1008
- return home_url(trailingslashit(bp_get_groups_root_slug()) . $group->slug);
1009
  }
1010
 
1011
  function rtmedia_get_site_option($option_name, $default = false) {
92
  add_action('rt_db_upgrade', array($this, 'fix_group_media_privacy'));
93
  add_action('rt_db_upgrade', array($this, 'fix_db_collation'));
94
  $this->update_db();
95
+ remove_action('rt_db_upgrade', array($this, 'fix_privacy'));
96
+ remove_action('rt_db_upgrade', array($this, 'fix_group_media_privacy'));
97
+ remove_action('rt_db_upgrade', array($this, 'fix_db_collation'));
98
  $this->default_thumbnail = apply_filters('rtmedia_default_thumbnail', RTMEDIA_URL . 'assets/thumb_default.png');
99
  add_action('init', array($this, 'check_global_album'));
100
  add_action('plugins_loaded', array($this, 'init'), 20);
837
  wp_localize_script('rtmedia-main', 'rtmedia_more', __('more',"rtmedia"));
838
  wp_localize_script('rtmedia-main', 'rtmedia_less', __('less',"rtmedia"));
839
  wp_localize_script('rtmedia-main', 'rtmedia_delete_uploaded_media', __('This media is uploaded. Are you sure you want to delete this media?',"rtmedia"));
840
+ wp_localize_script('rtmedia-main', 'rtm_wp_version', get_bloginfo('version') );
841
  wp_localize_script ( 'rtmedia-backbone', 'rMedia_loading_media', RTMEDIA_URL . "app/assets/img/boxspinner.gif" );
842
  global $rtmedia_query;
843
  if( class_exists('BuddyPress') ) {
1009
 
1010
  function get_rtmedia_group_link($group_id) {
1011
  $group = groups_get_group(array('group_id' => $group_id));
1012
+ return apply_filters( 'rtmedia_get_group_link', home_url( trailingslashit( bp_get_groups_root_slug() ) . $group->slug) );
1013
  }
1014
 
1015
  function rtmedia_get_site_option($option_name, $default = false) {
app/main/controllers/activity/RTMediaBuddyPressActivity.php CHANGED
@@ -108,8 +108,13 @@ class RTMediaBuddyPressActivity {
108
  }
109
 
110
  function bp_activity_posted_update ( $content, $user_id, $activity_id ) {
 
 
 
 
 
 
111
  if ( isset ( $_POST[ "rtMedia_attached_files" ] ) && is_array ( $_POST[ "rtMedia_attached_files" ] ) ) {
112
- global $wpdb, $bp;
113
  $updated_content = $wpdb->get_var ( "select content from {$bp->activity->table_name} where id= $activity_id" );
114
 
115
  $objActivity = new RTMediaActivity ( $_POST[ "rtMedia_attached_files" ], 0, $updated_content );
@@ -121,6 +126,9 @@ class RTMediaBuddyPressActivity {
121
  $sql = "update $mediaObj->table_name set activity_id = '" . $activity_id . "' where blog_id = '".get_current_blog_id()."' and id in (" . implode ( ",", $_POST[ "rtMedia_attached_files" ] ) . ")";
122
  $wpdb->query ( $sql );
123
  }
 
 
 
124
  if ( isset ( $_POST[ 'rtmedia-privacy' ] ) ) {
125
  $privacy = -1;
126
  if ( is_rtmedia_privacy_enable () ) {
@@ -164,9 +172,13 @@ class RTMediaBuddyPressActivity {
164
  wp_localize_script ( 'rtmedia-backbone', 'is_edit_allowed', $is_edit_allowed );
165
  wp_localize_script ( 'rtmedia-backbone', 'rtMedia_update_plupload_config', $params );
166
 
167
-
168
- $uploadView = new RTMediaUploadView ( array( 'activity' => true ) );
169
- $uploadView->render ( 'uploader' );
 
 
 
 
170
  }
171
 
172
  function override_allowed_tags ( $activity_allowedtags ) {
108
  }
109
 
110
  function bp_activity_posted_update ( $content, $user_id, $activity_id ) {
111
+ global $wpdb, $bp;
112
+ $updated_content = "";
113
+
114
+ // hook for rtmedia buddypress before activity posted
115
+ do_action( 'rtmedia_bp_before_activity_posted', $content, $user_id, $activity_id );
116
+
117
  if ( isset ( $_POST[ "rtMedia_attached_files" ] ) && is_array ( $_POST[ "rtMedia_attached_files" ] ) ) {
 
118
  $updated_content = $wpdb->get_var ( "select content from {$bp->activity->table_name} where id= $activity_id" );
119
 
120
  $objActivity = new RTMediaActivity ( $_POST[ "rtMedia_attached_files" ], 0, $updated_content );
126
  $sql = "update $mediaObj->table_name set activity_id = '" . $activity_id . "' where blog_id = '".get_current_blog_id()."' and id in (" . implode ( ",", $_POST[ "rtMedia_attached_files" ] ) . ")";
127
  $wpdb->query ( $sql );
128
  }
129
+ // hook for rtmedia buddypress after activity posted
130
+ do_action( 'rtmedia_bp_activity_posted', $updated_content, $user_id, $activity_id );
131
+
132
  if ( isset ( $_POST[ 'rtmedia-privacy' ] ) ) {
133
  $privacy = -1;
134
  if ( is_rtmedia_privacy_enable () ) {
172
  wp_localize_script ( 'rtmedia-backbone', 'is_edit_allowed', $is_edit_allowed );
173
  wp_localize_script ( 'rtmedia-backbone', 'rtMedia_update_plupload_config', $params );
174
 
175
+ $allow_upload = apply_filters( 'rtmedia_allow_uploader_view', true, 'activity' );
176
+ if( $allow_upload ) {
177
+ $uploadView = new RTMediaUploadView ( array( 'activity' => true ) );
178
+ $uploadView->render ( 'uploader' );
179
+ } else {
180
+ echo "<div class='rtmedia-upload-not-allowed'>" . apply_filters( 'rtmedia_upload_not_allowed_message', __('You are not allowed to upload/attach media.','rtmedia'), 'activity' ) . "</div>";
181
+ }
182
  }
183
 
184
  function override_allowed_tags ( $activity_allowedtags ) {
app/main/controllers/media/RTMediaMedia.php CHANGED
@@ -367,7 +367,7 @@ class RTMediaMedia {
367
  $attachments[ ] = array(
368
  'post_mime_type' => $file[ 'type' ],
369
  'guid' => $file[ 'url' ],
370
- 'post_title' => $uploaded[ 'title' ] ? $uploaded[ 'title' ] : $file[ 'name' ],
371
  'post_content' => $uploaded[ 'description' ] ? $uploaded[ 'description' ] : '',
372
  'post_parent' => $album_id,
373
  'post_author' => $uploaded[ 'media_author' ]
@@ -472,7 +472,10 @@ class RTMediaMedia {
472
  'context_id' => $uploaded[ 'context_id' ],
473
  'privacy' => $uploaded[ 'privacy' ]
474
  );
475
-
 
 
 
476
  $media_id[ ] = $this->model->insert ( $media );
477
  }
478
  return $media_id;
367
  $attachments[ ] = array(
368
  'post_mime_type' => $file[ 'type' ],
369
  'guid' => $file[ 'url' ],
370
+ 'post_title' => $uploaded[ 'title' ] ? $uploaded[ 'title' ] : preg_replace("/\\.[^.\\s]{3,4}$/", "", $file[ 'name' ]),
371
  'post_content' => $uploaded[ 'description' ] ? $uploaded[ 'description' ] : '',
372
  'post_parent' => $album_id,
373
  'post_author' => $uploaded[ 'media_author' ]
472
  'context_id' => $uploaded[ 'context_id' ],
473
  'privacy' => $uploaded[ 'privacy' ]
474
  );
475
+ if( isset( $file_object ) && isset( $file_object[0] ) && isset( $file_object[0]['file'] ) ) {
476
+ $media['file_size'] = filesize( $file_object[0]['file'] );
477
+ }
478
+ $media['upload_date'] = $attachment['post_date'];
479
  $media_id[ ] = $this->model->insert ( $media );
480
  }
481
  return $media_id;
app/main/controllers/shortcodes/RTMediaGalleryShortcode.php CHANGED
@@ -36,8 +36,10 @@ class RTMediaGalleryShortcode {
36
  die();
37
  }
38
  static function register_scripts () {
39
- wp_enqueue_script ( 'plupload-all' );
40
- wp_enqueue_script ( 'rtmedia-backbone', RTMEDIA_URL . 'app/assets/js/rtMedia.backbone.js', array( 'plupload', 'backbone' ), false, true );
 
 
41
 
42
  if(is_rtmedia_album_gallery()) {
43
  $template_url = add_query_arg(array("action" => 'rtmedia_get_template', "template" => "album-gallery-item"),admin_url("admin-ajax.php"));
36
  die();
37
  }
38
  static function register_scripts () {
39
+ if( ! wp_script_is ( 'plupload-all' ) ) {
40
+ wp_enqueue_script ( 'plupload-all' );
41
+ }
42
+ wp_enqueue_script ( 'rtmedia-backbone', RTMEDIA_URL . 'app/assets/js/rtMedia.backbone.js', array( 'plupload-all', 'backbone' ), false, true );
43
 
44
  if(is_rtmedia_album_gallery()) {
45
  $template_url = add_query_arg(array("action" => 'rtmedia_get_template', "template" => "album-gallery-item"),admin_url("admin-ajax.php"));
app/main/controllers/shortcodes/RTMediaUploadShortcode.php CHANGED
@@ -54,49 +54,54 @@ $flag = ( ! ( is_home () || is_post_type_archive () || is_author ()))
54
  * @param type $attr
55
  */
56
  static function pre_render ( $attr ) {
57
- global $post;
58
- global $rtmedia_query;
59
- if( ! $rtmedia_query )
60
- $rtmedia_query = new RTMediaQuery ();
61
- if( !isset($attr['is_up_shortcode']) || $attr['is_up_shortcode'] !== false) {
62
- $rtmedia_query->is_upload_shortcode = true;// set is_upload_shortcode in rtmedia query as true
63
- } else {
64
- $rtmedia_query->is_upload_shortcode = false;// set is_upload_shortcode in rtmedia query as true
65
- }
66
-
67
- if( isset( $attr['media_type'] ) ) {
68
- global $rtmedia;
69
- $allowed_media_type = $rtmedia->allowed_types;
70
- if( isset($allowed_media_type[$attr['media_type']]) ) {
71
- wp_localize_script('rtmedia-backbone', "rtmedia_upload_type_filter", $allowed_media_type[$attr['media_type']]['extn']);
72
  }
73
- }
74
 
75
- if ( isset ( $attr ) && !empty($attr)) {
76
- if ( ! is_array ( $attr ) ) {
77
- $attr = Array( );
78
- }
79
- if ( ! isset ( $attr[ "context_id" ] ) && isset ( $post->ID ) ) {
80
- $attr[ "context_id" ] = $post->ID;
81
- }
82
- if ( ! isset ( $attr[ "context" ] ) && isset ( $post->post_type ) ) {
83
- $attr[ "context" ] = $post->post_type;
84
- }
85
- }
86
 
87
- if ( self::display_allowed () || ( isset( $attr['allow_anonymous'] ) && $attr['allow_anonymous'] === true ) ) {
88
- if ( ! _device_can_upload () ) {
89
- echo '<p>' . __( 'The web browser on your device cannot be used to upload files.', 'rtmedia' ) . '</p>';
90
- return;
91
- }
92
- ob_start ();
 
 
 
 
 
93
 
94
- self::$add_sc_script = true;
95
- RTMediaUploadTemplate::render ( $attr );
 
 
 
 
96
 
97
- self::$uploader_displayed = true;
98
- return ob_get_clean ();
99
- }
 
 
 
 
 
 
100
  }
101
 
102
  }
54
  * @param type $attr
55
  */
56
  static function pre_render ( $attr ) {
57
+ $allow_upload = apply_filters( 'rtmedia_allow_uploader_view', true, 'uploader_shortcode' );
58
+ if( $allow_upload ) {
59
+ global $post;
60
+ global $rtmedia_query;
61
+ if( ! $rtmedia_query )
62
+ $rtmedia_query = new RTMediaQuery ();
63
+ if( !isset($attr['is_up_shortcode']) || $attr['is_up_shortcode'] !== false) {
64
+ $rtmedia_query->is_upload_shortcode = true;// set is_upload_shortcode in rtmedia query as true
65
+ } else {
66
+ $rtmedia_query->is_upload_shortcode = false;// set is_upload_shortcode in rtmedia query as true
 
 
 
 
 
67
  }
 
68
 
69
+ if( isset( $attr['media_type'] ) ) {
70
+ global $rtmedia;
71
+ $allowed_media_type = $rtmedia->allowed_types;
72
+ if( isset($allowed_media_type[$attr['media_type']]) ) {
73
+ wp_localize_script('rtmedia-backbone', "rtmedia_upload_type_filter", $allowed_media_type[$attr['media_type']]['extn']);
74
+ }
75
+ }
 
 
 
 
76
 
77
+ if ( isset ( $attr ) && !empty($attr)) {
78
+ if ( ! is_array ( $attr ) ) {
79
+ $attr = Array( );
80
+ }
81
+ if ( ! isset ( $attr[ "context_id" ] ) && isset ( $post->ID ) ) {
82
+ $attr[ "context_id" ] = $post->ID;
83
+ }
84
+ if ( ! isset ( $attr[ "context" ] ) && isset ( $post->post_type ) ) {
85
+ $attr[ "context" ] = $post->post_type;
86
+ }
87
+ }
88
 
89
+ if ( self::display_allowed () || ( isset( $attr['allow_anonymous'] ) && $attr['allow_anonymous'] === true ) ) {
90
+ if ( ! _device_can_upload () ) {
91
+ echo '<p>' . __( 'The web browser on your device cannot be used to upload files.', 'rtmedia' ) . '</p>';
92
+ return;
93
+ }
94
+ ob_start ();
95
 
96
+ self::$add_sc_script = true;
97
+ RTMediaUploadTemplate::render ( $attr );
98
+
99
+ self::$uploader_displayed = true;
100
+ return ob_get_clean ();
101
+ }
102
+ } else {
103
+ echo "<div class='rtmedia-upload-not-allowed'>" . apply_filters( 'rtmedia_upload_not_allowed_message', __('You are not allowed to upload/attach media.','rtmedia'), 'uploader_shortcode' ) . "</div>";
104
+ }
105
  }
106
 
107
  }
app/main/controllers/template/rt-template-functions.php CHANGED
@@ -1153,13 +1153,19 @@ function rtmedia_delete_form ( $echo = true) {
1153
  * @param type $attr
1154
  */
1155
  function rtmedia_uploader ( $attr = '' ) {
1156
- if ( function_exists ( 'bp_is_blog_page' ) && ! bp_is_blog_page () ) {
1157
- if ( function_exists ( 'bp_is_user' ) && bp_is_user () && function_exists ( 'bp_displayed_user_id' ) && bp_displayed_user_id () == get_current_user_id () )
1158
- echo RTMediaUploadShortcode::pre_render ( $attr );
1159
- else if ( function_exists ( 'bp_is_group' ) && bp_is_group () ) {
1160
- if ( can_user_upload_in_group () )
1161
- echo RTMediaUploadShortcode::pre_render ( $attr );
1162
- }
 
 
 
 
 
 
1163
  }
1164
  }
1165
 
@@ -2164,3 +2170,67 @@ function is_rtmedia_page() {
2164
 
2165
  return $rtmedia_interaction->routes[RTMEDIA_MEDIA_SLUG]->is_template();
2166
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1153
  * @param type $attr
1154
  */
1155
  function rtmedia_uploader ( $attr = '' ) {
1156
+ $allow_upload = apply_filters( 'rtmedia_allow_uploader_view', true, 'media_gallery' );
1157
+ if( $allow_upload ) {
1158
+ if ( function_exists ( 'bp_is_blog_page' ) && ! bp_is_blog_page () ) {
1159
+ if ( function_exists ( 'bp_is_user' ) && bp_is_user () && function_exists ( 'bp_displayed_user_id' ) && bp_displayed_user_id () == get_current_user_id () ) {
1160
+ echo RTMediaUploadShortcode::pre_render ( $attr );
1161
+ } else if ( function_exists ( 'bp_is_group' ) && bp_is_group () ) {
1162
+ if ( can_user_upload_in_group () ) {
1163
+ echo RTMediaUploadShortcode::pre_render ( $attr );
1164
+ }
1165
+ }
1166
+ }
1167
+ } else {
1168
+ echo "<div class='rtmedia-upload-not-allowed'>" . apply_filters( 'rtmedia_upload_not_allowed_message', __('You are not allowed to upload/attach media.','rtmedia'), 'media_gallery' ) . "</div>";
1169
  }
1170
  }
1171
 
2170
 
2171
  return $rtmedia_interaction->routes[RTMEDIA_MEDIA_SLUG]->is_template();
2172
  }
2173
+
2174
+ // formatseconds function to be used in migration in importing
2175
+ function rtmedia_migrate_formatseconds ( $secondsLeft ) {
2176
+
2177
+ $minuteInSeconds = 60;
2178
+ $hourInSeconds = $minuteInSeconds * 60;
2179
+ $dayInSeconds = $hourInSeconds * 24;
2180
+
2181
+ $days = floor ( $secondsLeft / $dayInSeconds );
2182
+ $secondsLeft = $secondsLeft % $dayInSeconds;
2183
+
2184
+ $hours = floor ( $secondsLeft / $hourInSeconds );
2185
+ $secondsLeft = $secondsLeft % $hourInSeconds;
2186
+
2187
+ $minutes = floor ( $secondsLeft / $minuteInSeconds );
2188
+
2189
+ $seconds = $secondsLeft % $minuteInSeconds;
2190
+
2191
+ $timeComponents = array( );
2192
+
2193
+ if ( $days > 0 ) {
2194
+ $timeComponents[ ] = $days . " day" . ($days > 1 ? "s" : "");
2195
+ }
2196
+
2197
+ if ( $hours > 0 ) {
2198
+ $timeComponents[ ] = $hours . " hour" . ($hours > 1 ? "s" : "");
2199
+ }
2200
+
2201
+ if ( $minutes > 0 ) {
2202
+ $timeComponents[ ] = $minutes . " minute" . ($minutes > 1 ? "s" : "");
2203
+ }
2204
+
2205
+ if ( $seconds > 0 ) {
2206
+ $timeComponents[ ] = $seconds . " second" . ($seconds > 1 ? "s" : "");
2207
+ }
2208
+ if ( count ( $timeComponents ) > 0 ) {
2209
+ $formattedTimeRemaining = implode ( ", ", $timeComponents );
2210
+ $formattedTimeRemaining = trim ( $formattedTimeRemaining );
2211
+ } else {
2212
+ $formattedTimeRemaining = "No time remaining.";
2213
+ }
2214
+
2215
+ return $formattedTimeRemaining;
2216
+ }
2217
+
2218
+
2219
+ /**
2220
+ * echo the size of the media file
2221
+ * @global type $rtmedia_media
2222
+ */
2223
+ function rtmedia_file_size () {
2224
+
2225
+ global $rtmedia_backbone;
2226
+ if ( $rtmedia_backbone[ 'backbone' ] ) {
2227
+ echo '<%= file_size %>';
2228
+ } else {
2229
+ global $rtmedia_media;
2230
+ if( isset( $rtmedia_media->file_size ) ){
2231
+ return $rtmedia_media->file_size;
2232
+ }else{
2233
+ return filesize( get_attached_file( $rtmedia_media->media_id ) );
2234
+ }
2235
+ }
2236
+ }
app/main/controllers/upload/RTMediaUploadView.php CHANGED
@@ -75,6 +75,7 @@ class RTMediaUploadView {
75
  ."<div class='rtm-album-privacy'>" . $album . $privacy . "</div>"
76
  . '<div class="rtm-select-files"><input id="rtMedia-upload-button" value="' . __( "Select your files", "rtmedia" ) . '" type="button" class="rtmedia-upload-input rtmedia-file" />'
77
  . '<span class="rtm-seperator">' . __('or','rtmedia') .'</span><span class="drag-drop-info">' . __('Drop your files here', 'rtmedia') . '</span> <i class="rtm-file-size-limit rtmicon-info-circle"></i></div>'
 
78
  . '<input type="button" class="start-media-upload" value="' . __('Start upload', 'rtmedia') .'"/>'
79
  . '</div>'
80
  . '<div class="row">'
75
  ."<div class='rtm-album-privacy'>" . $album . $privacy . "</div>"
76
  . '<div class="rtm-select-files"><input id="rtMedia-upload-button" value="' . __( "Select your files", "rtmedia" ) . '" type="button" class="rtmedia-upload-input rtmedia-file" />'
77
  . '<span class="rtm-seperator">' . __('or','rtmedia') .'</span><span class="drag-drop-info">' . __('Drop your files here', 'rtmedia') . '</span> <i class="rtm-file-size-limit rtmicon-info-circle"></i></div>'
78
+ . apply_filters( 'rtmedia_uploader_before_start_upload_button', "" )
79
  . '<input type="button" class="start-media-upload" value="' . __('Start upload', 'rtmedia') .'"/>'
80
  . '</div>'
81
  . '<div class="row">'
app/schema/rtm_media.schema CHANGED
@@ -20,6 +20,8 @@ CREATE TABLE %s (
20
  ratings_average decimal(4,2) NULL DEFAULT 0 ,
21
  likes bigint(20) NULL DEFAULT 0 ,
22
  dislikes bigint(20) NULL DEFAULT 0 ,
 
 
23
  PRIMARY KEY (id),
24
  KEY media_id (media_id),
25
  KEY media_author (media_author),
20
  ratings_average decimal(4,2) NULL DEFAULT 0 ,
21
  likes bigint(20) NULL DEFAULT 0 ,
22
  dislikes bigint(20) NULL DEFAULT 0 ,
23
+ upload_date datetime DEFAULT '0000-00-00 00:00:00',
24
+ file_size bigint(20) NULL DEFAULT NULL,
25
  PRIMARY KEY (id),
26
  KEY media_id (media_id),
27
  KEY media_author (media_author),
index.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
5
  Plugin URI: http://rtcamp.com/buddypress-media/?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: 3.6.9
8
  Author: rtCamp
9
  Text Domain: rtmedia
10
  Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
4
  Plugin Name: rtMedia for WordPress, BuddyPress and bbPress
5
  Plugin URI: http://rtcamp.com/buddypress-media/?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: 3.6.10
8
  Author: rtCamp
9
  Text Domain: rtmedia
10
  Author URI: http://rtcamp.com/?utm_source=dashboard&utm_medium=plugin&utm_campaign=buddypress-media
languages/rtmedia-de_DE.mo CHANGED
Binary file
languages/rtmedia-sv_SV.mo ADDED
Binary file
languages/rtmedia.mo CHANGED
Binary file
languages/rtmedia.po CHANGED
@@ -2,8 +2,8 @@ msgid ""
2
  msgstr ""
3
  "Project-Id-Version: BuddyPress Media\n"
4
  "Report-Msgid-Bugs-To: \n"
5
- "POT-Creation-Date: 2014-03-21 20:21+0530\n"
6
- "PO-Revision-Date: 2014-03-21 20:21+0530\n"
7
  "Last-Translator: faishal <faishal.saiyed@rtcamp.com>\n"
8
  "Language-Team: rtCamp <info@rtcamp.com>\n"
9
  "Language: en_IN\n"
@@ -15,207 +15,207 @@ msgstr ""
15
  "X-Generator: Poedit 1.5.4\n"
16
  "X-Poedit-SearchPath-0: .\n"
17
 
18
- #: app/main/RTMedia.php:251
19
  msgid "Photo"
20
  msgstr ""
21
 
22
- #: app/main/RTMedia.php:252
23
  msgid "Photos"
24
  msgstr ""
25
 
26
- #: app/main/RTMedia.php:260
27
  msgid "Video"
28
  msgstr ""
29
 
30
- #: app/main/RTMedia.php:261
31
  msgid "Videos"
32
  msgstr ""
33
 
34
- #: app/main/RTMedia.php:269 app/main/RTMedia.php:270
35
  msgid "Music"
36
  msgstr ""
37
 
38
- #: app/main/RTMedia.php:357
39
  msgid "<strong>Private</strong> - Visible only to the user"
40
  msgstr ""
41
 
42
- #: app/main/RTMedia.php:358
43
  msgid "<strong>Friends</strong> - Visible to user's friends"
44
  msgstr ""
45
 
46
- #: app/main/RTMedia.php:359
47
  msgid "<strong>Logged in Users</strong> - Visible to registered users"
48
  msgstr ""
49
 
50
- #: app/main/RTMedia.php:360
51
  msgid "<strong>Public</strong> - Visible to the world"
52
  msgstr ""
53
 
54
- #: app/main/RTMedia.php:511 app/importers/BPMediaAlbumimporter.php:91
55
  msgid "Media"
56
  msgstr ""
57
 
58
- #: app/main/RTMedia.php:517 app/main/controllers/template/RTMediaNav.php:146
59
  msgid "All"
60
  msgstr ""
61
 
62
- #: app/main/RTMedia.php:526
63
  #: app/main/controllers/template/rt-template-functions.php:1057
64
  #: app/main/controllers/media/RTMediaAlbum.php:54
65
  msgid "Album"
66
  msgstr ""
67
 
68
- #: app/main/RTMedia.php:529 app/main/controllers/template/RTMediaNav.php:95
69
  #: app/main/controllers/template/RTMediaNav.php:167
70
  #: app/main/controllers/media/RTMediaAlbum.php:53
71
  #: app/main/controllers/media/RTMediaAlbum.php:65
72
  msgid "Albums"
73
  msgstr ""
74
 
75
- #: app/main/RTMedia.php:537
76
- #: app/main/controllers/template/rt-template-functions.php:1732
77
- #: app/main/controllers/template/rt-template-functions.php:1735
78
  msgid "Upload"
79
  msgstr ""
80
 
81
- #: app/main/RTMedia.php:541
82
  msgid "Wall Post"
83
  msgstr ""
84
 
85
- #: app/main/RTMedia.php:732
86
  msgid "Wall Posts"
87
  msgstr ""
88
 
89
- #: app/main/RTMedia.php:772
90
  msgid ": Can't Create Database table. Please check create table permission."
91
  msgstr ""
92
 
93
- #: app/main/RTMedia.php:806
94
  msgid "Loading media"
95
  msgstr ""
96
 
97
- #: app/main/RTMedia.php:807
98
  msgid "Please enter some content to post."
99
  msgstr ""
100
 
101
- #: app/main/RTMedia.php:808
102
  msgid "Empty Comment is not allowed."
103
  msgstr ""
104
 
105
- #: app/main/RTMedia.php:809
106
  msgid "Are you sure you want to delete this media?"
107
  msgstr ""
108
 
109
- #: app/main/RTMedia.php:810
110
  msgid "Are you sure you want to delete this comment?"
111
  msgstr ""
112
 
113
- #: app/main/RTMedia.php:811
114
  msgid "Are you sure you want to delete this Album?"
115
  msgstr ""
116
 
117
- #: app/main/RTMedia.php:812
118
  msgid "Drop files here"
119
  msgstr ""
120
 
121
- #: app/main/RTMedia.php:813
122
  msgid "album created successfully."
123
  msgstr ""
124
 
125
- #: app/main/RTMedia.php:814
126
  msgid "Something went wrong. Please try again."
127
  msgstr ""
128
 
129
- #: app/main/RTMedia.php:815
130
  msgid "Enter an album name."
131
  msgstr ""
132
 
133
- #: app/main/RTMedia.php:816
134
  msgid "Max file Size Limit : "
135
  msgstr ""
136
 
137
- #: app/main/RTMedia.php:817
138
  msgid "Allowed File Formats"
139
  msgstr ""
140
 
141
- #: app/main/RTMedia.php:818 templates/media/album-single-edit.php:58
142
  msgid "Select All Visible"
143
  msgstr ""
144
 
145
- #: app/main/RTMedia.php:819
146
  msgid "Unselect All Visible"
147
  msgstr ""
148
 
149
- #: app/main/RTMedia.php:820
150
  msgid "Please select some media."
151
  msgstr ""
152
 
153
- #: app/main/RTMedia.php:821
154
  msgid "Are you sure you want to delete the selected medias?"
155
  msgstr ""
156
 
157
- #: app/main/RTMedia.php:822
158
  msgid "Are you sure you want to move the selected medias?"
159
  msgstr ""
160
 
161
- #: app/main/RTMedia.php:823
162
  msgid "Waiting"
163
  msgstr ""
164
 
165
- #: app/main/RTMedia.php:824
166
  msgid "Uploaded"
167
  msgstr ""
168
 
169
- #: app/main/RTMedia.php:825
170
  msgid "Uploading"
171
  msgstr ""
172
 
173
- #: app/main/RTMedia.php:826
174
  msgid "Failed"
175
  msgstr ""
176
 
177
- #: app/main/RTMedia.php:827
178
  msgid "Close"
179
  msgstr ""
180
 
181
- #: app/main/RTMedia.php:828
182
  #: app/main/controllers/template/rt-template-functions.php:591
183
  #: app/main/controllers/template/rt-template-functions.php:612
184
  msgid "Edit"
185
  msgstr ""
186
 
187
- #: app/main/RTMedia.php:829
188
  #: app/main/controllers/template/rt-template-functions.php:1136
189
  #: app/main/controllers/template/rt-template-functions.php:1143
190
  #: templates/media/album-single-edit.php:60
191
  msgid "Delete"
192
  msgstr ""
193
 
194
- #: app/main/RTMedia.php:830 templates/media/media-single-edit.php:13
195
  msgid "Edit Media"
196
  msgstr ""
197
 
198
- #: app/main/RTMedia.php:831
199
  msgid "Remove from queue"
200
  msgstr ""
201
 
202
- #: app/main/RTMedia.php:832
203
  msgid "Add more files"
204
  msgstr ""
205
 
206
- #: app/main/RTMedia.php:833
207
  msgid "File not supported"
208
  msgstr ""
209
 
210
- #: app/main/RTMedia.php:834
211
  msgid "more"
212
  msgstr ""
213
 
214
- #: app/main/RTMedia.php:835
215
  msgid "less"
216
  msgstr ""
217
 
218
- #: app/main/RTMedia.php:836
219
  msgid "This media is uploaded. Are you sure you want to delete this media?"
220
  msgstr ""
221
 
@@ -261,7 +261,7 @@ msgid "All "
261
  msgstr ""
262
 
263
  #: app/main/controllers/template/rt-template-functions.php:567
264
- #: app/main/controllers/template/rt-template-functions.php:1319
265
  msgid "Options"
266
  msgstr ""
267
 
@@ -303,280 +303,286 @@ msgstr ""
303
  msgid "Delete Media"
304
  msgstr ""
305
 
306
- #: app/main/controllers/template/rt-template-functions.php:1263
 
 
 
 
 
 
307
  msgid "Profile Albums"
308
  msgstr ""
309
 
310
- #: app/main/controllers/template/rt-template-functions.php:1265
311
- #: app/main/controllers/template/rt-template-functions.php:1301
312
  msgid "Group Albums"
313
  msgstr ""
314
 
315
- #: app/main/controllers/template/rt-template-functions.php:1374
316
- #: app/main/controllers/template/rt-template-functions.php:1387
317
  msgid "Create New Album"
318
  msgstr ""
319
 
320
- #: app/main/controllers/template/rt-template-functions.php:1374
321
  msgid "Add Album"
322
  msgstr ""
323
 
324
- #: app/main/controllers/template/rt-template-functions.php:1389
325
  msgid "Album Title : "
326
  msgstr ""
327
 
328
- #: app/main/controllers/template/rt-template-functions.php:1393
329
  #: app/main/controllers/media/RTMediaAlbum.php:56
330
  msgid "Create Album"
331
  msgstr ""
332
 
333
- #: app/main/controllers/template/rt-template-functions.php:1422
334
- #: app/main/controllers/template/rt-template-functions.php:1427
335
- #: app/main/controllers/template/rt-template-functions.php:1478
336
  msgid "Merge Album"
337
  msgstr ""
338
 
339
- #: app/main/controllers/template/rt-template-functions.php:1424
340
  msgid "Select Album to merge with : "
341
  msgstr ""
342
 
343
- #: app/main/controllers/template/rt-template-functions.php:1467
344
  #: app/main/controllers/media/RTMediaAlbum.php:57
345
  msgid "Edit Album"
346
  msgstr ""
347
 
348
- #: app/main/controllers/template/rt-template-functions.php:1470
349
  msgid "Delete Album"
350
  msgstr ""
351
 
352
- #: app/main/controllers/template/rt-template-functions.php:1503
353
  msgid "Merge"
354
  msgstr ""
355
 
356
- #: app/main/controllers/template/rt-template-functions.php:1552
357
  #: app/main/controllers/upload/RTMediaUploadView.php:65
358
  msgid "Privacy : "
359
  msgstr ""
360
 
361
- #: app/main/controllers/template/rt-template-functions.php:1722
362
  msgid "people like this"
363
  msgstr ""
364
 
365
- #: app/main/controllers/template/rt-template-functions.php:1732
366
- #: app/main/controllers/template/rt-template-functions.php:1735
367
  msgid "Upload Media"
368
  msgstr ""
369
 
370
- #: app/main/controllers/template/rt-template-functions.php:1778
371
  msgid "Go PRO!"
372
  msgstr ""
373
 
374
- #: app/main/controllers/template/rt-template-functions.php:1799
375
  msgid "Reasons to buy rtMedia-PRO"
376
  msgstr ""
377
 
378
- #: app/main/controllers/template/rt-template-functions.php:1804
379
  msgid "RSS Feed/Podcasting Support"
380
  msgstr ""
381
 
382
- #: app/main/controllers/template/rt-template-functions.php:1805
383
  msgid ""
384
  "You can consume rtMedia uploads from iTunes as well as any feed-reader/"
385
  "podcasting software."
386
  msgstr ""
387
 
388
- #: app/main/controllers/template/rt-template-functions.php:1811
389
  msgid "WordPress Comment Attachment"
390
  msgstr ""
391
 
392
- #: app/main/controllers/template/rt-template-functions.php:1812
393
  msgid "You can attach files to WordPress comments."
394
  msgstr ""
395
 
396
- #: app/main/controllers/template/rt-template-functions.php:1818
397
  msgid "bbPress Attachment"
398
  msgstr ""
399
 
400
- #: app/main/controllers/template/rt-template-functions.php:1819
401
  msgid "You can attach files to bbPress topic and reply."
402
  msgstr ""
403
 
404
- #: app/main/controllers/template/rt-template-functions.php:1825
405
  msgid "Document Support"
406
  msgstr ""
407
 
408
- #: app/main/controllers/template/rt-template-functions.php:1826
409
  msgid ""
410
  "You can add, view and download documents like txt, doc, pdf, also add and "
411
  "upload other file types like zip, tar and tar.gz etc."
412
  msgstr ""
413
 
414
- #: app/main/controllers/template/rt-template-functions.php:1832
415
  msgid "CubePoints & MyCRED Integration"
416
  msgstr ""
417
 
418
- #: app/main/controllers/template/rt-template-functions.php:1833
419
  msgid ""
420
  "Integrating CubePoints/myCRED with rtMedia, you can reward users with "
421
  "virtual points on rtMedia activities."
422
  msgstr ""
423
 
424
- #: app/main/controllers/template/rt-template-functions.php:1839
425
  msgid "Album Privacy"
426
  msgstr ""
427
 
428
- #: app/main/controllers/template/rt-template-functions.php:1840
429
  msgid ""
430
  "This will allow you to set album privacy while creating albums or change "
431
  "album privacy with editing albums too."
432
  msgstr ""
433
 
434
- #: app/main/controllers/template/rt-template-functions.php:1846
435
  msgid "Audio Playlist"
436
  msgstr ""
437
 
438
- #: app/main/controllers/template/rt-template-functions.php:1847
439
  msgid ""
440
  "With this feature you can create your audio playlists and listen to your "
441
  "favorite music at will."
442
  msgstr ""
443
 
444
- #: app/main/controllers/template/rt-template-functions.php:1853
445
  msgid "Report Button & Moderation Tools"
446
  msgstr ""
447
 
448
- #: app/main/controllers/template/rt-template-functions.php:1854
449
  msgid ""
450
  "Users can report media if they find it offensive. Set number of reports to "
451
  "automatically take down media."
452
  msgstr ""
453
 
454
- #: app/main/controllers/template/rt-template-functions.php:1860
455
  msgid "Download Button For Media"
456
  msgstr ""
457
 
458
- #: app/main/controllers/template/rt-template-functions.php:1861
459
  msgid ""
460
  "Users can download photos, videos and music. Admin has option to allow "
461
  "download the media."
462
  msgstr ""
463
 
464
- #: app/main/controllers/template/rt-template-functions.php:1867
465
  msgid "Sidebar widgets"
466
  msgstr ""
467
 
468
- #: app/main/controllers/template/rt-template-functions.php:1868
469
  msgid ""
470
  "These will let you display a gallery or an uploader in a sidebar. Several of "
471
  "them can be used in a single sidebar."
472
  msgstr ""
473
 
474
- #: app/main/controllers/template/rt-template-functions.php:1874
475
  msgid "Post-editor button"
476
  msgstr ""
477
 
478
- #: app/main/controllers/template/rt-template-functions.php:1875
479
  msgid ""
480
  "With this button, a UI appears to quickly generate shortcodes for special "
481
  "pages like \"Editorial Picks\"."
482
  msgstr ""
483
 
484
- #: app/main/controllers/template/rt-template-functions.php:1881
485
  msgid "Star-Rating option"
486
  msgstr ""
487
 
488
- #: app/main/controllers/template/rt-template-functions.php:1882
489
  msgid ""
490
  "Users can give up to five stars to rate media. This data can be used for "
491
  "\"Most Rated Media\" in sidebars."
492
  msgstr ""
493
 
494
- #: app/main/controllers/template/rt-template-functions.php:1888
495
  msgid "Global Albums"
496
  msgstr ""
497
 
498
- #: app/main/controllers/template/rt-template-functions.php:1889
499
  msgid ""
500
  "Multiple global albums can be created beforehand. One of these can be chosen "
501
  "as the default album."
502
  msgstr ""
503
 
504
- #: app/main/controllers/template/rt-template-functions.php:1895
505
  msgid "Premium one-to-one support"
506
  msgstr ""
507
 
508
- #: app/main/controllers/template/rt-template-functions.php:1896
509
  msgid ""
510
  "Without leaving your WordPress dashboard, you can contact us for help using "
511
  "a support form."
512
  msgstr ""
513
 
514
- #: app/main/controllers/template/rt-template-functions.php:1902
515
  msgid "Premium & Open-Source"
516
  msgstr ""
517
 
518
- #: app/main/controllers/template/rt-template-functions.php:1903
519
  msgid ""
520
  "Developers get full control over rtMedia-PRO's source. They'll get access to "
521
  msgstr ""
522
 
523
- #: app/main/controllers/template/rt-template-functions.php:1909
524
  msgid "Upgrade to rtMedia PRO Now "
525
  msgstr ""
526
 
527
- #: app/main/controllers/template/rt-template-functions.php:1920
528
  msgid "You can consider rtMedia Team for following :"
529
  msgstr ""
530
 
531
- #: app/main/controllers/template/rt-template-functions.php:1922
532
  msgid "rtMedia Customization ( in Upgrade Safe manner )"
533
  msgstr ""
534
 
535
- #: app/main/controllers/template/rt-template-functions.php:1923
536
  msgid "Wordpress/BuddyPress Theme Design and Development"
537
  msgstr ""
538
 
539
- #: app/main/controllers/template/rt-template-functions.php:1924
540
  msgid "Wordpress/BuddyPress Plugin Development"
541
  msgstr ""
542
 
543
- #: app/main/controllers/template/rt-template-functions.php:1928
544
  msgid "Contact Us"
545
  msgstr ""
546
 
547
- #: app/main/controllers/template/rt-template-functions.php:1946
548
  msgid "Empowering your community with "
549
  msgstr ""
550
 
551
- #: app/main/controllers/template/rt-template-functions.php:1947
552
  msgid "The only complete media solution for WordPress, BuddyPress and bbPress"
553
  msgstr ""
554
 
555
- #: app/main/controllers/template/rt-template-functions.php:1961
556
  msgid "Close (Esc)"
557
  msgstr ""
558
 
559
- #: app/main/controllers/template/rt-template-functions.php:1976
560
  msgid "Public"
561
  msgstr ""
562
 
563
- #: app/main/controllers/template/rt-template-functions.php:1980
564
  msgid "All members"
565
  msgstr ""
566
 
567
- #: app/main/controllers/template/rt-template-functions.php:1984
568
  msgid "Your friends"
569
  msgstr ""
570
 
571
- #: app/main/controllers/template/rt-template-functions.php:1988
572
  msgid "Only you"
573
  msgstr ""
574
 
575
- #: app/main/controllers/template/rt-template-functions.php:1992
576
  msgid "Blocked Temperorily"
577
  msgstr ""
578
 
579
- #: app/main/controllers/template/rt-template-functions.php:2026
580
  #, php-format
581
  msgid "%s ago "
582
  msgstr ""
@@ -802,7 +808,7 @@ msgid "Album "
802
  msgstr ""
803
 
804
  #: app/main/controllers/upload/RTMediaUploadView.php:71
805
- #: app/main/controllers/upload/RTMediaUploadView.php:85
806
  msgid "File Upload"
807
  msgstr ""
808
 
@@ -818,19 +824,19 @@ msgstr ""
818
  msgid "Drop your files here"
819
  msgstr ""
820
 
821
- #: app/main/controllers/upload/RTMediaUploadView.php:78
822
  msgid "Start upload"
823
  msgstr ""
824
 
825
- #: app/main/controllers/upload/RTMediaUploadView.php:85
826
  msgid "Attach Files"
827
  msgstr ""
828
 
829
- #: app/main/controllers/upload/RTMediaUploadView.php:85
830
  msgid "Upload will start only after you enter content and click Post Update."
831
  msgstr ""
832
 
833
- #: app/main/controllers/upload/RTMediaUploadView.php:88
834
  msgid "Insert from URL"
835
  msgstr ""
836
 
@@ -929,19 +935,19 @@ msgid "Default Privacy"
929
  msgstr ""
930
 
931
  #: app/main/controllers/privacy/RTMediaPrivacy.php:268
932
- #: app/admin/RTMediaAdmin.php:986
933
  msgid "Privacy"
934
  msgstr ""
935
 
936
- #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:146
937
  msgid "Media Files"
938
  msgstr ""
939
 
940
- #: app/main/controllers/shortcodes/RTMediaUploadShortcode.php:89
941
  msgid "The web browser on your device cannot be used to upload files."
942
  msgstr ""
943
 
944
- #: app/main/controllers/shortcodes/RTMediaGalleryShortcode.php:166
945
  msgid "You do not have sufficient privileges to view this gallery"
946
  msgstr ""
947
 
@@ -994,7 +1000,7 @@ msgid "Like"
994
  msgstr ""
995
 
996
  #: app/main/controllers/media/RTMediaLike.php:18
997
- #: app/admin/RTMediaAdmin.php:285
998
  msgid "Likes"
999
  msgstr ""
1000
 
@@ -1006,6 +1012,15 @@ msgstr ""
1006
  msgid "Error creating attachment for the media file, please try again"
1007
  msgstr ""
1008
 
 
 
 
 
 
 
 
 
 
1009
  #: app/importers/RTMediaMigration.php:60
1010
  msgid "Please Migrate your Database"
1011
  msgstr ""
@@ -1014,10 +1029,6 @@ msgstr ""
1014
  msgid "Click Here"
1015
  msgstr ""
1016
 
1017
- #: app/importers/RTMediaMigration.php:60 app/admin/RTMediaAdmin.php:1414
1018
- msgid "Hide"
1019
- msgstr ""
1020
-
1021
  #: app/importers/RTMediaMigration.php:78 app/helper/RTMediaSupport.php:53
1022
  #: app/helper/RTMediaSupport.php:54
1023
  msgid "Migration"
@@ -1291,324 +1302,324 @@ msgid ""
1291
  "developer/json-api/\">here</a>"
1292
  msgstr ""
1293
 
1294
- #: app/admin/RTMediaFormHandler.php:456 app/helper/RTMediaSettings.php:232
1295
  msgid "Media Type"
1296
  msgstr ""
1297
 
1298
- #: app/admin/RTMediaFormHandler.php:457
1299
  msgid "Allows you to upload a particular media type on your post."
1300
  msgstr ""
1301
 
1302
- #: app/admin/RTMediaFormHandler.php:457
1303
  msgid "Allow Upload"
1304
  msgstr ""
1305
 
1306
- #: app/admin/RTMediaFormHandler.php:458
1307
  msgid "Put a specific media as a featured content on the post."
1308
  msgstr ""
1309
 
1310
- #: app/admin/RTMediaFormHandler.php:458
1311
  msgid "Set Featured"
1312
  msgstr ""
1313
 
1314
- #: app/admin/RTMediaFormHandler.php:496
1315
  msgid "File Extensions"
1316
  msgstr ""
1317
 
1318
- #: app/admin/RTMediaFormHandler.php:543
1319
  msgid "Category"
1320
  msgstr ""
1321
 
1322
- #: app/admin/RTMediaFormHandler.php:544
1323
  msgid "Entity"
1324
  msgstr ""
1325
 
1326
- #: app/admin/RTMediaFormHandler.php:545
1327
  msgid "Width"
1328
  msgstr ""
1329
 
1330
- #: app/admin/RTMediaFormHandler.php:545
1331
  msgid "Height"
1332
  msgstr ""
1333
 
1334
- #: app/admin/RTMediaFormHandler.php:545
1335
  msgid "Crop"
1336
  msgstr ""
1337
 
1338
- #: app/admin/RTMediaFormHandler.php:582
1339
  msgid "Number of thumbnails to generate on video upload"
1340
  msgstr ""
1341
 
1342
- #: app/admin/RTMediaFormHandler.php:588
1343
  msgid ""
1344
  " If you choose more than 1 thumbnail, your users will be able to change "
1345
  "thumbnail by going to video \"edit\" section."
1346
  msgstr ""
1347
 
1348
- #: app/admin/RTMediaFormHandler.php:626
1349
  msgid ""
1350
  "If you want to add some custom CSS code to the plugin and don't want to "
1351
  "modify any files, then it's a good place to enter your code at this field."
1352
  msgstr ""
1353
 
1354
- #: app/admin/RTMediaFormHandler.php:648
1355
  msgid "rtMedia default styles"
1356
  msgstr ""
1357
 
1358
- #: app/admin/RTMediaFormHandler.php:654
1359
  msgid ""
1360
  "Load default rtMedia styles. You need to write your own style for rtMedia if "
1361
  "you disable it."
1362
  msgstr ""
1363
 
1364
- #: app/admin/RTMediaFormHandler.php:658
1365
  msgid "Paste your CSS code"
1366
  msgstr ""
1367
 
1368
- #: app/admin/RTMediaFormHandler.php:664
1369
  msgid "Custom rtMedia CSS container"
1370
  msgstr ""
1371
 
1372
- #: app/admin/RTMediaFormHandler.php:678
1373
  msgid "Enable privacy"
1374
  msgstr ""
1375
 
1376
- #: app/admin/RTMediaFormHandler.php:684
1377
  msgid "Enable privacy in rtMedia"
1378
  msgstr ""
1379
 
1380
- #: app/admin/RTMediaFormHandler.php:688
1381
  msgid "Default privacy"
1382
  msgstr ""
1383
 
1384
- #: app/admin/RTMediaFormHandler.php:694
1385
  msgid "Set default privacy for media"
1386
  msgstr ""
1387
 
1388
- #: app/admin/RTMediaFormHandler.php:698
1389
  msgid "Allow users to set privacy for their content"
1390
  msgstr ""
1391
 
1392
- #: app/admin/RTMediaFormHandler.php:703
1393
  msgid ""
1394
  "If you choose this, user will be able to change privacy of their own uploads."
1395
  msgstr ""
1396
 
1397
- #: app/admin/RTMediaFormHandler.php:705
1398
  msgid "For group uploads, BuddyPress groups privacy is used."
1399
  msgstr ""
1400
 
1401
- #: app/admin/RTMediaFormHandler.php:762
1402
  msgid "Enable media in profile"
1403
  msgstr ""
1404
 
1405
- #: app/admin/RTMediaFormHandler.php:767
1406
  msgid "Enable Media on BuddyPress Profile"
1407
  msgstr ""
1408
 
1409
- #: app/admin/RTMediaFormHandler.php:771
1410
  msgid "Enable media in group"
1411
  msgstr ""
1412
 
1413
- #: app/admin/RTMediaFormHandler.php:776
1414
  msgid "Enable Media on BuddyPress Groups"
1415
  msgstr ""
1416
 
1417
- #: app/admin/RTMediaFormHandler.php:780
1418
  msgid "Allow upload from activity stream"
1419
  msgstr ""
1420
 
1421
- #: app/admin/RTMediaFormHandler.php:785
1422
  msgid "Allow upload using status update box present on activity stream page"
1423
  msgstr ""
1424
 
1425
- #: app/admin/RTMediaFormHandler.php:790
1426
  msgid "Number of media items to show in activity stream"
1427
  msgstr ""
1428
 
1429
- #: app/admin/RTMediaFormHandler.php:795
1430
  msgid ""
1431
  "With bulk uploads activity stream may get flooded. You can control maximum "
1432
  "number of medias/files per activity. This limit will not affect the actual "
1433
  "number of uplaods. Only display. <em>0</em> means unlimited."
1434
  msgstr ""
1435
 
1436
- #: app/admin/RTMediaFormHandler.php:836
1437
  msgid "Organize media into albums"
1438
  msgstr ""
1439
 
1440
- #: app/admin/RTMediaFormHandler.php:842
1441
  msgid ""
1442
  "This will add 'album' tab to BuddyPress profile and group depending on "
1443
  "^above^ settings."
1444
  msgstr ""
1445
 
1446
- #: app/admin/RTMediaAdmin.php:144 app/admin/RTMediaAdmin.php:154
1447
  msgid "rtMedia:"
1448
  msgstr ""
1449
 
1450
- #: app/admin/RTMediaAdmin.php:144
1451
  msgid " You must "
1452
  msgstr ""
1453
 
1454
- #: app/admin/RTMediaAdmin.php:144
1455
  msgid "update permalink structure"
1456
  msgstr ""
1457
 
1458
- #: app/admin/RTMediaAdmin.php:144
1459
  msgid " to something other than the default for it to work."
1460
  msgstr ""
1461
 
1462
- #: app/admin/RTMediaAdmin.php:154
1463
  msgid ""
1464
  "Please update all premium add-ons that you had purchased from rtCamp from "
1465
  "your "
1466
  msgstr ""
1467
 
1468
- #: app/admin/RTMediaAdmin.php:154
1469
  msgid "account"
1470
  msgstr ""
1471
 
1472
- #: app/admin/RTMediaAdmin.php:217
1473
  msgid "rtMedia Pro is released"
1474
  msgstr ""
1475
 
1476
- #: app/admin/RTMediaAdmin.php:229
1477
  msgid "Media Stats"
1478
  msgstr ""
1479
 
1480
- #: app/admin/RTMediaAdmin.php:253
1481
  msgid "Usage Stats"
1482
  msgstr ""
1483
 
1484
- #: app/admin/RTMediaAdmin.php:261
1485
  msgid "Total "
1486
  msgstr ""
1487
 
1488
- #: app/admin/RTMediaAdmin.php:269
1489
  msgid "With Media"
1490
  msgstr ""
1491
 
1492
- #: app/admin/RTMediaAdmin.php:277
1493
  msgid "Comments "
1494
  msgstr ""
1495
 
1496
- #: app/admin/RTMediaAdmin.php:293
1497
  msgid "Homepage"
1498
  msgstr ""
1499
 
1500
- #: app/admin/RTMediaAdmin.php:293
1501
  msgid "Free Support"
1502
  msgstr ""
1503
 
1504
- #: app/admin/RTMediaAdmin.php:293
1505
  msgid "Premium Addons"
1506
  msgstr ""
1507
 
1508
- #: app/admin/RTMediaAdmin.php:303
1509
  msgid "Right Now in rtMedia"
1510
  msgstr ""
1511
 
1512
- #: app/admin/RTMediaAdmin.php:337 app/admin/RTMediaAdmin.php:503
1513
  msgid "Regenerate Thumbnail"
1514
  msgstr ""
1515
 
1516
- #: app/admin/RTMediaAdmin.php:358 app/admin/RTMediaAdmin.php:840
1517
- #: app/admin/RTMediaAdmin.php:841
1518
  msgid "rtMedia"
1519
  msgstr ""
1520
 
1521
- #: app/admin/RTMediaAdmin.php:364 app/admin/RTMediaAdmin.php:367
1522
- #: app/admin/RTMediaAdmin.php:492 app/admin/RTMediaAdmin.php:862
1523
  msgid "Settings"
1524
  msgstr ""
1525
 
1526
- #: app/admin/RTMediaAdmin.php:374 app/admin/RTMediaAdmin.php:377
1527
- #: app/admin/RTMediaAdmin.php:493 app/admin/RTMediaAdmin.php:867
1528
  msgid "Addons"
1529
  msgstr ""
1530
 
1531
- #: app/admin/RTMediaAdmin.php:384 app/admin/RTMediaAdmin.php:387
1532
- #: app/admin/RTMediaAdmin.php:494 app/admin/RTMediaAdmin.php:882
1533
  #: app/helper/RTMediaSettings.php:134
1534
  msgid "Support"
1535
  msgstr ""
1536
 
1537
- #: app/admin/RTMediaAdmin.php:394 app/admin/RTMediaAdmin.php:397
1538
- #: app/admin/RTMediaAdmin.php:495 app/admin/RTMediaAdmin.php:872
1539
  msgid "Themes"
1540
  msgstr ""
1541
 
1542
- #: app/admin/RTMediaAdmin.php:404 app/admin/RTMediaAdmin.php:407
1543
- #: app/admin/RTMediaAdmin.php:496 app/admin/RTMediaAdmin.php:877
1544
  msgid "Hire Us"
1545
  msgstr ""
1546
 
1547
- #: app/admin/RTMediaAdmin.php:445
1548
  msgid "ON"
1549
  msgstr ""
1550
 
1551
- #: app/admin/RTMediaAdmin.php:446
1552
  msgid "OFF"
1553
  msgstr ""
1554
 
1555
- #: app/admin/RTMediaAdmin.php:458
1556
  msgid "Please do not refresh this page."
1557
  msgstr ""
1558
 
1559
- #: app/admin/RTMediaAdmin.php:459
1560
  msgid ""
1561
  "Something went wronng. Please <a href onclick=\"location.reload();"
1562
  "\">refresh</a> page."
1563
  msgstr ""
1564
 
1565
- #: app/admin/RTMediaAdmin.php:460
1566
  msgid "This will subscribe you to the free plan."
1567
  msgstr ""
1568
 
1569
- #: app/admin/RTMediaAdmin.php:461
1570
  msgid ""
1571
  "Are you sure you want to disable the encoding service? Make sure you note "
1572
  "your api key before disabling it incase you want to activate it in future."
1573
  msgstr ""
1574
 
1575
- #: app/admin/RTMediaAdmin.php:498
1576
  msgid "Premium"
1577
  msgstr ""
1578
 
1579
- #: app/admin/RTMediaAdmin.php:498
1580
  msgid "Premium "
1581
  msgstr ""
1582
 
1583
- #: app/admin/RTMediaAdmin.php:503
1584
  msgid "Regen. Thumbnail "
1585
  msgstr ""
1586
 
1587
- #: app/admin/RTMediaAdmin.php:516
1588
  msgid "Regenerate Video Thumbnails"
1589
  msgstr ""
1590
 
1591
- #: app/admin/RTMediaAdmin.php:533
1592
  msgid "Regenerate Pending Thumbnails"
1593
  msgstr ""
1594
 
1595
- #: app/admin/RTMediaAdmin.php:541
1596
  msgid "Total Videos"
1597
  msgstr ""
1598
 
1599
- #: app/admin/RTMediaAdmin.php:542
1600
  msgid "Sent of regenerate thumbails"
1601
  msgstr ""
1602
 
1603
- #: app/admin/RTMediaAdmin.php:543
1604
  msgid "Fail to regenerate thumbails"
1605
  msgstr ""
1606
 
1607
- #: app/admin/RTMediaAdmin.php:585
1608
  msgid "Regenerate Video Thumbnails Done"
1609
  msgstr ""
1610
 
1611
- #: app/admin/RTMediaAdmin.php:620
1612
  #, php-format
1613
  msgid ""
1614
  "You have total %s videos without thumbnails. Click <a href='%s'> here </a> "
@@ -1616,120 +1627,120 @@ msgid ""
1616
  "()' style='float:right'>Hide</a>"
1617
  msgstr ""
1618
 
1619
- #: app/admin/RTMediaAdmin.php:671
1620
  msgid "not a video ..."
1621
  msgstr ""
1622
 
1623
- #: app/admin/RTMediaAdmin.php:757
1624
  msgid "Empowering The Web With WordPress"
1625
  msgstr ""
1626
 
1627
- #: app/admin/RTMediaAdmin.php:787
1628
  msgid "Save Settings"
1629
  msgstr ""
1630
 
1631
- #: app/admin/RTMediaAdmin.php:949 app/admin/RTMediaAdmin.php:950
1632
  msgid "Display"
1633
  msgstr ""
1634
 
1635
- #: app/admin/RTMediaAdmin.php:960
1636
  msgid "rtMedia BuddyPress"
1637
  msgstr ""
1638
 
1639
- #: app/admin/RTMediaAdmin.php:961
1640
  msgid "BuddyPress"
1641
  msgstr ""
1642
 
1643
- #: app/admin/RTMediaAdmin.php:969
1644
  msgid "rtMedia Types"
1645
  msgstr ""
1646
 
1647
- #: app/admin/RTMediaAdmin.php:970
1648
  msgid "Types"
1649
  msgstr ""
1650
 
1651
- #: app/admin/RTMediaAdmin.php:977
1652
  msgid "rtMedia Sizes"
1653
  msgstr ""
1654
 
1655
- #: app/admin/RTMediaAdmin.php:978
1656
  msgid "Image Sizes"
1657
  msgstr ""
1658
 
1659
- #: app/admin/RTMediaAdmin.php:985
1660
  msgid "rtMedia Privacy"
1661
  msgstr ""
1662
 
1663
- #: app/admin/RTMediaAdmin.php:992
1664
  msgid "rtMedia Custom CSS"
1665
  msgstr ""
1666
 
1667
- #: app/admin/RTMediaAdmin.php:993
1668
  msgid "Custom CSS"
1669
  msgstr ""
1670
 
1671
- #: app/admin/RTMediaAdmin.php:1002 app/admin/RTMediaAdmin.php:1003
1672
  msgid "Other Settings"
1673
  msgstr ""
1674
 
1675
- #: app/admin/RTMediaAdmin.php:1094
1676
  #, php-format
1677
  msgid "I use @buddypressmedia http://rt.cx/rtmedia on %s"
1678
  msgstr ""
1679
 
1680
- #: app/admin/RTMediaAdmin.php:1098
1681
  msgid "Post to Twitter Now"
1682
  msgstr ""
1683
 
1684
- #: app/admin/RTMediaAdmin.php:1098
1685
  msgid "Post to Twitter"
1686
  msgstr ""
1687
 
1688
- #: app/admin/RTMediaAdmin.php:1099
1689
  msgid "Share on Facebook Now"
1690
  msgstr ""
1691
 
1692
- #: app/admin/RTMediaAdmin.php:1099
1693
  msgid "Share on Facebook"
1694
  msgstr ""
1695
 
1696
- #: app/admin/RTMediaAdmin.php:1100
1697
  msgid "Rate rtMedia on Wordpress.org"
1698
  msgstr ""
1699
 
1700
- #: app/admin/RTMediaAdmin.php:1100
1701
  msgid "Rate on Wordpress.org"
1702
  msgstr ""
1703
 
1704
- #: app/admin/RTMediaAdmin.php:1101
1705
  msgid "Subscribe to our feeds"
1706
  msgstr ""
1707
 
1708
- #: app/admin/RTMediaAdmin.php:1101
1709
  msgid "Subscribe to our Feeds"
1710
  msgstr ""
1711
 
1712
- #: app/admin/RTMediaAdmin.php:1102
1713
  msgid "Add link to footer"
1714
  msgstr ""
1715
 
1716
- #: app/admin/RTMediaAdmin.php:1108
1717
  msgid "Spread the Word"
1718
  msgstr ""
1719
 
1720
- #: app/admin/RTMediaAdmin.php:1140 app/admin/RTMediaAdmin.php:1143
1721
  msgid "Subscribe"
1722
  msgstr ""
1723
 
1724
- #: app/admin/RTMediaAdmin.php:1165
1725
  msgid "Thank you for your time."
1726
  msgstr ""
1727
 
1728
- #: app/admin/RTMediaAdmin.php:1177
1729
  msgid "Premium Add-ons"
1730
  msgstr ""
1731
 
1732
- #: app/admin/RTMediaAdmin.php:1191
1733
  #, php-format
1734
  msgid ""
1735
  "You have images enabled on rtMedia but your network allowed filetypes does "
@@ -1737,17 +1748,17 @@ msgid ""
1737
  "settings manually."
1738
  msgstr ""
1739
 
1740
- #: app/admin/RTMediaAdmin.php:1192 app/admin/RTMediaAdmin.php:1203
1741
- #: app/admin/RTMediaAdmin.php:1212
1742
  msgid "Recommended"
1743
  msgstr ""
1744
 
1745
- #: app/admin/RTMediaAdmin.php:1192 app/admin/RTMediaAdmin.php:1203
1746
- #: app/admin/RTMediaAdmin.php:1212
1747
  msgid "Update Network Settings Automatically"
1748
  msgstr ""
1749
 
1750
- #: app/admin/RTMediaAdmin.php:1202
1751
  #, php-format
1752
  msgid ""
1753
  "You have video enabled on BuddyPress Media but your network allowed "
@@ -1755,7 +1766,7 @@ msgid ""
1755
  "change your settings manually."
1756
  msgstr ""
1757
 
1758
- #: app/admin/RTMediaAdmin.php:1211
1759
  #, php-format
1760
  msgid ""
1761
  "You have audio enabled on BuddyPress Media but your network allowed "
@@ -1763,19 +1774,19 @@ msgid ""
1763
  "change your settings manually."
1764
  msgstr ""
1765
 
1766
- #: app/admin/RTMediaAdmin.php:1226
1767
  msgid "Network settings updated successfully."
1768
  msgstr ""
1769
 
1770
- #: app/admin/RTMediaAdmin.php:1329
1771
  msgid "Video is sent to generate thumbnails."
1772
  msgstr ""
1773
 
1774
- #: app/admin/RTMediaAdmin.php:1332
1775
  msgid "Video can't be sent to generate thumbnails."
1776
  msgstr ""
1777
 
1778
- #: app/admin/RTMediaAdmin.php:1414
1779
  msgid ""
1780
  "rtMedia just updated to Foundation 5. Please update rtMedia template files "
1781
  "if you have overridden the default rtMedia templates in your theme."
2
  msgstr ""
3
  "Project-Id-Version: BuddyPress Media\n"
4
  "Report-Msgid-Bugs-To: \n"
5
+ "POT-Creation-Date: 2014-03-26 19:54+0530\n"
6
+ "PO-Revision-Date: 2014-03-26 19:54+0530\n"
7
  "Last-Translator: faishal <faishal.saiyed@rtcamp.com>\n"
8
  "Language-Team: rtCamp <info@rtcamp.com>\n"
9
  "Language: en_IN\n"
15
  "X-Generator: Poedit 1.5.4\n"
16
  "X-Poedit-SearchPath-0: .\n"
17
 
18
+ #: app/main/RTMedia.php:254
19
  msgid "Photo"
20
  msgstr ""
21
 
22
+ #: app/main/RTMedia.php:255
23
  msgid "Photos"
24
  msgstr ""
25
 
26
+ #: app/main/RTMedia.php:263
27
  msgid "Video"
28
  msgstr ""
29
 
30
+ #: app/main/RTMedia.php:264
31
  msgid "Videos"
32
  msgstr ""
33
 
34
+ #: app/main/RTMedia.php:272 app/main/RTMedia.php:273
35
  msgid "Music"
36
  msgstr ""
37
 
38
+ #: app/main/RTMedia.php:360
39
  msgid "<strong>Private</strong> - Visible only to the user"
40
  msgstr ""
41
 
42
+ #: app/main/RTMedia.php:361
43
  msgid "<strong>Friends</strong> - Visible to user's friends"
44
  msgstr ""
45
 
46
+ #: app/main/RTMedia.php:362
47
  msgid "<strong>Logged in Users</strong> - Visible to registered users"
48
  msgstr ""
49
 
50
+ #: app/main/RTMedia.php:363
51
  msgid "<strong>Public</strong> - Visible to the world"
52
  msgstr ""
53
 
54
+ #: app/main/RTMedia.php:514 app/importers/BPMediaAlbumimporter.php:91
55
  msgid "Media"
56
  msgstr ""
57
 
58
+ #: app/main/RTMedia.php:520 app/main/controllers/template/RTMediaNav.php:146
59
  msgid "All"
60
  msgstr ""
61
 
62
+ #: app/main/RTMedia.php:529
63
  #: app/main/controllers/template/rt-template-functions.php:1057
64
  #: app/main/controllers/media/RTMediaAlbum.php:54
65
  msgid "Album"
66
  msgstr ""
67
 
68
+ #: app/main/RTMedia.php:532 app/main/controllers/template/RTMediaNav.php:95
69
  #: app/main/controllers/template/RTMediaNav.php:167
70
  #: app/main/controllers/media/RTMediaAlbum.php:53
71
  #: app/main/controllers/media/RTMediaAlbum.php:65
72
  msgid "Albums"
73
  msgstr ""
74
 
75
+ #: app/main/RTMedia.php:540
76
+ #: app/main/controllers/template/rt-template-functions.php:1738
77
+ #: app/main/controllers/template/rt-template-functions.php:1741
78
  msgid "Upload"
79
  msgstr ""
80
 
81
+ #: app/main/RTMedia.php:544
82
  msgid "Wall Post"
83
  msgstr ""
84
 
85
+ #: app/main/RTMedia.php:735
86
  msgid "Wall Posts"
87
  msgstr ""
88
 
89
+ #: app/main/RTMedia.php:775
90
  msgid ": Can't Create Database table. Please check create table permission."
91
  msgstr ""
92
 
93
+ #: app/main/RTMedia.php:809
94
  msgid "Loading media"
95
  msgstr ""
96
 
97
+ #: app/main/RTMedia.php:810
98
  msgid "Please enter some content to post."
99
  msgstr ""
100
 
101
+ #: app/main/RTMedia.php:811
102
  msgid "Empty Comment is not allowed."
103
  msgstr ""
104
 
105
+ #: app/main/RTMedia.php:812
106
  msgid "Are you sure you want to delete this media?"
107
  msgstr ""
108
 
109
+ #: app/main/RTMedia.php:813
110
  msgid "Are you sure you want to delete this comment?"
111
  msgstr ""
112
 
113
+ #: app/main/RTMedia.php:814
114
  msgid "Are you sure you want to delete this Album?"
115
  msgstr ""
116
 
117
+ #: app/main/RTMedia.php:815
118
  msgid "Drop files here"
119
  msgstr ""
120
 
121
+ #: app/main/RTMedia.php:816
122
  msgid "album created successfully."
123
  msgstr ""
124
 
125
+ #: app/main/RTMedia.php:817
126
  msgid "Something went wrong. Please try again."
127
  msgstr ""
128
 
129
+ #: app/main/RTMedia.php:818
130
  msgid "Enter an album name."
131
  msgstr ""
132
 
133
+ #: app/main/RTMedia.php:819
134
  msgid "Max file Size Limit : "
135
  msgstr ""
136
 
137
+ #: app/main/RTMedia.php:820
138
  msgid "Allowed File Formats"
139
  msgstr ""
140
 
141
+ #: app/main/RTMedia.php:821 templates/media/album-single-edit.php:58
142
  msgid "Select All Visible"
143
  msgstr ""
144
 
145
+ #: app/main/RTMedia.php:822
146
  msgid "Unselect All Visible"
147
  msgstr ""
148
 
149
+ #: app/main/RTMedia.php:823
150
  msgid "Please select some media."
151
  msgstr ""
152
 
153
+ #: app/main/RTMedia.php:824
154
  msgid "Are you sure you want to delete the selected medias?"
155
  msgstr ""
156
 
157
+ #: app/main/RTMedia.php:825
158
  msgid "Are you sure you want to move the selected medias?"
159
  msgstr ""
160
 
161
+ #: app/main/RTMedia.php:826
162
  msgid "Waiting"
163
  msgstr ""
164
 
165
+ #: app/main/RTMedia.php:827
166
  msgid "Uploaded"
167
  msgstr ""
168
 
169
+ #: app/main/RTMedia.php:828
170
  msgid "Uploading"
171
  msgstr ""
172
 
173
+ #: app/main/RTMedia.php:829
174
  msgid "Failed"
175
  msgstr ""
176
 
177
+ #: app/main/RTMedia.php:830
178
  msgid "Close"
179
  msgstr ""
180
 
181
+ #: app/main/RTMedia.php:831
182
  #: app/main/controllers/template/rt-template-functions.php:591
183
  #: app/main/controllers/template/rt-template-functions.php:612
184
  msgid "Edit"
185
  msgstr ""
186
 
187
+ #: app/main/RTMedia.php:832
188
  #: app/main/controllers/template/rt-template-functions.php:1136
189
  #: app/main/controllers/template/rt-template-functions.php:1143
190
  #: templates/media/album-single-edit.php:60
191
  msgid "Delete"
192
  msgstr ""
193
 
194
+ #: app/main/RTMedia.php:833 templates/media/media-single-edit.php:13
195
  msgid "Edit Media"
196
  msgstr ""
197
 
198
+ #: app/main/RTMedia.php:834
199
  msgid "Remove from queue"
200
  msgstr ""
201
 
202
+ #: app/main/RTMedia.php:835
203
  msgid "Add more files"
204
  msgstr ""
205
 
206
+ #: app/main/RTMedia.php:836
207
  msgid "File not supported"
208
  msgstr ""
209
 
210
+ #: app/main/RTMedia.php:837
211
  msgid "more"
212
  msgstr ""
213
 
214
+ #: app/main/RTMedia.php:838
215
  msgid "less"
216
  msgstr ""
217
 
218
+ #: app/main/RTMedia.php:839
219
  msgid "This media is uploaded. Are you sure you want to delete this media?"
220
  msgstr ""
221
 
261
  msgstr ""
262
 
263
  #: app/main/controllers/template/rt-template-functions.php:567
264
+ #: app/main/controllers/template/rt-template-functions.php:1325
265
  msgid "Options"
266
  msgstr ""
267
 
303
  msgid "Delete Media"
304
  msgstr ""
305
 
306
+ #: app/main/controllers/template/rt-template-functions.php:1168
307
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:180
308
+ #: app/main/controllers/shortcodes/RTMediaUploadShortcode.php:103
309
+ msgid "You are not allowed to upload/attach media."
310
+ msgstr ""
311
+
312
+ #: app/main/controllers/template/rt-template-functions.php:1269
313
  msgid "Profile Albums"
314
  msgstr ""
315
 
316
+ #: app/main/controllers/template/rt-template-functions.php:1271
317
+ #: app/main/controllers/template/rt-template-functions.php:1307
318
  msgid "Group Albums"
319
  msgstr ""
320
 
321
+ #: app/main/controllers/template/rt-template-functions.php:1380
322
+ #: app/main/controllers/template/rt-template-functions.php:1393
323
  msgid "Create New Album"
324
  msgstr ""
325
 
326
+ #: app/main/controllers/template/rt-template-functions.php:1380
327
  msgid "Add Album"
328
  msgstr ""
329
 
330
+ #: app/main/controllers/template/rt-template-functions.php:1395
331
  msgid "Album Title : "
332
  msgstr ""
333
 
334
+ #: app/main/controllers/template/rt-template-functions.php:1399
335
  #: app/main/controllers/media/RTMediaAlbum.php:56
336
  msgid "Create Album"
337
  msgstr ""
338
 
339
+ #: app/main/controllers/template/rt-template-functions.php:1428
340
+ #: app/main/controllers/template/rt-template-functions.php:1433
341
+ #: app/main/controllers/template/rt-template-functions.php:1484
342
  msgid "Merge Album"
343
  msgstr ""
344
 
345
+ #: app/main/controllers/template/rt-template-functions.php:1430
346
  msgid "Select Album to merge with : "
347
  msgstr ""
348
 
349
+ #: app/main/controllers/template/rt-template-functions.php:1473
350
  #: app/main/controllers/media/RTMediaAlbum.php:57
351
  msgid "Edit Album"
352
  msgstr ""
353
 
354
+ #: app/main/controllers/template/rt-template-functions.php:1476
355
  msgid "Delete Album"
356
  msgstr ""
357
 
358
+ #: app/main/controllers/template/rt-template-functions.php:1509
359
  msgid "Merge"
360
  msgstr ""
361
 
362
+ #: app/main/controllers/template/rt-template-functions.php:1558
363
  #: app/main/controllers/upload/RTMediaUploadView.php:65
364
  msgid "Privacy : "
365
  msgstr ""
366
 
367
+ #: app/main/controllers/template/rt-template-functions.php:1728
368
  msgid "people like this"
369
  msgstr ""
370
 
371
+ #: app/main/controllers/template/rt-template-functions.php:1738
372
+ #: app/main/controllers/template/rt-template-functions.php:1741
373
  msgid "Upload Media"
374
  msgstr ""
375
 
376
+ #: app/main/controllers/template/rt-template-functions.php:1784
377
  msgid "Go PRO!"
378
  msgstr ""
379
 
380
+ #: app/main/controllers/template/rt-template-functions.php:1805
381
  msgid "Reasons to buy rtMedia-PRO"
382
  msgstr ""
383
 
384
+ #: app/main/controllers/template/rt-template-functions.php:1810
385
  msgid "RSS Feed/Podcasting Support"
386
  msgstr ""
387
 
388
+ #: app/main/controllers/template/rt-template-functions.php:1811
389
  msgid ""
390
  "You can consume rtMedia uploads from iTunes as well as any feed-reader/"
391
  "podcasting software."
392
  msgstr ""
393
 
394
+ #: app/main/controllers/template/rt-template-functions.php:1817
395
  msgid "WordPress Comment Attachment"
396
  msgstr ""
397
 
398
+ #: app/main/controllers/template/rt-template-functions.php:1818
399
  msgid "You can attach files to WordPress comments."
400
  msgstr ""
401
 
402
+ #: app/main/controllers/template/rt-template-functions.php:1824
403
  msgid "bbPress Attachment"
404
  msgstr ""
405
 
406
+ #: app/main/controllers/template/rt-template-functions.php:1825
407
  msgid "You can attach files to bbPress topic and reply."
408
  msgstr ""
409
 
410
+ #: app/main/controllers/template/rt-template-functions.php:1831
411
  msgid "Document Support"
412
  msgstr ""
413
 
414
+ #: app/main/controllers/template/rt-template-functions.php:1832
415
  msgid ""
416
  "You can add, view and download documents like txt, doc, pdf, also add and "
417
  "upload other file types like zip, tar and tar.gz etc."
418
  msgstr ""
419
 
420
+ #: app/main/controllers/template/rt-template-functions.php:1838
421
  msgid "CubePoints & MyCRED Integration"
422
  msgstr ""
423
 
424
+ #: app/main/controllers/template/rt-template-functions.php:1839
425
  msgid ""
426
  "Integrating CubePoints/myCRED with rtMedia, you can reward users with "
427
  "virtual points on rtMedia activities."
428
  msgstr ""
429
 
430
+ #: app/main/controllers/template/rt-template-functions.php:1845
431
  msgid "Album Privacy"
432
  msgstr ""
433
 
434
+ #: app/main/controllers/template/rt-template-functions.php:1846
435
  msgid ""
436
  "This will allow you to set album privacy while creating albums or change "
437
  "album privacy with editing albums too."
438
  msgstr ""
439
 
440
+ #: app/main/controllers/template/rt-template-functions.php:1852
441
  msgid "Audio Playlist"
442
  msgstr ""
443
 
444
+ #: app/main/controllers/template/rt-template-functions.php:1853
445
  msgid ""
446
  "With this feature you can create your audio playlists and listen to your "
447
  "favorite music at will."
448
  msgstr ""
449
 
450
+ #: app/main/controllers/template/rt-template-functions.php:1859
451
  msgid "Report Button & Moderation Tools"
452
  msgstr ""
453
 
454
+ #: app/main/controllers/template/rt-template-functions.php:1860
455
  msgid ""
456
  "Users can report media if they find it offensive. Set number of reports to "
457
  "automatically take down media."
458
  msgstr ""
459
 
460
+ #: app/main/controllers/template/rt-template-functions.php:1866
461
  msgid "Download Button For Media"
462
  msgstr ""
463
 
464
+ #: app/main/controllers/template/rt-template-functions.php:1867
465
  msgid ""
466
  "Users can download photos, videos and music. Admin has option to allow "
467
  "download the media."
468
  msgstr ""
469
 
470
+ #: app/main/controllers/template/rt-template-functions.php:1873
471
  msgid "Sidebar widgets"
472
  msgstr ""
473
 
474
+ #: app/main/controllers/template/rt-template-functions.php:1874
475
  msgid ""
476
  "These will let you display a gallery or an uploader in a sidebar. Several of "
477
  "them can be used in a single sidebar."
478
  msgstr ""
479
 
480
+ #: app/main/controllers/template/rt-template-functions.php:1880
481
  msgid "Post-editor button"
482
  msgstr ""
483
 
484
+ #: app/main/controllers/template/rt-template-functions.php:1881
485
  msgid ""
486
  "With this button, a UI appears to quickly generate shortcodes for special "
487
  "pages like \"Editorial Picks\"."
488
  msgstr ""
489
 
490
+ #: app/main/controllers/template/rt-template-functions.php:1887
491
  msgid "Star-Rating option"
492
  msgstr ""
493
 
494
+ #: app/main/controllers/template/rt-template-functions.php:1888
495
  msgid ""
496
  "Users can give up to five stars to rate media. This data can be used for "
497
  "\"Most Rated Media\" in sidebars."
498
  msgstr ""
499
 
500
+ #: app/main/controllers/template/rt-template-functions.php:1894
501
  msgid "Global Albums"
502
  msgstr ""
503
 
504
+ #: app/main/controllers/template/rt-template-functions.php:1895
505
  msgid ""
506
  "Multiple global albums can be created beforehand. One of these can be chosen "
507
  "as the default album."
508
  msgstr ""
509
 
510
+ #: app/main/controllers/template/rt-template-functions.php:1901
511
  msgid "Premium one-to-one support"
512
  msgstr ""
513
 
514
+ #: app/main/controllers/template/rt-template-functions.php:1902
515
  msgid ""
516
  "Without leaving your WordPress dashboard, you can contact us for help using "
517
  "a support form."
518
  msgstr ""
519
 
520
+ #: app/main/controllers/template/rt-template-functions.php:1908
521
  msgid "Premium & Open-Source"
522
  msgstr ""
523
 
524
+ #: app/main/controllers/template/rt-template-functions.php:1909
525
  msgid ""
526
  "Developers get full control over rtMedia-PRO's source. They'll get access to "
527
  msgstr ""
528
 
529
+ #: app/main/controllers/template/rt-template-functions.php:1915
530
  msgid "Upgrade to rtMedia PRO Now "
531
  msgstr ""
532
 
533
+ #: app/main/controllers/template/rt-template-functions.php:1926
534
  msgid "You can consider rtMedia Team for following :"
535
  msgstr ""
536
 
537
+ #: app/main/controllers/template/rt-template-functions.php:1928
538
  msgid "rtMedia Customization ( in Upgrade Safe manner )"
539
  msgstr ""
540
 
541
+ #: app/main/controllers/template/rt-template-functions.php:1929
542
  msgid "Wordpress/BuddyPress Theme Design and Development"
543
  msgstr ""
544
 
545
+ #: app/main/controllers/template/rt-template-functions.php:1930
546
  msgid "Wordpress/BuddyPress Plugin Development"
547
  msgstr ""
548
 
549
+ #: app/main/controllers/template/rt-template-functions.php:1934
550
  msgid "Contact Us"
551
  msgstr ""
552
 
553
+ #: app/main/controllers/template/rt-template-functions.php:1952
554
  msgid "Empowering your community with "
555
  msgstr ""
556
 
557
+ #: app/main/controllers/template/rt-template-functions.php:1953
558
  msgid "The only complete media solution for WordPress, BuddyPress and bbPress"
559
  msgstr ""
560
 
561
+ #: app/main/controllers/template/rt-template-functions.php:1967
562
  msgid "Close (Esc)"
563
  msgstr ""
564
 
565
+ #: app/main/controllers/template/rt-template-functions.php:1982
566
  msgid "Public"
567
  msgstr ""
568
 
569
+ #: app/main/controllers/template/rt-template-functions.php:1986
570
  msgid "All members"
571
  msgstr ""
572
 
573
+ #: app/main/controllers/template/rt-template-functions.php:1990
574
  msgid "Your friends"
575
  msgstr ""
576
 
577
+ #: app/main/controllers/template/rt-template-functions.php:1994
578
  msgid "Only you"
579
  msgstr ""
580
 
581
+ #: app/main/controllers/template/rt-template-functions.php:1998
582
  msgid "Blocked Temperorily"
583
  msgstr ""
584
 
585
+ #: app/main/controllers/template/rt-template-functions.php:2032
586
  #, php-format
587
  msgid "%s ago "
588
  msgstr ""
808
  msgstr ""
809
 
810
  #: app/main/controllers/upload/RTMediaUploadView.php:71
811
+ #: app/main/controllers/upload/RTMediaUploadView.php:86
812
  msgid "File Upload"
813
  msgstr ""
814
 
824
  msgid "Drop your files here"
825
  msgstr ""
826
 
827
+ #: app/main/controllers/upload/RTMediaUploadView.php:79
828
  msgid "Start upload"
829
  msgstr ""
830
 
831
+ #: app/main/controllers/upload/RTMediaUploadView.php:86
832
  msgid "Attach Files"
833
  msgstr ""
834
 
835
+ #: app/main/controllers/upload/RTMediaUploadView.php:86
836
  msgid "Upload will start only after you enter content and click Post Update."
837
  msgstr ""
838
 
839
+ #: app/main/controllers/upload/RTMediaUploadView.php:89
840
  msgid "Insert from URL"
841
  msgstr ""
842
 
935
  msgstr ""
936
 
937
  #: app/main/controllers/privacy/RTMediaPrivacy.php:268
938
+ #: app/admin/RTMediaAdmin.php:987
939
  msgid "Privacy"
940
  msgstr ""
941
 
942
+ #: app/main/controllers/activity/RTMediaBuddyPressActivity.php:154
943
  msgid "Media Files"
944
  msgstr ""
945
 
946
+ #: app/main/controllers/shortcodes/RTMediaUploadShortcode.php:91
947
  msgid "The web browser on your device cannot be used to upload files."
948
  msgstr ""
949
 
950
+ #: app/main/controllers/shortcodes/RTMediaGalleryShortcode.php:168
951
  msgid "You do not have sufficient privileges to view this gallery"
952
  msgstr ""
953
 
1000
  msgstr ""
1001
 
1002
  #: app/main/controllers/media/RTMediaLike.php:18
1003
+ #: app/admin/RTMediaAdmin.php:286
1004
  msgid "Likes"
1005
  msgstr ""
1006
 
1012
  msgid "Error creating attachment for the media file, please try again"
1013
  msgstr ""
1014
 
1015
+ #: app/importers/RTMediaMediaSizeImporter.php:24
1016
+ msgid "Media Size Import"
1017
+ msgstr ""
1018
+
1019
+ #: app/importers/RTMediaMediaSizeImporter.php:52
1020
+ #: app/importers/RTMediaMigration.php:60 app/admin/RTMediaAdmin.php:1415
1021
+ msgid "Hide"
1022
+ msgstr ""
1023
+
1024
  #: app/importers/RTMediaMigration.php:60
1025
  msgid "Please Migrate your Database"
1026
  msgstr ""
1029
  msgid "Click Here"
1030
  msgstr ""
1031
 
 
 
 
 
1032
  #: app/importers/RTMediaMigration.php:78 app/helper/RTMediaSupport.php:53
1033
  #: app/helper/RTMediaSupport.php:54
1034
  msgid "Migration"
1302
  "developer/json-api/\">here</a>"
1303
  msgstr ""
1304
 
1305
+ #: app/admin/RTMediaFormHandler.php:459 app/helper/RTMediaSettings.php:232
1306
  msgid "Media Type"
1307
  msgstr ""
1308
 
1309
+ #: app/admin/RTMediaFormHandler.php:460
1310
  msgid "Allows you to upload a particular media type on your post."
1311
  msgstr ""
1312
 
1313
+ #: app/admin/RTMediaFormHandler.php:460
1314
  msgid "Allow Upload"
1315
  msgstr ""
1316
 
1317
+ #: app/admin/RTMediaFormHandler.php:461
1318
  msgid "Put a specific media as a featured content on the post."
1319
  msgstr ""
1320
 
1321
+ #: app/admin/RTMediaFormHandler.php:461
1322
  msgid "Set Featured"
1323
  msgstr ""
1324
 
1325
+ #: app/admin/RTMediaFormHandler.php:499
1326
  msgid "File Extensions"
1327
  msgstr ""
1328
 
1329
+ #: app/admin/RTMediaFormHandler.php:546
1330
  msgid "Category"
1331
  msgstr ""
1332
 
1333
+ #: app/admin/RTMediaFormHandler.php:547
1334
  msgid "Entity"
1335
  msgstr ""
1336
 
1337
+ #: app/admin/RTMediaFormHandler.php:548
1338
  msgid "Width"
1339
  msgstr ""
1340
 
1341
+ #: app/admin/RTMediaFormHandler.php:548
1342
  msgid "Height"
1343
  msgstr ""
1344
 
1345
+ #: app/admin/RTMediaFormHandler.php:548
1346
  msgid "Crop"
1347
  msgstr ""
1348
 
1349
+ #: app/admin/RTMediaFormHandler.php:585
1350
  msgid "Number of thumbnails to generate on video upload"
1351
  msgstr ""
1352
 
1353
+ #: app/admin/RTMediaFormHandler.php:591
1354
  msgid ""
1355
  " If you choose more than 1 thumbnail, your users will be able to change "
1356
  "thumbnail by going to video \"edit\" section."
1357
  msgstr ""
1358
 
1359
+ #: app/admin/RTMediaFormHandler.php:629
1360
  msgid ""
1361
  "If you want to add some custom CSS code to the plugin and don't want to "
1362
  "modify any files, then it's a good place to enter your code at this field."
1363
  msgstr ""
1364
 
1365
+ #: app/admin/RTMediaFormHandler.php:651
1366
  msgid "rtMedia default styles"
1367
  msgstr ""
1368
 
1369
+ #: app/admin/RTMediaFormHandler.php:657
1370
  msgid ""
1371
  "Load default rtMedia styles. You need to write your own style for rtMedia if "
1372
  "you disable it."
1373
  msgstr ""
1374
 
1375
+ #: app/admin/RTMediaFormHandler.php:661
1376
  msgid "Paste your CSS code"
1377
  msgstr ""
1378
 
1379
+ #: app/admin/RTMediaFormHandler.php:667
1380
  msgid "Custom rtMedia CSS container"
1381
  msgstr ""
1382
 
1383
+ #: app/admin/RTMediaFormHandler.php:681
1384
  msgid "Enable privacy"
1385
  msgstr ""
1386
 
1387
+ #: app/admin/RTMediaFormHandler.php:687
1388
  msgid "Enable privacy in rtMedia"
1389
  msgstr ""
1390
 
1391
+ #: app/admin/RTMediaFormHandler.php:691
1392
  msgid "Default privacy"
1393
  msgstr ""
1394
 
1395
+ #: app/admin/RTMediaFormHandler.php:697
1396
  msgid "Set default privacy for media"
1397
  msgstr ""
1398
 
1399
+ #: app/admin/RTMediaFormHandler.php:701
1400
  msgid "Allow users to set privacy for their content"
1401
  msgstr ""
1402
 
1403
+ #: app/admin/RTMediaFormHandler.php:706
1404
  msgid ""
1405
  "If you choose this, user will be able to change privacy of their own uploads."
1406
  msgstr ""
1407
 
1408
+ #: app/admin/RTMediaFormHandler.php:708
1409
  msgid "For group uploads, BuddyPress groups privacy is used."
1410
  msgstr ""
1411
 
1412
+ #: app/admin/RTMediaFormHandler.php:765
1413
  msgid "Enable media in profile"
1414
  msgstr ""
1415
 
1416
+ #: app/admin/RTMediaFormHandler.php:770
1417
  msgid "Enable Media on BuddyPress Profile"
1418
  msgstr ""
1419
 
1420
+ #: app/admin/RTMediaFormHandler.php:774
1421
  msgid "Enable media in group"
1422
  msgstr ""
1423
 
1424
+ #: app/admin/RTMediaFormHandler.php:779
1425
  msgid "Enable Media on BuddyPress Groups"
1426
  msgstr ""
1427
 
1428
+ #: app/admin/RTMediaFormHandler.php:783
1429
  msgid "Allow upload from activity stream"
1430
  msgstr ""
1431
 
1432
+ #: app/admin/RTMediaFormHandler.php:788
1433
  msgid "Allow upload using status update box present on activity stream page"
1434
  msgstr ""
1435
 
1436
+ #: app/admin/RTMediaFormHandler.php:793
1437
  msgid "Number of media items to show in activity stream"
1438
  msgstr ""
1439
 
1440
+ #: app/admin/RTMediaFormHandler.php:798
1441
  msgid ""
1442
  "With bulk uploads activity stream may get flooded. You can control maximum "
1443
  "number of medias/files per activity. This limit will not affect the actual "
1444
  "number of uplaods. Only display. <em>0</em> means unlimited."
1445
  msgstr ""
1446
 
1447
+ #: app/admin/RTMediaFormHandler.php:839
1448
  msgid "Organize media into albums"
1449
  msgstr ""
1450
 
1451
+ #: app/admin/RTMediaFormHandler.php:845
1452
  msgid ""
1453
  "This will add 'album' tab to BuddyPress profile and group depending on "
1454
  "^above^ settings."
1455
  msgstr ""
1456
 
1457
+ #: app/admin/RTMediaAdmin.php:145 app/admin/RTMediaAdmin.php:155
1458
  msgid "rtMedia:"
1459
  msgstr ""
1460
 
1461
+ #: app/admin/RTMediaAdmin.php:145
1462
  msgid " You must "
1463
  msgstr ""
1464
 
1465
+ #: app/admin/RTMediaAdmin.php:145
1466
  msgid "update permalink structure"
1467
  msgstr ""
1468
 
1469
+ #: app/admin/RTMediaAdmin.php:145
1470
  msgid " to something other than the default for it to work."
1471
  msgstr ""
1472
 
1473
+ #: app/admin/RTMediaAdmin.php:155
1474
  msgid ""
1475
  "Please update all premium add-ons that you had purchased from rtCamp from "
1476
  "your "
1477
  msgstr ""
1478
 
1479
+ #: app/admin/RTMediaAdmin.php:155
1480
  msgid "account"
1481
  msgstr ""
1482
 
1483
+ #: app/admin/RTMediaAdmin.php:218
1484
  msgid "rtMedia Pro is released"
1485
  msgstr ""
1486
 
1487
+ #: app/admin/RTMediaAdmin.php:230
1488
  msgid "Media Stats"
1489
  msgstr ""
1490
 
1491
+ #: app/admin/RTMediaAdmin.php:254
1492
  msgid "Usage Stats"
1493
  msgstr ""
1494
 
1495
+ #: app/admin/RTMediaAdmin.php:262
1496
  msgid "Total "
1497
  msgstr ""
1498
 
1499
+ #: app/admin/RTMediaAdmin.php:270
1500
  msgid "With Media"
1501
  msgstr ""
1502
 
1503
+ #: app/admin/RTMediaAdmin.php:278
1504
  msgid "Comments "
1505
  msgstr ""
1506
 
1507
+ #: app/admin/RTMediaAdmin.php:294
1508
  msgid "Homepage"
1509
  msgstr ""
1510
 
1511
+ #: app/admin/RTMediaAdmin.php:294
1512
  msgid "Free Support"
1513
  msgstr ""
1514
 
1515
+ #: app/admin/RTMediaAdmin.php:294
1516
  msgid "Premium Addons"
1517
  msgstr ""
1518
 
1519
+ #: app/admin/RTMediaAdmin.php:304
1520
  msgid "Right Now in rtMedia"
1521
  msgstr ""
1522
 
1523
+ #: app/admin/RTMediaAdmin.php:338 app/admin/RTMediaAdmin.php:504
1524
  msgid "Regenerate Thumbnail"
1525
  msgstr ""
1526
 
1527
+ #: app/admin/RTMediaAdmin.php:359 app/admin/RTMediaAdmin.php:841
1528
+ #: app/admin/RTMediaAdmin.php:842
1529
  msgid "rtMedia"
1530
  msgstr ""
1531
 
1532
+ #: app/admin/RTMediaAdmin.php:365 app/admin/RTMediaAdmin.php:368
1533
+ #: app/admin/RTMediaAdmin.php:493 app/admin/RTMediaAdmin.php:863
1534
  msgid "Settings"
1535
  msgstr ""
1536
 
1537
+ #: app/admin/RTMediaAdmin.php:375 app/admin/RTMediaAdmin.php:378
1538
+ #: app/admin/RTMediaAdmin.php:494 app/admin/RTMediaAdmin.php:868
1539
  msgid "Addons"
1540
  msgstr ""
1541
 
1542
+ #: app/admin/RTMediaAdmin.php:385 app/admin/RTMediaAdmin.php:388
1543
+ #: app/admin/RTMediaAdmin.php:495 app/admin/RTMediaAdmin.php:883
1544
  #: app/helper/RTMediaSettings.php:134
1545
  msgid "Support"
1546
  msgstr ""
1547
 
1548
+ #: app/admin/RTMediaAdmin.php:395 app/admin/RTMediaAdmin.php:398
1549
+ #: app/admin/RTMediaAdmin.php:496 app/admin/RTMediaAdmin.php:873
1550
  msgid "Themes"
1551
  msgstr ""
1552
 
1553
+ #: app/admin/RTMediaAdmin.php:405 app/admin/RTMediaAdmin.php:408
1554
+ #: app/admin/RTMediaAdmin.php:497 app/admin/RTMediaAdmin.php:878
1555
  msgid "Hire Us"
1556
  msgstr ""
1557
 
1558
+ #: app/admin/RTMediaAdmin.php:446
1559
  msgid "ON"
1560
  msgstr ""
1561
 
1562
+ #: app/admin/RTMediaAdmin.php:447
1563
  msgid "OFF"
1564
  msgstr ""
1565
 
1566
+ #: app/admin/RTMediaAdmin.php:459
1567
  msgid "Please do not refresh this page."
1568
  msgstr ""
1569
 
1570
+ #: app/admin/RTMediaAdmin.php:460
1571
  msgid ""
1572
  "Something went wronng. Please <a href onclick=\"location.reload();"
1573
  "\">refresh</a> page."
1574
  msgstr ""
1575
 
1576
+ #: app/admin/RTMediaAdmin.php:461
1577
  msgid "This will subscribe you to the free plan."
1578
  msgstr ""
1579
 
1580
+ #: app/admin/RTMediaAdmin.php:462
1581
  msgid ""
1582
  "Are you sure you want to disable the encoding service? Make sure you note "
1583
  "your api key before disabling it incase you want to activate it in future."
1584
  msgstr ""
1585
 
1586
+ #: app/admin/RTMediaAdmin.php:499
1587
  msgid "Premium"
1588
  msgstr ""
1589
 
1590
+ #: app/admin/RTMediaAdmin.php:499
1591
  msgid "Premium "
1592
  msgstr ""
1593
 
1594
+ #: app/admin/RTMediaAdmin.php:504
1595
  msgid "Regen. Thumbnail "
1596
  msgstr ""
1597
 
1598
+ #: app/admin/RTMediaAdmin.php:517
1599
  msgid "Regenerate Video Thumbnails"
1600
  msgstr ""
1601
 
1602
+ #: app/admin/RTMediaAdmin.php:534
1603
  msgid "Regenerate Pending Thumbnails"
1604
  msgstr ""
1605
 
1606
+ #: app/admin/RTMediaAdmin.php:542
1607
  msgid "Total Videos"
1608
  msgstr ""
1609
 
1610
+ #: app/admin/RTMediaAdmin.php:543
1611
  msgid "Sent of regenerate thumbails"
1612
  msgstr ""
1613
 
1614
+ #: app/admin/RTMediaAdmin.php:544
1615
  msgid "Fail to regenerate thumbails"
1616
  msgstr ""
1617
 
1618
+ #: app/admin/RTMediaAdmin.php:586
1619
  msgid "Regenerate Video Thumbnails Done"
1620
  msgstr ""
1621
 
1622
+ #: app/admin/RTMediaAdmin.php:621
1623
  #, php-format
1624
  msgid ""
1625
  "You have total %s videos without thumbnails. Click <a href='%s'> here </a> "
1627
  "()' style='float:right'>Hide</a>"
1628
  msgstr ""
1629
 
1630
+ #: app/admin/RTMediaAdmin.php:672
1631
  msgid "not a video ..."
1632
  msgstr ""
1633
 
1634
+ #: app/admin/RTMediaAdmin.php:758
1635
  msgid "Empowering The Web With WordPress"
1636
  msgstr ""
1637
 
1638
+ #: app/admin/RTMediaAdmin.php:788
1639
  msgid "Save Settings"
1640
  msgstr ""
1641
 
1642
+ #: app/admin/RTMediaAdmin.php:950 app/admin/RTMediaAdmin.php:951
1643
  msgid "Display"
1644
  msgstr ""
1645
 
1646
+ #: app/admin/RTMediaAdmin.php:961
1647
  msgid "rtMedia BuddyPress"
1648
  msgstr ""
1649
 
1650
+ #: app/admin/RTMediaAdmin.php:962
1651
  msgid "BuddyPress"
1652
  msgstr ""
1653
 
1654
+ #: app/admin/RTMediaAdmin.php:970
1655
  msgid "rtMedia Types"
1656
  msgstr ""
1657
 
1658
+ #: app/admin/RTMediaAdmin.php:971
1659
  msgid "Types"
1660
  msgstr ""
1661
 
1662
+ #: app/admin/RTMediaAdmin.php:978
1663
  msgid "rtMedia Sizes"
1664
  msgstr ""
1665
 
1666
+ #: app/admin/RTMediaAdmin.php:979
1667
  msgid "Image Sizes"
1668
  msgstr ""
1669
 
1670
+ #: app/admin/RTMediaAdmin.php:986
1671
  msgid "rtMedia Privacy"
1672
  msgstr ""
1673
 
1674
+ #: app/admin/RTMediaAdmin.php:993
1675
  msgid "rtMedia Custom CSS"
1676
  msgstr ""
1677
 
1678
+ #: app/admin/RTMediaAdmin.php:994
1679
  msgid "Custom CSS"
1680
  msgstr ""
1681
 
1682
+ #: app/admin/RTMediaAdmin.php:1003 app/admin/RTMediaAdmin.php:1004
1683
  msgid "Other Settings"
1684
  msgstr ""
1685
 
1686
+ #: app/admin/RTMediaAdmin.php:1095
1687
  #, php-format
1688
  msgid "I use @buddypressmedia http://rt.cx/rtmedia on %s"
1689
  msgstr ""
1690
 
1691
+ #: app/admin/RTMediaAdmin.php:1099
1692
  msgid "Post to Twitter Now"
1693
  msgstr ""
1694
 
1695
+ #: app/admin/RTMediaAdmin.php:1099
1696
  msgid "Post to Twitter"
1697
  msgstr ""
1698
 
1699
+ #: app/admin/RTMediaAdmin.php:1100
1700
  msgid "Share on Facebook Now"
1701
  msgstr ""
1702
 
1703
+ #: app/admin/RTMediaAdmin.php:1100
1704
  msgid "Share on Facebook"
1705
  msgstr ""
1706
 
1707
+ #: app/admin/RTMediaAdmin.php:1101
1708
  msgid "Rate rtMedia on Wordpress.org"
1709
  msgstr ""
1710
 
1711
+ #: app/admin/RTMediaAdmin.php:1101
1712
  msgid "Rate on Wordpress.org"
1713
  msgstr ""
1714
 
1715
+ #: app/admin/RTMediaAdmin.php:1102
1716
  msgid "Subscribe to our feeds"
1717
  msgstr ""
1718
 
1719
+ #: app/admin/RTMediaAdmin.php:1102
1720
  msgid "Subscribe to our Feeds"
1721
  msgstr ""
1722
 
1723
+ #: app/admin/RTMediaAdmin.php:1103
1724
  msgid "Add link to footer"
1725
  msgstr ""
1726
 
1727
+ #: app/admin/RTMediaAdmin.php:1109
1728
  msgid "Spread the Word"
1729
  msgstr ""
1730
 
1731
+ #: app/admin/RTMediaAdmin.php:1141 app/admin/RTMediaAdmin.php:1144
1732
  msgid "Subscribe"
1733
  msgstr ""
1734
 
1735
+ #: app/admin/RTMediaAdmin.php:1166
1736
  msgid "Thank you for your time."
1737
  msgstr ""
1738
 
1739
+ #: app/admin/RTMediaAdmin.php:1178
1740
  msgid "Premium Add-ons"
1741
  msgstr ""
1742
 
1743
+ #: app/admin/RTMediaAdmin.php:1192
1744
  #, php-format
1745
  msgid ""
1746
  "You have images enabled on rtMedia but your network allowed filetypes does "
1748
  "settings manually."
1749
  msgstr ""
1750
 
1751
+ #: app/admin/RTMediaAdmin.php:1193 app/admin/RTMediaAdmin.php:1204
1752
+ #: app/admin/RTMediaAdmin.php:1213
1753
  msgid "Recommended"
1754
  msgstr ""
1755
 
1756
+ #: app/admin/RTMediaAdmin.php:1193 app/admin/RTMediaAdmin.php:1204
1757
+ #: app/admin/RTMediaAdmin.php:1213
1758
  msgid "Update Network Settings Automatically"
1759
  msgstr ""
1760
 
1761
+ #: app/admin/RTMediaAdmin.php:1203
1762
  #, php-format
1763
  msgid ""
1764
  "You have video enabled on BuddyPress Media but your network allowed "
1766
  "change your settings manually."
1767
  msgstr ""
1768
 
1769
+ #: app/admin/RTMediaAdmin.php:1212
1770
  #, php-format
1771
  msgid ""
1772
  "You have audio enabled on BuddyPress Media but your network allowed "
1774
  "change your settings manually."
1775
  msgstr ""
1776
 
1777
+ #: app/admin/RTMediaAdmin.php:1227
1778
  msgid "Network settings updated successfully."
1779
  msgstr ""
1780
 
1781
+ #: app/admin/RTMediaAdmin.php:1330
1782
  msgid "Video is sent to generate thumbnails."
1783
  msgstr ""
1784
 
1785
+ #: app/admin/RTMediaAdmin.php:1333
1786
  msgid "Video can't be sent to generate thumbnails."
1787
  msgstr ""
1788
 
1789
+ #: app/admin/RTMediaAdmin.php:1415
1790
  msgid ""
1791
  "rtMedia just updated to Foundation 5. Please update rtMedia template files "
1792
  "if you have overridden the default rtMedia templates in your theme."
readme.txt CHANGED
@@ -1,12 +1,12 @@
1
  === rtMedia for WordPress, BuddyPress and bbPress ===
2
- Contributors: rtcamp, rahul286, faishal, JoshuaAbenazer, gagan0123, saurabhshukla, desaiuditd, nitun.lanjewar, rittesh.patel, pushpak.pop, umesh.nevase, suhasgirgaonkar, neerukoul, hrishiv90, kanakiyajay, jarretc, tobiaskluge, rafaelfunchal, UmeshSingla
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
5
  License: GPLv2 or later
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: WordPress 3.6
8
  Tested up to: WordPress 3.7 + BuddyPress 1.8.1
9
- Stable tag: 3.6.9
10
 
11
  Add albums, photo, audio/video encoding, privacy, sharing, front-end uploads & more. All this works mobile/tablets devices.
12
 
@@ -133,6 +133,11 @@ http://www.youtube.com/watch?v=dJrykKQGDcs
133
 
134
  Please visit [rtMedia's Roadmap page](http://rtcamp.com/rtmedia/roadmap/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media "Visit rtMedia's Features page") to get some details about future releases.
135
 
 
 
 
 
 
136
  = 3.6.9 =
137
  * Fix single activity video lightbox issue
138
  * Update german translations
@@ -731,8 +736,8 @@ Please visit [rtMedia's Roadmap page](http://rtcamp.com/rtmedia/roadmap/?utm_sou
731
 
732
  == Upgrade Notice ==
733
 
734
- = 3.6.9 =
735
- Requires BuddyPress 1.7 or higher, if using BuddyPress. Fix single activity video lightbox issue, update german translations.
736
 
737
  == Sponsors ==
738
 
1
  === rtMedia for WordPress, BuddyPress and bbPress ===
2
+ Contributors: rtcamp, rahul286, faishal, JoshuaAbenazer, gagan0123, saurabhshukla, desaiuditd, nitun.lanjewar, rittesh.patel, pushpak.pop, umesh.nevase, suhasgirgaonkar, neerukoul, hrishiv90, kanakiyajay, jarretc, tobiaskluge, rafaelfunchal, UmeshSingla, mehulkaklotar
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
5
  License: GPLv2 or later
6
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
  Requires at least: WordPress 3.6
8
  Tested up to: WordPress 3.7 + BuddyPress 1.8.1
9
+ Stable tag: 3.6.10
10
 
11
  Add albums, photo, audio/video encoding, privacy, sharing, front-end uploads & more. All this works mobile/tablets devices.
12
 
133
 
134
  Please visit [rtMedia's Roadmap page](http://rtcamp.com/rtmedia/roadmap/?utm_source=readme&utm_medium=plugin&utm_campaign=buddypress-media "Visit rtMedia's Features page") to get some details about future releases.
135
 
136
+ = 3.6.10 =
137
+ * Update German and Swedish translations
138
+ * JS fix for WordPress 3.9 Beta
139
+ * Bug fixes
140
+
141
  = 3.6.9 =
142
  * Fix single activity video lightbox issue
143
  * Update german translations
736
 
737
  == Upgrade Notice ==
738
 
739
+ = 3.6.10 =
740
+ Requires BuddyPress 1.7 or higher, if using BuddyPress. Update German and Swedish translations, js fix for WordPress 3.9 Beta, bug fixes.
741
 
742
  == Sponsors ==
743